@ludeo/cli 1.1.5 → 1.1.6
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/ludeo +0 -0
- package/dist/ludeo-darwin-amd64 +0 -0
- package/dist/ludeo-darwin-arm64 +0 -0
- package/dist/ludeo-linux-amd64 +0 -0
- package/dist/ludeo-linux-arm64 +0 -0
- package/dist/ludeo-windows-amd64.exe +0 -0
- package/dist/ludeo-windows-arm64.exe +0 -0
- package/package.json +2 -1
- package/scripts/postinstall.js +61 -0
package/dist/ludeo
CHANGED
|
Binary file
|
package/dist/ludeo-darwin-amd64
CHANGED
|
Binary file
|
package/dist/ludeo-darwin-arm64
CHANGED
|
Binary file
|
package/dist/ludeo-linux-amd64
CHANGED
|
Binary file
|
package/dist/ludeo-linux-arm64
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ludeo/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Ludeo CLI - Upload game builds and manage content on the Ludeo platform",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"files": [
|
|
32
32
|
"bin/",
|
|
33
33
|
"dist/",
|
|
34
|
+
"scripts/",
|
|
34
35
|
"LICENSE"
|
|
35
36
|
],
|
|
36
37
|
"os": [
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
// Copy the appropriate binary to dist/ directory
|
|
6
|
+
function postinstall() {
|
|
7
|
+
const platform = os.platform();
|
|
8
|
+
const arch = os.arch();
|
|
9
|
+
|
|
10
|
+
// Map Node.js arch to Go arch
|
|
11
|
+
const archMap = {
|
|
12
|
+
'x64': 'amd64',
|
|
13
|
+
'arm64': 'arm64'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const goArch = archMap[arch] || arch;
|
|
17
|
+
|
|
18
|
+
// Map platform names
|
|
19
|
+
const platformMap = {
|
|
20
|
+
'win32': 'windows',
|
|
21
|
+
'darwin': 'darwin',
|
|
22
|
+
'linux': 'linux'
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const goPlatform = platformMap[platform] || platform;
|
|
26
|
+
|
|
27
|
+
// Construct binary names
|
|
28
|
+
const sourceBinaryName = platform === 'win32'
|
|
29
|
+
? `ludeo-${goPlatform}-${goArch}.exe`
|
|
30
|
+
: `ludeo-${goPlatform}-${goArch}`;
|
|
31
|
+
|
|
32
|
+
const targetBinaryName = platform === 'win32' ? 'ludeo.exe' : 'ludeo';
|
|
33
|
+
|
|
34
|
+
const sourcePath = path.join(__dirname, '..', 'build', sourceBinaryName);
|
|
35
|
+
const distDir = path.join(__dirname, '..', 'dist');
|
|
36
|
+
const targetPath = path.join(distDir, targetBinaryName);
|
|
37
|
+
|
|
38
|
+
// Create dist directory if it doesn't exist
|
|
39
|
+
if (!fs.existsSync(distDir)) {
|
|
40
|
+
fs.mkdirSync(distDir, { recursive: true });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Copy the binary
|
|
44
|
+
if (fs.existsSync(sourcePath)) {
|
|
45
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
46
|
+
|
|
47
|
+
// Make executable on Unix systems
|
|
48
|
+
if (platform !== 'win32') {
|
|
49
|
+
fs.chmodSync(targetPath, '755');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
console.log(`✅ Ludeo CLI binary installed: ${targetPath}`);
|
|
53
|
+
} else {
|
|
54
|
+
console.warn(`⚠️ Warning: Binary not found at ${sourcePath}`);
|
|
55
|
+
console.warn('This might happen during development. Run "npm run build" first.');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Run postinstall
|
|
60
|
+
postinstall();
|
|
61
|
+
|