Use this before npm publish to avoid leaking secrets or dev-only files.
If generated/ or .env were ever committed, remove them from the Git index (files stay on disk, but Git will stop tracking them):
git rm -r --cached generated/ 2>/dev/null || true
git rm --cached .env 2>/dev/null || true
git commit -m "chore: stop tracking generated/ and .env"Then ensure .gitignore includes them so they are not re-added.
Only these are included in the NPM package:
index.jsbin/src/tsconfig.jsonREADME.mdLICENSE
Not published (kept in Git only): test/, update_codegen.mjs, veko.config.js, api.vk, handlers.vk, models.vk, ARCHITECTURE.md, PUBLISH_CHECKLIST.md, .gitignore, etc.
- main:
"main": "index.js"– default require/import. - bin:
"bin": { "veko": "./bin/veko.js" }– CLI.
- Defaults:
JWT_SECRETdefaults tochangeme-secretin development only. - Production guard: In
src/runtime/auth.js, whenNODE_ENV === 'production',signToken()andcreateAuth()throw ifJWT_SECRETis unset or stillchangeme-secret. - Generated server: If your codegen inlines
process.env.JWT_SECRET || 'changeme-secret', ensure production deployments setJWT_SECRETin the environment so the fallback is never used. - No hardcoded user paths were found in framework source (only in
node_modulesand test/docs, which are not published).
- Run
npm run test(or at leastnpm run build). - Run
npm pack --dry-runand confirm the file list has notest/,update_codegen.mjs, or.env. - Add a
LICENSEfile at the repo root if you want it in the package (e.g. MIT). - Ensure
README.mdexists (npm uses it for the package page); if your file isReadme.md, either rename it or add"readme": "Readme.md"to package.json.