@avleon/core 0.0.16 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icore.d.ts +1 -0
- package/dist/icore.js +4 -1
- package/package.json +2 -2
package/dist/icore.d.ts
CHANGED
|
@@ -201,6 +201,7 @@ export declare class TestBuilder {
|
|
|
201
201
|
private dataSourceOptions?;
|
|
202
202
|
private constructor();
|
|
203
203
|
static createBuilder(): TestBuilder;
|
|
204
|
+
addDatasource(options: DataSourceOptions): void;
|
|
204
205
|
getController<T>(controller: Constructor<T>): T;
|
|
205
206
|
getService<T>(service: Constructor<T>): T;
|
|
206
207
|
getTestApplication(options: TestAppOptions): TestApplication;
|
package/dist/icore.js
CHANGED
|
@@ -598,7 +598,7 @@ class AvleonApplication {
|
|
|
598
598
|
typeorm.then(async (t) => {
|
|
599
599
|
try {
|
|
600
600
|
const datasource = new t.DataSource(buildOptions.addDataSource);
|
|
601
|
-
typedi_1.default.set("
|
|
601
|
+
typedi_1.default.set("itestdatasource", datasource);
|
|
602
602
|
await datasource.initialize();
|
|
603
603
|
}
|
|
604
604
|
catch (error) {
|
|
@@ -655,6 +655,9 @@ class TestBuilder {
|
|
|
655
655
|
}
|
|
656
656
|
return TestBuilder.instance;
|
|
657
657
|
}
|
|
658
|
+
addDatasource(options) {
|
|
659
|
+
this.dataSourceOptions = options;
|
|
660
|
+
}
|
|
658
661
|
getController(controller) {
|
|
659
662
|
return typedi_1.default.get(controller);
|
|
660
663
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avleon/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "rimraf dist && tsc",
|
|
@@ -55,4 +55,4 @@
|
|
|
55
55
|
"type": "git",
|
|
56
56
|
"url": "git+https://github.com/avleonjs/avleon-core"
|
|
57
57
|
}
|
|
58
|
-
}
|
|
58
|
+
}
|