Skip to content

Commit

Permalink
Update vacuum, move OAS to vacuum
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianMachado committed Jan 31, 2024
1 parent 3c6d8c6 commit f50af7a
Show file tree
Hide file tree
Showing 15 changed files with 83,028 additions and 107 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"typescript": "^5.2.2"
},
"dependencies": {
"@quobix/vacuum": "^0.5.0",
"@quobix/vacuum": "^0.8.6",
"@rate-my-openapi/core": "*",
"@stoplight/spectral-core": "^1.18.3",
"@stoplight/spectral-functions": "^1.7.2",
Expand Down
12 changes: 11 additions & 1 deletion packages/cli/src/handlers/generate-rating.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ export async function generateRating(argv: Arguments) {
"../",
"rulesets/rules.vacuum.yaml",
);
// TODO: Use JS functions once bugs are fixed
// https://github.com/daveshanley/vacuum/issues/418
// const rulesetFunctionsPath = join(
// process.cwd(),
// "../",
// "../",
// "rulesets/functions",
// );
const openApiFile = await readFile(pathName);
const { stdout, stderr } = await execAwait(
`vacuum spectral-report -r ${rulesetPath} -o ${pathName}`,
Expand All @@ -50,7 +58,9 @@ export async function generateRating(argv: Arguments) {
try {
outputReport = JSON.parse(stdout);
} catch (err) {
throw new Error(`Failed to parse vacuum output to JSON: ${err}`);
throw new Error(
`Failed to parse vacuum output to JSON: ${err}. Output: ${stdout}`,
);
}

// Spectral supplement
Expand Down
Loading

0 comments on commit f50af7a

Please sign in to comment.