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

openshift-rest-client

Package Overview
Dependencies
Maintainers
4
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openshift-rest-client - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="1.1.0"></a>
# [1.1.0](https://github.com/bucharest-gold/openshift-rest-client/compare/v1.0.1...v1.1.0) (2018-03-20)
### Features
* **build-configs:** Adding instantiate method to buildconfigs ([#60](https://github.com/bucharest-gold/openshift-rest-client/issues/60)) ([7c86990](https://github.com/bucharest-gold/openshift-rest-client/commit/7c86990))
<a name="1.0.1"></a>

@@ -7,0 +17,0 @@ ## [1.0.1](https://github.com/bucharest-gold/openshift-rest-client/compare/v1.0.0...v1.0.1) (2018-02-19)

32

lib/build-configs.js

@@ -57,10 +57,14 @@ 'use strict';

function instantiateBinary (client) {
return function instantiateBinary (buildName, options = {}) {
return function instantiateBinary (buildConfigName, options = {}) {
const clientConfig = privates.get(client).config;
if (!buildConfigName) {
return Promise.reject(new Error('Build Config Name is required'));
}
const req = {
method: 'POST',
json: false,
url: `${client.apiUrl}/namespaces/${clientConfig.context.namespace}/buildconfigs/${buildName}/instantiatebinary?commit=`,
body: fs.createReadStream(options.dockerArchive)
url: `${client.apiUrl}/namespaces/${clientConfig.context.namespace}/buildconfigs/${buildConfigName}/instantiatebinary`,
body: options.dockerArchive ? fs.createReadStream(options.dockerArchive) : undefined
};

@@ -74,2 +78,23 @@

function instantiate (client) {
return function instantiate (buildConfigName, options = {}) {
const clientConfig = privates.get(client).config;
if (!buildConfigName) {
return Promise.reject(new Error('Build Config Name is required'));
}
const req = {
method: 'POST',
json: false,
url: `${client.apiUrl}/namespaces/${clientConfig.context.namespace}/buildconfigs/${buildConfigName}/instantiate`,
body: options.body
};
return request(client, req).then((body) => {
return JSON.parse(body);
});
};
}
function create (client) {

@@ -152,4 +177,5 @@ return function create (buildConfig, options = {}) {

instantiateBinary: instantiateBinary,
instantiate: instantiate,
remove: remove,
removeAll: removeAll
};

8

package.json
{
"name": "openshift-rest-client",
"version": "1.0.1",
"version": "1.1.0",
"description": "Node.js client for developing with OpenShift",

@@ -49,5 +49,5 @@ "main": "index.js",

"coveralls": "^3.0.0",
"eslint": "^4.3.0",
"eslint": "^4.18.0",
"eslint-config-semistandard": "^12.0.0",
"eslint-config-standard": "^10.2.1",
"eslint-config-standard": "^11.0.0",
"eslint-plugin-import": "^2.2.0",

@@ -62,3 +62,3 @@ "eslint-plugin-node": "^6.0.0",

"nyc": "^11.1.0",
"proxyquire": "^1.8.0",
"proxyquire": "^2.0.0",
"standard-version": "^4.3.0",

@@ -65,0 +65,0 @@ "tap-spec": "^4.1.1",

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