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

apigeetool

Package Overview
Dependencies
Maintainers
7
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apigeetool - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

.npmignore

8

lib/commands/createdeveloper.js

@@ -25,2 +25,6 @@ /* jshint node: true */

required: true
},
'attributes':{
name: 'Attributes',
required: false
}

@@ -57,2 +61,6 @@ });

if (opts.attributes) {
developer.attributes = opts.attributes;
}
var uri = util.format('%s/v1/o/%s/developers', opts.baseuri, opts.organization);

@@ -59,0 +67,0 @@ request({

9

lib/commands/deployproxy.js

@@ -721,5 +721,10 @@ /* jshint node: true */

if (err) { return done(err); }
var jsonBody;
try {
jsonBody = (body ? JSON.parse(body) : null);
} catch(e) {
// fall through -- error handling below will catch any error
}
var jsonBody = (body ? JSON.parse(body) : null);
if (req.statusCode === 200) {

@@ -726,0 +731,0 @@ if (opts.verbose) { console.log('Deployment on %s successful', environment); }

@@ -63,3 +63,3 @@ /* jshint node: true */

if (res.statusCode !== 200) {
cb(new Error(util.format('Received error %d when fetching proxy: %s',
cb(new Error(util.format('Received error %d when fetching proxy: %j',
res.statusCode, body)));

@@ -66,0 +66,0 @@ } else {

@@ -320,7 +320,8 @@ /* jshint node: true */

var packageName;
var pack = spawn('npm', ['pack'], {cwd: tempDir});
var cmd = 'npm' + (process.platform === 'win32' ? '.cmd' : '');
var pack = spawn(cmd, ['pack'], {cwd: tempDir});
pack.on('error', function(err) {
return cb(err)
});
var packageName;

@@ -327,0 +328,0 @@ pack.stdout.on('data', function(data) {

@@ -116,2 +116,12 @@ /* jshint node: true */

ApigeeTool.getkvmmap = function(opts, cb) {
var cmd = require('./commands/getkvmmap');
runCommand(cmd, opts, cb);
};
ApigeeTool.getKVMentry = function(opts, cb) {
var cmd = require('./commands/getKVMentry');
runCommand(cmd, opts, cb);
};
ApigeeTool.addEntryToKVM = function(opts,cb){

@@ -127,2 +137,7 @@ var cmd = require('./commands/addEntryToKVM');

ApigeeTool.deleteKVMentry = function(opts,cb){
var cmd = require('./commands/deleteKVMentry');
runCommand(cmd, opts, cb);
}
ApigeeTool.deploySharedflow = function (opts, cb) {

@@ -129,0 +144,0 @@ var cmd = require('./commands/deploysharedflow.js');

@@ -10,3 +10,3 @@ /* jshint node: true */

function ApigeeTool(defaults) {
this.defaults = (defaults ? defaults : DefaultDefaults);
this.defaults = (defaults ? defaults : DefaultDefaults);
}

@@ -35,3 +35,3 @@

ApigeeTool.deployProxy = function(opts) {
ApigeeTool.deployProxy = function(opts) {
var cb = q.defer()

@@ -50,2 +50,9 @@ var cmd = require('./commands/deployproxy');

ApigeeTool.delete = function(opts) {
var cb = q.defer()
var cmd = require('./commands/delete');
runCommand(cmd, opts, cb);
return cb.promise
};
ApigeeTool.fetchProxy = function(opts) {

@@ -60,3 +67,3 @@ var cb = q.defer()

var cb = q.defer()
var cmd = require('./commands/deploysharedflow.js');
var cmd = require('./commands/deploysharedflow');
runCommand(cmd, opts, cb);

@@ -66,5 +73,12 @@ return cb.promise

ApigeeTool.undeploySharedflow = function(opts) {
var cb = q.defer()
var cmd = require('./commands/undeploysharedflow');
runCommand(cmd, opts, cb);
return cb.promise
};
ApigeeTool.deleteSharedflow = function(opts) {
var cb = q.defer()
var cmd = require('./commands/deletesharedflow.js');
var cmd = require('./commands/deletesharedflow');
runCommand(cmd, opts, cb);

@@ -119,3 +133,3 @@ return cb.promise

try{
var cmd = require('./commands/createproduct');
var cmd = require('./commands/createproduct');
runCommand(cmd, opts, cb);

@@ -132,3 +146,3 @@ }

try{
var cmd = require('./commands/deleteproduct');
var cmd = require('./commands/deleteproduct');
runCommand(cmd, opts, cb);

@@ -221,2 +235,9 @@ }

ApigeeTool.createAppKey = function(opts) {
var cb = q.defer()
var cmd = require('./commands/createappkey');
runCommand(cmd, opts, cb);
return cb.promise
}
function runCommand(cmd, opts, cb) {

@@ -230,5 +251,5 @@ options.validate(opts, cmd.descriptor, function(err) {

if(runerr){cb.reject(runerr)}
else { cb.resolve(response)}
else { cb.resolve(response)}
});
});
}
{
"name": "apigeetool",
"version": "0.9.0",
"version": "0.9.1",
"description": "A CLI for Apigee Edge",

@@ -33,3 +33,3 @@ "main": "lib/main.js",

"read": "^1.0.7",
"request": "~2.81.0",
"request": "^2.88.0",
"tar-fs": "^1.16.0",

@@ -42,3 +42,3 @@ "tmp": "^0.0.27",

"express": "^4.13.3",
"mocha": "^3.5.3"
"mocha": "^5.2.0"
},

@@ -45,0 +45,0 @@ "repository": {

@@ -115,2 +115,3 @@ # apigeetool

* [deleteapp](#deleteapp)
* [createappkey](#createappkey)
* [createcache](#createcache)

@@ -935,19 +936,19 @@ * [deletecache](#deletecache)

var apigeetool = require('apigeetool')
var sdk = apigeetool.getPromiseSDK()
var opts = {
organization: 'edge-org',
username: 'edge-user',
password: 'password',
environment: 'environment',
}
opts.api = APIGEE_PROXY_NAME;
var apigeetool = require('apigeetool')
var sdk = apigeetool.getPromiseSDK()
var opts = {
organization: 'edge-org',
username: 'edge-user',
password: 'password',
environments: 'environment',
}
opts.api = APIGEE_PROXY_NAME;
opts.directory = path.join(__dirname);
sdk.deployProxy(opts)
.then(function(result){
//deploy success
},function(err){
//deploy failed
})
sdk.deployProxy(opts)
.then(function(result){
//deploy success
},function(err){
//deploy failed
});

@@ -967,2 +968,8 @@ ## <a name="createdeveloper"></a>Create Developer

opts.userName = 'runningFromTest123'
opts.attributes = [
{
name: "testAttribute",
value: "newValue"
}
]

@@ -1061,2 +1068,21 @@ sdk.createDeveloper(opts)

## <a name="createappkey"></a>Create App Key
Create App Key in Edge
#### Example
opts.key = APP_KEY;
opts.secret = APP_SECRET;
opts.developerId = DEVELOPER_EMAIL;
opts.appName = APP_NAME;
opts.apiProducts = PRODUCT_NAME;
sdk.createAppKey(opts)
.then(function(result){
//create key/secret success
},function(err){
//create key/secret failed
}) ;
## <a name="createcache"></a>Create Cache

@@ -1063,0 +1089,0 @@

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