@lvnt/release-radar 1.4.0 → 1.6.0
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/config/downloads.json +56 -6
- package/dist/index.js +25 -1
- package/dist/types.d.ts +19 -2
- package/dist/versions-generator.js +35 -11
- package/dist/versions-generator.test.js +38 -0
- package/package.json +1 -1
package/config/downloads.json
CHANGED
|
@@ -1,17 +1,67 @@
|
|
|
1
1
|
{
|
|
2
|
+
"Claude Code CLI": {
|
|
3
|
+
"displayName": "Claude Code CLI",
|
|
4
|
+
"downloadUrl": "storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/{{VERSION}}/win32-x64/claude.exe",
|
|
5
|
+
"filename": "claude-{{VERSION}}.exe"
|
|
6
|
+
},
|
|
2
7
|
"Ninja": {
|
|
3
8
|
"displayName": "Ninja",
|
|
4
|
-
"downloadUrl": "github.com/ninja-build/ninja/releases/download/v{{VERSION}}/ninja-
|
|
5
|
-
"filename": "ninja-{{VERSION}}-
|
|
9
|
+
"downloadUrl": "github.com/ninja-build/ninja/releases/download/v{{VERSION}}/ninja-win.zip",
|
|
10
|
+
"filename": "ninja-{{VERSION}}-win.zip"
|
|
6
11
|
},
|
|
7
12
|
"CMake": {
|
|
8
13
|
"displayName": "CMake",
|
|
9
|
-
"downloadUrl": "github.com/Kitware/CMake/releases/download/v{{VERSION}}/cmake-{{VERSION}}-
|
|
10
|
-
"filename": "cmake-{{VERSION}}-
|
|
14
|
+
"downloadUrl": "github.com/Kitware/CMake/releases/download/v{{VERSION}}/cmake-{{VERSION}}-windows-x86_64.zip",
|
|
15
|
+
"filename": "cmake-{{VERSION}}-windows-x86_64.zip"
|
|
11
16
|
},
|
|
12
17
|
"Git": {
|
|
13
18
|
"displayName": "Git for Windows",
|
|
14
|
-
"downloadUrl": "github.com/git-for-windows/git/releases/download/v{{VERSION}}
|
|
15
|
-
"filename": "Git-{{
|
|
19
|
+
"downloadUrl": "github.com/git-for-windows/git/releases/download/v{{VERSION}}/Git-{{VERSION_BASE}}-64-bit.exe",
|
|
20
|
+
"filename": "Git-{{VERSION_BASE}}-64-bit.exe"
|
|
21
|
+
},
|
|
22
|
+
"Clangd": {
|
|
23
|
+
"displayName": "Clangd",
|
|
24
|
+
"downloadUrl": "github.com/clangd/clangd/releases/download/{{VERSION}}/clangd-windows-{{VERSION}}.zip",
|
|
25
|
+
"filename": "clangd-windows-{{VERSION}}.zip"
|
|
26
|
+
},
|
|
27
|
+
"Wezterm": {
|
|
28
|
+
"displayName": "Wezterm",
|
|
29
|
+
"downloadUrl": "github.com/wezterm/wezterm/releases/download/{{VERSION}}/WezTerm-{{VERSION}}-setup.exe",
|
|
30
|
+
"filename": "WezTerm-{{VERSION}}-setup.exe"
|
|
31
|
+
},
|
|
32
|
+
"vscode-cpptools": {
|
|
33
|
+
"displayName": "C/C++ Extension",
|
|
34
|
+
"downloadUrl": "github.com/microsoft/vscode-cpptools/releases/download/v{{VERSION}}/cpptools-windows-x64.vsix",
|
|
35
|
+
"filename": "cpptools-windows-x64-{{VERSION}}.vsix"
|
|
36
|
+
},
|
|
37
|
+
"vscode-clangd": {
|
|
38
|
+
"displayName": "clangd Extension",
|
|
39
|
+
"downloadUrl": "github.com/clangd/vscode-clangd/releases/download/{{VERSION}}/vscode-clangd-{{VERSION}}.vsix",
|
|
40
|
+
"filename": "vscode-clangd-{{VERSION}}.vsix"
|
|
41
|
+
},
|
|
42
|
+
"CMake Tools": {
|
|
43
|
+
"displayName": "CMake Tools Extension",
|
|
44
|
+
"downloadUrl": "github.com/microsoft/vscode-cmake-tools/releases/download/v{{VERSION}}/cmake-tools.vsix",
|
|
45
|
+
"filename": "cmake-tools-{{VERSION}}.vsix"
|
|
46
|
+
},
|
|
47
|
+
"Roo Code": {
|
|
48
|
+
"displayName": "Roo Code Extension",
|
|
49
|
+
"downloadUrl": "github.com/RooCodeInc/Roo-Code/releases/download/v{{VERSION}}/roo-cline-{{VERSION}}.vsix",
|
|
50
|
+
"filename": "roo-cline-{{VERSION}}.vsix"
|
|
51
|
+
},
|
|
52
|
+
"Atlascode": {
|
|
53
|
+
"displayName": "Atlassian Extension",
|
|
54
|
+
"downloadUrl": "github.com/atlassian/atlascode/releases/download/v{{VERSION}}/atlascode-{{VERSION}}.vsix",
|
|
55
|
+
"filename": "atlascode-{{VERSION}}.vsix"
|
|
56
|
+
},
|
|
57
|
+
"Zed": {
|
|
58
|
+
"displayName": "Zed",
|
|
59
|
+
"downloadUrl": "github.com/zed-industries/zed/releases/download/v{{VERSION}}/Zed-x86_64.exe",
|
|
60
|
+
"filename": "Zed-{{VERSION}}-x86_64.exe"
|
|
61
|
+
},
|
|
62
|
+
"Ralphy": {
|
|
63
|
+
"type": "npm",
|
|
64
|
+
"displayName": "Ralphy CLI",
|
|
65
|
+
"package": "ralphy-cli"
|
|
16
66
|
}
|
|
17
67
|
}
|
package/dist/index.js
CHANGED
|
@@ -161,6 +161,29 @@ bot.onText(/\/generate/, async (msg) => {
|
|
|
161
161
|
writeFileSync(outputPath, JSON.stringify(versionsJson, null, 2));
|
|
162
162
|
await bot.sendMessage(CHAT_ID, `Generated versions.json with ${versionsJson.tools.length} tools.\nPath: ${outputPath}`);
|
|
163
163
|
});
|
|
164
|
+
// Helper to format CLI preview
|
|
165
|
+
function formatCliPreview(versions) {
|
|
166
|
+
const versionsJson = generateVersionsJson(versions, downloadsConfig);
|
|
167
|
+
if (versionsJson.tools.length === 0) {
|
|
168
|
+
return 'No tools configured in downloads.json';
|
|
169
|
+
}
|
|
170
|
+
const lines = versionsJson.tools.map((tool) => {
|
|
171
|
+
const typeLabel = tool.type === 'npm' ? '(npm)' : '';
|
|
172
|
+
return `• ${tool.displayName}: ${tool.version} ${typeLabel}`;
|
|
173
|
+
});
|
|
174
|
+
return `CLI will include ${versionsJson.tools.length} tools:\n${lines.join('\n')}`;
|
|
175
|
+
}
|
|
176
|
+
bot.onText(/\/clipreview/, async (msg) => {
|
|
177
|
+
if (msg.chat.id.toString() !== validatedChatId)
|
|
178
|
+
return;
|
|
179
|
+
if (!cliPublisher.isConfigured()) {
|
|
180
|
+
await bot.sendMessage(validatedChatId, 'CLI publisher not configured. Check downloads.json and cli/ directory.');
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const state = storage.load();
|
|
184
|
+
const preview = formatCliPreview(state.versions);
|
|
185
|
+
await bot.sendMessage(validatedChatId, `📋 CLI Preview\n\n${preview}\n\nUse /publishcli to publish.`);
|
|
186
|
+
});
|
|
164
187
|
bot.onText(/\/publishcli/, async (msg) => {
|
|
165
188
|
if (msg.chat.id.toString() !== validatedChatId)
|
|
166
189
|
return;
|
|
@@ -168,8 +191,9 @@ bot.onText(/\/publishcli/, async (msg) => {
|
|
|
168
191
|
await bot.sendMessage(validatedChatId, 'CLI publisher not configured. Check downloads.json and cli/ directory.');
|
|
169
192
|
return;
|
|
170
193
|
}
|
|
171
|
-
await bot.sendMessage(validatedChatId, 'Publishing CLI...');
|
|
172
194
|
const state = storage.load();
|
|
195
|
+
const preview = formatCliPreview(state.versions);
|
|
196
|
+
await bot.sendMessage(validatedChatId, `📦 Publishing CLI...\n\n${preview}`);
|
|
173
197
|
const result = await cliPublisher.publish(state.versions);
|
|
174
198
|
if (result.success) {
|
|
175
199
|
await bot.sendMessage(validatedChatId, `✅ CLI published: v${result.version}`);
|
package/dist/types.d.ts
CHANGED
|
@@ -12,22 +12,39 @@ export interface Config {
|
|
|
12
12
|
checkIntervalHours: number;
|
|
13
13
|
tools: ToolConfig[];
|
|
14
14
|
}
|
|
15
|
-
export interface
|
|
15
|
+
export interface DownloadConfigUrl {
|
|
16
|
+
type?: 'download';
|
|
16
17
|
displayName: string;
|
|
17
18
|
downloadUrl: string;
|
|
18
19
|
filename: string;
|
|
19
20
|
}
|
|
21
|
+
export interface DownloadConfigNpm {
|
|
22
|
+
type: 'npm';
|
|
23
|
+
displayName: string;
|
|
24
|
+
package: string;
|
|
25
|
+
}
|
|
26
|
+
export type DownloadConfig = DownloadConfigUrl | DownloadConfigNpm;
|
|
20
27
|
export interface DownloadsConfig {
|
|
21
28
|
[toolName: string]: DownloadConfig;
|
|
22
29
|
}
|
|
23
|
-
export interface
|
|
30
|
+
export interface VersionsJsonToolDownload {
|
|
24
31
|
name: string;
|
|
25
32
|
displayName: string;
|
|
26
33
|
version: string;
|
|
27
34
|
publishedAt: string;
|
|
35
|
+
type?: 'download';
|
|
28
36
|
downloadUrl: string;
|
|
29
37
|
filename: string;
|
|
30
38
|
}
|
|
39
|
+
export interface VersionsJsonToolNpm {
|
|
40
|
+
name: string;
|
|
41
|
+
displayName: string;
|
|
42
|
+
version: string;
|
|
43
|
+
publishedAt: string;
|
|
44
|
+
type: 'npm';
|
|
45
|
+
package: string;
|
|
46
|
+
}
|
|
47
|
+
export type VersionsJsonTool = VersionsJsonToolDownload | VersionsJsonToolNpm;
|
|
31
48
|
export interface VersionsJson {
|
|
32
49
|
generatedAt: string;
|
|
33
50
|
tools: VersionsJsonTool[];
|
|
@@ -1,20 +1,44 @@
|
|
|
1
|
+
// Extract base version (e.g., "2.52.0" from "2.52.0.windows.1")
|
|
2
|
+
function getVersionBase(version) {
|
|
3
|
+
const match = version.match(/^(\d+\.\d+\.\d+)/);
|
|
4
|
+
return match ? match[1] : version;
|
|
5
|
+
}
|
|
6
|
+
function applyVersionPlaceholders(template, version) {
|
|
7
|
+
return template
|
|
8
|
+
.replace(/\{\{VERSION\}\}/g, version)
|
|
9
|
+
.replace(/\{\{VERSION_BASE\}\}/g, getVersionBase(version));
|
|
10
|
+
}
|
|
1
11
|
export function generateVersionsJson(versions, downloads) {
|
|
2
12
|
const tools = [];
|
|
3
13
|
for (const [toolName, version] of Object.entries(versions)) {
|
|
4
14
|
const downloadConfig = downloads[toolName];
|
|
5
15
|
if (!downloadConfig)
|
|
6
16
|
continue;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
17
|
+
if (downloadConfig.type === 'npm') {
|
|
18
|
+
// npm package - no download URL, just package name
|
|
19
|
+
tools.push({
|
|
20
|
+
name: toolName,
|
|
21
|
+
displayName: downloadConfig.displayName,
|
|
22
|
+
version,
|
|
23
|
+
publishedAt: new Date().toISOString(),
|
|
24
|
+
type: 'npm',
|
|
25
|
+
package: downloadConfig.package,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
// download type (default)
|
|
30
|
+
const downloadUrl = '{{NEXUS_URL}}/' +
|
|
31
|
+
applyVersionPlaceholders(downloadConfig.downloadUrl, version);
|
|
32
|
+
const filename = applyVersionPlaceholders(downloadConfig.filename, version);
|
|
33
|
+
tools.push({
|
|
34
|
+
name: toolName,
|
|
35
|
+
displayName: downloadConfig.displayName,
|
|
36
|
+
version,
|
|
37
|
+
publishedAt: new Date().toISOString(),
|
|
38
|
+
downloadUrl,
|
|
39
|
+
filename,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
18
42
|
}
|
|
19
43
|
return {
|
|
20
44
|
generatedAt: new Date().toISOString(),
|
|
@@ -44,4 +44,42 @@ describe('generateVersionsJson', () => {
|
|
|
44
44
|
expect(result.tools).toHaveLength(1);
|
|
45
45
|
expect(result.tools[0].name).toBe('Ninja');
|
|
46
46
|
});
|
|
47
|
+
it('supports VERSION_BASE placeholder for versions like 2.52.0.windows.1', () => {
|
|
48
|
+
const versions = {
|
|
49
|
+
'Git': '2.52.0.windows.1',
|
|
50
|
+
};
|
|
51
|
+
const downloads = {
|
|
52
|
+
'Git': {
|
|
53
|
+
displayName: 'Git for Windows',
|
|
54
|
+
downloadUrl: 'github.com/git-for-windows/git/releases/download/v{{VERSION}}/Git-{{VERSION_BASE}}-64-bit.exe',
|
|
55
|
+
filename: 'Git-{{VERSION_BASE}}-64-bit.exe',
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
const result = generateVersionsJson(versions, downloads);
|
|
59
|
+
expect(result.tools).toHaveLength(1);
|
|
60
|
+
const git = result.tools[0];
|
|
61
|
+
expect(git.downloadUrl).toBe('{{NEXUS_URL}}/github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/Git-2.52.0-64-bit.exe');
|
|
62
|
+
expect(git.filename).toBe('Git-2.52.0-64-bit.exe');
|
|
63
|
+
});
|
|
64
|
+
it('generates npm tools correctly', () => {
|
|
65
|
+
const versions = {
|
|
66
|
+
'Ralphy': '2.0.0',
|
|
67
|
+
};
|
|
68
|
+
const downloads = {
|
|
69
|
+
'Ralphy': {
|
|
70
|
+
type: 'npm',
|
|
71
|
+
displayName: 'Ralphy CLI',
|
|
72
|
+
package: 'ralphy-cli',
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
const result = generateVersionsJson(versions, downloads);
|
|
76
|
+
expect(result.tools).toHaveLength(1);
|
|
77
|
+
const ralphy = result.tools[0];
|
|
78
|
+
expect(ralphy.name).toBe('Ralphy');
|
|
79
|
+
expect(ralphy.displayName).toBe('Ralphy CLI');
|
|
80
|
+
expect(ralphy.version).toBe('2.0.0');
|
|
81
|
+
expect(ralphy.type).toBe('npm');
|
|
82
|
+
expect(ralphy.package).toBe('ralphy-cli');
|
|
83
|
+
expect(ralphy.downloadUrl).toBeUndefined();
|
|
84
|
+
});
|
|
47
85
|
});
|