work-dispatcher 1.6.2 → 1.7.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/dist/server/router.d.ts.map +1 -1
- package/dist/server/router.js +6 -17
- package/dist/server/router.js.map +1 -1
- package/package.json +1 -4
- package/keycloak.json +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/server/router.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/server/router.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,MAAM,4CAAW,CAAC"}
|
package/dist/server/router.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Router } from 'express';
|
|
2
2
|
import { info } from '../utils/logging.js';
|
|
3
|
-
import session from 'express-session';
|
|
4
|
-
import Keycloak from 'keycloak-connect';
|
|
5
3
|
import { getDispatcherVersion } from '../utils/version.js';
|
|
6
4
|
import { addEventToList, addFeaturesToQ, currentlyWorkingOn, getCurrentFeature, getCurrentQ, getPastQ, resetQ, skipCurrentlyWorkingFeature, terminate } from '../work/workQ.js';
|
|
7
5
|
import { dispatcherConfig } from '../config/config.js';
|
|
@@ -9,16 +7,7 @@ import { getHealth } from '../work/health.js';
|
|
|
9
7
|
import { FeatureCatalog } from '../work/featureCatalogClass.js';
|
|
10
8
|
const startupTime = Date.now();
|
|
11
9
|
export const router = Router();
|
|
12
|
-
|
|
13
|
-
router.use(session({
|
|
14
|
-
secret: 'ZortBVOnKsDsGNQZZ9cBrBZee0qxKKF2',
|
|
15
|
-
resave: false,
|
|
16
|
-
saveUninitialized: true,
|
|
17
|
-
store: memoryStore,
|
|
18
|
-
}));
|
|
19
|
-
const keycloak = new Keycloak({ store: memoryStore });
|
|
20
|
-
router.use(keycloak.middleware({ logout: '/logout' }));
|
|
21
|
-
router.get('/', keycloak.protect('admin'), (_req, res) => {
|
|
10
|
+
router.get('/', (_req, res) => {
|
|
22
11
|
res.render(import.meta.dirname + '/../../res/views/index', {
|
|
23
12
|
startupTime: new Date(startupTime).toLocaleString(),
|
|
24
13
|
pageTitle: dispatcherConfig.softwareName,
|
|
@@ -40,7 +29,7 @@ router.get('/', keycloak.protect('admin'), (_req, res) => {
|
|
|
40
29
|
},
|
|
41
30
|
});
|
|
42
31
|
});
|
|
43
|
-
router.get('/trigger',
|
|
32
|
+
router.get('/trigger', (_req, res) => {
|
|
44
33
|
info('ROUT', 'REST triggered');
|
|
45
34
|
addEventToList('REST', null);
|
|
46
35
|
if (process.env['DEBUG'])
|
|
@@ -49,26 +38,26 @@ router.get('/trigger', keycloak.protect('admin'), (_req, res) => {
|
|
|
49
38
|
addFeaturesToQ(dispatcherConfig.featureCatalog.TRIGGERED);
|
|
50
39
|
res.redirect('/');
|
|
51
40
|
});
|
|
52
|
-
router.get('/pause',
|
|
41
|
+
router.get('/pause', (_req, res) => {
|
|
53
42
|
info('ROUT', 'PAUSE via REST triggered');
|
|
54
43
|
addEventToList('Pause', null);
|
|
55
44
|
resetQ();
|
|
56
45
|
addFeaturesToQ(FeatureCatalog.PAUSE_SYSTEM);
|
|
57
46
|
res.redirect('/');
|
|
58
47
|
});
|
|
59
|
-
router.get('/reset',
|
|
48
|
+
router.get('/reset', (_req, res) => {
|
|
60
49
|
info('ROUT', 'RESET via REST triggered');
|
|
61
50
|
addEventToList('Reset', null);
|
|
62
51
|
resetQ();
|
|
63
52
|
res.redirect('/');
|
|
64
53
|
});
|
|
65
|
-
router.get('/reboot',
|
|
54
|
+
router.get('/reboot', (_req, res) => {
|
|
66
55
|
info('ROUT', 'REBOOT via REST triggered');
|
|
67
56
|
terminate();
|
|
68
57
|
process.kill(process.pid, 'SIGTERM');
|
|
69
58
|
res.redirect('/');
|
|
70
59
|
});
|
|
71
|
-
router.get('/skip',
|
|
60
|
+
router.get('/skip', (_req, res) => {
|
|
72
61
|
info('ROUT', 'SKIP via REST triggered');
|
|
73
62
|
skipCurrentlyWorkingFeature();
|
|
74
63
|
res.redirect('/');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/server/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../src/server/router.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,2BAA2B,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChL,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;AAC/B,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;AAE/B,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IAC5B,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,GAAG,wBAAwB,EAAE;QACzD,WAAW,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,cAAc,EAAE;QACnD,SAAS,EAAE,gBAAgB,CAAC,YAAY;QACxC,iBAAiB,EAAE,oBAAoB,EAAE;QACzC,eAAe,EAAE,gBAAgB,CAA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CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACzC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC9B,MAAM,EAAE,CAAC;IACT,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IAClC,IAAI,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;IAC1C,SAAS,EAAE,CAAC;IACZ,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACrC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IAChC,IAAI,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;IACxC,2BAA2B,EAAE,CAAC;IAC9B,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IAClC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "work-dispatcher",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Typescript library to handle task or work scheduling",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript"
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/cors": "^2.8.19",
|
|
35
35
|
"@types/express": "^5.0.6",
|
|
36
|
-
"@types/express-session": "^1.18.2",
|
|
37
36
|
"@types/node": "^25.3.3",
|
|
38
37
|
"@vitest/coverage-v8": "^4.0.18",
|
|
39
38
|
"semantic-release": "^25.0.2",
|
|
@@ -45,8 +44,6 @@
|
|
|
45
44
|
"cors": "^2.8.5",
|
|
46
45
|
"ejs": "^4.0.1",
|
|
47
46
|
"express": "^5.2.1",
|
|
48
|
-
"express-session": "^1.18.2",
|
|
49
|
-
"keycloak-connect": "^26.1.1",
|
|
50
47
|
"node-cron": "^4.2.1",
|
|
51
48
|
"redis": "^5.11.0"
|
|
52
49
|
}
|