diff --git a/.env.example b/.env.example index 14e5e4b..4084f81 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,15 @@ -DATABASE_URL +APP_NAME= +WORKER_NAME= +WORKER_DOMAIN= +DATABASE_NAME= +DATABASE_ID= + +CLOUDFLARE_ACCOUNT_ID= +CLOUDFLARE_API_TOKEN= +PORT= +OBSERVABILITY_ENABLED= +COMPATIBILITY_DATE= +COMPATIBILITY_FLAGS= + GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= -PORT= diff --git a/.github/composite-actions/install/action.yml b/.github/composite-actions/install/action.yml index b60e3d8..caf420e 100644 --- a/.github/composite-actions/install/action.yml +++ b/.github/composite-actions/install/action.yml @@ -1,5 +1,5 @@ name: "Install" -description: "Sets up Node.js and runs install" +description: "Set up Vite+ and install locked dependencies" runs: using: composite @@ -8,6 +8,11 @@ runs: with: bun-version: latest + - uses: voidzero-dev/setup-vp@v1.21.2 + with: + node-version: "24" + run-install: false + - name: Setup Git User shell: bash run: | @@ -16,4 +21,4 @@ runs: - name: Install Dependencies shell: bash - run: bun install + run: vp install --frozen-lockfile diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 56ba1b6..bcc0160 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -20,7 +20,7 @@ jobs: uses: ./.github/composite-actions/install - name: Run lint - run: bun run lint + run: vp run lint format-check: name: Format Check @@ -32,8 +32,33 @@ jobs: - name: Install uses: ./.github/composite-actions/install - - name: Run lint - run: bun run format:check + - name: Check format + run: vp run format:check + + test: + name: D1 and Worker Tests + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v4 + + - name: Install + uses: ./.github/composite-actions/install + + - name: Check migrations + run: vp run db:check + + - name: Run tests + run: + vp test --reporter=default --reporter=json + --outputFile=/tmp/yopem-auth-tests.json + + - name: Save test report + if: always() + uses: actions/upload-artifact@v4 + with: + name: yopem-auth-tests + path: /tmp/yopem-auth-tests.json typecheck: name: Type Check @@ -46,4 +71,4 @@ jobs: uses: ./.github/composite-actions/install - name: Run typecheck - run: bun run typecheck + run: vp run typecheck diff --git a/.gitignore b/.gitignore index 1bccc2b..78e35d7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,20 +11,17 @@ node_modules .env.development.local .env.test.local .env.production.local -.dev.vars # Testing coverage -# Cloudflare -.wrangler -wrangler.jsonc +# Alchemy +.alchemy # Build Outputs out/ build dist -start # Debug npm-debug.log* diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..a45fd52 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +24 diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 77c5642..0000000 --- a/.prettierignore +++ /dev/null @@ -1,39 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# Dependencies -node_modules -.pnp -.pnp.js - -# Local env files -.env -.env.local -.env.development.local -.env.test.local -.env.production.local -.dev.vars - -# Testing -coverage - -# Cloudflare -.wrangler -wrangler.jsonc -worker-configuration.d.ts - -# Build Outputs -out/ -build -dist -migrations/ -start - -# Debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Misc -.DS_Store -*.pem -tsconfig.tsbuildinfo diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..1129fcd --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,39 @@ + + +# Using Vite+, the Unified Toolchain for the Web + +This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, +Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, +package management, and frontend tooling in a single global CLI called `vp`. +Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and +`vp build`. Run `vp help` to print a list of commands and `vp --help` +for information about a specific command. + +Docs are local at `node_modules/vite-plus/docs` or online at +https://viteplus.dev/guide/. + +## Built-in Commands vs Scripts + +`vp ` runs a built-in command. `vp run ` runs a `package.json` +script or a `vite.config.ts` task. Scripts cannot overwrite built-ins, so +`vp dev` and `vp run dev` may do different things. Check `package.json` and +`vite.config.ts` first, and run `vp run ` when the project defines a +script or task with that name. + +## Tool Versions + +Run `vp toolchain` to show versions and relationships in the active Vite+ +release. Add a tool name to select part of the graph. For example, run +`vp toolchain vite`. Use `--global` to ignore the local `vite-plus` package. Use +`vp why ` to show the package-manager dependency graph. + +## Review Checklist + +- [ ] Run `vp install` after pulling remote changes and before getting started. +- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes. +- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts + necessary for validation, run via `vp run