@loopback/boot 2.3.1 → 2.3.5
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 +49 -0
- package/dist/.sandbox/{63541odlHvc → 18043muTUQs}/model-endpoints/product.rest-config.js +0 -0
- package/dist/.sandbox/18043muTUQs/models/product.model.js +25 -0
- package/dist/.sandbox/{635419mu8mo → 18043wLA3S3}/application.js +0 -0
- package/dist/.sandbox/18043wLA3S3/controllers/multiple.controller.js +39 -0
- package/dist/.sandbox/{63541DlS0Ic → 18044FOwh70}/application.js +0 -0
- package/dist/.sandbox/18044FOwh70/interceptors/interceptor.interceptor.js +51 -0
- package/dist/.sandbox/18044FOwh70/interceptors/non-global-interceptor.interceptor.js +51 -0
- package/dist/.sandbox/{63541DshyBF → 18045Jt9E5K}/application.js +0 -0
- package/dist/.sandbox/{63541ik89oh → 18045Jt9E5K}/models/multiple-models.model.js +0 -0
- package/dist/.sandbox/18045Jt9E5K/models/no-entity.model.js +25 -0
- package/dist/.sandbox/18045Jt9E5K/models/product.model.js +25 -0
- package/dist/.sandbox/{63541IEce5V → 18045YaR1P2}/application.js +0 -0
- package/dist/.sandbox/{63541DshyBF → 18045YaR1P2}/observers/lifecycle-observer.observer.js +0 -0
- package/dist/.sandbox/{635415cxfJi → 18045e2CYyx}/service-provider.artifact.js +0 -0
- package/dist/.sandbox/18045hzRuQ4/dist/application.js +20 -0
- package/dist/.sandbox/{63541meTxP7 → 18045hzRuQ4}/package.json +1 -1
- package/dist/.sandbox/{635419t6TqH → 18045rgy7Ui}/datasource.artifact.js +5 -8
- package/dist/.sandbox/{63541ik89oh → 18046d8C54w}/application.js +0 -0
- package/dist/.sandbox/18046d8C54w/controllers/multiple.controller.js +39 -0
- package/dist/.sandbox/{package.json → 18046d8C54w/package.json} +1 -1
- package/dist/.sandbox/18046kEhstv/multiple.artifact.js +39 -0
- package/dist/.sandbox/18046obZENY/multiple.artifact.js +39 -0
- package/dist/.sandbox/{63541meTxP7 → 18047EeHfXu}/application.js +0 -0
- package/dist/.sandbox/18047EeHfXu/repositories/multiple.repository.js +39 -0
- package/dist/.sandbox/{63541nGmQFL → 18048e1iuZt}/application.js +0 -0
- package/dist/.sandbox/{635419mu8mo → 18048e1iuZt}/services/bindable-classes.service.js +19 -25
- package/dist/.sandbox/{635419mu8mo → 18048e1iuZt}/services/geocoder.service.js +0 -0
- package/dist/.sandbox/{635419mu8mo → 18048e1iuZt}/services/greeting.service.js +0 -0
- package/dist/.sandbox/18048urj9RP/application.js +20 -0
- package/dist/.sandbox/18048urj9RP/controllers/multiple.controller.js +39 -0
- package/dist/.sandbox/18048urj9RP/package.json +18 -0
- package/dist/.sandbox/{635411GGsm1 → 18049UriL05}/model-endpoints/no-entity.rest-config.js +0 -0
- package/dist/.sandbox/18049UriL05/models/no-entity.model.js +25 -0
- package/dist/.sandbox/{63541ruUDNf → 18049gfsPc4}/application.js +0 -0
- package/dist/.sandbox/{63541IEce5V → 18049gfsPc4}/datasources/db.datasource.js +5 -8
- package/dist/boot.component.js +30 -34
- package/dist/boot.component.js.map +1 -1
- package/dist/booters/application-metadata.booter.js +19 -23
- package/dist/booters/application-metadata.booter.js.map +1 -1
- package/dist/booters/base-artifact.booter.d.ts +1 -1
- package/dist/booters/base-artifact.booter.js +1 -1
- package/dist/booters/booter-utils.d.ts +1 -1
- package/dist/booters/component-application.booter.js +39 -42
- package/dist/booters/component-application.booter.js.map +1 -1
- package/dist/booters/controller.booter.js +26 -30
- package/dist/booters/controller.booter.js.map +1 -1
- package/dist/booters/datasource.booter.js +36 -40
- package/dist/booters/datasource.booter.js.map +1 -1
- package/dist/booters/interceptor.booter.d.ts +1 -2
- package/dist/booters/interceptor.booter.js +28 -32
- package/dist/booters/interceptor.booter.js.map +1 -1
- package/dist/booters/lifecyle-observer.booter.d.ts +1 -1
- package/dist/booters/lifecyle-observer.booter.js +29 -32
- package/dist/booters/lifecyle-observer.booter.js.map +1 -1
- package/dist/booters/model-api.booter.js +63 -66
- package/dist/booters/model-api.booter.js.map +1 -1
- package/dist/booters/model.booter.js +31 -35
- package/dist/booters/model.booter.js.map +1 -1
- package/dist/booters/repository.booter.js +35 -39
- package/dist/booters/repository.booter.js.map +1 -1
- package/dist/booters/service.booter.js +30 -34
- package/dist/booters/service.booter.js.map +1 -1
- package/dist/bootstrapper.d.ts +1 -2
- package/dist/bootstrapper.js +77 -85
- package/dist/bootstrapper.js.map +1 -1
- package/dist/keys.d.ts +1 -1
- package/dist/keys.js +4 -4
- package/dist/keys.js.map +1 -1
- package/dist/mixins/boot.mixin.d.ts +52 -41
- package/dist/mixins/boot.mixin.js +40 -18
- package/dist/mixins/boot.mixin.js.map +1 -1
- package/dist/types.d.ts +7 -1
- package/dist/types.js +2 -2
- package/dist/types.js.map +1 -1
- package/package.json +18 -19
- package/src/boot.component.ts +7 -2
- package/src/booters/application-metadata.booter.ts +1 -2
- package/src/booters/base-artifact.booter.ts +2 -2
- package/src/booters/booter-utils.ts +1 -1
- package/src/booters/controller.booter.ts +1 -2
- package/src/booters/datasource.booter.ts +2 -3
- package/src/booters/interceptor.booter.ts +3 -2
- package/src/booters/lifecyle-observer.booter.ts +1 -1
- package/src/booters/model.booter.ts +1 -2
- package/src/booters/repository.booter.ts +1 -2
- package/src/booters/service.booter.ts +2 -2
- package/src/bootstrapper.ts +11 -10
- package/src/keys.ts +1 -1
- package/src/mixins/boot.mixin.ts +50 -45
- package/src/types.ts +8 -1
- package/dist/.sandbox/635411GGsm1/models/no-entity.model.js +0 -28
- package/dist/.sandbox/63541BtDxTa/multiple.artifact.js +0 -45
- package/dist/.sandbox/63541DlS0Ic/repositories/multiple.repository.js +0 -45
- package/dist/.sandbox/63541ik89oh/models/no-entity.model.js +0 -28
- package/dist/.sandbox/63541ik89oh/models/product.model.js +0 -28
- package/dist/.sandbox/63541meTxP7/controllers/multiple.controller.js +0 -45
- package/dist/.sandbox/63541nGmQFL/controllers/multiple.controller.js +0 -45
- package/dist/.sandbox/63541odlHvc/models/product.model.js +0 -28
- package/dist/.sandbox/63541ruUDNf/interceptors/interceptor.interceptor.js +0 -54
- package/dist/.sandbox/63541ruUDNf/interceptors/non-global-interceptor.interceptor.js +0 -54
- package/dist/.sandbox/63541vSi6af/multiple.artifact.js +0 -45
- package/dist/.sandbox/application.js +0 -20
- package/dist/.sandbox/controllers/multiple.controller.js +0 -45
|
@@ -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
|
|
1
|
+
{"version":3,"file":"boot.mixin.js","sourceRoot":"","sources":["../../src/mixins/boot.mixin.ts"],"names":[],"mappings":"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"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Binding, BindingSpec, Constructor } from '@loopback/
|
|
1
|
+
import { Binding, BindingSpec, Constructor } from '@loopback/core';
|
|
2
2
|
/**
|
|
3
3
|
* Type definition for ArtifactOptions. These are the options supported by
|
|
4
4
|
* this Booter.
|
|
@@ -139,3 +139,9 @@ export interface Bootable {
|
|
|
139
139
|
* @param specs - Extra specs for the binding
|
|
140
140
|
*/
|
|
141
141
|
export declare function booter(artifactNamespace: string, ...specs: BindingSpec[]): ClassDecorator;
|
|
142
|
+
/**
|
|
143
|
+
* Interface to describe an object that may have an array of `booters`.
|
|
144
|
+
*/
|
|
145
|
+
export interface InstanceWithBooters {
|
|
146
|
+
booters?: Constructor<Booter>[];
|
|
147
|
+
}
|
package/dist/types.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// License text available at https://opensource.org/licenses/MIT
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.booter = exports.BOOTER_PHASES = void 0;
|
|
8
|
-
const
|
|
8
|
+
const core_1 = require("@loopback/core");
|
|
9
9
|
const keys_1 = require("./keys");
|
|
10
10
|
/**
|
|
11
11
|
* Export of an array of all the Booter phases supported by the interface
|
|
@@ -39,7 +39,7 @@ exports.BOOTER_PHASES = ['configure', 'discover', 'load'];
|
|
|
39
39
|
* @param specs - Extra specs for the binding
|
|
40
40
|
*/
|
|
41
41
|
function booter(artifactNamespace, ...specs) {
|
|
42
|
-
return
|
|
42
|
+
return core_1.bind({ tags: { artifactNamespace, [keys_1.BootTags.BOOTER]: keys_1.BootTags.BOOTER } }, ...specs);
|
|
43
43
|
}
|
|
44
44
|
exports.booter = booter;
|
|
45
45
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,8BAA8B;AAC9B,+CAA+C;AAC/C,gEAAgE;;;AAEhE
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,8BAA8B;AAC9B,+CAA+C;AAC/C,gEAAgE;;;AAEhE,yCAAuE;AACvE,iCAAgC;AAoDhC;;;GAGG;AACU,QAAA,aAAa,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;AAmE/D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,SAAgB,MAAM,CAAC,iBAAyB,EAAE,GAAG,KAAoB;IACvE,OAAO,WAAI,CACT,EAAC,IAAI,EAAE,EAAC,iBAAiB,EAAE,CAAC,eAAQ,CAAC,MAAM,CAAC,EAAE,eAAQ,CAAC,MAAM,EAAC,EAAC,EAC/D,GAAG,KAAK,CACT,CAAC;AACJ,CAAC;AALD,wBAKC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loopback/boot",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"description": "A collection of Booters for LoopBack 4 Applications",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=10"
|
|
9
|
-
},
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
8
|
+
"node": ">=10.16"
|
|
12
9
|
},
|
|
13
10
|
"scripts": {
|
|
14
11
|
"acceptance": "lb-mocha \"dist/__tests__/acceptance/**/*.js\"",
|
|
@@ -23,26 +20,28 @@
|
|
|
23
20
|
"author": "IBM Corp.",
|
|
24
21
|
"copyright.owner": "IBM Corp.",
|
|
25
22
|
"license": "MIT",
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@loopback/
|
|
28
|
-
"@loopback/
|
|
29
|
-
"@loopback/
|
|
30
|
-
"@loopback/
|
|
31
|
-
"@loopback/service-proxy": "^2.3.0",
|
|
27
|
+
"@loopback/core": "^2.9.1",
|
|
28
|
+
"@loopback/model-api-builder": "^2.1.9",
|
|
29
|
+
"@loopback/repository": "^2.9.0",
|
|
30
|
+
"@loopback/service-proxy": "^2.3.4",
|
|
32
31
|
"@types/debug": "^4.1.5",
|
|
33
|
-
"@types/glob": "^7.1.
|
|
32
|
+
"@types/glob": "^7.1.2",
|
|
34
33
|
"debug": "^4.1.1",
|
|
35
34
|
"glob": "^7.1.6",
|
|
36
35
|
"tslib": "^2.0.0"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
|
-
"@loopback/build": "^
|
|
40
|
-
"@loopback/eslint-config": "^
|
|
41
|
-
"@loopback/openapi-v3": "^3.4.
|
|
42
|
-
"@loopback/rest": "^5.0
|
|
43
|
-
"@loopback/rest-crud": "^0.8.
|
|
44
|
-
"@loopback/testlab": "^3.
|
|
45
|
-
"@types/node": "^10.17.
|
|
38
|
+
"@loopback/build": "^6.1.0",
|
|
39
|
+
"@loopback/eslint-config": "^8.0.3",
|
|
40
|
+
"@loopback/openapi-v3": "^3.4.5",
|
|
41
|
+
"@loopback/rest": "^5.2.0",
|
|
42
|
+
"@loopback/rest-crud": "^0.8.9",
|
|
43
|
+
"@loopback/testlab": "^3.2.0",
|
|
44
|
+
"@types/node": "^10.17.26"
|
|
46
45
|
},
|
|
47
46
|
"files": [
|
|
48
47
|
"README.md",
|
|
@@ -55,5 +54,5 @@
|
|
|
55
54
|
"url": "https://github.com/strongloop/loopback-next.git",
|
|
56
55
|
"directory": "packages/boot"
|
|
57
56
|
},
|
|
58
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "b89db3d3b8be6a36e63e91c2331d217fda7538de"
|
|
59
58
|
}
|
package/src/boot.component.ts
CHANGED
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
BindingScope,
|
|
8
|
+
inject,
|
|
9
|
+
Application,
|
|
10
|
+
Component,
|
|
11
|
+
CoreBindings,
|
|
12
|
+
} from '@loopback/core';
|
|
8
13
|
import {
|
|
9
14
|
ApplicationMetadataBooter,
|
|
10
15
|
ControllerBooter,
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {inject} from '@loopback/
|
|
7
|
-
import {Application, CoreBindings} from '@loopback/core';
|
|
6
|
+
import {inject, Application, CoreBindings} from '@loopback/core';
|
|
8
7
|
import debugModule from 'debug';
|
|
9
8
|
import {BootBindings} from '../keys';
|
|
10
9
|
import {Booter} from '../types';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,
|
|
1
|
+
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/boot
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {Constructor} from '@loopback/
|
|
6
|
+
import {Constructor} from '@loopback/core';
|
|
7
7
|
import debugFactory from 'debug';
|
|
8
8
|
import path from 'path';
|
|
9
9
|
import {ArtifactOptions, Booter} from '../types';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {Constructor} from '@loopback/
|
|
6
|
+
import {Constructor} from '@loopback/core';
|
|
7
7
|
import debugFactory from 'debug';
|
|
8
8
|
import path from 'path';
|
|
9
9
|
import {promisify} from 'util';
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {config, inject} from '@loopback/
|
|
7
|
-
import {Application, CoreBindings} from '@loopback/core';
|
|
6
|
+
import {config, inject, Application, CoreBindings} from '@loopback/core';
|
|
8
7
|
import {BootBindings} from '../keys';
|
|
9
8
|
import {ArtifactOptions, booter} from '../types';
|
|
10
9
|
import {BaseArtifactBooter} from './base-artifact.booter';
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,
|
|
1
|
+
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/boot
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {config, inject} from '@loopback/
|
|
7
|
-
import {CoreBindings} from '@loopback/core';
|
|
6
|
+
import {config, inject, CoreBindings} from '@loopback/core';
|
|
8
7
|
import {
|
|
9
8
|
ApplicationWithRepositories,
|
|
10
9
|
Class,
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
|
+
Application,
|
|
7
8
|
config,
|
|
8
9
|
Constructor,
|
|
10
|
+
CoreBindings,
|
|
9
11
|
inject,
|
|
10
12
|
Interceptor,
|
|
11
13
|
Provider,
|
|
12
|
-
} from '@loopback/
|
|
13
|
-
import {Application, CoreBindings} from '@loopback/core';
|
|
14
|
+
} from '@loopback/core';
|
|
14
15
|
import debugFactory from 'debug';
|
|
15
16
|
import {BootBindings} from '../keys';
|
|
16
17
|
import {ArtifactOptions, booter} from '../types';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {config, Constructor, inject} from '@loopback/
|
|
6
|
+
import {config, Constructor, inject} from '@loopback/core';
|
|
7
7
|
import {
|
|
8
8
|
Application,
|
|
9
9
|
CoreBindings,
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {config, Constructor, inject} from '@loopback/
|
|
7
|
-
import {CoreBindings} from '@loopback/core';
|
|
6
|
+
import {config, Constructor, inject, CoreBindings} from '@loopback/core';
|
|
8
7
|
import {
|
|
9
8
|
ApplicationWithRepositories,
|
|
10
9
|
ModelMetadataHelper,
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {config, inject} from '@loopback/
|
|
7
|
-
import {CoreBindings} from '@loopback/core';
|
|
6
|
+
import {config, inject, CoreBindings} from '@loopback/core';
|
|
8
7
|
import {ApplicationWithRepositories} from '@loopback/repository';
|
|
9
8
|
import {BootBindings} from '../keys';
|
|
10
9
|
import {ArtifactOptions, booter} from '../types';
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
BINDING_METADATA_KEY,
|
|
8
8
|
config,
|
|
9
9
|
Constructor,
|
|
10
|
+
CoreBindings,
|
|
10
11
|
inject,
|
|
11
12
|
MetadataInspector,
|
|
12
|
-
} from '@loopback/
|
|
13
|
-
import {CoreBindings} from '@loopback/core';
|
|
13
|
+
} from '@loopback/core';
|
|
14
14
|
import {ApplicationWithServices} from '@loopback/service-proxy';
|
|
15
15
|
import debugFactory from 'debug';
|
|
16
16
|
import {BootBindings} from '../keys';
|
package/src/bootstrapper.ts
CHANGED
|
@@ -3,12 +3,17 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
Application,
|
|
8
|
+
Context,
|
|
9
|
+
CoreBindings,
|
|
10
|
+
inject,
|
|
11
|
+
resolveList,
|
|
12
|
+
} from '@loopback/core';
|
|
8
13
|
import debugModule from 'debug';
|
|
9
14
|
import {resolve} from 'path';
|
|
10
15
|
import {BootBindings, BootTags} from './keys';
|
|
11
|
-
import {
|
|
16
|
+
import {bindBooter} from './mixins';
|
|
12
17
|
import {
|
|
13
18
|
Bootable,
|
|
14
19
|
BOOTER_PHASES,
|
|
@@ -69,16 +74,12 @@ export class Bootstrapper {
|
|
|
69
74
|
// Bind booters passed in as a part of BootOptions
|
|
70
75
|
// We use _bindBooter so this Class can be used without the Mixin
|
|
71
76
|
if (execOptions?.booters) {
|
|
72
|
-
execOptions.booters.forEach(booter =>
|
|
77
|
+
execOptions.booters.forEach(booter => bindBooter(this.app, booter));
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
// Determine the phases to be run. If a user set a phases filter, those
|
|
76
81
|
// are selected otherwise we run the default phases (BOOTER_PHASES).
|
|
77
|
-
const phases = execOptions
|
|
78
|
-
? execOptions.filter && execOptions.filter.phases
|
|
79
|
-
? execOptions.filter.phases
|
|
80
|
-
: BOOTER_PHASES
|
|
81
|
-
: BOOTER_PHASES;
|
|
82
|
+
const phases = execOptions?.filter?.phases ?? BOOTER_PHASES;
|
|
82
83
|
|
|
83
84
|
// Find booters registered to the BOOTERS_TAG by getting the bindings
|
|
84
85
|
const bindings = bootCtx.findByTag(BootTags.BOOTER);
|
|
@@ -95,7 +96,7 @@ export class Bootstrapper {
|
|
|
95
96
|
// names of booters that should be run), that is the value, otherwise it
|
|
96
97
|
// is all the registered booters by default.
|
|
97
98
|
const names = execOptions
|
|
98
|
-
? execOptions.filter
|
|
99
|
+
? execOptions.filter?.booters
|
|
99
100
|
? execOptions.filter.booters
|
|
100
101
|
: defaultBooterNames
|
|
101
102
|
: defaultBooterNames;
|
package/src/keys.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {BindingKey} from '@loopback/
|
|
6
|
+
import {BindingKey} from '@loopback/core';
|
|
7
7
|
import {Bootstrapper} from './bootstrapper';
|
|
8
8
|
import {BootOptions} from './types';
|
|
9
9
|
|
package/src/mixins/boot.mixin.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2018,
|
|
1
|
+
// Copyright IBM Corp. 2018,2020. All Rights Reserved.
|
|
2
2
|
// Node module: @loopback/boot
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
@@ -11,43 +11,24 @@ import {
|
|
|
11
11
|
Constructor,
|
|
12
12
|
Context,
|
|
13
13
|
createBindingFromClass,
|
|
14
|
-
} from '@loopback/
|
|
15
|
-
import {
|
|
14
|
+
} from '@loopback/core';
|
|
15
|
+
import {
|
|
16
|
+
Application,
|
|
17
|
+
Component,
|
|
18
|
+
CoreBindings,
|
|
19
|
+
MixinTarget,
|
|
20
|
+
} from '@loopback/core';
|
|
16
21
|
import {BootComponent} from '../boot.component';
|
|
17
22
|
import {createComponentApplicationBooterBinding} from '../booters/component-application.booter';
|
|
18
23
|
import {Bootstrapper} from '../bootstrapper';
|
|
19
24
|
import {BootBindings, BootTags} from '../keys';
|
|
20
|
-
import {Bootable, Booter, BootOptions} from '../types';
|
|
25
|
+
import {Bootable, Booter, BootOptions, InstanceWithBooters} from '../types';
|
|
21
26
|
|
|
22
27
|
// FIXME(rfeng): Workaround for https://github.com/microsoft/rushstack/pull/1867
|
|
23
28
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
24
|
-
import
|
|
25
|
-
|
|
26
|
-
|
|
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';
|
|
29
|
+
import * as loopbackContext from '@loopback/core';
|
|
30
|
+
import * as loopbackCore from '@loopback/core';
|
|
31
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
51
32
|
|
|
52
33
|
// Binding is re-exported as Binding / Booter types are needed when consuming
|
|
53
34
|
// BootMixin and this allows a user to import them from the same package (UX!)
|
|
@@ -64,6 +45,11 @@ export {Binding};
|
|
|
64
45
|
* - Provides the `booter()` convenience method to bind a Booter(s) to the Application
|
|
65
46
|
* - Override `component()` to call `mountComponentBooters`
|
|
66
47
|
* - Adds `mountComponentBooters` which binds Booters to the application from `component.booters[]`
|
|
48
|
+
*
|
|
49
|
+
* @param superClass - Application class
|
|
50
|
+
* @returns A new class that extends the super class with boot related methods
|
|
51
|
+
*
|
|
52
|
+
* @typeParam T - Type of the application class as the target for the mixin
|
|
67
53
|
*/
|
|
68
54
|
export function BootMixin<T extends MixinTarget<Application>>(superClass: T) {
|
|
69
55
|
return class extends superClass implements Bootable {
|
|
@@ -89,7 +75,7 @@ export function BootMixin<T extends MixinTarget<Application>>(superClass: T) {
|
|
|
89
75
|
* Convenience method to call bootstrapper.boot() by resolving bootstrapper
|
|
90
76
|
*/
|
|
91
77
|
async boot(): Promise<void> {
|
|
92
|
-
/* eslint-disable @typescript-eslint/ban-ts-
|
|
78
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
93
79
|
// A workaround to access protected Application methods
|
|
94
80
|
const self = (this as unknown) as Application;
|
|
95
81
|
|
|
@@ -116,7 +102,7 @@ export function BootMixin<T extends MixinTarget<Application>>(superClass: T) {
|
|
|
116
102
|
// @ts-ignore
|
|
117
103
|
this.setState('booted');
|
|
118
104
|
|
|
119
|
-
/* eslint-enable @typescript-eslint/ban-ts-
|
|
105
|
+
/* eslint-enable @typescript-eslint/ban-ts-comment */
|
|
120
106
|
}
|
|
121
107
|
|
|
122
108
|
/**
|
|
@@ -132,7 +118,7 @@ export function BootMixin<T extends MixinTarget<Application>>(superClass: T) {
|
|
|
132
118
|
*/
|
|
133
119
|
booters(...booterCls: Constructor<Booter>[]): Binding[] {
|
|
134
120
|
return booterCls.map(cls =>
|
|
135
|
-
|
|
121
|
+
bindBooter((this as unknown) as Context, cls),
|
|
136
122
|
);
|
|
137
123
|
}
|
|
138
124
|
|
|
@@ -171,14 +157,16 @@ export function BootMixin<T extends MixinTarget<Application>>(superClass: T) {
|
|
|
171
157
|
*/
|
|
172
158
|
// Unfortunately, TypeScript does not allow overriding methods inherited
|
|
173
159
|
// from mapped types. https://github.com/microsoft/TypeScript/issues/38496
|
|
174
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-
|
|
160
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
175
161
|
// @ts-ignore
|
|
176
162
|
public component<C extends Component = Component>(
|
|
177
163
|
componentCtor: Constructor<C>,
|
|
178
164
|
nameOrOptions?: string | BindingFromClassOptions,
|
|
179
165
|
) {
|
|
180
166
|
const binding = super.component(componentCtor, nameOrOptions);
|
|
181
|
-
this.
|
|
167
|
+
const instance = this.getSync<InstanceWithBooters>(binding.key);
|
|
168
|
+
|
|
169
|
+
this.mountComponentBooters(instance);
|
|
182
170
|
return binding;
|
|
183
171
|
}
|
|
184
172
|
|
|
@@ -189,14 +177,28 @@ export function BootMixin<T extends MixinTarget<Application>>(superClass: T) {
|
|
|
189
177
|
*
|
|
190
178
|
* @param component - The component to mount booters of
|
|
191
179
|
*/
|
|
192
|
-
mountComponentBooters(
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
180
|
+
mountComponentBooters(
|
|
181
|
+
componentInstanceOrClass: Constructor<unknown> | InstanceWithBooters,
|
|
182
|
+
) {
|
|
183
|
+
const componentInstance = resolveComponentInstance(this);
|
|
184
|
+
if (componentInstance.booters) {
|
|
185
|
+
this.booters(...componentInstance.booters);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Determines if componentInstanceOrClass is an instance of a component,
|
|
190
|
+
* or a class that needs to be instantiated from context.
|
|
191
|
+
* @param ctx
|
|
192
|
+
*/
|
|
193
|
+
function resolveComponentInstance(ctx: Readonly<Context>) {
|
|
194
|
+
if (typeof componentInstanceOrClass !== 'function') {
|
|
195
|
+
return componentInstanceOrClass;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// TODO(semver-major) @bajtos: Reminder to remove this on the next major release
|
|
199
|
+
const componentName = componentInstanceOrClass.name;
|
|
200
|
+
const componentKey = `${CoreBindings.COMPONENTS}.${componentName}`;
|
|
201
|
+
return ctx.getSync<InstanceWithBooters>(componentKey);
|
|
200
202
|
}
|
|
201
203
|
}
|
|
202
204
|
};
|
|
@@ -209,7 +211,7 @@ export function BootMixin<T extends MixinTarget<Application>>(superClass: T) {
|
|
|
209
211
|
* @param ctx - The Context to bind the Booter Class
|
|
210
212
|
* @param booterCls - Booter class to be bound
|
|
211
213
|
*/
|
|
212
|
-
export function
|
|
214
|
+
export function bindBooter(
|
|
213
215
|
ctx: Context,
|
|
214
216
|
booterCls: Constructor<Booter>,
|
|
215
217
|
): Binding {
|
|
@@ -231,3 +233,6 @@ export function _bindBooter(
|
|
|
231
233
|
}
|
|
232
234
|
return binding;
|
|
233
235
|
}
|
|
236
|
+
|
|
237
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
238
|
+
export const _bindBooter = bindBooter; // For backward-compatibility
|
package/src/types.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This file is licensed under the MIT License.
|
|
4
4
|
// License text available at https://opensource.org/licenses/MIT
|
|
5
5
|
|
|
6
|
-
import {bind, Binding, BindingSpec, Constructor} from '@loopback/
|
|
6
|
+
import {bind, Binding, BindingSpec, Constructor} from '@loopback/core';
|
|
7
7
|
import {BootTags} from './keys';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -159,3 +159,10 @@ export function booter(artifactNamespace: string, ...specs: BindingSpec[]) {
|
|
|
159
159
|
...specs,
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Interface to describe an object that may have an array of `booters`.
|
|
165
|
+
*/
|
|
166
|
+
export interface InstanceWithBooters {
|
|
167
|
+
booters?: Constructor<Booter>[];
|
|
168
|
+
}
|
|
@@ -1,28 +0,0 @@
|
|
|
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
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|