
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
openshift-rest-client
Advanced tools
Node.js based client for the Openshift REST API, not unlike the Fabric8 Maven Plugin, but for node clients/builds.
npm install --save openshift-rest-client
Code:
const openshiftRestClient = require('openshift-rest-client');
openshiftRestClient().then((client) => {
// Use the client object to find a list of projects, for example
client.projects.findAll().then((projects) => {
console.log(projects);
});
});
By default, the openshift-rest-client will use the openshift-config-loader module to get your openshift configuration.
You can pass in a custom config object by using the settings
object
const openshiftRestClient = require('openshift-rest-client');
const settings = {};
const customConfig = {
apiVersion: 'v1',
context:
{ cluster: '192-168-99-100:8443',
namespace: 'for-node-client-testing',
user: 'developer/192-168-99-100:8443' },
user: { token: 'zVBd1ZFeJqEAILJgimm4-gZJauaw3PW4EVqV_peEZ3U' },
cluster: 'https://192.168.99.100:8443' }
};
settings.config = customConfig;
openshiftRestClient(settings).then((client) => {
// Use the client object to find a list of projects, for example
client.projects.findAll().then((projects) => {
console.log(projects);
});
});
If you don't have an OpenShift access token, you can use basic authentication by providing username and password as follows:
const openshiftRestClient = require('openshift-rest-client');
const settings = {};
const customConfig = {
apiVersion: 'v1',
context:
{ cluster: '192-168-99-100:8443',
namespace: 'for-node-client-testing',
user: 'developer/192-168-99-100:8443' },
user: {
username: yourUsername,
password: youPassword
},
cluster: 'https://192.168.99.100:8443' }
};
settings.config = customConfig;
openshiftRestClient(settings).then((client) => {
// Use the client object to find a list of projects, for example
client.projects.findAll().then((projects) => {
console.log(projects);
});
});
FAQs
Node.js client for developing with OpenShift
We found that openshift-rest-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.