express-service-bootstrap
Advanced tools
Comparing version 0.9.0 to 0.10.0
{ | ||
"name": "express-service-bootstrap", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"description": "This is a convenience package for starting a express API with security, health checks, process exits etc.", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
@@ -32,2 +32,4 @@ /// <reference types="node" /> | ||
private readonly container; | ||
static readonly DINAME_ApplicationExpress = "AE"; | ||
static readonly DINAME_HealthExpress = "HE"; | ||
private applicationStatus; | ||
@@ -34,0 +36,0 @@ private applicationPort; |
@@ -193,4 +193,4 @@ "use strict"; | ||
this.registerApplicationHandler(rootRouter, "/", 1, ApplicationTypes.Main); | ||
yield this.container.createAsyncInstanceWithoutConstructor('healthExpress', this.healthExpressListen.bind(this)); | ||
yield this.container.createAsyncInstanceWithoutConstructor('applicationExpress', this.appExpressListen.bind(this)); | ||
yield this.container.createAsyncInstanceWithoutConstructor(ApplicationBuilder.DINAME_HealthExpress, this.healthExpressListen.bind(this)); | ||
yield this.container.createAsyncInstanceWithoutConstructor(ApplicationBuilder.DINAME_ApplicationExpress, this.appExpressListen.bind(this)); | ||
} | ||
@@ -234,3 +234,3 @@ else { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const applicationExpressInstance = yield this.container.bootstrap.createAsyncInstanceWithoutConstructor(() => __awaiter(this, void 0, void 0, function* () { return Promise.resolve((0, express_1.default)()); })); | ||
const applicationExpressInstance = this.container.bootstrap.createInstanceWithoutConstructor(express_1.default); | ||
const applicationHttpServer = yield new Promise((a, r) => { | ||
@@ -266,3 +266,3 @@ try { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const healthExpressInstance = yield this.container.bootstrap.createAsyncInstanceWithoutConstructor(() => __awaiter(this, void 0, void 0, function* () { return Promise.resolve((0, express_1.default)()); })); | ||
const healthExpressInstance = this.container.bootstrap.createInstanceWithoutConstructor(express_1.default); | ||
const healthServer = yield new Promise((a, r) => { | ||
@@ -375,2 +375,4 @@ try { | ||
exports.ApplicationBuilder = ApplicationBuilder; | ||
ApplicationBuilder.DINAME_ApplicationExpress = "AE"; | ||
ApplicationBuilder.DINAME_HealthExpress = "HE"; | ||
//# sourceMappingURL=application-builder.js.map |
@@ -56,2 +56,11 @@ import { BootstrapConstructor } from "./bootstrap-constructor"; | ||
/** | ||
* Registers an existing instance based on name. | ||
* @param {string} name The name of the instance | ||
* @param {InstanceType} instance The instance of the class | ||
* @param {number} disposeSequence The dispose sequence number(optional) | ||
* @template InstanceType The type of the instance | ||
* @returns {void} void | ||
*/ | ||
registerInstance<InstanceType>(name: string, instance: InstanceType, disposeSequence?: number, overrideExistingInstance?: boolean): void; | ||
/** | ||
* Disposes an existing instance based on name. | ||
@@ -58,0 +67,0 @@ * @param {string} name The name of the instance |
@@ -106,2 +106,13 @@ "use strict"; | ||
/** | ||
* Registers an existing instance based on name. | ||
* @param {string} name The name of the instance | ||
* @param {InstanceType} instance The instance of the class | ||
* @param {number} disposeSequence The dispose sequence number(optional) | ||
* @template InstanceType The type of the instance | ||
* @returns {void} void | ||
*/ | ||
registerInstance(name, instance, disposeSequence, overrideExistingInstance = true) { | ||
throw new Error('Not implemented'); | ||
} | ||
/** | ||
* Disposes an existing instance based on name. | ||
@@ -108,0 +119,0 @@ * @param {string} name The name of the instance |
@@ -9,2 +9,3 @@ import { ApplicationShutdownStatus, ApplicationStartupStatus, ApplicationStatus } from './enum-application-life-cycle-status'; | ||
import { ApplicationRouter, Convenience } from './convenience'; | ||
export { ApplicationStatus, ApplicationShutdownStatus, ApplicationStartupStatus, ApplicationBuilder, BootstrapConstructor, DisposableSingletonContainer, IProbeResult, NullProbe, IProbe, ApplicationBuilderMiddleware, ApplicationTypes, Convenience, ApplicationRouter, HostingPath }; | ||
import { EnvironmentVariables } from './environment-variables'; | ||
export { ApplicationStatus, ApplicationShutdownStatus, ApplicationStartupStatus, ApplicationBuilder, BootstrapConstructor, DisposableSingletonContainer, IProbeResult, NullProbe, IProbe, ApplicationBuilderMiddleware, ApplicationTypes, Convenience, ApplicationRouter, HostingPath, EnvironmentVariables }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Convenience = exports.ApplicationTypes = exports.NullProbe = exports.DisposableSingletonContainer = exports.BootstrapConstructor = exports.ApplicationBuilder = exports.ApplicationStartupStatus = exports.ApplicationShutdownStatus = exports.ApplicationStatus = void 0; | ||
exports.EnvironmentVariables = exports.Convenience = exports.ApplicationTypes = exports.NullProbe = exports.DisposableSingletonContainer = exports.BootstrapConstructor = exports.ApplicationBuilder = exports.ApplicationStartupStatus = exports.ApplicationShutdownStatus = exports.ApplicationStatus = void 0; | ||
const enum_application_life_cycle_status_1 = require("./enum-application-life-cycle-status"); | ||
@@ -19,2 +19,4 @@ Object.defineProperty(exports, "ApplicationShutdownStatus", { enumerable: true, get: function () { return enum_application_life_cycle_status_1.ApplicationShutdownStatus; } }); | ||
Object.defineProperty(exports, "Convenience", { enumerable: true, get: function () { return convenience_1.Convenience; } }); | ||
const environment_variables_1 = require("./environment-variables"); | ||
Object.defineProperty(exports, "EnvironmentVariables", { enumerable: true, get: function () { return environment_variables_1.EnvironmentVariables; } }); | ||
//# sourceMappingURL=index.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SortedMap = void 0; | ||
//TODO: This is to be moved to a table data structure | ||
class SortedMap { | ||
@@ -5,0 +6,0 @@ constructor(map = new Map(), sortedKeys = new Map()) { |
{ | ||
"name": "express-service-bootstrap", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"description": "This is a convenience package for starting a express API with security, health checks, process exits etc.", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97881
37
1281
0