Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/lightship

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/lightship - npm Package Compare versions

Comparing version 4.0.0 to 6.1.0

64

lightship/index.d.ts

@@ -1,4 +0,4 @@

// Type definitions for lightship 4.0
// Type definitions for lightship 6.1
// Project: https://github.com/gajus/lightship#readme
// Definitions by: Scott Chang <https://github.com/purmac>, Karoun Kasraie <https://github.com/karoun>
// Definitions by: Scott Chang <https://github.com/purmac>, Karoun Kasraie <https://github.com/karoun>, Jay Anslow <https://github.com/janslow>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

@@ -13,3 +13,3 @@ /// <reference types="node" />

*/
export function createLightship(userConfiguration?: UserConfigurationType): LightshipType;
export function createLightship(configuration?: ConfigurationInputType): LightshipType;

@@ -22,11 +22,34 @@ export type BeaconContextType = object;

export interface UserConfigurationType {
/* Run Lightship in local mode when Kubernetes is not detected. Default: true. */
export interface ConfigurationInputType {
/**
* Run Lightship in local mode when Kubernetes is not detected.
* @default true.
*/
detectKubernetes?: boolean;
/* The port on which the Lightship service listens. This port must be different than your main service port, if any. The default port is 9000. */
/**
* A number of milliseconds before forcefull termination if process does not gracefully exit.
* The timer starts when `lightship.shutdown()` is called. This includes the time allowed to live beacons.
* @default 60_000
*/
gracefulShutdownTimeout?: number;
/**
* The port on which the Lightship service listens. This port must be different than your main service port, if any.
* @default 9000
*/
port?: number;
/* An a array of [signal events]{@link https://nodejs.org/api/process.html#process_signal_events}. Default: [SIGTERM, SIGHUP, SIGINT]. */
/**
* A number of milliseconds before forceful termination if shutdown handlers do not complete. The timer starts when the first shutdown handler is called.
* @default 5000
*/
shutdownHandlerTimeout?: number;
/**
* An a array of [signal events](https://nodejs.org/api/process.html#process_signal_events).
* @default [SIGTERM, SIGHUP, SIGINT].
*/
signals?: ReadonlyArray<NodeJS.Signals>;
/* A number of milliseconds before forceful termination. Default: 60000. */
timeout?: number;
/**
* Method used to terminate Node.js process
* @default `() => { process.exit(1) };`
*/
terminate?: () => void;
}

@@ -36,5 +59,9 @@

createBeacon: (context?: BeaconContextType) => BeaconControllerType;
/* Checks if server is in SERVER_IS_READY state */
/**
* Checks if server is in SERVER_IS_READY state.
*/
isServerReady: () => boolean;
/* Checks if server is in SERVER_IS_SHUTTING_DOWN state */
/**
* Checks if server is in SERVER_IS_SHUTTING_DOWN state.
*/
isServerShuttingDown: () => boolean;

@@ -48,10 +75,19 @@ /**

readonly server: Server;
/* Changes server state to SERVER_IS_SHUTTING_DOWN and initialises the shutdown of the application.*/
/**
* Changes server state to SERVER_IS_SHUTTING_DOWN and initialises the shutdown of the application.
*/
shutdown: () => Promise<void>;
/* Changes server state to SERVER_IS_NOT_READY. */
/**
* Changes server state to SERVER_IS_NOT_READY.
*/
signalNotReady: () => void;
/* Changes server state to SERVER_IS_READY. */
/**
* Changes server state to SERVER_IS_READY.
*/
signalReady: () => void;
}
/**
* A teardown function called when shutdown is initialized.
*/
export type ShutdownHandlerType = () => Promise<void> | void;
{
"name": "@types/lightship",
"version": "4.0.0",
"version": "6.1.0",
"description": "TypeScript definitions for lightship",

@@ -16,2 +16,7 @@ "license": "MIT",

"githubUsername": "karoun"
},
{
"name": "Jay Anslow",
"url": "https://github.com/janslow",
"githubUsername": "janslow"
}

@@ -30,4 +35,4 @@ ],

},
"typesPublisherContentHash": "68144e2aef30d1472d10a4301eabb9f9aabbabb3e0eca4e2184542c33d37ddce",
"typeScriptVersion": "2.8"
"typesPublisherContentHash": "2ba5768e52422f791090bd10a21646ffc041690c019a76fb3bf9cc43d8c098ef",
"typeScriptVersion": "3.0"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Fri, 03 Jan 2020 23:09:30 GMT
* Last updated: Fri, 05 Jun 2020 17:16:13 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by Scott Chang (https://github.com/purmac), and Karoun Kasraie (https://github.com/karoun).
These definitions were written by [Scott Chang](https://github.com/purmac), [Karoun Kasraie](https://github.com/karoun), and [Jay Anslow](https://github.com/janslow).

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc