swagger-to-flowtype
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -108,3 +108,3 @@ #! /usr/bin/env node | ||
var withExact = function withExact(property) { | ||
var result = property.replace(/{/g, "{|").replace(/}/g, "|}"); | ||
var result = property.replace(/{[^|]/g, "{|").replace(/[^|]}/g, "|}"); | ||
return result; | ||
@@ -172,4 +172,8 @@ }; | ||
var distFile = exports.distFile = function distFile(p) { | ||
return p.destination || "./flowtype.js"; | ||
var distFile = exports.distFile = function distFile(p, inputFileName) { | ||
if (p.destination) { | ||
return p.destination; | ||
} | ||
var ext = _path2.default.parse(inputFileName).ext; | ||
return inputFileName.replace(ext, ".js"); | ||
}; | ||
@@ -180,3 +184,3 @@ | ||
var result = generator(file); | ||
var dist = distFile(_commander2.default); | ||
var dist = distFile(_commander2.default, file); | ||
writeToFile(dist, result); | ||
@@ -183,0 +187,0 @@ console.log("Generated flow types to " + dist); |
{ | ||
"name": "swagger-to-flowtype", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "Command line tool for generating flow types from swagger", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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
202188
639