@ludeo/cli 1.4.10 → 1.4.11

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 CHANGED
@@ -158,50 +158,6 @@ ludeo auth logout
158
158
  - **Cross-Platform**: Works on Windows, macOS, and Linux
159
159
  - **Automatic Updates**: Keep your CLI up to date with npm
160
160
 
161
- ## Testing
162
-
163
- The CLI includes comprehensive unit tests that verify core functionality including authentication, build uploads, and request payload validation.
164
-
165
- ### Running Tests
166
-
167
- ```bash
168
- # Run all tests
169
- go test ./...
170
-
171
- # Run tests for a specific package
172
- go test ./pkg/commands -v
173
- go test ./internal/api -v
174
-
175
- # Run a specific test
176
- go test ./pkg/commands -v -run TestAuthSetToken
177
- go test ./pkg/commands -v -run TestBuildUploadMinor
178
- go test ./pkg/commands -v -run TestBuildUploadMajor
179
-
180
- # Run tests with coverage
181
- go test ./pkg/commands -cover
182
- go test ./... -coverprofile=coverage.out
183
-
184
- # View coverage report
185
- go tool cover -html=coverage.out
186
- ```
187
-
188
- ### Test Coverage
189
-
190
- The test suite includes:
191
-
192
- - **Authentication Tests**: Verify `set-token` command saves tokens correctly
193
- - **Build Upload Tests**: Verify minor and major build uploads send correct payloads
194
- - **Request Validation**: Verify HTTP requests include correct headers and JSON structure
195
- - **Bug Prevention**: Tests verify that `majorBuildId` is correctly included/excluded based on build type
196
-
197
- ### Key Tests
198
-
199
- - `TestAuthSetToken` - Tests token saving functionality
200
- - `TestBuildUploadMinor` - Verifies minor builds include `majorBuildId` in request
201
- - `TestBuildUploadMajor` - Verifies major builds exclude `majorBuildId` from request
202
- - `TestBuildUploadRequestPayload` - Validates exact JSON payload structure
203
- - `TestBuildUploadRequestHeaders` - Verifies HTTP headers are correct
204
-
205
161
  ## Updating
206
162
 
