D
Overall Health

typeorm/typeorm


https://github.com/typeorm/typeorm
2026-04-19 00:20:07
C
Dead code
20% orphan symbols (103/506)
F
Circular deps
24 cycles detected
F
Coupling
max fan-in: 68 (src/error/TypeORMError.ts)
F
Security
132 concerns found

Overview

  • 3499 files indexed
  • 5721 code symbols extracted
  • 74969 symbol references tracked
  • 0 active memories (0 core, 0 stale)
  • Languages: typescript (3493), javascript (6)

God Nodes (most-referenced symbols)

These are the symbols your codebase depends on most. Changes here have the largest blast radius.

  • Column — 3160 references
  • PrimaryGeneratedColumn — 1064 references
  • Post — 1047 references
  • Category — 925 references
  • createTestingConnections — 904 references
  • closeTestingConnections — 892 references
  • reloadTestingDatabases — 727 references
  • query — 700 references
  • Query — 674 references
  • Entity — 516 references

Hub Files (highest PageRank)

Core architectural files — imported by many others.

  • src/index.ts (1.00)
  • src/globals.ts (0.41)
  • src/util/ObjectUtils.ts (0.33)
  • test/utils/test-utils.ts (0.31)
  • src/decorator/columns/Column.ts (0.25)
  • src/decorator/entity/Entity.ts (0.21)
  • src/platform/PlatformTools.ts (0.19)
  • src/error/TypeORMError.ts (0.18)
  • src/metadata-args/MetadataArgsStorage.ts (0.18)
  • src/driver/types/DatabaseType.ts (0.17)

Orphans (potential dead code)

Named classs with zero detected references. Could be dead code, public API exports, or referenced dynamically.

  • InstanceCheckersrc/util/InstanceChecker.ts:31
  • DriverUtilssrc/driver/DriverUtils.ts:8
  • RandomGeneratorsrc/util/RandomGenerator.ts:1
  • abbreviatesrc/util/StringUtils.ts:57
  • isNodesrc/util/StringUtils.ts:125
  • matchesModulepackages/codemod/src/transforms/ast-helpers.ts:56
  • collectParamspackages/codemod/src/transforms/ast-helpers.ts:171
  • VersionUtilssrc/util/VersionUtils.ts:1
  • ApplyValueTransformerssrc/util/ApplyValueTransformers.ts:4
  • wrappackages/codemod/src/lib/colors.ts:1

Coupling (high-PageRank files)

  • src/index.ts (1.00)
  • src/globals.ts (0.41)
  • src/util/ObjectUtils.ts (0.33)
  • test/utils/test-utils.ts (0.31)
  • src/decorator/columns/Column.ts (0.25)

Circular Dependencies (24 cycles)

  1. sample/sample10-mixed/entity/Image.ts -> sample/sample10-mixed/entity/Post.ts -> sample/sample10-mixed/entity/Image.ts
  2. sample/sample10-mixed/entity/Image.ts -> sample/sample10-mixed/entity/ImageDetails.ts -> sample/sample10-mixed/entity/Image.ts
  3. sample/sample10-mixed/entity/Cover.ts -> sample/sample10-mixed/entity/Post.ts -> sample/sample10-mixed/entity/Cover.ts
  4. sample/sample10-mixed/entity/Category.ts -> sample/sample10-mixed/entity/Post.ts -> sample/sample10-mixed/entity/Category.ts
  5. sample/sample10-mixed/entity/Category.ts -> sample/sample10-mixed/entity/PostDetails.ts -> sample/sample10-mixed/entity/Post.ts -> sample/sample10-mixed/entity/Category.ts
  6. sample/sample10-mixed/entity/Chapter.ts -> sample/sample10-mixed/entity/PostDetails.ts -> sample/sample10-mixed/entity/Chapter.ts
  7. sample/sample10-mixed/entity/Category.ts -> sample/sample10-mixed/entity/PostDetails.ts -> sample/sample10-mixed/entity/Category.ts
  8. sample/sample37-vector-sqlserver/entity/Document.ts -> sample/sample37-vector-sqlserver/entity/DocumentChunk.ts -> sample/sample37-vector-sqlserver/entity/Document.ts
  9. sample/sample7-pagination/entity/Post.ts -> sample/sample7-pagination/entity/PostCategory.ts -> sample/sample7-pagination/entity/Post.ts
  10. sample/sample7-pagination/entity/Post.ts -> sample/sample7-pagination/entity/PostAuthor.ts -> sample/sample7-pagination/entity/Post.ts
  11. sample/sample18-lazy-relations/entity/Author.ts -> sample/sample18-lazy-relations/entity/Post.ts -> sample/sample18-lazy-relations/entity/Author.ts
  12. sample/sample18-lazy-relations/entity/Category.ts -> sample/sample18-lazy-relations/entity/Post.ts -> sample/sample18-lazy-relations/entity/Category.ts
  13. sample/sample6-abstract-table/entity/Post.ts -> sample/sample6-abstract-table/entity/PostCategory.ts -> sample/sample6-abstract-table/entity/Post.ts
  14. sample/sample6-abstract-table/entity/Post.ts -> sample/sample6-abstract-table/entity/PostAuthor.ts -> sample/sample6-abstract-table/entity/Post.ts
  15. sample/sample21-custom-join-table-column/entity/Author.ts -> sample/sample21-custom-join-table-column/entity/Post.ts -> sample/sample21-custom-join-table-column/entity/Author.ts
  16. sample/sample21-custom-join-table-column/entity/Category.ts -> sample/sample21-custom-join-table-column/entity/Post.ts -> sample/sample21-custom-join-table-column/entity/Category.ts
  17. sample/sample5-subscribers/entity/Post.ts -> sample/sample5-subscribers/entity/PostCategory.ts -> sample/sample5-subscribers/entity/Post.ts
  18. sample/sample5-subscribers/entity/Post.ts -> sample/sample5-subscribers/entity/PostAuthor.ts -> sample/sample5-subscribers/entity/Post.ts
  19. sample/sample13-everywhere-abstraction/entity/Post.ts -> sample/sample13-everywhere-abstraction/entity/PostCategory.ts -> sample/sample13-everywhere-abstraction/entity/Post.ts
  20. sample/sample13-everywhere-abstraction/entity/BaseObject.ts -> sample/sample13-everywhere-abstraction/entity/PostAuthor.ts -> sample/sample13-everywhere-abstraction/entity/Post.ts -> sample/sample13-everywhere-abstraction/entity/BaseObject.ts
  21. sample/sample25-insert-from-inverse-side/entity/Author.ts -> sample/sample25-insert-from-inverse-side/entity/Post.ts -> sample/sample25-insert-from-inverse-side/entity/Author.ts
  22. sample/sample14-errors-in-wrong-metdata/entity/Post.ts -> sample/sample14-errors-in-wrong-metdata/entity/PostAuthor.ts -> sample/sample14-errors-in-wrong-metdata/entity/Post.ts
  23. sample/sample9-entity-listeners/entity/Post.ts -> sample/sample9-entity-listeners/entity/PostAuthor.ts -> sample/sample9-entity-listeners/entity/Post.ts
  24. sample/sample9-entity-listeners/entity/Post.ts -> sample/sample9-entity-listeners/entity/PostCategory.ts -> sample/sample9-entity-listeners/entity/Post.ts

