desplega-api
Advanced tools
Comparing version 3.0.6 to 3.1.0
@@ -31,2 +31,6 @@ "use strict"; | ||
this.context = { | ||
addRemote: (name, config) => { | ||
this.context.remoteProcessors[name] = new Remote_1.default(config, this.context.remoteOptions); | ||
this.listenToRemotes([name]); | ||
}, | ||
globals: {}, | ||
@@ -107,4 +111,4 @@ history: [], | ||
} | ||
listenToRemotes() { | ||
const ids = Object.keys(Object.assign({}, this.context.remoteProcessors)); | ||
listenToRemotes(remotesIds) { | ||
const ids = remotesIds ? remotesIds : Object.keys(Object.assign({}, this.context.remoteProcessors)); | ||
for (let i = 0; i < ids.length; i++) { | ||
@@ -111,0 +115,0 @@ const remote = this.context.remoteProcessors[ids[i]]; |
@@ -23,2 +23,3 @@ /// <reference types="node" /> | ||
export interface Context { | ||
addRemote: (name: string, config: ConnectConfig) => void; | ||
globals: { | ||
@@ -25,0 +26,0 @@ [name: string]: any; |
{ | ||
"name": "desplega-api", | ||
"version": "3.0.6", | ||
"version": "3.1.0", | ||
"description": "Series of useful modules to create rich automation pipelines", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -9,2 +9,3 @@ import { PipelineDescriptor, Context, RemoteCollection, Header, RemoteCollectionDescriptor } from './Pipeline.types' | ||
import { EventEmitter } from 'events' | ||
import { ConnectConfig } from 'ssh2' | ||
@@ -29,2 +30,6 @@ /** | ||
this.context = { | ||
addRemote: (name: string, config: ConnectConfig): void => { | ||
this.context.remoteProcessors[name] = new Remote(config, this.context.remoteOptions) | ||
this.listenToRemotes([name]) | ||
}, | ||
globals: {}, | ||
@@ -117,4 +122,4 @@ history: [], | ||
private listenToRemotes(): void { | ||
const ids: string[] = Object.keys({ ...this.context.remoteProcessors }) | ||
private listenToRemotes(remotesIds?: string[]): void { | ||
const ids: string[] = remotesIds ? remotesIds : Object.keys({ ...this.context.remoteProcessors }) | ||
@@ -121,0 +126,0 @@ for (let i = 0; i < ids.length; i++) { |
@@ -17,2 +17,3 @@ import { ExecOptions } from 'child_process' | ||
export interface Context { | ||
addRemote: (name: string, config: ConnectConfig) => void | ||
globals: { [name: string]: any } | ||
@@ -19,0 +20,0 @@ history: History |
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
143602
3250