xypriss 9.10.15 → 9.10.17
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/README.md +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +19 -5
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ _Stop Coding Backends. Start Deploying Fortresses._
|
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
18
|
> [!IMPORTANT]
|
|
19
|
-
> **Official Stable Release** — XyPriss has graduated from Beta. The current stable version is **v9.10.
|
|
19
|
+
> **Official Stable Release** — XyPriss has graduated from Beta. The current stable version is **v9.10.16++**.
|
|
20
20
|
|
|
21
21
|
[**XyPriss**](https://xypriss.nehonix.com) is an **Enterprise-Grade Hybrid Web Framework** that combines the raw performance of compiled native binaries with the productivity and flexibility of **TypeScript**. It is designed for teams that require both operational speed and developer velocity, without compromise.
|
|
22
22
|
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { fileURLToPath } from "url";
|
|
9
9
|
import path from "path";
|
|
10
10
|
import fs from "fs";
|
|
11
|
+
import { execSync } from "child_process";
|
|
11
12
|
import { installXems } from "./install-xems.js";
|
|
12
13
|
import { installXHSC } from "./postinstall-xhsc.js";
|
|
13
14
|
|
|
@@ -82,8 +83,23 @@ async function postInstall() {
|
|
|
82
83
|
// 1. Initial gate: Check environment variable
|
|
83
84
|
if (process.env.XFPM !== "true") return false;
|
|
84
85
|
|
|
85
|
-
// 2. Robust verification
|
|
86
|
-
|
|
86
|
+
// 2. Windows Robust verification
|
|
87
|
+
if (process.platform === "win32") {
|
|
88
|
+
let pid = process.ppid;
|
|
89
|
+
for (let i = 0; i < 2; i++) {
|
|
90
|
+
const cmd = `wmic process where (processid=${pid}) get ExecutablePath,ParentProcessId /format:list`;
|
|
91
|
+
const out = execSync(cmd, { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] });
|
|
92
|
+
if (out.toLowerCase().includes("xfpm")) return true;
|
|
93
|
+
const match = out.match(/ParentProcessId=(\d+)/);
|
|
94
|
+
if (!match) break;
|
|
95
|
+
pid = parseInt(match[1], 10);
|
|
96
|
+
}
|
|
97
|
+
return process.env.XFPM === "true";
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// 3. Linux/macOS Robust verification: Check process tree via /proc
|
|
101
|
+
if (!fs.existsSync("/proc")) return true;
|
|
102
|
+
|
|
87
103
|
let currentPid = process.pid;
|
|
88
104
|
for (let i = 0; i < 3; i++) {
|
|
89
105
|
const statusPath = `/proc/${currentPid}/status`;
|
|
@@ -95,7 +111,6 @@ async function postInstall() {
|
|
|
95
111
|
|
|
96
112
|
currentPid = parseInt(ppidMatch[1], 10);
|
|
97
113
|
|
|
98
|
-
// Check executable name in /proc/[pid]/comm
|
|
99
114
|
const commPath = `/proc/${currentPid}/comm`;
|
|
100
115
|
if (fs.existsSync(commPath)) {
|
|
101
116
|
const comm = fs.readFileSync(commPath, "utf8").trim();
|
|
@@ -103,7 +118,6 @@ async function postInstall() {
|
|
|
103
118
|
}
|
|
104
119
|
}
|
|
105
120
|
} catch (e) {
|
|
106
|
-
// Fallback for non-Linux systems or permission issues
|
|
107
121
|
return process.env.XFPM === "true";
|
|
108
122
|
}
|
|
109
123
|
return false;
|
|
@@ -116,7 +130,7 @@ async function postInstall() {
|
|
|
116
130
|
log.info("XyPriss MUST be installed and managed via XFPM (XyPriss Fast Package Manager).");
|
|
117
131
|
log.info("Usage of npm, yarn, or pnpm is strictly forbidden to ensure framework integrity.");
|
|
118
132
|
log.blank();
|
|
119
|
-
log.info("
|
|
133
|
+
log.info("Installation Guide: https://xypriss.nehonix.com/docs/xfpm#installation");
|
|
120
134
|
log.divider();
|
|
121
135
|
log.blank();
|
|
122
136
|
process.exit(1);
|