@ludeo/cli 1.4.8 → 1.4.10
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 +19 -7
- package/README.npm.md +11 -6
- 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 -2
- package/scripts/build-readme.js +91 -33
- package/scripts/postinstall.js +19 -43
- package/scripts/release.js +0 -17
package/README.md
CHANGED
|
@@ -15,8 +15,16 @@ ludeo version
|
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
18
|
+
### Getting Your Game ID and Access Token
|
|
19
|
+
Both your **Game ID** and **Access Token** are available in the [Studio Labs](https://studio.ludeo.com) under **Environments**.
|
|
20
|
+
|
|
21
|
+
- **Access Token:** In Environments, click **Create Token**, name it, then copy and save the token (you won't be able to see it again).
|
|
22
|
+
- **Game ID:** In Environments, it's shown at the top of the page next to the API key.
|
|
23
|
+
|
|
24
|
+
> **Windows note:** All commands below work in Command Prompt, PowerShell, and terminal emulators. For multi-line commands, replace `\` with `^` in Command Prompt.
|
|
25
|
+
|
|
18
26
|
### 1. Authentication
|
|
19
|
-
|
|
27
|
+
Save your access token:
|
|
20
28
|
```bash
|
|
21
29
|
ludeo auth set-token --access-token YOUR_ACCESS_TOKEN
|
|
22
30
|
```
|
|
@@ -36,7 +44,7 @@ ludeo builds upload
|
|
|
36
44
|
|
|
37
45
|
The interactive mode will guide you through:
|
|
38
46
|
1. **Game ID** - Enter your game's unique identifier
|
|
39
|
-
2. **Build Creation Type** - Choose between `new
|
|
47
|
+
2. **Build Creation Type** - Choose between `new` or `sdkFree`
|
|
40
48
|
3. **Build Type** - Select `major` or `minor` (with warning for major builds)
|
|
41
49
|
4. **Major Version Selection** - If creating a minor build, select from existing major versions
|
|
42
50
|
5. **Game Version** - Enter the version number (e.g., 1.2.3)
|
|
@@ -103,7 +111,6 @@ ludeo builds upload \
|
|
|
103
111
|
- `minor`: Minor version build (requires major-build-id)
|
|
104
112
|
|
|
105
113
|
**Additional Flags:**
|
|
106
|
-
- `--runtime-environment`: Runtime environment (windows/proton) - only available for Ludeo admins
|
|
107
114
|
- `--request-id`: Optional request ID for tracking
|
|
108
115
|
- `--no-interactive`: Disable interactive prompts (for CI/CD or scripts)
|
|
109
116
|
- `--dry-run`: Preview the upload without making any changes
|
|
@@ -201,6 +208,8 @@ The test suite includes:
|
|
|
201
208
|
npm update -g @ludeo/cli
|
|
202
209
|
```
|
|
203
210
|
|
|
211
|
+
**Windows (standalone exe):** download the latest release from the [GitHub releases](https://github.com/ludeo/cli/releases) page and replace your existing executable.
|
|
212
|
+
|
|
204
213
|
## CI/CD Integration
|
|
205
214
|
|
|
206
215
|
### GitHub Actions
|
|
@@ -235,10 +244,15 @@ npm rebuild @ludeo/cli
|
|
|
235
244
|
sudo npm install -g @ludeo/cli
|
|
236
245
|
```
|
|
237
246
|
|
|
238
|
-
**Windows
|
|
247
|
+
**Windows (npm):**
|
|
239
248
|
- Run PowerShell as Administrator
|
|
240
249
|
- Ensure Node.js is properly installed
|
|
241
250
|
|
|
251
|
+
**Windows (standalone exe):**
|
|
252
|
+
- **"ludeo is not recognized"** — Add the folder containing `ludeo.exe` to your PATH.
|
|
253
|
+
- **"Access denied" / "Permission denied"** — Right-click the executable → Properties → Unblock → OK, or run Command Prompt as Administrator.
|
|
254
|
+
- **Antivirus blocking** — Add an exception for the executable in your antivirus software.
|
|
255
|
+
|
|
242
256
|
### Common Issues
|
|
243
257
|
|
|
244
258
|
**Authentication errors:**
|
|
@@ -260,7 +274,5 @@ sudo npm install -g @ludeo/cli
|
|
|
260
274
|
Need help? Here's how to get support:
|
|
261
275
|
|
|
262
276
|
1. Check this README and troubleshooting section
|
|
263
|
-
2.
|
|
277
|
+
2. **npm:** run `npm rebuild @ludeo/cli` if you encounter issues. **Windows (standalone):** ensure `ludeo.exe` is in your PATH and see the troubleshooting section above.
|
|
264
278
|
3. Contact the Ludeo platform team for additional assistance
|
|
265
|
-
|
|
266
|
-
For detailed documentation and advanced usage, visit the [Ludeo Developer Portal](https://developers.ludeo.com).
|
package/README.npm.md
CHANGED
|
@@ -15,8 +15,16 @@ ludeo version
|
|
|
15
15
|
|
|
16
16
|
## Quick Start
|
|
17
17
|
|
|
18
|
+
### Getting Your Game ID and Access Token
|
|
19
|
+
Both your **Game ID** and **Access Token** are available in the [Studio Labs](https://studio.ludeo.com) under **Environments**.
|
|
20
|
+
|
|
21
|
+
- **Access Token:** In Environments, click **Create Token**, name it, then copy and save the token (you won't be able to see it again).
|
|
22
|
+
- **Game ID:** In Environments, it's shown at the top of the page next to the API key.
|
|
23
|
+
|
|
24
|
+
> **Windows note:** All commands below work in Command Prompt, PowerShell, and terminal emulators. For multi-line commands, replace `\` with `^` in Command Prompt.
|
|
25
|
+
|
|
18
26
|
### 1. Authentication
|
|
19
|
-
|
|
27
|
+
Save your access token:
|
|
20
28
|
```bash
|
|
21
29
|
ludeo auth set-token --access-token YOUR_ACCESS_TOKEN
|
|
22
30
|
```
|
|
@@ -36,7 +44,7 @@ ludeo builds upload
|
|
|
36
44
|
|
|
37
45
|
The interactive mode will guide you through:
|
|
38
46
|
1. **Game ID** - Enter your game's unique identifier
|
|
39
|
-
2. **Build Creation Type** - Choose between `new
|
|
47
|
+
2. **Build Creation Type** - Choose between `new` or `sdkFree`
|
|
40
48
|
3. **Build Type** - Select `major` or `minor` (with warning for major builds)
|
|
41
49
|
4. **Major Version Selection** - If creating a minor build, select from existing major versions
|
|
42
50
|
5. **Game Version** - Enter the version number (e.g., 1.2.3)
|
|
@@ -103,7 +111,6 @@ ludeo builds upload \
|
|
|
103
111
|
- `minor`: Minor version build (requires major-build-id)
|
|
104
112
|
|
|
105
113
|
**Additional Flags:**
|
|
106
|
-
- `--runtime-environment`: Runtime environment (windows/proton) - only available for Ludeo admins
|
|
107
114
|
- `--request-id`: Optional request ID for tracking
|
|
108
115
|
- `--no-interactive`: Disable interactive prompts (for CI/CD or scripts)
|
|
109
116
|
- `--dry-run`: Preview the upload without making any changes
|
|
@@ -191,7 +198,7 @@ npm rebuild @ludeo/cli
|
|
|
191
198
|
sudo npm install -g @ludeo/cli
|
|
192
199
|
```
|
|
193
200
|
|
|
194
|
-
**Windows
|
|
201
|
+
**Windows (npm):**
|
|
195
202
|
- Run PowerShell as Administrator
|
|
196
203
|
- Ensure Node.js is properly installed
|
|
197
204
|
|
|
@@ -218,5 +225,3 @@ Need help? Here's how to get support:
|
|
|
218
225
|
1. Check this README and troubleshooting section
|
|
219
226
|
2. Run `npm rebuild @ludeo/cli` if you encounter issues
|
|
220
227
|
3. Contact the Ludeo platform team for additional assistance
|
|
221
|
-
|
|
222
|
-
For detailed documentation and advanced usage, visit the [Ludeo Developer Portal](https://developers.ludeo.com).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ludeo/cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.10",
|
|
4
4
|
"description": "Ludeo CLI - Upload game builds and manage content on the Ludeo platform",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "make build-all",
|
|
11
11
|
"postinstall": "node scripts/postinstall.js",
|
|
12
|
-
"prepublishOnly": "npm
|
|
12
|
+
"prepublishOnly": "make npm-build",
|
|
13
13
|
"release": "node scripts/release.js",
|
|
14
14
|
"release:patch": "node scripts/release.js patch",
|
|
15
15
|
"release:minor": "node scripts/release.js minor",
|
package/scripts/build-readme.js
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Build README variants from docs/
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Build README variants from docs/README.template.md.
|
|
4
|
+
*
|
|
5
|
+
* Outputs:
|
|
6
|
+
* README.md — GitHub repo (includes Testing)
|
|
7
|
+
* README.npm.md — npm package page (no Testing, no standalone exe refs)
|
|
8
|
+
* windows-releases/template/README.md — Windows ZIP release (exe install, file info)
|
|
9
|
+
*
|
|
10
|
+
* Conditional markers in the template:
|
|
11
|
+
* <!-- #if VARIANT --> Include block only for that variant
|
|
12
|
+
* <!-- #if !VARIANT --> Include block for all variants EXCEPT that one
|
|
13
|
+
* <!-- #else --> Opposite of preceding #if
|
|
14
|
+
* <!-- #endif --> End conditional block
|
|
15
|
+
*
|
|
16
|
+
* Supported variant names: repo, npm, windows
|
|
17
|
+
* Template variable: {{VERSION}} (replaced from package.json)
|
|
6
18
|
*
|
|
7
19
|
* Run: node scripts/build-readme.js
|
|
8
20
|
*/
|
|
@@ -11,44 +23,90 @@ const fs = require('fs');
|
|
|
11
23
|
const path = require('path');
|
|
12
24
|
|
|
13
25
|
const ROOT = path.resolve(__dirname, '..');
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
const TEMPLATE = path.join(ROOT, 'docs', 'README.template.md');
|
|
27
|
+
|
|
28
|
+
const VARIANTS = {
|
|
29
|
+
repo: { flags: { repo: true, npm: false, windows: false } },
|
|
30
|
+
npm: { flags: { repo: false, npm: true, windows: false } },
|
|
31
|
+
windows: { flags: { repo: false, npm: false, windows: true } },
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
function processTemplate(template, flags, vars) {
|
|
35
|
+
const lines = template.split('\n');
|
|
36
|
+
const output = [];
|
|
37
|
+
const stack = []; // { include: boolean, hadElse: boolean }
|
|
38
|
+
|
|
39
|
+
for (const line of lines) {
|
|
40
|
+
const trimmed = line.trim();
|
|
41
|
+
|
|
42
|
+
const ifMatch = trimmed.match(/^<!--\s*#if\s+(!?)(\w+)\s*-->$/);
|
|
43
|
+
if (ifMatch) {
|
|
44
|
+
const negated = ifMatch[1] === '!';
|
|
45
|
+
const flag = ifMatch[2];
|
|
46
|
+
const value = !!flags[flag];
|
|
47
|
+
const include = negated ? !value : value;
|
|
48
|
+
const parentInclude = stack.length === 0 || stack[stack.length - 1].include;
|
|
49
|
+
stack.push({ include: parentInclude && include, hadElse: false });
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (trimmed === '<!-- #else -->') {
|
|
54
|
+
if (stack.length > 0) {
|
|
55
|
+
const top = stack[stack.length - 1];
|
|
56
|
+
const parentInclude = stack.length <= 1 || stack[stack.length - 2].include;
|
|
57
|
+
top.include = parentInclude && !top.include;
|
|
58
|
+
top.hadElse = true;
|
|
59
|
+
}
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (trimmed === '<!-- #endif -->') {
|
|
64
|
+
stack.pop();
|
|
37
65
|
continue;
|
|
38
66
|
}
|
|
39
|
-
|
|
67
|
+
|
|
68
|
+
const shouldInclude = stack.length === 0 || stack[stack.length - 1].include;
|
|
69
|
+
if (shouldInclude) {
|
|
70
|
+
output.push(line);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
let result = output.join('\n');
|
|
75
|
+
|
|
76
|
+
for (const [key, value] of Object.entries(vars)) {
|
|
77
|
+
result = result.replace(new RegExp(`\\{\\{${key}\\}\\}`, 'g'), value);
|
|
40
78
|
}
|
|
41
|
-
|
|
79
|
+
|
|
80
|
+
// Collapse 3+ consecutive blank lines into 2
|
|
81
|
+
result = result.replace(/\n{3,}/g, '\n\n');
|
|
82
|
+
|
|
83
|
+
return result.trim() + '\n';
|
|
42
84
|
}
|
|
43
85
|
|
|
44
86
|
function main() {
|
|
45
|
-
const
|
|
46
|
-
const
|
|
87
|
+
const template = fs.readFileSync(TEMPLATE, 'utf8');
|
|
88
|
+
const version = require(path.join(ROOT, 'package.json')).version;
|
|
89
|
+
const vars = { VERSION: `v${version}` };
|
|
90
|
+
|
|
91
|
+
// Build each variant
|
|
92
|
+
for (const [name, config] of Object.entries(VARIANTS)) {
|
|
93
|
+
const content = processTemplate(template, config.flags, vars);
|
|
47
94
|
|
|
48
|
-
|
|
49
|
-
|
|
95
|
+
let outputPath;
|
|
96
|
+
if (name === 'repo') {
|
|
97
|
+
outputPath = path.join(ROOT, 'README.md');
|
|
98
|
+
} else if (name === 'npm') {
|
|
99
|
+
outputPath = path.join(ROOT, 'README.npm.md');
|
|
100
|
+
} else if (name === 'windows') {
|
|
101
|
+
const dir = path.join(ROOT, 'windows-releases', 'template');
|
|
102
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
103
|
+
outputPath = path.join(dir, 'README.md');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
fs.writeFileSync(outputPath, content, 'utf8');
|
|
107
|
+
}
|
|
50
108
|
|
|
51
|
-
console.log('Built README.md (repo,
|
|
109
|
+
console.log('Built README.md (repo), README.npm.md (npm), windows-releases/template/README.md (windows)');
|
|
52
110
|
}
|
|
53
111
|
|
|
54
112
|
main();
|
package/scripts/postinstall.js
CHANGED
|
@@ -2,60 +2,36 @@ const fs = require('fs');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const os = require('os');
|
|
4
4
|
|
|
5
|
-
// Copy the appropriate binary to dist/ directory
|
|
6
5
|
function postinstall() {
|
|
7
6
|
const platform = os.platform();
|
|
8
7
|
const arch = os.arch();
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
'arm64': 'arm64'
|
|
14
|
-
};
|
|
15
|
-
|
|
8
|
+
|
|
9
|
+
const archMap = { 'x64': 'amd64', 'arm64': 'arm64' };
|
|
10
|
+
const platformMap = { 'win32': 'windows', 'darwin': 'darwin', 'linux': 'linux' };
|
|
11
|
+
|
|
16
12
|
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
13
|
const goPlatform = platformMap[platform] || platform;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const sourceBinaryName = platform === 'win32'
|
|
14
|
+
|
|
15
|
+
const binaryName = platform === 'win32'
|
|
29
16
|
? `ludeo-${goPlatform}-${goArch}.exe`
|
|
30
17
|
: `ludeo-${goPlatform}-${goArch}`;
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
18
|
+
|
|
19
|
+
const distPath = path.join(__dirname, '..', 'dist', binaryName);
|
|
20
|
+
|
|
21
|
+
if (fs.existsSync(distPath)) {
|
|
48
22
|
if (platform !== 'win32') {
|
|
49
|
-
fs.chmodSync(
|
|
23
|
+
fs.chmodSync(distPath, '755');
|
|
50
24
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Only warn in development (when installing from source with build/ directory)
|
|
29
|
+
const buildPath = path.join(__dirname, '..', 'build', binaryName);
|
|
30
|
+
if (!fs.existsSync(buildPath)) {
|
|
31
|
+
console.warn(`⚠️ Ludeo CLI: binary not found for ${platform}-${arch}.`);
|
|
32
|
+
console.warn('Try running: npm rebuild @ludeo/cli');
|
|
56
33
|
}
|
|
57
34
|
}
|
|
58
35
|
|
|
59
|
-
// Run postinstall
|
|
60
36
|
postinstall();
|
|
61
37
|
|
package/scripts/release.js
CHANGED
|
@@ -84,8 +84,6 @@ function createWindowsRelease(version) {
|
|
|
84
84
|
function updateWindowsDocumentation(version, releaseDir) {
|
|
85
85
|
const files = [
|
|
86
86
|
'README.md',
|
|
87
|
-
'INSTALL.txt',
|
|
88
|
-
'install.bat',
|
|
89
87
|
'PACKAGE_CONTENTS.txt'
|
|
90
88
|
];
|
|
91
89
|
|
|
@@ -127,21 +125,6 @@ function getBasicFileContent(filename, version) {
|
|
|
127
125
|
## Support
|
|
128
126
|
- Email: support@ludeo.com
|
|
129
127
|
- Documentation: https://docs.ludeo.com/cli
|
|
130
|
-
`;
|
|
131
|
-
case 'INSTALL.txt':
|
|
132
|
-
return `LUDEO CLI v${version} - WINDOWS INSTALLATION
|
|
133
|
-
|
|
134
|
-
1. Choose the right executable:
|
|
135
|
-
- ludeo-windows-amd64.exe (Intel/AMD)
|
|
136
|
-
- ludeo-windows-arm64.exe (ARM)
|
|
137
|
-
|
|
138
|
-
2. Rename to "ludeo.exe"
|
|
139
|
-
|
|
140
|
-
3. Add to PATH:
|
|
141
|
-
- Copy to C:\\ludeo-cli\\
|
|
142
|
-
- Add C:\\ludeo-cli\\ to PATH
|
|
143
|
-
|
|
144
|
-
4. Test: ludeo --version
|
|
145
128
|
`;
|
|
146
129
|
default:
|
|
147
130
|
return `# Ludeo CLI v${version} - ${filename}`;
|