Comparing version 1.3.0 to 1.4.0
@@ -157,2 +157,8 @@ "use strict"; | ||
return { | ||
isServerReady: () => { | ||
return serverIsReady; | ||
}, | ||
isServerShuttingDown: () => { | ||
return serverIsShuttingDown; | ||
}, | ||
registerShutdownHandler: shutdownHandler => { | ||
@@ -159,0 +165,0 @@ shutdownHandlers.push(shutdownHandler); |
@@ -7,10 +7,16 @@ "use strict"; | ||
exports.SERVER_IS_SHUTTING_DOWN = exports.SERVER_IS_READY = exports.SERVER_IS_NOT_SHUTTING_DOWN = exports.SERVER_IS_NOT_READY = void 0; | ||
const SERVER_IS_NOT_READY = 'SERVER_IS_NOT_READY'; | ||
const createState = subject => { | ||
// $FlowFixMe | ||
return subject; | ||
}; | ||
const SERVER_IS_NOT_READY = createState('SERVER_IS_NOT_READY'); | ||
exports.SERVER_IS_NOT_READY = SERVER_IS_NOT_READY; | ||
const SERVER_IS_NOT_SHUTTING_DOWN = 'SERVER_IS_NOT_SHUTTING_DOWN'; | ||
const SERVER_IS_NOT_SHUTTING_DOWN = createState('SERVER_IS_NOT_SHUTTING_DOWN'); | ||
exports.SERVER_IS_NOT_SHUTTING_DOWN = SERVER_IS_NOT_SHUTTING_DOWN; | ||
const SERVER_IS_READY = 'SERVER_IS_READY'; | ||
const SERVER_IS_READY = createState('SERVER_IS_READY'); | ||
exports.SERVER_IS_READY = SERVER_IS_READY; | ||
const SERVER_IS_SHUTTING_DOWN = 'SERVER_IS_SHUTTING_DOWN'; | ||
const SERVER_IS_SHUTTING_DOWN = createState('SERVER_IS_SHUTTING_DOWN'); | ||
exports.SERVER_IS_SHUTTING_DOWN = SERVER_IS_SHUTTING_DOWN; | ||
//# sourceMappingURL=states.js.map |
@@ -14,28 +14,28 @@ { | ||
"express": "^5.0.0-alpha.6", | ||
"roarr": "^2.3.2", | ||
"serialize-error": "^2.1.0" | ||
"roarr": "^2.11.8", | ||
"serialize-error": "^3.0.0" | ||
}, | ||
"description": "Abstracts readiness/ liveness checks and graceful shutdown of Node.js services running in Kubernetes.", | ||
"devDependencies": { | ||
"@babel/cli": "^7.0.0-beta.53", | ||
"@babel/core": "^7.0.0-beta.53", | ||
"@babel/node": "^7.0.0-beta.53", | ||
"@babel/plugin-transform-flow-strip-types": "^7.0.0-beta.53", | ||
"@babel/preset-env": "^7.0.0-beta.53", | ||
"@babel/register": "^7.0.0-beta.53", | ||
"@babel/cli": "^7.2.0", | ||
"@babel/core": "^7.2.0", | ||
"@babel/node": "^7.2.0", | ||
"@babel/plugin-transform-flow-strip-types": "^7.2.0", | ||
"@babel/preset-env": "^7.2.0", | ||
"@babel/register": "^7.0.0", | ||
"ava": "^1.0.0-beta.6", | ||
"axios": "^0.18.0", | ||
"babel-plugin-istanbul": "^5.0.0", | ||
"babel-plugin-istanbul": "^5.1.0", | ||
"coveralls": "^3.0.2", | ||
"delay": "^3.0.0", | ||
"eslint": "^5.1.0", | ||
"eslint-config-canonical": "^11.0.0", | ||
"flow-bin": "^0.76.0", | ||
"flow-copy-source": "^2.0.1", | ||
"get-port": "^3.2.0", | ||
"gitdown": "^2.5.2", | ||
"husky": "^1.0.0-rc.13", | ||
"nyc": "^13.0.0", | ||
"semantic-release": "^15.7.2", | ||
"sinon": "^6.1.3" | ||
"delay": "^4.1.0", | ||
"eslint": "^5.9.0", | ||
"eslint-config-canonical": "^13.0.0", | ||
"flow-bin": "^0.87.0", | ||
"flow-copy-source": "^2.0.2", | ||
"get-port": "^4.0.0", | ||
"gitdown": "^2.5.5", | ||
"husky": "^1.2.0", | ||
"nyc": "^13.1.0", | ||
"semantic-release": "^15.12.4", | ||
"sinon": "^7.1.1" | ||
}, | ||
@@ -79,3 +79,3 @@ "engines": { | ||
}, | ||
"version": "1.3.0" | ||
"version": "1.4.0" | ||
} |
@@ -109,2 +109,4 @@ <a name="lightship"></a> | ||
type LightshipType = {| | ||
+isServerReady: () => boolean, | ||
+isServerShuttingDown: () => boolean, | ||
+registerShutdownHandler: (shutdownHandler: ShutdownHandlerType) => void, | ||
@@ -111,0 +113,0 @@ +shutdown: () => Promise<void>, |
@@ -139,2 +139,8 @@ // @flow | ||
return { | ||
isServerReady: () => { | ||
return serverIsReady; | ||
}, | ||
isServerShuttingDown: () => { | ||
return serverIsShuttingDown; | ||
}, | ||
registerShutdownHandler: (shutdownHandler) => { | ||
@@ -141,0 +147,0 @@ shutdownHandlers.push(shutdownHandler); |
// @flow | ||
export const SERVER_IS_NOT_READY = 'SERVER_IS_NOT_READY'; | ||
export const SERVER_IS_NOT_SHUTTING_DOWN = 'SERVER_IS_NOT_SHUTTING_DOWN'; | ||
export const SERVER_IS_READY = 'SERVER_IS_READY'; | ||
export const SERVER_IS_SHUTTING_DOWN = 'SERVER_IS_SHUTTING_DOWN'; | ||
import type { | ||
StateType | ||
} from './types'; | ||
const createState = (subject: *): StateType => { | ||
// $FlowFixMe | ||
return subject; | ||
}; | ||
export const SERVER_IS_NOT_READY = createState('SERVER_IS_NOT_READY'); | ||
export const SERVER_IS_NOT_SHUTTING_DOWN = createState('SERVER_IS_NOT_SHUTTING_DOWN'); | ||
export const SERVER_IS_READY = createState('SERVER_IS_READY'); | ||
export const SERVER_IS_SHUTTING_DOWN = createState('SERVER_IS_SHUTTING_DOWN'); |
@@ -17,2 +17,8 @@ // @flow | ||
export opaque type StateType = | ||
'SERVER_IS_NOT_READY' | | ||
'SERVER_IS_NOT_SHUTTING_DOWN' | | ||
'SERVER_IS_READY' | | ||
'SERVER_IS_SHUTTING_DOWN'; | ||
/** | ||
@@ -25,2 +31,4 @@ * @property registerShutdownHandler Registers teardown functions that are called when shutdown is initialized. All registered shutdown handlers are executed in the order they have been registered. After all shutdown handlers have been executed, Lightship asks `process.exit()` to terminate the process synchronously. | ||
export type LightshipType = {| | ||
+isServerReady: () => boolean, | ||
+isServerShuttingDown: () => boolean, | ||
+registerShutdownHandler: (shutdownHandler: ShutdownHandlerType) => void, | ||
@@ -27,0 +35,0 @@ +shutdown: () => Promise<void>, |
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
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
40359
358
319
+ Addedserialize-error@3.0.0(transitive)
- Removedserialize-error@2.1.0(transitive)
Updatedroarr@^2.11.8
Updatedserialize-error@^3.0.0