@ooneex/cli 1.20.2 → 1.21.0

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
@@ -5064,11 +5064,105 @@ class AppStopCommand {
5064
5064
  AppStopCommand = __legacyDecorateClassTS([
5065
5065
  decorator3.command()
5066
5066
  ], AppStopCommand);
5067
- // src/commands/CompletionZshCommand.ts
5068
- import { homedir } from "os";
5067
+ // src/commands/CommandRunCommand.ts
5068
+ import { existsSync } from "fs";
5069
5069
  import { join as join4 } from "path";
5070
5070
  import { decorator as decorator4 } from "@ooneex/command";
5071
5071
  import { TerminalLogger as TerminalLogger4 } from "@ooneex/logger";
5072
+ class CommandRunCommand {
5073
+ getName() {
5074
+ return "command:run";
5075
+ }
5076
+ getDescription() {
5077
+ return "Run a custom command from a module";
5078
+ }
5079
+ async run() {
5080
+ const logger = new TerminalLogger4;
5081
+ const commandName = Bun.argv[3];
5082
+ if (!commandName) {
5083
+ logger.error("Command name is required. Usage: ooneex command:run <command-name>", undefined, {
5084
+ showTimestamp: false,
5085
+ showArrow: false,
5086
+ useSymbol: false
5087
+ });
5088
+ return;
5089
+ }
5090
+ const extraArgs = Bun.argv.slice(4);
5091
+ const modulesDir = join4(process.cwd(), "modules");
5092
+ if (!existsSync(modulesDir)) {
5093
+ logger.warn(`Command "${commandName}" not found in any module`, undefined, {
5094
+ showTimestamp: false,
5095
+ showArrow: false,
5096
+ useSymbol: false
5097
+ });
5098
+ return;
5099
+ }
5100
+ const glob = new Bun.Glob("*/package.json");
5101
+ const modules = [];
5102
+ for await (const match of glob.scan({ cwd: modulesDir, onlyFiles: true })) {
5103
+ const entry = match.replace("/package.json", "");
5104
+ const moduleDir = join4(modulesDir, entry);
5105
+ const commandRunFile = Bun.file(join4(moduleDir, "bin", "command", "run.ts"));
5106
+ if (await commandRunFile.exists()) {
5107
+ const packageJson = await Bun.file(join4(modulesDir, match)).json();
5108
+ modules.push({ name: packageJson.name ?? entry, dir: moduleDir });
5109
+ }
5110
+ }
5111
+ if (modules.length === 0) {
5112
+ logger.warn(`Command "${commandName}" not found in any module`, undefined, {
5113
+ showTimestamp: false,
5114
+ showArrow: false,
5115
+ useSymbol: false
5116
+ });
5117
+ return;
5118
+ }
5119
+ for (const { name, dir } of modules) {
5120
+ const commandRunPath = join4(dir, "bin", "command", "run.ts");
5121
+ logger.info(`Running "${commandName}" for ${name}...`, undefined, {
5122
+ showTimestamp: false,
5123
+ showArrow: false,
5124
+ useSymbol: false
5125
+ });
5126
+ const proc = Bun.spawn(["bun", "run", commandRunPath, commandName, ...extraArgs], {
5127
+ cwd: dir,
5128
+ stdout: "pipe",
5129
+ stderr: "pipe"
5130
+ });
5131
+ const [stdout, stderr] = await Promise.all([new Response(proc.stdout).text(), new Response(proc.stderr).text()]);
5132
+ const exitCode = await proc.exited;
5133
+ if (exitCode === 0) {
5134
+ if (stdout)
5135
+ process.stdout.write(stdout);
5136
+ if (stderr)
5137
+ process.stderr.write(stderr);
5138
+ logger.success(`Command "${commandName}" completed for ${name}`, undefined, {
5139
+ showTimestamp: false,
5140
+ showArrow: false,
5141
+ useSymbol: false
5142
+ });
5143
+ return;
5144
+ }
5145
+ logger.warn(`Command "${commandName}" not found in ${name}`, undefined, {
5146
+ showTimestamp: false,
5147
+ showArrow: false,
5148
+ useSymbol: false
5149
+ });
5150
+ }
5151
+ logger.error(`Command "${commandName}" not found in any module`, undefined, {
5152
+ showTimestamp: false,
5153
+ showArrow: false,
5154
+ useSymbol: false
5155
+ });
5156
+ }
5157
+ }
5158
+ CommandRunCommand = __legacyDecorateClassTS([
5159
+ decorator4.command()
5160
+ ], CommandRunCommand);
5161
+ // src/commands/CompletionZshCommand.ts
5162
+ import { homedir } from "os";
5163
+ import { join as join5 } from "path";
5164
+ import { decorator as decorator5 } from "@ooneex/command";
5165
+ import { TerminalLogger as TerminalLogger5 } from "@ooneex/logger";
5072
5166
 
5073
5167
  // src/templates/completions/_oo.txt
5074
5168
  var _oo_default = `#compdef oo ooneex
@@ -5081,12 +5175,21 @@ _oo_modules() {
5081
5175
  fi
5082
5176
  }
5083
5177
 
5178
+ _oo_custom_commands() {
5179
+ local -a cmds
5180
+ if [[ -d modules ]]; then
5181
+ cmds=(\${(@f)"$(command grep -rh 'return "' modules/*/src/commands/*Command.ts 2>/dev/null | sed 's/.*return "\\(.*\\)".*/\\1/' | sort -u)"})
5182
+ compadd -a cmds
5183
+ fi
5184
+ }
5185
+
5084
5186
  _oo() {
5085
5187
  local -a commands
5086
5188
  commands=(
5087
5189
  'app\\:build:Build the application'
5088
5190
  'app\\:start:Start the application'
5089
5191
  'app\\:stop:Stop the application'
5192
+ 'command\\:run:Run a custom command from a module'
5090
5193
  'completion\\:zsh:Install Zsh completion for oo command'
5091
5194
  'help:Show available commands'
5092
5195
  'make\\:ai:Generate a new AI class'
@@ -5142,6 +5245,10 @@ _oo() {
5142
5245
  ;;
5143
5246
  opts)
5144
5247
  case "$words[1]" in
5248
+ command:run)
5249
+ _arguments -s \\
5250
+ '1:command name:_oo_custom_commands'
5251
+ ;;
5145
5252
  make:controller)
5146
5253
  _arguments -s \\
5147
5254
  '--name=[Name of the resource]:name' \\
@@ -5197,7 +5304,11 @@ _oo() {
5197
5304
  '--name=[Name of the resource]:name' \\
5198
5305
  '--module=[Module name]:module:_oo_modules'
5199
5306
  ;;
5200
- app:build|app:start|app:stop|help|make:release|make:resource:book|make:resource:calendar-event|make:resource:category|make:resource:color|make:resource:discount|make:resource:folder|make:resource:image|make:resource:note|make:resource:status|make:resource:tag|make:resource:task|make:resource:topic|make:resource:user|make:resource:video|make:claude:skill|migration:up|seed:run|completion:zsh)
5307
+ migration:up|seed:run)
5308
+ _arguments -s \\
5309
+ '--drop[Drop the database before running]'
5310
+ ;;
5311
+ app:build|app:start|app:stop|help|make:release|make:resource:book|make:resource:calendar-event|make:resource:category|make:resource:color|make:resource:discount|make:resource:folder|make:resource:image|make:resource:note|make:resource:status|make:resource:tag|make:resource:task|make:resource:topic|make:resource:user|make:resource:video|make:claude:skill|completion:zsh)
5201
5312
  ;;
5202
5313
  esac
5203
5314
  ;;
@@ -5218,12 +5329,21 @@ _ooneex_modules() {
5218
5329
  fi
5219
5330
  }
5220
5331
 
5332
+ _ooneex_custom_commands() {
5333
+ local -a cmds
5334
+ if [[ -d modules ]]; then
5335
+ cmds=(\${(@f)"$(command grep -rh 'return "' modules/*/src/commands/*Command.ts 2>/dev/null | sed 's/.*return "\\(.*\\)".*/\\1/' | sort -u)"})
5336
+ compadd -a cmds
5337
+ fi
5338
+ }
5339
+
5221
5340
  _ooneex() {
5222
5341
  local -a commands
5223
5342
  commands=(
5224
5343
  'app\\:build:Build the application'
5225
5344
  'app\\:start:Start the application'
5226
5345
  'app\\:stop:Stop the application'
5346
+ 'command\\:run:Run a custom command from a module'
5227
5347
  'completion\\:zsh:Install Zsh completion for oo command'
5228
5348
  'help:Show available commands'
5229
5349
  'make\\:ai:Generate a new AI class'
@@ -5279,6 +5399,10 @@ _ooneex() {
5279
5399
  ;;
5280
5400
  opts)
5281
5401
  case "$words[1]" in
5402
+ command:run)
5403
+ _arguments -s \\
5404
+ '1:command name:_ooneex_custom_commands'
5405
+ ;;
5282
5406
  make:controller)
5283
5407
  _arguments -s \\
5284
5408
  '--name=[Name of the resource]:name' \\
@@ -5334,7 +5458,11 @@ _ooneex() {
5334
5458
  '--name=[Name of the resource]:name' \\
5335
5459
  '--module=[Module name]:module:_ooneex_modules'
5336
5460
  ;;
5337
- app:build|app:start|app:stop|help|make:release|make:resource:book|make:resource:calendar-event|make:resource:category|make:resource:color|make:resource:discount|make:resource:folder|make:resource:image|make:resource:note|make:resource:status|make:resource:tag|make:resource:task|make:resource:topic|make:resource:user|make:resource:video|make:claude:skill|migration:up|seed:run|completion:zsh)
5461
+ migration:up|seed:run)
5462
+ _arguments -s \\
5463
+ '--drop[Drop the database before running]'
5464
+ ;;
5465
+ app:build|app:start|app:stop|help|make:release|make:resource:book|make:resource:calendar-event|make:resource:category|make:resource:color|make:resource:discount|make:resource:folder|make:resource:image|make:resource:note|make:resource:status|make:resource:tag|make:resource:task|make:resource:topic|make:resource:user|make:resource:video|make:claude:skill|completion:zsh)
5338
5466
  ;;
5339
5467
  esac
5340
5468
  ;;
@@ -5353,12 +5481,12 @@ class CompletionZshCommand {
5353
5481
  return "Install Zsh completion for oo command";
5354
5482
  }
5355
5483
  async run() {
5356
- const completionDir = join4(homedir(), ".zsh");
5357
- const ooFilePath = join4(completionDir, "_oo");
5484
+ const completionDir = join5(homedir(), ".zsh");
5485
+ const ooFilePath = join5(completionDir, "_oo");
5358
5486
  await Bun.write(ooFilePath, _oo_default);
5359
- const ooneexFilePath = join4(completionDir, "_ooneex");
5487
+ const ooneexFilePath = join5(completionDir, "_ooneex");
5360
5488
  await Bun.write(ooneexFilePath, _ooneex_default);
5361
- const logger = new TerminalLogger4;
5489
+ const logger = new TerminalLogger5;
5362
5490
  logger.success(`${ooFilePath} created successfully`, undefined, {
5363
5491
  showTimestamp: false,
5364
5492
  showArrow: false,
@@ -5379,10 +5507,10 @@ class CompletionZshCommand {
5379
5507
  }
5380
5508
  }
5381
5509
  CompletionZshCommand = __legacyDecorateClassTS([
5382
- decorator4.command()
5510
+ decorator5.command()
5383
5511
  ], CompletionZshCommand);
5384
5512
  // src/commands/HelpCommand.ts
5385
- import { COMMANDS_CONTAINER, decorator as decorator5 } from "@ooneex/command";
5513
+ import { COMMANDS_CONTAINER, decorator as decorator6 } from "@ooneex/command";
5386
5514
  class HelpCommand {
5387
5515
  getName() {
5388
5516
  return "help";
@@ -5409,12 +5537,12 @@ class HelpCommand {
5409
5537
  }
5410
5538
  }
5411
5539
  HelpCommand = __legacyDecorateClassTS([
5412
- decorator5.command()
5540
+ decorator6.command()
5413
5541
  ], HelpCommand);
5414
5542
  // src/commands/MakeAiCommand.ts
5415
- import { join as join7 } from "path";
5416
- import { decorator as decorator7 } from "@ooneex/command";
5417
- import { TerminalLogger as TerminalLogger6 } from "@ooneex/logger";
5543
+ import { join as join8 } from "path";
5544
+ import { decorator as decorator8 } from "@ooneex/command";
5545
+ import { TerminalLogger as TerminalLogger7 } from "@ooneex/logger";
5418
5546
  import { toPascalCase as toPascalCase2 } from "@ooneex/utils";
5419
5547
 
5420
5548
  // src/prompts/askName.ts
@@ -5511,12 +5639,12 @@ export class {{NAME}}Ai implements IAiChat<OpenAiConfigType> {
5511
5639
  `;
5512
5640
 
5513
5641
  // src/utils.ts
5514
- import { join as join6 } from "path";
5642
+ import { join as join7 } from "path";
5515
5643
 
5516
5644
  // src/commands/MakeModuleCommand.ts
5517
- import { join as join5 } from "path";
5518
- import { decorator as decorator6 } from "@ooneex/command";
5519
- import { TerminalLogger as TerminalLogger5 } from "@ooneex/logger";
5645
+ import { join as join6 } from "path";
5646
+ import { decorator as decorator7 } from "@ooneex/command";
5647
+ import { TerminalLogger as TerminalLogger6 } from "@ooneex/logger";
5520
5648
  import { toKebabCase, toPascalCase } from "@ooneex/utils";
5521
5649
 
5522
5650
  // src/templates/module/module.txt
@@ -5640,7 +5768,7 @@ class MakeModuleCommand {
5640
5768
  ${newScope},`;
5641
5769
  content = content.replace(regex, `$1${newValue}
5642
5770
  $3`);
5643
- await Bun.write(commitlintPath, content);
5771
+ await Bun.write(commitlintPath, content.replace(/,+/g, ","));
5644
5772
  }
5645
5773
  }
5646
5774
  }
@@ -5654,52 +5782,46 @@ class MakeModuleCommand {
5654
5782
  `);
5655
5783
  }
