@ooneex/cli 0.3.0 → 0.4.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
@@ -869,26 +869,7 @@ export const {{NAME}}Module: ModuleType = {
869
869
  "scripts": {
870
870
  "test": "bun test tests",
871
871
  "build": "bunup",
872
- "lint": "tsgo --noEmit && bunx biome lint",
873
- "make:ai": "bunx ooneex make:ai",
874
- "make:analytics": "bunx ooneex make:analytics",
875
- "make:cache": "bunx ooneex make:cache",
876
- "make:controller": "bunx ooneex make:controller",
877
- "make:cron": "bunx ooneex make:cron",
878
- "make:crud": "bunx ooneex make:crud",
879
- "make:database": "bunx ooneex make:database",
880
- "make:docker": "bunx ooneex make:docker",
881
- "make:entity": "bunx ooneex make:entity",
882
- "make:logger": "bunx ooneex make:logger",
883
- "make:mailer": "bunx ooneex make:mailer",
884
- "make:middleware": "bunx ooneex make:middleware",
885
- "make:migration": "bunx ooneex make:migration",
886
- "make:permission": "bunx ooneex make:permission",
887
- "make:pubsub": "bunx ooneex make:pubsub",
888
- "make:repository": "bunx ooneex make:repository",
889
- "make:seed": "bunx ooneex make:seed",
890
- "make:service": "bunx ooneex make:service",
891
- "make:storage": "bunx ooneex make:storage"
872
+ "lint": "tsgo --noEmit && bunx biome lint"
892
873
  }
893
874
  }
894
875
  `;var Bs=`#!/usr/bin/env bun
