concise-flow
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -46,3 +46,3 @@ 'use strict'; | ||
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(schema, options, utils) { | ||
var preprocessedSchema, raw; | ||
var raw; | ||
return _regenerator2.default.wrap(function _callee$(_context) { | ||
@@ -52,4 +52,3 @@ while (1) { | ||
case 0: | ||
preprocessedSchema = utils.preprocess(schema); | ||
raw = writeTypes(preprocessedSchema); | ||
raw = writeTypes(utils.preprocessedSchema); | ||
@@ -59,3 +58,3 @@ if (options.file) _fs2.default.writeFileSync(options.file, raw, 'utf8'); | ||
case 4: | ||
case 3: | ||
case 'end': | ||
@@ -109,3 +108,3 @@ return _context.stop(); | ||
var writeField = function writeField(name, specs) { | ||
var isRequired = specs.validations && specs.validations.isRequired ? '' : '?'; | ||
var isRequired = specs.isRequired ? '' : '?'; | ||
var typeStr = writeFieldType(specs.type); | ||
@@ -112,0 +111,0 @@ if (specs.isPlural) typeStr = 'Array<' + typeStr + '>'; |
{ | ||
"name": "concise-flow", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"author": "Guillermo Grau Panea", | ||
@@ -17,3 +17,3 @@ "license": "MIT", | ||
"lodash.upperfirst": "4.3.1", | ||
"concise-types": "^0.0.0" | ||
"concise-types": "*" | ||
}, | ||
@@ -20,0 +20,0 @@ "description": "A tool belt for concise schemas", |
@@ -26,4 +26,3 @@ // @flow | ||
) => { | ||
const preprocessedSchema = utils.preprocess(schema); | ||
const raw = writeTypes(preprocessedSchema); | ||
const raw = writeTypes(utils.preprocessedSchema); | ||
if (options.file) fs.writeFileSync(options.file, raw, 'utf8'); | ||
@@ -70,3 +69,3 @@ return raw; | ||
const writeField = (name, specs: any) => { | ||
const isRequired = specs.validations && specs.validations.isRequired ? '' : '?'; | ||
const isRequired = specs.isRequired ? '' : '?'; | ||
let typeStr = writeFieldType(specs.type); | ||
@@ -73,0 +72,0 @@ if (specs.isPlural) typeStr = `Array<${typeStr}>`; |
Sorry, the diff of this file is not supported yet
Floating dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
10097
167
2
+ Addedconcise-types@0.4.5(transitive)
Updatedconcise-types@*