5656
5784
  async run(options) {
5657
- const { cwd = process.cwd(), silent = false, skipMigrations = false, skipSeeds = false } = options;
5785
+ const { cwd = process.cwd(), silent = false } = options;
5658
5786
  let { name } = options;
5659
5787
  if (!name) {
5660
5788
  name = await askName({ message: "Enter module name" });
5661
5789
  }
5662
5790
  const pascalName = toPascalCase(name).replace(/Module$/, "");
5663
5791
  const kebabName = toKebabCase(pascalName);
5664
- const moduleDir = join5(cwd, "modules", kebabName);
5665
- const srcDir = join5(moduleDir, "src");
5666
- const testsDir = join5(moduleDir, "tests");
5792
+ const moduleDir = join6(cwd, "modules", kebabName);
5793
+ const srcDir = join6(moduleDir, "src");
5794
+ const testsDir = join6(moduleDir, "tests");
5667
5795
  const moduleContent = module_default.replace(/{{NAME}}/g, pascalName);
5668
5796
  const packageContent = package_default.replace(/{{NAME}}/g, kebabName);
5669
5797
  const testContent = test_default.replace(/{{NAME}}/g, pascalName).replace(/{{name}}/g, kebabName);
5670
- await Bun.write(join5(srcDir, `${pascalName}Module.ts`), moduleContent);
5671
- if (!skipMigrations) {
5672
- await Bun.write(join5(srcDir, "migrations", "migrations.ts"), "");
5673
- }
5674
- if (!skipSeeds) {
5675
- await Bun.write(join5(srcDir, "seeds", "seeds.ts"), "");
5676
- }
5677
- await Bun.write(join5(moduleDir, "package.json"), packageContent);
5678
- await Bun.write(join5(moduleDir, "tsconfig.json"), tsconfig_default);
5679
- await Bun.write(join5(testsDir, `${pascalName}Module.spec.ts`), testContent);
5798
+ await Bun.write(join6(srcDir, `${pascalName}Module.ts`), moduleContent);
5799
+ await Bun.write(join6(moduleDir, "package.json"), packageContent);
5800
+ await Bun.write(join6(moduleDir, "tsconfig.json"), tsconfig_default);
5801
+ await Bun.write(join6(testsDir, `${pascalName}Module.spec.ts`), testContent);
5680
5802
  if (kebabName !== "app") {
5681
- const appModulePath = join5(cwd, "modules", "app", "src", "AppModule.ts");
5803
+ const appModulePath = join6(cwd, "modules", "app", "src", "AppModule.ts");
5682
5804
  if (await Bun.file(appModulePath).exists()) {
5683
5805
  await this.addToAppModule(appModulePath, pascalName, kebabName);
5684
5806
  }
5685
5807
  }
5686
- const appTsconfigPath = join5(cwd, "tsconfig.json");
5808
+ const appTsconfigPath = join6(cwd, "tsconfig.json");
5687
5809
  if (await Bun.file(appTsconfigPath).exists()) {
5688
5810
  await this.addPathAlias(appTsconfigPath, kebabName);
5689
5811
  }
5690
5812
  if (kebabName !== "app" && kebabName !== "shared") {
5691
- const sharedModuleDir = join5(cwd, "modules", "shared");
5692
- const sharedModuleFilePath = join5(sharedModuleDir, "src", "SharedModule.ts");
5813
+ const sharedModuleDir = join6(cwd, "modules", "shared");
5814
+ const sharedModuleFilePath = join6(sharedModuleDir, "src", "SharedModule.ts");
5693
5815
  if (await Bun.file(sharedModuleFilePath).exists()) {
5694
5816
  await this.addToSharedModule(sharedModuleFilePath, pascalName, kebabName);
5695
5817
  }
5696
5818
  }
5697
- const commitlintPath = join5(cwd, ".commitlintrc.ts");
5819
+ const commitlintPath = join6(cwd, ".commitlintrc.ts");
5698
5820
  if (await Bun.file(commitlintPath).exists()) {
5699
5821
  await this.addModuleScope(commitlintPath, kebabName);
5700
5822
  }
5701
5823
  if (!silent) {
5702
- const logger = new TerminalLogger5;
5824
+ const logger = new TerminalLogger6;
5703
5825
  logger.success(`modules/${kebabName} created successfully`, undefined, {
5704
5826
  showTimestamp: false,
5705
5827
  showArrow: false,
@@ -5709,13 +5831,13 @@ class MakeModuleCommand {
5709
5831
  }
5710
5832
  }
5711
5833
  MakeModuleCommand = __legacyDecorateClassTS([
5712
- decorator6.command()
5834
+ decorator7.command()
5713
5835
  ], MakeModuleCommand);
5714
5836
 
5715
5837
  // src/utils.ts
5716
5838
  var ensureModule = async (module) => {
5717
- const moduleDir = join6(process.cwd(), "modules", module);
5718
- const moduleDirExists = await Bun.file(join6(moduleDir, "package.json")).exists();
5839
+ const moduleDir = join7(process.cwd(), "modules", module);
5840
+ const moduleDirExists = await Bun.file(join7(moduleDir, "package.json")).exists();
5719
5841
  if (!moduleDirExists) {
5720
5842
  const makeModule = new MakeModuleCommand;
5721
5843
  await makeModule.run({ name: module, cwd: process.cwd(), silent: true });
@@ -5740,28 +5862,28 @@ class MakeAiCommand {
5740
5862
  await ensureModule(module);
5741
5863
  }
5742
5864
  const content = ai_default.replace(/{{NAME}}/g, name);
5743
- const base = module ? join7("modules", module) : ".";
5744
- const aiLocalDir = join7(base, "src", "ai");
5745
- const aiDir = join7(process.cwd(), aiLocalDir);
5746
- const filePath = join7(aiDir, `${name}Ai.ts`);
5865
+ const base = module ? join8("modules", module) : ".";
5866
+ const aiLocalDir = join8(base, "src", "ai");
5867
+ const aiDir = join8(process.cwd(), aiLocalDir);
5868
+ const filePath = join8(aiDir, `${name}Ai.ts`);
5747
5869
  await Bun.write(filePath, content);
5748
5870
  const testContent = ai_test_default.replace(/{{NAME}}/g, name);
5749
- const testsLocalDir = join7(base, "tests", "ai");
5750
- const testsDir = join7(process.cwd(), testsLocalDir);
5751
- const testFilePath = join7(testsDir, `${name}Ai.spec.ts`);
5871
+ const testsLocalDir = join8(base, "tests", "ai");
5872
+ const testsDir = join8(process.cwd(), testsLocalDir);
5873
+ const testFilePath = join8(testsDir, `${name}Ai.spec.ts`);
5752
5874
  await Bun.write(testFilePath, testContent);
5753
- const logger = new TerminalLogger6;
5754
- logger.success(`${join7(aiLocalDir, name)}Ai.ts created successfully`, undefined, {
5875
+ const logger = new TerminalLogger7;
5876
+ logger.success(`${join8(aiLocalDir, name)}Ai.ts created successfully`, undefined, {
5755
5877
  showTimestamp: false,
5756
5878
  showArrow: false,
5757
5879
  useSymbol: true
5758
5880
  });
5759
- logger.success(`${join7(testsLocalDir, name)}Ai.spec.ts created successfully`, undefined, {
5881
+ logger.success(`${join8(testsLocalDir, name)}Ai.spec.ts created successfully`, undefined, {
5760
5882
  showTimestamp: false,
5761
5883
  showArrow: false,
5762
5884
  useSymbol: true
5763
5885
  });
5764
- const packageJsonPath = join7(process.cwd(), "package.json");
5886
+ const packageJsonPath = join8(process.cwd(), "package.json");
5765
5887
  const packageJson = await Bun.file(packageJsonPath).json();
5766
5888
  const deps = packageJson.dependencies ?? {};
5767
5889
  const devDeps = packageJson.devDependencies ?? {};
@@ -5776,12 +5898,12 @@ class MakeAiCommand {
5776
5898
  }
5777
5899
  }
5778
5900
  MakeAiCommand = __legacyDecorateClassTS([
5779
- decorator7.command()
5901
+ decorator8.command()
5780
5902
  ], MakeAiCommand);
5781
5903
  // src/commands/MakeAnalyticsCommand.ts
5782
- import { join as join8 } from "path";
5783
- import { decorator as decorator8 } from "@ooneex/command";
5784
- import { TerminalLogger as TerminalLogger7 } from "@ooneex/logger";
5904
+ import { join as join9 } from "path";
5905
+ import { decorator as decorator9 } from "@ooneex/command";
5906
+ import { TerminalLogger as TerminalLogger8 } from "@ooneex/logger";
5785
5907
  import { toPascalCase as toPascalCase3 } from "@ooneex/utils";
5786
5908
 
5787
5909
  // src/templates/analytics.test.txt
@@ -5832,28 +5954,28 @@ class MakeAnalyticsCommand {
5832
5954
  if (module) {
5833
5955
  await ensureModule(module);
5834
5956
  }
5835
- const base = module ? join8("modules", module) : ".";
5836
- const analyticsLocalDir = join8(base, "src", "analytics");
5837
- const analyticsDir = join8(process.cwd(), analyticsLocalDir);
5838
- const filePath = join8(analyticsDir, `${name}Analytics.ts`);
5957
+ const base = module ? join9("modules", module) : ".";
5958
+ const analyticsLocalDir = join9(base, "src", "analytics");
5959
+ const analyticsDir = join9(process.cwd(), analyticsLocalDir);
5960
+ const filePath = join9(analyticsDir, `${name}Analytics.ts`);
5839
5961
  await Bun.write(filePath, content);
5840
5962
  const testContent = analytics_test_default.replace(/{{NAME}}/g, name);
5841
- const testsLocalDir = join8(base, "tests", "analytics");
5842
- const testsDir = join8(process.cwd(), testsLocalDir);
5843
- const testFilePath = join8(testsDir, `${name}Analytics.spec.ts`);
5963
+ const testsLocalDir = join9(base, "tests", "analytics");
5964
+ const testsDir = join9(process.cwd(), testsLocalDir);
5965
+ const testFilePath = join9(testsDir, `${name}Analytics.spec.ts`);
5844
5966
  await Bun.write(testFilePath, testContent);
5845
- const logger = new TerminalLogger7;
5846
- logger.success(`${join8(analyticsLocalDir, name)}Analytics.ts created successfully`, undefined, {
5967
+ const logger = new TerminalLogger8;
5968
+ logger.success(`${join9(analyticsLocalDir, name)}Analytics.ts created successfully`, undefined, {
5847
5969
  showTimestamp: false,
5848
5970
  showArrow: false,
5849
5971
  useSymbol: true
5850
5972
  });
5851
- logger.success(`${join8(testsLocalDir, name)}Analytics.spec.ts created successfully`, undefined, {
5973
+ logger.success(`${join9(testsLocalDir, name)}Analytics.spec.ts created successfully`, undefined, {
5852
5974
  showTimestamp: false,
5853
5975
  showArrow: false,
5854
5976
  useSymbol: true
5855
5977
  });
5856
- const packageJsonPath = join8(process.cwd(), "package.json");
5978
+ const packageJsonPath = join9(process.cwd(), "package.json");
5857
5979
  const packageJson = await Bun.file(packageJsonPath).json();
5858
5980
  const deps = packageJson.dependencies ?? {};
5859
5981
  const devDeps = packageJson.devDependencies ?? {};
@@ -5868,12 +5990,12 @@ class MakeAnalyticsCommand {
5868
5990
  }
5869
5991
  }
5870
5992
  MakeAnalyticsCommand = __legacyDecorateClassTS([
5871
- decorator8.command()
5993
+ decorator9.command()
5872
5994
  ], MakeAnalyticsCommand);
5873
5995
  // src/commands/MakeAppCommand.ts
5874
- import { join as join9 } from "path";
5875
- import { decorator as decorator9 } from "@ooneex/command";
5876
- import { TerminalLogger as TerminalLogger8 } from "@ooneex/logger";
5996
+ import { join as join10 } from "path";
5997
+ import { decorator as decorator10 } from "@ooneex/command";
5998
+ import { TerminalLogger as TerminalLogger9 } from "@ooneex/logger";
5877
5999
  import { toKebabCase as toKebabCase2, toSnakeCase } from "@ooneex/utils";
5878
6000
 
5879
6001
  // src/prompts/askDestination.ts
@@ -7012,44 +7134,40 @@ class MakeAppCommand {
7012
7134
  destination = await askDestination({ message: "Enter destination path", initial: kebabName });
7013
7135
  }
7014
7136
  const packageContent = package_json_default.replace(/{{NAME}}/g, kebabName);
7015
- await Bun.write(join9(destination, ".commitlintrc.ts"), _commitlintrc_ts_default);
7016
- await Bun.write(join9(destination, ".gitignore"), _gitignore_default);
7017
- await Bun.write(join9(destination, "biome.jsonc"), biome_jsonc_default);
7018
- await Bun.write(join9(destination, "bunfig.toml"), bunfig_toml_default);
7019
- await Bun.write(join9(destination, "nx.json"), nx_json_default);
7020
- await Bun.write(join9(destination, "package.json"), packageContent);
7021
- await Bun.write(join9(destination, "README.md"), README_md_default.replace(/{{NAME}}/g, kebabName));
7022
- await Bun.write(join9(destination, "tsconfig.json"), tsconfig_json_default);
7023
- await Bun.write(join9(destination, ".zed", "settings.json"), zed_settings_json_default);
7137
+ await Bun.write(join10(destination, ".commitlintrc.ts"), _commitlintrc_ts_default);
7138
+ await Bun.write(join10(destination, ".gitignore"), _gitignore_default);
7139
+ await Bun.write(join10(destination, "biome.jsonc"), biome_jsonc_default);
7140
+ await Bun.write(join10(destination, "bunfig.toml"), bunfig_toml_default);
7141
+ await Bun.write(join10(destination, "nx.json"), nx_json_default);
7142
+ await Bun.write(join10(destination, "package.json"), packageContent);
7143
+ await Bun.write(join10(destination, "README.md"), README_md_default.replace(/{{NAME}}/g, kebabName));
7144
+ await Bun.write(join10(destination, "tsconfig.json"), tsconfig_json_default);
7145
+ await Bun.write(join10(destination, ".zed", "settings.json"), zed_settings_json_default);
7024
7146
  const makeModuleCommand = new MakeModuleCommand;
7025
7147
  await makeModuleCommand.run({
7026
7148
  name: "app",
7027
7149
  cwd: destination,
7028
- silent: true,
7029
- skipMigrations: true,
7030
- skipSeeds: true
7150
+ silent: true
7031
7151
  });
7032
- const appModulePackagePath = join9(destination, "modules", "app", "package.json");
7152
+ const appModulePackagePath = join10(destination, "modules", "app", "package.json");
7033
7153
  const appModulePackageJson = await Bun.file(appModulePackagePath).json();
7034
7154
  await Bun.write(appModulePackagePath, JSON.stringify(appModulePackageJson, null, 2));
7035
7155
  const envContent = env_default.replace(/^DATABASE_URL=/m, 'DATABASE_URL="postgresql://ooneex:ooneex@localhost:5432/ooneex"').replace(/^CACHE_REDIS_URL=/m, 'CACHE_REDIS_URL="redis://localhost:6379"').replace(/^PUBSUB_REDIS_URL=/m, 'PUBSUB_REDIS_URL="redis://localhost:6379"').replace(/^RATE_LIMIT_REDIS_URL=/m, 'RATE_LIMIT_REDIS_URL="redis://localhost:6379"').replace(/^DATABASE_REDIS_URL=/m, 'DATABASE_REDIS_URL="redis://localhost:6379"');
7036
- await Bun.write(join9(destination, "modules", "app", ".env"), envContent);
7037
- await Bun.write(join9(destination, "modules", "app", ".env.example"), env_default);
7038
- await Bun.write(join9(destination, "modules", "app", "src", "index.ts"), index_ts_default);
7156
+ await Bun.write(join10(destination, "modules", "app", ".env"), envContent);
7157
+ await Bun.write(join10(destination, "modules", "app", ".env.example"), env_default);
7158
+ await Bun.write(join10(destination, "modules", "app", "src", "index.ts"), index_ts_default);
7039
7159
  await makeModuleCommand.run({
7040
7160
  name: "shared",
7041
7161
  cwd: destination,
7042
- silent: true,
7043
- skipMigrations: true,
7044
- skipSeeds: true
7162
+ silent: true
7045
7163
  });
7046
- await Bun.write(join9(destination, "modules", "shared", "src", "databases", "SharedDatabase.ts"), app_database_default);
7164
+ await Bun.write(join10(destination, "modules", "shared", "src", "databases", "SharedDatabase.ts"), app_database_default);
7047
7165
  const snakeName = toSnakeCase(name);
7048
7166
  const dockerComposeContent = docker_compose_yml_default.replace(/{{NAME}}/g, snakeName);
7049
- await Bun.write(join9(destination, "modules", "app", "docker-compose.yml"), dockerComposeContent);
7167
+ await Bun.write(join10(destination, "modules", "app", "docker-compose.yml"), dockerComposeContent);
7050
7168
  const dockerfileContent = Dockerfile_default.replace(/{{NAME}}/g, snakeName);
7051
- await Bun.write(join9(destination, "modules", "app", "Dockerfile"), dockerfileContent);
7052
- await Bun.write(join9(destination, "modules", "app", "var", ".gitkeep"), "");
7169
+ await Bun.write(join10(destination, "modules", "app", "Dockerfile"), dockerfileContent);
7170
+ await Bun.write(join10(destination, "modules", "app", "var", ".gitkeep"), "");
7053
7171
  const gitInit = Bun.spawn(["git", "init"], { cwd: destination, stdout: "ignore", stderr: "inherit" });
7054
7172
  await gitInit.exited;
7055
7173
  const addDeps = Bun.spawn([
@@ -7111,9 +7229,9 @@ class MakeAppCommand {
7111
7229
  await addDevDeps.exited;
7112
7230
  const huskyInit = Bun.spawn(["bunx", "husky", "init"], { cwd: destination, stdout: "ignore", stderr: "inherit" });
7113
7231
  await huskyInit.exited;
7114
- await Bun.write(join9(destination, ".husky", "pre-commit"), "lint-staged");
7115
- await Bun.write(join9(destination, ".husky", "commit-msg"), `bunx commitlint --edit "$1"`);
7116
- const logger = new TerminalLogger8;
7232
+ await Bun.write(join10(destination, ".husky", "pre-commit"), "lint-staged");
7233
+ await Bun.write(join10(destination, ".husky", "commit-msg"), `bunx commitlint --edit "$1"`);
7234
+ const logger = new TerminalLogger9;
7117
7235
  logger.success(`${kebabName} created successfully at ${destination}`, undefined, {
7118
7236
  showTimestamp: false,
7119
7237
  showArrow: false,
@@ -7122,12 +7240,12 @@ class MakeAppCommand {
7122
7240
  }
7123
7241
  }
7124
7242
  MakeAppCommand = __legacyDecorateClassTS([
7125
- decorator9.command()
7243
+ decorator10.command()
7126
7244
  ], MakeAppCommand);
7127
7245
  // src/commands/MakeCacheCommand.ts
7128
- import { join as join10 } from "path";
7129
- import { decorator as decorator10 } from "@ooneex/command";
7130
- import { TerminalLogger as TerminalLogger9 } from "@ooneex/logger";
7246
+ import { join as join11 } from "path";
7247
+ import { decorator as decorator11 } from "@ooneex/command";
7248
+ import { TerminalLogger as TerminalLogger10 } from "@ooneex/logger";
7131
7249
  import { toPascalCase as toPascalCase4 } from "@ooneex/utils";
7132
7250
 
7133
7251
  // src/templates/cache.test.txt
@@ -7203,28 +7321,28 @@ class MakeCacheCommand {
7203
7321
  if (module) {
7204
7322
  await ensureModule(module);
7205
7323
  }
7206
- const base = module ? join10("modules", module) : ".";
7207
- const cacheLocalDir = join10(base, "src", "cache");
7208
- const cacheDir = join10(process.cwd(), cacheLocalDir);
7209
- const filePath = join10(cacheDir, `${name}Cache.ts`);
7324
+ const base = module ? join11("modules", module) : ".";
7325
+ const cacheLocalDir = join11(base, "src", "cache");
7326
+ const cacheDir = join11(process.cwd(), cacheLocalDir);
7327
+ const filePath = join11(cacheDir, `${name}Cache.ts`);
7210
7328
  await Bun.write(filePath, content);
7211
7329
  const testContent = cache_test_default.replace(/{{NAME}}/g, name);
7212
- const testsLocalDir = join10(base, "tests", "cache");
7213
- const testsDir = join10(process.cwd(), testsLocalDir);
7214
- const testFilePath = join10(testsDir, `${name}Cache.spec.ts`);
7330
+ const testsLocalDir = join11(base, "tests", "cache");
7331
+ const testsDir = join11(process.cwd(), testsLocalDir);
7332
+ const testFilePath = join11(testsDir, `${name}Cache.spec.ts`);
7215
7333
  await Bun.write(testFilePath, testContent);
7216
- const logger = new TerminalLogger9;
7217
- logger.success(`${join10(cacheLocalDir, name)}Cache.ts created successfully`, undefined, {
7334
+ const logger = new TerminalLogger10;
7335
+ logger.success(`${join11(cacheLocalDir, name)}Cache.ts created successfully`, undefined, {
7218
7336
  showTimestamp: false,
7219
7337
  showArrow: false,
7220
7338
  useSymbol: true
7221
7339
  });
7222
- logger.success(`${join10(testsLocalDir, name)}Cache.spec.ts created successfully`, undefined, {
7340
+ logger.success(`${join11(testsLocalDir, name)}Cache.spec.ts created successfully`, undefined, {
7223
7341
  showTimestamp: false,
7224
7342
  showArrow: false,
7225
7343
  useSymbol: true
7226
7344
  });
7227
- const packageJsonPath = join10(process.cwd(), "package.json");
7345
+ const packageJsonPath = join11(process.cwd(), "package.json");
7228
7346
  const packageJson = await Bun.file(packageJsonPath).json();
7229
7347
  const deps = packageJson.dependencies ?? {};
7230
7348
  const devDeps = packageJson.devDependencies ?? {};
@@ -7239,12 +7357,12 @@ class MakeCacheCommand {
7239
7357
  }
7240
7358
  }
7241
7359
  MakeCacheCommand = __legacyDecorateClassTS([
7242
- decorator10.command()
7360
+ decorator11.command()
7243
7361
  ], MakeCacheCommand);
7244
7362
  // src/commands/MakeClaudeSkillCommand.ts
7245
- import { join as join11 } from "path";
7246
- import { decorator as decorator11 } from "@ooneex/command";
7247
- import { TerminalLogger as TerminalLogger10 } from "@ooneex/logger";
7363
+ import { join as join12 } from "path";
7364
+ import { decorator as decorator12 } from "@ooneex/command";
7365
+ import { TerminalLogger as TerminalLogger11 } from "@ooneex/logger";
7248
7366
 
7249
7367
  // src/templates/claude/skills/commit.md.txt
7250
7368
  var commit_md_default = `---
@@ -7535,14 +7653,14 @@ class MakeClaudeSkillCommand {
7535
7653
  return "Generate Claude skills from templates";
7536
7654
  }
7537
7655
  async run() {
7538
- const skillsLocalDir = join11(".claude", "skills");
7539
- const skillsDir = join11(process.cwd(), skillsLocalDir);
7540
- const logger = new TerminalLogger10;
7656
+ const skillsLocalDir = join12(".claude", "skills");
7657
+ const skillsDir = join12(process.cwd(), skillsLocalDir);
7658
+ const logger = new TerminalLogger11;
7541
7659
  for (const [skillName, content] of Object.entries(skills)) {
7542
7660
  const dirName = skillName.replace(/\./g, "-");
7543
- const filePath = join11(skillsDir, dirName, "SKILL.md");
7661
+ const filePath = join12(skillsDir, dirName, "SKILL.md");
7544
7662
  await Bun.write(filePath, content);
7545
- logger.success(`${join11(skillsLocalDir, dirName, "SKILL.md")} created successfully`, undefined, {
7663
+ logger.success(`${join12(skillsLocalDir, dirName, "SKILL.md")} created successfully`, undefined, {
7546
7664
  showTimestamp: false,
7547
7665
  showArrow: false,
7548
7666
  useSymbol: true
@@ -7551,18 +7669,18 @@ class MakeClaudeSkillCommand {
7551
7669
  }
7552
7670
  }
7553
7671
  MakeClaudeSkillCommand = __legacyDecorateClassTS([
7554
- decorator11.command()
7672
+ decorator12.command()
7555
7673
  ], MakeClaudeSkillCommand);
7556
7674
  // src/commands/MakeCommandCommand.ts
7557
- import { join as join12 } from "path";
7558
- import { commandCreate, decorator as decorator12 } from "@ooneex/command";
7559
- import { TerminalLogger as TerminalLogger11 } from "@ooneex/logger";
7675
+ import { join as join13 } from "path";
7676
+ import { commandCreate, decorator as decorator13 } from "@ooneex/command";
7677
+ import { TerminalLogger as TerminalLogger12 } from "@ooneex/logger";
7560
7678
 
7561
7679
  // src/templates/module/command.run.txt
7562
7680
  var command_run_default = `#!/usr/bin/env bun
7563
7681
 
7564
7682
  import { run } from "@ooneex/command";
7565
- import "@/commands/commands";
7683
+ import "@module/{{name}}/commands/commands";
7566
7684
 
7567
7685
  await run();
7568
7686
  `;
@@ -7583,20 +7701,19 @@ class MakeCommandCommand {
7583
7701
  if (module) {
7584
7702
  await ensureModule(module);
7585
7703
  }
7586
- const base = module ? join12("modules", module) : ".";
7587
- const { commandPath, testPath } = await commandCreate({
7704
+ const base = module ? join13("modules", module) : ".";
7705
+ const { commandPath: filePath, testPath } = await commandCreate({
7588
7706
  name,
7589
- commandDir: join12(base, "src", "commands"),
7590
- testsDir: join12(base, "tests", "commands")
7707
+ commandDir: join13(base, "src", "commands"),
7708
+ testsDir: join13(base, "tests", "commands")
7591
7709
  });
7592
- const binCommandRunPath = join12(process.cwd(), base, "bin", "command", "run.ts");
7710
+ const binCommandRunPath = join13(process.cwd(), base, "bin", "command", "run.ts");
7593
7711
  const binCommandRunFile = Bun.file(binCommandRunPath);
7594
7712
  if (!await binCommandRunFile.exists()) {
7595
- await Bun.write(binCommandRunPath, command_run_default);
7713
+ await Bun.write(binCommandRunPath, command_run_default.replace(/{{name}}/g, module ?? ""));
7596
7714
  }
7597
- const packageJsonPath = join12(process.cwd(), base, "package.json");
7598
- const logger = new TerminalLogger11;
7599
- logger.success(`${commandPath} created successfully`, undefined, {
7715
+ const logger = new TerminalLogger12;
7716
+ logger.success(`${filePath} created successfully`, undefined, {
7600
7717
  showTimestamp: false,
7601
7718
  showArrow: false,
7602
7719
  useSymbol: true
@@ -7606,26 +7723,15 @@ class MakeCommandCommand {
7606
7723
  showArrow: false,
7607
7724
  useSymbol: true
7608
7725
  });
7609
- const pkgJson = await Bun.file(packageJsonPath).json();
7610
- const deps = pkgJson.dependencies ?? {};
7611
- const devDeps = pkgJson.devDependencies ?? {};
7612
- if (!deps["@ooneex/command"] && !devDeps["@ooneex/command"]) {
7613
- const install = Bun.spawn(["bun", "add", "--dev", "@ooneex/command"], {
7614
- cwd: process.cwd(),
7615
- stdout: "ignore",
7616
- stderr: "inherit"
7617
- });
7618
- await install.exited;
7619
- }
7620
7726
  }
7621
7727
  }
7622
7728
  MakeCommandCommand = __legacyDecorateClassTS([
7623
- decorator12.command()
7729
+ decorator13.command()
7624
7730
  ], MakeCommandCommand);
7625
7731
  // src/commands/MakeControllerCommand.ts
7626
- import { basename, join as join13 } from "path";
7627
- import { decorator as decorator13 } from "@ooneex/command";
7628
- import { TerminalLogger as TerminalLogger12 } from "@ooneex/logger";
7732
+ import { basename, join as join14 } from "path";
7733
+ import { decorator as decorator14 } from "@ooneex/command";
7734
+ import { TerminalLogger as TerminalLogger13 } from "@ooneex/logger";
7629
7735
  import { toKebabCase as toKebabCase3, toPascalCase as toPascalCase5, trim } from "@ooneex/utils";
7630
7736
 
7631
7737
  // src/prompts/askConfirm.ts
@@ -8045,33 +8151,33 @@ class MakeControllerCommand {
8045
8151
  if (module) {
8046
8152
  await ensureModule(module);
8047
8153
  }
8048
- const base = module ? join13("modules", module) : ".";
8049
- const controllersLocalDir = join13(base, "src", "controllers");
8050
- const controllersDir = join13(process.cwd(), controllersLocalDir);
8051
- const filePath = join13(controllersDir, `${name}Controller.ts`);
8154
+ const base = module ? join14("modules", module) : ".";
8155
+ const controllersLocalDir = join14(base, "src", "controllers");
8156
+ const controllersDir = join14(process.cwd(), controllersLocalDir);
8157
+ const filePath = join14(controllersDir, `${name}Controller.ts`);
8052
8158
  await Bun.write(filePath, content);
8053
8159
  const testContent = controller_test_default.replace(/{{NAME}}/g, name);
8054
- const testsLocalDir = join13(base, "tests", "controllers");
8055
- const testsDir = join13(process.cwd(), testsLocalDir);
8056
- const testFilePath = join13(testsDir, `${name}Controller.spec.ts`);
8160
+ const testsLocalDir = join14(base, "tests", "controllers");
8161
+ const testsDir = join14(process.cwd(), testsLocalDir);
8162
+ const testFilePath = join14(testsDir, `${name}Controller.spec.ts`);
8057
8163
  await Bun.write(testFilePath, testContent);
8058
8164
  const modulePascalName = module ? toPascalCase5(module) : toPascalCase5(basename(process.cwd()));
8059
- const modulePath = join13(process.cwd(), base, "src", `${modulePascalName}Module.ts`);
8165
+ const modulePath = join14(process.cwd(), base, "src", `${modulePascalName}Module.ts`);
8060
8166
  if (await Bun.file(modulePath).exists()) {
8061
8167
  await this.addToModule(modulePath, name);
8062
8168
  }
8063
- const logger = new TerminalLogger12;
8064
- logger.success(`${join13(controllersLocalDir, name)}Controller.ts created successfully`, undefined, {
8169
+ const logger = new TerminalLogger13;
8170
+ logger.success(`${join14(controllersLocalDir, name)}Controller.ts created successfully`, undefined, {
8065
8171
  showTimestamp: false,
8066
8172
  showArrow: false,
8067
8173
  useSymbol: true
8068
8174
  });
8069
- logger.success(`${join13(testsLocalDir, name)}Controller.spec.ts created successfully`, undefined, {
8175
+ logger.success(`${join14(testsLocalDir, name)}Controller.spec.ts created successfully`, undefined, {
8070
8176
  showTimestamp: false,
8071
8177
  showArrow: false,
8072
8178
  useSymbol: true
8073
8179
  });
8074
- const packageJsonPath = join13(process.cwd(), "package.json");
8180
+ const packageJsonPath = join14(process.cwd(), "package.json");
8075
8181
  const packageJson = await Bun.file(packageJsonPath).json();
8076
8182
  const deps = packageJson.dependencies ?? {};
8077
8183
  const devDeps = packageJson.devDependencies ?? {};
@@ -8086,12 +8192,12 @@ class MakeControllerCommand {
8086
8192
  }
8087
8193
  }
8088
8194
  MakeControllerCommand = __legacyDecorateClassTS([
8089
- decorator13.command()
8195
+ decorator14.command()
8090
8196
  ], MakeControllerCommand);
8091
8197
  // src/commands/MakeCronCommand.ts
8092
- import { basename as basename2, join as join14 } from "path";
8093
- import { decorator as decorator14 } from "@ooneex/command";
8094
- import { TerminalLogger as TerminalLogger13 } from "@ooneex/logger";
8198
+ import { basename as basename2, join as join15 } from "path";
8199
+ import { decorator as decorator15 } from "@ooneex/command";
8200
+ import { TerminalLogger as TerminalLogger14 } from "@ooneex/logger";
8095
8201
  import { toPascalCase as toPascalCase6 } from "@ooneex/utils";
8096
8202
 
8097
8203
  // src/templates/cron.test.txt
@@ -8180,33 +8286,33 @@ class MakeCronCommand {
8180
8286
  if (module) {
8181
8287
  await ensureModule(module);
8182
8288
  }
8183
- const base = module ? join14("modules", module) : ".";
8184
- const cronLocalDir = join14(base, "src", "crons");
8185
- const cronDir = join14(process.cwd(), cronLocalDir);
8186
- const filePath = join14(cronDir, `${name}Cron.ts`);
8289
+ const base = module ? join15("modules", module) : ".";
8290
+ const cronLocalDir = join15(base, "src", "crons");
8291
+ const cronDir = join15(process.cwd(), cronLocalDir);
8292
+ const filePath = join15(cronDir, `${name}Cron.ts`);
8187
8293
  await Bun.write(filePath, content);
8188
8294
  const testContent = cron_test_default.replace(/{{NAME}}/g, name);
8189
- const testsLocalDir = join14(base, "tests", "crons");
8190
- const testsDir = join14(process.cwd(), testsLocalDir);
8191
- const testFilePath = join14(testsDir, `${name}Cron.spec.ts`);
8295
+ const testsLocalDir = join15(base, "tests", "crons");
8296
+ const testsDir = join15(process.cwd(), testsLocalDir);
8297
+ const testFilePath = join15(testsDir, `${name}Cron.spec.ts`);
8192
8298
  await Bun.write(testFilePath, testContent);
8193
8299
  const modulePascalName = module ? toPascalCase6(module) : toPascalCase6(basename2(process.cwd()));
8194
- const modulePath = join14(process.cwd(), base, "src", `${modulePascalName}Module.ts`);
8300
+ const modulePath = join15(process.cwd(), base, "src", `${modulePascalName}Module.ts`);
8195
8301
  if (await Bun.file(modulePath).exists()) {
8196
8302
  await this.addToModule(modulePath, name);
8197
8303
  }
8198
- const logger = new TerminalLogger13;
8199
- logger.success(`${join14(cronLocalDir, name)}Cron.ts created successfully`, undefined, {
8304
+ const logger = new TerminalLogger14;
8305
+ logger.success(`${join15(cronLocalDir, name)}Cron.ts created successfully`, undefined, {
8200
8306
  showTimestamp: false,
8201
8307
  showArrow: false,
8202
8308
  useSymbol: true
8203
8309
  });
8204
- logger.success(`${join14(testsLocalDir, name)}Cron.spec.ts created successfully`, undefined, {
8310
+ logger.success(`${join15(testsLocalDir, name)}Cron.spec.ts created successfully`, undefined, {
8205
8311
  showTimestamp: false,
8206
8312
  showArrow: false,
8207
8313
  useSymbol: true
8208
8314
  });
8209
- const packageJsonPath = join14(process.cwd(), "package.json");
8315
+ const packageJsonPath = join15(process.cwd(), "package.json");
8210
8316
  const packageJson = await Bun.file(packageJsonPath).json();
8211
8317
  const deps = packageJson.dependencies ?? {};
8212
8318
  const devDeps = packageJson.devDependencies ?? {};
@@ -8221,12 +8327,12 @@ class MakeCronCommand {
8221
8327
  }
8222
8328
  }
8223
8329
  MakeCronCommand = __legacyDecorateClassTS([
8224
- decorator14.command()
8330
+ decorator15.command()
8225
8331
  ], MakeCronCommand);
8226
8332
  // src/commands/MakeDatabaseCommand.ts
8227
- import { join as join15 } from "path";
8228
- import { decorator as decorator15 } from "@ooneex/command";
8229
- import { TerminalLogger as TerminalLogger14 } from "@ooneex/logger";
8333
+ import { join as join16 } from "path";
8334
+ import { decorator as decorator16 } from "@ooneex/command";
8335
+ import { TerminalLogger as TerminalLogger15 } from "@ooneex/logger";
8230
8336
  import { toPascalCase as toPascalCase7 } from "@ooneex/utils";
8231
8337
 
8232
8338
  // src/templates/database.test.txt
@@ -8289,28 +8395,28 @@ class MakeDatabaseCommand {
8289
8395
  if (module) {
8290
8396
  await ensureModule(module);
8291
8397
  }
8292
- const base = module ? join15("modules", module) : ".";
8293
- const databaseLocalDir = join15(base, "src", "databases");
8294
- const databaseDir = join15(process.cwd(), databaseLocalDir);
8295
- const filePath = join15(databaseDir, `${name}Database.ts`);
8398
+ const base = module ? join16("modules", module) : ".";
8399
+ const databaseLocalDir = join16(base, "src", "databases");
8400
+ const databaseDir = join16(process.cwd(), databaseLocalDir);
8401
+ const filePath = join16(databaseDir, `${name}Database.ts`);
8296
8402
  await Bun.write(filePath, content);
8297
8403
  const testContent = database_test_default.replace(/{{NAME}}/g, name);
8298
- const testsLocalDir = join15(base, "tests", "databases");
8299
- const testsDir = join15(process.cwd(), testsLocalDir);
8300
- const testFilePath = join15(testsDir, `${name}Database.spec.ts`);
8404
+ const testsLocalDir = join16(base, "tests", "databases");
8405
+ const testsDir = join16(process.cwd(), testsLocalDir);
8406
+ const testFilePath = join16(testsDir, `${name}Database.spec.ts`);
8301
8407
  await Bun.write(testFilePath, testContent);
8302
- const logger = new TerminalLogger14;
8303
- logger.success(`${join15(databaseLocalDir, name)}Database.ts created successfully`, undefined, {
8408
+ const logger = new TerminalLogger15;
8409
+ logger.success(`${join16(databaseLocalDir, name)}Database.ts created successfully`, undefined, {
8304
8410
  showTimestamp: false,
8305
8411
  showArrow: false,
8306
8412
  useSymbol: true
8307
8413
  });
8308
- logger.success(`${join15(testsLocalDir, name)}Database.spec.ts created successfully`, undefined, {
8414
+ logger.success(`${join16(testsLocalDir, name)}Database.spec.ts created successfully`, undefined, {
8309
8415
  showTimestamp: false,
8310
8416
  showArrow: false,
8311
8417
  useSymbol: true
8312
8418
  });
8313
- const packageJsonPath = join15(process.cwd(), "package.json");
8419
+ const packageJsonPath = join16(process.cwd(), "package.json");
8314
8420
  const packageJson = await Bun.file(packageJsonPath).json();
8315
8421
  const deps = packageJson.dependencies ?? {};
8316
8422
  const devDeps = packageJson.devDependencies ?? {};
@@ -8325,12 +8431,12 @@ class MakeDatabaseCommand {
8325
8431
  }
8326
8432
  }
8327
8433
  MakeDatabaseCommand = __legacyDecorateClassTS([
8328
- decorator15.command()
8434
+ decorator16.command()
8329
8435
  ], MakeDatabaseCommand);
8330
8436
  // src/commands/MakeDockerCommand.ts
8331
- import { join as join16 } from "path";
8332
- import { decorator as decorator16 } from "@ooneex/command";
8333
- import { TerminalLogger as TerminalLogger15 } from "@ooneex/logger";
8437
+ import { join as join17 } from "path";
8438
+ import { decorator as decorator17 } from "@ooneex/command";
8439
+ import { TerminalLogger as TerminalLogger16 } from "@ooneex/logger";
8334
8440
  var {YAML } = globalThis.Bun;
8335
8441
 
8336
8442
  // src/prompts/askDockerService.ts
@@ -8823,9 +8929,9 @@ class MakeDockerCommand {
8823
8929
  name = await askDockerService({ message: "Select docker service" });
8824
8930
  }
8825
8931
  const templateContent = templates[name];
8826
- const base = join16("modules", "app");
8827
- const composePath = join16(process.cwd(), base, "docker-compose.yml");
8828
- const logger = new TerminalLogger15;
8932
+ const base = join17("modules", "app");
8933
+ const composePath = join17(process.cwd(), base, "docker-compose.yml");
8934
+ const logger = new TerminalLogger16;
8829
8935
  const composeFile = Bun.file(composePath);
8830
8936
  if (await composeFile.exists()) {
8831
8937
  const existingContent = await composeFile.text();
@@ -8884,7 +8990,7 @@ volumes:
8884
8990
  } else {
8885
8991
  await Bun.write(composePath, templateContent);
8886
8992
  }
8887
- const packageJsonPath = join16(process.cwd(), base, "package.json");
8993
+ const packageJsonPath = join17(process.cwd(), base, "package.json");
8888
8994
  const packageJsonFile = Bun.file(packageJsonPath);
8889
8995
  if (await packageJsonFile.exists()) {
8890
8996
  const packageJson = await packageJsonFile.json();
@@ -8905,13 +9011,13 @@ volumes:
8905
9011
  }
8906
9012
  }
8907
9013
  MakeDockerCommand = __legacyDecorateClassTS([
8908
- decorator16.command()
9014
+ decorator17.command()
8909
9015
  ], MakeDockerCommand);
8910
9016
  // src/commands/MakeEntityCommand.ts
8911
9017
  var import_pluralize = __toESM(require_pluralize(), 1);
8912
- import { basename as basename3, join as join17 } from "path";
8913
- import { decorator as decorator17 } from "@ooneex/command";
8914
- import { TerminalLogger as TerminalLogger16 } from "@ooneex/logger";
9018
+ import { basename as basename3, join as join18 } from "path";
9019
+ import { decorator as decorator18 } from "@ooneex/command";
9020
+ import { TerminalLogger as TerminalLogger17 } from "@ooneex/logger";
8915
9021
  import { toPascalCase as toPascalCase8, toSnakeCase as toSnakeCase2 } from "@ooneex/utils";
8916
9022
 
8917
9023
  // src/templates/entity.test.txt
@@ -9075,28 +9181,28 @@ class MakeEntityCommand {
9075
9181
  if (module) {
9076
9182
  await ensureModule(module);
9077
9183
  }
9078
- const base = module ? join17("modules", module) : ".";
9079
- const entitiesLocalDir = join17(base, "src", "entities");
9080
- const entitiesDir = join17(process.cwd(), entitiesLocalDir);
9081
- const filePath = join17(entitiesDir, `${name}Entity.ts`);
9184
+ const base = module ? join18("modules", module) : ".";
9185
+ const entitiesLocalDir = join18(base, "src", "entities");
9186
+ const entitiesDir = join18(process.cwd(), entitiesLocalDir);
9187
+ const filePath = join18(entitiesDir, `${name}Entity.ts`);
9082
9188
  await Bun.write(filePath, content);
9083
9189
  const testContent = entity_test_default.replace(/{{NAME}}/g, name);
9084
- const testsLocalDir = join17(base, "tests", "entities");
9085
- const testsDir = join17(process.cwd(), testsLocalDir);
9086
- const testFilePath = join17(testsDir, `${name}Entity.spec.ts`);
9190
+ const testsLocalDir = join18(base, "tests", "entities");
9191
+ const testsDir = join18(process.cwd(), testsLocalDir);
9192
+ const testFilePath = join18(testsDir, `${name}Entity.spec.ts`);
9087
9193
  await Bun.write(testFilePath, testContent);
9088
9194
  const modulePascalName = module ? toPascalCase8(module) : toPascalCase8(basename3(process.cwd()));
9089
- const modulePath = join17(process.cwd(), base, "src", `${modulePascalName}Module.ts`);
9195
+ const modulePath = join18(process.cwd(), base, "src", `${modulePascalName}Module.ts`);
9090
9196
  if (await Bun.file(modulePath).exists()) {
9091
9197
  await this.addToModule(modulePath, name);
9092
9198
  }
9093
- const logger = new TerminalLogger16;
9094
- logger.success(`${join17(entitiesLocalDir, name)}Entity.ts created successfully`, undefined, {
9199
+ const logger = new TerminalLogger17;
9200
+ logger.success(`${join18(entitiesLocalDir, name)}Entity.ts created successfully`, undefined, {
9095
9201
  showTimestamp: false,
9096
9202
  showArrow: false,
9097
9203
  useSymbol: true
9098
9204
  });
9099
- logger.success(`${join17(testsLocalDir, name)}Entity.spec.ts created successfully`, undefined, {
9205
+ logger.success(`${join18(testsLocalDir, name)}Entity.spec.ts created successfully`, undefined, {
9100
9206
  showTimestamp: false,
9101
9207
  showArrow: false,
9102
9208
  useSymbol: true
@@ -9104,12 +9210,12 @@ class MakeEntityCommand {
9104
9210
  }
9105
9211
  }
9106
9212
  MakeEntityCommand = __legacyDecorateClassTS([
9107
- decorator17.command()
9213
+ decorator18.command()
9108
9214
  ], MakeEntityCommand);
9109
9215
  // src/commands/MakeLoggerCommand.ts
9110
- import { join as join18 } from "path";
9111
- import { decorator as decorator18 } from "@ooneex/command";
9112
- import { TerminalLogger as TerminalLogger17 } from "@ooneex/logger";
9216
+ import { join as join19 } from "path";
9217
+ import { decorator as decorator19 } from "@ooneex/command";
9218
+ import { TerminalLogger as TerminalLogger18 } from "@ooneex/logger";
9113
9219
  import { toPascalCase as toPascalCase9 } from "@ooneex/utils";
9114
9220
 
9115
9221
  // src/templates/logger.test.txt
@@ -9214,28 +9320,28 @@ class MakeLoggerCommand {
9214
9320
  if (module) {
9215
9321
  await ensureModule(module);
9216
9322
  }
9217
- const base = module ? join18("modules", module) : ".";
9218
- const loggerLocalDir = join18(base, "src", "loggers");
9219
- const loggerDir = join18(process.cwd(), loggerLocalDir);
9220
- const filePath = join18(loggerDir, `${name}Logger.ts`);
9323
+ const base = module ? join19("modules", module) : ".";
9324
+ const loggerLocalDir = join19(base, "src", "loggers");
9325
+ const loggerDir = join19(process.cwd(), loggerLocalDir);
9326
+ const filePath = join19(loggerDir, `${name}Logger.ts`);
9221
9327
  await Bun.write(filePath, content);
9222
9328
  const testContent = logger_test_default.replace(/{{NAME}}/g, name);
9223
- const testsLocalDir = join18(base, "tests", "loggers");
9224
- const testsDir = join18(process.cwd(), testsLocalDir);
9225
- const testFilePath = join18(testsDir, `${name}Logger.spec.ts`);
9329
+ const testsLocalDir = join19(base, "tests", "loggers");
9330
+ const testsDir = join19(process.cwd(), testsLocalDir);
9331
+ const testFilePath = join19(testsDir, `${name}Logger.spec.ts`);
9226
9332
  await Bun.write(testFilePath, testContent);
9227
- const logger = new TerminalLogger17;
9228
- logger.success(`${join18(loggerLocalDir, name)}Logger.ts created successfully`, undefined, {
9333
+ const logger = new TerminalLogger18;
9334
+ logger.success(`${join19(loggerLocalDir, name)}Logger.ts created successfully`, undefined, {
9229
9335
  showTimestamp: false,
9230
9336
  showArrow: false,
9231
9337
  useSymbol: true
9232
9338
  });
9233
- logger.success(`${join18(testsLocalDir, name)}Logger.spec.ts created successfully`, undefined, {
9339
+ logger.success(`${join19(testsLocalDir, name)}Logger.spec.ts created successfully`, undefined, {
9234
9340
  showTimestamp: false,
9235
9341
  showArrow: false,
9236
9342
  useSymbol: true
9237
9343
  });
9238
- const packageJsonPath = join18(process.cwd(), "package.json");
9344
+ const packageJsonPath = join19(process.cwd(), "package.json");
9239
9345
  const packageJson = await Bun.file(packageJsonPath).json();
9240
9346
  const deps = packageJson.dependencies ?? {};
9241
9347
  const devDeps = packageJson.devDependencies ?? {};
@@ -9250,12 +9356,12 @@ class MakeLoggerCommand {
9250
9356
  }
9251
9357
  }
9252
9358
  MakeLoggerCommand = __legacyDecorateClassTS([
9253
- decorator18.command()
9359
+ decorator19.command()
9254
9360
  ], MakeLoggerCommand);
9255
9361
  // src/commands/MakeMailerCommand.ts
9256
- import { join as join19 } from "path";
9257
- import { decorator as decorator19 } from "@ooneex/command";
9258
- import { TerminalLogger as TerminalLogger18 } from "@ooneex/logger";
9362
+ import { join as join20 } from "path";
9363
+ import { decorator as decorator20 } from "@ooneex/command";
9364
+ import { TerminalLogger as TerminalLogger19 } from "@ooneex/logger";
9259
9365
  import { toPascalCase as toPascalCase10 } from "@ooneex/utils";
9260
9366
 
9261
9367
  // src/templates/mailer/mailer.test.txt
@@ -9353,43 +9459,43 @@ class MakeMailerCommand {
9353
9459
  if (module) {
9354
9460
  await ensureModule(module);
9355
9461
  }
9356
- const base = module ? join19("modules", module) : ".";
9357
- const mailerLocalDir = join19(base, "src", "mailers");
9358
- const mailerDir = join19(process.cwd(), mailerLocalDir);
9359
- const mailerFilePath = join19(mailerDir, `${name}Mailer.ts`);
9360
- const templateFilePath = join19(mailerDir, `${name}MailerTemplate.tsx`);
9462
+ const base = module ? join20("modules", module) : ".";
9463
+ const mailerLocalDir = join20(base, "src", "mailers");
9464
+ const mailerDir = join20(process.cwd(), mailerLocalDir);
9465
+ const mailerFilePath = join20(mailerDir, `${name}Mailer.ts`);
9466
+ const templateFilePath = join20(mailerDir, `${name}MailerTemplate.tsx`);
9361
9467
  await Bun.write(mailerFilePath, mailerContent);
9362
9468
  await Bun.write(templateFilePath, templateContent);
9363
9469
  const mailerTestContent = mailer_test_default.replace(/{{NAME}}/g, name);
9364
9470
  const templateTestContent = mailer_template_test_default.replace(/{{NAME}}/g, name);
9365
- const testsLocalDir = join19(base, "tests", "mailers");
9366
- const testsDir = join19(process.cwd(), testsLocalDir);
9367
- const mailerTestFilePath = join19(testsDir, `${name}Mailer.spec.ts`);
9368
- const templateTestFilePath = join19(testsDir, `${name}MailerTemplate.spec.ts`);
9471
+ const testsLocalDir = join20(base, "tests", "mailers");
9472
+ const testsDir = join20(process.cwd(), testsLocalDir);
9473
+ const mailerTestFilePath = join20(testsDir, `${name}Mailer.spec.ts`);
9474
+ const templateTestFilePath = join20(testsDir, `${name}MailerTemplate.spec.ts`);
9369
9475
  await Bun.write(mailerTestFilePath, mailerTestContent);
9370
9476
  await Bun.write(templateTestFilePath, templateTestContent);
9371
- const logger = new TerminalLogger18;
9372
- logger.success(`${join19(mailerLocalDir, name)}Mailer.ts created successfully`, undefined, {
9477
+ const logger = new TerminalLogger19;
9478
+ logger.success(`${join20(mailerLocalDir, name)}Mailer.ts created successfully`, undefined, {
9373
9479
  showTimestamp: false,
9374
9480
  showArrow: false,
9375
9481
  useSymbol: true
9376
9482
  });
9377
- logger.success(`${join19(mailerLocalDir, name)}MailerTemplate.tsx created successfully`, undefined, {
9483
+ logger.success(`${join20(mailerLocalDir, name)}MailerTemplate.tsx created successfully`, undefined, {
9378
9484
  showTimestamp: false,
9379
9485
  showArrow: false,
9380
9486
  useSymbol: true
9381
9487
  });
9382
- logger.success(`${join19(testsLocalDir, name)}Mailer.spec.ts created successfully`, undefined, {
9488
+ logger.success(`${join20(testsLocalDir, name)}Mailer.spec.ts created successfully`, undefined, {
9383
9489
  showTimestamp: false,
9384
9490
  showArrow: false,
9385
9491
  useSymbol: true
9386
9492
  });
9387
- logger.success(`${join19(testsLocalDir, name)}MailerTemplate.spec.ts created successfully`, undefined, {
9493
+ logger.success(`${join20(testsLocalDir, name)}MailerTemplate.spec.ts created successfully`, undefined, {
9388
9494
  showTimestamp: false,
9389
9495
  showArrow: false,
9390
9496
  useSymbol: true
9391
9497
  });
9392
- const packageJsonPath = join19(process.cwd(), "package.json");
9498
+ const packageJsonPath = join20(process.cwd(), "package.json");
9393
9499
  const packageJson = await Bun.file(packageJsonPath).json();
9394
9500
  const deps = packageJson.dependencies ?? {};
9395
9501
  const devDeps = packageJson.devDependencies ?? {};
@@ -9404,12 +9510,12 @@ class MakeMailerCommand {
9404
9510
  }
9405
9511
  }
9406
9512
  MakeMailerCommand = __legacyDecorateClassTS([
9407
- decorator19.command()
9513
+ decorator20.command()
9408
9514
  ], MakeMailerCommand);
9409
9515
  // src/commands/MakeMiddlewareCommand.ts
9410
- import { basename as basename4, join as join20 } from "path";
9411
- import { decorator as decorator20 } from "@ooneex/command";
9412
- import { TerminalLogger as TerminalLogger19 } from "@ooneex/logger";
9516
+ import { basename as basename4, join as join21 } from "path";
9517
+ import { decorator as decorator21 } from "@ooneex/command";
9518
+ import { TerminalLogger as TerminalLogger20 } from "@ooneex/logger";
9413
9519
  import { toPascalCase as toPascalCase11 } from "@ooneex/utils";
9414
9520
 
9415
9521
  // src/templates/middleware.socket.txt
@@ -9498,33 +9604,33 @@ class MakeMiddlewareCommand {
9498
9604
  if (module) {
9499
9605
  await ensureModule(module);
9500
9606
  }
9501
- const base = module ? join20("modules", module) : ".";
9502
- const middlewareLocalDir = join20(base, "src", "middlewares");
9503
- const middlewareDir = join20(process.cwd(), middlewareLocalDir);
9504
- const filePath = join20(middlewareDir, `${name}Middleware.ts`);
9607
+ const base = module ? join21("modules", module) : ".";
9608
+ const middlewareLocalDir = join21(base, "src", "middlewares");
9609
+ const middlewareDir = join21(process.cwd(), middlewareLocalDir);
9610
+ const filePath = join21(middlewareDir, `${name}Middleware.ts`);
9505
9611
  await Bun.write(filePath, content);
9506
9612
  const testContent = middleware_test_default.replace(/{{NAME}}/g, name);
9507
- const testsLocalDir = join20(base, "tests", "middlewares");
9508
- const testsDir = join20(process.cwd(), testsLocalDir);
9509
- const testFilePath = join20(testsDir, `${name}Middleware.spec.ts`);
9613
+ const testsLocalDir = join21(base, "tests", "middlewares");
9614
+ const testsDir = join21(process.cwd(), testsLocalDir);
9615
+ const testFilePath = join21(testsDir, `${name}Middleware.spec.ts`);
9510
9616
  await Bun.write(testFilePath, testContent);
9511
9617
  const modulePascalName = module ? toPascalCase11(module) : toPascalCase11(basename4(process.cwd()));
9512
- const modulePath = join20(process.cwd(), base, "src", `${modulePascalName}Module.ts`);
9618
+ const modulePath = join21(process.cwd(), base, "src", `${modulePascalName}Module.ts`);
9513
9619
  if (await Bun.file(modulePath).exists()) {
9514
9620
  await this.addToModule(modulePath, name);
9515
9621
  }
9516
- const logger = new TerminalLogger19;
9517
- logger.success(`${join20(middlewareLocalDir, name)}Middleware.ts created successfully`, undefined, {
9622
+ const logger = new TerminalLogger20;
9623
+ logger.success(`${join21(middlewareLocalDir, name)}Middleware.ts created successfully`, undefined, {
9518
9624
  showTimestamp: false,
9519
9625
  showArrow: false,
9520
9626
  useSymbol: true
9521
9627
  });
9522
- logger.success(`${join20(testsLocalDir, name)}Middleware.spec.ts created successfully`, undefined, {
9628
+ logger.success(`${join21(testsLocalDir, name)}Middleware.spec.ts created successfully`, undefined, {
9523
9629
  showTimestamp: false,
9524
9630
  showArrow: false,
9525
9631
  useSymbol: true
9526
9632
  });
9527
- const packageJsonPath = join20(process.cwd(), "package.json");
9633
+ const packageJsonPath = join21(process.cwd(), "package.json");
9528
9634
  const packageJson = await Bun.file(packageJsonPath).json();
9529
9635
  const deps = packageJson.dependencies ?? {};
9530
9636
  const devDeps = packageJson.devDependencies ?? {};
@@ -9539,12 +9645,12 @@ class MakeMiddlewareCommand {
9539
9645
  }
9540
9646
  }
9541
9647
  MakeMiddlewareCommand = __legacyDecorateClassTS([
9542
- decorator20.command()
9648
+ decorator21.command()
9543
9649
  ], MakeMiddlewareCommand);
9544
9650
  // src/commands/MakeMigrationCommand.ts
9545
- import { join as join21 } from "path";
9546
- import { decorator as decorator21 } from "@ooneex/command";
9547
- import { TerminalLogger as TerminalLogger20 } from "@ooneex/logger";
9651
+ import { join as join22 } from "path";
9652
+ import { decorator as decorator22 } from "@ooneex/command";
9653
+ import { TerminalLogger as TerminalLogger21 } from "@ooneex/logger";
9548
9654
  import { migrationCreate } from "@ooneex/migrations";
9549
9655
 
9550
9656
  // src/templates/module/migration.up.txt
@@ -9572,17 +9678,17 @@ class MakeMigrationCommand {
9572
9678
  if (module) {
9573
9679
  await ensureModule(module);
9574
9680
  }
9575
- const base = module ? join21("modules", module) : ".";
9681
+ const base = module ? join22("modules", module) : ".";
9576
9682
  const { migrationPath: filePath } = await migrationCreate({
9577
- migrationsDir: join21(base, "src", "migrations"),
9578
- testsDir: join21(base, "tests", "migrations")
9683
+ migrationsDir: join22(base, "src", "migrations"),
9684
+ testsDir: join22(base, "tests", "migrations")
9579
9685
  });
9580
- const binMigrationUpPath = join21(process.cwd(), base, "bin", "migration", "up.ts");
9686
+ const binMigrationUpPath = join22(process.cwd(), base, "bin", "migration", "up.ts");
9581
9687
  const binMigrationUpFile = Bun.file(binMigrationUpPath);
9582
9688
  if (!await binMigrationUpFile.exists()) {
9583
9689
  await Bun.write(binMigrationUpPath, migration_up_default.replace(/{{name}}/g, module ?? ""));
9584
9690
  }
9585
- const logger = new TerminalLogger20;
9691
+ const logger = new TerminalLogger21;
9586
9692
  logger.success(`${filePath} created successfully`, undefined, {
9587
9693
  showTimestamp: false,
9588
9694
  showArrow: false,
@@ -9591,12 +9697,12 @@ class MakeMigrationCommand {
9591
9697
  }
9592
9698
  }
9593
9699
  MakeMigrationCommand = __legacyDecorateClassTS([
9594
- decorator21.command()
9700
+ decorator22.command()
9595
9701
  ], MakeMigrationCommand);
9596
9702
  // src/commands/MakePermissionCommand.ts
9597
- import { join as join22 } from "path";
9598
- import { decorator as decorator22 } from "@ooneex/command";
9599
- import { TerminalLogger as TerminalLogger21 } from "@ooneex/logger";
9703
+ import { join as join23 } from "path";
9704
+ import { decorator as decorator23 } from "@ooneex/command";
9705
+ import { TerminalLogger as TerminalLogger22 } from "@ooneex/logger";
9600
9706
  import { toPascalCase as toPascalCase12 } from "@ooneex/utils";
9601
9707
 
9602
9708
  // src/templates/permission.test.txt
@@ -9687,28 +9793,28 @@ class MakePermissionCommand {
9687
9793
  if (module) {
9688
9794
  await ensureModule(module);
9689
9795
  }
9690
- const base = module ? join22("modules", module) : ".";
9691
- const permissionLocalDir = join22(base, "src", "permissions");
9692
- const permissionDir = join22(process.cwd(), permissionLocalDir);
9693
- const filePath = join22(permissionDir, `${name}Permission.ts`);
9796
+ const base = module ? join23("modules", module) : ".";
9797
+ const permissionLocalDir = join23(base, "src", "permissions");
9798
+ const permissionDir = join23(process.cwd(), permissionLocalDir);
9799
+ const filePath = join23(permissionDir, `${name}Permission.ts`);
9694
9800
  await Bun.write(filePath, content);
9695
9801
  const testContent = permission_test_default.replace(/{{NAME}}/g, name);
9696
- const testsLocalDir = join22(base, "tests", "permissions");
9697
- const testsDir = join22(process.cwd(), testsLocalDir);
9698
- const testFilePath = join22(testsDir, `${name}Permission.spec.ts`);
9802
+ const testsLocalDir = join23(base, "tests", "permissions");
9803
+ const testsDir = join23(process.cwd(), testsLocalDir);
9804
+ const testFilePath = join23(testsDir, `${name}Permission.spec.ts`);
9699
9805
  await Bun.write(testFilePath, testContent);
9700
- const logger = new TerminalLogger21;
9701
- logger.success(`${join22(permissionLocalDir, name)}Permission.ts created successfully`, undefined, {
9806
+ const logger = new TerminalLogger22;
9807
+ logger.success(`${join23(permissionLocalDir, name)}Permission.ts created successfully`, undefined, {
9702
9808
  showTimestamp: false,
9703
9809
  showArrow: false,
9704
9810
  useSymbol: true
9705
9811
  });
9706
- logger.success(`${join22(testsLocalDir, name)}Permission.spec.ts created successfully`, undefined, {
9812
+ logger.success(`${join23(testsLocalDir, name)}Permission.spec.ts created successfully`, undefined, {
9707
9813
  showTimestamp: false,
9708
9814
  showArrow: false,
9709
9815
  useSymbol: true
9710
9816
  });
9711
- const packageJsonPath = join22(process.cwd(), "package.json");
9817
+ const packageJsonPath = join23(process.cwd(), "package.json");
9712
9818
  const packageJson = await Bun.file(packageJsonPath).json();
9713
9819
  const deps = packageJson.dependencies ?? {};
9714
9820
  const devDeps = packageJson.devDependencies ?? {};
@@ -9723,12 +9829,12 @@ class MakePermissionCommand {
9723
9829
  }
9724
9830
  }
9725
9831
  MakePermissionCommand = __legacyDecorateClassTS([
9726
- decorator22.command()
9832
+ decorator23.command()
9727
9833
  ], MakePermissionCommand);
9728
9834
  // src/commands/MakePubSubCommand.ts
9729
- import { basename as basename5, join as join23 } from "path";
9730
- import { decorator as decorator23 } from "@ooneex/command";
9731
- import { TerminalLogger as TerminalLogger22 } from "@ooneex/logger";
9835
+ import { basename as basename5, join as join24 } from "path";
9836
+ import { decorator as decorator24 } from "@ooneex/command";
9837
+ import { TerminalLogger as TerminalLogger23 } from "@ooneex/logger";
9732
9838
  import { toKebabCase as toKebabCase4, toPascalCase as toPascalCase13 } from "@ooneex/utils";
9733
9839
 
9734
9840
  // src/templates/pubsub.test.txt
@@ -9836,33 +9942,33 @@ class MakePubSubCommand {
9836
9942
  if (module) {
9837
9943
  await ensureModule(module);
9838
9944
  }
9839
- const base = module ? join23("modules", module) : ".";
9840
- const pubSubLocalDir = join23(base, "src", "events");
9841
- const pubSubDir = join23(process.cwd(), pubSubLocalDir);
9842
- const filePath = join23(pubSubDir, `${name}Event.ts`);
9945
+ const base = module ? join24("modules", module) : ".";
9946
+ const pubSubLocalDir = join24(base, "src", "events");
9947
+ const pubSubDir = join24(process.cwd(), pubSubLocalDir);
9948
+ const filePath = join24(pubSubDir, `${name}Event.ts`);
9843
9949
  await Bun.write(filePath, content);
9844
9950
  const testContent = pubsub_test_default.replace(/{{NAME}}/g, name);
9845
- const testsLocalDir = join23(base, "tests", "events");
9846
- const testsDir = join23(process.cwd(), testsLocalDir);
9847
- const testFilePath = join23(testsDir, `${name}Event.spec.ts`);
9951
+ const testsLocalDir = join24(base, "tests", "events");
9952
+ const testsDir = join24(process.cwd(), testsLocalDir);
9953
+ const testFilePath = join24(testsDir, `${name}Event.spec.ts`);
9848
9954
  await Bun.write(testFilePath, testContent);
9849
9955
  const modulePascalName = module ? toPascalCase13(module) : toPascalCase13(basename5(process.cwd()));
9850
- const modulePath = join23(process.cwd(), base, "src", `${modulePascalName}Module.ts`);
9956
+ const modulePath = join24(process.cwd(), base, "src", `${modulePascalName}Module.ts`);
9851
9957
  if (await Bun.file(modulePath).exists()) {
9852
9958
  await this.addToModule(modulePath, name);
9853
9959
  }
9854
- const logger = new TerminalLogger22;
9855
- logger.success(`${join23(pubSubLocalDir, name)}Event.ts created successfully`, undefined, {
9960
+ const logger = new TerminalLogger23;
9961
+ logger.success(`${join24(pubSubLocalDir, name)}Event.ts created successfully`, undefined, {
9856
9962
  showTimestamp: false,
9857
9963
  showArrow: false,
9858
9964
  useSymbol: true
9859
9965
  });
9860
- logger.success(`${join23(testsLocalDir, name)}Event.spec.ts created successfully`, undefined, {
9966
+ logger.success(`${join24(testsLocalDir, name)}Event.spec.ts created successfully`, undefined, {
9861
9967
  showTimestamp: false,
9862
9968
  showArrow: false,
9863
9969
  useSymbol: true
9864
9970
  });
9865
- const packageJsonPath = join23(process.cwd(), "package.json");
9971
+ const packageJsonPath = join24(process.cwd(), "package.json");
9866
9972
  const packageJson = await Bun.file(packageJsonPath).json();
9867
9973
  const deps = packageJson.dependencies ?? {};
9868
9974
  const devDeps = packageJson.devDependencies ?? {};
@@ -9877,13 +9983,13 @@ class MakePubSubCommand {
9877
9983
  }
9878
9984
  }
9879
9985
  MakePubSubCommand = __legacyDecorateClassTS([
9880
- decorator23.command()
9986
+ decorator24.command()
9881
9987
  ], MakePubSubCommand);
9882
9988
  // src/commands/MakeReleaseCommand.ts
9883
9989
  import { readdir } from "fs/promises";
9884
- import { join as join24 } from "path";
9885
- import { decorator as decorator24 } from "@ooneex/command";
9886
- import { TerminalLogger as TerminalLogger23 } from "@ooneex/logger";
9990
+ import { join as join25 } from "path";
9991
+ import { decorator as decorator25 } from "@ooneex/command";
9992
+ import { TerminalLogger as TerminalLogger24 } from "@ooneex/logger";
9887
9993
  var {$ } = globalThis.Bun;
9888
9994
  var COMMIT_TYPE_TO_CATEGORY = {
9889
9995
  feat: "Added",
@@ -9906,7 +10012,7 @@ class MakeReleaseCommand {
9906
10012
  return "Release packages with version bump, changelog, and git tag";
9907
10013
  }
9908
10014
  async run() {
9909
- const logger = new TerminalLogger23;
10015
+ const logger = new TerminalLogger24;
9910
10016
  const cwd = process.cwd();
9911
10017
  const dirs = [];
9912
10018
  for (const { name, type } of [
@@ -9914,8 +10020,8 @@ class MakeReleaseCommand {
9914
10020
  { name: "modules", type: "module" }
9915
10021
  ]) {
9916
10022
  try {
9917
- const entries = await readdir(join24(cwd, name), { withFileTypes: true });
9918
- dirs.push(...entries.filter((d) => d.isDirectory()).map((d) => ({ base: join24(name, d.name), type })));
10023
+ const entries = await readdir(join25(cwd, name), { withFileTypes: true });
10024
+ dirs.push(...entries.filter((d) => d.isDirectory()).map((d) => ({ base: join25(name, d.name), type })));
9919
10025
  } catch {}
9920
10026
  }
9921
10027
  const logOptions = { showTimestamp: false, showArrow: false, useSymbol: true };
@@ -9925,8 +10031,8 @@ class MakeReleaseCommand {
9925
10031
  }
9926
10032
  let releasedCount = 0;
9927
10033
  for (const dir of dirs) {
9928
- const fullDir = join24(cwd, dir.base);
9929
- const pkgJsonPath = join24(fullDir, "package.json");
10034
+ const fullDir = join25(cwd, dir.base);
10035
+ const pkgJsonPath = join25(fullDir, "package.json");
9930
10036
  const pkgJsonFile = Bun.file(pkgJsonPath);
9931
10037
  if (!await pkgJsonFile.exists()) {
9932
10038
  continue;
@@ -9944,7 +10050,7 @@ class MakeReleaseCommand {
9944
10050
  await Bun.write(pkgJsonPath, `${JSON.stringify(pkgJson, null, 2)}
9945
10051
  `);
9946
10052
  await this.updateChangelog(fullDir, newVersion, tag, commits);
9947
- await this.gitAdd(join24(dir.base, "package.json"), join24(dir.base, "CHANGELOG.md"));
10053
+ await this.gitAdd(join25(dir.base, "package.json"), join25(dir.base, "CHANGELOG.md"));
9948
10054
  await this.gitCommit(`chore(release): ${pkgJson.name}@${newVersion}`);
9949
10055
  await this.gitTag(tag, `chore(release): ${pkgJson.name}@${newVersion}`);
9950
10056
  logger.success(`${pkgJson.name}@${newVersion} released (${bumpType} bump, ${commits.length} commit(s))`, undefined, logOptions);
@@ -10045,7 +10151,7 @@ class MakeReleaseCommand {
10045
10151
  }
10046
10152
  }
10047
10153
  async updateChangelog(dir, version, tag, commits) {
10048
- const changelogPath = join24(dir, "CHANGELOG.md");
10154
+ const changelogPath = join25(dir, "CHANGELOG.md");
10049
10155
  const today = new Date().toISOString().split("T")[0];
10050
10156
  const repoUrl = await this.getRepoUrl();
10051
10157
  const grouped = new Map;
@@ -10122,12 +10228,12 @@ ${section}
10122
10228
  }
10123
10229
  }
10124
10230
  MakeReleaseCommand = __legacyDecorateClassTS([
10125
- decorator24.command()
10231
+ decorator25.command()
10126
10232
  ], MakeReleaseCommand);
10127
10233
  // src/commands/MakeRepositoryCommand.ts
10128
- import { join as join25 } from "path";
10129
- import { decorator as decorator25 } from "@ooneex/command";
10130
- import { TerminalLogger as TerminalLogger24 } from "@ooneex/logger";
10234
+ import { join as join26 } from "path";
10235
+ import { decorator as decorator26 } from "@ooneex/command";
10236
+ import { TerminalLogger as TerminalLogger25 } from "@ooneex/logger";
10131
10237
  import { toPascalCase as toPascalCase14 } from "@ooneex/utils";
10132
10238
 
10133
10239
  // src/templates/repository.test.txt
@@ -10341,28 +10447,28 @@ class MakeRepositoryCommand {
10341
10447
  if (module) {
10342
10448
  await ensureModule(module);
10343
10449
  }
10344
- const base = module ? join25("modules", module) : ".";
10345
- const repositoriesLocalDir = join25(base, "src", "repositories");
10346
- const repositoriesDir = join25(process.cwd(), repositoriesLocalDir);
10347
- const filePath = join25(repositoriesDir, `${name}Repository.ts`);
10450
+ const base = module ? join26("modules", module) : ".";
10451
+ const repositoriesLocalDir = join26(base, "src", "repositories");
10452
+ const repositoriesDir = join26(process.cwd(), repositoriesLocalDir);
10453
+ const filePath = join26(repositoriesDir, `${name}Repository.ts`);
10348
10454
  await Bun.write(filePath, content);
10349
10455
  const testContent = repository_test_default.replace(/{{NAME}}/g, name);
10350
- const testsLocalDir = join25(base, "tests", "repositories");
10351
- const testsDir = join25(process.cwd(), testsLocalDir);
10352
- const testFilePath = join25(testsDir, `${name}Repository.spec.ts`);
10456
+ const testsLocalDir = join26(base, "tests", "repositories");
10457
+ const testsDir = join26(process.cwd(), testsLocalDir);
10458
+ const testFilePath = join26(testsDir, `${name}Repository.spec.ts`);
10353
10459
  await Bun.write(testFilePath, testContent);
10354
- const logger = new TerminalLogger24;
10355
- logger.success(`${join25(repositoriesLocalDir, name)}Repository.ts created successfully`, undefined, {
10460
+ const logger = new TerminalLogger25;
10461
+ logger.success(`${join26(repositoriesLocalDir, name)}Repository.ts created successfully`, undefined, {
10356
10462
  showTimestamp: false,
10357
10463
  showArrow: false,
10358
10464
  useSymbol: true
10359
10465
  });
10360
- logger.success(`${join25(testsLocalDir, name)}Repository.spec.ts created successfully`, undefined, {
10466
+ logger.success(`${join26(testsLocalDir, name)}Repository.spec.ts created successfully`, undefined, {
10361
10467
  showTimestamp: false,
10362
10468
  showArrow: false,
10363
10469
  useSymbol: true
10364
10470
  });
10365
- const packageJsonPath = join25(process.cwd(), "package.json");
10471
+ const packageJsonPath = join26(process.cwd(), "package.json");
10366
10472
  const packageJson = await Bun.file(packageJsonPath).json();
10367
10473
  const deps = packageJson.dependencies ?? {};
10368
10474
  const devDeps = packageJson.devDependencies ?? {};
@@ -10377,11 +10483,11 @@ class MakeRepositoryCommand {
10377
10483
  }
10378
10484
  }
10379
10485
  MakeRepositoryCommand = __legacyDecorateClassTS([
10380
- decorator25.command()
10486
+ decorator26.command()
10381
10487
  ], MakeRepositoryCommand);
10382
10488
  // src/commands/MakeResourceBookCommand.ts
10383
- import { join as join27 } from "path";
10384
- import { decorator as decorator27 } from "@ooneex/command";
10489
+ import { join as join28 } from "path";
10490
+ import { decorator as decorator28 } from "@ooneex/command";
10385
10491
  var {Glob } = globalThis.Bun;
10386
10492
 
10387
10493
  // src/templates/resources/book/BookEntity.txt
@@ -11077,9 +11183,9 @@ export class UpdateBookService implements IService {
11077
11183
  `;
11078
11184
 
11079
11185
  // src/commands/MakeServiceCommand.ts
11080
- import { join as join26 } from "path";
11081
- import { decorator as decorator26 } from "@ooneex/command";
11082
- import { TerminalLogger as TerminalLogger25 } from "@ooneex/logger";
11186
+ import { join as join27 } from "path";
11187
+ import { decorator as decorator27 } from "@ooneex/command";
11188
+ import { TerminalLogger as TerminalLogger26 } from "@ooneex/logger";
11083
11189
  import { toPascalCase as toPascalCase15 } from "@ooneex/utils";
11084
11190
 
11085
11191
  // src/templates/service.test.txt
@@ -11131,28 +11237,28 @@ class MakeServiceCommand {
11131
11237
  if (module) {
11132
11238
  await ensureModule(module);
11133
11239
  }
11134
- const base = module ? join26("modules", module) : ".";
11135
- const serviceLocalDir = join26(base, "src", "services");
11136
- const serviceDir = join26(process.cwd(), serviceLocalDir);
11137
- const filePath = join26(serviceDir, `${name}Service.ts`);
11240
+ const base = module ? join27("modules", module) : ".";
11241
+ const serviceLocalDir = join27(base, "src", "services");
11242
+ const serviceDir = join27(process.cwd(), serviceLocalDir);
11243
+ const filePath = join27(serviceDir, `${name}Service.ts`);
11138
11244
  await Bun.write(filePath, content);
11139
11245
  const testContent = service_test_default.replace(/{{NAME}}/g, name);
11140
- const testsLocalDir = join26(base, "tests", "services");
11141
- const testsDir = join26(process.cwd(), testsLocalDir);
11142
- const testFilePath = join26(testsDir, `${name}Service.spec.ts`);
11246
+ const testsLocalDir = join27(base, "tests", "services");
11247
+ const testsDir = join27(process.cwd(), testsLocalDir);
11248
+ const testFilePath = join27(testsDir, `${name}Service.spec.ts`);
11143
11249
  await Bun.write(testFilePath, testContent);
11144
- const logger = new TerminalLogger25;
11145
- logger.success(`${join26(serviceLocalDir, name)}Service.ts created successfully`, undefined, {
11250
+ const logger = new TerminalLogger26;
11251
+ logger.success(`${join27(serviceLocalDir, name)}Service.ts created successfully`, undefined, {
11146
11252
  showTimestamp: false,
11147
11253
  showArrow: false,
11148
11254
  useSymbol: true
11149
11255
  });
11150
- logger.success(`${join26(testsLocalDir, name)}Service.spec.ts created successfully`, undefined, {
11256
+ logger.success(`${join27(testsLocalDir, name)}Service.spec.ts created successfully`, undefined, {
11151
11257
  showTimestamp: false,
11152
11258
  showArrow: false,
11153
11259
  useSymbol: true
11154
11260
  });
11155
- const packageJsonPath = join26(process.cwd(), "package.json");
11261
+ const packageJsonPath = join27(process.cwd(), "package.json");
11156
11262
  const packageJson = await Bun.file(packageJsonPath).json();
11157
11263
  const deps = packageJson.dependencies ?? {};
11158
11264
  const devDeps = packageJson.devDependencies ?? {};
@@ -11167,7 +11273,7 @@ class MakeServiceCommand {
11167
11273
  }
11168
11274
  }
11169
11275
  MakeServiceCommand = __legacyDecorateClassTS([
11170
- decorator26.command()
11276
+ decorator27.command()
11171
11277
  ], MakeServiceCommand);
11172
11278
 
11173
11279
  // src/commands/MakeResourceBookCommand.ts
@@ -11180,9 +11286,9 @@ class MakeResourceBookCommand {
11180
11286
  }
11181
11287
  async run() {
11182
11288
  const module = "book";
11183
- const base = join27("modules", module);
11289
+ const base = join28("modules", module);
11184
11290
  const makeModuleCommand = new MakeModuleCommand;
11185
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
11291
+ await makeModuleCommand.run({ name: module, silent: true });
11186
11292
  const makeEntityCommand = new MakeEntityCommand;
11187
11293
  await makeEntityCommand.run({ name: "Book", module, tableName: "books" });
11188
11294
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -11200,26 +11306,26 @@ class MakeResourceBookCommand {
11200
11306
  for (const controller of controllers) {
11201
11307
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
11202
11308
  }
11203
- const controllersDir = join27(process.cwd(), base, "src", "controllers");
11204
- await Bun.write(join27(controllersDir, "CreateBookController.ts"), CreateBookController_default);
11205
- await Bun.write(join27(controllersDir, "GetBookController.ts"), GetBookController_default);
11206
- await Bun.write(join27(controllersDir, "ListBooksController.ts"), ListBooksController_default);
11207
- await Bun.write(join27(controllersDir, "UpdateBookController.ts"), UpdateBookController_default);
11208
- await Bun.write(join27(controllersDir, "DeleteBookController.ts"), DeleteBookController_default);
11309
+ const controllersDir = join28(process.cwd(), base, "src", "controllers");
11310
+ await Bun.write(join28(controllersDir, "CreateBookController.ts"), CreateBookController_default);
11311
+ await Bun.write(join28(controllersDir, "GetBookController.ts"), GetBookController_default);
11312
+ await Bun.write(join28(controllersDir, "ListBooksController.ts"), ListBooksController_default);
11313
+ await Bun.write(join28(controllersDir, "UpdateBookController.ts"), UpdateBookController_default);
11314
+ await Bun.write(join28(controllersDir, "DeleteBookController.ts"), DeleteBookController_default);
11209
11315
  const makeServiceCommand = new MakeServiceCommand;
11210
11316
  const services = ["CreateBook", "GetBook", "ListBooks", "UpdateBook", "DeleteBook"];
11211
11317
  for (const name of services) {
11212
11318
  await makeServiceCommand.run({ name, module });
11213
11319
  }
11214
- const servicesDir = join27(process.cwd(), base, "src", "services");
11215
- await Bun.write(join27(servicesDir, "CreateBookService.ts"), CreateBookService_default);
11216
- await Bun.write(join27(servicesDir, "GetBookService.ts"), GetBookService_default);
11217
- await Bun.write(join27(servicesDir, "ListBooksService.ts"), ListBooksService_default);
11218
- await Bun.write(join27(servicesDir, "UpdateBookService.ts"), UpdateBookService_default);
11219
- await Bun.write(join27(servicesDir, "DeleteBookService.ts"), DeleteBookService_default);
11220
- const entityPath = join27(process.cwd(), base, "src", "entities", "BookEntity.ts");
11320
+ const servicesDir = join28(process.cwd(), base, "src", "services");
11321
+ await Bun.write(join28(servicesDir, "CreateBookService.ts"), CreateBookService_default);
11322
+ await Bun.write(join28(servicesDir, "GetBookService.ts"), GetBookService_default);
11323
+ await Bun.write(join28(servicesDir, "ListBooksService.ts"), ListBooksService_default);
11324
+ await Bun.write(join28(servicesDir, "UpdateBookService.ts"), UpdateBookService_default);
11325
+ await Bun.write(join28(servicesDir, "DeleteBookService.ts"), DeleteBookService_default);
11326
+ const entityPath = join28(process.cwd(), base, "src", "entities", "BookEntity.ts");
11221
11327
  await Bun.write(entityPath, BookEntity_default);
11222
- const migrationsDir = join27(process.cwd(), base, "src", "migrations");
11328
+ const migrationsDir = join28(process.cwd(), base, "src", "migrations");
11223
11329
  const glob = new Glob("Migration*.ts");
11224
11330
  for await (const file of glob.scan(migrationsDir)) {
11225
11331
  if (file === "migrations.ts")
@@ -11227,18 +11333,18 @@ class MakeResourceBookCommand {
11227
11333
  const name = file.replace(/\.ts$/, "");
11228
11334
  const version = name.replace("Migration", "");
11229
11335
  const content = BookMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
11230
- await Bun.write(join27(migrationsDir, file), content);
11336
+ await Bun.write(join28(migrationsDir, file), content);
11231
11337
  }
11232
- const repositoryPath = join27(process.cwd(), base, "src", "repositories", "BookRepository.ts");
11338
+ const repositoryPath = join28(process.cwd(), base, "src", "repositories", "BookRepository.ts");
11233
11339
  await Bun.write(repositoryPath, BookRepository_default);
11234
11340
  }
11235
11341
  }
11236
11342
  MakeResourceBookCommand = __legacyDecorateClassTS([
11237
- decorator27.command()
11343
+ decorator28.command()
11238
11344
  ], MakeResourceBookCommand);
11239
11345
  // src/commands/MakeResourceCalendarEventCommand.ts
11240
- import { join as join28 } from "path";
11241
- import { decorator as decorator28 } from "@ooneex/command";
11346
+ import { join as join29 } from "path";
11347
+ import { decorator as decorator29 } from "@ooneex/command";
11242
11348
  var {Glob: Glob2 } = globalThis.Bun;
11243
11349
 
11244
11350
  // src/templates/resources/calendar-event/CalendarEventEntity.txt
@@ -11930,9 +12036,9 @@ class MakeResourceCalendarEventCommand {
11930
12036
  }
11931
12037
  async run() {
11932
12038
  const module = "calendar-event";
11933
- const base = join28("modules", module);
12039
+ const base = join29("modules", module);
11934
12040
  const makeModuleCommand = new MakeModuleCommand;
11935
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
12041
+ await makeModuleCommand.run({ name: module, silent: true });
11936
12042
  const makeEntityCommand = new MakeEntityCommand;
11937
12043
  await makeEntityCommand.run({ name: "CalendarEvent", module, tableName: "calendar_events" });
11938
12044
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -11965,12 +12071,12 @@ class MakeResourceCalendarEventCommand {
11965
12071
  for (const controller of controllers) {
11966
12072
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
11967
12073
  }
11968
- const controllersDir = join28(process.cwd(), base, "src", "controllers");
11969
- await Bun.write(join28(controllersDir, "CreateCalendarEventController.ts"), CreateCalendarEventController_default);
11970
- await Bun.write(join28(controllersDir, "GetCalendarEventController.ts"), GetCalendarEventController_default);
11971
- await Bun.write(join28(controllersDir, "ListCalendarEventsController.ts"), ListCalendarEventsController_default);
11972
- await Bun.write(join28(controllersDir, "UpdateCalendarEventController.ts"), UpdateCalendarEventController_default);
11973
- await Bun.write(join28(controllersDir, "DeleteCalendarEventController.ts"), DeleteCalendarEventController_default);
12074
+ const controllersDir = join29(process.cwd(), base, "src", "controllers");
12075
+ await Bun.write(join29(controllersDir, "CreateCalendarEventController.ts"), CreateCalendarEventController_default);
12076
+ await Bun.write(join29(controllersDir, "GetCalendarEventController.ts"), GetCalendarEventController_default);
12077
+ await Bun.write(join29(controllersDir, "ListCalendarEventsController.ts"), ListCalendarEventsController_default);
12078
+ await Bun.write(join29(controllersDir, "UpdateCalendarEventController.ts"), UpdateCalendarEventController_default);
12079
+ await Bun.write(join29(controllersDir, "DeleteCalendarEventController.ts"), DeleteCalendarEventController_default);
11974
12080
  const makeServiceCommand = new MakeServiceCommand;
11975
12081
  const services = [
11976
12082
  "CreateCalendarEvent",
@@ -11982,15 +12088,15 @@ class MakeResourceCalendarEventCommand {
11982
12088
  for (const name of services) {
11983
12089
  await makeServiceCommand.run({ name, module });
11984
12090
  }
11985
- const servicesDir = join28(process.cwd(), base, "src", "services");
11986
- await Bun.write(join28(servicesDir, "CreateCalendarEventService.ts"), CreateCalendarEventService_default);
11987
- await Bun.write(join28(servicesDir, "GetCalendarEventService.ts"), GetCalendarEventService_default);
11988
- await Bun.write(join28(servicesDir, "ListCalendarEventsService.ts"), ListCalendarEventsService_default);
11989
- await Bun.write(join28(servicesDir, "UpdateCalendarEventService.ts"), UpdateCalendarEventService_default);
11990
- await Bun.write(join28(servicesDir, "DeleteCalendarEventService.ts"), DeleteCalendarEventService_default);
11991
- const entityPath = join28(process.cwd(), base, "src", "entities", "CalendarEventEntity.ts");
12091
+ const servicesDir = join29(process.cwd(), base, "src", "services");
12092
+ await Bun.write(join29(servicesDir, "CreateCalendarEventService.ts"), CreateCalendarEventService_default);
12093
+ await Bun.write(join29(servicesDir, "GetCalendarEventService.ts"), GetCalendarEventService_default);
12094
+ await Bun.write(join29(servicesDir, "ListCalendarEventsService.ts"), ListCalendarEventsService_default);
12095
+ await Bun.write(join29(servicesDir, "UpdateCalendarEventService.ts"), UpdateCalendarEventService_default);
12096
+ await Bun.write(join29(servicesDir, "DeleteCalendarEventService.ts"), DeleteCalendarEventService_default);
12097
+ const entityPath = join29(process.cwd(), base, "src", "entities", "CalendarEventEntity.ts");
11992
12098
  await Bun.write(entityPath, CalendarEventEntity_default);
11993
- const migrationsDir = join28(process.cwd(), base, "src", "migrations");
12099
+ const migrationsDir = join29(process.cwd(), base, "src", "migrations");
11994
12100
  const glob = new Glob2("Migration*.ts");
11995
12101
  for await (const file of glob.scan(migrationsDir)) {
11996
12102
  if (file === "migrations.ts")
@@ -11998,18 +12104,18 @@ class MakeResourceCalendarEventCommand {
11998
12104
  const name = file.replace(/\.ts$/, "");
11999
12105
  const version = name.replace("Migration", "");
12000
12106
  const content = CalendarEventMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
12001
- await Bun.write(join28(migrationsDir, file), content);
12107
+ await Bun.write(join29(migrationsDir, file), content);
12002
12108
  }
12003
- const repositoryPath = join28(process.cwd(), base, "src", "repositories", "CalendarEventRepository.ts");
12109
+ const repositoryPath = join29(process.cwd(), base, "src", "repositories", "CalendarEventRepository.ts");
12004
12110
  await Bun.write(repositoryPath, CalendarEventRepository_default);
12005
12111
  }
12006
12112
  }
12007
12113
  MakeResourceCalendarEventCommand = __legacyDecorateClassTS([
12008
- decorator28.command()
12114
+ decorator29.command()
12009
12115
  ], MakeResourceCalendarEventCommand);
12010
12116
  // src/commands/MakeResourceCategoryCommand.ts
12011
- import { join as join29 } from "path";
12012
- import { decorator as decorator29 } from "@ooneex/command";
12117
+ import { join as join30 } from "path";
12118
+ import { decorator as decorator30 } from "@ooneex/command";
12013
12119
  var {Glob: Glob3 } = globalThis.Bun;
12014
12120
 
12015
12121
  // src/templates/resources/category/CategoryEntity.txt
@@ -12600,9 +12706,9 @@ class MakeResourceCategoryCommand {
12600
12706
  }
12601
12707
  async run() {
12602
12708
  const module = "category";
12603
- const base = join29("modules", module);
12709
+ const base = join30("modules", module);
12604
12710
  const makeModuleCommand = new MakeModuleCommand;
12605
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
12711
+ await makeModuleCommand.run({ name: module, silent: true });
12606
12712
  const makeEntityCommand = new MakeEntityCommand;
12607
12713
  await makeEntityCommand.run({ name: "Category", module, tableName: "categories" });
12608
12714
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -12635,26 +12741,26 @@ class MakeResourceCategoryCommand {
12635
12741
  for (const controller of controllers) {
12636
12742
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
12637
12743
  }
12638
- const controllersDir = join29(process.cwd(), base, "src", "controllers");
12639
- await Bun.write(join29(controllersDir, "CreateCategoryController.ts"), CreateCategoryController_default);
12640
- await Bun.write(join29(controllersDir, "GetCategoryController.ts"), GetCategoryController_default);
12641
- await Bun.write(join29(controllersDir, "ListCategoriesController.ts"), ListCategoriesController_default);
12642
- await Bun.write(join29(controllersDir, "UpdateCategoryController.ts"), UpdateCategoryController_default);
12643
- await Bun.write(join29(controllersDir, "DeleteCategoryController.ts"), DeleteCategoryController_default);
12744
+ const controllersDir = join30(process.cwd(), base, "src", "controllers");
12745
+ await Bun.write(join30(controllersDir, "CreateCategoryController.ts"), CreateCategoryController_default);
12746
+ await Bun.write(join30(controllersDir, "GetCategoryController.ts"), GetCategoryController_default);
12747
+ await Bun.write(join30(controllersDir, "ListCategoriesController.ts"), ListCategoriesController_default);
12748
+ await Bun.write(join30(controllersDir, "UpdateCategoryController.ts"), UpdateCategoryController_default);
12749
+ await Bun.write(join30(controllersDir, "DeleteCategoryController.ts"), DeleteCategoryController_default);
12644
12750
  const makeServiceCommand = new MakeServiceCommand;
12645
12751
  const services = ["CreateCategory", "GetCategory", "ListCategories", "UpdateCategory", "DeleteCategory"];
12646
12752
  for (const name of services) {
12647
12753
  await makeServiceCommand.run({ name, module });
12648
12754
  }
12649
- const servicesDir = join29(process.cwd(), base, "src", "services");
12650
- await Bun.write(join29(servicesDir, "CreateCategoryService.ts"), CreateCategoryService_default);
12651
- await Bun.write(join29(servicesDir, "GetCategoryService.ts"), GetCategoryService_default);
12652
- await Bun.write(join29(servicesDir, "ListCategoriesService.ts"), ListCategoriesService_default);
12653
- await Bun.write(join29(servicesDir, "UpdateCategoryService.ts"), UpdateCategoryService_default);
12654
- await Bun.write(join29(servicesDir, "DeleteCategoryService.ts"), DeleteCategoryService_default);
12655
- const entityPath = join29(process.cwd(), base, "src", "entities", "CategoryEntity.ts");
12755
+ const servicesDir = join30(process.cwd(), base, "src", "services");
12756
+ await Bun.write(join30(servicesDir, "CreateCategoryService.ts"), CreateCategoryService_default);
12757
+ await Bun.write(join30(servicesDir, "GetCategoryService.ts"), GetCategoryService_default);
12758
+ await Bun.write(join30(servicesDir, "ListCategoriesService.ts"), ListCategoriesService_default);
12759
+ await Bun.write(join30(servicesDir, "UpdateCategoryService.ts"), UpdateCategoryService_default);
12760
+ await Bun.write(join30(servicesDir, "DeleteCategoryService.ts"), DeleteCategoryService_default);
12761
+ const entityPath = join30(process.cwd(), base, "src", "entities", "CategoryEntity.ts");
12656
12762
  await Bun.write(entityPath, CategoryEntity_default);
12657
- const migrationsDir = join29(process.cwd(), base, "src", "migrations");
12763
+ const migrationsDir = join30(process.cwd(), base, "src", "migrations");
12658
12764
  const glob = new Glob3("Migration*.ts");
12659
12765
  for await (const file of glob.scan(migrationsDir)) {
12660
12766
  if (file === "migrations.ts")
@@ -12662,18 +12768,18 @@ class MakeResourceCategoryCommand {
12662
12768
  const name = file.replace(/\.ts$/, "");
12663
12769
  const version = name.replace("Migration", "");
12664
12770
  const content = CategoryMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
12665
- await Bun.write(join29(migrationsDir, file), content);
12771
+ await Bun.write(join30(migrationsDir, file), content);
12666
12772
  }
12667
- const repositoryPath = join29(process.cwd(), base, "src", "repositories", "CategoryRepository.ts");
12773
+ const repositoryPath = join30(process.cwd(), base, "src", "repositories", "CategoryRepository.ts");
12668
12774
  await Bun.write(repositoryPath, CategoryRepository_default);
12669
12775
  }
12670
12776
  }
12671
12777
  MakeResourceCategoryCommand = __legacyDecorateClassTS([
12672
- decorator29.command()
12778
+ decorator30.command()
12673
12779
  ], MakeResourceCategoryCommand);
12674
12780
  // src/commands/MakeResourceColorCommand.ts
12675
- import { join as join31 } from "path";
12676
- import { decorator as decorator31 } from "@ooneex/command";
12781
+ import { join as join32 } from "path";
12782
+ import { decorator as decorator32 } from "@ooneex/command";
12677
12783
  var {Glob: Glob4 } = globalThis.Bun;
12678
12784
 
12679
12785
  // src/templates/resources/color/ColorEntity.txt
@@ -13111,18 +13217,27 @@ export class UpdateColorController {
13111
13217
  `;
13112
13218
 
13113
13219
  // src/templates/resources/color/seeds/ColorSeed.txt
13114
- var ColorSeed_default = `import { resolve } from "@ooneex/container";
13220
+ var ColorSeed_default = `import { inject } from "@ooneex/container";
13115
13221
  import { decorator, type ISeed, type SeedClassType } from "@ooneex/seeds";
13222
+ import type { LocaleType } from "@ooneex/translation";
13116
13223
  import { ColorEntity } from "../entities/ColorEntity";
13117
13224
  import { ColorRepository } from "../repositories/ColorRepository";
13118
- import data from "./data.yml";
13225
+ import data from "./color-seed.yml";
13226
+
13227
+ type ColorSeedDataType = {
13228
+ id: string;
13229
+ name: string;
13230
+ hex: string;
13231
+ description?: string;
13232
+ lang?: LocaleType;
13233
+ };
13119
13234
 
13120
13235
  @decorator.seed()
13121
13236
  export class ColorSeed implements ISeed {
13122
- public async run<T>(): Promise<T> {
13123
- const repository = resolve(ColorRepository);
13237
+ constructor(@inject(ColorRepository) private readonly repository: ColorRepository) {}
13124
13238
 
13125
- const entities = (data as Record<string, string>[]).map((item) => {
13239
+ public async run<T>(): Promise<T> {
13240
+ const entities = (data as ColorSeedDataType[]).map((item) => {
13126
13241
  const entity = new ColorEntity();
13127
13242
  entity.id = item.id;
13128
13243
  entity.name = item.name;
@@ -13133,8 +13248,8 @@ export class ColorSeed implements ISeed {
13133
13248
  return entity;
13134
13249
  });
13135
13250
 
13136
- const result = await repository.createMany(entities);
13137
- await repository.close();
13251
+ const result = await this.repository.createMany(entities);
13252
+ await this.repository.close();
13138
13253
 
13139
13254
  return result as T;
13140
13255
  }
@@ -13149,8 +13264,163 @@ export class ColorSeed implements ISeed {
13149
13264
  }
13150
13265
  `;
13151
13266
 
13152
- // src/templates/resources/color/seeds/data.yml
13153
- var data_default = "./data-kn5x3wm1.yml";
13267
+ // src/templates/resources/color/seeds/color-seed.yml
13268
+ var color_seed_default = `- id: e15acdcdc02bd8d3947a
13269
+ name: Blue
13270
+ hex: "#3B82F6"
13271
+ description: A calm and trustworthy color often used for links, buttons, and primary actions
13272
+ lang: en
13273
+
13274
+ - id: 88ee351a85c50c7626c1
13275
+ name: Green
13276
+ hex: "#10B981"
13277
+ description: A natural and balanced color symbolizing success, growth, and positive feedback
13278
+ lang: en
13279
+
13280
+ - id: 6e11eb832388d1708d5f
13281
+ name: Purple
13282
+ hex: "#8B5CF6"
13283
+ description: A rich and creative color associated with luxury, wisdom, and imagination
13284
+ lang: en
13285
+
13286
+ - id: f167815a82d39c33d715
13287
+ name: Yellow
13288
+ hex: "#F59E0B"
13289
+ description: A warm and energetic color used for warnings, highlights, and attention-grabbing elements
13290
+ lang: en
13291
+
13292
+ - id: 0ae99755c73152fc2abe
13293
+ name: Pink
13294
+ hex: "#EC4899"
13295
+ description: A vibrant and playful color conveying warmth, compassion, and modern femininity
13296
+ lang: en
13297
+
13298
+ - id: e3cecfb85b9c0329f776
13299
+ name: Orange
13300
+ hex: "#F97316"
13301
+ description: A bold and enthusiastic color representing energy, creativity, and call-to-action elements
13302
+ lang: en
13303
+
13304
+ - id: 72fd24da73a7d1839698
13305
+ name: Gray
13306
+ hex: "#6B7280"
13307
+ description: A neutral and versatile color ideal for text, borders, and subtle UI backgrounds
13308
+ lang: en
13309
+
13310
+ - id: 173c665d2be12acc7805
13311
+ name: Red
13312
+ hex: "#EF4444"
13313
+ description: A powerful and urgent color used for errors, alerts, and destructive actions
13314
+ lang: en
13315
+
13316
+ - id: c1645c6ea00d26fa9a47
13317
+ name: Teal
13318
+ hex: "#14B8A6"
13319
+ description: A refreshing blend of blue and green evoking clarity, balance, and sophistication
13320
+ lang: en
13321
+
13322
+ - id: f21381a1ced278046ced
13323
+ name: Indigo
13324
+ hex: "#6366F1"
13325
+ description: A deep and intense color conveying depth, integrity, and focused concentration
13326
+ lang: en
13327
+
13328
+ - id: acdb18d725bb58056f60
13329
+ name: Lime
13330
+ hex: "#84CC16"
13331
+ description: A bright and lively color suggesting freshness, vitality, and new beginnings
13332
+ lang: en
13333
+
13334
+ - id: da5bb28477632a888202
13335
+ name: Cyan
13336
+ hex: "#06B6D4"
13337
+ description: A cool and electric color associated with technology, clarity, and open skies
13338
+ lang: en
13339
+
13340
+ - id: 21415e74464d66515337
13341
+ name: Violet
13342
+ hex: "#A855F7"
13343
+ description: A soft and mystical color blending the calm of blue with the energy of red
13344
+ lang: en
13345
+
13346
+ - id: 0839135f093e9257d939
13347
+ name: Rose
13348
+ hex: "#F43F5E"
13349
+ description: A warm and elegant color combining the intensity of red with the softness of pink
13350
+ lang: en
13351
+
13352
+ - id: a369b8c402119aaf2eee
13353
+ name: Stone
13354
+ hex: "#78716C"
13355
+ description: A warm neutral color reminiscent of earth and rock, perfect for grounded designs
13356
+ lang: en
13357
+
13358
+ - id: c6defb941e2ed0b508aa
13359
+ name: Sky
13360
+ hex: "#0EA5E9"
13361
+ description: A light and airy blue inspired by clear skies, evoking openness and freedom
13362
+ lang: en
13363
+
13364
+ - id: 723e22ae073ebe865384
13365
+ name: Emerald
13366
+ hex: "#22C55E"
13367
+ description: A deep and vivid green symbolizing prosperity, harmony, and natural elegance
13368
+ lang: en
13369
+
13370
+ - id: ba0555897c3746ab099b
13371
+ name: Amber
13372
+ hex: "#FACC15"
13373
+ description: A golden and radiant color representing caution, warmth, and precious value
13374
+ lang: en
13375
+
13376
+ - id: 97070e8e92248d1efe3b
13377
+ name: Fuchsia
13378
+ hex: "#E879F9"
13379
+ description: A striking and bold color full of confidence, fun, and creative expression
13380
+ lang: en
13381
+
13382
+ - id: 6344dbdeed2135072813
13383
+ name: Mint
13384
+ hex: "#2DD4BF"
13385
+ description: A cool and soothing color evoking freshness, cleanliness, and gentle relaxation
13386
+ lang: en
13387
+
13388
+ - id: dd98d5498210372a94a0
13389
+ name: Tangerine
13390
+ hex: "#FB923C"
13391
+ description: A cheerful and appetizing color radiating warmth, friendliness, and playful energy
13392
+ lang: en
13393
+
13394
+ - id: 392657362fd85fd3cedf
13395
+ name: Periwinkle
13396
+ hex: "#818CF8"
13397
+ description: A gentle and dreamy color blending lavender and blue for a serene, calming effect
13398
+ lang: en
13399
+
13400
+ - id: 7d66240dfe0995936c45
13401
+ name: Coral
13402
+ hex: "#F472B6"
13403
+ description: A lively and tropical color combining pink and orange for a warm, inviting feel
13404
+ lang: en
13405
+
13406
+ - id: 8f48fb6cb384076144a7
13407
+ name: Spring
13408
+ hex: "#4ADE80"
13409
+ description: A bright and optimistic green capturing the renewal and energy of the spring season
13410
+ lang: en
13411
+
13412
+ - id: d111ae5971315612c38a
13413
+ name: Black
13414
+ hex: "#000000"
13415
+ description: The deepest neutral color representing power, elegance, and strong contrast
13416
+ lang: en
13417
+
13418
+ - id: 30e3e175137a6c9b3f3e
13419
+ name: White
13420
+ hex: "#FFFFFF"
13421
+ description: The purest and lightest color symbolizing simplicity, clarity, and clean design
13422
+ lang: en
13423
+ `;
13154
13424
 
13155
13425
  // src/templates/resources/color/services/CreateColorService.txt
13156
13426
  var CreateColorService_default = `import { inject } from "@ooneex/container";
@@ -13301,9 +13571,9 @@ export class UpdateColorService implements IService {
13301
13571
  `;
13302
13572
 
13303
13573
  // src/commands/MakeSeedCommand.ts
13304
- import { join as join30 } from "path";
13305
- import { decorator as decorator30 } from "@ooneex/command";
13306
- import { TerminalLogger as TerminalLogger26 } from "@ooneex/logger";
13574
+ import { join as join31 } from "path";
13575
+ import { decorator as decorator31 } from "@ooneex/command";
13576
+ import { TerminalLogger as TerminalLogger27 } from "@ooneex/logger";
13307
13577
  import { seedCreate } from "@ooneex/seeds";
13308
13578
 
13309
13579
  // src/templates/module/seed.run.txt
@@ -13342,18 +13612,18 @@ class MakeSeedCommand {
13342
13612
  if (module) {
13343
13613
  await ensureModule(module);
13344
13614
  }
13345
- const base = module ? join30("modules", module) : ".";
13615
+ const base = module ? join31("modules", module) : ".";
13346
13616
  const { seedPath: filePath, dataPath } = await seedCreate({
13347
13617
  name,
13348
- seedsDir: join30(base, "src", "seeds"),
13349
- testsDir: join30(base, "tests", "seeds")
13618
+ seedsDir: join31(base, "src", "seeds"),
13619
+ testsDir: join31(base, "tests", "seeds")
13350
13620
  });
13351
- const binSeedRunPath = join30(process.cwd(), base, "bin", "seed", "run.ts");
13621
+ const binSeedRunPath = join31(process.cwd(), base, "bin", "seed", "run.ts");
13352
13622
  const binSeedRunFile = Bun.file(binSeedRunPath);
13353
13623
  if (!await binSeedRunFile.exists()) {
13354
13624
  await Bun.write(binSeedRunPath, seed_run_default.replace(/{{name}}/g, module ?? ""));
13355
13625
  }
13356
- const logger = new TerminalLogger26;
13626
+ const logger = new TerminalLogger27;
13357
13627
  logger.success(`${filePath} created successfully`, undefined, {
13358
13628
  showTimestamp: false,
13359
13629
  showArrow: false,
@@ -13367,7 +13637,7 @@ class MakeSeedCommand {
13367
13637
  }
13368
13638
  }
13369
13639
  MakeSeedCommand = __legacyDecorateClassTS([
13370
- decorator30.command()
13640
+ decorator31.command()
13371
13641
  ], MakeSeedCommand);
13372
13642
 
13373
13643
  // src/commands/MakeResourceColorCommand.ts
@@ -13380,9 +13650,9 @@ class MakeResourceColorCommand {
13380
13650
  }
13381
13651
  async run() {
13382
13652
  const module = "color";
13383
- const base = join31("modules", module);
13653
+ const base = join32("modules", module);
13384
13654
  const makeModuleCommand = new MakeModuleCommand;
13385
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
13655
+ await makeModuleCommand.run({ name: module, silent: true });
13386
13656
  const makeEntityCommand = new MakeEntityCommand;
13387
13657
  await makeEntityCommand.run({ name: "Color", module, tableName: "colors" });
13388
13658
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -13403,26 +13673,26 @@ class MakeResourceColorCommand {
13403
13673
  for (const controller of controllers) {
13404
13674
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
13405
13675
  }
13406
- const controllersDir = join31(process.cwd(), base, "src", "controllers");
13407
- await Bun.write(join31(controllersDir, "CreateColorController.ts"), CreateColorController_default);
13408
- await Bun.write(join31(controllersDir, "GetColorController.ts"), GetColorController_default);
13409
- await Bun.write(join31(controllersDir, "ListColorsController.ts"), ListColorsController_default);
13410
- await Bun.write(join31(controllersDir, "UpdateColorController.ts"), UpdateColorController_default);
13411
- await Bun.write(join31(controllersDir, "DeleteColorController.ts"), DeleteColorController_default);
13676
+ const controllersDir = join32(process.cwd(), base, "src", "controllers");
13677
+ await Bun.write(join32(controllersDir, "CreateColorController.ts"), CreateColorController_default);
13678
+ await Bun.write(join32(controllersDir, "GetColorController.ts"), GetColorController_default);
13679
+ await Bun.write(join32(controllersDir, "ListColorsController.ts"), ListColorsController_default);
13680
+ await Bun.write(join32(controllersDir, "UpdateColorController.ts"), UpdateColorController_default);
13681
+ await Bun.write(join32(controllersDir, "DeleteColorController.ts"), DeleteColorController_default);
13412
13682
  const makeServiceCommand = new MakeServiceCommand;
13413
13683
  const services = ["CreateColor", "GetColor", "ListColors", "UpdateColor", "DeleteColor"];
13414
13684
  for (const name of services) {
13415
13685
  await makeServiceCommand.run({ name, module });
13416
13686
  }
13417
- const servicesDir = join31(process.cwd(), base, "src", "services");
13418
- await Bun.write(join31(servicesDir, "CreateColorService.ts"), CreateColorService_default);
13419
- await Bun.write(join31(servicesDir, "GetColorService.ts"), GetColorService_default);
13420
- await Bun.write(join31(servicesDir, "ListColorsService.ts"), ListColorsService_default);
13421
- await Bun.write(join31(servicesDir, "UpdateColorService.ts"), UpdateColorService_default);
13422
- await Bun.write(join31(servicesDir, "DeleteColorService.ts"), DeleteColorService_default);
13423
- const entityPath = join31(process.cwd(), base, "src", "entities", "ColorEntity.ts");
13687
+ const servicesDir = join32(process.cwd(), base, "src", "services");
13688
+ await Bun.write(join32(servicesDir, "CreateColorService.ts"), CreateColorService_default);
13689
+ await Bun.write(join32(servicesDir, "GetColorService.ts"), GetColorService_default);
13690
+ await Bun.write(join32(servicesDir, "ListColorsService.ts"), ListColorsService_default);
13691
+ await Bun.write(join32(servicesDir, "UpdateColorService.ts"), UpdateColorService_default);
13692
+ await Bun.write(join32(servicesDir, "DeleteColorService.ts"), DeleteColorService_default);
13693
+ const entityPath = join32(process.cwd(), base, "src", "entities", "ColorEntity.ts");
13424
13694
  await Bun.write(entityPath, ColorEntity_default);
13425
- const migrationsDir = join31(process.cwd(), base, "src", "migrations");
13695
+ const migrationsDir = join32(process.cwd(), base, "src", "migrations");
13426
13696
  const glob = new Glob4("Migration*.ts");
13427
13697
  for await (const file of glob.scan(migrationsDir)) {
13428
13698
  if (file === "migrations.ts")
@@ -13430,23 +13700,23 @@ class MakeResourceColorCommand {
13430
13700
  const name = file.replace(/\.ts$/, "");
13431
13701
  const version = name.replace("Migration", "");
13432
13702
  const content = ColorMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
13433
- await Bun.write(join31(migrationsDir, file), content);
13703
+ await Bun.write(join32(migrationsDir, file), content);
13434
13704
  }
13435
- const repositoryPath = join31(process.cwd(), base, "src", "repositories", "ColorRepository.ts");
13705
+ const repositoryPath = join32(process.cwd(), base, "src", "repositories", "ColorRepository.ts");
13436
13706
  await Bun.write(repositoryPath, ColorRepository_default);
13437
13707
  const makeSeedCommand = new MakeSeedCommand;
13438
13708
  await makeSeedCommand.run({ name: "Color", module });
13439
- const seedsDir = join31(process.cwd(), base, "src", "seeds");
13440
- await Bun.write(join31(seedsDir, "ColorSeed.ts"), ColorSeed_default);
13441
- await Bun.write(join31(seedsDir, "data.yml"), Bun.file(data_default));
13709
+ const seedsDir = join32(process.cwd(), base, "src", "seeds");
13710
+ await Bun.write(join32(seedsDir, "ColorSeed.ts"), ColorSeed_default);
13711
+ await Bun.write(join32(seedsDir, "color-seed.yml"), color_seed_default);
13442
13712
  }
13443
13713
  }
13444
13714
  MakeResourceColorCommand = __legacyDecorateClassTS([
13445
- decorator31.command()
13715
+ decorator32.command()
13446
13716
  ], MakeResourceColorCommand);
13447
13717
  // src/commands/MakeResourceDiscountCommand.ts
13448
- import { join as join32 } from "path";
13449
- import { decorator as decorator32 } from "@ooneex/command";
13718
+ import { join as join33 } from "path";
13719
+ import { decorator as decorator33 } from "@ooneex/command";
13450
13720
  var {Glob: Glob5 } = globalThis.Bun;
13451
13721
 
13452
13722
  // src/templates/resources/discount/controllers/CreateDiscountController.txt
@@ -14089,9 +14359,9 @@ class MakeResourceDiscountCommand {
14089
14359
  }
14090
14360
  async run() {
14091
14361
  const module = "discount";
14092
- const base = join32("modules", module);
14362
+ const base = join33("modules", module);
14093
14363
  const makeModuleCommand = new MakeModuleCommand;
14094
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
14364
+ await makeModuleCommand.run({ name: module, silent: true });
14095
14365
  const makeEntityCommand = new MakeEntityCommand;
14096
14366
  await makeEntityCommand.run({ name: "Discount", module, tableName: "discounts" });
14097
14367
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -14124,26 +14394,26 @@ class MakeResourceDiscountCommand {
14124
14394
  for (const controller of controllers) {
14125
14395
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
14126
14396
  }
14127
- const controllersDir = join32(process.cwd(), base, "src", "controllers");
14128
- await Bun.write(join32(controllersDir, "CreateDiscountController.ts"), CreateDiscountController_default);
14129
- await Bun.write(join32(controllersDir, "GetDiscountController.ts"), GetDiscountController_default);
14130
- await Bun.write(join32(controllersDir, "ListDiscountsController.ts"), ListDiscountsController_default);
14131
- await Bun.write(join32(controllersDir, "UpdateDiscountController.ts"), UpdateDiscountController_default);
14132
- await Bun.write(join32(controllersDir, "DeleteDiscountController.ts"), DeleteDiscountController_default);
14397
+ const controllersDir = join33(process.cwd(), base, "src", "controllers");
14398
+ await Bun.write(join33(controllersDir, "CreateDiscountController.ts"), CreateDiscountController_default);
14399
+ await Bun.write(join33(controllersDir, "GetDiscountController.ts"), GetDiscountController_default);
14400
+ await Bun.write(join33(controllersDir, "ListDiscountsController.ts"), ListDiscountsController_default);
14401
+ await Bun.write(join33(controllersDir, "UpdateDiscountController.ts"), UpdateDiscountController_default);
14402
+ await Bun.write(join33(controllersDir, "DeleteDiscountController.ts"), DeleteDiscountController_default);
14133
14403
  const makeServiceCommand = new MakeServiceCommand;
14134
14404
  const services = ["CreateDiscount", "GetDiscount", "ListDiscounts", "UpdateDiscount", "DeleteDiscount"];
14135
14405
  for (const name of services) {
14136
14406
  await makeServiceCommand.run({ name, module });
14137
14407
  }
14138
- const servicesDir = join32(process.cwd(), base, "src", "services");
14139
- await Bun.write(join32(servicesDir, "CreateDiscountService.ts"), CreateDiscountService_default);
14140
- await Bun.write(join32(servicesDir, "GetDiscountService.ts"), GetDiscountService_default);
14141
- await Bun.write(join32(servicesDir, "ListDiscountsService.ts"), ListDiscountsService_default);
14142
- await Bun.write(join32(servicesDir, "UpdateDiscountService.ts"), UpdateDiscountService_default);
14143
- await Bun.write(join32(servicesDir, "DeleteDiscountService.ts"), DeleteDiscountService_default);
14144
- const entityPath = join32(process.cwd(), base, "src", "entities", "DiscountEntity.ts");
14408
+ const servicesDir = join33(process.cwd(), base, "src", "services");
14409
+ await Bun.write(join33(servicesDir, "CreateDiscountService.ts"), CreateDiscountService_default);
14410
+ await Bun.write(join33(servicesDir, "GetDiscountService.ts"), GetDiscountService_default);
14411
+ await Bun.write(join33(servicesDir, "ListDiscountsService.ts"), ListDiscountsService_default);
14412
+ await Bun.write(join33(servicesDir, "UpdateDiscountService.ts"), UpdateDiscountService_default);
14413
+ await Bun.write(join33(servicesDir, "DeleteDiscountService.ts"), DeleteDiscountService_default);
14414
+ const entityPath = join33(process.cwd(), base, "src", "entities", "DiscountEntity.ts");
14145
14415
  await Bun.write(entityPath, DiscountEntity_default);
14146
- const migrationsDir = join32(process.cwd(), base, "src", "migrations");
14416
+ const migrationsDir = join33(process.cwd(), base, "src", "migrations");
14147
14417
  const glob = new Glob5("Migration*.ts");
14148
14418
  for await (const file of glob.scan(migrationsDir)) {
14149
14419
  if (file === "migrations.ts")
@@ -14151,18 +14421,18 @@ class MakeResourceDiscountCommand {
14151
14421
  const name = file.replace(/\.ts$/, "");
14152
14422
  const version = name.replace("Migration", "");
14153
14423
  const content = DiscountMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
14154
- await Bun.write(join32(migrationsDir, file), content);
14424
+ await Bun.write(join33(migrationsDir, file), content);
14155
14425
  }
14156
- const repositoryPath = join32(process.cwd(), base, "src", "repositories", "DiscountRepository.ts");
14426
+ const repositoryPath = join33(process.cwd(), base, "src", "repositories", "DiscountRepository.ts");
14157
14427
  await Bun.write(repositoryPath, DiscountRepository_default);
14158
14428
  }
14159
14429
  }
14160
14430
  MakeResourceDiscountCommand = __legacyDecorateClassTS([
14161
- decorator32.command()
14431
+ decorator33.command()
14162
14432
  ], MakeResourceDiscountCommand);
14163
14433
  // src/commands/MakeResourceFolderCommand.ts
14164
- import { join as join33 } from "path";
14165
- import { decorator as decorator33 } from "@ooneex/command";
14434
+ import { join as join34 } from "path";
14435
+ import { decorator as decorator34 } from "@ooneex/command";
14166
14436
  var {Glob: Glob6 } = globalThis.Bun;
14167
14437
 
14168
14438
  // src/templates/resources/folder/controllers/CreateFolderController.txt
@@ -14789,9 +15059,9 @@ class MakeResourceFolderCommand {
14789
15059
  }
14790
15060
  async run() {
14791
15061
  const module = "folder";
14792
- const base = join33("modules", module);
15062
+ const base = join34("modules", module);
14793
15063
  const makeModuleCommand = new MakeModuleCommand;
14794
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
15064
+ await makeModuleCommand.run({ name: module, silent: true });
14795
15065
  const makeEntityCommand = new MakeEntityCommand;
14796
15066
  await makeEntityCommand.run({ name: "Folder", module, tableName: "folders" });
14797
15067
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -14824,26 +15094,26 @@ class MakeResourceFolderCommand {
14824
15094
  for (const controller of controllers) {
14825
15095
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
14826
15096
  }
14827
- const controllersDir = join33(process.cwd(), base, "src", "controllers");
14828
- await Bun.write(join33(controllersDir, "CreateFolderController.ts"), CreateFolderController_default);
14829
- await Bun.write(join33(controllersDir, "GetFolderController.ts"), GetFolderController_default);
14830
- await Bun.write(join33(controllersDir, "ListFoldersController.ts"), ListFoldersController_default);
14831
- await Bun.write(join33(controllersDir, "UpdateFolderController.ts"), UpdateFolderController_default);
14832
- await Bun.write(join33(controllersDir, "DeleteFolderController.ts"), DeleteFolderController_default);
15097
+ const controllersDir = join34(process.cwd(), base, "src", "controllers");
15098
+ await Bun.write(join34(controllersDir, "CreateFolderController.ts"), CreateFolderController_default);
15099
+ await Bun.write(join34(controllersDir, "GetFolderController.ts"), GetFolderController_default);
15100
+ await Bun.write(join34(controllersDir, "ListFoldersController.ts"), ListFoldersController_default);
15101
+ await Bun.write(join34(controllersDir, "UpdateFolderController.ts"), UpdateFolderController_default);
15102
+ await Bun.write(join34(controllersDir, "DeleteFolderController.ts"), DeleteFolderController_default);
14833
15103
  const makeServiceCommand = new MakeServiceCommand;
14834
15104
  const services = ["CreateFolder", "GetFolder", "ListFolders", "UpdateFolder", "DeleteFolder"];
14835
15105
  for (const name of services) {
14836
15106
  await makeServiceCommand.run({ name, module });
14837
15107
  }
14838
- const servicesDir = join33(process.cwd(), base, "src", "services");
14839
- await Bun.write(join33(servicesDir, "CreateFolderService.ts"), CreateFolderService_default);
14840
- await Bun.write(join33(servicesDir, "GetFolderService.ts"), GetFolderService_default);
14841
- await Bun.write(join33(servicesDir, "ListFoldersService.ts"), ListFoldersService_default);
14842
- await Bun.write(join33(servicesDir, "UpdateFolderService.ts"), UpdateFolderService_default);
14843
- await Bun.write(join33(servicesDir, "DeleteFolderService.ts"), DeleteFolderService_default);
14844
- const entityPath = join33(process.cwd(), base, "src", "entities", "FolderEntity.ts");
15108
+ const servicesDir = join34(process.cwd(), base, "src", "services");
15109
+ await Bun.write(join34(servicesDir, "CreateFolderService.ts"), CreateFolderService_default);
15110
+ await Bun.write(join34(servicesDir, "GetFolderService.ts"), GetFolderService_default);
15111
+ await Bun.write(join34(servicesDir, "ListFoldersService.ts"), ListFoldersService_default);
15112
+ await Bun.write(join34(servicesDir, "UpdateFolderService.ts"), UpdateFolderService_default);
15113
+ await Bun.write(join34(servicesDir, "DeleteFolderService.ts"), DeleteFolderService_default);
15114
+ const entityPath = join34(process.cwd(), base, "src", "entities", "FolderEntity.ts");
14845
15115
  await Bun.write(entityPath, FolderEntity_default);
14846
- const migrationsDir = join33(process.cwd(), base, "src", "migrations");
15116
+ const migrationsDir = join34(process.cwd(), base, "src", "migrations");
14847
15117
  const glob = new Glob6("Migration*.ts");
14848
15118
  for await (const file of glob.scan(migrationsDir)) {
14849
15119
  if (file === "migrations.ts")
@@ -14851,18 +15121,18 @@ class MakeResourceFolderCommand {
14851
15121
  const name = file.replace(/\.ts$/, "");
14852
15122
  const version = name.replace("Migration", "");
14853
15123
  const content = FolderMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
14854
- await Bun.write(join33(migrationsDir, file), content);
15124
+ await Bun.write(join34(migrationsDir, file), content);
14855
15125
  }
14856
- const repositoryPath = join33(process.cwd(), base, "src", "repositories", "FolderRepository.ts");
15126
+ const repositoryPath = join34(process.cwd(), base, "src", "repositories", "FolderRepository.ts");
14857
15127
  await Bun.write(repositoryPath, FolderRepository_default);
14858
15128
  }
14859
15129
  }
14860
15130
  MakeResourceFolderCommand = __legacyDecorateClassTS([
14861
- decorator33.command()
15131
+ decorator34.command()
14862
15132
  ], MakeResourceFolderCommand);
14863
15133
  // src/commands/MakeResourceImageCommand.ts
14864
- import { join as join34 } from "path";
14865
- import { decorator as decorator34 } from "@ooneex/command";
15134
+ import { join as join35 } from "path";
15135
+ import { decorator as decorator35 } from "@ooneex/command";
14866
15136
  var {Glob: Glob7 } = globalThis.Bun;
14867
15137
 
14868
15138
  // src/templates/resources/image/controllers/CreateImageController.txt
@@ -15528,9 +15798,9 @@ class MakeResourceImageCommand {
15528
15798
  }
15529
15799
  async run() {
15530
15800
  const module = "image";
15531
- const base = join34("modules", module);
15801
+ const base = join35("modules", module);
15532
15802
  const makeModuleCommand = new MakeModuleCommand;
15533
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
15803
+ await makeModuleCommand.run({ name: module, silent: true });
15534
15804
  const makeEntityCommand = new MakeEntityCommand;
15535
15805
  await makeEntityCommand.run({ name: "Image", module, tableName: "images" });
15536
15806
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -15563,26 +15833,26 @@ class MakeResourceImageCommand {
15563
15833
  for (const controller of controllers) {
15564
15834
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
15565
15835
  }
15566
- const controllersDir = join34(process.cwd(), base, "src", "controllers");
15567
- await Bun.write(join34(controllersDir, "CreateImageController.ts"), CreateImageController_default);
15568
- await Bun.write(join34(controllersDir, "GetImageController.ts"), GetImageController_default);
15569
- await Bun.write(join34(controllersDir, "ListImagesController.ts"), ListImagesController_default);
15570
- await Bun.write(join34(controllersDir, "UpdateImageController.ts"), UpdateImageController_default);
15571
- await Bun.write(join34(controllersDir, "DeleteImageController.ts"), DeleteImageController_default);
15836
+ const controllersDir = join35(process.cwd(), base, "src", "controllers");
15837
+ await Bun.write(join35(controllersDir, "CreateImageController.ts"), CreateImageController_default);
15838
+ await Bun.write(join35(controllersDir, "GetImageController.ts"), GetImageController_default);
15839
+ await Bun.write(join35(controllersDir, "ListImagesController.ts"), ListImagesController_default);
15840
+ await Bun.write(join35(controllersDir, "UpdateImageController.ts"), UpdateImageController_default);
15841
+ await Bun.write(join35(controllersDir, "DeleteImageController.ts"), DeleteImageController_default);
15572
15842
  const makeServiceCommand = new MakeServiceCommand;
15573
15843
  const services = ["CreateImage", "GetImage", "ListImages", "UpdateImage", "DeleteImage"];
15574
15844
  for (const name of services) {
15575
15845
  await makeServiceCommand.run({ name, module });
15576
15846
  }
15577
- const servicesDir = join34(process.cwd(), base, "src", "services");
15578
- await Bun.write(join34(servicesDir, "CreateImageService.ts"), CreateImageService_default);
15579
- await Bun.write(join34(servicesDir, "GetImageService.ts"), GetImageService_default);
15580
- await Bun.write(join34(servicesDir, "ListImagesService.ts"), ListImagesService_default);
15581
- await Bun.write(join34(servicesDir, "UpdateImageService.ts"), UpdateImageService_default);
15582
- await Bun.write(join34(servicesDir, "DeleteImageService.ts"), DeleteImageService_default);
15583
- const entityPath = join34(process.cwd(), base, "src", "entities", "ImageEntity.ts");
15847
+ const servicesDir = join35(process.cwd(), base, "src", "services");
15848
+ await Bun.write(join35(servicesDir, "CreateImageService.ts"), CreateImageService_default);
15849
+ await Bun.write(join35(servicesDir, "GetImageService.ts"), GetImageService_default);
15850
+ await Bun.write(join35(servicesDir, "ListImagesService.ts"), ListImagesService_default);
15851
+ await Bun.write(join35(servicesDir, "UpdateImageService.ts"), UpdateImageService_default);
15852
+ await Bun.write(join35(servicesDir, "DeleteImageService.ts"), DeleteImageService_default);
15853
+ const entityPath = join35(process.cwd(), base, "src", "entities", "ImageEntity.ts");
15584
15854
  await Bun.write(entityPath, ImageEntity_default);
15585
- const migrationsDir = join34(process.cwd(), base, "src", "migrations");
15855
+ const migrationsDir = join35(process.cwd(), base, "src", "migrations");
15586
15856
  const glob = new Glob7("Migration*.ts");
15587
15857
  for await (const file of glob.scan(migrationsDir)) {
15588
15858
  if (file === "migrations.ts")
@@ -15590,18 +15860,18 @@ class MakeResourceImageCommand {
15590
15860
  const name = file.replace(/\.ts$/, "");
15591
15861
  const version = name.replace("Migration", "");
15592
15862
  const content = ImageMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
15593
- await Bun.write(join34(migrationsDir, file), content);
15863
+ await Bun.write(join35(migrationsDir, file), content);
15594
15864
  }
15595
- const repositoryPath = join34(process.cwd(), base, "src", "repositories", "ImageRepository.ts");
15865
+ const repositoryPath = join35(process.cwd(), base, "src", "repositories", "ImageRepository.ts");
15596
15866
  await Bun.write(repositoryPath, ImageRepository_default);
15597
15867
  }
15598
15868
  }
15599
15869
  MakeResourceImageCommand = __legacyDecorateClassTS([
15600
- decorator34.command()
15870
+ decorator35.command()
15601
15871
  ], MakeResourceImageCommand);
15602
15872
  // src/commands/MakeResourceNoteCommand.ts
15603
- import { join as join35 } from "path";
15604
- import { decorator as decorator35 } from "@ooneex/command";
15873
+ import { join as join36 } from "path";
15874
+ import { decorator as decorator36 } from "@ooneex/command";
15605
15875
  var {Glob: Glob8 } = globalThis.Bun;
15606
15876
 
15607
15877
  // src/templates/resources/note/controllers/CreateNoteController.txt
@@ -16306,9 +16576,9 @@ class MakeResourceNoteCommand {
16306
16576
  }
16307
16577
  async run() {
16308
16578
  const module = "note";
16309
- const base = join35("modules", module);
16579
+ const base = join36("modules", module);
16310
16580
  const makeModuleCommand = new MakeModuleCommand;
16311
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
16581
+ await makeModuleCommand.run({ name: module, silent: true });
16312
16582
  const makeEntityCommand = new MakeEntityCommand;
16313
16583
  await makeEntityCommand.run({ name: "Note", module, tableName: "notes" });
16314
16584
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -16341,26 +16611,26 @@ class MakeResourceNoteCommand {
16341
16611
  for (const controller of controllers) {
16342
16612
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
16343
16613
  }
16344
- const controllersDir = join35(process.cwd(), base, "src", "controllers");
16345
- await Bun.write(join35(controllersDir, "CreateNoteController.ts"), CreateNoteController_default);
16346
- await Bun.write(join35(controllersDir, "GetNoteController.ts"), GetNoteController_default);
16347
- await Bun.write(join35(controllersDir, "ListNotesController.ts"), ListNotesController_default);
16348
- await Bun.write(join35(controllersDir, "UpdateNoteController.ts"), UpdateNoteController_default);
16349
- await Bun.write(join35(controllersDir, "DeleteNoteController.ts"), DeleteNoteController_default);
16614
+ const controllersDir = join36(process.cwd(), base, "src", "controllers");
16615
+ await Bun.write(join36(controllersDir, "CreateNoteController.ts"), CreateNoteController_default);
16616
+ await Bun.write(join36(controllersDir, "GetNoteController.ts"), GetNoteController_default);
16617
+ await Bun.write(join36(controllersDir, "ListNotesController.ts"), ListNotesController_default);
16618
+ await Bun.write(join36(controllersDir, "UpdateNoteController.ts"), UpdateNoteController_default);
16619
+ await Bun.write(join36(controllersDir, "DeleteNoteController.ts"), DeleteNoteController_default);
16350
16620
  const makeServiceCommand = new MakeServiceCommand;
16351
16621
  const services = ["CreateNote", "GetNote", "ListNotes", "UpdateNote", "DeleteNote"];
16352
16622
  for (const name of services) {
16353
16623
  await makeServiceCommand.run({ name, module });
16354
16624
  }
16355
- const servicesDir = join35(process.cwd(), base, "src", "services");
16356
- await Bun.write(join35(servicesDir, "CreateNoteService.ts"), CreateNoteService_default);
16357
- await Bun.write(join35(servicesDir, "GetNoteService.ts"), GetNoteService_default);
16358
- await Bun.write(join35(servicesDir, "ListNotesService.ts"), ListNotesService_default);
16359
- await Bun.write(join35(servicesDir, "UpdateNoteService.ts"), UpdateNoteService_default);
16360
- await Bun.write(join35(servicesDir, "DeleteNoteService.ts"), DeleteNoteService_default);
16361
- const entityPath = join35(process.cwd(), base, "src", "entities", "NoteEntity.ts");
16625
+ const servicesDir = join36(process.cwd(), base, "src", "services");
16626
+ await Bun.write(join36(servicesDir, "CreateNoteService.ts"), CreateNoteService_default);
16627
+ await Bun.write(join36(servicesDir, "GetNoteService.ts"), GetNoteService_default);
16628
+ await Bun.write(join36(servicesDir, "ListNotesService.ts"), ListNotesService_default);
16629
+ await Bun.write(join36(servicesDir, "UpdateNoteService.ts"), UpdateNoteService_default);
16630
+ await Bun.write(join36(servicesDir, "DeleteNoteService.ts"), DeleteNoteService_default);
16631
+ const entityPath = join36(process.cwd(), base, "src", "entities", "NoteEntity.ts");
16362
16632
  await Bun.write(entityPath, NoteEntity_default);
16363
- const migrationsDir = join35(process.cwd(), base, "src", "migrations");
16633
+ const migrationsDir = join36(process.cwd(), base, "src", "migrations");
16364
16634
  const glob = new Glob8("Migration*.ts");
16365
16635
  for await (const file of glob.scan(migrationsDir)) {
16366
16636
  if (file === "migrations.ts")
@@ -16368,18 +16638,18 @@ class MakeResourceNoteCommand {
16368
16638
  const name = file.replace(/\.ts$/, "");
16369
16639
  const version = name.replace("Migration", "");
16370
16640
  const content = NoteMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
16371
- await Bun.write(join35(migrationsDir, file), content);
16641
+ await Bun.write(join36(migrationsDir, file), content);
16372
16642
  }
16373
- const repositoryPath = join35(process.cwd(), base, "src", "repositories", "NoteRepository.ts");
16643
+ const repositoryPath = join36(process.cwd(), base, "src", "repositories", "NoteRepository.ts");
16374
16644
  await Bun.write(repositoryPath, NoteRepository_default);
16375
16645
  }
16376
16646
  }
16377
16647
  MakeResourceNoteCommand = __legacyDecorateClassTS([
16378
- decorator35.command()
16648
+ decorator36.command()
16379
16649
  ], MakeResourceNoteCommand);
16380
16650
  // src/commands/MakeResourceStatusCommand.ts
16381
- import { join as join36 } from "path";
16382
- import { decorator as decorator36 } from "@ooneex/command";
16651
+ import { join as join37 } from "path";
16652
+ import { decorator as decorator37 } from "@ooneex/command";
16383
16653
  var {Glob: Glob9 } = globalThis.Bun;
16384
16654
 
16385
16655
  // src/templates/resources/status/controllers/CreateStatusController.txt
@@ -16812,22 +17082,28 @@ export class StatusRepository {
16812
17082
  }
16813
17083
  `;
16814
17084
 
16815
- // src/templates/resources/status/seeds/data.yml
16816
- var data_default2 = "./data-f4c7y8d3.yml";
16817
-
16818
17085
  // src/templates/resources/status/seeds/StatusSeed.txt
16819
- var StatusSeed_default = `import { resolve } from "@ooneex/container";
17086
+ var StatusSeed_default = `import { inject } from "@ooneex/container";
16820
17087
  import { decorator, type ISeed, type SeedClassType } from "@ooneex/seeds";
17088
+ import type { LocaleType } from "@ooneex/translation";
16821
17089
  import { StatusEntity } from "../entities/StatusEntity";
16822
17090
  import { StatusRepository } from "../repositories/StatusRepository";
16823
- import data from "./data.yml";
17091
+ import data from "./status-seed.yml";
17092
+
17093
+ type StatusSeedDataType = {
17094
+ id: string;
17095
+ name: string;
17096
+ color?: string;
17097
+ description?: string;
17098
+ lang?: LocaleType;
17099
+ };
16824
17100
 
16825
17101
  @decorator.seed()
16826
17102
  export class StatusSeed implements ISeed {
16827
- public async run<T>(): Promise<T> {
16828
- const repository = resolve(StatusRepository);
17103
+ constructor(@inject(StatusRepository) private readonly repository: StatusRepository) {}
16829
17104
 
16830
- const entities = (data as Record<string, string>[]).map((item) => {
17105
+ public async run<T>(): Promise<T> {
17106
+ const entities = (data as StatusSeedDataType[]).map((item) => {
16831
17107
  const entity = new StatusEntity();
16832
17108
  entity.id = item.id;
16833
17109
  entity.name = item.name;
@@ -16838,8 +17114,8 @@ export class StatusSeed implements ISeed {
16838
17114
  return entity;
16839
17115
  });
16840
17116
 
16841
- const result = await repository.createMany(entities);
16842
- await repository.close();
17117
+ const result = await this.repository.createMany(entities);
17118
+ await this.repository.close();
16843
17119
 
16844
17120
  return result as T;
16845
17121
  }
@@ -16854,6 +17130,228 @@ export class StatusSeed implements ISeed {
16854
17130
  }
16855
17131
  `;
16856
17132
 
17133
+ // src/templates/resources/status/seeds/status-seed.yml
17134
+ var status_seed_default = `# Draft/Pending
17135
+ - id: 19370a07c4137b8587fb
17136
+ name: draft
17137
+ color: "#6B7280"
17138
+ description: Initial state, not yet submitted or reviewed
17139
+ lang: en
17140
+
17141
+ - id: cc0ed480a5ec281ac239
17142
+ name: pending
17143
+ color: "#F59E0B"
17144
+ description: Awaiting processing or approval
17145
+ lang: en
17146
+
17147
+ - id: cc64e575330db0b3d778
17148
+ name: submitted
17149
+ color: "#3B82F6"
17150
+ description: Formally sent for processing or review
17151
+ lang: en
17152
+
17153
+ # Review
17154
+ - id: 98a5fee7f4b0937099fa
17155
+ name: in review
17156
+ color: "#8B5CF6"
17157
+ description: Currently under review and awaiting feedback
17158
+ lang: en
17159
+
17160
+ - id: c0d4fcbfc06aa71e0aae
17161
+ name: reviewed
17162
+ color: "#6366F1"
17163
+ description: Review has been completed and feedback provided
17164
+ lang: en
17165
+
17166
+ # Processing
17167
+ - id: 59d5e9450c61ab91ffdf
17168
+ name: processing
17169
+ color: "#3B82F6"
17170
+ description: Currently being processed by the system
17171
+ lang: en
17172
+
17173
+ - id: 78ec743ba28ed7da4ed6
17174
+ name: processed
17175
+ color: "#10B981"
17176
+ description: Processing has been completed successfully
17177
+ lang: en
17178
+
17179
+ - id: 2daa6e14d09e2195f26c
17180
+ name: queued
17181
+ color: "#F59E0B"
17182
+ description: Waiting in a queue to be processed
17183
+ lang: en
17184
+
17185
+ - id: de2850c6c84ce376e66b
17186
+ name: ready
17187
+ color: "#14B8A6"
17188
+ description: Prepared and available for the next step
17189
+ lang: en
17190
+
17191
+ - id: 116cd80e4a794da247d6
17192
+ name: scheduled
17193
+ color: "#6366F1"
17194
+ description: Planned for execution at a future date or time
17195
+ lang: en
17196
+
17197
+ # Approval
17198
+ - id: b720bb250ac3ad60bf8b
17199
+ name: approved
17200
+ color: "#10B981"
17201
+ description: Reviewed and approved, ready to proceed
17202
+ lang: en
17203
+
17204
+ - id: d8ef1c6a8b6d32ec4795
17205
+ name: rejected
17206
+ color: "#EF4444"
17207
+ description: Reviewed and declined, requires changes
17208
+ lang: en
17209
+
17210
+ # Completion
17211
+ - id: 236c522dbf4bbd0c985a
17212
+ name: done
17213
+ color: "#22C55E"
17214
+ description: Task or process has been finished
17215
+ lang: en
17216
+
17217
+ - id: 28c2b3f0eee26967c9a9
17218
+ name: completed
17219
+ color: "#22C55E"
17220
+ description: Successfully finished and closed
17221
+ lang: en
17222
+
17223
+ - id: 359b3403e311d8748eb8
17224
+ name: success
17225
+ color: "#10B981"
17226
+ description: Operation completed without errors
17227
+ lang: en
17228
+
17229
+ # Error
17230
+ - id: b0f3eac4afe9833befc2
17231
+ name: failed
17232
+ color: "#EF4444"
17233
+ description: Attempted but did not complete successfully
17234
+ lang: en
17235
+
17236
+ - id: 7ced0369532b3cbb455f
17237
+ name: error
17238
+ color: "#EF4444"
17239
+ description: An unexpected error occurred during execution
17240
+ lang: en
17241
+
17242
+ - id: 892b0e59911c9d378a65
17243
+ name: cancelled
17244
+ color: "#78716C"
17245
+ description: Intentionally stopped before completion
17246
+ lang: en
17247
+
17248
+ - id: 16d2cee346fc4c785940
17249
+ name: timeout
17250
+ color: "#F97316"
17251
+ description: Operation exceeded the allowed time limit
17252
+ lang: en
17253
+
17254
+ # Archive
17255
+ - id: da382ef8170dd50d006c
17256
+ name: archived
17257
+ color: "#6B7280"
17258
+ description: No longer active, preserved for reference
17259
+ lang: en
17260
+
17261
+ - id: b1f4d6d9c4731a833e08
17262
+ name: delete
17263
+ color: "#EF4444"
17264
+ description: Marked for deletion but not yet removed
17265
+ lang: en
17266
+
17267
+ - id: 04f68d6258818e752734
17268
+ name: deleted
17269
+ color: "#78716C"
17270
+ description: Permanently removed from the system
17271
+ lang: en
17272
+
17273
+ # Activity
17274
+ - id: 99241bc22eba298cbcb8
17275
+ name: active
17276
+ color: "#14B8A6"
17277
+ description: Currently enabled and operational
17278
+ lang: en
17279
+
17280
+ - id: 6102430e65c747500e5a
17281
+ name: inactive
17282
+ color: "#78716C"
17283
+ description: Disabled or dormant, not currently in use
17284
+ lang: en
17285
+
17286
+ - id: 053cebd7dbb3ca3fea12
17287
+ name: disabled
17288
+ color: "#78716C"
17289
+ description: Explicitly turned off and non-functional
17290
+ lang: en
17291
+
17292
+ - id: 0562dbaefe60ed20b110
17293
+ name: enabled
17294
+ color: "#10B981"
17295
+ description: Turned on and ready to operate
17296
+ lang: en
17297
+
17298
+ - id: f2743147444d8db5125a
17299
+ name: suspended
17300
+ color: "#F97316"
17301
+ description: Temporarily restricted due to a policy or issue
17302
+ lang: en
17303
+
17304
+ - id: c4fe0a69cb17bca324bf
17305
+ name: paused
17306
+ color: "#F59E0B"
17307
+ description: Temporarily stopped, can be resumed at any time
17308
+ lang: en
17309
+
17310
+ - id: 13a82a3024635d53365a
17311
+ name: on hold
17312
+ color: "#F97316"
17313
+ description: Temporarily paused, waiting for external input
17314
+ lang: en
17315
+
17316
+ # Messages
17317
+ - id: 4aa0ac556311a9e702cb
17318
+ name: sent
17319
+ color: "#3B82F6"
17320
+ description: Message has been dispatched to the recipient
17321
+ lang: en
17322
+
17323
+ - id: 401301bf6e91759afeac
17324
+ name: delivered
17325
+ color: "#10B981"
17326
+ description: Message has been successfully received by the recipient
17327
+ lang: en
17328
+
17329
+ - id: 81a798642f25e918657a
17330
+ name: read
17331
+ color: "#22C55E"
17332
+ description: Message has been opened and viewed by the recipient
17333
+ lang: en
17334
+
17335
+ # Validation
17336
+ - id: 40463a364cf4654a9fbf
17337
+ name: valid
17338
+ color: "#10B981"
17339
+ description: Passes all validation rules and is considered correct
17340
+ lang: en
17341
+
17342
+ - id: 4c57d0556757f319feeb
17343
+ name: invalid
17344
+ color: "#EF4444"
17345
+ description: Does not meet validation requirements
17346
+ lang: en
17347
+
17348
+ - id: 222182aa92e951d17c10
17349
+ name: expired
17350
+ color: "#6B7280"
17351
+ description: Past its validity period and no longer effective
17352
+ lang: en
17353
+ `;
17354
+
16857
17355
  // src/templates/resources/status/services/CreateStatusService.txt
16858
17356
  var CreateStatusService_default = `import { inject } from "@ooneex/container";
16859
17357
  import { decorator } from "@ooneex/service";
@@ -17012,9 +17510,9 @@ class MakeResourceStatusCommand {
17012
17510
  }
17013
17511
  async run() {
17014
17512
  const module = "status";
17015
- const base = join36("modules", module);
17513
+ const base = join37("modules", module);
17016
17514
  const makeModuleCommand = new MakeModuleCommand;
17017
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
17515
+ await makeModuleCommand.run({ name: module, silent: true });
17018
17516
  const makeEntityCommand = new MakeEntityCommand;
17019
17517
  await makeEntityCommand.run({ name: "Status", module, tableName: "statuses" });
17020
17518
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -17047,26 +17545,26 @@ class MakeResourceStatusCommand {
17047
17545
  for (const controller of controllers) {
17048
17546
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
17049
17547
  }
17050
- const controllersDir = join36(process.cwd(), base, "src", "controllers");
17051
- await Bun.write(join36(controllersDir, "CreateStatusController.ts"), CreateStatusController_default);
17052
- await Bun.write(join36(controllersDir, "GetStatusController.ts"), GetStatusController_default);
17053
- await Bun.write(join36(controllersDir, "ListStatusesController.ts"), ListStatusesController_default);
17054
- await Bun.write(join36(controllersDir, "UpdateStatusController.ts"), UpdateStatusController_default);
17055
- await Bun.write(join36(controllersDir, "DeleteStatusController.ts"), DeleteStatusController_default);
17548
+ const controllersDir = join37(process.cwd(), base, "src", "controllers");
17549
+ await Bun.write(join37(controllersDir, "CreateStatusController.ts"), CreateStatusController_default);
17550
+ await Bun.write(join37(controllersDir, "GetStatusController.ts"), GetStatusController_default);
17551
+ await Bun.write(join37(controllersDir, "ListStatusesController.ts"), ListStatusesController_default);
17552
+ await Bun.write(join37(controllersDir, "UpdateStatusController.ts"), UpdateStatusController_default);
17553
+ await Bun.write(join37(controllersDir, "DeleteStatusController.ts"), DeleteStatusController_default);
17056
17554
  const makeServiceCommand = new MakeServiceCommand;
17057
17555
  const services = ["CreateStatus", "GetStatus", "ListStatuses", "UpdateStatus", "DeleteStatus"];
17058
17556
  for (const name of services) {
17059
17557
  await makeServiceCommand.run({ name, module });
17060
17558
  }
17061
- const servicesDir = join36(process.cwd(), base, "src", "services");
17062
- await Bun.write(join36(servicesDir, "CreateStatusService.ts"), CreateStatusService_default);
17063
- await Bun.write(join36(servicesDir, "GetStatusService.ts"), GetStatusService_default);
17064
- await Bun.write(join36(servicesDir, "ListStatusesService.ts"), ListStatusesService_default);
17065
- await Bun.write(join36(servicesDir, "UpdateStatusService.ts"), UpdateStatusService_default);
17066
- await Bun.write(join36(servicesDir, "DeleteStatusService.ts"), DeleteStatusService_default);
17067
- const entityPath = join36(process.cwd(), base, "src", "entities", "StatusEntity.ts");
17559
+ const servicesDir = join37(process.cwd(), base, "src", "services");
17560
+ await Bun.write(join37(servicesDir, "CreateStatusService.ts"), CreateStatusService_default);
17561
+ await Bun.write(join37(servicesDir, "GetStatusService.ts"), GetStatusService_default);
17562
+ await Bun.write(join37(servicesDir, "ListStatusesService.ts"), ListStatusesService_default);
17563
+ await Bun.write(join37(servicesDir, "UpdateStatusService.ts"), UpdateStatusService_default);
17564
+ await Bun.write(join37(servicesDir, "DeleteStatusService.ts"), DeleteStatusService_default);
17565
+ const entityPath = join37(process.cwd(), base, "src", "entities", "StatusEntity.ts");
17068
17566
  await Bun.write(entityPath, StatusEntity_default);
17069
- const migrationsDir = join36(process.cwd(), base, "src", "migrations");
17567
+ const migrationsDir = join37(process.cwd(), base, "src", "migrations");
17070
17568
  const glob = new Glob9("Migration*.ts");
17071
17569
  for await (const file of glob.scan(migrationsDir)) {
17072
17570
  if (file === "migrations.ts")
@@ -17074,23 +17572,23 @@ class MakeResourceStatusCommand {
17074
17572
  const name = file.replace(/\.ts$/, "");
17075
17573
  const version = name.replace("Migration", "");
17076
17574
  const content = StatusMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
17077
- await Bun.write(join36(migrationsDir, file), content);
17575
+ await Bun.write(join37(migrationsDir, file), content);
17078
17576
  }
17079
- const repositoryPath = join36(process.cwd(), base, "src", "repositories", "StatusRepository.ts");
17577
+ const repositoryPath = join37(process.cwd(), base, "src", "repositories", "StatusRepository.ts");
17080
17578
  await Bun.write(repositoryPath, StatusRepository_default);
17081
17579
  const makeSeedCommand = new MakeSeedCommand;
17082
17580
  await makeSeedCommand.run({ name: "Status", module });
17083
- const seedsDir = join36(process.cwd(), base, "src", "seeds");
17084
- await Bun.write(join36(seedsDir, "StatusSeed.ts"), StatusSeed_default);
17085
- await Bun.write(join36(seedsDir, "data.yml"), Bun.file(data_default2));
17581
+ const seedsDir = join37(process.cwd(), base, "src", "seeds");
17582
+ await Bun.write(join37(seedsDir, "StatusSeed.ts"), StatusSeed_default);
17583
+ await Bun.write(join37(seedsDir, "status-seed.yml"), status_seed_default);
17086
17584
  }
17087
17585
  }
17088
17586
  MakeResourceStatusCommand = __legacyDecorateClassTS([
17089
- decorator36.command()
17587
+ decorator37.command()
17090
17588
  ], MakeResourceStatusCommand);
17091
17589
  // src/commands/MakeResourceTagCommand.ts
17092
- import { join as join37 } from "path";
17093
- import { decorator as decorator37 } from "@ooneex/command";
17590
+ import { join as join38 } from "path";
17591
+ import { decorator as decorator38 } from "@ooneex/command";
17094
17592
  var {Glob: Glob10 } = globalThis.Bun;
17095
17593
 
17096
17594
  // src/templates/resources/tag/controllers/CreateTagController.txt
@@ -17681,9 +18179,9 @@ class MakeResourceTagCommand {
17681
18179
  }
17682
18180
  async run() {
17683
18181
  const module = "tag";
17684
- const base = join37("modules", module);
18182
+ const base = join38("modules", module);
17685
18183
  const makeModuleCommand = new MakeModuleCommand;
17686
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
18184
+ await makeModuleCommand.run({ name: module, silent: true });
17687
18185
  const makeEntityCommand = new MakeEntityCommand;
17688
18186
  await makeEntityCommand.run({ name: "Tag", module, tableName: "tags" });
17689
18187
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -17716,26 +18214,26 @@ class MakeResourceTagCommand {
17716
18214
  for (const controller of controllers) {
17717
18215
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
17718
18216
  }
17719
- const controllersDir = join37(process.cwd(), base, "src", "controllers");
17720
- await Bun.write(join37(controllersDir, "CreateTagController.ts"), CreateTagController_default);
17721
- await Bun.write(join37(controllersDir, "GetTagController.ts"), GetTagController_default);
17722
- await Bun.write(join37(controllersDir, "ListTagsController.ts"), ListTagsController_default);
17723
- await Bun.write(join37(controllersDir, "UpdateTagController.ts"), UpdateTagController_default);
17724
- await Bun.write(join37(controllersDir, "DeleteTagController.ts"), DeleteTagController_default);
18217
+ const controllersDir = join38(process.cwd(), base, "src", "controllers");
18218
+ await Bun.write(join38(controllersDir, "CreateTagController.ts"), CreateTagController_default);
18219
+ await Bun.write(join38(controllersDir, "GetTagController.ts"), GetTagController_default);
18220
+ await Bun.write(join38(controllersDir, "ListTagsController.ts"), ListTagsController_default);
18221
+ await Bun.write(join38(controllersDir, "UpdateTagController.ts"), UpdateTagController_default);
18222
+ await Bun.write(join38(controllersDir, "DeleteTagController.ts"), DeleteTagController_default);
17725
18223
  const makeServiceCommand = new MakeServiceCommand;
17726
18224
  const services = ["CreateTag", "GetTag", "ListTags", "UpdateTag", "DeleteTag"];
17727
18225
  for (const name of services) {
17728
18226
  await makeServiceCommand.run({ name, module });
17729
18227
  }
17730
- const servicesDir = join37(process.cwd(), base, "src", "services");
17731
- await Bun.write(join37(servicesDir, "CreateTagService.ts"), CreateTagService_default);
17732
- await Bun.write(join37(servicesDir, "GetTagService.ts"), GetTagService_default);
17733
- await Bun.write(join37(servicesDir, "ListTagsService.ts"), ListTagsService_default);
17734
- await Bun.write(join37(servicesDir, "UpdateTagService.ts"), UpdateTagService_default);
17735
- await Bun.write(join37(servicesDir, "DeleteTagService.ts"), DeleteTagService_default);
17736
- const entityPath = join37(process.cwd(), base, "src", "entities", "TagEntity.ts");
18228
+ const servicesDir = join38(process.cwd(), base, "src", "services");
18229
+ await Bun.write(join38(servicesDir, "CreateTagService.ts"), CreateTagService_default);
18230
+ await Bun.write(join38(servicesDir, "GetTagService.ts"), GetTagService_default);
18231
+ await Bun.write(join38(servicesDir, "ListTagsService.ts"), ListTagsService_default);
18232
+ await Bun.write(join38(servicesDir, "UpdateTagService.ts"), UpdateTagService_default);
18233
+ await Bun.write(join38(servicesDir, "DeleteTagService.ts"), DeleteTagService_default);
18234
+ const entityPath = join38(process.cwd(), base, "src", "entities", "TagEntity.ts");
17737
18235
  await Bun.write(entityPath, TagEntity_default);
17738
- const migrationsDir = join37(process.cwd(), base, "src", "migrations");
18236
+ const migrationsDir = join38(process.cwd(), base, "src", "migrations");
17739
18237
  const glob = new Glob10("Migration*.ts");
17740
18238
  for await (const file of glob.scan(migrationsDir)) {
17741
18239
  if (file === "migrations.ts")
@@ -17743,18 +18241,18 @@ class MakeResourceTagCommand {
17743
18241
  const name = file.replace(/\.ts$/, "");
17744
18242
  const version = name.replace("Migration", "");
17745
18243
  const content = TagMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
17746
- await Bun.write(join37(migrationsDir, file), content);
18244
+ await Bun.write(join38(migrationsDir, file), content);
17747
18245
  }
17748
- const repositoryPath = join37(process.cwd(), base, "src", "repositories", "TagRepository.ts");
18246
+ const repositoryPath = join38(process.cwd(), base, "src", "repositories", "TagRepository.ts");
17749
18247
  await Bun.write(repositoryPath, TagRepository_default);
17750
18248
  }
17751
18249
  }
17752
18250
  MakeResourceTagCommand = __legacyDecorateClassTS([
17753
- decorator37.command()
18251
+ decorator38.command()
17754
18252
  ], MakeResourceTagCommand);
17755
18253
  // src/commands/MakeResourceTaskCommand.ts
17756
- import { join as join38 } from "path";
17757
- import { decorator as decorator38 } from "@ooneex/command";
18254
+ import { join as join39 } from "path";
18255
+ import { decorator as decorator39 } from "@ooneex/command";
17758
18256
  var {Glob: Glob11 } = globalThis.Bun;
17759
18257
 
17760
18258
  // src/templates/resources/task/controllers/CreateTaskController.txt
@@ -18427,9 +18925,9 @@ class MakeResourceTaskCommand {
18427
18925
  }
18428
18926
  async run() {
18429
18927
  const module = "task";
18430
- const base = join38("modules", module);
18928
+ const base = join39("modules", module);
18431
18929
  const makeModuleCommand = new MakeModuleCommand;
18432
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
18930
+ await makeModuleCommand.run({ name: module, silent: true });
18433
18931
  const makeEntityCommand = new MakeEntityCommand;
18434
18932
  await makeEntityCommand.run({ name: "Task", module, tableName: "tasks" });
18435
18933
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -18462,26 +18960,26 @@ class MakeResourceTaskCommand {
18462
18960
  for (const controller of controllers) {
18463
18961
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
18464
18962
  }
18465
- const controllersDir = join38(process.cwd(), base, "src", "controllers");
18466
- await Bun.write(join38(controllersDir, "CreateTaskController.ts"), CreateTaskController_default);
18467
- await Bun.write(join38(controllersDir, "GetTaskController.ts"), GetTaskController_default);
18468
- await Bun.write(join38(controllersDir, "ListTasksController.ts"), ListTasksController_default);
18469
- await Bun.write(join38(controllersDir, "UpdateTaskController.ts"), UpdateTaskController_default);
18470
- await Bun.write(join38(controllersDir, "DeleteTaskController.ts"), DeleteTaskController_default);
18963
+ const controllersDir = join39(process.cwd(), base, "src", "controllers");
18964
+ await Bun.write(join39(controllersDir, "CreateTaskController.ts"), CreateTaskController_default);
18965
+ await Bun.write(join39(controllersDir, "GetTaskController.ts"), GetTaskController_default);
18966
+ await Bun.write(join39(controllersDir, "ListTasksController.ts"), ListTasksController_default);
18967
+ await Bun.write(join39(controllersDir, "UpdateTaskController.ts"), UpdateTaskController_default);
18968
+ await Bun.write(join39(controllersDir, "DeleteTaskController.ts"), DeleteTaskController_default);
18471
18969
  const makeServiceCommand = new MakeServiceCommand;
18472
18970
  const services = ["CreateTask", "GetTask", "ListTasks", "UpdateTask", "DeleteTask"];
18473
18971
  for (const name of services) {
18474
18972
  await makeServiceCommand.run({ name, module });
18475
18973
  }
18476
- const servicesDir = join38(process.cwd(), base, "src", "services");
18477
- await Bun.write(join38(servicesDir, "CreateTaskService.ts"), CreateTaskService_default);
18478
- await Bun.write(join38(servicesDir, "GetTaskService.ts"), GetTaskService_default);
18479
- await Bun.write(join38(servicesDir, "ListTasksService.ts"), ListTasksService_default);
18480
- await Bun.write(join38(servicesDir, "UpdateTaskService.ts"), UpdateTaskService_default);
18481
- await Bun.write(join38(servicesDir, "DeleteTaskService.ts"), DeleteTaskService_default);
18482
- const entityPath = join38(process.cwd(), base, "src", "entities", "TaskEntity.ts");
18974
+ const servicesDir = join39(process.cwd(), base, "src", "services");
18975
+ await Bun.write(join39(servicesDir, "CreateTaskService.ts"), CreateTaskService_default);
18976
+ await Bun.write(join39(servicesDir, "GetTaskService.ts"), GetTaskService_default);
18977
+ await Bun.write(join39(servicesDir, "ListTasksService.ts"), ListTasksService_default);
18978
+ await Bun.write(join39(servicesDir, "UpdateTaskService.ts"), UpdateTaskService_default);
18979
+ await Bun.write(join39(servicesDir, "DeleteTaskService.ts"), DeleteTaskService_default);
18980
+ const entityPath = join39(process.cwd(), base, "src", "entities", "TaskEntity.ts");
18483
18981
  await Bun.write(entityPath, TaskEntity_default);
18484
- const migrationsDir = join38(process.cwd(), base, "src", "migrations");
18982
+ const migrationsDir = join39(process.cwd(), base, "src", "migrations");
18485
18983
  const glob = new Glob11("Migration*.ts");
18486
18984
  for await (const file of glob.scan(migrationsDir)) {
18487
18985
  if (file === "migrations.ts")
@@ -18489,18 +18987,18 @@ class MakeResourceTaskCommand {
18489
18987
  const name = file.replace(/\.ts$/, "");
18490
18988
  const version = name.replace("Migration", "");
18491
18989
  const content = TaskMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
18492
- await Bun.write(join38(migrationsDir, file), content);
18990
+ await Bun.write(join39(migrationsDir, file), content);
18493
18991
  }
18494
- const repositoryPath = join38(process.cwd(), base, "src", "repositories", "TaskRepository.ts");
18992
+ const repositoryPath = join39(process.cwd(), base, "src", "repositories", "TaskRepository.ts");
18495
18993
  await Bun.write(repositoryPath, TaskRepository_default);
18496
18994
  }
18497
18995
  }
18498
18996
  MakeResourceTaskCommand = __legacyDecorateClassTS([
18499
- decorator38.command()
18997
+ decorator39.command()
18500
18998
  ], MakeResourceTaskCommand);
18501
18999
  // src/commands/MakeResourceTopicCommand.ts
18502
- import { join as join39 } from "path";
18503
- import { decorator as decorator39 } from "@ooneex/command";
19000
+ import { join as join40 } from "path";
19001
+ import { decorator as decorator40 } from "@ooneex/command";
18504
19002
  var {Glob: Glob12 } = globalThis.Bun;
18505
19003
 
18506
19004
  // src/templates/resources/topic/controllers/CreateTopicController.txt
@@ -19091,9 +19589,9 @@ class MakeResourceTopicCommand {
19091
19589
  }
19092
19590
  async run() {
19093
19591
  const module = "topic";
19094
- const base = join39("modules", module);
19592
+ const base = join40("modules", module);
19095
19593
  const makeModuleCommand = new MakeModuleCommand;
19096
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
19594
+ await makeModuleCommand.run({ name: module, silent: true });
19097
19595
  const makeEntityCommand = new MakeEntityCommand;
19098
19596
  await makeEntityCommand.run({ name: "Topic", module, tableName: "topics" });
19099
19597
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -19126,26 +19624,26 @@ class MakeResourceTopicCommand {
19126
19624
  for (const controller of controllers) {
19127
19625
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
19128
19626
  }
19129
- const controllersDir = join39(process.cwd(), base, "src", "controllers");
19130
- await Bun.write(join39(controllersDir, "CreateTopicController.ts"), CreateTopicController_default);
19131
- await Bun.write(join39(controllersDir, "GetTopicController.ts"), GetTopicController_default);
19132
- await Bun.write(join39(controllersDir, "ListTopicsController.ts"), ListTopicsController_default);
19133
- await Bun.write(join39(controllersDir, "UpdateTopicController.ts"), UpdateTopicController_default);
19134
- await Bun.write(join39(controllersDir, "DeleteTopicController.ts"), DeleteTopicController_default);
19627
+ const controllersDir = join40(process.cwd(), base, "src", "controllers");
19628
+ await Bun.write(join40(controllersDir, "CreateTopicController.ts"), CreateTopicController_default);
19629
+ await Bun.write(join40(controllersDir, "GetTopicController.ts"), GetTopicController_default);
19630
+ await Bun.write(join40(controllersDir, "ListTopicsController.ts"), ListTopicsController_default);
19631
+ await Bun.write(join40(controllersDir, "UpdateTopicController.ts"), UpdateTopicController_default);
19632
+ await Bun.write(join40(controllersDir, "DeleteTopicController.ts"), DeleteTopicController_default);
19135
19633
  const makeServiceCommand = new MakeServiceCommand;
19136
19634
  const services = ["CreateTopic", "GetTopic", "ListTopics", "UpdateTopic", "DeleteTopic"];
19137
19635
  for (const name of services) {
19138
19636
  await makeServiceCommand.run({ name, module });
19139
19637
  }
19140
- const servicesDir = join39(process.cwd(), base, "src", "services");
19141
- await Bun.write(join39(servicesDir, "CreateTopicService.ts"), CreateTopicService_default);
19142
- await Bun.write(join39(servicesDir, "GetTopicService.ts"), GetTopicService_default);
19143
- await Bun.write(join39(servicesDir, "ListTopicsService.ts"), ListTopicsService_default);
19144
- await Bun.write(join39(servicesDir, "UpdateTopicService.ts"), UpdateTopicService_default);
19145
- await Bun.write(join39(servicesDir, "DeleteTopicService.ts"), DeleteTopicService_default);
19146
- const entityPath = join39(process.cwd(), base, "src", "entities", "TopicEntity.ts");
19638
+ const servicesDir = join40(process.cwd(), base, "src", "services");
19639
+ await Bun.write(join40(servicesDir, "CreateTopicService.ts"), CreateTopicService_default);
19640
+ await Bun.write(join40(servicesDir, "GetTopicService.ts"), GetTopicService_default);
19641
+ await Bun.write(join40(servicesDir, "ListTopicsService.ts"), ListTopicsService_default);
19642
+ await Bun.write(join40(servicesDir, "UpdateTopicService.ts"), UpdateTopicService_default);
19643
+ await Bun.write(join40(servicesDir, "DeleteTopicService.ts"), DeleteTopicService_default);
19644
+ const entityPath = join40(process.cwd(), base, "src", "entities", "TopicEntity.ts");
19147
19645
  await Bun.write(entityPath, TopicEntity_default);
19148
- const migrationsDir = join39(process.cwd(), base, "src", "migrations");
19646
+ const migrationsDir = join40(process.cwd(), base, "src", "migrations");
19149
19647
  const glob = new Glob12("Migration*.ts");
19150
19648
  for await (const file of glob.scan(migrationsDir)) {
19151
19649
  if (file === "migrations.ts")
@@ -19153,18 +19651,18 @@ class MakeResourceTopicCommand {
19153
19651
  const name = file.replace(/\.ts$/, "");
19154
19652
  const version = name.replace("Migration", "");
19155
19653
  const content = TopicMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
19156
- await Bun.write(join39(migrationsDir, file), content);
19654
+ await Bun.write(join40(migrationsDir, file), content);
19157
19655
  }
19158
- const repositoryPath = join39(process.cwd(), base, "src", "repositories", "TopicRepository.ts");
19656
+ const repositoryPath = join40(process.cwd(), base, "src", "repositories", "TopicRepository.ts");
19159
19657
  await Bun.write(repositoryPath, TopicRepository_default);
19160
19658
  }
19161
19659
  }
19162
19660
  MakeResourceTopicCommand = __legacyDecorateClassTS([
19163
- decorator39.command()
19661
+ decorator40.command()
19164
19662
  ], MakeResourceTopicCommand);
19165
19663
  // src/commands/MakeResourceUserCommand.ts
19166
- import { join as join40 } from "path";
19167
- import { decorator as decorator40 } from "@ooneex/command";
19664
+ import { join as join41 } from "path";
19665
+ import { decorator as decorator41 } from "@ooneex/command";
19168
19666
  var {Glob: Glob13 } = globalThis.Bun;
19169
19667
 
19170
19668
  // src/templates/resources/user/controllers/BanUserController.txt
@@ -19833,7 +20331,13 @@ export class UserRepository {
19833
20331
  }
19834
20332
 
19835
20333
  public async find(
19836
- criteria: FindManyOptions<UserEntity> & { page?: number; limit?: number; order?: "ASC" | "DESC"; orderBy?: string; q?: string },
20334
+ criteria: FindManyOptions<UserEntity> & {
20335
+ page?: number;
20336
+ limit?: number;
20337
+ order?: "ASC" | "DESC";
20338
+ orderBy?: string;
20339
+ q?: string;
20340
+ },
19837
20341
  ): Promise<FilterResultType<UserEntity>> {
19838
20342
  const repository = await this.open();
19839
20343
 
@@ -19855,21 +20359,21 @@ export class UserRepository {
19855
20359
  if (q) {
19856
20360
  findOptions = {
19857
20361
  ...findOptions,
19858
- where: {
19859
- ...rest.where,
19860
- name: ILike(\`%\${q}%\`),
19861
- },
20362
+ where: [
20363
+ { ...rest.where, firstName: ILike(\`%\${q}%\`) },
20364
+ { ...rest.where, lastName: ILike(\`%\${q}%\`) },
20365
+ ] as FindOptionsWhere<UserEntity>[],
19862
20366
  };
19863
20367
  }
19864
20368
 
19865
20369
  const result = await repository.find(findOptions);
19866
20370
 
19867
- let countWhere = rest.where;
20371
+ let countWhere: FindOptionsWhere<UserEntity> | FindOptionsWhere<UserEntity>[] | undefined = rest.where;
19868
20372
  if (q) {
19869
- countWhere = {
19870
- ...rest.where,
19871
- name: ILike(\`%\${q}%\`),
19872
- };
20373
+ countWhere = [
20374
+ { ...rest.where, firstName: ILike(\`%\${q}%\`) },
20375
+ { ...rest.where, lastName: ILike(\`%\${q}%\`) },
20376
+ ] as FindOptionsWhere<UserEntity>[];
19873
20377
  }
19874
20378
 
19875
20379
  const total = await this.count(countWhere);
@@ -19924,9 +20428,7 @@ export class UserRepository {
19924
20428
  return await Promise.all(entities.map((entity) => repository.update(entity.id, entity)));
19925
20429
  }
19926
20430
 
19927
- public async delete(
19928
- criteria: FindOptionsWhere<UserEntity> | FindOptionsWhere<UserEntity>[],
19929
- ): Promise<UpdateResult> {
20431
+ public async delete(criteria: FindOptionsWhere<UserEntity> | FindOptionsWhere<UserEntity>[]): Promise<UpdateResult> {
19930
20432
  const repository = await this.open();
19931
20433
 
19932
20434
  return await repository.softDelete(criteria);
@@ -19956,7 +20458,7 @@ export class UserRepository {
19956
20458
 
19957
20459
  public async updateProfile(
19958
20460
  userId: string,
19959
- profile: { lastName?: string; firstName?: string; avatar?: string; phone?: string },
20461
+ profile: { lastName?: string; firstName?: string; avatar?: string | null; phone?: string },
19960
20462
  ): Promise<UpdateResult> {
19961
20463
  return await this.update({ id: userId, ...profile });
19962
20464
  }
@@ -19981,9 +20483,9 @@ class MakeResourceUserCommand {
19981
20483
  }
19982
20484
  async run() {
19983
20485
  const module = "user";
19984
- const base = join40("modules", module);
20486
+ const base = join41("modules", module);
19985
20487
  const makeModuleCommand = new MakeModuleCommand;
19986
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
20488
+ await makeModuleCommand.run({ name: module, silent: true });
19987
20489
  const makeEntityCommand = new MakeEntityCommand;
19988
20490
  await makeEntityCommand.run({ name: "User", module, tableName: "users" });
19989
20491
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -20032,14 +20534,14 @@ class MakeResourceUserCommand {
20032
20534
  for (const controller of controllers) {
20033
20535
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
20034
20536
  }
20035
- const controllersDir = join40(process.cwd(), base, "src", "controllers");
20036
- await Bun.write(join40(controllersDir, "BanUserController.ts"), BanUserController_default);
20037
- await Bun.write(join40(controllersDir, "LockUserController.ts"), LockUserController_default);
20038
- await Bun.write(join40(controllersDir, "SignOutController.ts"), SignOutController_default);
20039
- await Bun.write(join40(controllersDir, "UpdateUserProfileController.ts"), UpdateUserProfileController_default);
20040
- await Bun.write(join40(controllersDir, "UpdateUserProfileImageController.ts"), UpdateUserProfileImageController_default);
20041
- await Bun.write(join40(controllersDir, "DeleteUserProfileImageController.ts"), DeleteUserProfileImageController_default);
20042
- await Bun.write(join40(controllersDir, "UpdateUserRolesController.ts"), UpdateUserRolesController_default);
20537
+ const controllersDir = join41(process.cwd(), base, "src", "controllers");
20538
+ await Bun.write(join41(controllersDir, "BanUserController.ts"), BanUserController_default);
20539
+ await Bun.write(join41(controllersDir, "LockUserController.ts"), LockUserController_default);
20540
+ await Bun.write(join41(controllersDir, "SignOutController.ts"), SignOutController_default);
20541
+ await Bun.write(join41(controllersDir, "UpdateUserProfileController.ts"), UpdateUserProfileController_default);
20542
+ await Bun.write(join41(controllersDir, "UpdateUserProfileImageController.ts"), UpdateUserProfileImageController_default);
20543
+ await Bun.write(join41(controllersDir, "DeleteUserProfileImageController.ts"), DeleteUserProfileImageController_default);
20544
+ await Bun.write(join41(controllersDir, "UpdateUserRolesController.ts"), UpdateUserRolesController_default);
20043
20545
  const makeServiceCommand = new MakeServiceCommand;
20044
20546
  const services = [
20045
20547
  "BanUser",
@@ -20053,17 +20555,17 @@ class MakeResourceUserCommand {
20053
20555
  for (const name of services) {
20054
20556
  await makeServiceCommand.run({ name, module });
20055
20557
  }
20056
- const servicesDir = join40(process.cwd(), base, "src", "services");
20057
- await Bun.write(join40(servicesDir, "BanUserService.ts"), BanUserService_default);
20058
- await Bun.write(join40(servicesDir, "LockUserService.ts"), LockUserService_default);
20059
- await Bun.write(join40(servicesDir, "SignOutService.ts"), SignOutService_default);
20060
- await Bun.write(join40(servicesDir, "UpdateUserProfileService.ts"), UpdateUserProfileService_default);
20061
- await Bun.write(join40(servicesDir, "UpdateUserProfileImageService.ts"), UpdateUserProfileImageService_default);
20062
- await Bun.write(join40(servicesDir, "DeleteUserProfileImageService.ts"), DeleteUserProfileImageService_default);
20063
- await Bun.write(join40(servicesDir, "UpdateUserRolesService.ts"), UpdateUserRolesService_default);
20064
- const entityPath = join40(process.cwd(), base, "src", "entities", "UserEntity.ts");
20558
+ const servicesDir = join41(process.cwd(), base, "src", "services");
20559
+ await Bun.write(join41(servicesDir, "BanUserService.ts"), BanUserService_default);
20560
+ await Bun.write(join41(servicesDir, "LockUserService.ts"), LockUserService_default);
20561
+ await Bun.write(join41(servicesDir, "SignOutService.ts"), SignOutService_default);
20562
+ await Bun.write(join41(servicesDir, "UpdateUserProfileService.ts"), UpdateUserProfileService_default);
20563
+ await Bun.write(join41(servicesDir, "UpdateUserProfileImageService.ts"), UpdateUserProfileImageService_default);
20564
+ await Bun.write(join41(servicesDir, "DeleteUserProfileImageService.ts"), DeleteUserProfileImageService_default);
20565
+ await Bun.write(join41(servicesDir, "UpdateUserRolesService.ts"), UpdateUserRolesService_default);
20566
+ const entityPath = join41(process.cwd(), base, "src", "entities", "UserEntity.ts");
20065
20567
  await Bun.write(entityPath, UserEntity_default);
20066
- const migrationsDir = join40(process.cwd(), base, "src", "migrations");
20568
+ const migrationsDir = join41(process.cwd(), base, "src", "migrations");
20067
20569
  const glob = new Glob13("Migration*.ts");
20068
20570
  for await (const file of glob.scan(migrationsDir)) {
20069
20571
  if (file === "migrations.ts")
@@ -20071,18 +20573,18 @@ class MakeResourceUserCommand {
20071
20573
  const name = file.replace(/\.ts$/, "");
20072
20574
  const version = name.replace("Migration", "");
20073
20575
  const content = UserMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
20074
- await Bun.write(join40(migrationsDir, file), content);
20576
+ await Bun.write(join41(migrationsDir, file), content);
20075
20577
  }
20076
- const repositoryPath = join40(process.cwd(), base, "src", "repositories", "UserRepository.ts");
20578
+ const repositoryPath = join41(process.cwd(), base, "src", "repositories", "UserRepository.ts");
20077
20579
  await Bun.write(repositoryPath, UserRepository_default);
20078
20580
  }
20079
20581
  }
20080
20582
  MakeResourceUserCommand = __legacyDecorateClassTS([
20081
- decorator40.command()
20583
+ decorator41.command()
20082
20584
  ], MakeResourceUserCommand);
20083
20585
  // src/commands/MakeResourceVideoCommand.ts
20084
- import { join as join41 } from "path";
20085
- import { decorator as decorator41 } from "@ooneex/command";
20586
+ import { join as join42 } from "path";
20587
+ import { decorator as decorator42 } from "@ooneex/command";
20086
20588
  var {Glob: Glob14 } = globalThis.Bun;
20087
20589
 
20088
20590
  // src/templates/resources/video/controllers/CreateVideoController.txt
@@ -20761,9 +21263,9 @@ class MakeResourceVideoCommand {
20761
21263
  }
20762
21264
  async run() {
20763
21265
  const module = "video";
20764
- const base = join41("modules", module);
21266
+ const base = join42("modules", module);
20765
21267
  const makeModuleCommand = new MakeModuleCommand;
20766
- await makeModuleCommand.run({ name: module, silent: true, skipMigrations: false, skipSeeds: true });
21268
+ await makeModuleCommand.run({ name: module, silent: true });
20767
21269
  const makeEntityCommand = new MakeEntityCommand;
20768
21270
  await makeEntityCommand.run({ name: "Video", module, tableName: "videos" });
20769
21271
  const makeMigrationCommand = new MakeMigrationCommand;
@@ -20796,26 +21298,26 @@ class MakeResourceVideoCommand {
20796
21298
  for (const controller of controllers) {
20797
21299
  await makeControllerCommand.run({ ...controller, module, isSocket: false });
20798
21300
  }
20799
- const controllersDir = join41(process.cwd(), base, "src", "controllers");
20800
- await Bun.write(join41(controllersDir, "CreateVideoController.ts"), CreateVideoController_default);
20801
- await Bun.write(join41(controllersDir, "GetVideoController.ts"), GetVideoController_default);
20802
- await Bun.write(join41(controllersDir, "ListVideosController.ts"), ListVideosController_default);
20803
- await Bun.write(join41(controllersDir, "UpdateVideoController.ts"), UpdateVideoController_default);
20804
- await Bun.write(join41(controllersDir, "DeleteVideoController.ts"), DeleteVideoController_default);
21301
+ const controllersDir = join42(process.cwd(), base, "src", "controllers");
21302
+ await Bun.write(join42(controllersDir, "CreateVideoController.ts"), CreateVideoController_default);
21303
+ await Bun.write(join42(controllersDir, "GetVideoController.ts"), GetVideoController_default);
21304
+ await Bun.write(join42(controllersDir, "ListVideosController.ts"), ListVideosController_default);
21305
+ await Bun.write(join42(controllersDir, "UpdateVideoController.ts"), UpdateVideoController_default);
21306
+ await Bun.write(join42(controllersDir, "DeleteVideoController.ts"), DeleteVideoController_default);
20805
21307
  const makeServiceCommand = new MakeServiceCommand;
20806
21308
  const services = ["CreateVideo", "GetVideo", "ListVideos", "UpdateVideo", "DeleteVideo"];
20807
21309
  for (const name of services) {
20808
21310
  await makeServiceCommand.run({ name, module });
20809
21311
  }
20810
- const servicesDir = join41(process.cwd(), base, "src", "services");
20811
- await Bun.write(join41(servicesDir, "CreateVideoService.ts"), CreateVideoService_default);
20812
- await Bun.write(join41(servicesDir, "GetVideoService.ts"), GetVideoService_default);
20813
- await Bun.write(join41(servicesDir, "ListVideosService.ts"), ListVideosService_default);
20814
- await Bun.write(join41(servicesDir, "UpdateVideoService.ts"), UpdateVideoService_default);
20815
- await Bun.write(join41(servicesDir, "DeleteVideoService.ts"), DeleteVideoService_default);
20816
- const entityPath = join41(process.cwd(), base, "src", "entities", "VideoEntity.ts");
21312
+ const servicesDir = join42(process.cwd(), base, "src", "services");
21313
+ await Bun.write(join42(servicesDir, "CreateVideoService.ts"), CreateVideoService_default);
21314
+ await Bun.write(join42(servicesDir, "GetVideoService.ts"), GetVideoService_default);
21315
+ await Bun.write(join42(servicesDir, "ListVideosService.ts"), ListVideosService_default);
21316
+ await Bun.write(join42(servicesDir, "UpdateVideoService.ts"), UpdateVideoService_default);
21317
+ await Bun.write(join42(servicesDir, "DeleteVideoService.ts"), DeleteVideoService_default);
21318
+ const entityPath = join42(process.cwd(), base, "src", "entities", "VideoEntity.ts");
20817
21319
  await Bun.write(entityPath, VideoEntity_default);
20818
- const migrationsDir = join41(process.cwd(), base, "src", "migrations");
21320
+ const migrationsDir = join42(process.cwd(), base, "src", "migrations");
20819
21321
  const glob = new Glob14("Migration*.ts");
20820
21322
  for await (const file of glob.scan(migrationsDir)) {
20821
21323
  if (file === "migrations.ts")
@@ -20823,19 +21325,19 @@ class MakeResourceVideoCommand {
20823
21325
  const name = file.replace(/\.ts$/, "");
20824
21326
  const version = name.replace("Migration", "");
20825
21327
  const content = VideoMigration_default.replaceAll("{{ name }}", name).replaceAll("{{ version }}", version);
20826
- await Bun.write(join41(migrationsDir, file), content);
21328
+ await Bun.write(join42(migrationsDir, file), content);
20827
21329
  }
20828
- const repositoryPath = join41(process.cwd(), base, "src", "repositories", "VideoRepository.ts");
21330
+ const repositoryPath = join42(process.cwd(), base, "src", "repositories", "VideoRepository.ts");
20829
21331
  await Bun.write(repositoryPath, VideoRepository_default);
20830
21332
  }
20831
21333
  }
20832
21334
  MakeResourceVideoCommand = __legacyDecorateClassTS([
20833
- decorator41.command()
21335
+ decorator42.command()
20834
21336
  ], MakeResourceVideoCommand);
20835
21337
  // src/commands/MakeStorageCommand.ts
20836
- import { join as join42 } from "path";
20837
- import { decorator as decorator42 } from "@ooneex/command";
20838
- import { TerminalLogger as TerminalLogger27 } from "@ooneex/logger";
21338
+ import { join as join43 } from "path";
21339
+ import { decorator as decorator43 } from "@ooneex/command";
21340
+ import { TerminalLogger as TerminalLogger28 } from "@ooneex/logger";
20839
21341
  import { toPascalCase as toPascalCase16, toSnakeCase as toSnakeCase3 } from "@ooneex/utils";
20840
21342
 
20841
21343
  // src/templates/storage.test.txt
@@ -20935,28 +21437,28 @@ class MakeStorageCommand {
20935
21437
  if (module) {
20936
21438
  await ensureModule(module);
20937
21439
  }
20938
- const base = module ? join42("modules", module) : ".";
20939
- const storageLocalDir = join42(base, "src", "storage");
20940
- const storageDir = join42(process.cwd(), storageLocalDir);
20941
- const filePath = join42(storageDir, `${name}Storage.ts`);
21440
+ const base = module ? join43("modules", module) : ".";
21441
+ const storageLocalDir = join43(base, "src", "storage");
21442
+ const storageDir = join43(process.cwd(), storageLocalDir);
21443
+ const filePath = join43(storageDir, `${name}Storage.ts`);
20942
21444
  await Bun.write(filePath, content);
20943
21445
  const testContent = storage_test_default.replace(/{{NAME}}/g, name);
20944
- const testsLocalDir = join42(base, "tests", "storage");
20945
- const testsDir = join42(process.cwd(), testsLocalDir);
20946
- const testFilePath = join42(testsDir, `${name}Storage.spec.ts`);
21446
+ const testsLocalDir = join43(base, "tests", "storage");
21447
+ const testsDir = join43(process.cwd(), testsLocalDir);
21448
+ const testFilePath = join43(testsDir, `${name}Storage.spec.ts`);
20947
21449
  await Bun.write(testFilePath, testContent);
20948
- const logger = new TerminalLogger27;
20949
- logger.success(`${join42(storageLocalDir, name)}Storage.ts created successfully`, undefined, {
21450
+ const logger = new TerminalLogger28;
21451
+ logger.success(`${join43(storageLocalDir, name)}Storage.ts created successfully`, undefined, {
20950
21452
  showTimestamp: false,
20951
21453
  showArrow: false,
20952
21454
  useSymbol: true
20953
21455
  });
20954
- logger.success(`${join42(testsLocalDir, name)}Storage.spec.ts created successfully`, undefined, {
21456
+ logger.success(`${join43(testsLocalDir, name)}Storage.spec.ts created successfully`, undefined, {
20955
21457
  showTimestamp: false,
20956
21458
  showArrow: false,
20957
21459
  useSymbol: true
20958
21460
  });
20959
- const packageJsonPath = join42(process.cwd(), "package.json");
21461
+ const packageJsonPath = join43(process.cwd(), "package.json");
20960
21462
  const packageJson = await Bun.file(packageJsonPath).json();
20961
21463
  const deps = packageJson.dependencies ?? {};
20962
21464
  const devDeps = packageJson.devDependencies ?? {};
@@ -20971,12 +21473,12 @@ class MakeStorageCommand {
20971
21473
  }
20972
21474
  }
20973
21475
  MakeStorageCommand = __legacyDecorateClassTS([
20974
- decorator42.command()
21476
+ decorator43.command()
20975
21477
  ], MakeStorageCommand);
20976
21478
  // src/commands/MakeVectorDatabaseCommand.ts
20977
- import { join as join43 } from "path";
20978
- import { decorator as decorator43 } from "@ooneex/command";
20979
- import { TerminalLogger as TerminalLogger28 } from "@ooneex/logger";
21479
+ import { join as join44 } from "path";
21480
+ import { decorator as decorator44 } from "@ooneex/command";
21481
+ import { TerminalLogger as TerminalLogger29 } from "@ooneex/logger";
20980
21482
  import { toPascalCase as toPascalCase17 } from "@ooneex/utils";
20981
21483
 
20982
21484
  // src/templates/vector-database.test.txt
@@ -21050,28 +21552,28 @@ class MakeVectorDatabaseCommand {
21050
21552
  if (module) {
21051
21553
  await ensureModule(module);
21052
21554
  }
21053
- const base = module ? join43("modules", module) : ".";
21054
- const vectorDatabaseLocalDir = join43(base, "src", "databases");
21055
- const vectorDatabaseDir = join43(process.cwd(), vectorDatabaseLocalDir);
21056
- const filePath = join43(vectorDatabaseDir, `${name}VectorDatabase.ts`);
21555
+ const base = module ? join44("modules", module) : ".";
21556
+ const vectorDatabaseLocalDir = join44(base, "src", "databases");
21557
+ const vectorDatabaseDir = join44(process.cwd(), vectorDatabaseLocalDir);
21558
+ const filePath = join44(vectorDatabaseDir, `${name}VectorDatabase.ts`);
21057
21559
  await Bun.write(filePath, content);
21058
21560
  const testContent = vector_database_test_default.replace(/{{NAME}}/g, name);
21059
- const testsLocalDir = join43(base, "tests", "databases");
21060
- const testsDir = join43(process.cwd(), testsLocalDir);
21061
- const testFilePath = join43(testsDir, `${name}VectorDatabase.spec.ts`);
21561
+ const testsLocalDir = join44(base, "tests", "databases");
21562
+ const testsDir = join44(process.cwd(), testsLocalDir);
21563
+ const testFilePath = join44(testsDir, `${name}VectorDatabase.spec.ts`);
21062
21564
  await Bun.write(testFilePath, testContent);
21063
- const logger = new TerminalLogger28;
21064
- logger.success(`${join43(vectorDatabaseLocalDir, name)}VectorDatabase.ts created successfully`, undefined, {
21565
+ const logger = new TerminalLogger29;
21566
+ logger.success(`${join44(vectorDatabaseLocalDir, name)}VectorDatabase.ts created successfully`, undefined, {
21065
21567
  showTimestamp: false,
21066
21568
  showArrow: false,
21067
21569
  useSymbol: true
21068
21570
  });
21069
- logger.success(`${join43(testsLocalDir, name)}VectorDatabase.spec.ts created successfully`, undefined, {
21571
+ logger.success(`${join44(testsLocalDir, name)}VectorDatabase.spec.ts created successfully`, undefined, {
21070
21572
  showTimestamp: false,
21071
21573
  showArrow: false,
21072
21574
  useSymbol: true
21073
21575
  });
21074
- const packageJsonPath = join43(process.cwd(), "package.json");
21576
+ const packageJsonPath = join44(process.cwd(), "package.json");
21075
21577
  const packageJson = await Bun.file(packageJsonPath).json();
21076
21578
  const deps = packageJson.dependencies ?? {};
21077
21579
  const devDeps = packageJson.devDependencies ?? {};
@@ -21086,13 +21588,13 @@ class MakeVectorDatabaseCommand {
21086
21588
  }
21087
21589
  }
21088
21590
  MakeVectorDatabaseCommand = __legacyDecorateClassTS([
21089
- decorator43.command()
21591
+ decorator44.command()
21090
21592
  ], MakeVectorDatabaseCommand);
21091
21593
  // src/commands/MigrationUpCommand.ts
21092
- import { existsSync } from "fs";
21093
- import { join as join44 } from "path";
21094
- import { decorator as decorator44 } from "@ooneex/command";
21095
- import { TerminalLogger as TerminalLogger29 } from "@ooneex/logger";
21594
+ import { existsSync as existsSync2 } from "fs";
21595
+ import { join as join45 } from "path";
21596
+ import { decorator as decorator45 } from "@ooneex/command";
21597
+ import { TerminalLogger as TerminalLogger30 } from "@ooneex/logger";
21096
21598
  class MigrationUpCommand {
21097
21599
  getName() {
21098
21600
  return "migration:up";
@@ -21100,10 +21602,10 @@ class MigrationUpCommand {
21100
21602
  getDescription() {
21101
21603
  return "Run migrations for all modules";
21102
21604
  }
21103
- async run() {
21104
- const logger = new TerminalLogger29;
21105
- const modulesDir = join44(process.cwd(), "modules");
21106
- if (!existsSync(modulesDir)) {
21605
+ async run(options) {
21606
+ const logger = new TerminalLogger30;
21607
+ const modulesDir = join45(process.cwd(), "modules");
21608
+ if (!existsSync2(modulesDir)) {
21107
21609
  logger.warn("No modules with migrations found", undefined, {
21108
21610
  showTimestamp: false,
21109
21611
  showArrow: false,
@@ -21115,10 +21617,10 @@ class MigrationUpCommand {
21115
21617
  const modules = [];
21116
21618
  for await (const match of glob.scan({ cwd: modulesDir, onlyFiles: true })) {
21117
21619
  const entry = match.replace("/package.json", "");
21118
- const moduleDir = join44(modulesDir, entry);
21119
- const migrationUpFile = Bun.file(join44(moduleDir, "bin", "migration", "up.ts"));
21620
+ const moduleDir = join45(modulesDir, entry);
21621
+ const migrationUpFile = Bun.file(join45(moduleDir, "bin", "migration", "up.ts"));
21120
21622
  if (await migrationUpFile.exists()) {
21121
- const packageJson = await Bun.file(join44(modulesDir, match)).json();
21623
+ const packageJson = await Bun.file(join45(modulesDir, match)).json();
21122
21624
  modules.push({ name: packageJson.name ?? entry, dir: moduleDir });
21123
21625
  }
21124
21626
  }
@@ -21131,13 +21633,17 @@ class MigrationUpCommand {
21131
21633
  return;
21132
21634
  }
21133
21635
  for (const { name, dir } of modules) {
21134
- const migrationUpPath = join44(dir, "bin", "migration", "up.ts");
21636
+ const migrationUpPath = join45(dir, "bin", "migration", "up.ts");
21135
21637
  logger.info(`Running migrations for ${name}...`, undefined, {
21136
21638
  showTimestamp: false,
21137
21639
  showArrow: false,
21138
21640
  useSymbol: false
21139
21641
  });
21140
- const proc = Bun.spawn(["bun", "run", migrationUpPath], {
21642
+ const args = ["bun", "run", migrationUpPath];
21643
+ if (options.drop) {
21644
+ args.push("--drop");
21645
+ }
21646
+ const proc = Bun.spawn(args, {
21141
21647
  cwd: dir,
21142
21648
  stdout: "inherit",
21143
21649
  stderr: "inherit"
@@ -21160,13 +21666,13 @@ class MigrationUpCommand {
21160
21666
  }
21161
21667
  }
21162
21668
  MigrationUpCommand = __legacyDecorateClassTS([
21163
- decorator44.command()
21669
+ decorator45.command()
21164
21670
  ], MigrationUpCommand);
21165
21671
  // src/commands/SeedRunCommand.ts
21166
- import { existsSync as existsSync2 } from "fs";
21167
- import { join as join45 } from "path";
21168
- import { decorator as decorator45 } from "@ooneex/command";
21169
- import { TerminalLogger as TerminalLogger30 } from "@ooneex/logger";
21672
+ import { existsSync as existsSync3 } from "fs";
21673
+ import { join as join46 } from "path";
21674
+ import { decorator as decorator46 } from "@ooneex/command";
21675
+ import { TerminalLogger as TerminalLogger31 } from "@ooneex/logger";
21170
21676
  class SeedRunCommand {
21171
21677
  getName() {
21172
21678
  return "seed:run";
@@ -21174,10 +21680,10 @@ class SeedRunCommand {
21174
21680
  getDescription() {
21175
21681
  return "Run seeds for all modules";
21176
21682
  }
21177
- async run() {
21178
- const logger = new TerminalLogger30;
21179
- const modulesDir = join45(process.cwd(), "modules");
21180
- if (!existsSync2(modulesDir)) {
21683
+ async run(options) {
21684
+ const logger = new TerminalLogger31;
21685
+ const modulesDir = join46(process.cwd(), "modules");
21686
+ if (!existsSync3(modulesDir)) {
21181
21687
  logger.warn("No modules with seeds found", undefined, {
21182
21688
  showTimestamp: false,
21183
21689
  showArrow: false,
@@ -21189,10 +21695,10 @@ class SeedRunCommand {
21189
21695
  const modules = [];
21190
21696
  for await (const match of glob.scan({ cwd: modulesDir, onlyFiles: true })) {
21191
21697
  const entry = match.replace("/package.json", "");
21192
- const moduleDir = join45(modulesDir, entry);
21193
- const seedRunFile = Bun.file(join45(moduleDir, "bin", "seed", "run.ts"));
21698
+ const moduleDir = join46(modulesDir, entry);
21699
+ const seedRunFile = Bun.file(join46(moduleDir, "bin", "seed", "run.ts"));
21194
21700
  if (await seedRunFile.exists()) {
21195
- const packageJson = await Bun.file(join45(modulesDir, match)).json();
21701
+ const packageJson = await Bun.file(join46(modulesDir, match)).json();
21196
21702
  modules.push({ name: packageJson.name ?? entry, dir: moduleDir });
21197
21703
  }
21198
21704
  }
@@ -21205,13 +21711,17 @@ class SeedRunCommand {
21205
21711
  return;
21206
21712
  }
21207
21713
  for (const { name, dir } of modules) {
21208
- const seedRunPath = join45(dir, "bin", "seed", "run.ts");
21714
+ const seedRunPath = join46(dir, "bin", "seed", "run.ts");
21209
21715
  logger.info(`Running seeds for ${name}...`, undefined, {
21210
21716
  showTimestamp: false,
21211
21717
  showArrow: false,
21212
21718
  useSymbol: false
21213
21719
  });
21214
- const proc = Bun.spawn(["bun", "run", seedRunPath], {
21720
+ const args = ["bun", "run", seedRunPath];
21721
+ if (options.drop) {
21722
+ args.push("--drop");
21723
+ }
21724
+ const proc = Bun.spawn(args, {
21215
21725
  cwd: dir,
21216
21726
  stdout: "inherit",
21217
21727
  stderr: "inherit"
@@ -21234,9 +21744,9 @@ class SeedRunCommand {
21234
21744
  }
21235
21745
  }
21236
21746
  SeedRunCommand = __legacyDecorateClassTS([
21237
- decorator45.command()
21747
+ decorator46.command()
21238
21748
  ], SeedRunCommand);
21239
21749
  // src/index.ts
21240
21750
  await run();
21241
21751
 
21242
- //# debugId=F644FC22050EAEC964756E2164756E21
21752
+ //# debugId=B64B6C8BCD62B27464756E2164756E21