Gathering detailed insights and metrics for @tsdi/typeorm-adapter
Gathering detailed insights and metrics for @tsdi/typeorm-adapter
Gathering detailed insights and metrics for @tsdi/typeorm-adapter
Gathering detailed insights and metrics for @tsdi/typeorm-adapter
AOP, Ioc container, Boot framework, unit testing framework , activities workflow framework.
npm install @tsdi/typeorm-adapter
Typescript
Module System
Node Version
NPM Version
TypeScript (98.84%)
JavaScript (1.16%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
20 Stars
2,373 Commits
1 Forks
1 Watchers
18 Branches
1 Contributors
Updated on Jan 03, 2025
Latest Version
6.0.48
Package Id
@tsdi/typeorm-adapter@6.0.48
Unpacked Size
177.78 kB
Size
30.14 kB
File Count
33
NPM Version
6.14.17
Node Version
14.21.1
Published on
Feb 17, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
This repo is for distribution on npm
. The source for this module is in the
main repo.
@tsdi/typeorm-adapter
is model parser for boot frameworker. base on ioc @tsdi
. help you develop your project easily.
You can install this package either with npm
1 2npm install @tsdi/typeorm-adapter 3 4
1import { BootApplication, DIModule } from '@tsdi/boot'; 2import { TypeOrmModule } from '@tsdi/typeorm-adapter'; 3 4export class MyService extends Service { 5 @Inject() 6 dbhelper: TypeOrmHelper; 7 8 async configureService(ctx: IBootContext): Promise<void> { 9 const resp = this.dbhelper.getRepository(Production); 10 // todo configuer service. 11 } 12 // ...... 13} 14 15@EntityRepository(Production) 16export class ProductionRepository extends Repository<Production> { 17 18 async findById(id: string) { 19 return await this.findOne(id); 20 } 21 22 async removeById(id: string) { 23 const pdtline = await this.findOne(id); 24 return await this.remove(pdtline); 25 } 26 27 async serarch(...args) { 28 // do sth.. 29 } 30 ... 31} 32 33@Injectable() 34export class SerachProduction { 35 36 @Inject() //or @AutoWired() 37 resp: ProductionRepository; 38 39 40 dosth(){ 41 this.resp.search(...) 42 } 43 44 45} 46 47@DIModule({ 48 // baseURL: __dirname, 49 imports: [ 50 TypeOrmModule 51 //... you service, or controller, some extends module. 52 ], 53 providers:[ 54 SerachProduction 55 ], 56 bootstrap: MyService 57 debug: true 58}) 59export class MyApp { 60 constructor() { 61 console.log('boot my application'); 62 } 63} 64 65BootApplication.run(MyApp);
1import { MvcApplication, DefaultMvcMiddlewares, MvcModule, MvcServer } from '@mvx/mvc'; 2import { TypeOrmModule } from '@tsdi/typeorm-adapter'; 3 4 5@Cors 6@Authorization() 7@Controller('/api/production') 8export class ProductionController { 9 10 11 @Inject() 12 rep: ProductionRepository; 13 14 @Post('/') 15 @Put('/') 16 async save(pdt: Production) { 17 const r = await this.rep.save(pdt); 18 return ResponseResult.success(r); 19 } 20 21 @Delete('/:id') 22 async removeById(id: string) { 23 const r = await this.rep.removeById(id); 24 return ResponseResult.success(r); 25 } 26 27 @Get('/:id') 28 async get(id: string) { 29 const pdtline = await this.rep.findById(id); 30 return ResponseResult.success(pdtline); 31 } 32 33 @Get('/') 34 async query(keywords?: string, skip?: number, take?: number) { 35 const r = await this.rep.search(keywords, skip, take); 36 return ResponseResult.success(r[0], r[1]); 37 } 38} 39 40// 1. use MvcHostBuilder to boot application. 41MvcApplication.run(); 42 43// 2. use bootstrap module to boot application 44 45@MvcModule({ 46 // baseURL: __dirname, 47 imports: [ 48 TypeOrmModule 49 //... you service, or controller, some extends module. 50 ], 51 debug: true 52}) 53class MvcApi { 54 constructor() { 55 console.log('boot application'); 56 } 57} 58 59 60// 3. use MvcHostBuilder to boot application module. 61 62@MvcModule({ 63 imports: [ 64 TypeOrmModule 65 // ... /... you service, or controller, some extends module. 66 // DebugLogAspect 67 ] 68 // bootstrap: MvcServer 69}) 70class MvcApi { 71 72} 73 74MvcApplication.run(MvcApi); 75 76 77//4. use bootstrap module to boot application by main. 78@MvcModule({ 79 imports: [ 80 TypeOrmModule 81 // ... 82 ], 83 // bootstrap: MvcServer, 84 debug: true 85}) 86class MvcApi { 87 constructor() { 88 console.log('boot application'); 89 } 90 91 static main() { 92 console.log('run mvc api...'); 93 MvcApplication.run(MvcApi); 94 } 95} 96 97
Documentation is available on the
@tsdi/cli @tsdi/ioc @tsdi/aop @tsdi/core @tsdi/boot @tsdi/components @tsdi/compiler @tsdi/activities @tsdi/pack @tsdi/typeorm-adapter @tsdi/unit @tsdi/unit-console
MIT © Houjun
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More