diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 09d8628afc..e97cb82380 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,9 +12,6 @@ concurrency: group: pages-${{ github.ref_name }} cancel-in-progress: false -env: - SITE_AUTH_PASSWORDS: ${{ secrets.SITE_AUTH_PASSWORDS }} - jobs: deploy: runs-on: ubuntu-latest @@ -44,24 +41,11 @@ jobs: echo "target-folder=dev" >> "$GITHUB_OUTPUT" fi - - name: Compute auth hashes - if: ${{ env.SITE_AUTH_PASSWORDS != '' }} - run: | - HASHES=$(node -e " - const crypto = require('crypto'); - const raw = process.env.SITE_AUTH_PASSWORDS; - const hashes = raw.split('\n').map(p => p.trim()).filter(Boolean) - .map(p => crypto.createHash('sha256').update(p).digest('hex')); - process.stdout.write(hashes.join(',')); - ") - echo "SITE_AUTH_HASHES=$HASHES" >> $GITHUB_ENV - - name: Build run: npm run build env: SITE_URL: ${{ steps.site.outputs.url }} SITE_BASE: ${{ steps.site.outputs.base }} - SITE_AUTH_HASHES: ${{ env.SITE_AUTH_HASHES }} - name: Pagefind run: npx pagefind --site dist @@ -74,4 +58,3 @@ jobs: target-folder: ${{ steps.site.outputs.target-folder }} clean-exclude: | dev - pr-preview diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml deleted file mode 100644 index 5cd716b792..0000000000 --- a/.github/workflows/pr-preview.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: PR Preview - -on: - pull_request: - types: [opened, reopened, synchronize, closed] - -concurrency: - group: pr-preview-${{ github.event.number }} - cancel-in-progress: true - -env: - SITE_AUTH_PASSWORDS: ${{ secrets.SITE_AUTH_PASSWORDS }} - -jobs: - deploy-preview: - if: github.event.action != 'closed' - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 - with: - node-version: 26 - cache: npm - - - name: Install - run: npm ci - - - name: Compute auth hashes - if: ${{ env.SITE_AUTH_PASSWORDS != '' }} - run: | - HASHES=$(node -e " - const crypto = require('crypto'); - const raw = process.env.SITE_AUTH_PASSWORDS; - const hashes = raw.split('\n').map(p => p.trim()).filter(Boolean) - .map(p => crypto.createHash('sha256').update(p).digest('hex')); - process.stdout.write(hashes.join(',')); - ") - echo "SITE_AUTH_HASHES=$HASHES" >> $GITHUB_ENV - - - name: Build - run: npm run build - env: - SITE_URL: https://blamas.github.io - SITE_BASE: /boxdex/pr-preview/pr-${{ github.event.number }}/ - SITE_AUTH_HASHES: ${{ env.SITE_AUTH_HASHES }} - - - name: Pagefind - run: npx pagefind --site dist - - - name: Deploy preview - uses: rossjrw/pr-preview-action@ffa7509e91a3ec8dfc2e5536c4d5c1acdf7a6de9 # v1.8.1 - with: - source-dir: dist - umbrella-dir: pr-preview - preview-branch: gh-pages - - cleanup-preview: - if: github.event.action == 'closed' - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - - name: Remove preview - uses: rossjrw/pr-preview-action@ffa7509e91a3ec8dfc2e5536c4d5c1acdf7a6de9 # v1.8.1 - with: - action: remove - umbrella-dir: pr-preview - preview-branch: gh-pages diff --git a/CLAUDE.md b/CLAUDE.md index 9c00bf3552..7c01d2a7ab 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -172,8 +172,7 @@ At ≤640px the `.nav-links` div is `display:none`; `nav.nav-open .nav-links { d - **ECharts** is only loaded on pages whose island renders a chart: `/compare` (`Compare` → `CurveChart`), `/explore` (`DesignSpace`), `/stack` (`StackBuilder` → `SystemResponse` → `CurveChart`), `/enclosures/[slug]` (`BoxCurves` → `CurveChart`), `/drivers/compare` and `/horns/compare` (`RadarCompare`). `/find` (`Explorer.svelte`) is list/filter only and does **not** pull in ECharts. All imports go through `src/lib/echarts.ts` to keep the bundle tree-shaken. - **`client:only="svelte"`** on all islands. No SSR for interactive components. Fetches use `BASE` from `src/lib/site.ts` (the canonical export — never re-derive from `import.meta.env` inline). i18n in islands via `getClientTranslations()` from `src/lib/locale-client.ts`. - **Routing**: all content pages live under `src/pages/[locale]/`; `src/pages/index.astro` redirects to the default locale. The locale segment is part of every internal link — use `localeBase` (SSR) or `BASE + /[locale]` (client) rather than root-absolute paths. -- **Password gate**: `src/lib/auth.ts` exports `AUTH_ENABLED` (hardcoded `true`) and `AUTH_HASHES`, parsed from the `SITE_AUTH_HASHES` build-time env var. `Layout.astro` renders a full-screen password form when both are non-empty, hashes the entered password client-side (`crypto.subtle.digest("SHA-256")`) and compares hex digests, storing a pass flag in `sessionStorage`. Plaintext passwords never touch the repo: each deploy workflow (`deploy.yml` for `main`/`develop`, `pr-preview.yml` for PR previews) reads the same `SITE_AUTH_PASSWORDS` GitHub secret (comma-separated plaintext), hashes each to build `SITE_AUTH_HASHES`, and only sets it as a build env var, so production, the `/dev/` preview and every PR preview are gated identically. Set the secret to an empty string (or remove it) to ship ungated everywhere. Local dev: set `SITE_AUTH_HASHES` in `.env`, or leave unset for no gate. -- **`SITE_BASE`**: `astro.config.mjs`'s `base` is `process.env.SITE_BASE || "/"`, not hardcoded. Pages deploys from the `gh-pages` branch (not the Actions-based Pages deployment), so `main`, `develop` and PR previews all coexist as subfolders of one branch, each workflow sets `SITE_BASE`/`SITE_URL` explicitly per environment (`/boxdex/`, `/boxdex/dev/`, `/boxdex/pr-preview/pr-/`), there's no `configure-pages` auto-detection anymore. +- **`SITE_BASE`**: `astro.config.mjs`'s `base` is `process.env.SITE_BASE || "/"`, not hardcoded. Pages deploys from the `gh-pages` branch (not the Actions-based Pages deployment), so `main` and `develop` coexist as subfolders of one branch, `deploy.yml` sets `SITE_BASE`/`SITE_URL` explicitly per environment (`/boxdex/`, `/boxdex/dev/`), there's no `configure-pages` auto-detection anymore. - **`data/enclosures/fk-*`**: synthetic fixture entries generated by `scripts/local/gen-fake-data.mjs` (local-only script, runs `gen-fk-a-i.mjs` / `gen-fk-j-k.mjs` / `gen-fk-l-o.mjs`) to stress-test catalog UI at scale. Not real products, don't "correct" their specs against datasheets, regenerate with `--force` instead of hand-editing. - All units **SI only**: mm, L, Hz, dB, kg, W, Ω. No imperial. diff --git a/README.md b/README.md index 6e9c0eb33a..a4a901c139 100644 --- a/README.md +++ b/README.md @@ -67,11 +67,6 @@ With [mise](https://mise.jdx.dev): `mise run dev|build|test|lint|check|fix|verif (`.github/workflows/deploy.yml`) builds and publishes `dist/` automatically on push to `main`. -Optionally set the `SITE_AUTH_PASSWORDS` repo secret (comma-separated plaintext) to -put the whole site behind a password gate: the workflow hashes each password at build -time into `SITE_AUTH_HASHES`, no plaintext ever lands in the repo. Leave it unset for -no gate. - ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) for the folder conventions, CSV format, and diff --git a/package-lock.json b/package-lock.json index 0b854a8268..0d95fea424 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,11 +9,11 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "@astrojs/mdx": "^7.0.1", + "@astrojs/mdx": "^7.0.2", "@astrojs/sitemap": "^3.7.3", "@astrojs/svelte": "^9.0.1", - "astro": "^7.0.5", - "astro-pagefind": "^2.0.0", + "astro": "^7.0.6", + "astro-pagefind": "^2.0.1", "echarts": "^6.1.0", "svelte": "^5.56.4" }, @@ -273,9 +273,9 @@ } }, "node_modules/@astrojs/internal-helpers": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.10.0.tgz", - "integrity": "sha512-Ry2R3VPeIN4uPCSA4xQc+e+vsJXkalKpEbDc07hV+a/o5Bs2N/s/uDcPJH/05L19DKh9tAy7e6JM3YZ6Cxfezw==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@astrojs/internal-helpers/-/internal-helpers-0.10.1.tgz", + "integrity": "sha512-5phcroT/vmOOrYuuAxtkbPixy5hePtlz9i8K4OeDv3dNK6/UQRuXPOSRTxIOBbUY5Sonw2UaxjbuVc43Mcir6Q==", "license": "MIT", "dependencies": { "@types/hast": "^3.0.4", @@ -331,12 +331,12 @@ } }, "node_modules/@astrojs/markdown-remark": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-7.2.0.tgz", - "integrity": "sha512-+YxmVQu1Bd+MFfSzjq1rOJvD9+nIOJzz5YIIhdIH01RrxRkKbyKoEgyIqP3yv51MhzMDgd79QaPv+kCVPT8vHw==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-remark/-/markdown-remark-7.2.1.tgz", + "integrity": "sha512-jPVNIqTvk+yKviikszv/Y1U4jGUSKpp/Nw48QZV4qjWgp70j4Lkq3lhSDRbWwCfgKvEyO9GHuVbV1dM2WYXy1w==", "license": "MIT", "dependencies": { - "@astrojs/internal-helpers": "0.10.0", + "@astrojs/internal-helpers": "0.10.1", "@astrojs/prism": "4.0.2", "github-slugger": "^2.0.0", "hast-util-from-html": "^2.0.3", @@ -356,25 +356,25 @@ } }, "node_modules/@astrojs/markdown-satteri": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@astrojs/markdown-satteri/-/markdown-satteri-0.3.2.tgz", - "integrity": "sha512-feXuUPy41gVfeM7EHT1ciUim8ozGr+YHXab9uUBc1Hk8y60DQosO8ldL+AoPXnCAoGj1OChwHfvXmmJ6XVnY9A==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@astrojs/markdown-satteri/-/markdown-satteri-0.3.3.tgz", + "integrity": "sha512-Lje33Ittd8UQGgbIIWQvhPkj5X5c4b1sZnZWX3JQV/AWpfbuQGxVi2ONt6+ScydcwfR4egilslEWyczMclrJ1g==", "license": "MIT", "dependencies": { - "@astrojs/internal-helpers": "0.10.0", + "@astrojs/internal-helpers": "0.10.1", "@astrojs/prism": "4.0.2", "github-slugger": "^2.0.0", "satteri": "^0.9.1" } }, "node_modules/@astrojs/mdx": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@astrojs/mdx/-/mdx-7.0.1.tgz", - "integrity": "sha512-N8qZnqhTbydVuXlHhyUocNIccbuqsYIagSGbmzcOsJrOJZPT9Q/Z1jIa7kwFk/rqIjsNpPSOeahNoGBiR+dZoA==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@astrojs/mdx/-/mdx-7.0.2.tgz", + "integrity": "sha512-l+sJY5U1KkGZUdr+bIL4Y6BefeS549qoSHVSkUSs6A9INwdCND+/0+vN0NroPBXwl5Vcg5u78t7VQRsJjePxbw==", "license": "MIT", "dependencies": { - "@astrojs/internal-helpers": "0.10.0", - "@astrojs/markdown-remark": "7.2.0", + "@astrojs/internal-helpers": "0.10.1", + "@astrojs/markdown-remark": "7.2.1", "@mdx-js/mdx": "^3.1.1", "acorn": "^8.16.0", "es-module-lexer": "^2.0.0", @@ -702,9 +702,9 @@ } }, "node_modules/@bruits/satteri-darwin-arm64": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-arm64/-/satteri-darwin-arm64-0.9.3.tgz", - "integrity": "sha512-dRUZZrdwh1asfTOyM1nDNmzolhnHtlIFpqYrl1Tdd3YVcaebKmrfJgGL7NAoGPjbEwYmZxaugrxA0uzw83c0dw==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-arm64/-/satteri-darwin-arm64-0.9.4.tgz", + "integrity": "sha512-W3MSUkr2mZRR8Stoe+lqNAyzQzRuFMU8WffV9IvFSxTok0LGWR0ZZQPLELU4QTRiUbhL2Y4VUP9vV7pj8rHjgg==", "cpu": [ "arm64" ], @@ -714,9 +714,9 @@ ] }, "node_modules/@bruits/satteri-darwin-x64": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-x64/-/satteri-darwin-x64-0.9.3.tgz", - "integrity": "sha512-wgNCTRp2hPSpNMGFv5A4+6+VXgRJIlBZ7XKb3iwjV8YjRWNIjzE5zV2fUeYynyZYVRkuJ9aYFqQmWhc1e5H+UQ==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-x64/-/satteri-darwin-x64-0.9.4.tgz", + "integrity": "sha512-DXOuuaE1lsv7mpk2mOvGrzqoEWEvOIZEO/fXVa7zfM23Iob+CBjBkRAMwpHA4pmZ3j6Gj7WJzPKw0kQ7w741AQ==", "cpu": [ "x64" ], @@ -726,9 +726,9 @@ ] }, "node_modules/@bruits/satteri-linux-arm64-gnu": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-gnu/-/satteri-linux-arm64-gnu-0.9.3.tgz", - "integrity": "sha512-A/pWy8Jb/PhDYc2/JFuYh06gFJcsfBUBDl81YydGYBrL/Z4nItDfhNDNOibyeSN/lKKDRlycIHEIajjErk00sQ==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-gnu/-/satteri-linux-arm64-gnu-0.9.4.tgz", + "integrity": "sha512-gJxU9rGGoqIznSEgEzpjxkry24jeHuMpoo1tCIAhHYh7WaD3j5F8zt3jmHxEaN1Uwa+K5+wFgIR2uIGOnMzEmw==", "cpu": [ "arm64" ], @@ -741,9 +741,9 @@ ] }, "node_modules/@bruits/satteri-linux-arm64-musl": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-musl/-/satteri-linux-arm64-musl-0.9.3.tgz", - "integrity": "sha512-L6YxmyOSickzo4pE5WmZfNTJnjX0MtgKOsuwQfNZECTx9Ir5vl2B37EIwnxe2AybuPPHl+FqVQtthNDUdH4Vgg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-arm64-musl/-/satteri-linux-arm64-musl-0.9.4.tgz", + "integrity": "sha512-Wjzu9hmmAbfmDkBfPI1VdZygJtYz9uYZQnkEyrXi6S2JFi+2pXQ1A5irj38bqm0IZmWcTbk0cVG4NZnPdtVNJA==", "cpu": [ "arm64" ], @@ -756,9 +756,9 @@ ] }, "node_modules/@bruits/satteri-linux-x64-gnu": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-gnu/-/satteri-linux-x64-gnu-0.9.3.tgz", - "integrity": "sha512-RgH6GPihg9Lzs2yHUsMjqiLxfLyOdmBty8sg9pBY9B4CBnvdOzvg8vklqN+C4qrEEdA9TwpbDpHr1AshLKyRpw==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-gnu/-/satteri-linux-x64-gnu-0.9.4.tgz", + "integrity": "sha512-MR1Q+wMx65FQlbSV7cRqWW87Knp0zkoaIV55Dt+xZl028wJABXEPEEmG3670SLq7lVZvcGIDwCgSg2kCYxvRwA==", "cpu": [ "x64" ], @@ -771,9 +771,9 @@ ] }, "node_modules/@bruits/satteri-linux-x64-musl": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-musl/-/satteri-linux-x64-musl-0.9.3.tgz", - "integrity": "sha512-BeWhVORjNTIomePznUKiMbHZTqC0j7sMXZFsISmbX+po5d33KLkqBqKh6K332CHJ8KUmCWx16FfPjwsoysttQg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@bruits/satteri-linux-x64-musl/-/satteri-linux-x64-musl-0.9.4.tgz", + "integrity": "sha512-T4gxhXve3zyNAZesrXAd/rDZOGRkbfFIUFld4TGsw6BsjoIteCcDji6IMqeXyaWEVSykY2X8Eid2hr6aXGYAaw==", "cpu": [ "x64" ], @@ -786,9 +786,9 @@ ] }, "node_modules/@bruits/satteri-wasm32-wasi": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@bruits/satteri-wasm32-wasi/-/satteri-wasm32-wasi-0.9.3.tgz", - "integrity": "sha512-dFNcOHKWV2cztCPnYTn7kZ9D7kNOt8N239z5ysFkNHLxJrfK7zaKIXQbfXYN32C+JoVFqAcTIOeWH2+VnsCOHg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@bruits/satteri-wasm32-wasi/-/satteri-wasm32-wasi-0.9.4.tgz", + "integrity": "sha512-/CEG8LUlpaBEnhFnYVn0UnlHFLs51UhrkJBUPDUXLzkadzAcnR88iRA/nOl7Zwhjb4WhfBV4p3P5qeOJMtH0iA==", "cpu": [ "wasm32" ], @@ -803,9 +803,9 @@ } }, "node_modules/@bruits/satteri-win32-arm64-msvc": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-arm64-msvc/-/satteri-win32-arm64-msvc-0.9.3.tgz", - "integrity": "sha512-VnwjBHiAra/PNNEza8eSZdQiG4A3PtTJJwUDtOPAc6iTs0BWZwZX8+OPUZE7//yQCBhgvEMcI8vpwsAwCb6qGQ==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-arm64-msvc/-/satteri-win32-arm64-msvc-0.9.4.tgz", + "integrity": "sha512-E1ZPQbgCtFKiU7pFYVndynvY7ne4coeVDUgnVThErSFlJ2ceQCBZrfRTD1lzrIDy63Bbqo+g/cZY9duw+JYjIw==", "cpu": [ "arm64" ], @@ -815,9 +815,9 @@ ] }, "node_modules/@bruits/satteri-win32-x64-msvc": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-x64-msvc/-/satteri-win32-x64-msvc-0.9.3.tgz", - "integrity": "sha512-Dsoe4reWe69MyILmMwU6iISIceTW7YIFqbyym7haf9DhUvqkYfMAyp7GMM21JzV0SpG9A2BwzFVP7iq9mmxrpA==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/@bruits/satteri-win32-x64-msvc/-/satteri-win32-x64-msvc-0.9.4.tgz", + "integrity": "sha512-5I7SiarsNdAUuhJb50CXJPTwr/ECVrBoU+fymoLjChK5fW//+srhY4lstcNTzgFRtQSYfVtm4OQZz16CVMeTeA==", "cpu": [ "x64" ], @@ -3807,14 +3807,14 @@ } }, "node_modules/astro": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/astro/-/astro-7.0.5.tgz", - "integrity": "sha512-KR/zBBgU6I+F5vDoTsuTbXbBmI565CToDOgPr0pPiL2Hgrvx4CV8Cg2wtT6VqqyOS7BIfBkdagKD+40SojGl7w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/astro/-/astro-7.0.6.tgz", + "integrity": "sha512-Myw0sFia+zs/Y0yqfZEsUYXfDPh3ELcLf1f0Q/qQzVXBh/af1qO62WNT+P89DCcfGVV51nMoQhEfkBYqJmoUOQ==", "license": "MIT", "dependencies": { "@astrojs/compiler-rs": "^0.3.0", - "@astrojs/internal-helpers": "0.10.0", - "@astrojs/markdown-satteri": "0.3.2", + "@astrojs/internal-helpers": "0.10.1", + "@astrojs/markdown-satteri": "0.3.3", "@astrojs/telemetry": "3.3.2", "@capsizecss/unpack": "^4.0.0", "@clack/prompts": "^1.1.0", @@ -3882,7 +3882,7 @@ "sharp": "^0.34.0 || ^0.35.0" }, "peerDependencies": { - "@astrojs/markdown-remark": "7.2.0" + "@astrojs/markdown-remark": "7.2.1" }, "peerDependenciesMeta": { "@astrojs/markdown-remark": { @@ -3891,9 +3891,9 @@ } }, "node_modules/astro-pagefind": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astro-pagefind/-/astro-pagefind-2.0.0.tgz", - "integrity": "sha512-i270YlJ/8aX/eRkvtuAPANSk+WK1uyp9DEj/TuuWem4pA0xBUGQk7agNFdu71nRxtH0j7TZxee2qwQRlrfZa1g==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/astro-pagefind/-/astro-pagefind-2.0.1.tgz", + "integrity": "sha512-zhMTctuVuKrYH1C0Xl+p8mhexEuxVrqfT8paQOAbKZFtgUIWAMtR2nCeU11ti4Rfeit16LhiCxZFwjOqYoiaNQ==", "license": "MIT", "dependencies": { "@pagefind/component-ui": "^1.5.0", @@ -3901,7 +3901,7 @@ "sirv": "^3.0.0" }, "peerDependencies": { - "astro": "^2.0.4 || ^3 || ^4 || ^5 || ^6" + "astro": "^2.0.4 || ^3 || ^4 || ^5 || ^6 || ^7" } }, "node_modules/astro/node_modules/get-tsconfig": { @@ -7775,9 +7775,9 @@ } }, "node_modules/satteri": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/satteri/-/satteri-0.9.3.tgz", - "integrity": "sha512-2XfBh89LCnBMFkNOeVKkBLelAZcIA17VLHsgJum1tJ2fXiPZDN/TDXv4ku46rFOQXYd41LJ0kiZh5gPqExcCsg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/satteri/-/satteri-0.9.4.tgz", + "integrity": "sha512-BKob126Tay84diOZsnVNH/Q/c+3njPJTCad3w5zLKa6j8bVjxskPNHDtxrMwYK4bN/RlqUSdMnPwKY4k65EMOQ==", "dependencies": { "@types/estree-jsx": "^1.0.5", "@types/hast": "^3.0.4", @@ -7785,15 +7785,15 @@ "@types/unist": "^3.0.3" }, "optionalDependencies": { - "@bruits/satteri-darwin-arm64": "0.9.3", - "@bruits/satteri-darwin-x64": "0.9.3", - "@bruits/satteri-linux-arm64-gnu": "0.9.3", - "@bruits/satteri-linux-arm64-musl": "0.9.3", - "@bruits/satteri-linux-x64-gnu": "0.9.3", - "@bruits/satteri-linux-x64-musl": "0.9.3", - "@bruits/satteri-wasm32-wasi": "0.9.3", - "@bruits/satteri-win32-arm64-msvc": "0.9.3", - "@bruits/satteri-win32-x64-msvc": "0.9.3" + "@bruits/satteri-darwin-arm64": "0.9.4", + "@bruits/satteri-darwin-x64": "0.9.4", + "@bruits/satteri-linux-arm64-gnu": "0.9.4", + "@bruits/satteri-linux-arm64-musl": "0.9.4", + "@bruits/satteri-linux-x64-gnu": "0.9.4", + "@bruits/satteri-linux-x64-musl": "0.9.4", + "@bruits/satteri-wasm32-wasi": "0.9.4", + "@bruits/satteri-win32-arm64-msvc": "0.9.4", + "@bruits/satteri-win32-x64-msvc": "0.9.4" } }, "node_modules/sax": { diff --git a/package.json b/package.json index 2694101cf9..52fb125a36 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,11 @@ "validate:driver": "node scripts/validate-driver.mjs" }, "dependencies": { - "@astrojs/mdx": "^7.0.1", + "@astrojs/mdx": "^7.0.2", "@astrojs/sitemap": "^3.7.3", "@astrojs/svelte": "^9.0.1", - "astro": "^7.0.5", - "astro-pagefind": "^2.0.0", + "astro": "^7.0.6", + "astro-pagefind": "^2.0.1", "echarts": "^6.1.0", "svelte": "^5.56.4" }, diff --git a/playwright.config.ts b/playwright.config.ts index 299c75de5d..4ae6af3338 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,8 +1,8 @@ import { defineConfig, devices } from "@playwright/test"; // Runs against a production build+preview, not `astro dev` (Pagefind search is -// only available in the built output). No SITE_BASE/SITE_AUTH_HASHES set, so the -// build is root-based and ungated, matching local dev defaults. +// only available in the built output). No SITE_BASE set, so the build is +// root-based, matching local dev defaults. export default defineConfig({ testDir: "./e2e", fullyParallel: true, diff --git a/src/components/Layout.astro b/src/components/Layout.astro index 635a77fab4..cff6754a05 100644 --- a/src/components/Layout.astro +++ b/src/components/Layout.astro @@ -3,7 +3,6 @@ import { getRelativeLocaleUrl } from "astro:i18n"; import { ClientRouter } from "astro:transitions"; import Search from "astro-pagefind/components/Search.astro"; import { DEFAULT_LOCALE, LOCALES, useTranslations } from "../i18n"; -import { AUTH_ENABLED, AUTH_HASHES } from "../lib/auth"; import { BASE } from "../lib/site"; import "../styles/global.css"; @@ -70,45 +69,6 @@ function navHref(path: string) { - {AUTH_ENABLED && AUTH_HASHES.length > 0 && ( - - )} - {AUTH_ENABLED && AUTH_HASHES.length > 0 && ( - - )}
diff --git a/src/lib/auth.ts b/src/lib/auth.ts deleted file mode 100644 index d0fa53bdf7..0000000000 --- a/src/lib/auth.ts +++ /dev/null @@ -1,12 +0,0 @@ -// Set to false to disable the password gate (e.g. when the site goes public). -export const AUTH_ENABLED = true; - -// SHA-256 hex digests injected at build time from the SITE_AUTH_HASHES env var. -// That variable is computed in CI from the SITE_AUTH_PASSWORDS secret — plaintext -// passwords never appear in the codebase. -// For local dev: set SITE_AUTH_HASHES in a .env file, or leave empty (no gate shown). -const raw = import.meta.env.SITE_AUTH_HASHES ?? ""; -export const AUTH_HASHES: string[] = raw - .split(",") - .map((h: string) => h.trim()) - .filter(Boolean);