very-express 0.10.2 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -978,7 +978,7 @@ export const {{documentName}}Model: Model<{{documentName}}Document> = model<{{do
978
978
  */
979
979
  `}f6.getGenaratorHeaderComment=ihe;f6.defaultCompilerOptions={headerComment:ihe(),use_id:!1};f6.default={getGenaratorHeaderComment:ihe,defaultCompilerOptions:f6.defaultCompilerOptions}});var a9e=vs(Kg=>{"use strict";var eqr=Kg&&Kg.__createBinding||(Object.create?function(a,s,c,p){p===void 0&&(p=c);var f=Object.getOwnPropertyDescriptor(s,c);(!f||("get"in f?!s.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(a,p,f)}:function(a,s,c,p){p===void 0&&(p=c),a[p]=s[c]}),tqr=Kg&&Kg.__setModuleDefault||(Object.create?function(a,s){Object.defineProperty(a,"default",{enumerable:!0,value:s})}:function(a,s){a.default=s}),t9e=Kg&&Kg.__importStar||function(a){if(a&&a.__esModule)return a;var s={};if(a!=null)for(var c in a)c!=="default"&&Object.prototype.hasOwnProperty.call(a,c)&&eqr(s,a,c);return tqr(s,a),s},rqr=Kg&&Kg.__awaiter||function(a,s,c,p){function f(_){return _ instanceof c?_:new c(function(h){h(_)})}return new(c||(c=Promise))(function(_,h){function g(C){try{x(p.next(C))}catch(T){h(T)}}function v(C){try{x(p.throw(C))}catch(T){h(T)}}function x(C){C.done?_(C.value):f(C.value).then(g,v)}x((p=p.apply(a,s||[])).next())})},ohe=Kg&&Kg.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Kg,"__esModule",{value:!0});Kg.compileFromFile=Kg.json2Mongoose=void 0;var nqr=t9e(require("util")),ZFe=t9e(require("fs")),iqr=ohe(XFe()),she=ohe(ahe()),aqr=ohe(rhe());function e9e(a){switch(a.toLocaleLowerCase()){case"unix":case"unixtime":case"unix-time":return"new Date().getTime()";case"date":return"new Date().toISOString().slice(0, 10)";case"time":return"new Date().toISOString().slice(11, 19)";case"datetime":case"date-time":return"new Date().toISOString()";default:return a}}function r9e(a,s){var c,p;let f={onCreate:{},onUpdate:{}},_=s.type==="object"?s.properties:((c=s.items)===null||c===void 0?void 0:c.type)==="object"?s.items.properties:s;return s.type==="object"||((p=s.items)===null||p===void 0?void 0:p.type)==="object"?Object.keys(_).forEach(h=>{let g=_[h],v=r9e(h,g);Object.keys(v.onCreate).forEach(x=>{let C=[a,x].filter(T=>T).join(".");f.onCreate[C]=v.onCreate[x]}),Object.keys(v.onUpdate).forEach(x=>{let C=[a,x].filter(T=>T).join(".");f.onUpdate[C]=v.onUpdate[x]})}):a&&(s["x-onCreateValue"]&&(f.onCreate[a]=e9e(s["x-onCreateValue"])),s["x-onUpdateValue"]&&(f.onUpdate[a]=e9e(s["x-onUpdateValue"]))),f}function n9e(a,s){var c;let p={},f=a.required||[],_=a.index||[];for(let h in a.properties){let g=a.properties[h];if(!s.use_id&&h==="_id"||typeof g.type!="string")continue;let v=C=>{switch(C.toLowerCase()){case"string":return"{{String}}";case"integer":case"float":case"number":return"{{Number}}";case"boolean":return"{{Boolean}}";case"null":return"{{null}}";default:throw new Error(`Unsupported type [${C}]`)}},x=(C,T,N)=>{let F={type:"String",index:N.index||!!N["x-foreignKey"]||_.includes(h)||!1,required:N.required||f.includes(h)||!1};switch(T.toLowerCase()){case"string":if(N["x-foreignKey"]){let P=N["x-format"]=="ObjectId"?"Schema.Types.ObjectId":"String";F.type=`{{${P}}}`}else F.type="{{String}}";break;case"integer":case"float":case"number":F.type="{{Number}}";break;case"boolean":F.type="{{Boolean}}";break;case"null":F.type="{{null}}";break;case"array":if(N.items)if(N.items.type=="object"){if(!N.items.properties)throw new Error(`"${C}" Array items as object must have properties defined !`);F.type=[x(C,N.items.type,N.items)]}else if(N.items["x-foreignKey"]){let P=N.items["x-format"]=="ObjectId"?"Schema.Types.ObjectId":"String";F.type=[`{{${P}}}`]}else F.type=[v(N.items.type)];break;case"object":F=n9e(N,s);break;default:throw new Error(`Unsupported type [${N.type}]`)}return F};p[h]=x(h,g.type,g),g.default&&(p[h].default=g.default),(g["x-foreignKey"]||!((c=g.items)===null||c===void 0)&&c["x-foreignKey"])&&(p[h].ref=g["x-foreignKey"]||g.items["x-foreignKey"])}return p}function i9e(a,s,c){if(!a["x-documentConfig"])throw new Error("( jsonSchema.x-documentConfig : object ) is required");let f=a["x-documentConfig"].documentName,_=n9e(a,c||she.default.defaultCompilerOptions),g=nqr.inspect(_,{depth:null}).replace(/'{{/g,"").replace(/}}'/g,"").replace(/"{{/g,"").replace(/}}"/g,""),v=r9e(void 0,a);return iqr.default.modelsTemplate(s,f,g,v,c||she.default.defaultCompilerOptions)}Kg.json2Mongoose=i9e;function sqr(a,s,c,p){return rqr(this,void 0,void 0,function*(){try{aqr.default.process(`Model : ${a} > ${c}`);let f=ZFe.readFileSync(a),_=JSON.parse(f.toString()),h=i9e(_,s,p||she.default.defaultCompilerOptions);return ZFe.writeFileSync(c,h),h}catch(f){throw new Error(`Processing File [${a}] :
980
980
  ${f.message||f}`)}})}Kg.compileFromFile=sqr});var p9e=vs(W7=>{"use strict";var oqr=W7&&W7.__createBinding||(Object.create?function(a,s,c,p){p===void 0&&(p=c);var f=Object.getOwnPropertyDescriptor(s,c);(!f||("get"in f?!s.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(a,p,f)}:function(a,s,c,p){p===void 0&&(p=c),a[p]=s[c]}),uqr=W7&&W7.__setModuleDefault||(Object.create?function(a,s){Object.defineProperty(a,"default",{enumerable:!0,value:s})}:function(a,s){a.default=s}),uhe=W7&&W7.__importStar||function(a){if(a&&a.__esModule)return a;var s={};if(a!=null)for(var c in a)c!=="default"&&Object.prototype.hasOwnProperty.call(a,c)&&oqr(s,a,c);return uqr(s,a),s},o9e=W7&&W7.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(W7,"__esModule",{value:!0});W7.genarate=void 0;var T5=uhe(require("fs")),u9e=uhe(WFe()),c9e=uhe(a9e()),cqr=o9e(require("path")),s9e=o9e(ahe()),lqr=(a,s)=>cqr.default.relative(a,s).replace(/\\/g,"/");function l9e(a,s,c,p){T5.readdir(a,(f,_)=>{if(f){console.log(f);return}T5.existsSync(s)&&T5.rmSync(s,{recursive:!0}),T5.mkdirSync(s),T5.existsSync(c)&&T5.rmSync(c,{recursive:!0}),T5.mkdirSync(c),_.forEach(h=>{var g;try{if(!h.endsWith(".json"))return;let v=T5.readFileSync(`${a}/${h}`),C=(g=JSON.parse(v.toString())["x-documentConfig"])===null||g===void 0?void 0:g.documentName;if(!C)throw new Error(`invalid "x-documentConfig.documentName" in ${a}/${h}`);u9e.compileFromFile(`${a}/${h}`,`${c}/${C}.ts`,p||s9e.default.defaultCompilerOptions),c9e.compileFromFile(`${a}/${h}`,`${lqr(s,c)}/${C}`,`${s}/${C}Model.ts`,p||s9e.default.defaultCompilerOptions)}catch(v){console.error("\x1B[31m%s\x1B[0m",`Processing File : ${a}/${h}
981
- `,v)}})})}W7.genarate=l9e;W7.default={genarate:l9e,typesGen:u9e,modelsGen:c9e}});var zO=Nd(require("fs")),M9e=Nd(require("child_process")),q9e=Nd(m3e());var T3=Nd(require("fs")),P_=Nd(require("path"));var Q1=Nd(require("fs")),JE=Nd(require("path"));function NCr(a,...s){console.log("\x1B[34m%s\x1B[0m","[PROCESSING]",a,s.length>0?s:"")}function ICr(a,...s){console.log("\x1B[32m%s\x1B[0m","[WRITING]",a,s.length>0?s:"")}function BCr(a,...s){console.log("\x1B[36m%s\x1B[0m","[INFO]",a,s.length>0?s:"")}function LCr(a,...s){console.log("\x1B[33m%s\x1B[0m","[WARN]",a,s.length>0?s:"")}function RCr(a,...s){console.log("\x1B[41m%s\x1B[0m","[ERROR]",a,s.length>0?s:""),process.exit(1)}var s0={process:NCr,writing:ICr,info:BCr,warn:LCr,error:RCr};var n5={name:"very-express",version:"0.10.2",description:"based on json schema and openapi, generate Express RestApi server with mongoDb ",author:"Justin26l",license:"MIT",main:"index.js",bin:{vex:"./dist/index.js"},scripts:{start:"node ./dist/index.js",dev:"npm run compile && npm run start",build:"npm run lint && npm run compile",lint:"eslint ./src --ext .ts --fix",compile:"node ./scripts/build.js && node ./scripts/copyTsTemplates.js",postversion:"npm run build && git push && git push --tags",test:"npm run compile && vitest run","test:watch":"vitest","test:update":"npm run compile && UPDATE_GOLDEN=1 vitest run","test:e2e":"npm run compile && VEX_E2E=1 vitest run test/e2e"},keywords:["jsonSchema","express","RestApi","mongoDb","mongoose","json2mongoose"],repository:{type:"git",url:"git+https://github.com/Justin26l/VeryExpress.git"},devDependencies:{"@types/js-yaml":"^4.0.9","@types/minimist":"^1.2.5","@types/ms":"^2.1.0","@types/node":"^20.19.39","@types/passport":"^1.0.16","@types/pg":"^8.20.0","@typescript-eslint/eslint-plugin":"^6.18.1","@typescript-eslint/parser":"^6.18.1","diff-match-patch":"^1.0.5",dotenv:"^16.3.1",esbuild:"0.23.0",eslint:"^8.57.1","js-yaml":"^4.1.0","json-schema-to-openapi-schema":"^0.4.0","json-schema-to-typescript":"^13.1.1",json2mongoose:"^0.4.8",knex:"^3.2.9",minimist:"^1.2.8",mongoose:"^8.7.1",mysql2:"^3.22.0",objection:"^3.1.5",pg:"^8.20.0","ts-node":"^10.9.2",typescript:"^5.3.3",vitest:"^2.1.9"}};function Ipe(a){return`/**
981
+ `,v)}})})}W7.genarate=l9e;W7.default={genarate:l9e,typesGen:u9e,modelsGen:c9e}});var zO=Nd(require("fs")),M9e=Nd(require("child_process")),q9e=Nd(m3e());var T3=Nd(require("fs")),P_=Nd(require("path"));var Q1=Nd(require("fs")),JE=Nd(require("path"));function NCr(a,...s){console.log("\x1B[34m%s\x1B[0m","[PROCESSING]",a,s.length>0?s:"")}function ICr(a,...s){console.log("\x1B[32m%s\x1B[0m","[WRITING]",a,s.length>0?s:"")}function BCr(a,...s){console.log("\x1B[36m%s\x1B[0m","[INFO]",a,s.length>0?s:"")}function LCr(a,...s){console.log("\x1B[33m%s\x1B[0m","[WARN]",a,s.length>0?s:"")}function RCr(a,...s){console.log("\x1B[41m%s\x1B[0m","[ERROR]",a,s.length>0?s:""),process.exit(1)}var s0={process:NCr,writing:ICr,info:BCr,warn:LCr,error:RCr};var n5={name:"very-express",version:"0.10.3",description:"based on json schema and openapi, generate Express RestApi server with mongoDb ",author:"Justin26l",license:"MIT",main:"index.js",bin:{vex:"./dist/index.js"},scripts:{start:"node ./dist/index.js",dev:"npm run compile && npm run start",build:"npm run lint && npm run compile",lint:"eslint ./src --ext .ts --fix",compile:"node ./scripts/build.js && node ./scripts/copyTsTemplates.js",postversion:"npm run build && git push && git push --tags",test:"npm run compile && vitest run","test:watch":"vitest","test:update":"npm run compile && UPDATE_GOLDEN=1 vitest run","test:e2e":"npm run compile && VEX_E2E=1 vitest run test/e2e"},keywords:["jsonSchema","express","RestApi","mongoDb","mongoose","json2mongoose"],repository:{type:"git",url:"git+https://github.com/Justin26l/VeryExpress.git"},devDependencies:{"@types/js-yaml":"^4.0.9","@types/minimist":"^1.2.5","@types/ms":"^2.1.0","@types/node":"^20.19.39","@types/passport":"^1.0.16","@types/pg":"^8.20.0","@typescript-eslint/eslint-plugin":"^6.18.1","@typescript-eslint/parser":"^6.18.1","diff-match-patch":"^1.0.5",dotenv:"^16.3.1",esbuild:"0.23.0",eslint:"^8.57.1","js-yaml":"^4.1.0","json-schema-to-openapi-schema":"^0.4.0","json-schema-to-typescript":"^13.1.1",json2mongoose:"^0.4.8",knex:"^3.2.9",minimist:"^1.2.8",mongoose:"^8.7.1",mysql2:"^3.22.0",objection:"^3.1.5",pg:"^8.20.0","ts-node":"^10.9.2",typescript:"^5.3.3",vitest:"^2.1.9"}};function Ipe(a){return`/**
982
982
  * Generated by veryExpress@${a}
983
983
  * https://github.com/Justin26l/VeryExpress
984
984
  */
@@ -1474,7 +1474,7 @@ main();
1474
1474
  `)),s=s.replace(/{{Config}}/g,_.join(`
1475
1475
  `)),s=s.replace(/{{AppUse}}/g,h.join(`
1476
1476
  `)),s=s.replace(/{{AppRouter}}/g,g.join(`
1477
- `)),s}function EEe(a){return el(this,null,function*(){let s=bEe.default.posix.join(a.srcDir,"server.ts");su.common.writeFile("Server",s,efe({compilerOptions:a}))})}function l6r(a,s){let c=Object.entries(a).filter(([,f])=>f!=null).map(([f,_])=>`${f}: ${JSON.stringify(_)}`),p=Object.entries(s!=null?s:{}).map(([f,_])=>`${f}: ${_}`);return`{${[...c,...p].join(", ")}}`}function p6r(a){let s={type:a.dbType,nullable:a.nullable,unique:a.isUnique||void 0,comment:a.comment,length:["varchar","char"].includes(a.dbType)?a.length:void 0,precision:a.precision,scale:a.scale,enum:a.enumValues,enumName:a.enumName,array:a.isArray||void 0,unsigned:a.unsigned||void 0,default:a.defaultValue},c=[];a.needsBigintTransformer&&c.push("{ to: (v: number) => v, from: (v: string) => Number(v) }"),a.needsTimestampTransformer&&c.push("{ to: (v: string) => v, from: (v: Date) => (v instanceof Date ? v.toISOString() : v) }"),a.needsBase64Transformer&&c.push('{ to: (v: string | null) => (v == null ? v : Buffer.from(v, "base64")), from: (v: Buffer | null) => (v == null ? v : v.toString("base64")) }');let p=c.length>0?{transformer:c.length===1?c[0]:`[${c.join(", ")}]`}:void 0;return l6r(s,p)}function tfe(a){var B,G,se,Ee,ie;let s=a.documentName,c=a.tableName,p=(B=a.manyToOneRelations)!=null?B:[],f=(G=a.oneToManyRelations)!=null?G:[],_=(se=a.oneToOneRelations)!=null?se:[],h=p.length>0||f.length>0||_.length>0,g=["Entity","Column","PrimaryGeneratedColumn"],v=a.uniqueIndexes&&a.uniqueIndexes.length>0,x=a.columns.some(oe=>oe.isIndex&&!oe.isNested);v&&g.push("Unique"),x&&g.push("Index"),h&&g.push("Relation","JoinColumn"),p.length>0&&g.push("ManyToOne"),f.length>0&&g.push("OneToMany"),_.length>0&&g.push("OneToOne");let C=[...p.map(oe=>`import { ${oe.targetEntity}, ${oe.targetType} } from "${oe.importPath}";`),...f.map(oe=>`import { ${oe.targetEntity}, ${oe.targetType} } from "${oe.importPath}";`),..._.map(oe=>`import { ${oe.targetEntity}, ${oe.targetType} } from "${oe.importPath}";`)].filter((oe,pe,me)=>me.indexOf(oe)===pe),T=(ie=(Ee=a.uniqueIndexes)==null?void 0:Ee.map(oe=>{let pe=`unique_${oe.join("_")}`,me=oe.map(le=>`'${le}'`).join(", ");return`@Unique('${pe}', [${me}])`}))!=null?ie:[],N=[`@Entity("${c}")`,...T].join(`
1477
+ `)),s}function EEe(a){return el(this,null,function*(){let s=bEe.default.posix.join(a.srcDir,"server.ts");su.common.writeFile("Server",s,efe({compilerOptions:a}))})}function l6r(a,s){let c=Object.entries(a).filter(([,f])=>f!=null).map(([f,_])=>`${f}: ${JSON.stringify(_)}`),p=Object.entries(s!=null?s:{}).map(([f,_])=>`${f}: ${_}`);return`{${[...c,...p].join(", ")}}`}function p6r(a){let s={type:a.dbType,nullable:a.nullable,unique:a.isUnique||void 0,comment:a.comment,length:["varchar","char"].includes(a.dbType)?a.length:void 0,precision:a.precision,scale:a.scale,enum:a.enumValues,enumName:a.enumName,array:a.isArray||void 0,unsigned:a.unsigned||void 0,default:a.defaultValue},c=[];a.needsBigintTransformer&&c.push("{ to: (v: number) => v, from: (v: string) => Number(v) }"),a.needsTimestampTransformer&&c.push("{ to: (v: string) => v, from: (v: Date) => (v instanceof Date ? v.toISOString() : v) }"),a.needsBase64Transformer&&c.push('{ to: (v: string | null) => (v == null ? v : Buffer.from(v, "base64")), from: (v: Buffer | null) => (v == null ? v : v.toString("base64")) }');let p=c.length>0?{transformer:c.length===1?c[0]:`[${c.join(", ")}]`}:void 0;return l6r(s,p)}function tfe(a){var B,G,se,Ee,ie;let s=a.documentName,c=a.tableName,p=(B=a.manyToOneRelations)!=null?B:[],f=(G=a.oneToManyRelations)!=null?G:[],_=(se=a.oneToOneRelations)!=null?se:[],h=p.length>0||f.length>0||_.length>0,g=["Entity","Column","PrimaryGeneratedColumn"],v=a.uniqueIndexes&&a.uniqueIndexes.length>0,x=a.columns.some(oe=>oe.isIndex&&!oe.isNested);v&&g.push("Unique"),x&&g.push("Index"),h&&g.push("Relation","JoinColumn"),p.length>0&&g.push("ManyToOne"),f.length>0&&g.push("OneToMany"),_.length>0&&g.push("OneToOne");let C=[...p.map(oe=>`import { ${oe.targetEntity}, ${oe.targetType} } from "${oe.importPath}";`),...f.map(oe=>`import { ${oe.targetEntity}, ${oe.targetType} } from "${oe.importPath}";`),..._.map(oe=>`import { ${oe.targetEntity}, ${oe.targetType} } from "${oe.importPath}";`)].filter((oe,pe,me)=>me.indexOf(oe)===pe),T=(ie=(Ee=a.uniqueIndexes)==null?void 0:Ee.map(oe=>{let pe=`unique_${c}_${oe.join("_")}`,me=oe.map(le=>`'${le}'`).join(", ");return`@Unique('${pe}', [${me}])`}))!=null?ie:[],N=[`@Entity("${c}")`,...T].join(`
1478
1478
  `),F=a.columns.filter(oe=>oe.enumValues).map(oe=>oe.tsType),P=a.columns.map(oe=>{let pe=[];return oe.isPrimary?(pe.push(` @PrimaryGeneratedColumn("${oe.dbType=="uuid"?"uuid":"increment"}")`),pe.push(` ${oe.name}!: ${oe.tsType};`)):(oe.isIndex&&!oe.isNested&&pe.push(" @Index()"),pe.push(` @Column(${p6r(oe)})`),pe.push(` ${oe.name}${oe.nullable?"?":"!"}: ${oe.tsType};`)),pe.join(`
1479
1479
  `)}).join(`
1480
1480
 
@@ -0,0 +1,61 @@
1
+ # v0.10.3
2
+
3
+ ## Unique constraint names include the table
4
+
5
+ PostgreSQL requires a constraint name to be unique inside a schema, not inside one table. The
6
+ generated `@Unique` name carried the columns only:
7
+
8
+ ```ts
9
+ @Unique('unique_tenantId_code', ['tenantId', 'code'])
10
+ ```
11
+
12
+ Two documents declaring `"uniqueIndex": [["tenantId", "code"]]` therefore emitted the same
13
+ constraint name, and the app failed at startup with:
14
+
15
+ ```
16
+ relation "unique_tenantId_code" already exists
17
+ ```
18
+
19
+ The name now includes the table:
20
+
21
+ ```ts
22
+ @Entity("branch")
23
+ @Unique('unique_branch_tenantId_code', ['tenantId', 'code'])
24
+ ```
25
+
26
+ | Document | Table | Constraint |
27
+ | --- | --- | --- |
28
+ | `Branch` | `branch` | `unique_branch_tenantId_code` |
29
+ | `AdminRole` | `adminrole` | `unique_adminrole_tenantId_code` |
30
+
31
+ The table name is the one the entity already carries (`documentName.toLowerCase()`), so the
32
+ constraint stays stable when a document is renamed.
33
+
34
+ ## Migration
35
+
36
+ 1. Re-run the generator.
37
+ 2. A fresh database needs nothing else.
38
+ 3. An existing database keeps the old constraint names. TypeORM compares constraints by name, so
39
+ `SQL_SYNCHRONIZE=true` drops and recreates them on the next start. Without synchronize, rename
40
+ them by hand:
41
+
42
+ ```sql
43
+ ALTER TABLE "branch" RENAME CONSTRAINT "unique_tenantId_code" TO "unique_branch_tenantId_code";
44
+ ```
45
+
46
+ A database that already failed to start holds no table for the second document; create the table
47
+ after the rename.
48
+
49
+ ## Generated output
50
+
51
+ | File | Change |
52
+ | --- | --- |
53
+ | `_models/{Document}Model.gen.ts` | `@Unique` name now `unique_<table>_<columns>` |
54
+
55
+ Every SQL scenario's golden output changes.
56
+
57
+ ## Tests
58
+
59
+ `npm test` covers the new names across the golden scenarios. The collision itself is checked against
60
+ PostgreSQL: two generated entities that declare the same column set synchronize into one schema, and
61
+ a pair of hand-built entities with a shared constraint name reproduces the original error.
@@ -25,7 +25,7 @@ Each `.json` file defines one REST resource. Filename must match `x-documentConf
25
25
  | --- | --- | --- | --- |
26
26
  | `documentName` | `string` | yes | Resource name. Must match filename (e.g. `User.json` → `"User"`). Used as collection name, controller class, route prefix. |
27
27
  | `methods` | `array<schemaMethod>` | yes | REST methods to generate. See values below. |
28
- | `uniqueIndex` | `array<array<string>>` | no | Compound unique index definitions, e.g. `[["email"], ["userId","role"]]`. |
28
+ | `uniqueIndex` | `array<array<string>>` | no | Compound unique index definitions, e.g. `[["email"], ["userId","role"]]`. The SQL entity names the constraint `unique_<table>_<columns>`, so two documents may declare the same column set. |
29
29
  | `isolation` | `array<object>` | no | Query terms the repository adds to every read and write. `{ field, source, onMissing }` — see [isolation rules](#isolation-rules). |
30
30
  | `dataIsolation` | `object` | no | Legacy single-field form: `{ "field": "ownerId" }`. Normalized into `isolation`. |
31
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "very-express",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "description": "based on json schema and openapi, generate Express RestApi server with mongoDb ",
5
5
  "author": "Justin26l",
6
6
  "license": "MIT",