@ludeo/cli 1.4.7 → 1.4.9
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 +93 -22
- package/README.npm.md +260 -0
- package/package.json +4 -2
- package/scripts/build-readme.js +97 -0
- package/scripts/postinstall.js +19 -43
package/README.md
CHANGED
|
@@ -15,21 +15,66 @@ 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 Lab](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
|
+
|
|
18
24
|
### 1. Authentication
|
|
19
|
-
|
|
25
|
+
Save your access token:
|
|
26
|
+
|
|
27
|
+
**macOS / Linux:**
|
|
20
28
|
```bash
|
|
21
29
|
ludeo auth set-token --access-token YOUR_ACCESS_TOKEN
|
|
22
30
|
```
|
|
23
31
|
|
|
32
|
+
**Windows (Command Prompt):** use the same command; for multi-line commands use `^` at the end of each line instead of `\`.
|
|
33
|
+
|
|
24
34
|
You can also check if a token is saved:
|
|
25
35
|
```bash
|
|
26
36
|
ludeo auth status
|
|
27
37
|
```
|
|
28
38
|
|
|
29
39
|
### 2. Upload Your Build
|
|
30
|
-
|
|
40
|
+
|
|
41
|
+
#### Interactive Mode (Recommended for First-Time Users)
|
|
42
|
+
Simply run the upload command without flags to start the interactive wizard:
|
|
43
|
+
|
|
44
|
+
**macOS / Linux:**
|
|
45
|
+
```bash
|
|
46
|
+
ludeo builds upload
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Windows (Command Prompt):**
|
|
50
|
+
```cmd
|
|
51
|
+
ludeo builds upload
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The interactive mode will guide you through:
|
|
55
|
+
1. **Game ID** - Enter your game's unique identifier
|
|
56
|
+
2. **Build Creation Type** - Choose between `new`, or `sdkFree`
|
|
57
|
+
3. **Build Type** - Select `major` or `minor` (with warning for major builds)
|
|
58
|
+
4. **Major Version Selection** - If creating a minor build, select from existing major versions
|
|
59
|
+
5. **Game Version** - Enter the version number (e.g., 1.2.3)
|
|
60
|
+
6. **SDK Version** - Enter the Ludeo SDK version (not required for sdkFree)
|
|
61
|
+
7. **Executable Path** - Path to your game executable relative to build directory
|
|
62
|
+
8. **Local Directory** - Path to your build files
|
|
63
|
+
9. **Changes Description** - Optional description of what changed
|
|
64
|
+
|
|
65
|
+
Before uploading, you'll see a summary of all options and the equivalent CLI command for future use in scripts or CI/CD pipelines.
|
|
66
|
+
|
|
67
|
+
To disable interactive mode (for CI/CD or scripts):
|
|
68
|
+
```bash
|
|
69
|
+
ludeo builds upload --no-interactive [flags...]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### Command-Line Mode
|
|
73
|
+
Upload your game build with a simple command. The CLI supports two build creation types (**modification builds are not supported from the CLI—use [Studio Labs](https://studio.ludeo.com) for those**):
|
|
31
74
|
|
|
32
75
|
#### New Build (Complete build from scratch) - DEFAULT
|
|
76
|
+
|
|
77
|
+
**macOS / Linux:**
|
|
33
78
|
```bash
|
|
34
79
|
# With explicit build-creation-type
|
|
35
80
|
ludeo builds upload \
|
|
@@ -52,19 +97,16 @@ ludeo builds upload \
|
|
|
52
97
|
--sdk-version "2.0.0"
|
|
53
98
|
```
|
|
54
99
|
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
ludeo builds upload
|
|
58
|
-
--game-id YOUR_GAME_ID
|
|
59
|
-
--exec-path game.exe
|
|
60
|
-
--local-directory
|
|
61
|
-
--build-creation-type
|
|
62
|
-
--build-type
|
|
63
|
-
--game-version "1.2.
|
|
64
|
-
--sdk-version "2.0.0"
|
|
65
|
-
--base-build-id EXISTING_BUILD_ID \
|
|
66
|
-
--major-build-id MAJOR_BUILD_ID \
|
|
67
|
-
--changes-description "Minor bug fixes"
|
|
100
|
+
**Windows (Command Prompt):** use `^` at the end of each line for continuation:
|
|
101
|
+
```cmd
|
|
102
|
+
ludeo builds upload ^
|
|
103
|
+
--game-id YOUR_GAME_ID ^
|
|
104
|
+
--exec-path "game.exe" ^
|
|
105
|
+
--local-directory "C:\path\to\your\builds" ^
|
|
106
|
+
--build-creation-type new ^
|
|
107
|
+
--build-type major ^
|
|
108
|
+
--game-version "1.2.3" ^
|
|
109
|
+
--sdk-version "2.0.0"
|
|
68
110
|
```
|
|
69
111
|
|
|
70
112
|
#### SDK Free Build (Performance testing without Ludeo SDK)
|
|
@@ -81,18 +123,38 @@ ludeo builds upload \
|
|
|
81
123
|
|
|
82
124
|
### 3. Build Types and Requirements
|
|
83
125
|
|
|
84
|
-
**Build Creation Types:**
|
|
126
|
+
**Build Creation Types (CLI):**
|
|
85
127
|
- `new`: Complete build from scratch (requires game-version, sdk-version, build-type) **[DEFAULT]**
|
|
86
|
-
- `modification`: Based on an existing build (requires base-build-id, game-version, sdk-version, build-type)
|
|
87
128
|
- `sdkFree`: Performance testing without Ludeo SDK (requires game-version, build-type; sdk-version not required)
|
|
88
129
|
|
|
130
|
+
**Note:** Modification builds (builds based on an existing build) are **not supported from the CLI**. Create modification builds from [Studio Labs](https://studio.ludeo.com) only.
|
|
131
|
+
|
|
89
132
|
**Build Types:**
|
|
90
133
|
- `major`: Major version build
|
|
91
134
|
- `minor`: Minor version build (requires major-build-id)
|
|
92
135
|
|
|
93
136
|
**Additional Flags:**
|
|
94
|
-
- `--runtime-environment`: Runtime environment (windows/proton) - only available for Ludeo admins
|
|
95
137
|
- `--request-id`: Optional request ID for tracking
|
|
138
|
+
- `--no-interactive`: Disable interactive prompts (for CI/CD or scripts)
|
|
139
|
+
- `--dry-run`: Preview the upload without making any changes
|
|
140
|
+
|
|
141
|
+
#### Dry-Run Mode
|
|
142
|
+
Preview what would be uploaded without making any changes:
|
|
143
|
+
```bash
|
|
144
|
+
ludeo builds upload --dry-run \
|
|
145
|
+
--game-id YOUR_GAME_ID \
|
|
146
|
+
--exec-path game.exe \
|
|
147
|
+
--local-directory ./builds \
|
|
148
|
+
--build-type major \
|
|
149
|
+
--game-version "1.2.3" \
|
|
150
|
+
--sdk-version "2.0.0"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Dry-run will:
|
|
154
|
+
- Validate all parameters and directory structure
|
|
155
|
+
- Scan and display all files that would be uploaded
|
|
156
|
+
- Show total file count and size
|
|
157
|
+
- NOT create any build metadata or upload files
|
|
96
158
|
|
|
97
159
|
### 4. Manage Builds
|
|
98
160
|
```bash
|
|
@@ -111,9 +173,11 @@ ludeo auth logout
|
|
|
111
173
|
|
|
112
174
|
## Features
|
|
113
175
|
|
|
176
|
+
- **Interactive Mode**: Guided wizard for easy build uploads - just run `ludeo builds upload` and follow the prompts
|
|
114
177
|
- **Easy Upload**: Upload complete game builds with a single command
|
|
115
178
|
- **Large File Support**: Automatically handles large files and multiple files
|
|
116
179
|
- **Progress Tracking**: Real-time progress updates during uploads
|
|
180
|
+
- **Dry-Run Mode**: Preview uploads without making changes using `--dry-run`
|
|
117
181
|
- **Cross-Platform**: Works on Windows, macOS, and Linux
|
|
118
182
|
- **Automatic Updates**: Keep your CLI up to date with npm
|
|
119
183
|
|
|
@@ -163,10 +227,13 @@ The test suite includes:
|
|
|
163
227
|
|
|
164
228
|
## Updating
|
|
165
229
|
|
|
230
|
+
**npm:**
|
|
166
231
|
```bash
|
|
167
232
|
npm update -g @ludeo/cli
|
|
168
233
|
```
|
|
169
234
|
|
|
235
|
+
**Windows (standalone exe):** download the latest release from the [GitHub releases](https://github.com/ludeo/cli/releases) page and replace your existing executable.
|
|
236
|
+
|
|
170
237
|
## CI/CD Integration
|
|
171
238
|
|
|
172
239
|
### GitHub Actions
|
|
@@ -201,10 +268,15 @@ npm rebuild @ludeo/cli
|
|
|
201
268
|
sudo npm install -g @ludeo/cli
|
|
202
269
|
```
|
|
203
270
|
|
|
204
|
-
**Windows
|
|
271
|
+
**Windows (npm):**
|
|
205
272
|
- Run PowerShell as Administrator
|
|
206
273
|
- Ensure Node.js is properly installed
|
|
207
274
|
|
|
275
|
+
**Windows (standalone exe):**
|
|
276
|
+
- **"ludeo is not recognized"** — Add the folder containing `ludeo.exe` to your PATH.
|
|
277
|
+
- **"Access denied" / "Permission denied"** — Right-click the executable → Properties → Unblock → OK, or run Command Prompt as Administrator.
|
|
278
|
+
- **Antivirus blocking** — Add an exception for the executable in your antivirus software.
|
|
279
|
+
|
|
208
280
|
### Common Issues
|
|
209
281
|
|
|
210
282
|
**Authentication errors:**
|
|
@@ -226,8 +298,7 @@ sudo npm install -g @ludeo/cli
|
|
|
226
298
|
Need help? Here's how to get support:
|
|
227
299
|
|
|
228
300
|
1. Check this README and troubleshooting section
|
|
229
|
-
2.
|
|
301
|
+
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.
|
|
230
302
|
3. Contact the Ludeo platform team for additional assistance
|
|
231
303
|
|
|
232
|
-
For detailed documentation and advanced usage, visit the [Ludeo Developer Portal](https://developers.ludeo.com).
|
|
233
|
-
|
|
304
|
+
For detailed documentation and advanced usage, visit the [Ludeo Developer Portal](https://developers.ludeo.com) or [Ludeo CLI Documentation](https://docs.ludeo.com/cli).
|
package/README.npm.md
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# Ludeo CLI
|
|
2
|
+
|
|
3
|
+
The official Ludeo CLI tool for uploading game builds to the Ludeo platform. Install via npm for easy setup and automatic updates.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @ludeo/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Verify the installation:
|
|
12
|
+
```bash
|
|
13
|
+
ludeo version
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Quick Start
|
|
17
|
+
|
|
18
|
+
### Getting Your Game ID and Access Token
|
|
19
|
+
Both your **Game ID** and **Access Token** are available in the [Studio Lab](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
|
+
### 1. Authentication
|
|
25
|
+
Save your access token:
|
|
26
|
+
|
|
27
|
+
**macOS / Linux:**
|
|
28
|
+
```bash
|
|
29
|
+
ludeo auth set-token --access-token YOUR_ACCESS_TOKEN
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Windows (Command Prompt):** use the same command; for multi-line commands use `^` at the end of each line instead of `\`.
|
|
33
|
+
|
|
34
|
+
You can also check if a token is saved:
|
|
35
|
+
```bash
|
|
36
|
+
ludeo auth status
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### 2. Upload Your Build
|
|
40
|
+
|
|
41
|
+
#### Interactive Mode (Recommended for First-Time Users)
|
|
42
|
+
Simply run the upload command without flags to start the interactive wizard:
|
|
43
|
+
|
|
44
|
+
**macOS / Linux:**
|
|
45
|
+
```bash
|
|
46
|
+
ludeo builds upload
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Windows (Command Prompt):**
|
|
50
|
+
```cmd
|
|
51
|
+
ludeo builds upload
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The interactive mode will guide you through:
|
|
55
|
+
1. **Game ID** - Enter your game's unique identifier
|
|
56
|
+
2. **Build Creation Type** - Choose between `new`, or `sdkFree`
|
|
57
|
+
3. **Build Type** - Select `major` or `minor` (with warning for major builds)
|
|
58
|
+
4. **Major Version Selection** - If creating a minor build, select from existing major versions
|
|
59
|
+
5. **Game Version** - Enter the version number (e.g., 1.2.3)
|
|
60
|
+
6. **SDK Version** - Enter the Ludeo SDK version (not required for sdkFree)
|
|
61
|
+
7. **Executable Path** - Path to your game executable relative to build directory
|
|
62
|
+
8. **Local Directory** - Path to your build files
|
|
63
|
+
9. **Changes Description** - Optional description of what changed
|
|
64
|
+
|
|
65
|
+
Before uploading, you'll see a summary of all options and the equivalent CLI command for future use in scripts or CI/CD pipelines.
|
|
66
|
+
|
|
67
|
+
To disable interactive mode (for CI/CD or scripts):
|
|
68
|
+
```bash
|
|
69
|
+
ludeo builds upload --no-interactive [flags...]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### Command-Line Mode
|
|
73
|
+
Upload your game build with a simple command. The CLI supports two build creation types (**modification builds are not supported from the CLI—use [Studio Labs](https://studio.ludeo.com) for those**):
|
|
74
|
+
|
|
75
|
+
#### New Build (Complete build from scratch) - DEFAULT
|
|
76
|
+
|
|
77
|
+
**macOS / Linux:**
|
|
78
|
+
```bash
|
|
79
|
+
# With explicit build-creation-type
|
|
80
|
+
ludeo builds upload \
|
|
81
|
+
--game-id YOUR_GAME_ID \
|
|
82
|
+
--exec-path game.exe \
|
|
83
|
+
--local-directory ./builds \
|
|
84
|
+
--build-creation-type new \
|
|
85
|
+
--build-type major \
|
|
86
|
+
--game-version "1.2.3" \
|
|
87
|
+
--sdk-version "2.0.0" \
|
|
88
|
+
--changes-description "Bug fixes and performance improvements"
|
|
89
|
+
|
|
90
|
+
# Or simply omit --build-creation-type (defaults to "new")
|
|
91
|
+
ludeo builds upload \
|
|
92
|
+
--game-id YOUR_GAME_ID \
|
|
93
|
+
--exec-path game.exe \
|
|
94
|
+
--local-directory ./builds \
|
|
95
|
+
--build-type major \
|
|
96
|
+
--game-version "1.2.3" \
|
|
97
|
+
--sdk-version "2.0.0"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Windows (Command Prompt):** use `^` at the end of each line for continuation:
|
|
101
|
+
```cmd
|
|
102
|
+
ludeo builds upload ^
|
|
103
|
+
--game-id YOUR_GAME_ID ^
|
|
104
|
+
--exec-path "game.exe" ^
|
|
105
|
+
--local-directory "C:\path\to\your\builds" ^
|
|
106
|
+
--build-creation-type new ^
|
|
107
|
+
--build-type major ^
|
|
108
|
+
--game-version "1.2.3" ^
|
|
109
|
+
--sdk-version "2.0.0"
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
#### SDK Free Build (Performance testing without Ludeo SDK)
|
|
113
|
+
```bash
|
|
114
|
+
ludeo builds upload \
|
|
115
|
+
--game-id YOUR_GAME_ID \
|
|
116
|
+
--exec-path game.exe \
|
|
117
|
+
--local-directory ./builds \
|
|
118
|
+
--build-creation-type sdkFree \
|
|
119
|
+
--build-type major \
|
|
120
|
+
--game-version "1.2.3" \
|
|
121
|
+
--changes-description "Performance testing build"
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### 3. Build Types and Requirements
|
|
125
|
+
|
|
126
|
+
**Build Creation Types (CLI):**
|
|
127
|
+
- `new`: Complete build from scratch (requires game-version, sdk-version, build-type) **[DEFAULT]**
|
|
128
|
+
- `sdkFree`: Performance testing without Ludeo SDK (requires game-version, build-type; sdk-version not required)
|
|
129
|
+
|
|
130
|
+
**Note:** Modification builds (builds based on an existing build) are **not supported from the CLI**. Create modification builds from [Studio Labs](https://studio.ludeo.com) only.
|
|
131
|
+
|
|
132
|
+
**Build Types:**
|
|
133
|
+
- `major`: Major version build
|
|
134
|
+
- `minor`: Minor version build (requires major-build-id)
|
|
135
|
+
|
|
136
|
+
**Additional Flags:**
|
|
137
|
+
- `--request-id`: Optional request ID for tracking
|
|
138
|
+
- `--no-interactive`: Disable interactive prompts (for CI/CD or scripts)
|
|
139
|
+
- `--dry-run`: Preview the upload without making any changes
|
|
140
|
+
|
|
141
|
+
#### Dry-Run Mode
|
|
142
|
+
Preview what would be uploaded without making any changes:
|
|
143
|
+
```bash
|
|
144
|
+
ludeo builds upload --dry-run \
|
|
145
|
+
--game-id YOUR_GAME_ID \
|
|
146
|
+
--exec-path game.exe \
|
|
147
|
+
--local-directory ./builds \
|
|
148
|
+
--build-type major \
|
|
149
|
+
--game-version "1.2.3" \
|
|
150
|
+
--sdk-version "2.0.0"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Dry-run will:
|
|
154
|
+
- Validate all parameters and directory structure
|
|
155
|
+
- Scan and display all files that would be uploaded
|
|
156
|
+
- Show total file count and size
|
|
157
|
+
- NOT create any build metadata or upload files
|
|
158
|
+
|
|
159
|
+
### 4. Manage Builds
|
|
160
|
+
```bash
|
|
161
|
+
# List your builds
|
|
162
|
+
ludeo builds list --game-id YOUR_GAME_ID
|
|
163
|
+
|
|
164
|
+
# Get build details
|
|
165
|
+
ludeo builds get --game-id YOUR_GAME_ID --build-id BUILD_ID
|
|
166
|
+
|
|
167
|
+
# Check if token is saved
|
|
168
|
+
ludeo auth status
|
|
169
|
+
|
|
170
|
+
# Remove saved token when done
|
|
171
|
+
ludeo auth logout
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Features
|
|
175
|
+
|
|
176
|
+
- **Interactive Mode**: Guided wizard for easy build uploads - just run `ludeo builds upload` and follow the prompts
|
|
177
|
+
- **Easy Upload**: Upload complete game builds with a single command
|
|
178
|
+
- **Large File Support**: Automatically handles large files and multiple files
|
|
179
|
+
- **Progress Tracking**: Real-time progress updates during uploads
|
|
180
|
+
- **Dry-Run Mode**: Preview uploads without making changes using `--dry-run`
|
|
181
|
+
- **Cross-Platform**: Works on Windows, macOS, and Linux
|
|
182
|
+
- **Automatic Updates**: Keep your CLI up to date with npm
|
|
183
|
+
|
|
184
|
+
## Updating
|
|
185
|
+
|
|
186
|
+
**npm:**
|
|
187
|
+
```bash
|
|
188
|
+
npm update -g @ludeo/cli
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Windows (standalone exe):** download the latest release from the [GitHub releases](https://github.com/ludeo/cli/releases) page and replace your existing executable.
|
|
192
|
+
|
|
193
|
+
## CI/CD Integration
|
|
194
|
+
|
|
195
|
+
### GitHub Actions
|
|
196
|
+
```yaml
|
|
197
|
+
- name: Install Ludeo CLI
|
|
198
|
+
run: npm install -g @ludeo/cli
|
|
199
|
+
|
|
200
|
+
- name: Upload Build
|
|
201
|
+
run: |
|
|
202
|
+
ludeo auth set-token --access-token ${{ secrets.LUDEO_ACCESS_TOKEN }}
|
|
203
|
+
ludeo builds upload \
|
|
204
|
+
--game-id ${{ env.GAME_ID }} \
|
|
205
|
+
--exec-path game.exe \
|
|
206
|
+
--local-directory ./builds \
|
|
207
|
+
--build-creation-type new \
|
|
208
|
+
--build-type major \
|
|
209
|
+
--game-version ${{ env.GAME_VERSION }} \
|
|
210
|
+
--sdk-version ${{ env.SDK_VERSION }}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Troubleshooting
|
|
214
|
+
|
|
215
|
+
### Installation Issues
|
|
216
|
+
|
|
217
|
+
**Binary not found error:**
|
|
218
|
+
```bash
|
|
219
|
+
npm rebuild @ludeo/cli
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**Permission issues (macOS/Linux):**
|
|
223
|
+
```bash
|
|
224
|
+
sudo npm install -g @ludeo/cli
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Windows (npm):**
|
|
228
|
+
- Run PowerShell as Administrator
|
|
229
|
+
- Ensure Node.js is properly installed
|
|
230
|
+
|
|
231
|
+
**Windows (standalone exe):**
|
|
232
|
+
- **"ludeo is not recognized"** — Add the folder containing `ludeo.exe` to your PATH.
|
|
233
|
+
- **"Access denied" / "Permission denied"** — Right-click the executable → Properties → Unblock → OK, or run Command Prompt as Administrator.
|
|
234
|
+
- **Antivirus blocking** — Add an exception for the executable in your antivirus software.
|
|
235
|
+
|
|
236
|
+
### Common Issues
|
|
237
|
+
|
|
238
|
+
**Authentication errors:**
|
|
239
|
+
- Verify your access token is valid
|
|
240
|
+
- Check if token is saved with `ludeo auth status`
|
|
241
|
+
- Make sure you've saved your token with `ludeo auth set-token`
|
|
242
|
+
|
|
243
|
+
**Upload failures:**
|
|
244
|
+
- Ensure your build directory exists and is readable
|
|
245
|
+
- Check your internet connection
|
|
246
|
+
- Verify file paths are correct
|
|
247
|
+
|
|
248
|
+
**Large files:**
|
|
249
|
+
- Large files may take time to upload
|
|
250
|
+
- Ensure stable internet connection
|
|
251
|
+
|
|
252
|
+
## Support
|
|
253
|
+
|
|
254
|
+
Need help? Here's how to get support:
|
|
255
|
+
|
|
256
|
+
1. Check this README and troubleshooting section
|
|
257
|
+
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.
|
|
258
|
+
3. Contact the Ludeo platform team for additional assistance
|
|
259
|
+
|
|
260
|
+
For detailed documentation and advanced usage, visit the [Ludeo Developer Portal](https://developers.ludeo.com) or [Ludeo CLI Documentation](https://docs.ludeo.com/cli).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ludeo/cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.9",
|
|
4
4
|
"description": "Ludeo CLI - Upload game builds and manage content on the Ludeo platform",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"author": "Ludeo Team",
|
|
28
28
|
"license": "MIT",
|
|
29
|
+
"readme": "README.npm.md",
|
|
29
30
|
"repository": {
|
|
30
31
|
"type": "git",
|
|
31
32
|
"url": "git+https://github.com/ludeo/cli.git"
|
|
@@ -37,7 +38,8 @@
|
|
|
37
38
|
"bin/",
|
|
38
39
|
"dist/",
|
|
39
40
|
"scripts/",
|
|
40
|
-
"LICENSE"
|
|
41
|
+
"LICENSE",
|
|
42
|
+
"README.npm.md"
|
|
41
43
|
],
|
|
42
44
|
"os": [
|
|
43
45
|
"win32",
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Build README variants from docs/readme/*.md fragments.
|
|
4
|
+
* - README.md = full (repo, includes Testing) — for GitHub
|
|
5
|
+
* - README.npm.md = usage only (no Testing) — for NPM package page
|
|
6
|
+
* - windows-releases/template/README.md = Windows release (docs/readme + docs/readme-windows overrides)
|
|
7
|
+
*
|
|
8
|
+
* Run: node scripts/build-readme.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
|
|
14
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
15
|
+
const README_DIR = path.join(ROOT, 'docs', 'readme');
|
|
16
|
+
const README_WINDOWS_DIR = path.join(ROOT, 'docs', 'readme-windows');
|
|
17
|
+
|
|
18
|
+
const FRAGMENTS_ORDER = [
|
|
19
|
+
'01-title-intro.md',
|
|
20
|
+
'02-installation.md',
|
|
21
|
+
'03-quick-start.md',
|
|
22
|
+
'04-features.md',
|
|
23
|
+
'05-testing.md',
|
|
24
|
+
'06-updating.md',
|
|
25
|
+
'07-cicd.md',
|
|
26
|
+
'08-troubleshooting.md',
|
|
27
|
+
'09-support.md',
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
/** Windows README: Windows-only title + installation, then shared 03–09 (skip 02 npm install, skip 05 testing), then Windows file-info/license */
|
|
31
|
+
const WINDOWS_HEAD = ['01-title-overview.md', '02-installation.md'];
|
|
32
|
+
const WINDOWS_TAIL = ['09-file-info-license.md'];
|
|
33
|
+
const WINDOWS_FROM_README = ['03-quick-start.md', '04-features.md', '06-updating.md', '07-cicd.md', '08-troubleshooting.md', '09-support.md'];
|
|
34
|
+
|
|
35
|
+
const NPM_EXCLUDE = new Set(['05-testing.md']);
|
|
36
|
+
|
|
37
|
+
function buildVariant(dir, order, excludeSet) {
|
|
38
|
+
const parts = [];
|
|
39
|
+
for (const name of order) {
|
|
40
|
+
if (excludeSet && excludeSet.has(name)) continue;
|
|
41
|
+
const file = path.join(dir, name);
|
|
42
|
+
if (!fs.existsSync(file)) {
|
|
43
|
+
console.warn(`Warning: fragment missing: ${name}`);
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
parts.push(fs.readFileSync(file, 'utf8').trim());
|
|
47
|
+
}
|
|
48
|
+
return parts.join('\n\n');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function buildWindowsReadme() {
|
|
52
|
+
const parts = [];
|
|
53
|
+
for (const name of WINDOWS_HEAD) {
|
|
54
|
+
const file = path.join(README_WINDOWS_DIR, name);
|
|
55
|
+
if (!fs.existsSync(file)) {
|
|
56
|
+
console.warn(`Warning: Windows fragment missing: ${name}`);
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
parts.push(fs.readFileSync(file, 'utf8').trim());
|
|
60
|
+
}
|
|
61
|
+
for (const name of WINDOWS_FROM_README) {
|
|
62
|
+
const file = path.join(README_DIR, name);
|
|
63
|
+
if (!fs.existsSync(file)) {
|
|
64
|
+
console.warn(`Warning: fragment missing: ${name}`);
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
parts.push(fs.readFileSync(file, 'utf8').trim());
|
|
68
|
+
}
|
|
69
|
+
for (const name of WINDOWS_TAIL) {
|
|
70
|
+
const file = path.join(README_WINDOWS_DIR, name);
|
|
71
|
+
if (!fs.existsSync(file)) {
|
|
72
|
+
console.warn(`Warning: Windows fragment missing: ${name}`);
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
parts.push(fs.readFileSync(file, 'utf8').trim());
|
|
76
|
+
}
|
|
77
|
+
return parts.join('\n\n');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function main() {
|
|
81
|
+
const repoReadme = buildVariant(README_DIR, FRAGMENTS_ORDER, null);
|
|
82
|
+
const npmReadme = buildVariant(README_DIR, FRAGMENTS_ORDER, NPM_EXCLUDE);
|
|
83
|
+
const windowsReadme = buildWindowsReadme();
|
|
84
|
+
|
|
85
|
+
fs.writeFileSync(path.join(ROOT, 'README.md'), repoReadme + '\n', 'utf8');
|
|
86
|
+
fs.writeFileSync(path.join(ROOT, 'README.npm.md'), npmReadme + '\n', 'utf8');
|
|
87
|
+
|
|
88
|
+
const windowsTemplateDir = path.join(ROOT, 'windows-releases', 'template');
|
|
89
|
+
if (!fs.existsSync(windowsTemplateDir)) {
|
|
90
|
+
fs.mkdirSync(windowsTemplateDir, { recursive: true });
|
|
91
|
+
}
|
|
92
|
+
fs.writeFileSync(path.join(windowsTemplateDir, 'README.md'), windowsReadme + '\n', 'utf8');
|
|
93
|
+
|
|
94
|
+
console.log('Built README.md (repo), README.npm.md (npm), windows-releases/template/README.md (Windows)');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
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
|
|