Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openapi-merge-cli

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-merge-cli - npm Package Compare versions

Comparing version 1.1.20 to 1.1.23

13

dist/index.js

@@ -58,2 +58,7 @@ "use strict";

}
function readFileAsString(filePath) {
return __awaiter(this, void 0, void 0, function* () {
return (yield readFilePromise(filePath)).toString('utf-8');
});
}
class JsonOrYamlParseError extends Error {

@@ -64,5 +69,4 @@ constructor(jsonError, yamlError) {

}
function readYamlOrJSON(filePath) {
function readYamlOrJSON(fileContents) {
return __awaiter(this, void 0, void 0, function* () {
const fileContents = (yield readFilePromise(filePath)).toString('utf-8');
let jsonError;

@@ -90,7 +94,8 @@ try {

logger.log(`## Loading input ${inputIndex}: ${fullPath}`);
return (yield readYamlOrJSON(fullPath));
return (yield readYamlOrJSON(yield readFileAsString(fullPath)));
}
else {
logger.log(`## Loading input ${inputIndex} from URL: ${input.inputURL}`);
return yield isomorphic_fetch_1.default(input.inputURL).then(rsp => rsp.json());
const inputContents = yield isomorphic_fetch_1.default(input.inputURL).then(rsp => rsp.text());
return (yield readYamlOrJSON(inputContents));
}

@@ -97,0 +102,0 @@ });

{
"name": "openapi-merge-cli",
"version": "1.1.20",
"version": "1.1.23",
"description": "A cli tool for the openapi-merge library.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc