chore(release): single-source app version + add pnpm bump
- WebUI sidebar/login display and OneBot get_version_info now read the root package.json version via Vite `define`, removing hardcoded literals in webui/src/types.ts and core/onebot/actions/info.ts. - tools/bump-version.mjs (exposed as `pnpm bump <ver>`) syncs the version field across the root and all five workspace packages. - Bump everything to 1.7.8.
This commit is contained in:
13 files changed
+79
-10
No files matched your search
@@ -12,10 +12,13 @@ export function register(h: ApiHandler, ctx: ApiActionContext): void {
|
||||
return okResponse({ online, good: online });
|
||||
});
|
||||
|
||||
// __APP_VERSION__ is injected by Vite from the monorepo root package.json;
|
||||
// it's undefined under vitest (no define plugin), so fall back to 'dev'.
|
||||
const appVersion = typeof __APP_VERSION__ !== 'undefined' ? __APP_VERSION__ : 'dev';
|
||||
h.registerAction('get_version_info', async () => {
|
||||
return okResponse({
|
||||
app_name: 'SnowLuma',
|
||||
app_version: '0.1.0-node',
|
||||
app_version: `${appVersion}-node`,
|
||||
protocol_version: 'v11',
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user