typera-openapi
Advanced tools
Comparing version 0.11.0 to 0.11.1
@@ -81,2 +81,4 @@ #!/usr/bin/env node | ||
const readCompilerOptions = (tsconfigPath) => { | ||
const dirPath = path.dirname(tsconfigPath); | ||
const fileName = path.basename(tsconfigPath); | ||
const tsconfig = ts.readConfigFile(tsconfigPath, (path) => fs.readFileSync(path, 'utf-8')); | ||
@@ -88,3 +90,10 @@ if (tsconfig.error) { | ||
} | ||
return tsconfig.config.compilerOptions; | ||
const result = ts.convertCompilerOptionsFromJson(tsconfig.config.compilerOptions, dirPath, fileName); | ||
if (result.errors.length) { | ||
console.error(`Invalid tsconfig ${tsconfigPath}:\n${result.errors | ||
.map((err) => err.messageText) | ||
.join('\n')}`); | ||
return; | ||
} | ||
return result.options; | ||
}; | ||
@@ -91,0 +100,0 @@ const checkOutput = (fileName, content) => { |
{ | ||
"name": "typera-openapi", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"description": "Generate OpenAPI spec from typera routes", | ||
@@ -25,3 +25,3 @@ "repository": "https://github.com/akheron/typera-openapi", | ||
"dependencies": { | ||
"openapi-types": "^7.0.1", | ||
"openapi-types": "^8.0.0", | ||
"statuses": "^2.0.1", | ||
@@ -46,4 +46,4 @@ "typescript": "^4.1.3", | ||
"ts-jest": "^26.4.4", | ||
"typera-express": "2.2.1" | ||
"typera-express": "2.4.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
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
38648
746
+ Addedopenapi-types@8.0.0(transitive)
- Removedopenapi-types@7.2.3(transitive)
Updatedopenapi-types@^8.0.0