@ooneex/cli 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -904,7 +904,7 @@ describe("{{NAME}}Module", () => {
|
|
|
904
904
|
"include": ["src/**/*.ts", "src/**/*.tsx", "tests/**/*.ts", "tests/**/*.tsx"],
|
|
905
905
|
"exclude": ["node_modules", "dist"]
|
|
906
906
|
}
|
|
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","
|
|
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 husky && 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","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";
|
|
908
908
|
import { {{NAME}}CacheAdapter } from "@/cache/{{NAME}}CacheAdapter";
|
|
909
909
|
|
|
910
910
|
describe("{{NAME}}CacheAdapter", () => {
|
|
@@ -2539,4 +2539,4 @@ export default defineConfig({
|
|
|
2539
2539
|
`),process.exit(1);var ni=jp(oi);if(!ni)pE.info(`No commands found
|
|
2540
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)}
|
|
2541
2541
|
|
|
2542
|
-
//# debugId=
|
|
2542
|
+
//# debugId=B96CC999F245873364756E2164756E21
|