@stamhoofd/backend-backup 2.120.6 → 2.122.0
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 +28 -17
- package/src/boot.ts +3 -4
- package/stamhoofd.d.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stamhoofd/backend-backup",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.122.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -8,32 +8,43 @@
|
|
|
8
8
|
"require": "./dist/index.js"
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
|
-
"license": "UNLICENCED",
|
|
12
11
|
"scripts": {
|
|
13
|
-
"dev:full": "wait-on ../../shared/middleware/dist/index.js && concurrently -r 'yarn -s build --watch --preserveWatchOutput' \"wait-on ./dist/index.js && nodemon --quiet --inspect=5858 --watch dist --watch '../../../shared/*/dist/' --watch '../../shared/*/dist/' --ext .ts,.json,.sql,.js --watch .env.json --delay 1000ms --exec 'node --enable-source-maps ./dist/index.js' --signal SIGTERM\"",
|
|
14
12
|
"build": "tsc --build tsconfig.build.json",
|
|
15
13
|
"build:full": "yarn -s clear && yarn -s build",
|
|
16
14
|
"clear": "rm -rf ./dist && rm -f *.tsbuildinfo",
|
|
17
|
-
"
|
|
18
|
-
"lint": "eslint"
|
|
19
|
-
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"@types/formidable": "3.4.5",
|
|
22
|
-
"@types/luxon": "3.4.2",
|
|
23
|
-
"@types/mysql": "^2.15.20",
|
|
24
|
-
"@types/node": "^22"
|
|
15
|
+
"dev:full": "wait-on ../../shared/middleware/dist/index.js && concurrently -r 'yarn -s build --watch --preserveWatchOutput' \"wait-on ./dist/index.js && nodemon --quiet --inspect=5858 --watch dist --watch '../../../shared/*/dist/' --watch '../../shared/*/dist/' --ext .ts,.json,.sql,.js --watch .env.json --delay 1000ms --exec 'node --enable-source-maps ./dist/index.js' --signal SIGTERM\"",
|
|
16
|
+
"lint": "eslint",
|
|
17
|
+
"start": "yarn -s build && node --enable-source-maps ./dist/index.js"
|
|
25
18
|
},
|
|
26
19
|
"dependencies": {
|
|
27
|
-
"@aws-sdk/client-s3": "
|
|
20
|
+
"@aws-sdk/client-s3": "3.1068.0",
|
|
21
|
+
"@simonbackx/simple-database": "1.37.1",
|
|
22
|
+
"@simonbackx/simple-encoding": "2.26.10",
|
|
28
23
|
"@simonbackx/simple-endpoints": "1.21.1",
|
|
29
|
-
"@simonbackx/simple-
|
|
24
|
+
"@simonbackx/simple-errors": "1.5.0",
|
|
25
|
+
"@simonbackx/simple-logging": "1.0.1",
|
|
26
|
+
"@stamhoofd/backend-env": "2.122.0",
|
|
27
|
+
"@stamhoofd/backend-middleware": "2.122.0",
|
|
28
|
+
"@stamhoofd/crons": "2.122.0",
|
|
29
|
+
"@stamhoofd/logging": "2.122.0",
|
|
30
|
+
"@stamhoofd/queues": "2.122.0",
|
|
31
|
+
"@stamhoofd/types": "2.122.0",
|
|
32
|
+
"@stamhoofd/utility": "2.122.0",
|
|
33
|
+
"chalk": "5.6.2",
|
|
30
34
|
"formidable": "3.5.4",
|
|
31
|
-
"luxon": "3.
|
|
32
|
-
"mockdate": "
|
|
33
|
-
"mysql2": "
|
|
35
|
+
"luxon": "3.7.2",
|
|
36
|
+
"mockdate": "3.0.5",
|
|
37
|
+
"mysql2": "3.22.5"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/formidable": "3.5.1",
|
|
41
|
+
"@types/luxon": "3.7.1",
|
|
42
|
+
"@types/mysql": "2.15.27",
|
|
43
|
+
"@types/node": "22.15.34"
|
|
34
44
|
},
|
|
45
|
+
"license": "UNLICENCED",
|
|
35
46
|
"publishConfig": {
|
|
36
47
|
"access": "public"
|
|
37
48
|
},
|
|
38
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "3c022b7d7801fb105acfaa401432a8d029abda61"
|
|
39
50
|
}
|
package/src/boot.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CORSPreflightEndpoint, Router, RouterServer } from '@simonbackx/simple-endpoints';
|
|
2
2
|
import { CORSMiddleware, LogMiddleware } from '@stamhoofd/backend-middleware';
|
|
3
|
-
import { loadLogger } from '@stamhoofd/logging';
|
|
4
3
|
import { startCrons, stopCrons, waitForCrons } from '@stamhoofd/crons';
|
|
4
|
+
import { loadLogger } from '@stamhoofd/logging';
|
|
5
5
|
import { cleanBackups } from './helpers/backup.js';
|
|
6
6
|
|
|
7
7
|
process.on('unhandledRejection', (error: Error) => {
|
|
@@ -67,8 +67,7 @@ const start = async () => {
|
|
|
67
67
|
try {
|
|
68
68
|
await routerServer.close();
|
|
69
69
|
console.log('HTTP server stopped');
|
|
70
|
-
}
|
|
71
|
-
catch (err) {
|
|
70
|
+
} catch (err) {
|
|
72
71
|
console.error('Failed to stop HTTP server:');
|
|
73
72
|
console.error(err);
|
|
74
73
|
}
|
|
@@ -97,7 +96,7 @@ const start = async () => {
|
|
|
97
96
|
|
|
98
97
|
// Register crons
|
|
99
98
|
await import('./crons.js');
|
|
100
|
-
startCrons({allowReadOnly: true});
|
|
99
|
+
startCrons({ allowReadOnly: true, allowBeforeSeeds: true });
|
|
101
100
|
|
|
102
101
|
// Clean backups on boot (bit faster to retrieve the timestamp of the last backup for the health endpoint)
|
|
103
102
|
await cleanBackups();
|
package/stamhoofd.d.ts
CHANGED