Comparing version 0.0.2-alpha.53 to 0.0.2-alpha.54
@@ -118,31 +118,31 @@ import { Driver } from "../driver/Driver"; | ||
*/ | ||
importEntitiesFromDirectories(paths: string[]): Promise<this>; | ||
importEntitiesFromDirectories(paths: string[]): this; | ||
/** | ||
* Imports entity schemas from the given paths (directories) and registers them in the current connection. | ||
*/ | ||
importEntitySchemaFromDirectories(paths: string[]): Promise<this>; | ||
importEntitySchemaFromDirectories(paths: string[]): this; | ||
/** | ||
* Imports subscribers from the given paths (directories) and registers them in the current connection. | ||
*/ | ||
importSubscribersFromDirectories(paths: string[]): Promise<this>; | ||
importSubscribersFromDirectories(paths: string[]): this; | ||
/** | ||
* Imports naming strategies from the given paths (directories) and registers them in the current connection. | ||
*/ | ||
importNamingStrategiesFromDirectories(paths: string[]): Promise<this>; | ||
importNamingStrategiesFromDirectories(paths: string[]): this; | ||
/** | ||
* Imports entities and registers them in the current connection. | ||
*/ | ||
importEntities(entities: Function[]): Promise<this>; | ||
importEntities(entities: Function[]): this; | ||
/** | ||
* Imports schemas and registers them in the current connection. | ||
*/ | ||
importEntitySchemas(schemas: EntitySchema[]): Promise<this>; | ||
importEntitySchemas(schemas: EntitySchema[]): this; | ||
/** | ||
* Imports subscribers and registers them in the current connection. | ||
*/ | ||
importSubscribers(subscriberClasses: Function[]): Promise<this>; | ||
importSubscribers(subscriberClasses: Function[]): this; | ||
/** | ||
* Imports naming strategies and registers them in the current connection. | ||
*/ | ||
importNamingStrategies(strategies: Function[]): Promise<this>; | ||
importNamingStrategies(strategies: Function[]): this; | ||
/** | ||
@@ -149,0 +149,0 @@ * Sets given naming strategy to be used. |
@@ -185,6 +185,4 @@ "use strict"; | ||
importEntitiesFromDirectories(paths) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.importEntities(DirectoryExportedClassesLoader_1.importClassesFromDirectories(paths)); | ||
return this; | ||
}); | ||
this.importEntities(DirectoryExportedClassesLoader_1.importClassesFromDirectories(paths)); | ||
return this; | ||
} | ||
@@ -195,6 +193,4 @@ /** | ||
importEntitySchemaFromDirectories(paths) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.importEntitySchemas(DirectoryExportedClassesLoader_1.importJsonsFromDirectories(paths)); | ||
return this; | ||
}); | ||
this.importEntitySchemas(DirectoryExportedClassesLoader_1.importJsonsFromDirectories(paths)); | ||
return this; | ||
} | ||
@@ -205,6 +201,4 @@ /** | ||
importSubscribersFromDirectories(paths) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.importSubscribers(DirectoryExportedClassesLoader_1.importClassesFromDirectories(paths)); | ||
return this; | ||
}); | ||
this.importSubscribers(DirectoryExportedClassesLoader_1.importClassesFromDirectories(paths)); | ||
return this; | ||
} | ||
@@ -215,6 +209,4 @@ /** | ||
importNamingStrategiesFromDirectories(paths) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
this.importEntities(DirectoryExportedClassesLoader_1.importClassesFromDirectories(paths)); | ||
return this; | ||
}); | ||
this.importEntities(DirectoryExportedClassesLoader_1.importClassesFromDirectories(paths)); | ||
return this; | ||
} | ||
@@ -225,8 +217,6 @@ /** | ||
importEntities(entities) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (this.isConnected) | ||
throw new CannotImportAlreadyConnectedError_1.CannotImportAlreadyConnectedError("entities", this.name); | ||
entities.forEach(cls => this.entityClasses.push(cls)); | ||
return this; | ||
}); | ||
if (this.isConnected) | ||
throw new CannotImportAlreadyConnectedError_1.CannotImportAlreadyConnectedError("entities", this.name); | ||
entities.forEach(cls => this.entityClasses.push(cls)); | ||
return this; | ||
} | ||
@@ -237,8 +227,6 @@ /** | ||
importEntitySchemas(schemas) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (this.isConnected) | ||
throw new CannotImportAlreadyConnectedError_1.CannotImportAlreadyConnectedError("schemas", this.name); | ||
schemas.forEach(schema => this.entitySchemas.push(schema)); | ||
return this; | ||
}); | ||
if (this.isConnected) | ||
throw new CannotImportAlreadyConnectedError_1.CannotImportAlreadyConnectedError("schemas", this.name); | ||
schemas.forEach(schema => this.entitySchemas.push(schema)); | ||
return this; | ||
} | ||
@@ -249,8 +237,6 @@ /** | ||
importSubscribers(subscriberClasses) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (this.isConnected) | ||
throw new CannotImportAlreadyConnectedError_1.CannotImportAlreadyConnectedError("entity subscribers", this.name); | ||
subscriberClasses.forEach(cls => this.subscriberClasses.push(cls)); | ||
return this; | ||
}); | ||
if (this.isConnected) | ||
throw new CannotImportAlreadyConnectedError_1.CannotImportAlreadyConnectedError("entity subscribers", this.name); | ||
subscriberClasses.forEach(cls => this.subscriberClasses.push(cls)); | ||
return this; | ||
} | ||
@@ -261,8 +247,6 @@ /** | ||
importNamingStrategies(strategies) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (this.isConnected) | ||
throw new CannotImportAlreadyConnectedError_1.CannotImportAlreadyConnectedError("naming strategies", this.name); | ||
strategies.forEach(cls => this.namingStrategyClasses.push(cls)); | ||
return this; | ||
}); | ||
if (this.isConnected) | ||
throw new CannotImportAlreadyConnectedError_1.CannotImportAlreadyConnectedError("naming strategies", this.name); | ||
strategies.forEach(cls => this.namingStrategyClasses.push(cls)); | ||
return this; | ||
} | ||
@@ -269,0 +253,0 @@ /** |
{ | ||
"name": "typeorm", | ||
"private": false, | ||
"version": "0.0.2-alpha.53", | ||
"version": "0.0.2-alpha.54", | ||
"description": "Data-mapper ORM for Typescript", | ||
@@ -27,2 +27,4 @@ "license": "Apache-2.0", | ||
"devDependencies": { | ||
"@types/chai": "^3.4.30", | ||
"@types/chai-as-promised": "0.0.28", | ||
"@types/mocha": "^2.2.29", | ||
@@ -29,0 +31,0 @@ "@types/promises-a-plus": "0.0.26", |
Sorry, the diff of this file is not supported yet
1519713
27
14120