Lines 1202-1234javascript
1203`}function Ge(){return`PORT=3000
1205`}function Ke(){return`import { defineConfig } from 'vitest/config'
1206import swc from 'unplugin-swc'
1208export default defineConfig({
1209 plugins: [swc.vite()],
1212 environment: 'node',
1213 include: ['src/**/*.test.ts'],
1216`}const G={kickjs:{pkg:`@forinda/kickjs`,peers:[`express`],description:`Unified framework: DI, decorators, routing, middleware`,core:!0},vite:{pkg:`@forinda/kickjs-vite`,peers:[`vite`],description:`Vite plugin: dev server, HMR, module discovery`,dev:!0,core:!0},cli:{pkg:`@forinda
1217 Core packages (always installed by \`kick new\`):
1218`);for(let e of r)console.log(a(e));if(e){console.log(`
1219 Optional packages (add as needed):
1220`);for(let e of i)console.log(a(e))}else console.log(`\n Plus ${i.length} optional packages (auth, swagger, db, queue, …).`),console.log(" Run `kick add --list --all` for the full catalog.");console.log(`
1221 Usage: kick add ai db swagger`),console.log(` kick add queue:bullmq`),console.log(` kick add upload # installs the multipart driver for your runtime`),console.log()}function Qe(e,t,n=`express`){let r=new Set,i=new Set,a=[],o=[],s
1222`),a.length===0&&o.length===0))){if(a.length>0){let e=a,t=`${n} add ${e.join(` `)}`;console.log(`\n Installing ${e.length} dependency(ies):`);for(let t of e)console.log(` + ${t}`);console.log();try{T(t,{stdio:`inherit`})}catch{console.log(`\n Installation failed. Run manually:\n ${t}\n`)}}if(o.length>0){let e=o,t=`${n} add -D ${e.join(` `)}`;console.log(`\n Installing ${e.length} dev dependency(ies):`);for(let t of e)console.log(` + ${t} (dev)`);console.log();try{T(t,{stdio:`inherit`})}catch{console.log(`
1223`)}})}const tt=p(ee(import.meta.url)),Z=JSON.parse(v(m(tt,`..`,`package.json`),`utf-8`)),nt=`^${Z.version}`,rt=[`@forinda/kickjs`,`@forinda/kickjs-cli`,`@forinda/kickjs-schema`,`@forinda/kickjs-vite
1224 Dependencies installed successfully!`)}catch{console.log(`\n Warning: ${i} install failed. Run it manually.`)}}try{let{runTypegen:e}=await import(`./typegen-Dhfw8V1k.mjs`).then(e=>e.n);await e({cwd:d,allowDuplicates:!0,silent:!0})}catch{}if(t.initGit)try{T(
1225 Project scaffolded successfully!`),console.log();let g=d!==process.cwd();f(`Next steps:`),g&&f(` cd ${n}`),t.installDeps||f(` ${i} install`);let _={rest:`kick g module user`,ddd:`kick g module user --repo drizzle`,cqrs:`kick g module user --pattern cqrs`,minimal:`# add your routes to src/index.ts`
1226Install a supported version via nvm / fnm / volta.`}:{name:`Node version`,status:`pass`,message:e}}function Mt(e){if(!e.pkg)return{name:`@forinda/kickjs installed`,status:`warn`,message:
1227Install it: pnpm add reflect-metadata
1228Then import it at the top of src/index.ts:
1230 import 'reflect-metadata'
1231 // ... rest of bootstrap`}}function Bt(e){if(!e.tsconfig)return[{name:`tsconfig.json present`,status:`fail`,fix:"Create a tsconfig.json with `experimentalDecorators: true` and `emitDecoratorMetadata: true`. `kick new` scaffolds one automatically."}];let t=e.tsconfig.compilerOptions??{},n=[];return n.push(t.experimentalDecorators===!0?{name:`tsconfig: experimentalDecorators`,status:`pass`}:{name:`tsconfig: experimentalDecorators`,status:`fail`,fix:'Add `"experimentalDecorators": true` to compilerOptions in tsconfig.json. Without it, @Service / @Controller / @Get etc. don\'t register any metad ...
1232`).map(e=>` ${r.dim(`→`)} ${e}`).join(`
1233`)}function Xt(e){return e?.doctor?.checks??[]}function Zt(e){e.command(`doctor`).description(`Pre-flight checks for your KickJS project (dev environment health)`).action(async()=>{let e=process.
1234//# sourceMappingURL=doctor-Dj_h900X.mjs.map
Long lines were clipped for display.