@loopback/boot 2.3.0 → 2.3.1
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/CHANGELOG.md +8 -0
- package/dist/.sandbox/635411GGsm1/model-endpoints/no-entity.rest-config.js +10 -0
- package/dist/.sandbox/635411GGsm1/models/no-entity.model.js +28 -0
- package/dist/.sandbox/635415cxfJi/service-provider.artifact.js +21 -0
- package/dist/.sandbox/635419mu8mo/application.js +20 -0
- package/dist/.sandbox/635419mu8mo/services/bindable-classes.service.js +50 -0
- package/dist/.sandbox/635419mu8mo/services/geocoder.service.js +21 -0
- package/dist/.sandbox/635419mu8mo/services/greeting.service.js +17 -0
- package/dist/.sandbox/635419t6TqH/datasource.artifact.js +20 -0
- package/dist/.sandbox/63541BtDxTa/multiple.artifact.js +45 -0
- package/dist/.sandbox/63541DlS0Ic/application.js +20 -0
- package/dist/.sandbox/63541DlS0Ic/repositories/multiple.repository.js +45 -0
- package/dist/.sandbox/63541DshyBF/application.js +20 -0
- package/dist/.sandbox/63541DshyBF/observers/lifecycle-observer.observer.js +33 -0
- package/dist/.sandbox/63541IEce5V/application.js +20 -0
- package/dist/.sandbox/63541IEce5V/datasources/db.datasource.js +20 -0
- package/dist/.sandbox/63541ik89oh/application.js +20 -0
- package/dist/.sandbox/63541ik89oh/models/multiple-models.model.js +16 -0
- package/dist/.sandbox/63541ik89oh/models/no-entity.model.js +28 -0
- package/dist/.sandbox/63541ik89oh/models/product.model.js +28 -0
- package/dist/.sandbox/63541meTxP7/application.js +20 -0
- package/dist/.sandbox/63541meTxP7/controllers/multiple.controller.js +45 -0
- package/dist/.sandbox/63541meTxP7/package.json +18 -0
- package/dist/.sandbox/63541nGmQFL/application.js +20 -0
- package/dist/.sandbox/63541nGmQFL/controllers/multiple.controller.js +45 -0
- package/dist/.sandbox/63541odlHvc/model-endpoints/product.rest-config.js +9 -0
- package/dist/.sandbox/63541odlHvc/models/product.model.js +28 -0
- package/dist/.sandbox/63541ruUDNf/application.js +20 -0
- package/dist/.sandbox/63541ruUDNf/interceptors/interceptor.interceptor.js +54 -0
- package/dist/.sandbox/63541ruUDNf/interceptors/non-global-interceptor.interceptor.js +54 -0
- package/dist/.sandbox/63541vSi6af/multiple.artifact.js +45 -0
- package/dist/.sandbox/application.js +20 -0
- package/dist/.sandbox/controllers/multiple.controller.js +45 -0
- package/dist/.sandbox/package.json +18 -0
- package/dist/mixins/boot.mixin.d.ts +35 -33
- package/dist/mixins/boot.mixin.js.map +1 -1
- package/package.json +14 -14
- package/src/mixins/boot.mixin.ts +30 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.3.1](https://github.com/strongloop/loopback-next/compare/@loopback/boot@2.3.0...@loopback/boot@2.3.1) (2020-05-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @loopback/boot
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [2.3.0](https://github.com/strongloop/loopback-next/compare/@loopback/boot@2.2.0...@loopback/boot@2.3.0) (2020-05-19)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.NoEntity = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const repository_1 = require("@loopback/repository");
|
|
10
|
+
let NoEntity = /** @class */ (() => {
|
|
11
|
+
let NoEntity = class NoEntity extends repository_1.Model {
|
|
12
|
+
};
|
|
13
|
+
tslib_1.__decorate([
|
|
14
|
+
repository_1.property({ id: true }),
|
|
15
|
+
tslib_1.__metadata("design:type", Number)
|
|
16
|
+
], NoEntity.prototype, "id", void 0);
|
|
17
|
+
tslib_1.__decorate([
|
|
18
|
+
repository_1.property({ required: true }),
|
|
19
|
+
tslib_1.__metadata("design:type", String)
|
|
20
|
+
], NoEntity.prototype, "name", void 0);
|
|
21
|
+
NoEntity = tslib_1.__decorate([
|
|
22
|
+
repository_1.model()
|
|
23
|
+
], NoEntity);
|
|
24
|
+
return NoEntity;
|
|
25
|
+
})();
|
|
26
|
+
exports.NoEntity = NoEntity;
|
|
27
|
+
//# sourceMappingURL=no-entity.model.js.map
|
|
28
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/no-entity.model.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.GeocoderServiceProvider = void 0;
|
|
8
|
+
// A dummy service instance to make unit testing easier
|
|
9
|
+
const GeocoderSingleton = {
|
|
10
|
+
geocode(address) {
|
|
11
|
+
return Promise.resolve({ lat: 0, lng: 0 });
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
class GeocoderServiceProvider {
|
|
15
|
+
value() {
|
|
16
|
+
return Promise.resolve(GeocoderSingleton);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.GeocoderServiceProvider = GeocoderServiceProvider;
|
|
20
|
+
//# sourceMappingURL=service-provider.artifact.js.map
|
|
21
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/service-provider.artifact.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BooterApp = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
const service_proxy_1 = require("@loopback/service-proxy");
|
|
11
|
+
const __1 = require("../..");
|
|
12
|
+
class BooterApp extends __1.BootMixin(service_proxy_1.ServiceMixin(repository_1.RepositoryMixin(rest_1.RestApplication))) {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super(options);
|
|
15
|
+
this.projectRoot = __dirname;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BooterApp = BooterApp;
|
|
19
|
+
//# sourceMappingURL=application.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/application.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.NotBindableDateProvider = exports.NotBindableGreetingService = exports.DateProvider = exports.BindableGreetingService = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const core_1 = require("@loopback/core");
|
|
10
|
+
let BindableGreetingService = /** @class */ (() => {
|
|
11
|
+
let BindableGreetingService = class BindableGreetingService {
|
|
12
|
+
greet(whom = 'world') {
|
|
13
|
+
return Promise.resolve(`Hello ${whom}`);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
BindableGreetingService = tslib_1.__decorate([
|
|
17
|
+
core_1.bind({
|
|
18
|
+
tags: { serviceType: 'local' },
|
|
19
|
+
scope: core_1.BindingScope.SINGLETON,
|
|
20
|
+
})
|
|
21
|
+
], BindableGreetingService);
|
|
22
|
+
return BindableGreetingService;
|
|
23
|
+
})();
|
|
24
|
+
exports.BindableGreetingService = BindableGreetingService;
|
|
25
|
+
let DateProvider = /** @class */ (() => {
|
|
26
|
+
let DateProvider = class DateProvider {
|
|
27
|
+
value() {
|
|
28
|
+
return Promise.resolve(new Date());
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
DateProvider = tslib_1.__decorate([
|
|
32
|
+
core_1.bind({ tags: { serviceType: 'local', name: 'CurrentDate' } })
|
|
33
|
+
], DateProvider);
|
|
34
|
+
return DateProvider;
|
|
35
|
+
})();
|
|
36
|
+
exports.DateProvider = DateProvider;
|
|
37
|
+
class NotBindableGreetingService {
|
|
38
|
+
greet(whom = 'world') {
|
|
39
|
+
return Promise.resolve(`Hello ${whom}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.NotBindableGreetingService = NotBindableGreetingService;
|
|
43
|
+
class NotBindableDateProvider {
|
|
44
|
+
value() {
|
|
45
|
+
return Promise.resolve(new Date());
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.NotBindableDateProvider = NotBindableDateProvider;
|
|
49
|
+
//# sourceMappingURL=bindable-classes.artifact.js.map
|
|
50
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/bindable-classes.artifact.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.GeocoderServiceProvider = void 0;
|
|
8
|
+
// A dummy service instance to make unit testing easier
|
|
9
|
+
const GeocoderSingleton = {
|
|
10
|
+
geocode(address) {
|
|
11
|
+
return Promise.resolve({ lat: 0, lng: 0 });
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
class GeocoderServiceProvider {
|
|
15
|
+
value() {
|
|
16
|
+
return Promise.resolve(GeocoderSingleton);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.GeocoderServiceProvider = GeocoderServiceProvider;
|
|
20
|
+
//# sourceMappingURL=service-provider.artifact.js.map
|
|
21
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/service-provider.artifact.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.GreetingService = void 0;
|
|
8
|
+
// NOTE(bajtos) At the moment, ServiceBooter recognizes only service providers.
|
|
9
|
+
// This class is used by tests to verify that non-provider classes are ignored.
|
|
10
|
+
class GreetingService {
|
|
11
|
+
greet(whom = 'world') {
|
|
12
|
+
return Promise.resolve(`Hello ${whom}`);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.GreetingService = GreetingService;
|
|
16
|
+
//# sourceMappingURL=service-class.artifact.js.map
|
|
17
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/service-class.artifact.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DbDataSource = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
let DbDataSource = /** @class */ (() => {
|
|
10
|
+
class DbDataSource extends repository_1.juggler.DataSource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({ name: 'db' });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
DbDataSource.dataSourceName = 'db';
|
|
16
|
+
return DbDataSource;
|
|
17
|
+
})();
|
|
18
|
+
exports.DbDataSource = DbDataSource;
|
|
19
|
+
//# sourceMappingURL=datasource.artifact.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/datasource.artifact.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.hello = exports.ArtifactTwo = exports.ArtifactOne = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
let ArtifactOne = /** @class */ (() => {
|
|
11
|
+
class ArtifactOne {
|
|
12
|
+
one() {
|
|
13
|
+
return 'ControllerOne.one()';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
rest_1.get('/one'),
|
|
18
|
+
tslib_1.__metadata("design:type", Function),
|
|
19
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
20
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
21
|
+
], ArtifactOne.prototype, "one", null);
|
|
22
|
+
return ArtifactOne;
|
|
23
|
+
})();
|
|
24
|
+
exports.ArtifactOne = ArtifactOne;
|
|
25
|
+
let ArtifactTwo = /** @class */ (() => {
|
|
26
|
+
class ArtifactTwo {
|
|
27
|
+
two() {
|
|
28
|
+
return 'ControllerTwo.two()';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
rest_1.get('/two'),
|
|
33
|
+
tslib_1.__metadata("design:type", Function),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
35
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
36
|
+
], ArtifactTwo.prototype, "two", null);
|
|
37
|
+
return ArtifactTwo;
|
|
38
|
+
})();
|
|
39
|
+
exports.ArtifactTwo = ArtifactTwo;
|
|
40
|
+
function hello() {
|
|
41
|
+
return 'hello world';
|
|
42
|
+
}
|
|
43
|
+
exports.hello = hello;
|
|
44
|
+
//# sourceMappingURL=multiple.artifact.js.map
|
|
45
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/multiple.artifact.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BooterApp = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
const service_proxy_1 = require("@loopback/service-proxy");
|
|
11
|
+
const __1 = require("../..");
|
|
12
|
+
class BooterApp extends __1.BootMixin(service_proxy_1.ServiceMixin(repository_1.RepositoryMixin(rest_1.RestApplication))) {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super(options);
|
|
15
|
+
this.projectRoot = __dirname;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BooterApp = BooterApp;
|
|
19
|
+
//# sourceMappingURL=application.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/application.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.hello = exports.ArtifactTwo = exports.ArtifactOne = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
let ArtifactOne = /** @class */ (() => {
|
|
11
|
+
class ArtifactOne {
|
|
12
|
+
one() {
|
|
13
|
+
return 'ControllerOne.one()';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
rest_1.get('/one'),
|
|
18
|
+
tslib_1.__metadata("design:type", Function),
|
|
19
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
20
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
21
|
+
], ArtifactOne.prototype, "one", null);
|
|
22
|
+
return ArtifactOne;
|
|
23
|
+
})();
|
|
24
|
+
exports.ArtifactOne = ArtifactOne;
|
|
25
|
+
let ArtifactTwo = /** @class */ (() => {
|
|
26
|
+
class ArtifactTwo {
|
|
27
|
+
two() {
|
|
28
|
+
return 'ControllerTwo.two()';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
rest_1.get('/two'),
|
|
33
|
+
tslib_1.__metadata("design:type", Function),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
35
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
36
|
+
], ArtifactTwo.prototype, "two", null);
|
|
37
|
+
return ArtifactTwo;
|
|
38
|
+
})();
|
|
39
|
+
exports.ArtifactTwo = ArtifactTwo;
|
|
40
|
+
function hello() {
|
|
41
|
+
return 'hello world';
|
|
42
|
+
}
|
|
43
|
+
exports.hello = hello;
|
|
44
|
+
//# sourceMappingURL=multiple.artifact.js.map
|
|
45
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/multiple.artifact.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BooterApp = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
const service_proxy_1 = require("@loopback/service-proxy");
|
|
11
|
+
const __1 = require("../..");
|
|
12
|
+
class BooterApp extends __1.BootMixin(service_proxy_1.ServiceMixin(repository_1.RepositoryMixin(rest_1.RestApplication))) {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super(options);
|
|
15
|
+
this.projectRoot = __dirname;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BooterApp = BooterApp;
|
|
19
|
+
//# sourceMappingURL=application.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/application.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2018. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.MyLifeCycleObserver = void 0;
|
|
8
|
+
/**
|
|
9
|
+
* An mock-up `LifeCycleObserver`. Please note that `start` and `stop` methods
|
|
10
|
+
* can be async or sync.
|
|
11
|
+
*/
|
|
12
|
+
class MyLifeCycleObserver {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.status = '';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Handling `start` event asynchronously
|
|
18
|
+
*/
|
|
19
|
+
async start() {
|
|
20
|
+
// Perform some work asynchronously
|
|
21
|
+
// await startSomeAsyncWork(...)
|
|
22
|
+
this.status = 'started';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Handling `stop` event synchronously.
|
|
26
|
+
*/
|
|
27
|
+
stop() {
|
|
28
|
+
this.status = 'stopped';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.MyLifeCycleObserver = MyLifeCycleObserver;
|
|
32
|
+
//# sourceMappingURL=lifecycle-observer.artifact.js.map
|
|
33
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/lifecycle-observer.artifact.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BooterApp = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
const service_proxy_1 = require("@loopback/service-proxy");
|
|
11
|
+
const __1 = require("../..");
|
|
12
|
+
class BooterApp extends __1.BootMixin(service_proxy_1.ServiceMixin(repository_1.RepositoryMixin(rest_1.RestApplication))) {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super(options);
|
|
15
|
+
this.projectRoot = __dirname;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BooterApp = BooterApp;
|
|
19
|
+
//# sourceMappingURL=application.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/application.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.DbDataSource = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
let DbDataSource = /** @class */ (() => {
|
|
10
|
+
class DbDataSource extends repository_1.juggler.DataSource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super({ name: 'db' });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
DbDataSource.dataSourceName = 'db';
|
|
16
|
+
return DbDataSource;
|
|
17
|
+
})();
|
|
18
|
+
exports.DbDataSource = DbDataSource;
|
|
19
|
+
//# sourceMappingURL=datasource.artifact.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/datasource.artifact.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BooterApp = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
const service_proxy_1 = require("@loopback/service-proxy");
|
|
11
|
+
const __1 = require("../..");
|
|
12
|
+
class BooterApp extends __1.BootMixin(service_proxy_1.ServiceMixin(repository_1.RepositoryMixin(rest_1.RestApplication))) {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super(options);
|
|
15
|
+
this.projectRoot = __dirname;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BooterApp = BooterApp;
|
|
19
|
+
//# sourceMappingURL=application.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/application.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Model2 = exports.Model1 = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
class Model1 extends repository_1.Model {
|
|
10
|
+
}
|
|
11
|
+
exports.Model1 = Model1;
|
|
12
|
+
class Model2 extends repository_1.Entity {
|
|
13
|
+
}
|
|
14
|
+
exports.Model2 = Model2;
|
|
15
|
+
//# sourceMappingURL=multiple-models.model.js.map
|
|
16
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/multiple-models.model.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2020. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.NoEntity = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const repository_1 = require("@loopback/repository");
|
|
10
|
+
let NoEntity = /** @class */ (() => {
|
|
11
|
+
let NoEntity = class NoEntity extends repository_1.Model {
|
|
12
|
+
};
|
|
13
|
+
tslib_1.__decorate([
|
|
14
|
+
repository_1.property({ id: true }),
|
|
15
|
+
tslib_1.__metadata("design:type", Number)
|
|
16
|
+
], NoEntity.prototype, "id", void 0);
|
|
17
|
+
tslib_1.__decorate([
|
|
18
|
+
repository_1.property({ required: true }),
|
|
19
|
+
tslib_1.__metadata("design:type", String)
|
|
20
|
+
], NoEntity.prototype, "name", void 0);
|
|
21
|
+
NoEntity = tslib_1.__decorate([
|
|
22
|
+
repository_1.model()
|
|
23
|
+
], NoEntity);
|
|
24
|
+
return NoEntity;
|
|
25
|
+
})();
|
|
26
|
+
exports.NoEntity = NoEntity;
|
|
27
|
+
//# sourceMappingURL=no-entity.model.js.map
|
|
28
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/no-entity.model.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Product = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const repository_1 = require("@loopback/repository");
|
|
10
|
+
let Product = /** @class */ (() => {
|
|
11
|
+
let Product = class Product extends repository_1.Entity {
|
|
12
|
+
};
|
|
13
|
+
tslib_1.__decorate([
|
|
14
|
+
repository_1.property({ id: true }),
|
|
15
|
+
tslib_1.__metadata("design:type", Number)
|
|
16
|
+
], Product.prototype, "id", void 0);
|
|
17
|
+
tslib_1.__decorate([
|
|
18
|
+
repository_1.property({ required: true }),
|
|
19
|
+
tslib_1.__metadata("design:type", String)
|
|
20
|
+
], Product.prototype, "name", void 0);
|
|
21
|
+
Product = tslib_1.__decorate([
|
|
22
|
+
repository_1.model()
|
|
23
|
+
], Product);
|
|
24
|
+
return Product;
|
|
25
|
+
})();
|
|
26
|
+
exports.Product = Product;
|
|
27
|
+
//# sourceMappingURL=product.model.js.map
|
|
28
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/product.model.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BooterApp = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
const service_proxy_1 = require("@loopback/service-proxy");
|
|
11
|
+
const __1 = require("../..");
|
|
12
|
+
class BooterApp extends __1.BootMixin(service_proxy_1.ServiceMixin(repository_1.RepositoryMixin(rest_1.RestApplication))) {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super(options);
|
|
15
|
+
this.projectRoot = __dirname;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BooterApp = BooterApp;
|
|
19
|
+
//# sourceMappingURL=application.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/application.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.hello = exports.ArtifactTwo = exports.ArtifactOne = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
let ArtifactOne = /** @class */ (() => {
|
|
11
|
+
class ArtifactOne {
|
|
12
|
+
one() {
|
|
13
|
+
return 'ControllerOne.one()';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
rest_1.get('/one'),
|
|
18
|
+
tslib_1.__metadata("design:type", Function),
|
|
19
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
20
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
21
|
+
], ArtifactOne.prototype, "one", null);
|
|
22
|
+
return ArtifactOne;
|
|
23
|
+
})();
|
|
24
|
+
exports.ArtifactOne = ArtifactOne;
|
|
25
|
+
let ArtifactTwo = /** @class */ (() => {
|
|
26
|
+
class ArtifactTwo {
|
|
27
|
+
two() {
|
|
28
|
+
return 'ControllerTwo.two()';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
rest_1.get('/two'),
|
|
33
|
+
tslib_1.__metadata("design:type", Function),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
35
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
36
|
+
], ArtifactTwo.prototype, "two", null);
|
|
37
|
+
return ArtifactTwo;
|
|
38
|
+
})();
|
|
39
|
+
exports.ArtifactTwo = ArtifactTwo;
|
|
40
|
+
function hello() {
|
|
41
|
+
return 'hello world';
|
|
42
|
+
}
|
|
43
|
+
exports.hello = hello;
|
|
44
|
+
//# sourceMappingURL=multiple.artifact.js.map
|
|
45
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/multiple.artifact.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "boot-test-app",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "boot-test-app",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"loopback-application",
|
|
7
|
+
"loopback"
|
|
8
|
+
],
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=10"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git"
|
|
15
|
+
},
|
|
16
|
+
"author": "IBM Corp.",
|
|
17
|
+
"license": "MIT"
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BooterApp = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
const service_proxy_1 = require("@loopback/service-proxy");
|
|
11
|
+
const __1 = require("../..");
|
|
12
|
+
class BooterApp extends __1.BootMixin(service_proxy_1.ServiceMixin(repository_1.RepositoryMixin(rest_1.RestApplication))) {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super(options);
|
|
15
|
+
this.projectRoot = __dirname;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BooterApp = BooterApp;
|
|
19
|
+
//# sourceMappingURL=application.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/application.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.hello = exports.ArtifactTwo = exports.ArtifactOne = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
let ArtifactOne = /** @class */ (() => {
|
|
11
|
+
class ArtifactOne {
|
|
12
|
+
one() {
|
|
13
|
+
return 'ControllerOne.one()';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
rest_1.get('/one'),
|
|
18
|
+
tslib_1.__metadata("design:type", Function),
|
|
19
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
20
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
21
|
+
], ArtifactOne.prototype, "one", null);
|
|
22
|
+
return ArtifactOne;
|
|
23
|
+
})();
|
|
24
|
+
exports.ArtifactOne = ArtifactOne;
|
|
25
|
+
let ArtifactTwo = /** @class */ (() => {
|
|
26
|
+
class ArtifactTwo {
|
|
27
|
+
two() {
|
|
28
|
+
return 'ControllerTwo.two()';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
rest_1.get('/two'),
|
|
33
|
+
tslib_1.__metadata("design:type", Function),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
35
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
36
|
+
], ArtifactTwo.prototype, "two", null);
|
|
37
|
+
return ArtifactTwo;
|
|
38
|
+
})();
|
|
39
|
+
exports.ArtifactTwo = ArtifactTwo;
|
|
40
|
+
function hello() {
|
|
41
|
+
return 'hello world';
|
|
42
|
+
}
|
|
43
|
+
exports.hello = hello;
|
|
44
|
+
//# sourceMappingURL=multiple.artifact.js.map
|
|
45
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/multiple.artifact.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.Product = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const repository_1 = require("@loopback/repository");
|
|
10
|
+
let Product = /** @class */ (() => {
|
|
11
|
+
let Product = class Product extends repository_1.Entity {
|
|
12
|
+
};
|
|
13
|
+
tslib_1.__decorate([
|
|
14
|
+
repository_1.property({ id: true }),
|
|
15
|
+
tslib_1.__metadata("design:type", Number)
|
|
16
|
+
], Product.prototype, "id", void 0);
|
|
17
|
+
tslib_1.__decorate([
|
|
18
|
+
repository_1.property({ required: true }),
|
|
19
|
+
tslib_1.__metadata("design:type", String)
|
|
20
|
+
], Product.prototype, "name", void 0);
|
|
21
|
+
Product = tslib_1.__decorate([
|
|
22
|
+
repository_1.model()
|
|
23
|
+
], Product);
|
|
24
|
+
return Product;
|
|
25
|
+
})();
|
|
26
|
+
exports.Product = Product;
|
|
27
|
+
//# sourceMappingURL=product.model.js.map
|
|
28
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/product.model.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BooterApp = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
const service_proxy_1 = require("@loopback/service-proxy");
|
|
11
|
+
const __1 = require("../..");
|
|
12
|
+
class BooterApp extends __1.BootMixin(service_proxy_1.ServiceMixin(repository_1.RepositoryMixin(rest_1.RestApplication))) {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super(options);
|
|
15
|
+
this.projectRoot = __dirname;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BooterApp = BooterApp;
|
|
19
|
+
//# sourceMappingURL=application.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/application.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.MyGlobalInterceptor = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const context_1 = require("@loopback/context");
|
|
10
|
+
/**
|
|
11
|
+
* This class will be bound to the application as a global `Interceptor` during
|
|
12
|
+
* `boot`
|
|
13
|
+
*/
|
|
14
|
+
let MyGlobalInterceptor = /** @class */ (() => {
|
|
15
|
+
let MyGlobalInterceptor = class MyGlobalInterceptor {
|
|
16
|
+
/*
|
|
17
|
+
constructor() {}
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* This method is used by LoopBack context to produce an interceptor function
|
|
21
|
+
* for the binding.
|
|
22
|
+
*
|
|
23
|
+
* @returns An interceptor function
|
|
24
|
+
*/
|
|
25
|
+
value() {
|
|
26
|
+
return this.intercept.bind(this);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The logic to intercept an invocation
|
|
30
|
+
* @param invocationCtx - Invocation context
|
|
31
|
+
* @param next - A function to invoke next interceptor or the target method
|
|
32
|
+
*/
|
|
33
|
+
async intercept(invocationCtx, next) {
|
|
34
|
+
// eslint-disable-next-line no-useless-catch
|
|
35
|
+
try {
|
|
36
|
+
// Add pre-invocation logic here
|
|
37
|
+
const result = await next();
|
|
38
|
+
// Add post-invocation logic here
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
// Add error handling logic here
|
|
43
|
+
throw err;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
MyGlobalInterceptor = tslib_1.__decorate([
|
|
48
|
+
context_1.globalInterceptor('auth', { tags: { name: 'myGlobalInterceptor' } })
|
|
49
|
+
], MyGlobalInterceptor);
|
|
50
|
+
return MyGlobalInterceptor;
|
|
51
|
+
})();
|
|
52
|
+
exports.MyGlobalInterceptor = MyGlobalInterceptor;
|
|
53
|
+
//# sourceMappingURL=interceptor.artifact.js.map
|
|
54
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/interceptor.artifact.js.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.MyInterceptor = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const context_1 = require("@loopback/context");
|
|
10
|
+
/**
|
|
11
|
+
* This class will be bound to the application as a global `Interceptor` during
|
|
12
|
+
* `boot`
|
|
13
|
+
*/
|
|
14
|
+
let MyInterceptor = /** @class */ (() => {
|
|
15
|
+
let MyInterceptor = class MyInterceptor {
|
|
16
|
+
/*
|
|
17
|
+
constructor() {}
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* This method is used by LoopBack context to produce an interceptor function
|
|
21
|
+
* for the binding.
|
|
22
|
+
*
|
|
23
|
+
* @returns An interceptor function
|
|
24
|
+
*/
|
|
25
|
+
value() {
|
|
26
|
+
return this.intercept.bind(this);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The logic to intercept an invocation
|
|
30
|
+
* @param invocationCtx - Invocation context
|
|
31
|
+
* @param next - A function to invoke next interceptor or the target method
|
|
32
|
+
*/
|
|
33
|
+
async intercept(invocationCtx, next) {
|
|
34
|
+
// eslint-disable-next-line no-useless-catch
|
|
35
|
+
try {
|
|
36
|
+
// Add pre-invocation logic here
|
|
37
|
+
const result = await next();
|
|
38
|
+
// Add post-invocation logic here
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
// Add error handling logic here
|
|
43
|
+
throw err;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
MyInterceptor = tslib_1.__decorate([
|
|
48
|
+
context_1.bind({ tags: { namespace: 'interceptors', name: 'myInterceptor' } })
|
|
49
|
+
], MyInterceptor);
|
|
50
|
+
return MyInterceptor;
|
|
51
|
+
})();
|
|
52
|
+
exports.MyInterceptor = MyInterceptor;
|
|
53
|
+
//# sourceMappingURL=non-global-interceptor.artifact.js.map
|
|
54
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/non-global-interceptor.artifact.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.hello = exports.ArtifactTwo = exports.ArtifactOne = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
let ArtifactOne = /** @class */ (() => {
|
|
11
|
+
class ArtifactOne {
|
|
12
|
+
one() {
|
|
13
|
+
return 'ControllerOne.one()';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
rest_1.get('/one'),
|
|
18
|
+
tslib_1.__metadata("design:type", Function),
|
|
19
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
20
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
21
|
+
], ArtifactOne.prototype, "one", null);
|
|
22
|
+
return ArtifactOne;
|
|
23
|
+
})();
|
|
24
|
+
exports.ArtifactOne = ArtifactOne;
|
|
25
|
+
let ArtifactTwo = /** @class */ (() => {
|
|
26
|
+
class ArtifactTwo {
|
|
27
|
+
two() {
|
|
28
|
+
return 'ControllerTwo.two()';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
rest_1.get('/two'),
|
|
33
|
+
tslib_1.__metadata("design:type", Function),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
35
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
36
|
+
], ArtifactTwo.prototype, "two", null);
|
|
37
|
+
return ArtifactTwo;
|
|
38
|
+
})();
|
|
39
|
+
exports.ArtifactTwo = ArtifactTwo;
|
|
40
|
+
function hello() {
|
|
41
|
+
return 'hello world';
|
|
42
|
+
}
|
|
43
|
+
exports.hello = hello;
|
|
44
|
+
//# sourceMappingURL=multiple.artifact.js.map
|
|
45
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/multiple.artifact.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.BooterApp = void 0;
|
|
8
|
+
const repository_1 = require("@loopback/repository");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
const service_proxy_1 = require("@loopback/service-proxy");
|
|
11
|
+
const __1 = require("../..");
|
|
12
|
+
class BooterApp extends __1.BootMixin(service_proxy_1.ServiceMixin(repository_1.RepositoryMixin(rest_1.RestApplication))) {
|
|
13
|
+
constructor(options) {
|
|
14
|
+
super(options);
|
|
15
|
+
this.projectRoot = __dirname;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.BooterApp = BooterApp;
|
|
19
|
+
//# sourceMappingURL=application.js.map
|
|
20
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/application.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright IBM Corp. 2019. All Rights Reserved.
|
|
3
|
+
// Node module: @loopback/boot
|
|
4
|
+
// This file is licensed under the MIT License.
|
|
5
|
+
// License text available at https://opensource.org/licenses/MIT
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.hello = exports.ArtifactTwo = exports.ArtifactOne = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
9
|
+
const rest_1 = require("@loopback/rest");
|
|
10
|
+
let ArtifactOne = /** @class */ (() => {
|
|
11
|
+
class ArtifactOne {
|
|
12
|
+
one() {
|
|
13
|
+
return 'ControllerOne.one()';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
rest_1.get('/one'),
|
|
18
|
+
tslib_1.__metadata("design:type", Function),
|
|
19
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
20
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
21
|
+
], ArtifactOne.prototype, "one", null);
|
|
22
|
+
return ArtifactOne;
|
|
23
|
+
})();
|
|
24
|
+
exports.ArtifactOne = ArtifactOne;
|
|
25
|
+
let ArtifactTwo = /** @class */ (() => {
|
|
26
|
+
class ArtifactTwo {
|
|
27
|
+
two() {
|
|
28
|
+
return 'ControllerTwo.two()';
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
rest_1.get('/two'),
|
|
33
|
+
tslib_1.__metadata("design:type", Function),
|
|
34
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
35
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
36
|
+
], ArtifactTwo.prototype, "two", null);
|
|
37
|
+
return ArtifactTwo;
|
|
38
|
+
})();
|
|
39
|
+
exports.ArtifactTwo = ArtifactTwo;
|
|
40
|
+
function hello() {
|
|
41
|
+
return 'hello world';
|
|
42
|
+
}
|
|
43
|
+
exports.hello = hello;
|
|
44
|
+
//# sourceMappingURL=multiple.artifact.js.map
|
|
45
|
+
//# sourceMappingURL=/Users/rfeng/Projects/loopback4/loopback-next/packages/boot/dist/__tests__/fixtures/multiple.artifact.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "boot-test-app",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "boot-test-app",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"loopback-application",
|
|
7
|
+
"loopback"
|
|
8
|
+
],
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=10"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git"
|
|
15
|
+
},
|
|
16
|
+
"author": "IBM Corp.",
|
|
17
|
+
"license": "MIT"
|
|
18
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Binding, BindingFilter, BindingFromClassOptions, Constructor, Context } from '@loopback/context';
|
|
2
2
|
import { Application, Component, MixinTarget } from '@loopback/core';
|
|
3
3
|
import { Bootable, Booter, BootOptions } from '../types';
|
|
4
|
+
import { BindingAddress, JSONObject, Provider, ContextSubscriptionManager, ContextEvent, Interceptor, InterceptorBindingOptions, ResolutionOptions, BindingKey, ValueOrPromise, ContextEventObserver, ContextObserver, Subscription, BindingComparator, ContextView, ResolutionSession, BindingCreationPolicy, ContextInspectOptions } from '@loopback/context';
|
|
5
|
+
import { Server, ApplicationConfig, ApplicationMetadata, LifeCycleObserver, ServiceOptions } from '@loopback/core';
|
|
4
6
|
export { Binding };
|
|
5
7
|
/**
|
|
6
8
|
* Mixin for @loopback/boot. This Mixin provides the following:
|
|
@@ -71,58 +73,58 @@ export declare function BootMixin<T extends MixinTarget<Application>>(superClass
|
|
|
71
73
|
* @param component - The component to mount booters of
|
|
72
74
|
*/
|
|
73
75
|
mountComponentBooters(component: Constructor<{}>): void;
|
|
74
|
-
readonly options:
|
|
76
|
+
readonly options: ApplicationConfig;
|
|
75
77
|
readonly state: string;
|
|
76
78
|
controller: <T_1>(controllerCtor: Constructor<T_1>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_1>;
|
|
77
|
-
server: <T_2 extends
|
|
78
|
-
servers: <T_3 extends
|
|
79
|
-
getServer: <T_4 extends
|
|
79
|
+
server: <T_2 extends Server>(ctor: Constructor<T_2>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_2>;
|
|
80
|
+
servers: <T_3 extends Server>(ctors: Constructor<T_3>[]) => Binding<any>[];
|
|
81
|
+
getServer: <T_4 extends Server>(target: string | Constructor<T_4>) => Promise<T_4>;
|
|
80
82
|
start: () => Promise<void>;
|
|
81
83
|
stop: () => Promise<void>;
|
|
82
|
-
setMetadata: (metadata:
|
|
83
|
-
lifeCycleObserver: <T_5 extends
|
|
84
|
-
service: <S>(cls: Constructor<S
|
|
85
|
-
interceptor: (interceptor:
|
|
84
|
+
setMetadata: (metadata: ApplicationMetadata) => void;
|
|
85
|
+
lifeCycleObserver: <T_5 extends LifeCycleObserver>(ctor: Constructor<T_5>, nameOrOptions?: string | BindingFromClassOptions | undefined) => Binding<T_5>;
|
|
86
|
+
service: <S>(cls: Constructor<S | Provider<S>>, nameOrOptions?: string | ServiceOptions | undefined) => Binding<S>;
|
|
87
|
+
interceptor: (interceptor: Interceptor | Constructor<Provider<Interceptor>>, nameOrOptions?: string | InterceptorBindingOptions | undefined) => Binding<Interceptor>;
|
|
86
88
|
readonly name: string;
|
|
87
|
-
readonly subscriptionManager:
|
|
89
|
+
readonly subscriptionManager: ContextSubscriptionManager;
|
|
88
90
|
readonly parent: Context | undefined;
|
|
89
|
-
emitEvent: <T_6 extends
|
|
91
|
+
emitEvent: <T_6 extends ContextEvent>(type: string, event: T_6) => void;
|
|
90
92
|
emitError: (err: unknown) => void;
|
|
91
|
-
bind: <ValueType = any>(key:
|
|
93
|
+
bind: <ValueType = any>(key: BindingAddress<ValueType>) => Binding<ValueType>;
|
|
92
94
|
add: (binding: Binding<unknown>) => Application;
|
|
93
|
-
configure: <ConfigValueType = any>(key?: string |
|
|
94
|
-
getConfigAsValueOrPromise: <ConfigValueType_1>(key:
|
|
95
|
-
getConfig: <ConfigValueType_2>(key:
|
|
96
|
-
getConfigSync: <ConfigValueType_3>(key:
|
|
97
|
-
unbind: (key:
|
|
98
|
-
subscribe: (observer:
|
|
99
|
-
unsubscribe: (observer:
|
|
95
|
+
configure: <ConfigValueType = any>(key?: string | BindingKey<unknown> | undefined) => Binding<ConfigValueType>;
|
|
96
|
+
getConfigAsValueOrPromise: <ConfigValueType_1>(key: BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?: ResolutionOptions | undefined) => ValueOrPromise<ConfigValueType_1 | undefined>;
|
|
97
|
+
getConfig: <ConfigValueType_2>(key: BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?: ResolutionOptions | undefined) => Promise<ConfigValueType_2 | undefined>;
|
|
98
|
+
getConfigSync: <ConfigValueType_3>(key: BindingAddress<unknown>, propertyPath?: string | undefined, resolutionOptions?: ResolutionOptions | undefined) => ConfigValueType_3 | undefined;
|
|
99
|
+
unbind: (key: BindingAddress<unknown>) => boolean;
|
|
100
|
+
subscribe: (observer: ContextEventObserver) => Subscription;
|
|
101
|
+
unsubscribe: (observer: ContextEventObserver) => boolean;
|
|
100
102
|
close: () => void;
|
|
101
|
-
isSubscribed: (observer:
|
|
102
|
-
createView: <T_7 = unknown>(filter: BindingFilter, comparator?:
|
|
103
|
-
contains: (key:
|
|
104
|
-
isBound: (key:
|
|
105
|
-
getOwnerContext: (key:
|
|
103
|
+
isSubscribed: (observer: ContextObserver) => boolean;
|
|
104
|
+
createView: <T_7 = unknown>(filter: BindingFilter, comparator?: BindingComparator | undefined) => ContextView<T_7>;
|
|
105
|
+
contains: (key: BindingAddress<unknown>) => boolean;
|
|
106
|
+
isBound: (key: BindingAddress<unknown>) => boolean;
|
|
107
|
+
getOwnerContext: (key: BindingAddress<unknown>) => Context | undefined;
|
|
106
108
|
find: <ValueType_1 = any>(pattern?: string | RegExp | BindingFilter | undefined) => Readonly<Binding<ValueType_1>>[];
|
|
107
109
|
findByTag: <ValueType_2 = any>(tagFilter: string | RegExp | Record<string, any>) => Readonly<Binding<ValueType_2>>[];
|
|
108
110
|
get: {
|
|
109
|
-
<ValueType_3>(keyWithPath:
|
|
110
|
-
<ValueType_4>(keyWithPath:
|
|
111
|
+
<ValueType_3>(keyWithPath: BindingAddress<ValueType_3>, session?: ResolutionSession | undefined): Promise<ValueType_3>;
|
|
112
|
+
<ValueType_4>(keyWithPath: BindingAddress<ValueType_4>, options: ResolutionOptions): Promise<ValueType_4 | undefined>;
|
|
111
113
|
};
|
|
112
114
|
getSync: {
|
|
113
|
-
<ValueType_5>(keyWithPath:
|
|
114
|
-
<ValueType_6>(keyWithPath:
|
|
115
|
+
<ValueType_5>(keyWithPath: BindingAddress<ValueType_5>, session?: ResolutionSession | undefined): ValueType_5;
|
|
116
|
+
<ValueType_6>(keyWithPath: BindingAddress<ValueType_6>, options?: ResolutionOptions | undefined): ValueType_6 | undefined;
|
|
115
117
|
};
|
|
116
118
|
getBinding: {
|
|
117
|
-
<ValueType_7 = any>(key:
|
|
118
|
-
<ValueType_8>(key:
|
|
119
|
+
<ValueType_7 = any>(key: BindingAddress<ValueType_7>): Binding<ValueType_7>;
|
|
120
|
+
<ValueType_8>(key: BindingAddress<ValueType_8>, options?: {
|
|
119
121
|
optional?: boolean | undefined;
|
|
120
122
|
} | undefined): Binding<ValueType_8> | undefined;
|
|
121
123
|
};
|
|
122
|
-
findOrCreateBinding: <T_8>(key:
|
|
123
|
-
getValueOrPromise: <ValueType_9>(keyWithPath:
|
|
124
|
-
toJSON: () =>
|
|
125
|
-
inspect: (options?:
|
|
124
|
+
findOrCreateBinding: <T_8>(key: BindingAddress<T_8>, policy?: BindingCreationPolicy | undefined) => Binding<T_8>;
|
|
125
|
+
getValueOrPromise: <ValueType_9>(keyWithPath: BindingAddress<ValueType_9>, optionsOrSession?: ResolutionSession | ResolutionOptions | undefined) => ValueOrPromise<ValueType_9 | undefined>;
|
|
126
|
+
toJSON: () => JSONObject;
|
|
127
|
+
inspect: (options?: ContextInspectOptions | undefined) => JSONObject;
|
|
126
128
|
addListener: (event: string | symbol, listener: (...args: any[]) => void) => Application;
|
|
127
129
|
on: (event: string | symbol, listener: (...args: any[]) => void) => Application;
|
|
128
130
|
once: (event: string | symbol, listener: (...args: any[]) => void) => Application;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boot.mixin.js","sourceRoot":"","sources":["../../src/mixins/boot.mixin.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,8BAA8B;AAC9B,+CAA+C;AAC/C,gEAAgE;;;AAEhE,+CAQ2B;
|
|
1
|
+
{"version":3,"file":"boot.mixin.js","sourceRoot":"","sources":["../../src/mixins/boot.mixin.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopback/boot",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "A collection of Booters for LoopBack 4 Applications",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"copyright.owner": "IBM Corp.",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@loopback/context": "^3.8.
|
|
28
|
-
"@loopback/core": "^2.
|
|
29
|
-
"@loopback/model-api-builder": "^2.1.
|
|
30
|
-
"@loopback/repository": "^2.5.
|
|
31
|
-
"@loopback/service-proxy": "^2.
|
|
27
|
+
"@loopback/context": "^3.8.1",
|
|
28
|
+
"@loopback/core": "^2.7.0",
|
|
29
|
+
"@loopback/model-api-builder": "^2.1.5",
|
|
30
|
+
"@loopback/repository": "^2.5.1",
|
|
31
|
+
"@loopback/service-proxy": "^2.3.0",
|
|
32
32
|
"@types/debug": "^4.1.5",
|
|
33
33
|
"@types/glob": "^7.1.1",
|
|
34
34
|
"debug": "^4.1.1",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"tslib": "^2.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@loopback/build": "^5.4.
|
|
40
|
-
"@loopback/eslint-config": "^7.0.
|
|
41
|
-
"@loopback/openapi-v3": "^3.4.
|
|
42
|
-
"@loopback/rest": "^5.0.
|
|
43
|
-
"@loopback/rest-crud": "^0.8.
|
|
44
|
-
"@loopback/testlab": "^3.1.
|
|
45
|
-
"@types/node": "^10.17.
|
|
39
|
+
"@loopback/build": "^5.4.1",
|
|
40
|
+
"@loopback/eslint-config": "^7.0.1",
|
|
41
|
+
"@loopback/openapi-v3": "^3.4.1",
|
|
42
|
+
"@loopback/rest": "^5.0.1",
|
|
43
|
+
"@loopback/rest-crud": "^0.8.5",
|
|
44
|
+
"@loopback/testlab": "^3.1.5",
|
|
45
|
+
"@types/node": "^10.17.24"
|
|
46
46
|
},
|
|
47
47
|
"files": [
|
|
48
48
|
"README.md",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"url": "https://github.com/strongloop/loopback-next.git",
|
|
56
56
|
"directory": "packages/boot"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "62aea854bf85c5a5995b59e6908fe5409f7eea96"
|
|
59
59
|
}
|
package/src/mixins/boot.mixin.ts
CHANGED
|
@@ -19,6 +19,36 @@ import {Bootstrapper} from '../bootstrapper';
|
|
|
19
19
|
import {BootBindings, BootTags} from '../keys';
|
|
20
20
|
import {Bootable, Booter, BootOptions} from '../types';
|
|
21
21
|
|
|
22
|
+
// FIXME(rfeng): Workaround for https://github.com/microsoft/rushstack/pull/1867
|
|
23
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
24
|
+
import {
|
|
25
|
+
BindingAddress,
|
|
26
|
+
JSONObject,
|
|
27
|
+
Provider,
|
|
28
|
+
ContextSubscriptionManager,
|
|
29
|
+
ContextEvent,
|
|
30
|
+
Interceptor,
|
|
31
|
+
InterceptorBindingOptions,
|
|
32
|
+
ResolutionOptions,
|
|
33
|
+
BindingKey,
|
|
34
|
+
ValueOrPromise,
|
|
35
|
+
ContextEventObserver,
|
|
36
|
+
ContextObserver,
|
|
37
|
+
Subscription,
|
|
38
|
+
BindingComparator,
|
|
39
|
+
ContextView,
|
|
40
|
+
ResolutionSession,
|
|
41
|
+
BindingCreationPolicy,
|
|
42
|
+
ContextInspectOptions,
|
|
43
|
+
} from '@loopback/context';
|
|
44
|
+
import {
|
|
45
|
+
Server,
|
|
46
|
+
ApplicationConfig,
|
|
47
|
+
ApplicationMetadata,
|
|
48
|
+
LifeCycleObserver,
|
|
49
|
+
ServiceOptions,
|
|
50
|
+
} from '@loopback/core';
|
|
51
|
+
|
|
22
52
|
// Binding is re-exported as Binding / Booter types are needed when consuming
|
|
23
53
|
// BootMixin and this allows a user to import them from the same package (UX!)
|
|
24
54
|
export {Binding};
|