Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
Clean up
  • Loading branch information
Yaapa Hage committed Jun 24, 2020
1 parent d06dd34 commit f77bd30
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/typeorm/LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (c) IBM Corp. 2017,2019.
Node module: @loopback/repository
Node module: @loopback/typeorm
This project is licensed under the MIT License, full text below.

--------
Expand Down
6 changes: 3 additions & 3 deletions packages/typeorm/src/decorators/typeorm.decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export namespace typeorm {
export function connection(connectionName?: string) {
return inject(
'',
{decorator: '@typeormConnection'},
{decorator: '@typeorm.connection'},
async (
ctx: Context,
injection: Readonly<Injection>,
Expand All @@ -28,7 +28,7 @@ export namespace typeorm {
) {
return inject(
'',
{decorator: '@typeormEntityManager'},
{decorator: '@typeorm.entityManager'},
async (
ctx: Context,
injection: Readonly<Injection>,
Expand All @@ -43,7 +43,7 @@ export namespace typeorm {
export function repository(entity: Function, connectionName?: string) {
return inject(
'',
{decorator: '@typeormRepository'},
{decorator: '@typeorm.repository'},
async (
ctx: Context,
injection: Readonly<Injection>,
Expand Down
2 changes: 1 addition & 1 deletion packages/typeorm/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2017,2020. All Rights Reserved.
// Node module: @loopback/repository
// Node module: @loopback/typeorm
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/typeorm/src/mixins/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
// Node module: @loopback/repository
// Node module: @loopback/typeorm
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
9 changes: 8 additions & 1 deletion packages/typeorm/src/mixins/typeorm.mixin.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
// Node module: @loopback/repository
// Node module: @loopback/typeorm
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {Application, MixinTarget} from '@loopback/core';
import debugFactory from 'debug';
import {ConnectionOptions} from 'typeorm';
import {TypeOrmComponent} from '../';

const debug = debugFactory('loopback:typeorm:mixin');

Expand All @@ -15,6 +16,12 @@ export function TypeOrmMixin<T extends MixinTarget<Application>>(
return class extends superClass {
typeormConnectionOptions: ConnectionOptions[] = [];

// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(...args: any[]) {
super(...args);
this.component(TypeOrmComponent);
}

async migrateSchema(options: SchemaMigrationOptions = {}): Promise<void> {
// TODO: implement using TypeORM
}
Expand Down
2 changes: 1 addition & 1 deletion packages/typeorm/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright IBM Corp. 2017,2020. All Rights Reserved.
// Node module: @loopback/repository
// Node module: @loopback/typeorm
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

Expand Down
3 changes: 0 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@
{
"path": "packages/typeorm/tsconfig.json"
},
{
"path": "sandbox/appa/tsconfig.json"
}
],
"files": []
}

0 comments on commit f77bd30

Please sign in to comment.