@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.
Files changed (104) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/.sandbox/{63541odlHvc → 18043muTUQs}/model-endpoints/product.rest-config.js +0 -0
  3. package/dist/.sandbox/18043muTUQs/models/product.model.js +25 -0
  4. package/dist/.sandbox/{635419mu8mo → 18043wLA3S3}/application.js +0 -0
  5. package/dist/.sandbox/18043wLA3S3/controllers/multiple.controller.js +39 -0
  6. package/dist/.sandbox/{63541DlS0Ic → 18044FOwh70}/application.js +0 -0
  7. package/dist/.sandbox/18044FOwh70/interceptors/interceptor.interceptor.js +51 -0
  8. package/dist/.sandbox/18044FOwh70/interceptors/non-global-interceptor.interceptor.js +51 -0
  9. package/dist/.sandbox/{63541DshyBF → 18045Jt9E5K}/application.js +0 -0
  10. package/dist/.sandbox/{63541ik89oh → 18045Jt9E5K}/models/multiple-models.model.js +0 -0
  11. package/dist/.sandbox/18045Jt9E5K/models/no-entity.model.js +25 -0
  12. package/dist/.sandbox/18045Jt9E5K/models/product.model.js +25 -0
  13. package/dist/.sandbox/{63541IEce5V → 18045YaR1P2}/application.js +0 -0
  14. package/dist/.sandbox/{63541DshyBF → 18045YaR1P2}/observers/lifecycle-observer.observer.js +0 -0
  15. package/dist/.sandbox/{635415cxfJi → 18045e2CYyx}/service-provider.artifact.js +0 -0
  16. package/dist/.sandbox/18045hzRuQ4/dist/application.js +20 -0
  17. package/dist/.sandbox/{63541meTxP7 → 18045hzRuQ4}/package.json +1 -1
  18. package/dist/.sandbox/{635419t6TqH → 18045rgy7Ui}/datasource.artifact.js +5 -8
  19. package/dist/.sandbox/{63541ik89oh → 18046d8C54w}/application.js +0 -0
  20. package/dist/.sandbox/18046d8C54w/controllers/multiple.controller.js +39 -0
  21. package/dist/.sandbox/{package.json → 18046d8C54w/package.json} +1 -1
  22. package/dist/.sandbox/18046kEhstv/multiple.artifact.js +39 -0
  23. package/dist/.sandbox/18046obZENY/multiple.artifact.js +39 -0
  24. package/dist/.sandbox/{63541meTxP7 → 18047EeHfXu}/application.js +0 -0
  25. package/dist/.sandbox/18047EeHfXu/repositories/multiple.repository.js +39 -0
  26. package/dist/.sandbox/{63541nGmQFL → 18048e1iuZt}/application.js +0 -0
  27. package/dist/.sandbox/{635419mu8mo → 18048e1iuZt}/services/bindable-classes.service.js +19 -25
  28. package/dist/.sandbox/{635419mu8mo → 18048e1iuZt}/services/geocoder.service.js +0 -0
  29. package/dist/.sandbox/{635419mu8mo → 18048e1iuZt}/services/greeting.service.js +0 -0
  30. package/dist/.sandbox/18048urj9RP/application.js +20 -0
  31. package/dist/.sandbox/18048urj9RP/controllers/multiple.controller.js +39 -0
  32. package/dist/.sandbox/18048urj9RP/package.json +18 -0
  33. package/dist/.sandbox/{635411GGsm1 → 18049UriL05}/model-endpoints/no-entity.rest-config.js +0 -0
  34. package/dist/.sandbox/18049UriL05/models/no-entity.model.js +25 -0
  35. package/dist/.sandbox/{63541ruUDNf → 18049gfsPc4}/application.js +0 -0
  36. package/dist/.sandbox/{63541IEce5V → 18049gfsPc4}/datasources/db.datasource.js +5 -8
  37. package/dist/boot.component.js +30 -34
  38. package/dist/boot.component.js.map +1 -1
  39. package/dist/booters/application-metadata.booter.js +19 -23
  40. package/dist/booters/application-metadata.booter.js.map +1 -1
  41. package/dist/booters/base-artifact.booter.d.ts +1 -1
  42. package/dist/booters/base-artifact.booter.js +1 -1
  43. package/dist/booters/booter-utils.d.ts +1 -1
  44. package/dist/booters/component-application.booter.js +39 -42
  45. package/dist/booters/component-application.booter.js.map +1 -1
  46. package/dist/booters/controller.booter.js +26 -30
  47. package/dist/booters/controller.booter.js.map +1 -1
  48. package/dist/booters/datasource.booter.js +36 -40
  49. package/dist/booters/datasource.booter.js.map +1 -1
  50. package/dist/booters/interceptor.booter.d.ts +1 -2
  51. package/dist/booters/interceptor.booter.js +28 -32
  52. package/dist/booters/interceptor.booter.js.map +1 -1
  53. package/dist/booters/lifecyle-observer.booter.d.ts +1 -1
  54. package/dist/booters/lifecyle-observer.booter.js +29 -32
  55. package/dist/booters/lifecyle-observer.booter.js.map +1 -1
  56. package/dist/booters/model-api.booter.js +63 -66
  57. package/dist/booters/model-api.booter.js.map +1 -1
  58. package/dist/booters/model.booter.js +31 -35
  59. package/dist/booters/model.booter.js.map +1 -1
  60. package/dist/booters/repository.booter.js +35 -39
  61. package/dist/booters/repository.booter.js.map +1 -1
  62. package/dist/booters/service.booter.js +30 -34
  63. package/dist/booters/service.booter.js.map +1 -1
  64. package/dist/bootstrapper.d.ts +1 -2
  65. package/dist/bootstrapper.js +77 -85
  66. package/dist/bootstrapper.js.map +1 -1
  67. package/dist/keys.d.ts +1 -1
  68. package/dist/keys.js +4 -4
  69. package/dist/keys.js.map +1 -1
  70. package/dist/mixins/boot.mixin.d.ts +52 -41
  71. package/dist/mixins/boot.mixin.js +40 -18
  72. package/dist/mixins/boot.mixin.js.map +1 -1
  73. package/dist/types.d.ts +7 -1
  74. package/dist/types.js +2 -2
  75. package/dist/types.js.map +1 -1
  76. package/package.json +18 -19
  77. package/src/boot.component.ts +7 -2
  78. package/src/booters/application-metadata.booter.ts +1 -2
  79. package/src/booters/base-artifact.booter.ts +2 -2
  80. package/src/booters/booter-utils.ts +1 -1
  81. package/src/booters/controller.booter.ts +1 -2
  82. package/src/booters/datasource.booter.ts +2 -3
  83. package/src/booters/interceptor.booter.ts +3 -2
  84. package/src/booters/lifecyle-observer.booter.ts +1 -1
  85. package/src/booters/model.booter.ts +1 -2
  86. package/src/booters/repository.booter.ts +1 -2
  87. package/src/booters/service.booter.ts +2 -2
  88. package/src/bootstrapper.ts +11 -10
  89. package/src/keys.ts +1 -1
  90. package/src/mixins/boot.mixin.ts +50 -45
  91. package/src/types.ts +8 -1
  92. package/dist/.sandbox/635411GGsm1/models/no-entity.model.js +0 -28
  93. package/dist/.sandbox/63541BtDxTa/multiple.artifact.js +0 -45
  94. package/dist/.sandbox/63541DlS0Ic/repositories/multiple.repository.js +0 -45
  95. package/dist/.sandbox/63541ik89oh/models/no-entity.model.js +0 -28
  96. package/dist/.sandbox/63541ik89oh/models/product.model.js +0 -28
  97. package/dist/.sandbox/63541meTxP7/controllers/multiple.controller.js +0 -45
  98. package/dist/.sandbox/63541nGmQFL/controllers/multiple.controller.js +0 -45
  99. package/dist/.sandbox/63541odlHvc/models/product.model.js +0 -28
  100. package/dist/.sandbox/63541ruUDNf/interceptors/interceptor.interceptor.js +0 -54
  101. package/dist/.sandbox/63541ruUDNf/interceptors/non-global-interceptor.interceptor.js +0 -54
  102. package/dist/.sandbox/63541vSi6af/multiple.artifact.js +0 -45
  103. package/dist/.sandbox/application.js +0 -20
  104. 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,+CAQ2B;AAwCnB,wFA/CN,iBAAO,OA+CM;AAtCf,sDAAgD;AAChD,0FAAgG;AAEhG,kCAA+C;AAqC/C;;;;;;;;;;;GAWG;AACH,SAAgB,SAAS,CAAqC,UAAa;IACzE,OAAO,KAAM,SAAQ,UAAU;QAI7B,8DAA8D;QAC9D,YAAY,GAAG,IAAW;YACxB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YACf,IAAI,CAAC,SAAS,CAAC,8BAAa,CAAC,CAAC;YAE9B,4EAA4E;YAC5E,gFAAgF;YAChF,IAAI,CAAC,IAAI,CAAC,mBAAY,CAAC,YAAY,CAAC,CAAC,cAAc,CACjD,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CACvB,CAAC;YACF,IAAI,CAAC,IAAI,CAAC,mBAAY,CAAC,YAAY,CAAC,CAAC,cAAc,CACjD,GAAG,EAAE,wBAAC,IAAI,CAAC,W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KAAK,UAAU,EAAE;oBAClD,OAAO,wBAAwB,CAAC;iBACjC;gBAED,gFAAgF;gBAChF,MAAM,aAAa,GAAG,wBAAwB,CAAC,IAAI,CAAC;gBACpD,MAAM,YAAY,GAAG,GAAG,mBAAY,CAAC,UAAU,IAAI,aAAa,EAAE,CAAC;gBACnE,OAAO,GAAG,CAAC,OAAO,CAAsB,YAAY,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAvJD,8BAuJC;AAED;;;;;;GAMG;AACH,SAAgB,UAAU,CACxB,GAAY,EACZ,SAA8B;IAE9B,MAAM,OAAO,GAAG,6BAAsB,CAAC,SAAS,EAAE;QAChD,SAAS,EAAE,mBAAY,CAAC,aAAa;QACrC,YAAY,EAAE,mBAAY,CAAC,SAAS;KACrC,CAAC,CAAC,GAAG,CAAC,eAAQ,CAAC,MAAM,CAAC,CAAC;IACxB,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjB;;;OAGG;IACH,IAAI,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE;QACpC,GAAG;aACA,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC;aACtB,OAAO,CACN,GAAG,mBAAY,CAAC,YAAY,CAAC,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,CACvE,CAAC;KACL;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AArBD,gCAqBC;AAED,gEAAgE;AACnD,QAAA,WAAW,GAAG,UAAU,CAAC,CAAC,6BAA6B"}
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Binding, BindingSpec, Constructor } from '@loopback/context';
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 context_1 = require("@loopback/context");
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 context_1.bind({ tags: { artifactNamespace, [keys_1.BootTags.BOOTER]: keys_1.BootTags.BOOTER } }, ...specs);
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,+CAA0E;AAC1E,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,cAAI,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"}
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.1",
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/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",
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.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": "^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"
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": "62aea854bf85c5a5995b59e6908fe5409f7eea96"
57
+ "gitHead": "b89db3d3b8be6a36e63e91c2331d217fda7538de"
59
58
  }
