@starship-ci/client
Advanced tools
Comparing version 2.5.5 to 2.6.0
@@ -72,2 +72,3 @@ import { StarshipConfig } from './config'; | ||
private forwardPort; | ||
private forwardPortCometmock; | ||
private forwardPortService; | ||
@@ -74,0 +75,0 @@ startPortForward(): void; |
@@ -64,3 +64,4 @@ "use strict"; | ||
exposer: 8081, | ||
faucet: 8000 | ||
faucet: 8000, | ||
cometmock: 22331, | ||
} | ||
@@ -371,2 +372,15 @@ } | ||
} | ||
forwardPortCometmock(chain, localPort, externalPort) { | ||
if (localPort !== undefined && externalPort !== undefined) { | ||
this.exec([ | ||
"kubectl", "port-forward", | ||
`pods/${chain.id}-cometmock-0`, | ||
`${localPort}:${externalPort}`, | ||
...this.getArgs(), | ||
">", "/dev/null", | ||
"2>&1", "&" | ||
]); | ||
this.log(chalk_1.default.yellow(`Forwarded ${chain.id}: local ${localPort} -> target (host) ${externalPort}`)); | ||
} | ||
} | ||
forwardPortService(serviceName, localPort, externalPort) { | ||
@@ -394,4 +408,10 @@ if (localPort !== undefined && externalPort !== undefined) { | ||
const chainPodPorts = this.podPorts.chains[chain.name] || this.podPorts.chains.defaultPorts; | ||
if (chain.ports?.rpc) | ||
this.forwardPort(chain, chain.ports.rpc, chainPodPorts.rpc); | ||
if (chain.cometmock?.enabled) { | ||
if (chain.ports?.rpc) | ||
this.forwardPortCometmock(chain, chain.ports.rpc, chainPodPorts.cometmock); | ||
} | ||
else { | ||
if (chain.ports?.rpc) | ||
this.forwardPort(chain, chain.ports.rpc, chainPodPorts.rpc); | ||
} | ||
if (chain.ports?.rest) | ||
@@ -398,0 +418,0 @@ this.forwardPort(chain, chain.ports.rest, chainPodPorts.rest); |
@@ -9,2 +9,3 @@ export interface Ports { | ||
grafana?: number; | ||
cometmock?: number; | ||
} | ||
@@ -71,2 +72,6 @@ export interface Resources { | ||
}; | ||
cometmock?: { | ||
enabled: boolean; | ||
image?: string; | ||
}; | ||
resources?: Resources; | ||
@@ -73,0 +78,0 @@ } |
@@ -35,3 +35,4 @@ import chalk from 'chalk'; | ||
exposer: 8081, | ||
faucet: 8000 | ||
faucet: 8000, | ||
cometmock: 22331, | ||
} | ||
@@ -342,2 +343,15 @@ } | ||
} | ||
forwardPortCometmock(chain, localPort, externalPort) { | ||
if (localPort !== undefined && externalPort !== undefined) { | ||
this.exec([ | ||
"kubectl", "port-forward", | ||
`pods/${chain.id}-cometmock-0`, | ||
`${localPort}:${externalPort}`, | ||
...this.getArgs(), | ||
">", "/dev/null", | ||
"2>&1", "&" | ||
]); | ||
this.log(chalk.yellow(`Forwarded ${chain.id}: local ${localPort} -> target (host) ${externalPort}`)); | ||
} | ||
} | ||
forwardPortService(serviceName, localPort, externalPort) { | ||
@@ -365,4 +379,10 @@ if (localPort !== undefined && externalPort !== undefined) { | ||
const chainPodPorts = this.podPorts.chains[chain.name] || this.podPorts.chains.defaultPorts; | ||
if (chain.ports?.rpc) | ||
this.forwardPort(chain, chain.ports.rpc, chainPodPorts.rpc); | ||
if (chain.cometmock?.enabled) { | ||
if (chain.ports?.rpc) | ||
this.forwardPortCometmock(chain, chain.ports.rpc, chainPodPorts.cometmock); | ||
} | ||
else { | ||
if (chain.ports?.rpc) | ||
this.forwardPort(chain, chain.ports.rpc, chainPodPorts.rpc); | ||
} | ||
if (chain.ports?.rest) | ||
@@ -369,0 +389,0 @@ this.forwardPort(chain, chain.ports.rest, chainPodPorts.rest); |
{ | ||
"name": "@starship-ci/client", | ||
"version": "2.5.5", | ||
"version": "2.6.0", | ||
"author": "Dan Lynch <pyramation@gmail.com>", | ||
@@ -58,3 +58,3 @@ "description": "Starship CI Client", | ||
}, | ||
"gitHead": "ac540a12ce5cf0014a0f978e8b4ccce047e058e3" | ||
"gitHead": "ffd17eac07b8f7b2f263dcb33582e234d77262db" | ||
} |
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
59030
1407