xynginc 1.0.86 → 1.0.87
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/mods/validateConfig.js +6 -4
- package/dist/startPlugin.js +3 -1
- package/dist/tests/main.d.ts +0 -0
- package/dist/tests/main.js +1 -0
- package/package.json +12 -10
- package/xypriss.plugin.xsig +5 -5
|
@@ -36,10 +36,12 @@ export function validateConfig(config) {
|
|
|
36
36
|
const emailInterface = Interface({
|
|
37
37
|
email: "email",
|
|
38
38
|
});
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
if (d2.email) {
|
|
40
|
+
const vmail = emailInterface.safeParse({ email: d2.email });
|
|
41
|
+
if (!vmail.success) {
|
|
42
|
+
console.error("EVMAIL: ", vmail.errors.join("\n"));
|
|
43
|
+
`[XyNginC] Configuration error: The provided email address (${d2.email}) is not valid for the domain "${d2.domain}".`;
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
// Set default host to localhost if not provided
|
|
45
47
|
if (!d2.host) {
|
package/dist/startPlugin.js
CHANGED
|
@@ -59,7 +59,7 @@ export async function startXNCPlugin(server, options) {
|
|
|
59
59
|
}, getSudo(sudoPassword));
|
|
60
60
|
Logger.success("[XyNginC] Configuration applied successfully!");
|
|
61
61
|
// Expose CLI helper methods on server
|
|
62
|
-
|
|
62
|
+
const sUtil = {
|
|
63
63
|
addDomain: (domain, port, ssl = false, email, maxBodySize) => addDomain(binary, domain, port, ssl, email, maxBodySize, getSudo(sudoPassword)),
|
|
64
64
|
removeDomain: (domain) => removeDomain(binary, domain, getSudo(sudoPassword)),
|
|
65
65
|
listDomains: () => listDomains(binary, getSudo(sudoPassword)),
|
|
@@ -68,6 +68,8 @@ export async function startXNCPlugin(server, options) {
|
|
|
68
68
|
status: () => getStatus(binary, getSudo(sudoPassword)),
|
|
69
69
|
installRequirements: () => installRequirementsHandler(binary, getSudo(sudoPassword)),
|
|
70
70
|
};
|
|
71
|
+
server.app.xynginc = sUtil;
|
|
72
|
+
server.xynginc = sUtil;
|
|
71
73
|
Logger.info("[XyNginC] Server methods available: server.xynginc.*");
|
|
72
74
|
}
|
|
73
75
|
catch (error) {
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xynginc",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "XyPriss Nginx Controller - Automatic Nginx
|
|
3
|
+
"version": "1.0.87",
|
|
4
|
+
"description": "XyPriss Nginx Controller - Automatic Nginx & SSL management for XyPriss servers",
|
|
5
5
|
"author": "Seth Eleazar - iDevo",
|
|
6
6
|
"license": "NOSL",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"xynginc": "./bin/xynginc"
|
|
18
18
|
},
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": "
|
|
20
|
+
"node": ">=18.0.0"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"plugin"
|
|
34
34
|
],
|
|
35
35
|
"scripts": {
|
|
36
|
-
"build": "tsc
|
|
37
|
-
"build:all": "xfpm run build:go
|
|
38
|
-
"build:go": "cd core-go
|
|
36
|
+
"build": "tsc && xfpm run build:multi",
|
|
37
|
+
"build:all": "xfpm run build:go && xfpm run build",
|
|
38
|
+
"build:go": "cd core-go && go build -o xynginc && cp xynginc ../bin/",
|
|
39
39
|
"build:multi": "bash scripts/build.sh",
|
|
40
40
|
"dev": "tsc --watch",
|
|
41
41
|
"install:manual": "sudo bash scripts/install.sh",
|
|
42
42
|
"postinstall": "node scripts/postinstall.js",
|
|
43
|
-
"prepublishOnly": "xfpm run build
|
|
43
|
+
"prepublishOnly": "xfpm run build && xfpm sign ./ --min-version 1.0.81 --fix"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"reliant-type": "^2.1.5",
|
|
47
47
|
"strulink": "^1.2.0",
|
|
48
|
-
"xypriss": "^9.9.
|
|
48
|
+
"xypriss": "^9.9.6",
|
|
49
49
|
"xypriss-security": "^2.1.16"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
@@ -54,8 +54,10 @@
|
|
|
54
54
|
},
|
|
55
55
|
"xfpm": {
|
|
56
56
|
"permissions": [
|
|
57
|
-
"XHS.HOOK.
|
|
57
|
+
"XHS.HOOK.LIFECYCLE.REGISTER",
|
|
58
|
+
"XHS.HOOK.LIFECYCLE.SERVER_START",
|
|
59
|
+
"XHS.HOOK.LIFECYCLE.SERVER_STOP",
|
|
58
60
|
"XHS.HOOK.LIFECYCLE.SERVER_READY"
|
|
59
61
|
]
|
|
60
62
|
}
|
|
61
|
-
}
|
|
63
|
+
}
|
package/xypriss.plugin.xsig
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- XYPRISS SIGNATURE (G3) ---
|
|
2
|
-
Manifest: xynginc@1.0.
|
|
2
|
+
Manifest: xynginc@1.0.87
|
|
3
3
|
Min-Engine: 1.0.81
|
|
4
|
-
Fingerprint: sha256:
|
|
4
|
+
Fingerprint: sha256:8bd98569d2c8b7421e2f7f21ce07862a5ba06d2e394bd9b4c9affb02de0614f7
|
|
5
5
|
Identity: ed25519:a58b17a3e46302dd3ae5538bc9b8b991c57f4c5fe2e7d8ac41803de818d947f4
|
|
6
|
-
Privileges: XHS.HOOK.
|
|
7
|
-
Expires: 2027-04-
|
|
6
|
+
Privileges: XHS.HOOK.LIFECYCLE.REGISTER,XHS.HOOK.LIFECYCLE.SERVER_START,XHS.HOOK.LIFECYCLE.SERVER_STOP,XHS.HOOK.LIFECYCLE.SERVER_READY
|
|
7
|
+
Expires: 2027-04-28T20:23:02Z
|
|
8
8
|
Revision: sha256:none
|
|
9
9
|
--- BEGIN CRYPTOGRAPHIC PROOF ---
|
|
10
|
-
base64:
|
|
10
|
+
base64:7VpRWk2mrazovUTa7OcFKfyLAYV7jwGTpfB2/ZxFTA+RuqiIOIrUrm+CVTGsfmV4pUFRSC+/e3fa821ulrtIDw==
|
|
11
11
|
--- END XYPRISS SIGNATURE ---
|