amxx-builder 1.5.1 → 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 +14 -0
- package/package.json +1 -1
- package/src/archiver.js +1 -1
- package/src/release-fetcher.js +3 -1
package/README.md
CHANGED
|
@@ -4,6 +4,20 @@ CLI-инструмент для сборки AMX Mod X серверов. Чит
|
|
|
4
4
|
|
|
5
5
|
## Установка
|
|
6
6
|
|
|
7
|
+
**Через npm** (Node.js 18+):
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm i -g amxx-builder
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Команды `amxb` и `amxx-builder` станут доступны глобально. Управление версиями — стандартное для npm:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm i -g amxx-builder@1.5.1 # конкретная версия
|
|
17
|
+
npm update -g amxx-builder # обновить
|
|
18
|
+
npm rm -g amxx-builder # удалить
|
|
19
|
+
```
|
|
20
|
+
|
|
7
21
|
**Windows** (PowerShell):
|
|
8
22
|
|
|
9
23
|
```powershell
|
package/package.json
CHANGED
package/src/archiver.js
CHANGED
|
@@ -83,7 +83,7 @@ async function createArchive(manifest, buildDir) {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
// Keeps the archive filename inside out.dir: strips any directory components
|
|
86
|
-
// (both / and \ separators) and removes characters illegal on Windows.
|
|
86
|
+
// (both '/' and '\' separators) and removes characters illegal on Windows.
|
|
87
87
|
function sanitizeArchiveName(name) {
|
|
88
88
|
const base = String(name).replace(/\\/g, '/').split('/').pop() || '';
|
|
89
89
|
if (!base || base === '.' || base === '..') return 'archive.zip';
|
package/src/release-fetcher.js
CHANGED
|
@@ -165,7 +165,9 @@ async function downloadAsset(url, dest, headers) {
|
|
|
165
165
|
|
|
166
166
|
const response = await withRetry(
|
|
167
167
|
() => axios.get(url, {
|
|
168
|
-
|
|
168
|
+
// Default to octet-stream but let callers override (API tarball fallback
|
|
169
|
+
// needs application/vnd.github+json).
|
|
170
|
+
headers: { Accept: 'application/octet-stream', ...headers },
|
|
169
171
|
responseType: 'arraybuffer',
|
|
170
172
|
maxRedirects: 5,
|
|
171
173
|
timeout: 600000, // large assets — allow slow links, still bound hangs
|