@redhat-cloud-services/vulnerabilities-client
Advanced tools
Comparing version 1.0.20 to 1.0.21
@@ -14,1 +14,2 @@ /** | ||
export * from "./configuration"; | ||
export { DefaultApi as GitApi } from "./git-api"; |
@@ -20,1 +20,3 @@ "use strict"; | ||
__export(require("./configuration")); | ||
var git_api_1 = require("./git-api"); | ||
exports.GitApi = git_api_1.DefaultApi; |
{ | ||
"name": "@redhat-cloud-services/vulnerabilities-client", | ||
"version": "1.0.20", | ||
"version": "1.0.21", | ||
"description": "", | ||
@@ -21,10 +21,15 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"doc": "typedoc --theme markdown --out doc --module commonjs --mode file --gitRevision master", | ||
"doc:production": "typedoc --theme markdown --out doc --module commonjs --mode file --exclude \"**/git-api/*.ts\" --gitRevision master", | ||
"doc:git-api": "typedoc --theme markdown --out git-api/doc --module commonjs --mode file --gitRevision master ./git-api", | ||
"doc": "npm run doc:git-api && npm run doc:production", | ||
"build": "tsc", | ||
"generate": "TS_POST_PROCESS_FILE='../../postProcess.sh' openapi-generator generate -i $SPEC -g typescript-axios -o . --skip-validate-spec --enable-post-process-file", | ||
"generate:prod": "SPEC=$(node preProcess.js 'https://cloud.redhat.com/api/vulnerability/v1/openapi.json') npm run generate", | ||
"generate": "TS_POST_PROCESS_FILE='../../postProcess.sh' openapi-generator generate -i $SPEC -g typescript-axios -o $OUTPUT --skip-validate-spec --enable-post-process-file", | ||
"generate:production": "OUTPUT=. SPEC=$(node preProcess.js 'https://cloud.redhat.com/api/vulnerability/v1/openapi.json') npm run generate", | ||
"generate:git-api": "OUTPUT=git-api SPEC=$(node preProcess.js 'https://raw.githubusercontent.com/RedHatInsights/vulnerability-engine/master/manager.spec.yaml') npm run generate", | ||
"generate:prod": "npm run generate:git-api && npm run generate:production && ./postProcess.sh", | ||
"generate:single": "npm run generate:prod && npm run doc" | ||
}, | ||
"dependencies": { | ||
"axios": "^0.19.0" | ||
"axios": "^0.19.0", | ||
"yaml": "^1.6.0" | ||
}, | ||
@@ -31,0 +36,0 @@ "devDependencies": { |
@@ -6,6 +6,9 @@ var request = require("request"); | ||
const methodNameField = "x-methodName"; | ||
const YAML = require("yaml"); | ||
var path = require("path"); | ||
request(PRODSPEC || null, (error, response, body) => { | ||
if (!error && response.statusCode == 200) { | ||
const spec_json = JSON.parse(body); | ||
const spec_json = | ||
path.extname(PRODSPEC) === ".json" ? JSON.parse(body) : YAML.parse(body); | ||
const paths = spec_json.paths; | ||
@@ -12,0 +15,0 @@ Object.keys(paths).forEach(url => { |
377976
70
4030
2
+ Addedyaml@^1.6.0
+ Addedyaml@1.10.2(transitive)