Skip to content

Commit

Permalink
1.1.3 testing version scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Phara0h committed Aug 30, 2019
1 parent 6e5e0da commit 284bc33
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v1.1.3](https://github.com/Phara0h/Postgen/compare/v1.1.2...v1.1.3)
#### [v1.1.3](https://github.com/Phara0h/Postgen/compare/v1.1.3...v1.1.3)

> 30 August 2019
Expand Down
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var getVars = function (url, body)
{
var vars = [...Array.from(url.variable.map(v => v.key)), ...Array.from(url.query.map(v => v.key))].join();

return (body ? 'body' + (vars.length > 0 ? ',' : '') : '') + vars;
return (body ? 'body' + (vars.length > 0 ? ',' : '') : '') + vars + (vars.length > 0 || body ? ',opts' : 'opts');
}
//
var convertToOptions = function (request)
Expand Down Expand Up @@ -144,6 +144,9 @@ var genClass = function (name, item, js)
js += `
static async ${setMethodName(item[i].name)}(${getVars(item[i].request.url, !!item[i].request.body)}) {
var options = ${convertToOptions(item[i].request)};
if(opts) {
options = Object.assign(options, opts);
}
return await fasq.request(options)
}
`;
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"version": "auto-changelog -p && git add CHANGELOG.md && git add",
"version": "./node_modules/.bin/auto-changelog -p && git add CHANGELOG.md && git add -A",
"postversion": "git push && git push --tags"
},
"repository": {
Expand Down Expand Up @@ -34,8 +34,5 @@
"dependencies": {
"beautify": "0.0.8",
"postman-collection": "^3.5.1"
},
"devDependencies": {
"auto-changelog": "^1.15.0"
}
}

0 comments on commit 284bc33

Please sign in to comment.