@tiermobility/tile38-ts
Advanced tools
Comparing version 1.3.0 to 1.3.1
/// <reference types="node" /> | ||
import EventEmitter from 'events'; | ||
import { RedisClientOptions } from 'redis'; | ||
import { JSONResponse } from './responses'; | ||
@@ -89,3 +90,3 @@ export declare enum Command { | ||
private format; | ||
constructor(url: string); | ||
constructor(url: string, options?: RedisClientOptions); | ||
private connect; | ||
@@ -92,0 +93,0 @@ private connectSubscriber; |
@@ -97,6 +97,6 @@ "use strict"; | ||
class Client extends events_1.default { | ||
constructor(url) { | ||
constructor(url, options) { | ||
super(); | ||
this.format = Format.RESP; | ||
this.redis = (0, redis_1.createClient)({ url }) | ||
this.redis = (0, redis_1.createClient)({ ...options, url }) | ||
.on('ready', () => { | ||
@@ -103,0 +103,0 @@ this.format = Format.RESP; |
/// <reference types="node" /> | ||
import EventEmitter from 'events'; | ||
import { RedisClientOptions } from 'redis'; | ||
import { Client } from './Client'; | ||
@@ -8,3 +9,3 @@ import { BoundsResponse, ChansResponse, ConfigGetResponse, ConfigKeys, HooksResponse, InfoFollowerResponse, JSONResponse, JsonGetResponse, KeysResponse, PingResponse, ServerExtendedResponse, ServerFollowerResponse, StatsResponse } from './responses'; | ||
readonly client: Client; | ||
constructor(url: string); | ||
constructor(url: string, options?: RedisClientOptions); | ||
bounds(key: string): Promise<BoundsResponse>; | ||
@@ -11,0 +12,0 @@ chans(pattern?: string): Promise<ChansResponse>; |
@@ -11,5 +11,5 @@ "use strict"; | ||
class Follower extends events_1.default { | ||
constructor(url) { | ||
constructor(url, options) { | ||
super(); | ||
this.client = new Client_1.Client(url).on('error', (error) => { | ||
this.client = new Client_1.Client(url, options).on('error', (error) => { | ||
/* istanbul ignore next */ | ||
@@ -16,0 +16,0 @@ this.emit('error', error); |
@@ -0,1 +1,2 @@ | ||
import { RedisClientOptions } from 'redis'; | ||
import { Follower } from './Follower'; | ||
@@ -6,3 +7,3 @@ import { Leader } from './Leader'; | ||
readonly _follower?: Follower; | ||
constructor(url?: string | undefined, followerUrl?: string | undefined); | ||
constructor(url?: string | undefined, followerUrl?: string | undefined, options?: RedisClientOptions); | ||
follower(): FollowerInterface; | ||
@@ -9,0 +10,0 @@ quit(force?: boolean): Promise<void>; |
@@ -8,6 +8,7 @@ "use strict"; | ||
class Tile38 extends Leader_1.Leader { | ||
constructor(url = process.env.TILE38_LEADER_URI || process.env.TILE38_URI, followerUrl = process.env.TILE38_FOLLOWER_URI) { | ||
super(url); | ||
/* eslint-disable default-param-last */ | ||
constructor(url = process.env.TILE38_LEADER_URI || process.env.TILE38_URI, followerUrl = process.env.TILE38_FOLLOWER_URI, options) { | ||
super(url, options); | ||
if (followerUrl) { | ||
this._follower = new Follower_1.Follower(followerUrl).on('error', (error) => { | ||
this._follower = new Follower_1.Follower(followerUrl, options).on('error', (error) => { | ||
/* istanbul ignore next */ | ||
@@ -14,0 +15,0 @@ this.emit('error', error); |
{ | ||
"name": "@tiermobility/tile38-ts", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A Node.js Tile38 client written in TypeScript", | ||
@@ -49,3 +49,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@types/node": "18.15.3", | ||
"@types/node": "18.15.11", | ||
"@vpriem/geojson": "1.1.0", | ||
@@ -55,3 +55,3 @@ "redis": "4.5.1" | ||
"devDependencies": { | ||
"@commitlint/cli": "17.4.4", | ||
"@commitlint/cli": "17.6.3", | ||
"@commitlint/config-conventional": "17.4.2", | ||
@@ -65,3 +65,3 @@ "@semantic-release/changelog": "6.0.2", | ||
"@typescript-eslint/eslint-plugin": "5.51.0", | ||
"@typescript-eslint/parser": "5.52.0", | ||
"@typescript-eslint/parser": "5.56.0", | ||
"conventional-changelog-conventionalcommits": "5.0.0", | ||
@@ -72,3 +72,3 @@ "coveralls": "3.1.1", | ||
"eslint-config-airbnb-base": "15.0.0", | ||
"eslint-config-prettier": "8.6.0", | ||
"eslint-config-prettier": "8.8.0", | ||
"eslint-import-resolver-typescript": "3.5.3", | ||
@@ -81,5 +81,5 @@ "eslint-plugin-import": "2.26.0", | ||
"pinst": "3.0.0", | ||
"prettier": "2.8.4", | ||
"rimraf": "4.1.2", | ||
"semantic-release": "19.0.5", | ||
"prettier": "2.8.7", | ||
"rimraf": "4.4.1", | ||
"semantic-release": "21.0.2", | ||
"ts-jest": "27.1.4", | ||
@@ -86,0 +86,0 @@ "typescript": "4.8.4" |
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
195794
2301
+ Added@types/node@18.15.11(transitive)
- Removed@types/node@18.15.3(transitive)
Updated@types/node@18.15.11