
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@nodeboot/aot
Advanced tools
Node-Boot module for Ahead-of-Time (AOT) compilation. Generates node-boot beans and OpenAPI schemas at compile time
@nodeboot/aot🧠 Ahead-of-Time (AOT) support for the Node-Boot framework — enabling faster startup, intelligent component scanning, and OpenAPI-ready model schemas.
@nodeboot/aot provides a set of tools and decorators to optimize Node-Boot apps for production, by shifting expensive runtime operations to build-time via Ahead-of-Time (AOT) processing.
It includes:
🔍 Bean Scanner & Generator (node-boot-aot-beans.js)
Scans compiled files for decorators like @Service, @Controller, etc., and generates a precomputed node-boot-beans.json.
📦 Component Scanner Decorator (@EnableComponentScan)
Automatically imports application components at runtime from the prebuilt manifest or falls back to dynamic scanning.
🧬 Model Schema Generator (node-boot-aot-models.js)
Converts @Model-decorated classes into OpenAPI-compatible JSON Schemas.
npm install @nodeboot/aot --save-dev
After building your app (tsc), run the AOT bean scanner to precompile metadata for your components:
node node-boot-aot-beans.js
package.json:{
"scripts": {
"postbuild": "node node-boot-aot-beans.js"
}
}
This will output dist/node-boot-beans.json — a list of all .js files that contain key decorators such as @Service, @Controller, etc.
@Model ClassesTo convert all @Model-decorated classes into OpenAPI-compatible schema:
node node-boot-aot-models.js
This will generate:
dist/node-boot-models.json — structured like:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"components": {
"schemas": {
"UserModel": {
"type": "object",
"properties": {
"id": {"type": "string"},
"name": {"type": "string"}
}
}
}
}
}
Runs both scripts in one go. Ideal for post-build automation.
node node-boot-aot.js
💡 Suggested in package.json:
{
"scripts": {
"postbuild": "node node-boot-aot.js"
}
}
In your main application class, use the @EnableComponentScan() decorator to bootstrap bean registration:
import {EnableComponentScan} from "@nodeboot/aot";
@EnableComponentScan()
@NodeBootApplication()
export class MyApp implements NodeBootApp {
start(): Promise<NodeBootAppView> {
return NodeBoot.run(ExpressServer);
}
}
@EnableComponentScan({
customDecorators: [MyCustomBean, AnotherDecorator]
})
✅ Automatically resolves the
dist/directory in production and performs active scanning in dev (or if no JSON file is found).
| Directory | Purpose |
|---|---|
src/ | Your TypeScript source files |
dist/ | Compiled output after tsc |
.json | Output files: node-boot-beans.json, node-boot-models.json |
node-boot-aot-beans.js:
Scans compiled JS files for known decorators (@Service, @Controller, etc.) and generates node-boot-beans.json.
node-boot-aot-models.js:
Scans @Model()-decorated classes and generates a JSON Schema file (node-boot-models.json).
@EnableComponentScan(options?: { customDecorators?: Function[] }):
Scans and imports bean modules based on decorators. Uses prebuilt JSON for performance when available.Manuel Santos 📧 ney.br.santos@gmail.com 🌐 GitHub
MIT — feel free to use, modify, and contribute.
FAQs
Node-Boot module for Ahead-of-Time (AOT) compilation. Generates node-boot beans and OpenAPI schemas at compile time
The npm package @nodeboot/aot receives a total of 42 weekly downloads. As such, @nodeboot/aot popularity was classified as not popular.
We found that @nodeboot/aot demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.