@@ -923,7 +904,7 @@ describe("{{NAME}}Module", () => {
923
904
  "include": ["src/**/*.ts", "src/**/*.tsx", "tests/**/*.ts", "tests/**/*.tsx"],
924
905
  "exclude": ["node_modules", "dist"]
925
906
  }
926
- `;class T4{getName(){return"make:module"}getDescription(){return"Generate a new module"}async run(Y){let{cwd:X=process.cwd(),silent:$=!1,skipBin:Z=!1,skipMigrations:H=!1,skipSeeds:W=!1,bunupPackages:G="external"}=Y,{name:J}=Y;if(!J)J=await w0({message:"Enter module name"});let L=O0(J).replace(/Module$/,""),A=BX(L),E=gY(X,"modules",A),z=gY(E,"bin"),B=gY(E,"src"),D=gY(E,"tests"),U=Es.replace(/{{NAME}}/g,L),S=Ls.replace(/{{NAME}}/g,L),I=zs.replace(/{{NAME}}/g,A),R=Ds.replace(/{{NAME}}/g,L),F=Js.replace('packages: "external"',`packages: "${G}"`);if(await Bun.write(gY(E,"bunup.config.ts"),F),!Z)await Bun.write(gY(z,"migration","up.ts"),As),await Bun.write(gY(z,"seed","run.ts"),Bs);if(await Bun.write(gY(B,`${L}Module.ts`),U),await Bun.write(gY(B,"index.ts"),S),!H)await Bun.write(gY(B,"migrations","migrations.ts"),"");if(!W)await Bun.write(gY(B,"seeds","seeds.ts"),"");if(await Bun.write(gY(E,"package.json"),I),await Bun.write(gY(E,"tsconfig.json"),Us),await Bun.write(gY(D,`${L}Module.spec.ts`),R),!$)new R0().success(`modules/${A} created successfully`,void 0,{showTimestamp:!1,showArrow:!1,useSymbol:!0})}}T4=I0([P0.command()],T4);class tH{getName(){return"make:app"}getDescription(){return"Generate a new application"}async run(Y){let{name:X,destination:$}=Y;if(!X)X=await w0({message:"Enter application name"});let Z=BX(X);if(!$)$=await au({message:"Enter destination path",initial:Z});let H=Ws.replace(/{{NAME}}/g,Z);await Bun.write(A6($,".commitlintrc.ts"),eu),await Bun.write(A6($,".gitignore"),Ys),await Bun.write(A6($,"biome.jsonc"),Xs),await Bun.write(A6($,"bunfig.toml"),$s),await Bun.write(A6($,"nx.json"),Hs),await Bun.write(A6($,"package.json"),H),await Bun.write(A6($,"tsconfig.json"),Gs),await new T4().run({name:"app",cwd:$,silent:!0,skipBin:!0,skipMigrations:!0,skipSeeds:!0,bunupPackages:"bundle"}),await Bun.write(A6($,"modules","app","src","index.ts"),Zs),await dV0`cd ${$} && bun add ${["@ooneex/routing@0.2.0","@ooneex/analytics","@ooneex/app","@ooneex/app-env","@ooneex/cache","@ooneex/database","@ooneex/logger","@ooneex/mailer","@ooneex/module","@ooneex/rate-limit","@ooneex/storage","reflect-metadata"]} && bun add ${["@ooneex/cli","@biomejs/biome","@commitlint/cli","@commitlint/config-conventional","@commitlint/prompt-cli","@nx/js","@nx/workspace","@swc-node/register","@swc/core","@swc/helpers","@types/bun","@types/node","@typescript/native-preview","bunup","husky","lint-staged","nx","typescript","undici-types"]} -D`,new R0().success(`${Z} created successfully at ${$}`,void 0,{showTimestamp:!1,showArrow:!1,useSymbol:!0})}}tH=I0([P0.command()],tH);import{join as E6}from"path";var Vs=`import { describe, expect, test } from "bun:test";
907
+ `;class T4{getName(){return"make:module"}getDescription(){return"Generate a new module"}async run(Y){let{cwd:X=process.cwd(),silent:$=!1,skipBin:Z=!1,skipMigrations:H=!1,skipSeeds:W=!1,bunupPackages:G="external"}=Y,{name:J}=Y;if(!J)J=await w0({message:"Enter module name"});let L=O0(J).replace(/Module$/,""),A=BX(L),E=gY(X,"modules",A),z=gY(E,"bin"),B=gY(E,"src"),D=gY(E,"tests"),U=Es.replace(/{{NAME}}/g,L),S=Ls.replace(/{{NAME}}/g,L),I=zs.replace(/{{NAME}}/g,A),R=Ds.replace(/{{NAME}}/g,L),F=Js.replace('packages: "external"',`packages: "${G}"`);if(await Bun.write(gY(E,"bunup.config.ts"),F),!Z)await Bun.write(gY(z,"migration","up.ts"),As),await Bun.write(gY(z,"seed","run.ts"),Bs);if(await Bun.write(gY(B,`${L}Module.ts`),U),await Bun.write(gY(B,"index.ts"),S),!H)await Bun.write(gY(B,"migrations","migrations.ts"),"");if(!W)await Bun.write(gY(B,"seeds","seeds.ts"),"");if(await Bun.write(gY(E,"package.json"),I),await Bun.write(gY(E,"tsconfig.json"),Us),await Bun.write(gY(D,`${L}Module.spec.ts`),R),!$)new R0().success(`modules/${A} created successfully`,void 0,{showTimestamp:!1,showArrow:!1,useSymbol:!0})}}T4=I0([P0.command()],T4);class tH{getName(){return"make:app"}getDescription(){return"Generate a new application"}async run(Y){let{name:X,destination:$}=Y;if(!X)X=await w0({message:"Enter application name"});let Z=BX(X);if(!$)$=await au({message:"Enter destination path",initial:Z});let H=Ws.replace(/{{NAME}}/g,Z);await Bun.write(A6($,".commitlintrc.ts"),eu),await Bun.write(A6($,".gitignore"),Ys),await Bun.write(A6($,"biome.jsonc"),Xs),await Bun.write(A6($,"bunfig.toml"),$s),await Bun.write(A6($,"nx.json"),Hs),await Bun.write(A6($,"package.json"),H),await Bun.write(A6($,"tsconfig.json"),Gs),await new T4().run({name:"app",cwd:$,silent:!0,skipBin:!0,skipMigrations:!0,skipSeeds:!0,bunupPackages:"bundle"}),await Bun.write(A6($,"modules","app","src","index.ts"),Zs),await dV0`cd ${$} && bun add ${["@ooneex/routing","@ooneex/analytics","@ooneex/app","@ooneex/app-env","@ooneex/cache","@ooneex/database","@ooneex/logger","@ooneex/mailer","@ooneex/module","@ooneex/rate-limit","@ooneex/storage","reflect-metadata"]} && bun add ${["@ooneex/cli","@biomejs/biome","@commitlint/cli","@commitlint/config-conventional","@commitlint/prompt-cli","@nx/js","@nx/workspace","@swc-node/register","@swc/core","@swc/helpers","@types/bun","@types/node","@typescript/native-preview","bunup","husky","lint-staged","nx","typescript","undici-types"]} -D`,new R0().success(`${Z} created successfully at ${$}`,void 0,{showTimestamp:!1,showArrow:!1,useSymbol:!0})}}tH=I0([P0.command()],tH);import{join as E6}from"path";var Vs=`import { describe, expect, test } from "bun:test";
927
908
  import { {{NAME}}CacheAdapter } from "@/cache/{{NAME}}CacheAdapter";
928
909
 
929
910
  describe("{{NAME}}CacheAdapter", () => {
@@ -2558,4 +2539,4 @@ export default defineConfig({
2558
2539
  `),process.exit(1);var ni=jp(oi);if(!ni)pE.info(`No commands found
2559
2540
  `),process.exit(1);try{await ni.run(FF0)}catch(Y){pE.error(Y,void 0,{showArrow:!1,showTimestamp:!1,showLevel:!1}),process.exit(1)}
2560
2541
 
2561
- //# debugId=AC9A96DEDE6CB9FC64756E2164756E21
2542
+ //# debugId=47E988FDACC9295564756E2164756E21