log bare-mux version to console.debug

This commit is contained in:
Percs 2024-09-11 10:40:51 -05:00
parent abec64ef97
commit f4fc8d64bf
2 changed files with 12 additions and 1 deletions

View file

@ -1,7 +1,11 @@
import inject from '@rollup/plugin-inject'; import inject from '@rollup/plugin-inject';
import replace from '@rollup/plugin-replace';
import typescript from 'rollup-plugin-typescript2'; import typescript from 'rollup-plugin-typescript2';
import { readFile } from 'node:fs/promises';
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from 'node:url';
const pkg = JSON.parse(await readFile('package.json'));
const commonPlugins = () => [ const commonPlugins = () => [
typescript(), typescript(),
inject( inject(
@ -14,7 +18,11 @@ const commonPlugins = () => [
) )
) )
), ),
replace({
'self.BARE_MUX_VERSION': JSON.stringify(
pkg.version
),
}),
]; ];
const configs = [ const configs = [

View file

@ -8,3 +8,6 @@ export type * from './baretypes';
export type * from './client'; export type * from './client';
export type * from './connection'; export type * from './connection';
export type * from "./snapshot"; export type * from "./snapshot";
//@ts-expect-error this gets filled in
console.debug("bare mux version: " + self.BARE_MUX_VERSION);