Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions webui/native/dist/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions webui/native/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webui/native/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "audiocpp-native-webui",
"private": true,
"version": "0.1.0",
"version": "0.8.1",
"type": "module",
"scripts": {
"dev": "vite dev",
Expand Down
27 changes: 27 additions & 0 deletions webui/native/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
import { readFileSync } from 'node:fs';

import adapter from '@sveltejs/adapter-static';

// SvelteKit defaults kit.version.name to Date.now() and derives the
// __sveltekit_<id> global it embeds in dist/index.html from it, so two builds
// of identical source differ. dist/index.html is committed -- it is embedded
// into the server binary at configure time, which is what lets the project
// build a working server without a JavaScript toolchain -- so any two branches
// that rebuild the web UI conflict in it whether or not their source changes
// overlap.
//
// Naming the version after the UI package makes the bundle a pure function of
// the source tree. Keep webui/native/package.json's version in step with the
// release it ships in; nothing derives it automatically, because audio.cpp's
// own version is tag-driven (AUDIOCPP_VERSION is passed at configure time and
// is not committed anywhere in the tree).
//
// Note that this is an identifier, not a live update channel: the app never
// imports SvelteKit's `updated` store, version.pollInterval is left at its
// default of 0, and the single-file bundle ships no _app/version.json for the
// client to poll. A stale version here costs nothing but a stale label.
const { version } = JSON.parse(
readFileSync(new URL('./package.json', import.meta.url), 'utf8')
);

/** @type {import('@sveltejs/kit').Config} */
const config = {
kit: {
Expand All @@ -17,6 +41,9 @@ const config = {
},
paths: {
relative: true
},
version: {
name: version
}
}
};
Expand Down
Loading