207
163
  ```bash
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.10",
3
+ "version": "1.4.11",
4
4
  "description": "Ludeo CLI - Upload game builds and manage content on the Ludeo platform",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -26,7 +26,6 @@
26
26
  ],
27
27
  "author": "Ludeo Team",
28
28
  "license": "MIT",
29
- "readme": "README.npm.md",
30
29
  "repository": {
31
30
  "type": "git",
32
31
  "url": "git+https://github.com/ludeo/cli.git"
@@ -38,8 +37,7 @@
38
37
  "bin/",
39
38
  "dist/",
40
39
  "scripts/",
41
- "LICENSE",
42
- "README.npm.md"
40
+ "LICENSE"
43
41
  ],
44
42
  "os": [
45
43
  "win32",
@@ -3,9 +3,8 @@
3
3
  * Build README variants from docs/README.template.md.
4
4
  *
5
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)
6
+ * README.md — GitHub repo + npm package page
7
+ * windows-releases/template/README.md Windows ZIP release (exe install)
9
8
  *
10
9
  * Conditional markers in the template:
11
10
  * <!-- #if VARIANT --> Include block only for that variant
@@ -13,7 +12,7 @@
13
12
  * <!-- #else --> Opposite of preceding #if
14
13
  * <!-- #endif --> End conditional block
15
14
  *
16
- * Supported variant names: repo, npm, windows
15
+ * Supported variant names: windows (used in #if conditionals)
17
16
  * Template variable: {{VERSION}} (replaced from package.json)
18
17
  *
19
18
  * Run: node scripts/build-readme.js
@@ -26,9 +25,8 @@ const ROOT = path.resolve(__dirname, '..');
26
25
  const TEMPLATE = path.join(ROOT, 'docs', 'README.template.md');
27
26
 
28
27
  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 } },
28
+ main: { flags: { windows: false } },
29
+ windows: { flags: { windows: true } },
32
30
  };
33
31
 
34
32
  function processTemplate(template, flags, vars) {
@@ -93,10 +91,8 @@ function main() {
93
91
  const content = processTemplate(template, config.flags, vars);
94
92
 
95
93
  let outputPath;
96
- if (name === 'repo') {
94
+ if (name === 'main') {
97
95
  outputPath = path.join(ROOT, 'README.md');
98
- } else if (name === 'npm') {
99
- outputPath = path.join(ROOT, 'README.npm.md');
100
96
  } else if (name === 'windows') {
101
97
  const dir = path.join(ROOT, 'windows-releases', 'template');
102
98
  fs.mkdirSync(dir, { recursive: true });
@@ -106,7 +102,7 @@ function main() {
106
102
  fs.writeFileSync(outputPath, content, 'utf8');
107
103
  }
108
104
 
109
- console.log('Built README.md (repo), README.npm.md (npm), windows-releases/template/README.md (windows)');
105
+ console.log('Built README.md and windows-releases/template/README.md');
110
106
  }
111
107
 
112
108
  main();
package/README.npm.md DELETED
@@ -1,227 +0,0 @@
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 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
-
26
- ### 1. Authentication
27
- Save your access token:
28
- ```bash
29
- ludeo auth set-token --access-token YOUR_ACCESS_TOKEN
30
- ```
31
-
32
- You can also check if a token is saved:
33
- ```bash
34
- ludeo auth status
35
- ```
36
-
37
- ### 2. Upload Your Build
38
-
39
- #### Interactive Mode (Recommended for First-Time Users)
40
- Simply run the upload command without flags to start the interactive wizard:
41
- ```bash
42
- ludeo builds upload
43
- ```
44
-
45
- The interactive mode will guide you through:
46
- 1. **Game ID** - Enter your game's unique identifier
47
- 2. **Build Creation Type** - Choose between `new` or `sdkFree`
48
- 3. **Build Type** - Select `major` or `minor` (with warning for major builds)
49
- 4. **Major Version Selection** - If creating a minor build, select from existing major versions
50
- 5. **Game Version** - Enter the version number (e.g., 1.2.3)
51
- 6. **SDK Version** - Enter the Ludeo SDK version (not required for sdkFree)
52
- 7. **Executable Path** - Path to your game executable relative to build directory
53
- 8. **Local Directory** - Path to your build files
54
- 9. **Changes Description** - Optional description of what changed
55
-
56
- Before uploading, you'll see a summary of all options and the equivalent CLI command for future use in scripts or CI/CD pipelines.
57
-
58
- To disable interactive mode (for CI/CD or scripts):
59
- ```bash
60
- ludeo builds upload --no-interactive [flags...]
61
- ```
62
-
63
- #### Command-Line Mode
64
- 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**):
65
-
66
- #### New Build (Complete build from scratch) - DEFAULT
67
- ```bash
68
- # With explicit build-creation-type
69
- ludeo builds upload \
70
- --game-id YOUR_GAME_ID \
71
- --exec-path game.exe \
72
- --local-directory ./builds \
73
- --build-creation-type new \
74
- --build-type major \
75
- --game-version "1.2.3" \
76
- --sdk-version "2.0.0" \
77
- --changes-description "Bug fixes and performance improvements"
78
-
79
- # Or simply omit --build-creation-type (defaults to "new")
80
- ludeo builds upload \
81
- --game-id YOUR_GAME_ID \
82
- --exec-path game.exe \
83
- --local-directory ./builds \
84
- --build-type major \
85
- --game-version "1.2.3" \
86
- --sdk-version "2.0.0"
87
- ```
88
-
89
- #### SDK Free Build (Performance testing without Ludeo SDK)
90
- ```bash
91
- ludeo builds upload \
92
- --game-id YOUR_GAME_ID \
93
- --exec-path game.exe \
94
- --local-directory ./builds \
95
- --build-creation-type sdkFree \
96
- --build-type major \
97
- --game-version "1.2.3" \
98
- --changes-description "Performance testing build"
99
- ```
100
-
101
- ### 3. Build Types and Requirements
102
-
103
- **Build Creation Types (CLI):**
104
- - `new`: Complete build from scratch (requires game-version, sdk-version, build-type) **[DEFAULT]**
105
- - `sdkFree`: Performance testing without Ludeo SDK (requires game-version, build-type; sdk-version not required)
106
-
107
- **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.
108
-
109
- **Build Types:**
110
- - `major`: Major version build
111
- - `minor`: Minor version build (requires major-build-id)
112
-
113
- **Additional Flags:**
114
- - `--request-id`: Optional request ID for tracking
115
- - `--no-interactive`: Disable interactive prompts (for CI/CD or scripts)
116
- - `--dry-run`: Preview the upload without making any changes
117
-
118
- #### Dry-Run Mode
119
- Preview what would be uploaded without making any changes:
120
- ```bash
121
- ludeo builds upload --dry-run \
122
- --game-id YOUR_GAME_ID \
123
- --exec-path game.exe \
124
- --local-directory ./builds \
125
- --build-type major \
126
- --game-version "1.2.3" \
127
- --sdk-version "2.0.0"
128
- ```
129
-
130
- Dry-run will:
131
- - Validate all parameters and directory structure
132
- - Scan and display all files that would be uploaded
133
- - Show total file count and size
134
- - NOT create any build metadata or upload files
135
-
136
- ### 4. Manage Builds
137
- ```bash
138
- # List your builds
139
- ludeo builds list --game-id YOUR_GAME_ID
140
-
141
- # Get build details
142
- ludeo builds get --game-id YOUR_GAME_ID --build-id BUILD_ID
143
-
144
- # Check if token is saved
145
- ludeo auth status
146
-
147
- # Remove saved token when done
148
- ludeo auth logout
149
- ```
150
-
151
- ## Features
152
-
153
- - **Interactive Mode**: Guided wizard for easy build uploads - just run `ludeo builds upload` and follow the prompts
154
- - **Easy Upload**: Upload complete game builds with a single command
155
- - **Large File Support**: Automatically handles large files and multiple files
156
- - **Progress Tracking**: Real-time progress updates during uploads
157
- - **Dry-Run Mode**: Preview uploads without making changes using `--dry-run`
158
- - **Cross-Platform**: Works on Windows, macOS, and Linux
159
- - **Automatic Updates**: Keep your CLI up to date with npm
160
-
161
- ## Updating
162
-
163
- ```bash
164
- npm update -g @ludeo/cli
165
- ```
166
-
167
- ## CI/CD Integration
168
-
169
- ### GitHub Actions
170
- ```yaml
171
- - name: Install Ludeo CLI
172
- run: npm install -g @ludeo/cli
173
-
174
- - name: Upload Build
175
- run: |
176
- ludeo auth set-token --access-token ${{ secrets.LUDEO_ACCESS_TOKEN }}
177
- ludeo builds upload \
178
- --game-id ${{ env.GAME_ID }} \
179
- --exec-path game.exe \
180
- --local-directory ./builds \
181
- --build-creation-type new \
182
- --build-type major \
183
- --game-version ${{ env.GAME_VERSION }} \
184
- --sdk-version ${{ env.SDK_VERSION }}
185
- ```
186
-
187
- ## Troubleshooting
188
-
189
- ### Installation Issues
190
-
191
- **Binary not found error:**
192
- ```bash
193
- npm rebuild @ludeo/cli
194
- ```
195
-
196
- **Permission issues (macOS/Linux):**
197
- ```bash
198
- sudo npm install -g @ludeo/cli
199
- ```
200
-
201
- **Windows (npm):**
202
- - Run PowerShell as Administrator
203
- - Ensure Node.js is properly installed
204
-
205
- ### Common Issues
206
-
207
- **Authentication errors:**
208
- - Verify your access token is valid
209
- - Check if token is saved with `ludeo auth status`
210
- - Make sure you've saved your token with `ludeo auth set-token`
211
-
212
- **Upload failures:**
213
- - Ensure your build directory exists and is readable
214
- - Check your internet connection
215
- - Verify file paths are correct
216
-
217
- **Large files:**
218
- - Large files may take time to upload
219
- - Ensure stable internet connection
220
-
221
- ## Support
222
-
223
- Need help? Here's how to get support:
224
-
225
- 1. Check this README and troubleshooting section
226
- 2. Run `npm rebuild @ludeo/cli` if you encounter issues
227
- 3. Contact the Ludeo platform team for additional assistance