remult 0.23.0-exp.28 → 0.23.0-exp.29
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/esm/remult-knex/index.js
CHANGED
|
@@ -315,7 +315,7 @@ export class KnexSchemaBuilder {
|
|
|
315
315
|
if (!remult)
|
|
316
316
|
remult = remultContext;
|
|
317
317
|
const entities = allEntities.map((x) => remult.repo(x).metadata);
|
|
318
|
-
this.ensureSchema(entities);
|
|
318
|
+
await this.ensureSchema(entities);
|
|
319
319
|
}
|
|
320
320
|
async ensureSchema(entities) {
|
|
321
321
|
for (const entity of entities) {
|
|
@@ -330,6 +330,7 @@ export class KnexSchemaBuilder {
|
|
|
330
330
|
}
|
|
331
331
|
catch (err) {
|
|
332
332
|
console.error('failed ensure schema of ' + e.$entityName + ' ', err);
|
|
333
|
+
throw err;
|
|
333
334
|
}
|
|
334
335
|
}
|
|
335
336
|
}
|
|
@@ -49,11 +49,11 @@ remult.apiClient.url='localhost:3007/api
|
|
|
49
49
|
//p1 - DO NOT BREAK - move fieldref to second parameter, and lifecycle to 3rd consider the breaking signature change of saving on field options - the field becomes the 3rd parameter.
|
|
50
50
|
//p1 - test what happens with a many to one relation where the one no longer exist, in all 3 cases (toOne,reference,toone with fields)
|
|
51
51
|
//p1 - findid by default has cache - it sucks!
|
|
52
|
-
//p1 - mongo db relation based on _id did not work - https://codesandbox.io/p/devbox/mong-db-remult-pch8zc?file=%2Fsrc%2Findex.ts%3A53%2C51
|
|
53
52
|
//y2 - livequery for findfirst (@JY)
|
|
54
53
|
//y2 - #239 - (@JY) add a way to get from fieldMetadata back to entity repo (like we have in fieldRef)
|
|
55
54
|
//p2 - constraints (@JY)
|
|
56
55
|
//p2 - Add ability to process query that comes from the api
|
|
57
56
|
//p2 - too much data by mistake
|
|
58
57
|
//p2 - postgres case sensitive
|
|
59
|
-
//
|
|
58
|
+
//y1 - consider http status code for errors
|
|
59
|
+
//p2 - fix sql log to console to make more sense
|
package/package.json
CHANGED
|
@@ -189,7 +189,7 @@ var PostgresSchemaBuilder = /** @class */ (function () {
|
|
|
189
189
|
case 7:
|
|
190
190
|
err_1 = _b.sent();
|
|
191
191
|
console.error('failed verify structure of ' + e.$entityName + ' ', err_1);
|
|
192
|
-
|
|
192
|
+
throw err_1;
|
|
193
193
|
case 8:
|
|
194
194
|
entities_1_1 = entities_1.next();
|
|
195
195
|
return [3 /*break*/, 1];
|
package/remult-knex/index.js
CHANGED
|
@@ -610,11 +610,16 @@ var KnexSchemaBuilder = /** @class */ (function () {
|
|
|
610
610
|
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
611
611
|
var entities;
|
|
612
612
|
return tslib_1.__generator(this, function (_a) {
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
613
|
+
switch (_a.label) {
|
|
614
|
+
case 0:
|
|
615
|
+
if (!remult)
|
|
616
|
+
remult = remult_proxy_1.remult;
|
|
617
|
+
entities = context_1.allEntities.map(function (x) { return remult.repo(x).metadata; });
|
|
618
|
+
return [4 /*yield*/, this.ensureSchema(entities)];
|
|
619
|
+
case 1:
|
|
620
|
+
_a.sent();
|
|
621
|
+
return [2 /*return*/];
|
|
622
|
+
}
|
|
618
623
|
});
|
|
619
624
|
});
|
|
620
625
|
};
|
|
@@ -650,7 +655,7 @@ var KnexSchemaBuilder = /** @class */ (function () {
|
|
|
650
655
|
case 7:
|
|
651
656
|
err_2 = _b.sent();
|
|
652
657
|
console.error('failed ensure schema of ' + e.$entityName + ' ', err_2);
|
|
653
|
-
|
|
658
|
+
throw err_2;
|
|
654
659
|
case 8:
|
|
655
660
|
entities_1_1 = entities_1.next();
|
|
656
661
|
return [3 /*break*/, 1];
|
package/src/remult3/remult3.js
CHANGED
|
@@ -50,11 +50,11 @@ remult.apiClient.url='localhost:3007/api
|
|
|
50
50
|
//p1 - DO NOT BREAK - move fieldref to second parameter, and lifecycle to 3rd consider the breaking signature change of saving on field options - the field becomes the 3rd parameter.
|
|
51
51
|
//p1 - test what happens with a many to one relation where the one no longer exist, in all 3 cases (toOne,reference,toone with fields)
|
|
52
52
|
//p1 - findid by default has cache - it sucks!
|
|
53
|
-
//p1 - mongo db relation based on _id did not work - https://codesandbox.io/p/devbox/mong-db-remult-pch8zc?file=%2Fsrc%2Findex.ts%3A53%2C51
|
|
54
53
|
//y2 - livequery for findfirst (@JY)
|
|
55
54
|
//y2 - #239 - (@JY) add a way to get from fieldMetadata back to entity repo (like we have in fieldRef)
|
|
56
55
|
//p2 - constraints (@JY)
|
|
57
56
|
//p2 - Add ability to process query that comes from the api
|
|
58
57
|
//p2 - too much data by mistake
|
|
59
58
|
//p2 - postgres case sensitive
|
|
60
|
-
//
|
|
59
|
+
//y1 - consider http status code for errors
|
|
60
|
+
//p2 - fix sql log to console to make more sense
|