Skip to content

Commit e7d5f9b

Browse files
fix makeUrl + add error handlers for validator
1 parent 478f448 commit e7d5f9b

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

bin/cf-openapi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ function collect(val, item) {
2020
return item;
2121
}
2222

23+
process.on('uncaughtException', (error) => {
24+
console.log(error.stack);
25+
});
26+
2327
program
2428
.version('1.0.0')
2529
.usage('<command>')

lib/helpers/general.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const fs = require('fs');
33
const _ = require('lodash');
44

55
function makeUrl(serviceConfig) {
6-
const { uri, port, protocol } = serviceConfig;
6+
const { uri, port, protocol } = serviceConfig || {};
77
const _port = port ? `:${port}` : '';
88
return `${protocol}://${uri}${_port}`;
99
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codefresh-io/cf-openapi",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"scripts": {
55
"test": "jest --runInBand",
66
"eslint": "eslint lib/**",

0 commit comments

Comments
 (0)