apigeetool
Advanced tools
Comparing version 0.9.0 to 0.10.0
@@ -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({ |
@@ -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'); |
@@ -214,2 +214,9 @@ /* jshint node: true */ | ||
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) { | ||
@@ -216,0 +223,0 @@ options.validate(opts, cmd.descriptor, function(err) { |
{ | ||
"name": "apigeetool", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"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 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
219250
49
5955
1120
3
+ Addedajv@6.12.6(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.10.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addeduri-js@4.4.1(transitive)
- Removedajv@4.11.8(transitive)
- Removedassert-plus@0.2.0(transitive)
- Removedaws-sign2@0.6.0(transitive)
- Removedboom@2.10.1(transitive)
- Removedco@4.6.0(transitive)
- Removedcryptiles@2.0.5(transitive)
- Removedform-data@2.1.4(transitive)
- Removedhar-schema@1.0.5(transitive)
- Removedhar-validator@4.2.1(transitive)
- Removedhawk@3.1.3(transitive)
- Removedhoek@2.16.3(transitive)
- Removedhttp-signature@1.1.1(transitive)
- Removedisarray@2.0.5(transitive)
- Removedjson-stable-stringify@1.1.1(transitive)
- Removedjsonify@0.0.1(transitive)
- Removedoauth-sign@0.8.2(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedperformance-now@0.2.0(transitive)
- Removedpunycode@1.4.1(transitive)
- Removedqs@6.4.1(transitive)
- Removedrequest@2.81.0(transitive)
- Removedsntp@1.0.9(transitive)
- Removedstringstream@0.0.6(transitive)
- Removedtough-cookie@2.3.4(transitive)
Updatedrequest@^2.88.0