@friggframework/admin-scripts 2.0.0--canary.517.542a9ec.0 → 2.0.0--canary.517.216685f.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
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/admin-scripts",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.517.
|
|
4
|
+
"version": "2.0.0--canary.517.216685f.0",
|
|
5
5
|
"description": "Admin Script Runner for Frigg - Execute maintenance and operational scripts in hosted environments",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@aws-sdk/client-scheduler": "^3.588.0",
|
|
8
|
-
"@friggframework/core": "2.0.0--canary.517.
|
|
8
|
+
"@friggframework/core": "2.0.0--canary.517.216685f.0",
|
|
9
9
|
"@hapi/boom": "^10.0.1",
|
|
10
10
|
"express": "^4.18.2",
|
|
11
11
|
"serverless-http": "^3.2.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@friggframework/eslint-config": "2.0.0--canary.517.
|
|
15
|
-
"@friggframework/prettier-config": "2.0.0--canary.517.
|
|
16
|
-
"@friggframework/test": "2.0.0--canary.517.
|
|
14
|
+
"@friggframework/eslint-config": "2.0.0--canary.517.216685f.0",
|
|
15
|
+
"@friggframework/prettier-config": "2.0.0--canary.517.216685f.0",
|
|
16
|
+
"@friggframework/test": "2.0.0--canary.517.216685f.0",
|
|
17
17
|
"eslint": "^8.22.0",
|
|
18
18
|
"jest": "^29.7.0",
|
|
19
19
|
"prettier": "^2.7.1",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"maintenance",
|
|
45
45
|
"operations"
|
|
46
46
|
],
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "216685fea6d163571fffe8203df76a9a2f05e933"
|
|
48
48
|
}
|
|
@@ -8,9 +8,6 @@ class AdminScriptBase {
|
|
|
8
8
|
inputSchema: null,
|
|
9
9
|
outputSchema: null,
|
|
10
10
|
|
|
11
|
-
// Scheduling is not declared here — a script is a capability. Admins
|
|
12
|
-
// activate a schedule at runtime via PUT /admin/scripts/:name/schedule.
|
|
13
|
-
|
|
14
11
|
config: {
|
|
15
12
|
timeout: 300000,
|
|
16
13
|
requireIntegrationInstance: false,
|
|
@@ -6,8 +6,6 @@ const Boom = require('@hapi/boom');
|
|
|
6
6
|
* Application Layer - Hexagonal Architecture
|
|
7
7
|
*
|
|
8
8
|
* Deletes a schedule override and cleans up external scheduler resources.
|
|
9
|
-
* After deletion the script has no active schedule — schedules are never
|
|
10
|
-
* derived from the Definition; an admin re-activates one via PUT /schedule.
|
|
11
9
|
*/
|
|
12
10
|
class DeleteScheduleUseCase {
|
|
13
11
|
constructor({ commands, schedulerAdapter, scriptFactory }) {
|
|
@@ -33,8 +31,6 @@ class DeleteScheduleUseCase {
|
|
|
33
31
|
deleteResult.deleted?.externalScheduleId
|
|
34
32
|
);
|
|
35
33
|
|
|
36
|
-
// Nothing derives a schedule from the Definition, so once the DB
|
|
37
|
-
// override is removed the script has no active schedule.
|
|
38
34
|
const effectiveSchedule = { source: 'none', enabled: false };
|
|
39
35
|
|
|
40
36
|
return {
|
|
@@ -5,12 +5,7 @@ const Boom = require('@hapi/boom');
|
|
|
5
5
|
*
|
|
6
6
|
* Application Layer - Hexagonal Architecture
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
* 1. Database override (activated at runtime via PUT /schedule)
|
|
10
|
-
* 2. None (script is declared but not actively scheduled)
|
|
11
|
-
*
|
|
12
|
-
* Schedules are never derived from the script Definition — a script declares
|
|
13
|
-
* a capability; an admin activates a schedule explicitly via the API.
|
|
8
|
+
* Returns the script's database schedule, or a disabled schedule when none exists.
|
|
14
9
|
*/
|
|
15
10
|
class GetEffectiveScheduleUseCase {
|
|
16
11
|
constructor({ commands, scriptFactory }) {
|
|
@@ -26,7 +21,6 @@ class GetEffectiveScheduleUseCase {
|
|
|
26
21
|
async execute(scriptName) {
|
|
27
22
|
this._validateScriptExists(scriptName);
|
|
28
23
|
|
|
29
|
-
// Priority 1: Database override
|
|
30
24
|
const dbSchedule = await this.commands.getScheduleByScriptName(
|
|
31
25
|
scriptName
|
|
32
26
|
);
|
|
@@ -37,8 +31,6 @@ class GetEffectiveScheduleUseCase {
|
|
|
37
31
|
};
|
|
38
32
|
}
|
|
39
33
|
|
|
40
|
-
// No database override: the script is declared but not actively
|
|
41
|
-
// scheduled. Admins activate scheduling explicitly via PUT /schedule.
|
|
42
34
|
return {
|
|
43
35
|
source: 'none',
|
|
44
36
|
schedule: {
|