diff --git a/.github/workflows/deploy_app.yml b/.github/workflows/deploy_app.yml index 972e561..ed0dd5f 100644 --- a/.github/workflows/deploy_app.yml +++ b/.github/workflows/deploy_app.yml @@ -66,8 +66,13 @@ jobs: - run: pnpm sync working-directory: app + - run: pnpm tsc + working-directory: app + - run: pnpm check + working-directory: app - run: pnpm build working-directory: app + - uses: actions/upload-artifact@v4 with: name: app diff --git a/.gitignore b/.gitignore index 3bdf731..b17aa43 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ keys/ .ruff_cache/ node_modules/ .DS_Store + +tsconfig.tsbuildinfo diff --git a/api/Dockerfile b/api/Dockerfile index 4b2998c..58c7cfd 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -31,4 +31,4 @@ ENV TIMEOUT 0 EXPOSE 8080 -CMD exec gunicorn -k uvicorn.workers.UvicornWorker -b :$PORT -w $WORKER --threads $THREADS -t $TIMEOUT --preload api.src.main:app +CMD exec gunicorn -k uvicorn.workers.UvicornWorker -b :$PORT -w $WORKER --threads $THREADS -t $TIMEOUT --preload src.main:app diff --git a/app/Dockerfile b/app/Dockerfile deleted file mode 100644 index aeebf43..0000000 --- a/app/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -# Use the official lightweight Python image. -# https://hub.docker.com/_/python -FROM python:3.12-slim - -# Allow statements and log messages to immediately appear in the Knative logs -ENV PYTHONUNBUFFERED True -ENV PYTHONDONTWRITEBYTECODE 1 - -WORKDIR /app - -# Install FFmpeg, Cairo, and any other required dependencies -RUN apt-get -yqq update && apt-get -yqq install \ - build-essential \ - ffmpeg \ - libcairo2-dev \ - pkg-config \ - python3-dev \ - xclip \ - && rm -rf /var/lib/apt/lists/* - -COPY . ./ -# RUN rm -rf ./api - -# Install production dependencies. -RUN pip install --upgrade pip \ - && pip install --no-cache-dir -r requirements.txt - -ENV HOST '0.0.0.0' -EXPOSE $PORT -HEALTHCHECK CMD curl --fail http://$HOST:$PORT/_stcore/health - -CMD exec streamlit run app/index.py --server.port=$PORT --server.address=$HOST diff --git a/app/package.json b/app/package.json index 17111db..8fa0c59 100644 --- a/app/package.json +++ b/app/package.json @@ -19,6 +19,7 @@ "test:unit": "vitest" }, "dependencies": { + "bits-ui": "^0.21.16", "canvas-confetti": "^1.9.3", "clsx": "^2.1.1", "copy-to-clipboard": "^3.3.3", @@ -26,19 +27,18 @@ "dotenv": "16.3.1", "ejs": "^3.1.10", "firebase": "10.13.1", - "firebase-admin": "^12.3.1", "github-slugger": "^2.0.0", + "lucide-svelte": "^0.456.0", "marked": "^14.1.4", "nanoid": "^5.0.7", "ramda": "^0.30.1", - "rxfire": "^6.0.5", - "rxjs": "^7.8.1", - "superstruct": "^2.0.2", "svelte-persisted-store": "^0.11.0", + "svelte-sonner": "^0.3.28", "tailwind-merge": "^2.4.0", "tailwind-variants": "^0.2.1", "tailwindcss-animate": "^1.0.7", - "throttle-debounce": "^5.0.2" + "throttle-debounce": "^5.0.2", + "vaul-svelte": "^0.3.2" }, "devDependencies": { "@playwright/test": "^1.28.1", @@ -53,32 +53,24 @@ "@types/ramda": "^0.30.1", "@types/throttle-debounce": "^5.0.2", "autoprefixer": "^10.4.20", - "bits-ui": "^0.21.16", "eslint": "^9.0.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.36.0", + "firebase-admin": "^12.3.1", "globals": "^15.0.0", - "lucide-svelte": "^0.456.0", "mode-watcher": "^0.4.1", "postcss": "^8.4.41", "prettier": "^3.1.1", "prettier-plugin-svelte": "^3.1.2", "svelte": "^4.2.7", "svelte-check": "^3.6.0", - "svelte-sonner": "^0.3.28", "tailwindcss": "^3.4.7", "typescript": "^5.0.0", "typescript-eslint": "^8.0.0", - "vaul-svelte": "^0.3.2", "vite": "^5.4.2", "vitest": "^2.0.5" }, "engines": { "node": "20" - }, - "overrides": { - "rxfire": { - "firebase": "10.13.1" - } } } \ No newline at end of file diff --git a/app/vite.config.ts b/app/vite.config.ts index dbe9a13..9f397e6 100644 --- a/app/vite.config.ts +++ b/app/vite.config.ts @@ -14,7 +14,7 @@ export default defineConfig({ minify: 'esbuild' }, ssr: { - noExternal: ['ramda', 'bits-ui', 'rxfire'] + noExternal: ['ramda', 'bits-ui'] }, optimizeDeps: { include: ['copy-to-clipboard'] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b65cf9b..45f34ac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,6 +10,9 @@ importers: app: dependencies: + bits-ui: + specifier: ^0.21.16 + version: 0.21.16(svelte@4.2.19) canvas-confetti: specifier: ^1.9.3 version: 1.9.3 @@ -31,12 +34,12 @@ importers: firebase: specifier: 10.13.1 version: 10.13.1 - firebase-admin: - specifier: ^12.3.1 - version: 12.7.0 github-slugger: specifier: ^2.0.0 version: 2.0.0 + lucide-svelte: + specifier: ^0.456.0 + version: 0.456.0(svelte@4.2.19) marked: specifier: ^14.1.4 version: 14.1.4 @@ -46,18 +49,12 @@ importers: ramda: specifier: ^0.30.1 version: 0.30.1 - rxfire: - specifier: ^6.0.5 - version: 6.0.5(firebase@10.13.1)(rxjs@7.8.1) - rxjs: - specifier: ^7.8.1 - version: 7.8.1 - superstruct: - specifier: ^2.0.2 - version: 2.0.2 svelte-persisted-store: specifier: ^0.11.0 version: 0.11.0(svelte@4.2.19) + svelte-sonner: + specifier: ^0.3.28 + version: 0.3.28(svelte@4.2.19) tailwind-merge: specifier: ^2.4.0 version: 2.5.4 @@ -70,6 +67,9 @@ importers: throttle-debounce: specifier: ^5.0.2 version: 5.0.2 + vaul-svelte: + specifier: ^0.3.2 + version: 0.3.2(svelte@4.2.19) devDependencies: '@playwright/test': specifier: ^1.28.1 @@ -107,9 +107,6 @@ importers: autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.49) - bits-ui: - specifier: ^0.21.16 - version: 0.21.16(svelte@4.2.19) eslint: specifier: ^9.0.0 version: 9.14.0(jiti@1.21.6) @@ -119,12 +116,12 @@ importers: eslint-plugin-svelte: specifier: ^2.36.0 version: 2.46.0(eslint@9.14.0(jiti@1.21.6))(svelte@4.2.19) + firebase-admin: + specifier: ^12.3.1 + version: 12.7.0 globals: specifier: ^15.0.0 version: 15.12.0 - lucide-svelte: - specifier: ^0.456.0 - version: 0.456.0(svelte@4.2.19) mode-watcher: specifier: ^0.4.1 version: 0.4.1(svelte@4.2.19) @@ -143,9 +140,6 @@ importers: svelte-check: specifier: ^3.6.0 version: 3.8.6(postcss-load-config@4.0.2(postcss@8.4.49))(postcss@8.4.49)(svelte@4.2.19) - svelte-sonner: - specifier: ^0.3.28 - version: 0.3.28(svelte@4.2.19) tailwindcss: specifier: ^3.4.7 version: 3.4.14 @@ -155,9 +149,6 @@ importers: typescript-eslint: specifier: ^8.0.0 version: 8.14.0(eslint@9.14.0(jiti@1.21.6))(typescript@5.6.3) - vaul-svelte: - specifier: ^0.3.2 - version: 0.3.2(svelte@4.2.19) vite: specifier: ^5.4.2 version: 5.4.11(@types/node@22.9.0) @@ -2169,15 +2160,6 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - rxfire@6.0.5: - resolution: {integrity: sha512-ycBsANGbya3GNtOBKzZVATLEV+0S9gUrlTfwnN15TCXtgG8OgIMAuv2k9+kMeVaevp/DRp1KT+vYf6Wkop6gvw==} - peerDependencies: - firebase: ^9.0.0 || ^10.0.0 - rxjs: ^6.0.0 || ^7.0.0 - - rxjs@7.8.1: - resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} - sade@1.8.1: resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} engines: {node: '>=6'} @@ -2273,10 +2255,6 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true - superstruct@2.0.2: - resolution: {integrity: sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==} - engines: {node: '>=14.0.0'} - supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -4863,15 +4841,6 @@ snapshots: dependencies: queue-microtask: 1.2.3 - rxfire@6.0.5(firebase@10.13.1)(rxjs@7.8.1): - dependencies: - firebase: 10.13.1 - rxjs: 7.8.1 - - rxjs@7.8.1: - dependencies: - tslib: 2.8.1 - sade@1.8.1: dependencies: mri: 1.2.0 @@ -4973,8 +4942,6 @@ snapshots: pirates: 4.0.6 ts-interface-checker: 0.1.13 - superstruct@2.0.2: {} - supports-color@7.2.0: dependencies: has-flag: 4.0.0