@alterior/runtime 3.11.1 → 3.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-options.d.ts +65 -65
- package/dist/app-options.js +26 -26
- package/dist/app-options.js.map +1 -1
- package/dist/application.d.ts +52 -52
- package/dist/application.js +172 -171
- package/dist/application.js.map +1 -1
- package/dist/args.d.ts +7 -7
- package/dist/args.js +13 -13
- package/dist/expose.d.ts +12 -12
- package/dist/expose.d.ts.map +1 -1
- package/dist/expose.js +36 -36
- package/dist/expose.js.map +1 -1
- package/dist/index.d.ts +9 -9
- package/dist/index.js +12 -12
- package/dist/lifecycle.d.ts +24 -24
- package/dist/lifecycle.js +2 -2
- package/dist/module.test.d.ts +1 -1
- package/dist/modules.d.ts +120 -120
- package/dist/modules.js +282 -282
- package/dist/modules.js.map +1 -1
- package/dist/reflector.d.ts +123 -123
- package/dist/reflector.js +306 -306
- package/dist/reflector.js.map +1 -1
- package/dist/roles.service.d.ts +79 -79
- package/dist/roles.service.js +124 -124
- package/dist/roles.service.js.map +1 -1
- package/dist/service.d.ts +24 -24
- package/dist/service.js +19 -19
- package/dist/service.js.map +1 -1
- package/dist/test.d.ts +1 -1
- package/dist.esm/app-options.d.ts +65 -65
- package/dist.esm/app-options.js +23 -23
- package/dist.esm/app-options.js.map +1 -1
- package/dist.esm/application.d.ts +52 -52
- package/dist.esm/application.js +167 -166
- package/dist.esm/application.js.map +1 -1
- package/dist.esm/args.d.ts +7 -7
- package/dist.esm/args.js +9 -9
- package/dist.esm/expose.d.ts +12 -12
- package/dist.esm/expose.d.ts.map +1 -1
- package/dist.esm/expose.js +31 -31
- package/dist.esm/expose.js.map +1 -1
- package/dist.esm/index.d.ts +9 -9
- package/dist.esm/index.js +9 -9
- package/dist.esm/lifecycle.d.ts +24 -24
- package/dist.esm/lifecycle.js +1 -1
- package/dist.esm/module.test.d.ts +1 -1
- package/dist.esm/modules.d.ts +120 -120
- package/dist.esm/modules.js +276 -276
- package/dist.esm/modules.js.map +1 -1
- package/dist.esm/reflector.d.ts +123 -123
- package/dist.esm/reflector.js +296 -296
- package/dist.esm/reflector.js.map +1 -1
- package/dist.esm/roles.service.d.ts +79 -79
- package/dist.esm/roles.service.js +121 -121
- package/dist.esm/roles.service.js.map +1 -1
- package/dist.esm/service.d.ts +24 -24
- package/dist.esm/service.js +15 -15
- package/dist.esm/service.js.map +1 -1
- package/dist.esm/test.d.ts +1 -1
- package/package.json +11 -11
- package/src/application.ts +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -0
- package/tsconfig.json +0 -2
- package/tsconfig.tsbuildinfo +1 -5546
package/dist/application.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../src/application.ts"],"names":[],"mappings":";;;;;AAAA,4BAA0B;AAE1B,6CAAqD;AACrD,qCAMsB;AACtB,+CAAyE;AACzE,iCAAyC;AACzC,uCAAoC;AACpC,mDAA+C;AAE/C,MAAa,qBAAqB;IACjC,YACC,OAA2B;QAE3B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;CAGD;AARD,sDAQC;AAED;;;;GAIG;AACH,MAAa,gBAAgB;IAA7B;QACC;;;WAGG;QACI,gBAAW,GAAgB,IAAI,CAAC;IAoCxC,CAAC;IAhCA;;OAEG;IACI,MAAM,KAAK,OAAO;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC3D,CAAC;IAED;;;OAGG;IACU,GAAG,CAAI,QAA0B;;YAC7C,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;gBAC5B,IAAI,EAAE,0BAA0B;gBAChC,UAAU,EAAE;oBACX,CAAC,gBAAgB,CAAC,eAAe,CAAC,EAAE,IAAI;iBACxC;aACD,CAAC,CAAC;Y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AAQ,EAAE,CAAC;gBACtB,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;gBACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACjB,CAAC;YAED,IAAI,OAAO,CAAC,SAAS;gBACpB,OAAO,CAAC,KAAK,EAAE,CAAC;YAEjB,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;YAEhC,OAAO,gBAAgB,CAAC,WAAW,CAAC;QACrC,CAAC,CAAC,CAAC;IACJ,CAAC;CAED,CAAA;AAjIY,kCAAW;sBAAX,WAAW;IADvB,IAAA,eAAU,GAAE;GACA,WAAW,CAiIvB"}
|
package/dist/args.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Abstracts the fetching of the application's arguments. This is most useful for testing,
|
|
3
|
-
* but could also be used if trying to host Alterior in a strange environment.
|
|
4
|
-
*/
|
|
5
|
-
export declare class ApplicationArgs {
|
|
6
|
-
get(): string[];
|
|
7
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Abstracts the fetching of the application's arguments. This is most useful for testing,
|
|
3
|
+
* but could also be used if trying to host Alterior in a strange environment.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ApplicationArgs {
|
|
6
|
+
get(): string[];
|
|
7
|
+
}
|
|
8
8
|
//# sourceMappingURL=args.d.ts.map
|
package/dist/args.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ApplicationArgs = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Abstracts the fetching of the application's arguments. This is most useful for testing,
|
|
6
|
-
* but could also be used if trying to host Alterior in a strange environment.
|
|
7
|
-
*/
|
|
8
|
-
class ApplicationArgs {
|
|
9
|
-
get() {
|
|
10
|
-
return process.argv.slice(2);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.ApplicationArgs = ApplicationArgs;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApplicationArgs = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Abstracts the fetching of the application's arguments. This is most useful for testing,
|
|
6
|
+
* but could also be used if trying to host Alterior in a strange environment.
|
|
7
|
+
*/
|
|
8
|
+
class ApplicationArgs {
|
|
9
|
+
get() {
|
|
10
|
+
return process.argv.slice(2);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.ApplicationArgs = ApplicationArgs;
|
|
14
14
|
//# sourceMappingURL=args.js.map
|
package/dist/expose.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export interface ExposeOptions {
|
|
2
|
-
}
|
|
3
|
-
export interface Exposure {
|
|
4
|
-
propertyName: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const EXPOSURES_PROPERTY = "alterior:service:exposures";
|
|
7
|
-
export declare function Expose(): (target: Object, propertyName: string, descriptor: PropertyDescriptor) => void;
|
|
8
|
-
export declare class ExposureReflector {
|
|
9
|
-
constructor(type: Function);
|
|
10
|
-
private getExposuresFromType;
|
|
11
|
-
exposures: Exposure[];
|
|
12
|
-
}
|
|
1
|
+
export interface ExposeOptions {
|
|
2
|
+
}
|
|
3
|
+
export interface Exposure {
|
|
4
|
+
propertyName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const EXPOSURES_PROPERTY = "alterior:service:exposures";
|
|
7
|
+
export declare function Expose(): (target: Object, propertyName: string, descriptor: PropertyDescriptor) => void;
|
|
8
|
+
export declare class ExposureReflector {
|
|
9
|
+
constructor(type: Function);
|
|
10
|
+
private getExposuresFromType;
|
|
11
|
+
exposures: Exposure[];
|
|
12
|
+
}
|
|
13
13
|
//# sourceMappingURL=expose.d.ts.map
|
package/dist/expose.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expose.d.ts","sourceRoot":"","sources":["../src/expose.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;CAE7B;AAED,MAAM,WAAW,QAAQ;IACrB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAE/D,wBAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"expose.d.ts","sourceRoot":"","sources":["../src/expose.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;CAE7B;AAED,MAAM,WAAW,QAAQ;IACrB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAE/D,wBAAgB,MAAM,KACD,QAAQ,MAAM,EAAE,cAAc,MAAM,EAAE,YAAY,kBAAkB,UAaxF;AAGD,qBAAa,iBAAiB;gBACjB,IAAI,EAAG,QAAQ;IAI3B,OAAO,CAAC,oBAAoB;IAUrB,SAAS,EAAG,QAAQ,EAAE,CAAC;CAC9B"}
|
package/dist/expose.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ExposureReflector = exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
routes.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
class ExposureReflector {
|
|
22
|
-
constructor(type) {
|
|
23
|
-
this.exposures = this.getExposuresFromType(type).map(x => (0, common_1.shallowClone)(x));
|
|
24
|
-
}
|
|
25
|
-
getExposuresFromType(type) {
|
|
26
|
-
let parentPrototype = Object.getPrototypeOf(type.prototype);
|
|
27
|
-
let exposures = (type.prototype[exports.EXPOSURES_PROPERTY] || []);
|
|
28
|
-
if (parentPrototype) {
|
|
29
|
-
return [].concat(...this.getExposuresFromType(parentPrototype.constructor), ...exposures);
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return [].concat(...exposures);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.ExposureReflector = ExposureReflector;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExposureReflector = exports.EXPOSURES_PROPERTY = void 0;
|
|
4
|
+
exports.Expose = Expose;
|
|
5
|
+
const common_1 = require("@alterior/common");
|
|
6
|
+
exports.EXPOSURES_PROPERTY = 'alterior:service:exposures';
|
|
7
|
+
function Expose() {
|
|
8
|
+
return function (target, propertyName, descriptor) {
|
|
9
|
+
if (!target.hasOwnProperty(exports.EXPOSURES_PROPERTY)) {
|
|
10
|
+
Object.defineProperty(target, exports.EXPOSURES_PROPERTY, {
|
|
11
|
+
enumerable: false,
|
|
12
|
+
value: []
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
let routes = target[exports.EXPOSURES_PROPERTY] || [];
|
|
16
|
+
routes.push({
|
|
17
|
+
propertyName
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
class ExposureReflector {
|
|
22
|
+
constructor(type) {
|
|
23
|
+
this.exposures = this.getExposuresFromType(type).map(x => (0, common_1.shallowClone)(x));
|
|
24
|
+
}
|
|
25
|
+
getExposuresFromType(type) {
|
|
26
|
+
let parentPrototype = Object.getPrototypeOf(type.prototype);
|
|
27
|
+
let exposures = (type.prototype[exports.EXPOSURES_PROPERTY] || []);
|
|
28
|
+
if (parentPrototype) {
|
|
29
|
+
return [].concat(...this.getExposuresFromType(parentPrototype.constructor), ...exposures);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
return [].concat(...exposures);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ExposureReflector = ExposureReflector;
|
|
37
37
|
//# sourceMappingURL=expose.js.map
|
package/dist/expose.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"expose.js","sourceRoot":"","sources":["../src/expose.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"expose.js","sourceRoot":"","sources":["../src/expose.ts"],"names":[],"mappings":";;;AAYA,wBAcC;AA1BD,6CAAgD;AAUnC,QAAA,kBAAkB,GAAG,4BAA4B,CAAC;AAE/D,SAAgB,MAAM;IAClB,OAAO,UAAU,MAAc,EAAE,YAAoB,EAAE,UAA8B;QACvF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,0BAAkB,CAAC,EAAE,CAAC;YAChD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,0BAAkB,EAAE;gBACjD,UAAU,EAAE,KAAK;gBACjB,KAAK,EAAE,EAAE;aACT,CAAC,CAAC;QACJ,CAAC;QAED,IAAI,MAAM,GAAG,MAAM,CAAC,0BAAkB,CAAC,IAAI,EAAE,CAAC;QAC9C,MAAM,CAAC,IAAI,CAAW;YACrB,YAAY;SACZ,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAGD,MAAa,iBAAiB;IAC7B,YAAY,IAAe;QAC1B,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAA,qBAAY,EAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;IAEO,oBAAoB,CAAC,IAAe;QAC3C,IAAI,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC5D,IAAI,SAAS,GAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,0BAAkB,CAAC,IAAI,EAAE,CAAC,CAAC;QACxE,IAAI,eAAe,EAAE,CAAC;YACrB,OAAO,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,oBAAoB,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC;QAC3F,CAAC;aAAM,CAAC;YACP,OAAO,EAAE,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC;QAChC,CAAC;IACF,CAAC;CAGD;AAhBD,8CAgBC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './app-options';
|
|
2
|
-
export * from './lifecycle';
|
|
3
|
-
export * from './args';
|
|
4
|
-
export * from './application';
|
|
5
|
-
export * from './modules';
|
|
6
|
-
export * from './reflector';
|
|
7
|
-
export * from './roles.service';
|
|
8
|
-
export * from './service';
|
|
9
|
-
export * from './expose';
|
|
1
|
+
export * from './app-options';
|
|
2
|
+
export * from './lifecycle';
|
|
3
|
+
export * from './args';
|
|
4
|
+
export * from './application';
|
|
5
|
+
export * from './modules';
|
|
6
|
+
export * from './reflector';
|
|
7
|
+
export * from './roles.service';
|
|
8
|
+
export * from './service';
|
|
9
|
+
export * from './expose';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./app-options"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./lifecycle"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./args"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./application"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./modules"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./reflector"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./roles.service"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./service"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./expose"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./app-options"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./lifecycle"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./args"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./application"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./modules"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./reflector"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./roles.service"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./service"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./expose"), exports);
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
package/dist/lifecycle.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Specifies that the implementer understands the Alterior OnInit lifecycle event.
|
|
3
|
-
* Implementing this interface is a best practice to ensure that implementations
|
|
4
|
-
* are well-formed.
|
|
5
|
-
*/
|
|
6
|
-
export interface OnInit {
|
|
7
|
-
altOnInit(): any;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Specifies that the implementer understands the Alterior OnStart lifecycle event.
|
|
11
|
-
* Implementing this interface is a best practice to ensure that implementations
|
|
12
|
-
* are well-formed.
|
|
13
|
-
*/
|
|
14
|
-
export interface OnStart {
|
|
15
|
-
altOnStart(): any;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Specifies that the implementer understands the Alterior OnStop lifecycle event.
|
|
19
|
-
* Implementing this interface is a best practice to ensure that implementations
|
|
20
|
-
* are well-formed.
|
|
21
|
-
*/
|
|
22
|
-
export interface OnStop {
|
|
23
|
-
altOnStop(): any;
|
|
24
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Specifies that the implementer understands the Alterior OnInit lifecycle event.
|
|
3
|
+
* Implementing this interface is a best practice to ensure that implementations
|
|
4
|
+
* are well-formed.
|
|
5
|
+
*/
|
|
6
|
+
export interface OnInit {
|
|
7
|
+
altOnInit(): any;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Specifies that the implementer understands the Alterior OnStart lifecycle event.
|
|
11
|
+
* Implementing this interface is a best practice to ensure that implementations
|
|
12
|
+
* are well-formed.
|
|
13
|
+
*/
|
|
14
|
+
export interface OnStart {
|
|
15
|
+
altOnStart(): any;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Specifies that the implementer understands the Alterior OnStop lifecycle event.
|
|
19
|
+
* Implementing this interface is a best practice to ensure that implementations
|
|
20
|
+
* are well-formed.
|
|
21
|
+
*/
|
|
22
|
+
export interface OnStop {
|
|
23
|
+
altOnStop(): any;
|
|
24
|
+
}
|
|
25
25
|
//# sourceMappingURL=lifecycle.d.ts.map
|
package/dist/lifecycle.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=lifecycle.js.map
|
package/dist/module.test.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=module.test.d.ts.map
|
package/dist/modules.d.ts
CHANGED
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
import { ModuleAnnotation, ModuleLike } from "@alterior/di";
|
|
2
|
-
import { Injector, Provider } from "@alterior/di";
|
|
3
|
-
/**
|
|
4
|
-
* Combines a module annotation and a target class into a single
|
|
5
|
-
* object for storage purposes in Runtime and related objects.
|
|
6
|
-
*/
|
|
7
|
-
export declare class ModuleDefinition {
|
|
8
|
-
metadata: ModuleAnnotation;
|
|
9
|
-
target: any;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Represents a live instance of a module.
|
|
13
|
-
* Contains both the module definition as well
|
|
14
|
-
* as a reference to the module instance itself.
|
|
15
|
-
*/
|
|
16
|
-
export declare class ModuleInstance {
|
|
17
|
-
readonly definition: ModuleDefinition;
|
|
18
|
-
readonly instance: any;
|
|
19
|
-
constructor(definition: ModuleDefinition, instance: any);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Used to construct a runtime environment for a given entry module.
|
|
23
|
-
* Handles resolving the module tree into an injector as well as constructing
|
|
24
|
-
* the module instances and running lifecycle events.
|
|
25
|
-
*/
|
|
26
|
-
export declare class Runtime {
|
|
27
|
-
constructor(entryModule: Function);
|
|
28
|
-
definitions: ModuleDefinition[];
|
|
29
|
-
visited: ModuleLike[];
|
|
30
|
-
instances: ModuleInstance[];
|
|
31
|
-
/**
|
|
32
|
-
* Get a specific service from the dependency injector.
|
|
33
|
-
* @param ctor
|
|
34
|
-
*/
|
|
35
|
-
getService<T>(ctor: {
|
|
36
|
-
new (...args: any[]): T;
|
|
37
|
-
}): T;
|
|
38
|
-
/**
|
|
39
|
-
* Retrieve the providers that were collected from the
|
|
40
|
-
* module graph and used to create the primary injector.
|
|
41
|
-
*/
|
|
42
|
-
providers: Provider[];
|
|
43
|
-
/**
|
|
44
|
-
* Iterate over the module definitions which are part of this
|
|
45
|
-
* runtime and append to the given array the set of dependency injection
|
|
46
|
-
* providers which are specified in the module definitions.
|
|
47
|
-
*
|
|
48
|
-
* @param providers An array which will be populated
|
|
49
|
-
*/
|
|
50
|
-
contributeProviders(providers: Provider[]): void;
|
|
51
|
-
/**
|
|
52
|
-
* Perform runtime configuration steps
|
|
53
|
-
*/
|
|
54
|
-
configure(): void;
|
|
55
|
-
private _selfTest;
|
|
56
|
-
/**
|
|
57
|
-
* True if the `--self-test` option was used to launch the application.
|
|
58
|
-
*/
|
|
59
|
-
get selfTest(): boolean;
|
|
60
|
-
processCommandLine(args: string[]): void;
|
|
61
|
-
/**
|
|
62
|
-
* Fire an event to all modules which understand it. Should be upper-camel-case, meaning
|
|
63
|
-
* to fire the altOnStart() method, send "OnStart".
|
|
64
|
-
* @param eventName
|
|
65
|
-
*/
|
|
66
|
-
fireEvent(eventName: string): void;
|
|
67
|
-
private _injector;
|
|
68
|
-
/**
|
|
69
|
-
* Get the runtime's dependency injector. This injector can provide all dependencies specified
|
|
70
|
-
* in the imported modules' `providers` definitions.
|
|
71
|
-
*/
|
|
72
|
-
get injector(): Injector;
|
|
73
|
-
/**
|
|
74
|
-
* Instantiate the modules of this runtime using the given dependency injector.
|
|
75
|
-
* The injector will be inherited into an injector that provides the dependencies
|
|
76
|
-
* specified in the imported modules' `providers` definitions.
|
|
77
|
-
*
|
|
78
|
-
* @param injector
|
|
79
|
-
*/
|
|
80
|
-
load(injector: Injector): ModuleInstance[];
|
|
81
|
-
/**
|
|
82
|
-
* Stop any services, as defined by imported modules of this runtime. For instance, if you import WebServerModule
|
|
83
|
-
* from @alterior/web-server, calling this will instruct the module to stop serving on the configured port.
|
|
84
|
-
* Also builds in a timeout to allow for all services and operations to stop before resolving.
|
|
85
|
-
*
|
|
86
|
-
* This will send the `OnStop` lifecycle event to all modules, which triggers the `altOnStop()` method of any module
|
|
87
|
-
* which implements it to be called. It also instructs the RolesService to stop any roles which are currently running.
|
|
88
|
-
* For more information about Roles, see the documentation for RolesService.
|
|
89
|
-
*/
|
|
90
|
-
stop(): Promise<void>;
|
|
91
|
-
/**
|
|
92
|
-
* Start any services, as defined by modules. For instance, if you import WebServerModule from @alterior/web-server,
|
|
93
|
-
* calling this will instruct the module to begin serving on the configured port.
|
|
94
|
-
*
|
|
95
|
-
* This will send the `OnStart` lifecycle event to all modules, which triggers the `altOnStart()` method of any module
|
|
96
|
-
* which implements it to be called. It also instructs the RolesService to start roles as per it's configuration.
|
|
97
|
-
* For more information about Roles, see the documentation for RolesService.
|
|
98
|
-
*/
|
|
99
|
-
start(): void;
|
|
100
|
-
/**
|
|
101
|
-
* Stop all running services and shut down the process
|
|
102
|
-
*/
|
|
103
|
-
shutdown(): Promise<void>;
|
|
104
|
-
/**
|
|
105
|
-
* Retrieve the ModuleAnnotation for a given Module definition, whether it be a class annotated
|
|
106
|
-
* with `@Module()` or a plain object with `$module` which configures a module class.
|
|
107
|
-
*
|
|
108
|
-
* This is an alias of ModuleAnnotation.getForClass(module)
|
|
109
|
-
*
|
|
110
|
-
* @param module
|
|
111
|
-
*/
|
|
112
|
-
getMetadataForModule(module: ModuleLike): ModuleAnnotation;
|
|
113
|
-
/**
|
|
114
|
-
* Resolves the given module, adding it to this runtime.
|
|
115
|
-
* Calls itself for all imports. Visited modules are tracked per runtime,
|
|
116
|
-
* so resolveModule() on the same runtime object will not work, preventing
|
|
117
|
-
* loops.
|
|
118
|
-
*/
|
|
119
|
-
private resolveModule;
|
|
120
|
-
}
|
|
1
|
+
import { ModuleAnnotation, ModuleLike } from "@alterior/di";
|
|
2
|
+
import { Injector, Provider } from "@alterior/di";
|
|
3
|
+
/**
|
|
4
|
+
* Combines a module annotation and a target class into a single
|
|
5
|
+
* object for storage purposes in Runtime and related objects.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ModuleDefinition {
|
|
8
|
+
metadata: ModuleAnnotation;
|
|
9
|
+
target: any;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Represents a live instance of a module.
|
|
13
|
+
* Contains both the module definition as well
|
|
14
|
+
* as a reference to the module instance itself.
|
|
15
|
+
*/
|
|
16
|
+
export declare class ModuleInstance {
|
|
17
|
+
readonly definition: ModuleDefinition;
|
|
18
|
+
readonly instance: any;
|
|
19
|
+
constructor(definition: ModuleDefinition, instance: any);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Used to construct a runtime environment for a given entry module.
|
|
23
|
+
* Handles resolving the module tree into an injector as well as constructing
|
|
24
|
+
* the module instances and running lifecycle events.
|
|
25
|
+
*/
|
|
26
|
+
export declare class Runtime {
|
|
27
|
+
constructor(entryModule: Function);
|
|
28
|
+
definitions: ModuleDefinition[];
|
|
29
|
+
visited: ModuleLike[];
|
|
30
|
+
instances: ModuleInstance[];
|
|
31
|
+
/**
|
|
32
|
+
* Get a specific service from the dependency injector.
|
|
33
|
+
* @param ctor
|
|
34
|
+
*/
|
|
35
|
+
getService<T>(ctor: {
|
|
36
|
+
new (...args: any[]): T;
|
|
37
|
+
}): T;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieve the providers that were collected from the
|
|
40
|
+
* module graph and used to create the primary injector.
|
|
41
|
+
*/
|
|
42
|
+
providers: Provider[];
|
|
43
|
+
/**
|
|
44
|
+
* Iterate over the module definitions which are part of this
|
|
45
|
+
* runtime and append to the given array the set of dependency injection
|
|
46
|
+
* providers which are specified in the module definitions.
|
|
47
|
+
*
|
|
48
|
+
* @param providers An array which will be populated
|
|
49
|
+
*/
|
|
50
|
+
contributeProviders(providers: Provider[]): void;
|
|
51
|
+
/**
|
|
52
|
+
* Perform runtime configuration steps
|
|
53
|
+
*/
|
|
54
|
+
configure(): void;
|
|
55
|
+
private _selfTest;
|
|
56
|
+
/**
|
|
57
|
+
* True if the `--self-test` option was used to launch the application.
|
|
58
|
+
*/
|
|
59
|
+
get selfTest(): boolean;
|
|
60
|
+
processCommandLine(args: string[]): void;
|
|
61
|
+
/**
|
|
62
|
+
* Fire an event to all modules which understand it. Should be upper-camel-case, meaning
|
|
63
|
+
* to fire the altOnStart() method, send "OnStart".
|
|
64
|
+
* @param eventName
|
|
65
|
+
*/
|
|
66
|
+
fireEvent(eventName: string): void;
|
|
67
|
+
private _injector;
|
|
68
|
+
/**
|
|
69
|
+
* Get the runtime's dependency injector. This injector can provide all dependencies specified
|
|
70
|
+
* in the imported modules' `providers` definitions.
|
|
71
|
+
*/
|
|
72
|
+
get injector(): Injector;
|
|
73
|
+
/**
|
|
74
|
+
* Instantiate the modules of this runtime using the given dependency injector.
|
|
75
|
+
* The injector will be inherited into an injector that provides the dependencies
|
|
76
|
+
* specified in the imported modules' `providers` definitions.
|
|
77
|
+
*
|
|
78
|
+
* @param injector
|
|
79
|
+
*/
|
|
80
|
+
load(injector: Injector): ModuleInstance[];
|
|
81
|
+
/**
|
|
82
|
+
* Stop any services, as defined by imported modules of this runtime. For instance, if you import WebServerModule
|
|
83
|
+
* from @alterior/web-server, calling this will instruct the module to stop serving on the configured port.
|
|
84
|
+
* Also builds in a timeout to allow for all services and operations to stop before resolving.
|
|
85
|
+
*
|
|
86
|
+
* This will send the `OnStop` lifecycle event to all modules, which triggers the `altOnStop()` method of any module
|
|
87
|
+
* which implements it to be called. It also instructs the RolesService to stop any roles which are currently running.
|
|
88
|
+
* For more information about Roles, see the documentation for RolesService.
|
|
89
|
+
*/
|
|
90
|
+
stop(): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Start any services, as defined by modules. For instance, if you import WebServerModule from @alterior/web-server,
|
|
93
|
+
* calling this will instruct the module to begin serving on the configured port.
|
|
94
|
+
*
|
|
95
|
+
* This will send the `OnStart` lifecycle event to all modules, which triggers the `altOnStart()` method of any module
|
|
96
|
+
* which implements it to be called. It also instructs the RolesService to start roles as per it's configuration.
|
|
97
|
+
* For more information about Roles, see the documentation for RolesService.
|
|
98
|
+
*/
|
|
99
|
+
start(): void;
|
|
100
|
+
/**
|
|
101
|
+
* Stop all running services and shut down the process
|
|
102
|
+
*/
|
|
103
|
+
shutdown(): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Retrieve the ModuleAnnotation for a given Module definition, whether it be a class annotated
|
|
106
|
+
* with `@Module()` or a plain object with `$module` which configures a module class.
|
|
107
|
+
*
|
|
108
|
+
* This is an alias of ModuleAnnotation.getForClass(module)
|
|
109
|
+
*
|
|
110
|
+
* @param module
|
|
111
|
+
*/
|
|
112
|
+
getMetadataForModule(module: ModuleLike): ModuleAnnotation;
|
|
113
|
+
/**
|
|
114
|
+
* Resolves the given module, adding it to this runtime.
|
|
115
|
+
* Calls itself for all imports. Visited modules are tracked per runtime,
|
|
116
|
+
* so resolveModule() on the same runtime object will not work, preventing
|
|
117
|
+
* loops.
|
|
118
|
+
*/
|
|
119
|
+
private resolveModule;
|
|
120
|
+
}
|
|
121
121
|
//# sourceMappingURL=modules.d.ts.map
|