xynginc 1.0.90 → 1.0.91

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.
@@ -2,13 +2,29 @@ import { ensureBinary } from "./mods/ensureBinary";
2
2
  import { Logger } from "./mods/logger";
3
3
  import { addDomain, applyConfig, checkRequirements, getStatus, installRequirementsHandler, listDomains, reloadNginx, removeDomain, testNginx, } from "./mods/requirements";
4
4
  const getSudo = (sudoPassword) => {
5
- // Attempt multiple ways to get the password, including XyPriss internal env if somehow exposed
6
- const envPwd = __sys__.__env__.get("SUDO_PASSWORD");
7
- // || (global as any).__sys__?.$env?.("SUDO_PASSWORD");
8
- const pwd = sudoPassword || envPwd;
5
+ let pwd = sudoPassword;
6
+ // Attempt multiple ways to get the password from the host project's environment
7
+ if (!pwd && typeof __sys__ !== "undefined" && __sys__.__env__) {
8
+ const projectRoot = globalThis.__sys__?._primaryRoot ||
9
+ globalThis.__sys__?._internalRoot ||
10
+ process.cwd();
11
+ if (typeof __sys__.__env__.getForRoot === "function") {
12
+ pwd = __sys__.__env__.getForRoot("SUDO_PASSWORD", projectRoot);
13
+ }
14
+ if (!pwd) {
15
+ pwd = __sys__.__env__.get("SUDO_PASSWORD");
16
+ }
17
+ }
18
+ // Strip wrapping quotes if present in .env (e.g., SUDO_PASSWORD="Test")
19
+ if (pwd) {
20
+ if ((pwd.startsWith('"') && pwd.endsWith('"')) ||
21
+ (pwd.startsWith("'") && pwd.endsWith("'"))) {
22
+ pwd = pwd.slice(1, -1);
23
+ }
24
+ }
9
25
  if (pwd) {
10
26
  if (sudoPassword) {
11
- Logger.info(`[XyNginC] Using sudo password provided via plugin options(${sudoPassword.slice(0, 2)}***).`);
27
+ Logger.info(`[XyNginC] Using sudo password provided via plugin options(${pwd.slice(0, 2)}***).`);
12
28
  }
13
29
  else {
14
30
  Logger.info("[XyNginC] Using sudo password injected from environment variables.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xynginc",
3
- "version": "1.0.90",
3
+ "version": "1.0.91",
4
4
  "description": "XyPriss Nginx Controller - Automatic Nginx & SSL management for XyPriss servers",
5
5
  "author": "Seth Eleazar - iDevo",
6
6
  "license": "NOSL",
@@ -1,11 +1,11 @@
1
1
  --- XYPRISS SIGNATURE (G3) ---
2
- Manifest: xynginc@1.0.90
2
+ Manifest: xynginc@1.0.91
3
3
  Min-Engine: 1.0.81
4
- Fingerprint: sha256:ffa84c18821d96c5181edbf785ebb46455f72d0afd41ef1cf77d1ca5fc952009
4
+ Fingerprint: sha256:528683a10d34bbd3202d63026467c67783d03a68242cdca43cd0c3e775a07dd1
5
5
  Identity: ed25519:0e2e1accdbba45480979305256d50d368ae6cc2c0d7ee378c5f1999ae834cf58
6
6
  Privileges: XHS.HOOK.LIFECYCLE.REGISTER,XHS.HOOK.LIFECYCLE.SERVER_START,XHS.HOOK.LIFECYCLE.SERVER_STOP,XHS.HOOK.LIFECYCLE.SERVER_READY
7
- Expires: 2027-09-12T13:27:13Z
7
+ Expires: 2027-09-12T13:45:56Z
8
8
  Revision: sha256:none
9
9
  --- BEGIN CRYPTOGRAPHIC PROOF ---
10
- base64:Z5GE4EeTbAVB355EPp/JJ4e8HXsgDVVmhAXqYzLUePPSJgGS1g2BRXEBtSXE08nlsCdBnrnfIpnOWRXM2+S7Bg==
10
+ base64:4IQrfdTzQgE0onhmKPoT54zzAJ2oj34hrWiIiZXapzl+SNdSOBW/6LVtqf3B5Rbba8n3Q61mSXm+vTgIuPTXCA==
11
11
  --- END XYPRISS SIGNATURE ---