@stamhoofd/backend 2.48.0 → 2.48.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stamhoofd/backend",
3
- "version": "2.48.0",
3
+ "version": "2.48.1",
4
4
  "main": "./dist/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -36,14 +36,14 @@
36
36
  "@simonbackx/simple-encoding": "2.15.1",
37
37
  "@simonbackx/simple-endpoints": "1.14.0",
38
38
  "@simonbackx/simple-logging": "^1.0.1",
39
- "@stamhoofd/backend-i18n": "2.48.0",
40
- "@stamhoofd/backend-middleware": "2.48.0",
41
- "@stamhoofd/email": "2.48.0",
42
- "@stamhoofd/models": "2.48.0",
43
- "@stamhoofd/queues": "2.48.0",
44
- "@stamhoofd/sql": "2.48.0",
45
- "@stamhoofd/structures": "2.48.0",
46
- "@stamhoofd/utility": "2.48.0",
39
+ "@stamhoofd/backend-i18n": "2.48.1",
40
+ "@stamhoofd/backend-middleware": "2.48.1",
41
+ "@stamhoofd/email": "2.48.1",
42
+ "@stamhoofd/models": "2.48.1",
43
+ "@stamhoofd/queues": "2.48.1",
44
+ "@stamhoofd/sql": "2.48.1",
45
+ "@stamhoofd/structures": "2.48.1",
46
+ "@stamhoofd/utility": "2.48.1",
47
47
  "archiver": "^7.0.1",
48
48
  "aws-sdk": "^2.885.0",
49
49
  "axios": "1.6.8",
@@ -60,5 +60,5 @@
60
60
  "postmark": "^4.0.5",
61
61
  "stripe": "^16.6.0"
62
62
  },
63
- "gitHead": "64ace7d8f8dcfa887046c4415d0f0f4cac236ef4"
63
+ "gitHead": "06c0bb89184e23767bf05d75c9ade7e01b9bb77a"
64
64
  }
@@ -19,6 +19,10 @@ export class ModelHelper {
19
19
 
20
20
  await onBatchReceived(models);
21
21
 
22
+ if (models.length < limit) {
23
+ break;
24
+ }
25
+
22
26
  lastId
23
27
  = models[
24
28
  models.length - 1
@@ -16,8 +16,12 @@ export default new Migration(async () => {
16
16
 
17
17
  await ModelHelper.loop(Order, 'id', async (batch: Order[]) => {
18
18
  console.log('Saving orders...', `(${count})`);
19
+
19
20
  // save all orders to update the new columns
20
- await Promise.all(batch.map(order => order.save()));
21
+ for (const order of batch) {
22
+ await order.save();
23
+ }
24
+
21
25
  count += limit;
22
26
  },
23
27
  { limit });