@lbu/code-gen
Advanced tools
Comparing version 0.0.76 to 0.0.77
{ | ||
"name": "@lbu/code-gen", | ||
"version": "0.0.76", | ||
"version": "0.0.77", | ||
"description": "Generate various boring parts of your server", | ||
@@ -19,5 +19,5 @@ "main": "./index.js", | ||
"dependencies": { | ||
"@lbu/cli": "0.0.76", | ||
"@lbu/insight": "0.0.76", | ||
"@lbu/stdlib": "0.0.76" | ||
"@lbu/cli": "0.0.77", | ||
"@lbu/insight": "0.0.77", | ||
"@lbu/stdlib": "0.0.77" | ||
}, | ||
@@ -45,3 +45,3 @@ "maintainers": [ | ||
}, | ||
"gitHead": "4d5245ee1c104c3fb11e37afd6a9a226fa29706c" | ||
"gitHead": "793af3185d0b227081374ee29904e1258074071c" | ||
} |
@@ -275,2 +275,8 @@ import { isNil } from "@lbu/stdlib"; | ||
const type = it.type; | ||
const settings = { | ||
name: undefined, | ||
group: undefined, | ||
uniqueName: undefined, | ||
isOptional: true, | ||
}; | ||
@@ -290,5 +296,5 @@ if (type === "number" || type === "date") { | ||
resultType.keys[key] = { ...it, isOptional: true }; | ||
resultType.keys[`${key}GreaterThan`] = { ...it, isOptional: true }; | ||
resultType.keys[`${key}LowerThan`] = { ...it, isOptional: true }; | ||
resultType.keys[key] = { ...it, ...settings }; | ||
resultType.keys[`${key}GreaterThan`] = { ...it, ...settings }; | ||
resultType.keys[`${key}LowerThan`] = { ...it, ...settings }; | ||
} else if (type === "string") { | ||
@@ -302,4 +308,4 @@ // Generate = and LIKE %input% queries | ||
resultType.keys[key] = { ...it, isOptional: true }; | ||
resultType.keys[`${key}Like`] = { ...it, isOptional: true }; | ||
resultType.keys[key] = { ...it, ...settings }; | ||
resultType.keys[`${key}Like`] = { ...it, ...settings }; | ||
} else if (type === "uuid") { | ||
@@ -312,3 +318,3 @@ // Generate = and IN (uuid1, uuid2) queries | ||
resultType.keys[key] = { ...it, isOptional: true }; | ||
resultType.keys[key] = { ...it, ...settings }; | ||
resultType.keys[`${key}In`] = { | ||
@@ -319,3 +325,3 @@ ...TypeBuilder.getBaseData(), | ||
isOptional: true, | ||
values: { ...it }, | ||
values: { ...it, ...settings, isOptional: it.isOptional }, | ||
}; | ||
@@ -322,0 +328,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
272434
8507
+ Added@lbu/cli@0.0.77(transitive)
+ Added@lbu/insight@0.0.77(transitive)
+ Added@lbu/stdlib@0.0.77(transitive)
- Removed@lbu/cli@0.0.76(transitive)
- Removed@lbu/insight@0.0.76(transitive)
- Removed@lbu/stdlib@0.0.76(transitive)
Updated@lbu/cli@0.0.77
Updated@lbu/insight@0.0.77
Updated@lbu/stdlib@0.0.77