The Debug button on a Sieve script sent a copy to an outside site, whose interpreter knows only upstream's extension names: a script that requires vnd.inbuxa.expressions or vnd.inbuxa.while failed to compile there, and the button took admins to another project's site. The playground now ships inside the console and runs the server's own interpreter. sieve-playground/ is built by inbuxa-server's tools/sieve-playground (SOURCE.md names the commit); sieve-playground.ts copies it, with Monaco 0.52.2 from node_modules, into sieve-playground/<content hash>/ (the server caches every file but the console's index.html for good) and gives the console its path. The script stays on the console's origin, so the warning dialog before opening it is gone. Strings (en.json): sievepad.failed reworded, sievepad.debugHint added, the three warning-dialog strings removed. webui.zip grows from 1.3 MB to 3.4 MB: 0.9 MB of compressed WebAssembly, the rest Monaco's editor core.
31 lines
1.1 KiB
TypeScript
31 lines
1.1 KiB
TypeScript
// defineConfig comes from vitest/config rather than vite, which is what puts
|
|
// the `test` key below in scope. It replaces a triple-slash reference that did
|
|
// the same job and that eslint rejects.
|
|
import { configDefaults, defineConfig } from 'vitest/config'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import path from 'path'
|
|
import { version } from './package.json' with { type: 'json' }
|
|
// INBUXA's own dated version lives apart from package.json, whose version
|
|
// follows upstream WebUI so its bumps merge without conflicts.
|
|
import inbuxa from './inbuxa-version.json' with { type: 'json' }
|
|
import { sievePlayground } from './sieve-playground.ts'
|
|
|
|
export default defineConfig({
|
|
base: './',
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(`${inbuxa.version} (base ${version})`),
|
|
},
|
|
plugins: [react(), tailwindcss(), sievePlayground()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(import.meta.dirname, './src'),
|
|
},
|
|
},
|
|
test: {
|
|
globals: false,
|
|
environment: 'happy-dom',
|
|
exclude: [...configDefaults.exclude, '**/.ignore/**'],
|
|
},
|
|
})
|