Security Issues (132 found)

Critical (2)

  • Hardcoded secretsrc/commands/InitCommand.ts:225
  • 'password: "Admin12345"',
  • Hardcoded secretsrc/commands/InitCommand.ts:645
  • SA_PASSWORD: "Admin12345"

High (15)

  • SQL injection (template literal)src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts:114
  • await this.query(SAVEPOINT typeorm_${this.transactionDepth})
  • SQL injection (template literal)src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts:1357
  • await this.query(DELETE FROM ${this.escapePath(tableName)})
  • SQL injection (template literal)src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts:1470
  • return this.query(PRAGMA ${pragma}("${tableName}"))
  • SQL injection (template literal)src/driver/postgres/PostgresQueryRunner.ts:197
  • await this.query(SAVEPOINT typeorm_${this.transactionDepth})
  • SQL injection (template literal)src/driver/sqlserver/SqlServerQueryRunner.ts:2847
  • await this.query(TRUNCATE TABLE ${this.escapePath(tablePath)})
  • SQL injection (template literal)src/driver/aurora-postgres/AuroraPostgresQueryRunner.ts:135
  • await this.query(SAVEPOINT typeorm_${this.transactionDepth})
  • SQL injection (template literal)src/driver/oracle/OracleQueryRunner.ts:141
  • await this.query(SAVEPOINT typeorm_${this.transactionDepth})
  • SQL injection (template literal)src/driver/oracle/OracleQueryRunner.ts:479
  • await this.query(CREATE DATABASE ${this.driver.escape(database)})
  • SQL injection (template literal)src/driver/spanner/SpannerQueryRunner.ts:1725
  • await this.query(DELETE FROM ${this.escapePath(tableName)} WHERE true)
  • SQL injection (template literal)src/driver/sap/SapQueryRunner.ts:2654
  • await this.query(TRUNCATE TABLE ${this.escapePath(tablePath)})
  • ...and 5 more

Low (115)

  • Excessive console.logsample/sample9-entity-listeners/entity/Post.ts:51
  • console.log(
  • Excessive console.logsample/sample9-entity-listeners/entity/Post.ts:59
  • console.log("event: Post entity will be inserted so soon...")
  • Excessive console.logsample/sample9-entity-listeners/entity/Post.ts:64
  • console.log(
  • Excessive console.logsample/sample9-entity-listeners/entity/Post.ts:71
  • console.log("event: Post entity will be updated so soon...")
  • Excessive console.logsample/sample9-entity-listeners/entity/Post.ts:76
  • console.log("event: Post entity has been updated and callback executed")
  • Excessive console.logsample/sample9-entity-listeners/entity/Post.ts:81
  • console.log("event: Post entity will be removed so soon...")
  • Excessive console.logsample/sample9-entity-listeners/entity/Post.ts:86
  • console.log("event: Post entity has been removed and callback executed")
  • Excessive console.logsample/sample9-entity-listeners/entity/Post.ts:91
  • console.log("event: Post entity will be soft-removed so soon...")
  • Excessive console.logsample/sample9-entity-listeners/entity/Post.ts:96
  • console.log(
  • Excessive console.logsample/sample9-entity-listeners/entity/Post.ts:103
  • console.log("event: Post entity will be recovered so soon...")
  • ...and 105 more

Suggested Next Steps

  • Before refactoring Column, run sverklo_impact to see the 3160 call sites
  • src/index.ts is your most-imported file — changes here cascade widely
  • 15+ potential orphans detected — audit for dead code