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.
@@ -36,10 +36,12 @@ export function validateConfig(config) {
36
36
  const emailInterface = Interface({
37
37
  email: "email",
38
38
  });
39
- const vmail = emailInterface.safeParse({ email: d2.email || "" });
40
- if (!vmail.success) {
41
- console.error(vmail.errors.join("\n"));
42
- throw new Error(`[XyNginC] Configuration error: 'email' is invalid for ${d2.domain}`);
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) {
@@ -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
- server.xynginc = {
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.86",
4
- "description": "XyPriss Nginx Controller - Automatic Nginx \u0026 SSL management for XyPriss servers",
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": "\u003e=18.0.0"
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 \u0026\u0026 xfpm run build:multi",
37
- "build:all": "xfpm run build:go \u0026\u0026 xfpm run build",
38
- "build:go": "cd core-go \u0026\u0026 go build -o xynginc \u0026\u0026 cp xynginc ../bin/",
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 \u0026\u0026 xfpm sign ./ --min-version 1.0.81 --fix"
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.5",
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.HTTP.REQUEST",
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
+ }
@@ -1,11 +1,11 @@
1
1
  --- XYPRISS SIGNATURE (G3) ---
2
- Manifest: xynginc@1.0.86
2
+ Manifest: xynginc@1.0.87
3
3
  Min-Engine: 1.0.81
4
- Fingerprint: sha256:40f3ae30db2a46eab408d256c9dbf60ea4cfd6b4e9f91820f37fa2d17e9b4beb
4
+ Fingerprint: sha256:8bd98569d2c8b7421e2f7f21ce07862a5ba06d2e394bd9b4c9affb02de0614f7
5
5
  Identity: ed25519:a58b17a3e46302dd3ae5538bc9b8b991c57f4c5fe2e7d8ac41803de818d947f4
6
- Privileges: XHS.HOOK.HTTP.REQUEST,XHS.HOOK.LIFECYCLE.SERVER_READY
7
- Expires: 2027-04-28T13:54:14Z
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:dHG3yuyAtz9gMPZuRK7DTdhIwaAnY/4Gmtpb8oPaAupwFlKxBlledKAWCaEBzpz3nZe7O9uTu4fn1OsMOjmEBA==
10
+ base64:7VpRWk2mrazovUTa7OcFKfyLAYV7jwGTpfB2/ZxFTA+RuqiIOIrUrm+CVTGsfmV4pUFRSC+/e3fa821ulrtIDw==
11
11
  --- END XYPRISS SIGNATURE ---