@@ -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 {BindingScope, inject} from '@loopback/context';
7
- import {Application, Component, CoreBindings} from '@loopback/core';
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/context';
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,2019. All Rights Reserved.
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/context';
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/context';
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/context';
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,2019. All Rights Reserved.
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/context';
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/context';
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/context';
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/context';
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/context';
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/context';
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';
@@ -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 {Context, inject, resolveList} from '@loopback/context';
7
- import {Application, CoreBindings} from '@loopback/core';
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 {_bindBooter} from './mixins';
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 => _bindBooter(this.app, 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 && execOptions.filter.booters
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/context';
6
+ import {BindingKey} from '@loopback/core';
7
7
  import {Bootstrapper} from './bootstrapper';
8
8
  import {BootOptions} from './types';
9
9
 
@@ -1,4 +1,4 @@
1
- // Copyright IBM Corp. 2018,2019. All Rights Reserved.
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/context';
15
- import {Application, Component, MixinTarget} from '@loopback/core';
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
- 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';
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-ignore */
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-ignore */
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
- _bindBooter((this as unknown) as Context, cls),
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-ignore
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.mountComponentBooters(componentCtor);
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(component: Constructor<{}>) {
193
- const componentKey = `components.${component.name}`;
194
- const compInstance = this.getSync<{
195
- booters?: Constructor<Booter>[];
196
- }>(componentKey);
197
-
198
- if (compInstance.booters) {
199
- this.booters(...compInstance.booters);
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 _bindBooter(
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/context';
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