backend-plus 1.16.16 → 1.16.17

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.
@@ -2179,10 +2179,10 @@ myOwn.TableGrid.prototype.displayGrid = function displayGrid(){
2179
2179
  }
2180
2180
  });
2181
2181
  if(grid.def.clientSide){
2182
- if(!grid.my.clientSidePrepared && grid.my.clientSides[grid.def.clientSide].prepare){
2182
+ if(!depot.clientSidePrepared && grid.my.clientSides[grid.def.clientSide].prepare){
2183
2183
  grid.my.clientSides[grid.def.clientSide].prepare(depot);
2184
2184
  };
2185
- grid.my.clientSidePrepared=true;
2185
+ depot.clientSidePrepared=true;
2186
2186
  grid.my.clientSides[grid.def.clientSide].update(depot);
2187
2187
  }
2188
2188
  };
@@ -233,7 +233,10 @@ export type ForeignKey = {
233
233
  displayAfterFieldName?:string|boolean
234
234
  forceDeferrable?:boolean
235
235
  }
236
- export type Constraint = {constraintType:'check'|'unique'|'not null', expr?:string, fields?:string[], consName?:string}
236
+ export type Constraint = {constraintType:string, consName?:string} & (
237
+ {constraintType:'unique', fields:string[], where?:string} |
238
+ {constraintType:'check', expr?:string}
239
+ )
237
240
  export type TableDefinition = EditableDbDefinition & {
238
241
  name:string
239
242
  elementName?:string
@@ -551,6 +551,7 @@ AppBackend.prototype.start = function start(opts){
551
551
  opts=opts||{};
552
552
  var iPosDbDump=Array.prototype.indexOf.call(process.argv,'--dump-db')+1;
553
553
  if(iPosDbDump>0){
554
+ pg.logExceptions = true;
554
555
  var dumps=[];
555
556
  while(iPosDbDump && iPosDbDump<process.argv.length && !process.argv[iPosDbDump].startsWith('--')){
556
557
  dumps.push(process.argv[iPosDbDump]);
@@ -2665,6 +2666,9 @@ AppBackend.prototype.dumpDbSchemaPartial = async function dumpDbSchemaPartial(pa
2665
2666
  case 'unique':
2666
2667
  sql='('+cons.fields.map(function(field){ return db.quoteIdent(field); }).join(', ')+')';
2667
2668
  if(cons.where){
2669
+ if(cons.consName == null){
2670
+ console.error('create unique index constraint: must include consName in ',cons);
2671
+ }
2668
2672
  prefix = 'create unique index '+db.quoteIdent(cons.consName)+' on '+cualQuoteTableName;
2669
2673
  sql += 'where ' + cons.where;
2670
2674
  }else{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backend-plus",
3
3
  "description": "Backend for typed controls",
4
- "version": "1.16.16",
4
+ "version": "1.16.17",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "repository": "codenautas/backend-plus",
@@ -32,18 +32,18 @@
32
32
  "ajax-best-promise": "^0.3.7",
33
33
  "backend-skins": "^0.1.15",
34
34
  "best-globals": "^1.0.3",
35
- "big.js": "^6.2.0",
36
- "body-parser": "^1.20.0",
35
+ "big.js": "^6.2.1",
36
+ "body-parser": "^1.20.1",
37
37
  "cast-error": "^0.1.0",
38
38
  "castellano": "^0.1.3",
39
- "connect-pg-simple": "^7.0.0",
39
+ "connect-pg-simple": "^8.0.0",
40
40
  "cookie-parser": "^1.4.6",
41
41
  "dialog-promise": "^0.9.15",
42
42
  "discrepances": "^0.2.6",
43
- "express": "^4.18.1",
43
+ "express": "^4.18.2",
44
44
  "express-session": "^1.17.3",
45
45
  "express-useragent": "^1.0.15",
46
- "fs-extra": "^10.1.0",
46
+ "fs-extra": "^11.1.0",
47
47
  "js-to-html": "^1.3.2",
48
48
  "js-yaml": "^4.1.0",
49
49
  "json4all": "^1.1.0",
@@ -54,9 +54,9 @@
54
54
  "mini-tools": "^1.11.2",
55
55
  "moment": "^2.29.4",
56
56
  "multiparty": "^4.2.3",
57
- "nodemailer": "^6.7.7",
57
+ "nodemailer": "^6.8.0",
58
58
  "numeral": "^2.0.6",
59
- "pg-promise-strict": "^1.2.6",
59
+ "pg-promise-strict": "^1.3.0",
60
60
  "pikaday": "^1.8.2",
61
61
  "pug": "^3.0.2",
62
62
  "read-yaml-promise": "^1.0.2",
@@ -67,43 +67,43 @@
67
67
  "session-file-store": "^1.5.0",
68
68
  "sql-tools": "^0.1.2",
69
69
  "stack-trace": "^0.0.10",
70
- "stylus": "0.58.1",
70
+ "stylus": "0.59.0",
71
71
  "type-store": "^0.2.41",
72
72
  "typed-controls": "^0.10.0",
73
73
  "xlsx": "^0.18.5",
74
74
  "xlsx-style": "^0.8.13"
75
75
  },
76
76
  "devDependencies": {
77
- "@types/big.js": "^6.1.5",
77
+ "@types/big.js": "^6.1.6",
78
78
  "@types/expect.js": "~0.3.29",
79
- "@types/express": "^4.17.13",
79
+ "@types/express": "^4.17.15",
80
80
  "@types/express-useragent": "^1.0.2",
81
81
  "@types/fs-extra": "^9.0.13",
82
82
  "@types/js-yaml": "^4.0.5",
83
- "@types/mocha": "^9.1.1",
83
+ "@types/mocha": "^10.0.1",
84
84
  "@types/multiparty": "~0.0.33",
85
- "@types/node": "^18.0.3",
86
- "@types/nodemailer": "^6.4.4",
85
+ "@types/node": "^18.11.17",
86
+ "@types/nodemailer": "^6.4.7",
87
87
  "@types/numeral": "~2.0.2",
88
88
  "@types/session-file-store": "^1.2.2",
89
89
  "@types/stack-trace": "~0.0.30",
90
90
  "@types/websql": "~0.0.27",
91
91
  "esprima": "^4.0.1",
92
92
  "expect.js": "~0.3.1",
93
- "karma": "6.4.0",
93
+ "karma": "6.4.1",
94
94
  "karma-chrome-launcher": "^3.1.1",
95
95
  "karma-expect": "^1.1.3",
96
96
  "karma-firefox-launcher": "^2.1.2",
97
97
  "karma-ie-launcher": "^1.0.0",
98
98
  "karma-mocha": "^2.0.1",
99
99
  "kill-9": "~0.4.3",
100
- "mocha": "^10.0.0",
100
+ "mocha": "^10.2.0",
101
101
  "nyc": "^15.1.0",
102
- "puppeteer": "^15.3.2",
103
- "sinon": "^14.0.0",
104
- "supertest": "^6.2.4",
102
+ "puppeteer": "^19.4.1",
103
+ "sinon": "^15.0.1",
104
+ "supertest": "^6.3.3",
105
105
  "types.d.ts": "~0.6.7",
106
- "typescript": "^4.7.4",
106
+ "typescript": "^4.9.4",
107
107
  "why-is-node-running": "^2.2.2"
108
108
  },
109
109
  "engines": {