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.23 to 1.1.25

2

dist/configuration.schema.json

@@ -159,3 +159,3 @@ {

"output": {
"description": "The output file to put the results in.",
"description": "The output file to put the results in. If you use the .yml or .yaml extension then the schema will be output\nin YAML format, otherwise, it will be output in JSON format.",
"minLength": 1,

@@ -162,0 +162,0 @@ "title": "output",

@@ -84,3 +84,4 @@ export declare type OperationSelection = {

/**
* The output file to put the results in.
* The output file to put the results in. If you use the .yml or .yaml extension then the schema will be output
* in YAML format, otherwise, it will be output in JSON format.
*

@@ -87,0 +88,0 @@ * @minLength 1

@@ -130,2 +130,16 @@ "use strict";

}
function isYamlExtension(filePath) {
const extension = path_1.default.extname(filePath);
return ['.yaml', '.yml'].includes(extension);
}
function dumpAsYaml(blob) {
// Note: The JSON stringify and parse is required to strip the undefined values: https://github.com/nodeca/js-yaml/issues/571
return js_yaml_1.default.safeDump(JSON.parse(JSON.stringify(blob)), { indent: 2 });
}
function writeOutput(outputFullPath, outputSchema) {
const fileContents = isYamlExtension(outputFullPath)
? dumpAsYaml(outputSchema)
: JSON.stringify(outputSchema, null, 2);
fs_1.default.writeFileSync(outputFullPath, fileContents);
}
function main() {

@@ -159,3 +173,3 @@ return __awaiter(this, void 0, void 0, function* () {

logger.log(`## Inputs merged, writing the results out to '${outputFullPath}'`);
fs_1.default.writeFileSync(outputFullPath, JSON.stringify(mergeResult.output, null, 2));
writeOutput(outputFullPath, mergeResult.output);
logger.log(`## Finished writing to '${outputFullPath}'`);

@@ -162,0 +176,0 @@ });

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

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

Sorry, the diff of this file is not supported yet

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