diff --git a/Dockerfile.encryptid b/Dockerfile.encryptid index 876a11d..1d81a42 100644 --- a/Dockerfile.encryptid +++ b/Dockerfile.encryptid @@ -17,8 +17,8 @@ COPY src/encryptid ./src/encryptid COPY public ./public COPY tsconfig.json ./ -# Build (if needed - Bun can run TS directly) -# RUN bun build ./src/encryptid/server.ts --target=bun --outdir=./dist +# Build client-side modules for browser +RUN bun build ./src/encryptid/index.ts --outdir=./src/encryptid/dist --target=browser --minify # Production stage FROM oven/bun:1.1-slim diff --git a/src/encryptid/demo.html b/src/encryptid/demo.html index 812350d..c60892b 100644 --- a/src/encryptid/demo.html +++ b/src/encryptid/demo.html @@ -428,11 +428,7 @@ signData, verifySignature, AuthLevel, - } from './index.ts'; - - // Import UI components (registers custom elements) - import './ui/guardian-setup.ts'; - import './ui/login-button.ts'; + } from '/dist/index.js'; // ======================================================================== // CAPABILITY DETECTION diff --git a/src/encryptid/server.ts b/src/encryptid/server.ts index e05edb5..3e2bfa8 100644 --- a/src/encryptid/server.ts +++ b/src/encryptid/server.ts @@ -432,6 +432,8 @@ async function generateSessionToken(userId: string, username: string): Promise