cluaupp 1.5.2-cf → 1.5.2
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/bin/cluaupp.js +0 -36
- package/examples/game/src/Client/Controllers/DataController.client.clpp +2 -2
- package/examples/game/src/Client/Main.client.clpp +1 -1
- package/examples/game/src/Modules/Core/Guard.server.clpp +2 -2
- package/examples/game/src/Modules/Core/PlayerHandler.server.clpp +2 -2
- package/examples/game/src/Server/Boot/DataBoot.server.clpp +3 -3
- package/examples/game/src/Server/Main.server.clpp +1 -1
- package/package.json +2 -6
- package/templates/game/src/Client/Controllers/DataController.client.clpp +2 -2
- package/templates/game/src/Client/Main.client.clpp +1 -1
- package/templates/game/src/Modules/Core/Guard.server.clpp +2 -2
- package/templates/game/src/Modules/Core/PlayerHandler.server.clpp +2 -2
- package/templates/game/src/Server/Boot/DataBoot.server.clpp +3 -3
- package/templates/game/src/Server/Main.server.clpp +1 -1
- package/editors/vscode/syntaxes/clpp.tmLanguage.json +0 -90
- package/native/bin/.gitkeep +0 -1
- package/rust/cluaupp/Cargo.lock +0 -795
- package/rust/cluaupp/Cargo.toml +0 -17
- package/rust/cluaupp/src/main.rs +0 -717
- package/scripts/postinstall-native.js +0 -52
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const fs = require("node:fs");
|
|
4
|
-
const path = require("node:path");
|
|
5
|
-
const https = require("node:https");
|
|
6
|
-
|
|
7
|
-
const pkg = require("../package.json");
|
|
8
|
-
const root = path.resolve(__dirname, "..");
|
|
9
|
-
const exe = process.platform === "win32" ? "cluaupp.exe" : "cluaupp";
|
|
10
|
-
const outDir = path.join(root, "native", "bin");
|
|
11
|
-
const outFile = path.join(outDir, exe);
|
|
12
|
-
|
|
13
|
-
if (fs.existsSync(outFile)) {
|
|
14
|
-
process.exit(0);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (process.env.CLUAUPP_SKIP_NATIVE_DOWNLOAD === "1") {
|
|
18
|
-
console.log("cluaupp: native download skipped by CLUAUPP_SKIP_NATIVE_DOWNLOAD=1");
|
|
19
|
-
process.exit(0);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const version = String(pkg.version || "0.0.0");
|
|
23
|
-
const fileName = `cluaupp-${version}-${process.platform}-${process.arch}${process.platform === "win32" ? ".exe" : ""}`;
|
|
24
|
-
const url = `https://github.com/KartzRbx/Cluaupp/releases/download/v${version}/${fileName}`;
|
|
25
|
-
|
|
26
|
-
fs.mkdirSync(outDir, { recursive: true });
|
|
27
|
-
|
|
28
|
-
https
|
|
29
|
-
.get(url, (res) => {
|
|
30
|
-
if (res.statusCode !== 200) {
|
|
31
|
-
console.warn(`cluaupp: native binary not found for ${process.platform}-${process.arch} (${res.statusCode}), fallback to Node runtime`);
|
|
32
|
-
res.resume();
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const file = fs.createWriteStream(outFile, { mode: 0o755 });
|
|
36
|
-
res.pipe(file);
|
|
37
|
-
file.on("finish", () => {
|
|
38
|
-
file.close(() => {
|
|
39
|
-
if (process.platform !== "win32") {
|
|
40
|
-
try {
|
|
41
|
-
fs.chmodSync(outFile, 0o755);
|
|
42
|
-
} catch {
|
|
43
|
-
// ignore chmod errors
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
console.log(`cluaupp: native installed at ${path.relative(root, outFile)}`);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
})
|
|
50
|
-
.on("error", (err) => {
|
|
51
|
-
console.warn(`cluaupp: native download failed (${err.message}), fallback to Node runtime`);
|
|
52
|
-
});
|