@starship-ci/client
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -52,2 +52,3 @@ import { StarshipConfig } from './config'; | ||
setConfig(config: StarshipConfig): void; | ||
setContext(ctx: StarshipContext): void; | ||
setPodPorts(ports: PodPorts): void; | ||
@@ -57,4 +58,4 @@ test(): void; | ||
clean(): void; | ||
private setupHelm; | ||
private removeHelm; | ||
setupHelm(): void; | ||
removeHelm(): void; | ||
private ensureFileExists; | ||
@@ -64,3 +65,3 @@ deploy(): void; | ||
debug(): void; | ||
private deleteHelm; | ||
deleteHelm(): void; | ||
private forwardPort; | ||
@@ -70,4 +71,4 @@ private forwardPortService; | ||
stopPortForward(): void; | ||
private setupKind; | ||
private cleanKind; | ||
setupKind(): void; | ||
cleanKind(): void; | ||
} |
@@ -34,8 +34,8 @@ "use strict"; | ||
const yaml = __importStar(require("js-yaml")); | ||
const mkdirp_1 = require("mkdirp"); | ||
const os = __importStar(require("os")); | ||
const path_1 = require("path"); | ||
const shell = __importStar(require("shelljs")); | ||
const deps_1 = require("./deps"); | ||
const package_1 = require("./package"); | ||
const mkdirp_1 = require("mkdirp"); | ||
const path_1 = require("path"); | ||
; | ||
@@ -81,3 +81,3 @@ // TODO talk to Anmol about moving these into yaml, if not already possible? | ||
// add log level | ||
this.log(str); | ||
console.log(str); | ||
} | ||
@@ -90,3 +90,4 @@ exit(code) { | ||
return; | ||
const platform = os.platform(); | ||
// so CI/CD and local dev work nicely | ||
const platform = process.env.NODE_ENV === 'test' ? 'linux' : os.platform(); | ||
const messages = []; | ||
@@ -136,9 +137,11 @@ const depMessages = []; | ||
loadYaml(filename) { | ||
const fileContents = (0, fs_1.readFileSync)(filename, 'utf8'); | ||
const path = filename.startsWith('/') ? filename : (0, path_1.resolve)((process.cwd(), filename)); | ||
const fileContents = (0, fs_1.readFileSync)(path, 'utf8'); | ||
return yaml.load(fileContents); | ||
} | ||
saveYaml(filename, obj) { | ||
const path = filename.startsWith('/') ? filename : (0, path_1.resolve)((process.cwd(), filename)); | ||
const yamlContent = yaml.dump(obj); | ||
mkdirp_1.mkdirp.sync((0, path_1.dirname)(filename)); | ||
(0, fs_1.writeFileSync)(filename, yamlContent, 'utf8'); | ||
mkdirp_1.mkdirp.sync((0, path_1.dirname)(path)); | ||
(0, fs_1.writeFileSync)(path, yamlContent, 'utf8'); | ||
} | ||
@@ -162,2 +165,5 @@ loadConfig() { | ||
} | ||
setContext(ctx) { | ||
this.ctx = ctx; | ||
} | ||
setPodPorts(ports) { | ||
@@ -212,3 +218,4 @@ this.podPorts = (0, deepmerge_1.default)(defaultPorts, ports); | ||
ensureFileExists(filename) { | ||
if (!(0, fs_1.existsSync)(filename)) { | ||
const path = filename.startsWith('/') ? filename : (0, path_1.resolve)((process.cwd(), filename)); | ||
if (!(0, fs_1.existsSync)(path)) { | ||
throw new Error(`Configuration file not found: ${filename}`); | ||
@@ -215,0 +222,0 @@ } |
@@ -5,8 +5,8 @@ import chalk from 'chalk'; | ||
import * as yaml from 'js-yaml'; | ||
import { mkdirp } from 'mkdirp'; | ||
import * as os from 'os'; | ||
import { dirname, resolve } from 'path'; | ||
import * as shell from 'shelljs'; | ||
import { dependencies as defaultDependencies } from "./deps"; | ||
import { readAndParsePackageJson } from './package'; | ||
import { mkdirp } from 'mkdirp'; | ||
import { dirname } from 'path'; | ||
; | ||
@@ -52,3 +52,3 @@ // TODO talk to Anmol about moving these into yaml, if not already possible? | ||
// add log level | ||
this.log(str); | ||
console.log(str); | ||
} | ||
@@ -61,3 +61,4 @@ exit(code) { | ||
return; | ||
const platform = os.platform(); | ||
// so CI/CD and local dev work nicely | ||
const platform = process.env.NODE_ENV === 'test' ? 'linux' : os.platform(); | ||
const messages = []; | ||
@@ -107,9 +108,11 @@ const depMessages = []; | ||
loadYaml(filename) { | ||
const fileContents = readFileSync(filename, 'utf8'); | ||
const path = filename.startsWith('/') ? filename : resolve((process.cwd(), filename)); | ||
const fileContents = readFileSync(path, 'utf8'); | ||
return yaml.load(fileContents); | ||
} | ||
saveYaml(filename, obj) { | ||
const path = filename.startsWith('/') ? filename : resolve((process.cwd(), filename)); | ||
const yamlContent = yaml.dump(obj); | ||
mkdirp.sync(dirname(filename)); | ||
writeFileSync(filename, yamlContent, 'utf8'); | ||
mkdirp.sync(dirname(path)); | ||
writeFileSync(path, yamlContent, 'utf8'); | ||
} | ||
@@ -133,2 +136,5 @@ loadConfig() { | ||
} | ||
setContext(ctx) { | ||
this.ctx = ctx; | ||
} | ||
setPodPorts(ports) { | ||
@@ -183,3 +189,4 @@ this.podPorts = deepmerge(defaultPorts, ports); | ||
ensureFileExists(filename) { | ||
if (!existsSync(filename)) { | ||
const path = filename.startsWith('/') ? filename : resolve((process.cwd(), filename)); | ||
if (!existsSync(path)) { | ||
throw new Error(`Configuration file not found: ${filename}`); | ||
@@ -186,0 +193,0 @@ } |
export * from './client'; | ||
export * from './config'; |
export * from './client'; | ||
export * from './config'; |
@@ -18,1 +18,2 @@ "use strict"; | ||
__exportStar(require("./client"), exports); | ||
__exportStar(require("./config"), exports); |
{ | ||
"name": "@starship-ci/client", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"author": "Dan Lynch <pyramation@gmail.com>", | ||
@@ -30,6 +30,20 @@ "description": "Starship CI Client", | ||
}, | ||
"keywords": [], | ||
"keywords": [ | ||
"blockchain", | ||
"blockchain-simulation", | ||
"blockchain-testing", | ||
"TDD", | ||
"multi-chain", | ||
"crypto", | ||
"cryptocurrency", | ||
"ethereum", | ||
"bitcoin", | ||
"cosmos", | ||
"smart-contracts", | ||
"decentralized", | ||
"DApps", | ||
"web3", | ||
"interchain" | ||
], | ||
"dependencies": { | ||
"@chain-registry/types": "^0.25.5", | ||
"@types/js-yaml": "^4.0.9", | ||
"chalk": "^4.1.0", | ||
@@ -39,9 +53,9 @@ "deepmerge": "^4.3.1", | ||
"mkdirp": "3.0.1", | ||
"semver": "7.6.0", | ||
"shelljs": "^0.8.5" | ||
}, | ||
"devDependencies": { | ||
"@types/js-yaml": "^4.0.9", | ||
"@types/shelljs": "^0.8.15" | ||
}, | ||
"gitHead": "f6c26a6a961ca4891420e48bae59bd48e65aa8e1" | ||
"gitHead": "bbf8ef55ce6d682eca88d2679e22b5c379666ad1" | ||
} |
@@ -5,3 +5,3 @@ # StarshipJS | ||
<img src="https://user-images.githubusercontent.com/10805402/242348990-c141d6cd-e1c9-413f-af68-283de029c3a4.png" width="80"><br /> | ||
StarshipJS deploys and manages Starship, aimed to simplify testing for apps that span multiple blockchain networks | ||
StarshipJS enables developers to efficiently set up and test chains, explorers, and validators, making it easier to handle development projects spanning several blockchain networks. | ||
</p> | ||
@@ -12,4 +12,3 @@ | ||
<img height="20" src="https://github.com/cosmology-tech/starshipjs/actions/workflows/run-tests.yml/badge.svg" /> | ||
</a> | ||
<a href="https://github.com/cosmology-tech/starshipjs/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-BSD%203--Clause%20Clear-blue.svg"></a> | ||
</a><a href="https://github.com/cosmology-tech/starshipjs/blob/main/LICENSE"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"></a> | ||
</p> | ||
@@ -111,3 +110,3 @@ | ||
```js | ||
// stop port forwarding AND | ||
// stop port forwarding | ||
// remove the deployed release from your Kubernetes cluster | ||
@@ -114,0 +113,0 @@ client.undeploy(); |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
39926
5
933
2
147
6
- Removed@chain-registry/types@^0.25.5
- Removed@types/js-yaml@^4.0.9
- Removedsemver@7.6.0
- Removed@chain-registry/types@0.25.8(transitive)
- Removed@types/js-yaml@4.0.9(transitive)
- Removedlru-cache@6.0.0(transitive)
- Removedsemver@7.6.0(transitive)
- Removedyallist@4.0.0(transitive)