🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@intent-driven/importer-nestjs-typeorm

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@intent-driven/importer-nestjs-typeorm

NestJS + TypeORM AST → IDF ontology (entities + intents + roles)

latest
Source
npmnpm
Version
0.3.3
Version published
Maintainers
1
Created
Source

@intent-driven/importer-nestjs-typeorm

NestJS + TypeORM AST → IDF ontology.

import { importNestjsTypeorm } from "@intent-driven/importer-nestjs-typeorm";

const ontology = await importNestjsTypeorm({
  src: "./src",
  guardsToRoles: true, // default
});

Через CLI:

idf import nestjs-typeorm --src ./src --out src/domains/api/ontology.js

Что покрывает (v0.2)

  • TypeORM:
    • @Entity, @Column, @PrimaryGeneratedColumn, @PrimaryColumn
    • @CreateDateColumn, @UpdateDateColumn, @DeleteDateColumn, @VersionColumn
    • @ManyToOne, @OneToMany, @OneToOne, @ManyToMany + @JoinColumn, @JoinTable
    • @Column({type:'enum', enum: SomeEnum}) — cross-file enum resolution → valueLabels + enumValues
  • Nest:
    • @Controller(prefix) (string + object form)
    • @Get/@Post/@Put/@Patch/@Delete
    • @Param/@Body/@Query в method signature → intent.parameters (с markers pathParam/bodyParam/queryParam)
    • @Body() dto: CreateOrderDto — cross-file DTO field extraction
  • Guards → roles:
    • @UseGuards + @Rolesintent.forRoles + auto-create ontology.roles
    • *Approval*Guardintent.lifecycle.requiresApproval stub
  • Cross-file resolver: relative imports + tsconfig compilerOptions.paths (TS path-mapping)

Skip-list для non-entity endpoints

Auth/webhook/health/search-style endpoints автоматически пропускаются (no garbage create_search / create_login / create_webhook intents). Default skip-list:

  • Auth: login, logout, register, signup, signin, signout, auth, oauth, token, me, session(s)
  • Webhooks: webhook(s), callback(s)
  • Common actions: search, export, import, upload, download, notify, subscribe, unsubscribe, refresh, validate, verify, reset
  • Meta: health, healthz, ready(z), live(ness), version, info, metadata, metrics, ping, status
  • Generic: feedback, contact, support, resource

Skipped intents эмитят warning non_entity_skipped в _meta.warnings.

Опции:

await importNestjsTypeorm({
  src: "./src",
  nonEntityPaths: ["foo", "bar"], // расширить default skip-list
  includeNonEntity: true,         // override: включить все intents
});

Limitations (v0.2)

  • Validation rules (@IsEmail, @MinLength, @Min, @Max, etc.) ignored — отложено в v0.3
  • DTO inheritance (extends BaseDto) — only own properties + warning
  • Nested DTO depth > 1 — placeholder + warning
  • node_modules import resolution — warning unresolved_import (не resolve'им)
  • Polymorphic @TableInheritance + @ChildEntity — v0.3
  • ManyToMany bridge-table → role.scope.via — v0.3
  • TS utility types (Pick, Partial, Omit) — warning + fallback

License

MIT.

Keywords

intent-driven

FAQs

Package last updated on 10 May 2026

Did you know?

Socket

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.

Install

Related posts