Merge pull request #2635 from appwrite/bun

This commit is contained in:
Jake Barnby
2026-02-02 09:26:27 +00:00
committed by GitHub
21 changed files with 1798 additions and 7835 deletions
+4 -6
View File
@@ -18,12 +18,10 @@ jobs:
contents: read
steps:
- uses: actions/checkout@v5
- name: Use Node.js
uses: actions/setup-node@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 22
bun-version: 1.3.8
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: bun install --frozen-lockfile
+6 -11
View File
@@ -12,17 +12,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 22
- name: Install pnpm
uses: pnpm/action-setup@v4
bun-version: 1.3.8
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: bun install --frozen-lockfile
- name: Cache Playwright browsers
uses: actions/cache@v4
@@ -34,11 +30,10 @@ jobs:
${{ runner.os }}-playwright-
- name: Install Playwright Browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: pnpm exec playwright install --with-deps chromium
run: bunx playwright install --with-deps chromium
- name: E2E Tests
run: pnpm run e2e
run: bun test:e2e
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
+9 -13
View File
@@ -15,29 +15,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
node-version: 22
- name: Install pnpm
uses: pnpm/action-setup@v4
bun-version: 1.3.8
- name: Audit dependencies
run: pnpm audit --audit-level high
run: bun audit --audit-level high
- name: Install dependencies
run: pnpm install --frozen-lockfile
run: bun install --frozen-lockfile
- name: Svelte Diagnostics
run: pnpm run check
run: bun check
- name: Linter
run: pnpm run lint
run: bun lint
- name: Unit Tests
run: pnpm run test
run: bun test:unit
- name: Build Console
run: pnpm run build
run: bun run build
+2 -2
View File
@@ -5,5 +5,5 @@
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
tasks:
- init: npm install && npm run build
command: npm run dev
- init: bun install && bun run build
command: bun run dev
+2 -1
View File
@@ -1,4 +1,5 @@
# Ignore files for PNPM, NPM and YARN
# Ignore files for PNPM, NPM, BUN and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
bun.lock
+52 -37
View File
@@ -2,33 +2,39 @@
## Repository Overview
Appwrite Console is the web-based GUI for the Appwrite backend-as-a-service platform. Single-page application built with **Svelte 5 + SvelteKit 2**, **TypeScript** (not strict mode), **Vite 7**, tested with **Vitest + Playwright**. Package manager: **pnpm 10.15.1**, Node 20+. ~1500 files with extensive component-based architecture.
Appwrite Console is the web-based GUI for the Appwrite backend-as-a-service platform. Single-page application built with
**Svelte 5 + SvelteKit 2**, **TypeScript** (not strict mode), **Vite 7**, tested with **Vitest + Playwright**. Package
manager/runtime: **Bun** (Node 20+ optional for tooling). ~1500 files with extensive component-based architecture.
## Critical Build & Test Commands
### Setup (REQUIRED before any commands)
1. **Install pnpm**: `npm install -g corepack && corepack enable && corepack prepare pnpm@10.15.1 --activate`
1. **Install Bun**:
- Linux & macOS: `curl -fsSL https://bun.sh/install | bash`
- Windows: `powershell -c "irm bun.sh/install.ps1 | iex"`
2. **Create .env**: `cp .env.example .env` (configure `PUBLIC_APPWRITE_ENDPOINT` and `PUBLIC_CONSOLE_MODE`)
3. **Configure network access** (if using GitHub Actions or restricted environments):
- Ensure firewall/proxy allows access to: `pkg.pr.new`, `pkg.vc`, `registry.npmjs.org`
- These domains are required for dependencies: `@appwrite.io/console`, `@appwrite.io/pink-icons-svelte`, `@appwrite.io/pink-svelte`
- In GitHub Actions: Use `pnpm/action-setup@v4` which handles registry configuration
- These domains are required for dependencies: `@appwrite.io/console`, `@appwrite.io/pink-icons-svelte`,
`@appwrite.io/pink-svelte`
- In GitHub Actions: Ensure Bun is installed and registry access is configured
- If network errors persist, check proxy settings: `npm config get proxy` and `npm config get https-proxy`
4. **Install dependencies**: `pnpm install --frozen-lockfile` (if pkg.pr.new/pkg.vc fail due to network restrictions, installation may still succeed with cached versions)
4. **Install dependencies**: `bun install --frozen-lockfile` (if pkg.pr.new/pkg.vc fail due to network restrictions,
installation may still succeed with cached versions)
### Development Commands
**Standard workflow**: `check``lint``test``build` (before committing)
- `pnpm run check` - TypeScript/Svelte validation (~30-60s)
- `pnpm run lint` - ESLint check (~10-20s)
- `pnpm run format` - Auto-fix Prettier formatting
- `pnpm run test` - Vitest unit tests with TZ=EST (~10-30s)
- `pnpm run build` - Production build via build.js (~60-120s)
- `pnpm dev` - Dev server on port 3000
- `pnpm run preview` - Preview build on port 4173
- `pnpm run e2e` - Playwright tests (needs `pnpm exec playwright install --with-deps chromium` first, ~120s+)
- `bun run check` - TypeScript/Svelte validation (~30-60s)
- `bun run lint` - ESLint check (~10-20s)
- `bun run format` - Auto-fix Prettier formatting
- `bun run test` - Vitest unit tests with TZ=EST (~10-30s)
- `bun run build` - Production build via build.js (~60-120s)
- `bun run dev` - Dev server on port 3000
- `bun run preview` - Preview build on port 4173
- `bun run e2e` - Playwright tests (needs `bunx playwright install --with-deps chromium` first, ~120s+)
**CI Pipeline** (`.github/workflows/tests.yml`): audit → install → check → lint → test → build
@@ -52,36 +58,42 @@ src/
└── app.html, hooks.{client,server}.ts, service-worker.ts
```
**SvelteKit conventions**: `+page.svelte` (component), `+page.ts` (data loader), `+layout.svelte` (wrapper), `+error.svelte` (errors). Groups like `(console)` organize routes without affecting URLs. Dynamic params: `[param]`.
**SvelteKit conventions**: `+page.svelte` (component), `+page.ts` (data loader), `+layout.svelte` (wrapper),
`+error.svelte` (errors). Groups like `(console)` organize routes without affecting URLs. Dynamic params: `[param]`.
## Key Configuration
**svelte.config.js**: Adapter = static SPA (fallback: index.html), base path `/console`, aliases: `$lib`, `$routes`, `$themes`
**vite.config.ts**: Dev port 3000, Vitest (client=jsdom, server=node), test files: `src/**/*.{test,spec}.{js,ts}`
**svelte.config.js**: Adapter = static SPA (fallback: index.html), base path `/console`, aliases: `$lib`, `$routes`,
`$themes`
**vite.config.ts**: Dev port 3000
**tsconfig.json**: Extends `.svelte-kit/tsconfig.json`, **NOT strict mode** (`strict: false`)
**eslint.config.js**: Flat config (ESLint 9+), many rules disabled (see TODOs)
**.prettierrc**: 4 spaces, single quotes, 100 char width, no trailing commas
## Testing
**Unit (Vitest)**: Tests in `src/lib/helpers/*.test.ts`, run with `TZ=EST` (timezone matters). Setup mocks SvelteKit (`$app/*`) in `vitest-setup-client.ts`.
**E2E (Playwright)**: Tests in `e2e/journeys/*.spec.ts`, needs build+preview on port 4173, retries 3x, timeout 120s, Chromium only.
**Unit (Bun test)**: Tests in `src/lib/helpers/*.test.ts`, run with `TZ=EST` (timezone matters). Setup mocks SvelteKit (
`$app/*`) in `bun-test-setup.ts` via `bunfig.toml`.
**E2E (Playwright)**: Tests in `e2e/journeys/*.spec.ts`, needs build+preview on port 4173, retries 3x, timeout 120s,
Chromium only.
## Common Pitfalls
1. **Blank page in dev**: Disable ad blockers if seeing "Failed to fetch dynamically imported module" (known SvelteKit issue)
1. **Blank page in dev**: Disable ad blockers if seeing "Failed to fetch dynamically imported module" (known SvelteKit
issue)
2. **Network errors on install**:
- pkg.pr.new/pkg.vc deps may fail due to firewall/proxy restrictions
- Check access: `curl -I https://pkg.pr.new` and `curl -I https://pkg.vc`
- Configure proxy if needed: `npm config set proxy http://proxy:port` and `npm config set https-proxy http://proxy:port`
- GitHub Actions: Ensure runner has internet access; use `pnpm/action-setup@v4` action
- Configure proxy if needed: `npm config set proxy http://proxy:port` and
`npm config set https-proxy http://proxy:port`
- GitHub Actions: Ensure runner has internet access and Bun is installed
- Local dev: Often safe to continue with cached versions if network fails
3. **OOM on build**: Set `NODE_OPTIONS=--max_old_space_size=8192` (like Dockerfile does)
4. **Test failures**: Always use `pnpm run test` (sets TZ=EST), not `vitest` directly
5. **TS errors not showing**: Run `pnpm run check` explicitly (dev server doesn't always surface them)
6. **Format vs lint conflicts**: Run `pnpm run format` before `pnpm run lint`
4. **Test failures**: Always use `bun run test` (sets TZ=EST), not `bun test` directly
5. **TS errors not showing**: Run `bun run check` explicitly (dev server doesn't always surface them)
6. **Format vs lint conflicts**: Run `bun run format` before `bun run lint`
7. **E2E timeouts**: Wait 120s for preview server startup, tests auto-retry 3x
8. **Stale build**: Clear `.svelte-kit` if changes not reflected: `rm -rf .svelte-kit && pnpm run build`
8. **Stale build**: Clear `.svelte-kit` if changes not reflected: `rm -rf .svelte-kit && bun run build`
## Code Conventions
@@ -96,28 +108,31 @@ src/
1. Run Appwrite backend locally (see [docs](https://appwrite.io/docs/advanced/self-hosting))
2. Configure `.env` with backend endpoint
3. `pnpm install --frozen-lockfile`
4. `pnpm dev` (hot reload on port 3000)
5. Before commit: `pnpm run check && pnpm run format && pnpm run lint && pnpm run test && pnpm run build`
6. **Take screenshots**: For any UI changes, capture screenshots and include them in the PR description or comments before finalizing
3. `bun install --frozen-lockfile`
4. `bun run dev` (hot reload on port 3000)
5. Before commit: `bun run check && bun run format && bun run lint && bun run test && bun run build`
6. **Take screenshots**: For any UI changes, capture screenshots and include them in the PR description or comments
before finalizing
## Required Pre-Completion Checklist
**CRITICAL**: Before finishing any work or marking a task complete, agents MUST run the following commands in order and ensure all pass:
**CRITICAL**: Before finishing any work or marking a task complete, agents MUST run the following commands in order and
ensure all pass:
1. **`pnpm run format`** - Auto-fix all formatting issues
2. **`pnpm run check`** - Verify TypeScript/Svelte types (must show 0 errors, 0 warnings)
3. **`pnpm run lint`** - Check code style (ignore pre-existing issues in files you didn't modify)
4. **`pnpm run test`** - Run all unit tests (all tests must pass)
5. **`pnpm run build`** - Ensure production build succeeds
1. **`bun run format`** - Auto-fix all formatting issues
2. **`bun run check`** - Verify TypeScript/Svelte types (must show 0 errors, 0 warnings)
3. **`bun run lint`** - Check code style (ignore pre-existing issues in files you didn't modify)
4. **`bun run test`** - Run all unit tests (all tests must pass)
5. **`bun run build`** - Ensure production build succeeds
If any command fails:
- **Format/Lint**: Run `pnpm run format` to auto-fix, then re-check
- **Format/Lint**: Run `bun run format` to auto-fix, then re-check
- **Type errors**: Fix all TypeScript errors in files you modified
- **Test failures**: Fix failing tests or ensure failures are unrelated to your changes
- **Build failures**: Debug and resolve build issues before proceeding
**Never skip these checks** - they are mandatory quality gates before any work is considered complete.
**Trust these instructions** - only search if incomplete/incorrect. See CONTRIBUTING.md for PR conventions. Use `--frozen-lockfile` always. Docker builds: multi-stage, final image is nginx serving static files from `/console` path.
**Trust these instructions** - only search if incomplete/incorrect. See CONTRIBUTING.md for PR conventions. Use
`--frozen-lockfile` always. Docker builds: multi-stage, final image is nginx serving static files from `/console` path.
+13 -13
View File
@@ -44,19 +44,19 @@ If you are worried about or don't know where to start, check out the next sectio
git clone https://github.com/appwrite/console.git appwrite-console
```
### 2. Install dependencies with npm
### 2. Install dependencies with Bun
Navigate to the Appwrite Console repository and install dependencies.
```bash
cd appwrite-console && pnpm install
cd appwrite-console && bun install
```
### 3. Install and run Appwrite locally
When you run the Appwrite Console locally, it needs to point to a backend as well. The easiest way to do this is to run an Appwrite instance locally.
Follow the [install instructions](https://appwrite.io/docs/advanced/self-hosting) in the Appwrite docs.
Follow the [installation instructions](https://appwrite.io/docs/advanced/self-hosting) in the Appwrite docs.
### 4. Setup environment variables
@@ -68,7 +68,7 @@ Add a `.env` file by copying the `.env.example` file as a template in the projec
Finally, start a development server:
```bash
pnpm dev
bun dev
```
> **Note**
@@ -77,15 +77,15 @@ pnpm dev
### Build
```bash
pnpm build
bun run build
```
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
> You can preview the built app with `bun run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
### Tests
```bash
pnpm test
bun tests
```
This will run tests in the `tests/` directory.
@@ -95,13 +95,13 @@ This will run tests in the `tests/` directory.
Code should be consistently formatted everywhere. Before committing code, run the code-formatter.
```bash
pnpm run format
bun format
```
### Linter
```bash
pnpm run lint
bun run lint
```
### Diagnostics
@@ -113,7 +113,7 @@ Diagnostic tool that checks for the following:
- TypeScript compiler errors
```bash
pnpm run check
bun check
```
## Submit a Pull Request 🚀
@@ -176,11 +176,11 @@ $ git push origin [name_of_your_new_branch]
Before committing always make sure to run all available tools to improve the codebase:
- Formatter
- `pnpm run format`
- `bun format`
- Tests
- `pnpm test`
- `bun tests`
- Diagnostics
- `pnpm run check`
- `bun check`
### Performance
+4 -10
View File
@@ -1,17 +1,11 @@
FROM --platform=$BUILDPLATFORM node:20-alpine AS build
FROM --platform=$BUILDPLATFORM oven/bun:alpine AS build
WORKDIR /app
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN npm i -g corepack@latest
RUN corepack enable
RUN corepack prepare pnpm@10.0.0 --activate
ADD ./package.json /app/package.json
ADD ./pnpm-lock.yaml /app/pnpm-lock.yaml
ADD ./bun.lock /app/bun.lock
RUN pnpm install --frozen-lockfile
RUN bun install --frozen-lockfile
ADD ./build.js /app/build.js
ADD ./tsconfig.json /app/tsconfig.json
@@ -43,7 +37,7 @@ ENV SENTRY_AUTH_TOKEN=$SENTRY_AUTH_TOKEN
ENV SENTRY_RELEASE=$SENTRY_RELEASE
ENV NODE_OPTIONS=--max_old_space_size=8192
RUN pnpm run build
RUN bun run build
FROM nginx:1.26.3-alpine
+1 -1
View File
@@ -1,6 +1,6 @@
import kleur from 'kleur';
import { fileURLToPath } from 'url';
import { build, loadEnv } from 'vite';
import kleur from 'kleur';
const { bold, yellow } = kleur;
const __dirname = fileURLToPath(new URL('.', import.meta.url));
+1620
View File
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -34,7 +34,9 @@ export default ts.config(
'svelte/no-reactive-reassign': 'off',
'svelte/no-reactive-literals': 'off',
// TODO: @itznotabug, this requires a big refactor!
'svelte/no-navigation-without-resolve': 'off'
'svelte/no-navigation-without-resolve': 'warn',
'svelte/prefer-svelte-reactivity': 'warn',
'svelte/prefer-writable-derived': 'warn'
}
},
{
+13 -23
View File
@@ -1,24 +1,22 @@
{
"name": "@appwrite/console",
"type": "module",
"engines": {
"node": ">=22.0.0"
},
"scripts": {
"dev": "vite dev",
"build": "node build.js",
"build": "bun run build.js",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"clean": "rm -rf node_modules && rm -rf .svelte_kit && pnpm i --force",
"clean": "rm -rf node_modules && rm -rf .svelte-kit && bun install",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write --cache .",
"lint": "prettier --check . && eslint .",
"test": "TZ=EST vitest run",
"test:ui": "TZ=EST vitest --ui",
"test:watch": "TZ=EST vitest watch",
"e2e": "playwright test",
"e2e:ui": "playwright test --ui"
"tests": "bun run test:unit && bun run test:e2e",
"test:unit": "TZ=EST vitest run",
"test:unit-ui": "TZ=EST vitest --ui",
"test:unit-watch": "TZ=EST vitest watch",
"test:e2e": "playwright test",
"test:e2e-ui": "playwright test --ui"
},
"dependencies": {
"@ai-sdk/svelte": "^1.1.24",
@@ -26,7 +24,7 @@
"@appwrite.io/pink-icons": "0.25.0",
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@c1feb89",
"@appwrite.io/pink-legacy": "^1.0.3",
"@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@c1feb89",
"@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@dd7e01c",
"@faker-js/faker": "^9.9.0",
"@plausible-analytics/tracker": "^0.4.4",
"@popperjs/core": "^2.11.8",
@@ -34,7 +32,7 @@
"@stripe/stripe-js": "^3.5.0",
"@threlte/core": "^8.3.1",
"@threlte/extras": "^9.7.1",
"ai": "^2.2.37",
"ai": "^6.0.67",
"analytics": "^0.8.16",
"cron-parser": "^4.9.0",
"dayjs": "^1.11.13",
@@ -44,7 +42,6 @@
"nanoid": "^5.1.5",
"nanotar": "^0.1.1",
"pretty-bytes": "^6.1.1",
"prismjs": "^1.30.0",
"remarkable": "^2.0.1",
"svelte-confetti": "^1.4.0",
"three": "^0.181.2",
@@ -64,7 +61,6 @@
"@testing-library/svelte": "^5.2.8",
"@testing-library/user-event": "^14.6.1",
"@types/deep-equal": "^1.0.4",
"@types/prismjs": "^1.26.5",
"@types/remarkable": "^2.0.8",
"@types/three": "^0.182.0",
"@typescript-eslint/eslint-plugin": "^8.28.0",
@@ -91,13 +87,7 @@
"vite": "^7.0.6",
"vitest": "^3.2.4"
},
"pnpm": {
"onlyBuiltDependencies": [
"@parcel/watcher",
"@sentry/cli",
"esbuild",
"svelte-preprocess"
]
},
"packageManager": "pnpm@10.20.0"
"overrides": {
"vite": "npm:rolldown-vite@latest"
}
}
+1 -1
View File
@@ -19,7 +19,7 @@ const config: PlaywrightTestConfig = {
PUBLIC_STRIPE_KEY:
'pk_test_51LT5nsGYD1ySxNCyd7b304wPD8Y1XKKWR6hqo6cu3GIRwgvcVNzoZv4vKt5DfYXL1gRGw4JOqE19afwkJYJq1g3K004eVfpdWn'
},
command: 'pnpm run build && pnpm run preview',
command: 'bun run build && bun run preview',
port: 4173
}
};
-7545
View File
File diff suppressed because it is too large Load Diff
+8 -155
View File
@@ -8,19 +8,9 @@
</script>
<script lang="ts">
import { Badge, Icon } from '@appwrite.io/pink-svelte';
import { IconCode, IconAndroid, IconFlutter, IconApple } from '@appwrite.io/pink-icons-svelte';
import Prism from 'prismjs';
import 'prismjs/components/prism-dart';
import 'prismjs/components/prism-kotlin';
import 'prismjs/components/prism-json';
import 'prismjs/components/prism-bash';
import 'prismjs/components/prism-yaml';
import 'prismjs/components/prism-swift';
import 'prismjs/plugins/autoloader/prism-autoloader';
import 'prismjs/plugins/custom-class/prism-custom-class';
import 'prismjs/plugins/line-numbers/prism-line-numbers';
import { Copy } from '.';
import { Badge, Icon, Code } from '@appwrite.io/pink-svelte';
import { IconCode, IconAndroid, IconFlutter, IconApple } from '@appwrite.io/pink-icons-svelte';
let {
label = null,
@@ -37,7 +27,7 @@
label?: string;
labelIcon?: 'code' | 'android' | 'flutter' | 'apple';
code: string;
language: 'js' | 'html' | 'dart' | 'kotlin' | 'json' | 'sh' | 'yml' | 'swift';
language: Language;
withLineNumbers?: boolean;
withCopy?: boolean;
noMargin?: boolean;
@@ -60,16 +50,13 @@
return null;
}
}
Prism.plugins.customClass.prefix('prism-');
$effect(() => Prism.highlightAll());
</script>
<section
class="box u-overflow-hidden {classes}"
class:common-section={!noMargin}
class:noBoxPadding>
class:noBoxPadding
class:with-scroll={allowScroll}>
<div
class="controls u-position-absolute u-inset-inline-end-8 u-inset-block-start-8 u-flex u-gap-8">
{#if label}
@@ -87,150 +74,16 @@
</Copy>
{/if}
</div>
<pre
class:with-scroll={allowScroll}
class={`language-${language}`}
class:line-numbers={withLineNumbers}><code>{code}</code></pre>
<Code {code} lang={language} lineNumbers={withLineNumbers} hideHeader />
</section>
<!-- svelte-ignore css_unused_selector -->
<style lang="scss" global>
@import 'prismjs/themes/prism.css';
@import 'prismjs/plugins/line-numbers/prism-line-numbers.css';
.box {
--p-box-background-color: var(--color-neutral-400) !important;
body.theme-light & {
--p-box-background-color: var(--color-neutral-5) !important;
}
.controls {
z-index: 2;
}
}
<style lang="scss">
.noBoxPadding {
padding: 0 !important;
}
.with-scroll {
height: 100%;
overflow: auto;
}
code,
pre {
&[class*='language-'] {
color: #fcfcff;
text-shadow: none;
font-family: 'Source Code Pro';
&.line-numbers {
padding-left: 2.5em;
}
body.theme-light & {
color: #373b4d;
}
}
::selection,
&::selection {
text-shadow: none;
background: #b3d4fc;
}
&.line-numbers .line-numbers-rows {
border: none;
> span::before {
color: #868ea3;
}
}
}
:not(pre) > code[class*='language-'],
pre[class*='language-'] {
background: hsl(var(--p-box-background-color));
margin: 0;
}
.prism-token {
&.prism-comment,
&.prism-prolog,
&.prism-doctype,
&.prism-cdata {
color: #868ea3;
}
&.prism-punctuation {
color: #fcfcff;
body.theme-light & {
color: #373b4d;
}
}
&.prism-property,
&.prism-tag,
&.prism-boolean,
&.prism-number,
&.prism-constant,
&.prism-symbol,
&.prism-deleted,
&.prism-selector,
&.prism-attr-name,
&.prism-string,
&.prism-char,
&.prism-builtin,
&.prism-inserted {
color: #fdc584;
body.theme-light & {
color: #e49545;
}
}
&.prism-operator,
&.prism-entity,
&.prism-url,
.language-css &.prism-string,
.style &.prism-string {
color: #fcfcff;
background: none;
body.theme-light & {
color: #373b4d;
}
}
&.prism-atrule,
&.prism-attr-value,
&.prism-keyword {
color: #cbb1fc;
body.theme-light & {
color: #6a6af7;
}
}
&.prism-function {
color: #ffa1ce;
body.theme-light & {
color: #f02e7f;
}
}
&.prism-class-name {
color: #a1c4ff;
body.theme-light & {
color: #62aed2;
}
}
&.prism-important,
&.prism-variable {
color: #a1c4ff;
body.theme-light & {
color: #62aed2;
}
}
&.prism-regex {
color: #a1c4ff;
body.theme-light & {
color: #62aed2;
}
}
overflow: auto !important;
}
</style>
+2 -3
View File
@@ -65,11 +65,10 @@ export async function gzipUpload(files: FileList) {
data: f.buffer
}))
);
const blob = new Blob([tar], { type: 'application/gzip' });
const file = new File([blob], 'deployment.tar.gz', {
const blob = new Blob([new Uint8Array(tar)], { type: 'application/gzip' });
uploadFile = new File([blob], 'deployment.tar.gz', {
type: 'application/gzip'
});
uploadFile = file;
} catch (e) {
addNotification({
type: 'error',
+14 -1
View File
@@ -200,5 +200,18 @@
"shadow-offsety-4": "var(--base-4)",
"shadow-offsety-6": "var(--base-6)",
"shadow-offsety-8": "var(--base-8)",
"shadow-offsety-20": "var(--base-20)"
"shadow-offsety-20": "var(--base-20)",
"shiki-foreground": "var(--fgcolor-neutral-primary)",
"shiki-background": "var(--bgcolor-neutral-primary)",
"shiki-token-constant": "var(--brand-orange-500)",
"shiki-token-string": "var(--web-green-500)",
"shiki-token-comment": "var(--neutral-600)",
"shiki-token-keyword": "var(--brand-purple-200)",
"shiki-token-parameter": "var(--fgcolor-neutral-primary)",
"shiki-token-function": "var(--brand-blue-500)",
"shiki-token-string-expression": "var(--web-green-500)",
"shiki-token-punctuation": "var(--neutral-250)",
"shiki-token-link": "var(--brand-blue-500)",
"shiki-token-deleted": "var(--web-red-500)",
"shiki-token-inserted": "var(--web-green-500)"
}
+14 -1
View File
@@ -200,5 +200,18 @@
"shadow-offsety-4": "var(--base-4)",
"shadow-offsety-6": "var(--base-6)",
"shadow-offsety-8": "var(--base-8)",
"shadow-offsety-20": "var(--base-20)"
"shadow-offsety-20": "var(--base-20)",
"shiki-foreground": "var(--fgcolor-neutral-primary)",
"shiki-background": "var(--bgcolor-neutral-primary)",
"shiki-token-constant": "var(--brand-orange-500)",
"shiki-token-string": "var(--web-green-500)",
"shiki-token-comment": "var(--neutral-600)",
"shiki-token-keyword": "var(--brand-purple-200)",
"shiki-token-parameter": "var(--fgcolor-neutral-primary)",
"shiki-token-function": "var(--brand-blue-500)",
"shiki-token-string-expression": "var(--web-green-500)",
"shiki-token-punctuation": "var(--neutral-250)",
"shiki-token-link": "var(--brand-blue-500)",
"shiki-token-deleted": "var(--web-red-500)",
"shiki-token-inserted": "var(--web-green-500)"
}
+14 -1
View File
@@ -200,5 +200,18 @@
"shadow-offsety-4": "var(--base-4)",
"shadow-offsety-6": "var(--base-6)",
"shadow-offsety-8": "var(--base-8)",
"shadow-offsety-20": "var(--base-20)"
"shadow-offsety-20": "var(--base-20)",
"shiki-foreground": "var(--fgcolor-neutral-primary)",
"shiki-background": "var(--bgcolor-neutral-primary)",
"shiki-token-constant": "var(--brand-orange-700)",
"shiki-token-string": "var(--web-green-700)",
"shiki-token-comment": "var(--neutral-400)",
"shiki-token-keyword": "var(--brand-purple-500)",
"shiki-token-parameter": "var(--fgcolor-neutral-primary)",
"shiki-token-function": "var(--brand-blue-600)",
"shiki-token-string-expression": "var(--web-green-700)",
"shiki-token-punctuation": "var(--neutral-700)",
"shiki-token-link": "var(--brand-blue-600)",
"shiki-token-deleted": "var(--web-red-700)",
"shiki-token-inserted": "var(--web-green-700)"
}
+14 -1
View File
@@ -200,5 +200,18 @@
"shadow-offsety-4": "var(--base-4)",
"shadow-offsety-6": "var(--base-6)",
"shadow-offsety-8": "var(--base-8)",
"shadow-offsety-20": "var(--base-20)"
"shadow-offsety-20": "var(--base-20)",
"shiki-foreground": "var(--fgcolor-neutral-primary)",
"shiki-background": "var(--bgcolor-neutral-primary)",
"shiki-token-constant": "var(--brand-orange-700)",
"shiki-token-string": "var(--web-green-700)",
"shiki-token-comment": "var(--neutral-400)",
"shiki-token-keyword": "var(--brand-purple-500)",
"shiki-token-parameter": "var(--fgcolor-neutral-primary)",
"shiki-token-function": "var(--brand-blue-600)",
"shiki-token-string-expression": "var(--web-green-700)",
"shiki-token-punctuation": "var(--neutral-700)",
"shiki-token-link": "var(--brand-blue-600)",
"shiki-token-deleted": "var(--web-red-700)",
"shiki-token-inserted": "var(--web-green-700)"
}
+2 -9
View File
@@ -15,7 +15,7 @@ export default defineConfig({
sveltekit()
],
optimizeDeps: {
include: ['echarts', 'prismjs']
include: ['echarts']
},
css: {
preprocessorOptions: {
@@ -25,14 +25,7 @@ export default defineConfig({
}
},
ssr: {
noExternal: [
'@analytics/google-analytics',
'analytics',
'dayjs',
'echarts',
'prismjs',
'zrender'
]
noExternal: ['@analytics/google-analytics', 'analytics', 'dayjs', 'echarts', 'zrender']
},
server: {
port: 3000