@hivemagnus/magnus 4.0.0 → 4.1.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/templates.d.ts +7 -2
- package/dist/templates.js +11 -2
- package/package.json +13 -58
package/dist/templates.d.ts
CHANGED
|
@@ -38,8 +38,13 @@ export declare const START_LIMIT: string[];
|
|
|
38
38
|
export declare function unitPathProblem(what: string, path: string): string | null;
|
|
39
39
|
export declare function serverUnit(options: ServiceUnitOptions): string;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
41
|
+
* The console exits 0 on SIGTERM; consoles before 4.0.1 exited 143 (128 + SIGTERM), which
|
|
42
|
+
* systemd reads as a failed stop. Kept in the console unit for those.
|
|
43
|
+
*/
|
|
44
|
+
export declare const UI_SUCCESS_EXIT = "SuccessExitStatus=143";
|
|
45
|
+
/**
|
|
46
|
+
* Bring a unit generated by an older engine up to date without touching anything else in it: the
|
|
47
|
+
* start limit, the console's stop exit status, and the Node.js binary in ExecStart.
|
|
43
48
|
*/
|
|
44
49
|
export declare function refreshUnit(content: string, nodePath?: string): string;
|
|
45
50
|
/** docker compose project name for a new project's PostgreSQL and Redis. */
|
package/dist/templates.js
CHANGED
|
@@ -92,8 +92,13 @@ export function serverUnit(options) {
|
|
|
92
92
|
].join('\n');
|
|
93
93
|
}
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
95
|
+
* The console exits 0 on SIGTERM; consoles before 4.0.1 exited 143 (128 + SIGTERM), which
|
|
96
|
+
* systemd reads as a failed stop. Kept in the console unit for those.
|
|
97
|
+
*/
|
|
98
|
+
export const UI_SUCCESS_EXIT = 'SuccessExitStatus=143';
|
|
99
|
+
/**
|
|
100
|
+
* Bring a unit generated by an older engine up to date without touching anything else in it: the
|
|
101
|
+
* start limit, the console's stop exit status, and the Node.js binary in ExecStart.
|
|
97
102
|
*/
|
|
98
103
|
export function refreshUnit(content, nodePath) {
|
|
99
104
|
let lines = content.split('\n');
|
|
@@ -102,6 +107,9 @@ export function refreshUnit(content, nodePath) {
|
|
|
102
107
|
const end = lines.findIndex((line, index) => index > unitAt && (line.startsWith('[') || line === ''));
|
|
103
108
|
lines.splice(end < 0 ? lines.length : end, 0, ...START_LIMIT);
|
|
104
109
|
}
|
|
110
|
+
const execAt = lines.findIndex((line) => line.startsWith('ExecStart=') && /\/magnus-ui(\.mjs)?\s/.test(line));
|
|
111
|
+
if (execAt >= 0 && !lines.some((line) => line.startsWith('SuccessExitStatus=')))
|
|
112
|
+
lines.splice(execAt + 1, 0, UI_SUCCESS_EXIT);
|
|
105
113
|
if (nodePath)
|
|
106
114
|
lines = lines.map((line) => (line.startsWith('ExecStart=') ? line.replace(/^ExecStart=\S+/, `ExecStart=${nodePath}`) : line));
|
|
107
115
|
return lines.join('\n');
|
|
@@ -130,6 +138,7 @@ export function uiUnit(options) {
|
|
|
130
138
|
...(options.serviceUser ? [`User=${options.serviceUser}`] : []),
|
|
131
139
|
`WorkingDirectory=${dataDir}`,
|
|
132
140
|
`ExecStart=${options.nodePath} ${project.bin('current', 'magnus-ui')} start --env-file ${project.envFile('ui')} --data-dir ${dataDir}`,
|
|
141
|
+
UI_SUCCESS_EXIT,
|
|
133
142
|
...hardening(options, [dataDir, project.path('run')]),
|
|
134
143
|
].join('\n');
|
|
135
144
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hivemagnus/magnus",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Install, upgrade and roll back a Magnus server and console with one command: `npx @hivemagnus/magnus init`, then `magnus upgrade`. Pins exact, tested component versions, backs up PostgreSQL before every migration and reverts automatically when the new version fails its health check.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"magnus",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"clean": "node -e \"const fs=require('node:fs');fs.rmSync('dist',{recursive:true,force:true});fs.rmSync('tsconfig.tsbuildinfo',{force:true})\""
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@hivemagnus/magnus-contracts": "4.
|
|
50
|
+
"@hivemagnus/magnus-contracts": "4.1.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^24.19.2",
|
|
@@ -56,74 +56,29 @@
|
|
|
56
56
|
},
|
|
57
57
|
"magnusRelease": {
|
|
58
58
|
"schema": 1,
|
|
59
|
-
"version": "4.
|
|
59
|
+
"version": "4.1.0",
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": "^24.22.3 || ^26.13.1"
|
|
62
62
|
},
|
|
63
63
|
"components": {
|
|
64
|
-
"@hivemagnus/magnus-server": "4.
|
|
65
|
-
"@hivemagnus/magnus-ui": "4.
|
|
66
|
-
"@hivemagnus/magnus-contracts": "4.
|
|
67
|
-
"@hivemagnus/magnus-agent": "4.
|
|
64
|
+
"@hivemagnus/magnus-server": "4.1.0",
|
|
65
|
+
"@hivemagnus/magnus-ui": "4.1.0",
|
|
66
|
+
"@hivemagnus/magnus-contracts": "4.1.0",
|
|
67
|
+
"@hivemagnus/magnus-agent": "4.1.0"
|
|
68
68
|
},
|
|
69
|
-
"breaking":
|
|
70
|
-
"minUpgradeFrom": "
|
|
69
|
+
"breaking": false,
|
|
70
|
+
"minUpgradeFrom": "4.0.0",
|
|
71
71
|
"engineProtocol": 2,
|
|
72
72
|
"newRequiredEnv": [],
|
|
73
|
-
"newOptionalEnv": [
|
|
74
|
-
|
|
75
|
-
"name": "MAGNUS_BACKUP_KEEP_DAYS",
|
|
76
|
-
"component": "server",
|
|
77
|
-
"secret": false,
|
|
78
|
-
"description": "Dumps younger than this many days are never pruned, whatever MAGNUS_BACKUP_KEEP says (default 7; 0 turns the age rule off)."
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"name": "MAGNUS_BACKUP_PRUNE",
|
|
82
|
-
"component": "server",
|
|
83
|
-
"secret": false,
|
|
84
|
-
"description": "false: magnus-server backup and startup auto-migrate write dumps without pruning them (default true). Dumps a managed project's rollback would restore are never pruned."
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"name": "MAGNUS_AUDIT_RETENTION_DAYS",
|
|
88
|
-
"component": "server",
|
|
89
|
-
"secret": false,
|
|
90
|
-
"description": "Days (at least 90) of audit log to keep; older daily files are deleted once a day and the deletion is audited. Unset keeps the audit log forever."
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
"removedEnv": [
|
|
94
|
-
{
|
|
95
|
-
"name": "IAM_CORE_URL",
|
|
96
|
-
"component": "server",
|
|
97
|
-
"note": "the external IAM mode is removed and the server refuses to start while it is set; configure Oathweave mode (OATHWEAVE_ISSUER, OATHWEAVE_JWKS_URL, OATHWEAVE_USERINFO_URL, MAGNUS_OATHWEAVE_IDENTITIES_JSON) and remove it"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"name": "IAM_TOKEN_ISSUER",
|
|
101
|
-
"component": "server",
|
|
102
|
-
"note": "removed with the external IAM mode; ignored, remove it"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"name": "IAM_TOKEN_AUDIENCE",
|
|
106
|
-
"component": "server",
|
|
107
|
-
"note": "removed with the external IAM mode; ignored, remove it"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"name": "HIVE_ROUTER_ADMIN_URL",
|
|
111
|
-
"component": "ui",
|
|
112
|
-
"note": "the embedded Emberpath admin proxy is removed; magnus-ui check warns while it is set, remove it"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"name": "HIVE_ROUTER_CA_PATH",
|
|
116
|
-
"component": "ui",
|
|
117
|
-
"note": "removed with the embedded Emberpath admin proxy; remove it"
|
|
118
|
-
}
|
|
119
|
-
],
|
|
73
|
+
"newOptionalEnv": [],
|
|
74
|
+
"removedEnv": [],
|
|
120
75
|
"migrations": [],
|
|
121
76
|
"agent": {
|
|
122
77
|
"selfUpgradeProtocol": 1,
|
|
123
78
|
"minLauncher": 1
|
|
124
79
|
},
|
|
125
|
-
"summary": "
|
|
126
|
-
"notesUrl": "https://github.com/ChefTaco/magnus/releases/tag/v4.
|
|
80
|
+
"summary": "New Agent can enable the reviewed Lucent 0.1.0 extension. Managed nodes install Ardent 3.7.0 with the verified extension archive and retain other reviewed packages. Existing agents keep their configured plugins.",
|
|
81
|
+
"notesUrl": "https://github.com/ChefTaco/magnus/releases/tag/v4.1.0",
|
|
127
82
|
"allowScripts": {
|
|
128
83
|
"@prisma/engines": true,
|
|
129
84
|
"argon2": true,
|