diff --git a/.changeset/config.json b/.changeset/config.json index 58e5f01c7d97..fc418611aeac 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -4,7 +4,7 @@ "commit": false, "linked": [], "access": "public", - "baseBranch": "master", + "baseBranch": "main", "bumpVersionsWithWorkspaceProtocolOnly": true, - "ignore": ["!(@sveltejs/*|create-svelte|svelte-migrate)"] + "ignore": ["!(@sveltejs/*|create-svelte)"] } diff --git a/.changeset/moody-baboons-drum.md b/.changeset/moody-baboons-drum.md new file mode 100644 index 000000000000..b224830500b6 --- /dev/null +++ b/.changeset/moody-baboons-drum.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/adapter-cloudflare': patch +--- + +fix: deprecate `platform.context` in favor of `platform.ctx` to align with Cloudflare's naming convention diff --git a/.changeset/spotty-ideas-clap.md b/.changeset/spotty-ideas-clap.md new file mode 100644 index 000000000000..38b3f28cd9c8 --- /dev/null +++ b/.changeset/spotty-ideas-clap.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/adapter-node': patch +--- + +fix: remove unnecessary static directory serving middleware diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 9501511a710b..000000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "root": true, - "extends": "@sveltejs", - "env": { - "es2022": true - }, - "ignorePatterns": [ - "packages/create-svelte/shared/", - "packages/kit/test/prerendering/*/build", - "packages/adapter-static/test/apps/*/build", - "packages/adapter-cloudflare/files", - "packages/adapter-netlify/files", - "packages/adapter-node/files" - ], - "rules": { - "no-undef": "off" - } -} diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b077e088fb94..3eaabfa5d71e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,7 @@ + + +--- + ### Please don't delete this checklist! Before submitting the PR, please make sure you do the following: - [ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs - [ ] This message body should clearly illustrate what problems it solves. @@ -8,3 +12,7 @@ ### Changesets - [ ] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running `pnpm changeset` and following the prompts. Changesets that add features should be `minor` and those that fix bugs should be `patch`. Please prefix changeset messages with `feat:`, `fix:`, or `chore:`. + +### Edits + +- [ ] Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed. diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 049ebc7508c9..121456fc6de4 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -13,13 +13,15 @@ permissions: jobs: Audit: + # prevents this action from running on forks + if: github.repository == 'sveltejs/kit' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2.4.0 - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4.1.0 + - uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: '22.x' cache: pnpm - run: pnpm install --frozen-lockfile # check prod dependencies as these would affect users diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c6bd814714b..515930f7a528 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: push: branches: - - master + - main pull_request: env: @@ -19,87 +19,102 @@ permissions: contents: read # to fetch code (actions/checkout) jobs: - Lint: + pkg-pr-new: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2.4.0 - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4.1.0 + - uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: 22 + cache: pnpm + - run: pnpm install --frozen-lockfile + - run: pnpm build + - run: pnpx pkg-pr-new publish --comment=off ./packages/* + lint-all: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4.1.0 + - uses: actions/setup-node@v4 + with: + node-version: 22 cache: pnpm - run: pnpm install --frozen-lockfile - run: pnpm run lint - - run: cd packages/kit && pnpm prepublishOnly + - run: cd packages/kit && pnpm prepublishOnly && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please run prepublishOnly locally and commit the changes after you have reviewed them"; git diff; exit 1); } - run: pnpm run check - Tests: + test-kit: runs-on: ${{ matrix.os }} timeout-minutes: 30 strategy: fail-fast: false matrix: include: - - node-version: 16 - os: ubuntu-latest - e2e-browser: 'chromium' - node-version: 18 os: ubuntu-latest e2e-browser: 'chromium' - node-version: 20 os: ubuntu-latest e2e-browser: 'chromium' + - node-version: 22 + os: ubuntu-latest + e2e-browser: 'chromium' env: KIT_E2E_BROWSER: ${{matrix.e2e-browser}} steps: - run: git config --global core.autocrlf false - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2.4.0 - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4.1.0 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: pnpm - run: pnpm install --frozen-lockfile - run: pnpm playwright install ${{ matrix.e2e-browser }} - - run: pnpm test + - run: pnpm run sync-all + - run: pnpm test:kit + - name: Print flaky test report + run: node scripts/print-flaky-test-report.js - name: Archive test results if: failure() shell: bash run: find packages -type d -name test-results -not -empty | tar -czf test-results.tar.gz --files-from=- - name: Upload test results if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: retention-days: 3 name: test-failure-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }} path: test-results.tar.gz - Cross-browser-test: + test-kit-cross-browser: runs-on: ${{ matrix.os }} timeout-minutes: 30 strategy: fail-fast: false matrix: include: - - node-version: 16 - os: windows-2019 # slowness reported on newer versions https://github.com/actions/runner-images/issues/5166 + - node-version: 18 + os: windows-latest e2e-browser: 'chromium' mode: 'dev' - - node-version: 16 + - node-version: 18 os: ubuntu-latest e2e-browser: 'firefox' mode: 'dev' - - node-version: 16 + - node-version: 18 os: macOS-latest e2e-browser: 'webkit' mode: 'dev' - - node-version: 16 - os: windows-2019 # slowness reported on newer versions https://github.com/actions/runner-images/issues/5166 + - node-version: 18 + os: windows-latest e2e-browser: 'chromium' mode: 'build' - - node-version: 16 + - node-version: 18 os: ubuntu-latest e2e-browser: 'firefox' mode: 'build' - - node-version: 16 + - node-version: 18 os: macOS-latest e2e-browser: 'webkit' mode: 'build' @@ -108,34 +123,72 @@ jobs: steps: - run: git config --global core.autocrlf false - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2.4.0 - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4.1.0 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: pnpm - run: pnpm install --frozen-lockfile - run: pnpm playwright install ${{ matrix.e2e-browser }} + - run: pnpm run sync-all - run: pnpm test:cross-platform:${{ matrix.mode }} + - name: Print flaky test report + run: node scripts/print-flaky-test-report.js - name: Archive test results if: failure() shell: bash run: find packages -type d -name test-results -not -empty | tar -czf test-results-cross-platform-${{ matrix.mode }}.tar.gz --files-from=- - name: Upload test results if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: retention-days: 3 name: test-failure-cross-platform-${{ matrix.mode }}-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }} path: test-results-cross-platform-${{ matrix.mode }}.tar.gz - Test-create-svelte: + test-kit-server-side-route-resolution: + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + include: + - mode: 'dev' + - mode: 'build' + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4.1.0 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + - run: pnpm install --frozen-lockfile + - run: pnpm playwright install chromium + - run: pnpm run sync-all + - run: pnpm test:server-side-route-resolution:${{ matrix.mode }} + - name: Print flaky test report + run: node scripts/print-flaky-test-report.js + - name: Archive test results + if: failure() + shell: bash + run: find packages -type d -name test-results -not -empty | tar -czf test-results-server-side-route-resolution-${{ matrix.mode }}.tar.gz --files-from=- + - name: Upload test results + if: failure() + uses: actions/upload-artifact@v4 + with: + retention-days: 3 + name: test-failure-server-side-route-resolution-${{ matrix.mode }}-${{ github.run_id }} + path: test-results-server-side-route-resolution-${{ matrix.mode }}.tar.gz + test-others: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2.4.0 - - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4.1.0 + - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 cache: pnpm - run: pnpm install --frozen-lockfile + - run: pnpm playwright install chromium - run: cd packages/kit && pnpm prepublishOnly - - run: pnpm run test:create-svelte + - run: pnpm run test:others diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c8960ce40a9..9349b5099432 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release on: push: branches: - - master + - main permissions: {} jobs: @@ -12,6 +12,7 @@ jobs: if: github.repository == 'sveltejs/kit' permissions: contents: write # to create release (changesets/action) + id-token: write # OpenID Connect token needed for provenance pull-requests: write # to create pull request (changesets/action) name: Release runs-on: ubuntu-latest @@ -21,11 +22,11 @@ jobs: with: # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits fetch-depth: 0 - - uses: pnpm/action-setup@v2.4.0 + - uses: pnpm/action-setup@v4.1.0 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 22.x cache: pnpm - run: pnpm install --frozen-lockfile @@ -39,8 +40,8 @@ jobs: version: pnpm changeset:version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_CONFIG_PROVENANCE: true NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - UPDATE_TEMPLATE_SSH_KEY: ${{ secrets.UPDATE_TEMPLATE_SSH_KEY }} # TODO alert discord # - name: Send a Slack notification if a publish happens diff --git a/.npmrc b/.npmrc index d7445a115f87..3d5d238fe463 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1 @@ link-workspace-packages = true -engine-strict = true diff --git a/.prettierrc b/.prettierrc index 72264f51e616..fc699c71d960 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,6 +3,7 @@ "singleQuote": true, "trailingComma": "none", "printWidth": 100, + "plugins": ["prettier-plugin-svelte"], "overrides": [ { "files": ["*.svelte"], @@ -20,16 +21,21 @@ { "files": [ "**/CHANGELOG.md", + "**/vite.config.js.timestamp-*", "**/.svelte-kit/**", + "**/.custom-out-dir/**", + "**/build/**", + "**/test-results/**", + "**/.wrangler/**", "documentation/**/*.md", "packages/package/test/fixtures/**/expected/**/*", "packages/package/test/watch/expected/**/*", "packages/package/test/watch/package/**/*", "packages/kit/src/core/postbuild/fixtures/**/*", - "packages/migrate/migrations/routes/*/samples.md" + "packages/adapter-cloudflare/test/apps/workers/dist/**/*" ], "options": { - "requirePragma": true + "rangeEnd": 0 } } ] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5fc83158606b..df548cfa14bc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,34 +22,42 @@ pnpm install You can use the playground at [`playgrounds/basic`](./playgrounds/basic/) to experiment with your changes to SvelteKit locally. -### Linking +### Linking local changes If you want to test against an existing project, you can use [pnpm `overrides`](https://pnpm.io/package_json#pnpmoverrides) in that project: ```jsonc { - // ... - "pnpm": { - "overrides": { - "@sveltejs/kit": "link:../path/to/svelte-kit/packages/kit", - // additionally/optional the adapter you're using - "@sveltejs/adapter-auto": "link:../path/to/svelte-kit/packages/adapter-auto" - } - } + // ... + "pnpm": { + "overrides": { + "@sveltejs/kit": "link:../path/to/svelte-kit/packages/kit", + // additionally/optional the adapter you're using + "@sveltejs/adapter-auto": "link:../path/to/svelte-kit/packages/adapter-auto" + } + } } ``` +### Testing PR changes + +Each pull request will be built and published via [pkg.pr.new/](https://pkg.pr.new/). You can test the change by installing the package with your PR number: + +``` +npm add https://pkg.pr.new/sveltejs/kit/@sveltejs/kit@YOUR_PR_NUMBER_GOES_HERE +``` + ## Code structure Entry points to be aware of are: -- [`packages/create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte) - code that's run when you create a new project with `npm create svelte@latest` -- [`packages/package`](https://github.com/sveltejs/kit/tree/master/packages/package) - for the `svelte-package` command -- [`packages/kit/src/core`](https://github.com/sveltejs/kit/tree/master/packages/kit/src/core) - code that's called at dev/build-time -- [`packages/kit/src/core/sync`](https://github.com/sveltejs/kit/tree/master/packages/kit/src/core/sync) - for `svelte-kit sync`, which regenerates routing info and type definitions -- [`packages/kit/src/runtime`](https://github.com/sveltejs/kit/tree/master/packages/kit/src/runtime) - code that's called at runtime -- [`packages/kit/src/exports/vite`](https://github.com/sveltejs/kit/tree/master/packages/kit/src/exports/vite) - for all the Vite plugin related stuff -- [`packages/adapter-[platform]`](https://github.com/sveltejs/kit/tree/master/packages) - for the various SvelteKit-provided adapters +- [`packages/create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte) - code that's run when you create a new project with `npx sv create` +- [`packages/package`](https://github.com/sveltejs/kit/tree/main/packages/package) - for the `svelte-package` command +- [`packages/kit/src/core`](https://github.com/sveltejs/kit/tree/main/packages/kit/src/core) - code that's called at dev/build-time +- [`packages/kit/src/core/sync`](https://github.com/sveltejs/kit/tree/main/packages/kit/src/core/sync) - for `svelte-kit sync`, which regenerates routing info and type definitions +- [`packages/kit/src/runtime`](https://github.com/sveltejs/kit/tree/main/packages/kit/src/runtime) - code that's called at runtime +- [`packages/kit/src/exports/vite`](https://github.com/sveltejs/kit/tree/main/packages/kit/src/exports/vite) - for all the Vite plugin related stuff +- [`packages/adapter-[platform]`](https://github.com/sveltejs/kit/tree/main/packages) - for the various SvelteKit-provided adapters ## Good first issues @@ -87,21 +95,21 @@ If you would like to test local changes to Vite or another dependency, you can b ```jsonc { - // ... - "dependencies": { - "vite": "^4.0.0" - }, - "pnpm": { - "overrides": { - "vite": "link:../path/to/vite/packages/vite" - } - } + // ... + "dependencies": { + "vite": "^4.0.0" + }, + "pnpm": { + "overrides": { + "vite": "link:../path/to/vite/packages/vite" + } + } } ``` ## Documentation changes -All documentation for SvelteKit is in the [`documentation` directory](https://github.com/sveltejs/kit/tree/master/documentation), and any improvements should be made as a Pull Request to this repository. The site itself is located in the [`sites/kit.svelte.dev` directory](https://github.com/sveltejs/kit/tree/master/sites/kit.svelte.dev) and can be run locally to preview changes. +All documentation for SvelteKit is in the [`documentation` directory](https://github.com/sveltejs/kit/tree/main/documentation), and any improvements should be made as a Pull Request to this repository. The site itself is located in the [`sveltejs/svelte.dev` repo](https://github.com/sveltejs/svelte.dev) and can be run locally to preview changes. ## Sending PRs @@ -124,6 +132,10 @@ git config core.hookspath .githooks For changes to be reflected in package changelogs, run `pnpm changeset` and follow the prompts. +### Type changes + +If your PR changes the generated types of SvelteKit, run `pnpm generate:types` inside `packages/kit` and commit the new output (don't format it with Prettier!). Review the changes carefully to ensure there are no unwanted changes. If you don't commit type changes, CI will fail. + ## Releases The [Changesets GitHub action](https://github.com/changesets/action#with-publishing) will create and update a PR that applies changesets and publishes new versions of changed packages to npm. diff --git a/FUNDING.json b/FUNDING.json new file mode 100644 index 000000000000..7ed51db691e6 --- /dev/null +++ b/FUNDING.json @@ -0,0 +1,7 @@ +{ + "drips": { + "ethereum": { + "ownedBy": "0xCE08E02c37d90d75C2bf7D9e55f7606C8DB80E70" + } + } +} diff --git a/README.md b/README.md index 65ff09b6b9b1..23b1395bd036 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # SvelteKit -Web development, streamlined. Read the [documentation](https://kit.svelte.dev/docs) to get started. +Web development, streamlined. Read the [documentation](https://svelte.dev/docs/kit) to get started. ### Packages @@ -11,17 +11,16 @@ Web development, streamlined. Read the [documentation](https://kit.svelte.dev/do | [@sveltejs/kit](packages/kit) | [Changelog](packages/kit/CHANGELOG.md) | | [@sveltejs/adapter-auto](packages/adapter-auto) | [Changelog](packages/adapter-auto/CHANGELOG.md) | | [@sveltejs/adapter-cloudflare](packages/adapter-cloudflare) | [Changelog](packages/adapter-cloudflare/CHANGELOG.md) | -| [@sveltejs/adapter-cloudflare-workers](packages/adapter-cloudflare-workers) | [Changelog](packages/adapter-cloudflare-workers/CHANGELOG.md) | | [@sveltejs/adapter-netlify](packages/adapter-netlify) | [Changelog](packages/adapter-netlify/CHANGELOG.md) | | [@sveltejs/adapter-node](packages/adapter-node) | [Changelog](packages/adapter-node/CHANGELOG.md) | | [@sveltejs/adapter-static](packages/adapter-static) | [Changelog](packages/adapter-static/CHANGELOG.md) | | [@sveltejs/adapter-vercel](packages/adapter-vercel) | [Changelog](packages/adapter-vercel/CHANGELOG.md) | | [@sveltejs/amp](packages/amp) | [Changelog](packages/amp/CHANGELOG.md) | +| [@sveltejs/enhanced-img](packages/enhanced-img) | [Changelog](packages/enhanced-img/CHANGELOG.md) | | [@sveltejs/package](packages/package) | [Changelog](packages/package/CHANGELOG.md) | | [create-svelte](packages/create-svelte) | [Changelog](packages/create-svelte/CHANGELOG.md) | -| [svelte-migrate](packages/migrate) | [Changelog](packages/migrate/CHANGELOG.md) | -[Additional adapters](<(https://sveltesociety.dev/components#adapters)>) are maintained by the community. +[Additional adapters](https://sveltesociety.dev/packages?category=sveltekit-adapters) are maintained by the community. ## Bug reporting @@ -43,4 +42,4 @@ Funds donated via Open Collective will be used for compensating expenses related ## License -[MIT](https://github.com/sveltejs/kit/blob/master/LICENSE) +[MIT](https://github.com/sveltejs/kit/blob/main/LICENSE) diff --git a/documentation/docs/10-getting-started/10-introduction.md b/documentation/docs/10-getting-started/10-introduction.md index 189fcb3bcc7d..dd093ff5abea 100644 --- a/documentation/docs/10-getting-started/10-introduction.md +++ b/documentation/docs/10-getting-started/10-introduction.md @@ -4,24 +4,24 @@ title: Introduction ## Before we begin -> If you're new to Svelte or SvelteKit we recommend checking out the [interactive tutorial](https://learn.svelte.dev). +> [!NOTE] If you're new to Svelte or SvelteKit we recommend checking out the [interactive tutorial](/tutorial/kit). > -> If you get stuck, reach out for help in the [Discord chatroom](https://svelte.dev/chat). +> If you get stuck, reach out for help in the [Discord chatroom](/chat). ## What is SvelteKit? -SvelteKit is a framework for rapidly developing robust, performant web applications using [Svelte](https://svelte.dev/). If you're coming from React, SvelteKit is similar to Next. If you're coming from Vue, SvelteKit is similar to Nuxt. +SvelteKit is a framework for rapidly developing robust, performant web applications using [Svelte](../svelte). If you're coming from React, SvelteKit is similar to Next. If you're coming from Vue, SvelteKit is similar to Nuxt. -To learn more about the kinds of applications you can build with SvelteKit, see the [FAQ](/docs/faq#what-can-i-make-with-sveltekit). +To learn more about the kinds of applications you can build with SvelteKit, see the [documentation regarding project types](project-types). ## What is Svelte? -In short, Svelte is a way of writing user interface components — like a navigation bar, comment section, or contact form — that users see and interact with in their browsers. The Svelte compiler converts your components to JavaScript that can be run to render the HTML for the page and to CSS that styles the page. You don't need to know Svelte to understand the rest of this guide, but it will help. If you'd like to learn more, check out [the Svelte tutorial](https://svelte.dev/tutorial). +In short, Svelte is a way of writing user interface components — like a navigation bar, comment section, or contact form — that users see and interact with in their browsers. The Svelte compiler converts your components to JavaScript that can be run to render the HTML for the page and to CSS that styles the page. You don't need to know Svelte to understand the rest of this guide, but it will help. If you'd like to learn more, check out [the Svelte tutorial](/tutorial). ## SvelteKit vs Svelte Svelte renders UI components. You can compose these components and render an entire page with just Svelte, but you need more than just Svelte to write an entire app. -SvelteKit helps you build web apps while following modern best practices and providing solutions to common development challenges. It offers everything from basic functionalities — like a [router](glossary#routing) that updates your UI when a link is clicked — to more advanced capabilities. Its extensive list of features includes [build optimizations](https://vitejs.dev/guide/features.html#build-optimizations) to load only the minimal required code; [offline support](service-workers); [preloading](link-options#data-sveltekit-preload-data) pages before user navigation; [configurable rendering](page-options) to handle different parts of your app on the server via [SSR](glossary#ssr), in the browser through [client-side rendering](glossary#csr), or at build-time with [prerendering](glossary#prerendering); and much more. Building an app with all the modern best practices is fiendishly complicated, but SvelteKit does all the boring stuff for you so that you can get on with the creative part. +SvelteKit helps you build web apps while following modern best practices and providing solutions to common development challenges. It offers everything from basic functionalities — like a [router](glossary#Routing) that updates your UI when a link is clicked — to more advanced capabilities. Its extensive list of features includes [build optimizations](https://vitejs.dev/guide/features.html#build-optimizations) to load only the minimal required code; [offline support](service-workers); [preloading](link-options#data-sveltekit-preload-data) pages before user navigation; [configurable rendering](page-options) to handle different parts of your app on the server via [SSR](glossary#SSR), in the browser through [client-side rendering](glossary#CSR), or at build-time with [prerendering](glossary#Prerendering); [image optimization](images); and much more. Building an app with all the modern best practices is fiendishly complicated, but SvelteKit does all the boring stuff for you so that you can get on with the creative part. It reflects changes to your code in the browser instantly to provide a lightning-fast and feature-rich development experience by leveraging [Vite](https://vitejs.dev/) with a [Svelte plugin](https://github.com/sveltejs/vite-plugin-svelte) to do [Hot Module Replacement (HMR)](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#hot). diff --git a/documentation/docs/10-getting-started/20-creating-a-project.md b/documentation/docs/10-getting-started/20-creating-a-project.md index a65814e9a50f..4219449d1f1a 100644 --- a/documentation/docs/10-getting-started/20-creating-a-project.md +++ b/documentation/docs/10-getting-started/20-creating-a-project.md @@ -2,10 +2,10 @@ title: Creating a project --- -The easiest way to start building a SvelteKit app is to run `npm create`: +The easiest way to start building a SvelteKit app is to run `npx sv create`: ```bash -npm create svelte@latest my-app +npx sv create my-app cd my-app npm install npm run dev @@ -15,11 +15,11 @@ The first command will scaffold a new project in the `my-app` directory asking y There are two basic concepts: -- Each page of your app is a [Svelte](https://svelte.dev) component +- Each page of your app is a [Svelte](../svelte) component - You create pages by adding files to the `src/routes` directory of your project. These will be server-rendered so that a user's first visit to your app is as fast as possible, then a client-side app takes over Try editing the files to get a feel for how everything works. ## Editor setup -We recommend using [Visual Studio Code (aka VS Code)](https://code.visualstudio.com/download) with [the Svelte extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode), but [support also exists for numerous other editors](https://sveltesociety.dev/tools#editor-support). +We recommend using [Visual Studio Code (aka VS Code)](https://code.visualstudio.com/download) with [the Svelte extension](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode), but [support also exists for numerous other editors](https://sveltesociety.dev/resources#editor-support). diff --git a/documentation/docs/10-getting-started/25-project-types.md b/documentation/docs/10-getting-started/25-project-types.md new file mode 100644 index 000000000000..51a32deae4a8 --- /dev/null +++ b/documentation/docs/10-getting-started/25-project-types.md @@ -0,0 +1,69 @@ +--- +title: Project types +--- + +SvelteKit offers configurable rendering, which allows you to build and deploy your project in several different ways. You can build all of the below types of applications and more with SvelteKit. Rendering settings are not mutually exclusive and you may choose the optimal manner with which to render different parts of your application. + +If you don't have a particular way you'd like to build your application in mind, don't worry! The way your application is built, deployed, and rendered is controlled by which adapter you've chosen and a small amount of configuration and these can always be changed later. The [project structure](project-structure) and [routing](glossary#Routing) will be the same regardless of the project type that you choose. + +## Default rendering + +By default, when a user visits a site, SvelteKit will render the first page with [server-side rendering (SSR)](glossary#SSR) and subsequent pages with [client-side rendering (CSR)](glossary#CSR). Using SSR for the initial render improves SEO and perceived performance of the initial page load. Client-side rendering then takes over and updates the page without having to rerender common components, which is typically faster and eliminates a flash when navigating between pages. Apps built with this hybrid rendering approach have also been called [transitional apps](https://www.youtube.com/watch?v=860d8usGC0o). + +## Static site generation + +You can use SvelteKit as a [static site generator (SSG)](glossary#SSG) that fully [prerenders](glossary#Prerendering) your site with static rendering using [`adapter-static`](adapter-static). You may also use [the prerender option](page-options#prerender) to prerender only some pages and then choose a different adapter with which to dynamically server-render other pages. + +Tools built solely to do static site generation may scale the prerendering process more efficiently during build when rendering a very large number of pages. When working with very large statically generated sites, you can avoid long build times with [Incremental Static Regeneration (ISR) if using `adapter-vercel`](adapter-vercel#Incremental-Static-Regeneration). And in contrast to purpose-built SSGs, SvelteKit allows for nicely mixing and matching different rendering types on different pages. + +## Single-page app + +[Single-page apps (SPAs)](glossary#SPA) exclusively use [client-side rendering (CSR)](glossary#CSR). You can [build single-page apps (SPAs)](single-page-apps) with SvelteKit. As with all types of SvelteKit applications, you can write your backend in SvelteKit or [another language or framework](#Separate-backend). If you are building an application with no backend or a [separate backend](#Separate-backend), you can simply skip over and ignore the parts of the docs talking about `server` files. + +## Multi-page app + +SvelteKit isn't typically used to build [traditional multi-page apps](glossary#MPA). However, in SvelteKit you can remove all JavaScript on a page with [`csr = false`](page-options#csr), which will render subsequent links on the server, or you can use [`data-sveltekit-reload`](link-options#data-sveltekit-reload) to render specific links on the server. + +## Separate backend + +If your backend is written in another language such as Go, Java, PHP, Ruby, Rust, or C#, there are a couple of ways that you can deploy your application. The most recommended way would be to deploy your SvelteKit frontend separately from your backend utilizing `adapter-node` or a serverless adapter. Some users prefer not to have a separate process to manage and decide to deploy their application as a [single-page app (SPA)](single-page-apps) served by their backend server, but note that single-page apps have worse SEO and performance characteristics. + +If you are using an external backend, you can simply skip over and ignore the parts of the docs talking about `server` files. You may also want to reference [the FAQ about how to make calls to a separate backend](faq#How-do-I-use-a-different-backend-API-server). + +## Serverless app + +SvelteKit apps are simple to run on serverless platforms. [The default zero config adapter](adapter-auto) will automatically run your app on a number of supported platforms or you can use [`adapter-vercel`](adapter-vercel), [`adapter-netlify`](adapter-netlify), or [`adapter-cloudflare`](adapter-cloudflare) to provide platform-specific configuration. And [community adapters](https://sveltesociety.dev/packages?category=sveltekit-adapters) allow you to deploy your application to almost any serverless environment. Some of these adapters such as [`adapter-vercel`](adapter-vercel) and [`adapter-netlify`](adapter-netlify) offer an `edge` option, to support [edge rendering](glossary#Edge) for improved latency. + +## Your own server + +You can deploy to your own server or VPS using [`adapter-node`](adapter-node). + +## Container + +You can use [`adapter-node`](adapter-node) to run a SvelteKit app within a container such as Docker or LXC. + +## Library + +You can create a library to be used by other Svelte apps with the [`@sveltejs/package`](packaging) add-on to SvelteKit by choosing the library option when running [`sv create`](/docs/cli/sv-create). + +## Offline app + +SvelteKit has full support for [service workers](service-workers) allowing you to build many types of applications such as offline apps and [progressive web apps](glossary#PWA). + +## Mobile app + +You can turn a [SvelteKit SPA](single-page-apps) into a mobile app with [Tauri](https://v2.tauri.app/start/frontend/sveltekit/) or [Capacitor](https://capacitorjs.com/solution/svelte). Mobile features like the camera, geolocation, and push notifications are available via plugins for both platforms. + +These mobile development platforms work by starting a local web server and then serving your application like a static host on your phone. You may find [`bundleStrategy: 'single'`](configuration#output) to be a helpful option to limit the number of requests made. E.g. at the time of writing, the Capacitor local server uses HTTP/1, which limits the number of concurrent connections. + +## Desktop app + +You can turn a [SvelteKit SPA](single-page-apps) into a desktop app with [Tauri](https://v2.tauri.app/start/frontend/sveltekit/), [Wails](https://wails.io/docs/guides/sveltekit/), or [Electron](https://www.electronjs.org/). + +## Browser extension + +You can build browser extensions using either [`adapter-static`](adapter-static) or [community adapters](https://sveltesociety.dev/packages?category=sveltekit-adapters) specifically tailored towards browser extensions. + +## Embedded device + +Because of its efficient rendering, Svelte can be run on low power devices. Embedded devices like microcontrollers and TVs may limit the number of concurrent connections. In order to reduce the number of concurrent requests, you may find [`bundleStrategy: 'single'`](configuration#output) to be a helpful option in this deployment configuration. diff --git a/documentation/docs/10-getting-started/30-project-structure.md b/documentation/docs/10-getting-started/30-project-structure.md index e9a63473b0d9..64bae0a695c1 100644 --- a/documentation/docs/10-getting-started/30-project-structure.md +++ b/documentation/docs/10-getting-started/30-project-structure.md @@ -4,7 +4,7 @@ title: Project structure A typical SvelteKit project looks like this: -```bash +```tree my-project/ ├ src/ │ ├ lib/ @@ -30,7 +30,7 @@ my-project/ └ vite.config.js ``` -You'll also find common files like `.gitignore` and `.npmrc` (and `.prettierrc` and `.eslintrc.cjs` and so on, if you chose those options when running `npm create svelte@latest`). +You'll also find common files like `.gitignore` and `.npmrc` (and `.prettierrc` and `eslint.config.js` and so on, if you chose those options when running `npx sv create`). ## Project files @@ -38,9 +38,9 @@ You'll also find common files like `.gitignore` and `.npmrc` (and `.prettierrc` The `src` directory contains the meat of your project. Everything except `src/routes` and `src/app.html` is optional. -- `lib` contains your library code (utilities and components), which can be imported via the [`$lib`](modules#$lib) alias, or packaged up for distribution using [`svelte-package`](packaging) +- `lib` contains your library code (utilities and components), which can be imported via the [`$lib`]($lib) alias, or packaged up for distribution using [`svelte-package`](packaging) - `server` contains your server-only library code. It can be imported by using the [`$lib/server`](server-only-modules) alias. SvelteKit will prevent you from importing these in client code. -- `params` contains any [param matchers](advanced-routing#matching) your app needs +- `params` contains any [param matchers](advanced-routing#Matching) your app needs - `routes` contains the [routes](routing) of your application. You can also colocate other components that are only used within a single route here - `app.html` is your page template — an HTML document containing the following placeholders: - `%sveltekit.head%` — `` and `

{data.title}

{@html data.content}
``` -> Note that SvelteKit uses `` elements to navigate between routes, rather than a framework-specific `` component. +> [!LEGACY] +> `PageProps` was added in 2.16.0. In earlier versions, you had to type the `data` property manually with `PageData` instead, see [$types](#\$types). +> +> In Svelte 4, you'd use `export let data` instead. ### +page.js @@ -61,7 +74,7 @@ export function load({ params }) { }; } - throw error(404, 'Not found'); + error(404, 'Not found'); } ``` @@ -77,7 +90,7 @@ You can find more information about these in [page options](page-options). ### +page.server.js -If your `load` function can only run on the server — for example, if it needs to fetch data from a database or you need to access private [environment variables](modules#$env-static-private) like API keys — then you can rename `+page.js` to `+page.server.js` and change the `PageLoad` type to `PageServerLoad`. +If your `load` function can only run on the server — for example, if it needs to fetch data from a database or you need to access private [environment variables]($env-static-private) like API keys — then you can rename `+page.js` to `+page.server.js` and change the `PageLoad` type to `PageServerLoad`. ```js /// file: src/routes/blog/[slug]/+page.server.js @@ -104,7 +117,7 @@ export async function load({ params }) { return post; } - throw error(404, 'Not found'); + error(404, 'Not found'); } ``` @@ -121,19 +134,22 @@ If an error occurs during `load`, SvelteKit will render a default error page. Yo ```svelte -

{$page.status}: {$page.error.message}

+

{page.status}: {page.error.message}

``` +> [!LEGACY] +> `$app/state` was added in SvelteKit 2.12. If you're using an earlier version or are using Svelte 4, use `$app/stores` instead. + SvelteKit will 'walk up the tree' looking for the closest error boundary — if the file above didn't exist it would try `src/routes/blog/+error.svelte` and then `src/routes/+error.svelte` before rendering the default error page. If _that_ fails (or if the error was thrown from the `load` function of the root `+layout`, which sits 'above' the root `+error`), SvelteKit will bail out and render a static fallback error page, which you can customise by creating a `src/error.html` file. If the error occurs inside a `load` function in `+layout(.server).js`, the closest error boundary in the tree is an `+error.svelte` file _above_ that layout (not next to it). If no route can be found (404), `src/routes/+error.svelte` (or the default error page, if that file does not exist) will be used. -> `+error.svelte` is _not_ used when an error occurs inside [`handle`](hooks#server-hooks-handle) or a [+server.js](#server) request handler. +> [!NOTE] `+error.svelte` is _not_ used when an error occurs inside [`handle`](hooks#Server-hooks-handle) or a [+server.js](#server) request handler. You can read more about error handling [here](errors). @@ -147,21 +163,29 @@ But in many apps, there are elements that should be visible on _every_ page, suc To create a layout that applies to every page, make a file called `src/routes/+layout.svelte`. The default layout (the one that SvelteKit uses if you don't bring your own) looks like this... -```html - +```svelte + + +{@render children()} ``` -...but we can add whatever markup, styles and behaviour we want. The only requirement is that the component includes a `` for the page content. For example, let's add a nav bar: +...but we can add whatever markup, styles and behaviour we want. The only requirement is that the component includes a `@render` tag for the page content. For example, let's add a nav bar: + +```svelte + + -```html -/// file: src/routes/+layout.svelte
- +{@render children()} ``` If we create pages for `/`, `/about` and `/settings`... @@ -190,8 +214,8 @@ We can create a layout that only applies to pages below `/settings` (while inher ```svelte

Settings

@@ -202,10 +226,15 @@ We can create a layout that only applies to pages below `/settings` (while inher {/each} - +{@render children()} ``` -By default, each layout inherits the layout above it. Sometimes that isn't what you want - in this case, [advanced layouts](advanced-routing#advanced-layouts) can help you. +> [!LEGACY] +> `LayoutProps` was added in 2.16.0. In earlier versions, you had to [type the properties manually instead](#\$types). + +You can see how `data` is populated by looking at the `+layout.js` example in the next section just below. + +By default, each layout inherits the layout above it. Sometimes that isn't what you want - in this case, [advanced layouts](advanced-routing#Advanced-layouts) can help you. ### +layout.js @@ -231,14 +260,14 @@ Data returned from a layout's `load` function is also available to all its child ```svelte ``` -> Often, layout data is unchanged when navigating between pages. SvelteKit will intelligently rerun [`load`](load) functions when necessary. +> [!NOTE] Often, layout data is unchanged when navigating between pages. SvelteKit will intelligently rerun [`load`](load) functions when necessary. ### +layout.server.js @@ -248,7 +277,7 @@ Like `+layout.js`, `+layout.server.js` can export [page options](page-options) ## +server -As well as pages, you can define routes with a `+server.js` file (sometimes referred to as an 'API route' or an 'endpoint'), which gives you full control over the response. Your `+server.js` file exports functions corresponding to HTTP verbs like `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, `OPTIONS`, and `HEAD` that take a `RequestEvent` argument and return a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object. +As well as pages, you can define routes with a `+server.js` file (sometimes referred to as an 'API route' or an 'endpoint'), which gives you full control over the response. Your `+server.js` file exports functions corresponding to HTTP verbs like `GET`, `POST`, `PATCH`, `PUT`, `DELETE`, `OPTIONS`, and `HEAD` that take a [`RequestEvent`](@sveltejs-kit#RequestEvent) argument and return a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object. For example we could create an `/api/random-number` route with a `GET` handler: @@ -264,7 +293,7 @@ export function GET({ url }) { const d = max - min; if (isNaN(d) || d < 0) { - throw error(400, 'min and max must be numbers, and min must be less than max'); + error(400, 'min and max must be numbers, and min must be less than max'); } const random = min + Math.random() * d; @@ -275,11 +304,13 @@ export function GET({ url }) { The first argument to `Response` can be a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream), making it possible to stream large amounts of data or create server-sent events (unless deploying to platforms that buffer responses, like AWS Lambda). -You can use the [`error`](modules#sveltejs-kit-error), [`redirect`](modules#sveltejs-kit-redirect) and [`json`](modules#sveltejs-kit-json) methods from `@sveltejs/kit` for convenience (but you don't have to). +You can use the [`error`](@sveltejs-kit#error), [`redirect`](@sveltejs-kit#redirect) and [`json`](@sveltejs-kit#json) methods from `@sveltejs/kit` for convenience (but you don't have to). + +If an error is thrown (either `error(...)` or an unexpected error), the response will be a JSON representation of the error or a fallback error page — which can be customised via `src/error.html` — depending on the `Accept` header. The [`+error.svelte`](#error) component will _not_ be rendered in this case. You can read more about error handling [here](errors). -If an error is thrown (either `throw error(...)` or an unexpected error), the response will be a JSON representation of the error or a fallback error page — which can be customised via `src/error.html` — depending on the `Accept` header. The [`+error.svelte`](#error) component will _not_ be rendered in this case. You can read more about error handling [here](errors). +> [!NOTE] When creating an `OPTIONS` handler, note that Vite will inject `Access-Control-Allow-Origin` and `Access-Control-Allow-Methods` headers — these will not be present in production unless you add them. -> When creating an `OPTIONS` handler, note that Vite will inject `Access-Control-Allow-Origin` and `Access-Control-Allow-Methods` headers — these will not be present in production unless you add them. +> [!NOTE] `+layout` files have no effect on `+server.js` files. If you want to run some logic before each request, add it to the server [`handle`](hooks#Server-hooks-handle) hook. ### Receiving data @@ -309,7 +340,7 @@ By exporting `POST`/`PUT`/`PATCH`/`DELETE`/`OPTIONS`/`HEAD` handlers, `+server.j = {total} - + ``` ```js @@ -323,19 +354,19 @@ export async function POST({ request }) { } ``` -> In general, [form actions](form-actions) are a better way to submit data from the browser to the server. +> [!NOTE] In general, [form actions](form-actions) are a better way to submit data from the browser to the server. -> If a `GET` handler is exported, a `HEAD` request will return the `content-length` of the `GET` handler's response body. +> [!NOTE] If a `GET` handler is exported, a `HEAD` request will return the `content-length` of the `GET` handler's response body. ### Fallback method handler Exporting the `fallback` handler will match any unhandled request methods, including methods like `MOVE` which have no dedicated export from `+server.js`. ```js -// @errors: 7031 /// file: src/routes/api/add/+server.js import { json, text } from '@sveltejs/kit'; +/** @type {import('./$types').RequestHandler} */ export async function POST({ request }) { const { a, b } = await request.json(); return json(a + b); @@ -348,7 +379,7 @@ export async function fallback({ request }) { } ``` -> For `HEAD` requests, the `GET` handler takes precedence over the `fallback` handler. +> [!NOTE] For `HEAD` requests, the `GET` handler takes precedence over the `fallback` handler. ### Content negotiation @@ -362,30 +393,47 @@ export async function fallback({ request }) { Throughout the examples above, we've been importing types from a `$types.d.ts` file. This is a file SvelteKit creates for you in a hidden directory if you're using TypeScript (or JavaScript with JSDoc type annotations) to give you type safety when working with your root files. -For example, annotating `export let data` with `PageData` (or `LayoutData`, for a `+layout.svelte` file) tells TypeScript that the type of `data` is whatever was returned from `load`: +For example, annotating `let { data } = $props()` with `PageProps` (or `LayoutProps`, for a `+layout.svelte` file) tells TypeScript that the type of `data` is whatever was returned from `load`: ```svelte ``` +> [!NOTE] +> The `PageProps` and `LayoutProps` types, added in 2.16.0, are a shortcut for typing the `data` prop as `PageData` or `LayoutData`, as well as other props, such as `form` for pages, or `children` for layouts. In earlier versions, you had to type these properties manually. For example, for a page: +> +> ```js +> /// file: +page.svelte +> /** @type {{ data: import('./$types').PageData, form: import('./$types').ActionData }} */ +> let { data, form } = $props(); +> ``` +> +> Or, for a layout: +> +> ```js +> /// file: +layout.svelte +> /** @type {{ data: import('./$types').LayoutData, children: Snippet }} */ +> let { data, children } = $props(); +> ``` + In turn, annotating the `load` function with `PageLoad`, `PageServerLoad`, `LayoutLoad` or `LayoutServerLoad` (for `+page.js`, `+page.server.js`, `+layout.js` and `+layout.server.js` respectively) ensures that `params` and the return value are correctly typed. If you're using VS Code or any IDE that supports the language server protocol and TypeScript plugins then you can omit these types _entirely_! Svelte's IDE tooling will insert the correct types for you, so you'll get type checking without writing them yourself. It also works with our command line tool `svelte-check`. -You can read more about omitting `$types` in our [blog post](https://svelte.dev/blog/zero-config-type-safety) about it. +You can read more about omitting `$types` in our [blog post](/blog/zero-config-type-safety) about it. ## Other files Any other files inside a route directory are ignored by SvelteKit. This means you can colocate components and utility modules with the routes that need them. -If components and modules are needed by multiple routes, it's a good idea to put them in [`$lib`](modules#$lib). +If components and modules are needed by multiple routes, it's a good idea to put them in [`$lib`]($lib). ## Further reading -- [Tutorial: Routing](https://learn.svelte.dev/tutorial/pages) -- [Tutorial: API routes](https://learn.svelte.dev/tutorial/get-handlers) +- [Tutorial: Routing](/tutorial/kit/pages) +- [Tutorial: API routes](/tutorial/kit/get-handlers) - [Docs: Advanced routing](advanced-routing) diff --git a/documentation/docs/20-core-concepts/20-load.md b/documentation/docs/20-core-concepts/20-load.md index d582e9987904..b944b8b600fd 100644 --- a/documentation/docs/20-core-concepts/20-load.md +++ b/documentation/docs/20-core-concepts/20-load.md @@ -2,7 +2,7 @@ title: Loading data --- -Before a [`+page.svelte`](routing#page-page-svelte) component (and its containing [`+layout.svelte`](routing#layout-layout-svelte) components) can be rendered, we often need to get some data. This is done by defining `load` functions. +Before a [`+page.svelte`](routing#page-page.svelte) component (and its containing [`+layout.svelte`](routing#layout-layout.svelte) components) can be rendered, we often need to get some data. This is done by defining `load` functions. ## Page data @@ -24,17 +24,27 @@ export function load({ params }) { ```svelte

{data.post.title}

{@html data.post.content}
``` +> [!LEGACY] +> Before version 2.16.0, the props of a page and layout had to be typed individually: +> ```js +> /// file: +page.svelte +> /** @type {{ data: import('./$types').PageData }} */ +> let { data } = $props(); +> ``` +> +> In Svelte 4, you'd use `export let data` instead. + Thanks to the generated `$types` module, we get full type safety. -A `load` function in a `+page.js` file runs both on the server and in the browser (unless combined with `export const ssr = false`, in which case it will [only run in the browser](https://kit.svelte.dev/docs/page-options#ssr)). If your `load` function should _always_ run on the server (because it uses private environment variables, for example, or accesses a database) then it would go in a `+page.server.js` instead. +A `load` function in a `+page.js` file runs both on the server and in the browser (unless combined with `export const ssr = false`, in which case it will [only run in the browser](page-options#ssr)). If your `load` function should _always_ run on the server (because it uses private environment variables, for example, or accesses a database) then it would go in a `+page.server.js` instead. A more realistic version of your blog post's `load` function, that only runs on the server and pulls data from a database, might look like this: @@ -57,7 +67,7 @@ export async function load({ params }) { } ``` -Notice that the type changed from `PageLoad` to `PageServerLoad`, because server `load` functions can access additional arguments. To understand when to use `+page.js` and when to use `+page.server.js`, see [Universal vs server](load#universal-vs-server). +Notice that the type changed from `PageLoad` to `PageServerLoad`, because server `load` functions can access additional arguments. To understand when to use `+page.js` and when to use `+page.server.js`, see [Universal vs server](load#Universal-vs-server). ## Layout data @@ -85,13 +95,13 @@ export async function load() { ```svelte
- - + + {@render children()}
``` +> [!LEGACY] +> `LayoutProps` was added in 2.16.0. In earlier versions, properties had to be typed individually: +> ```js +> /// file: +layout.svelte +> /** @type {{ data: import('./$types').LayoutData, children: Snippet }} */ +> let { data, children } = $props(); +> ``` + Data returned from layout `load` functions is available to child `+layout.svelte` components and the `+page.svelte` component as well as the layout that it 'belongs' to. -```diff +```svelte /// file: src/routes/blog/[slug]/+page.svelte

{data.post.title}

{@html data.post.content}
-+{#if next} -+

Next post: {next.title}

-+{/if} ++++{#if next} +

Next post: {next.title}

+{/if}+++ ``` -> If multiple `load` functions return data with the same key, the last one 'wins' — the result of a layout `load` returning `{ a: 1, b: 2 }` and a page `load` returning `{ b: 3, c: 4 }` would be `{ a: 1, b: 3, c: 4 }`. +> [!NOTE] If multiple `load` functions return data with the same key, the last one 'wins' — the result of a layout `load` returning `{ a: 1, b: 2 }` and a page `load` returning `{ b: 3, c: 4 }` would be `{ a: 1, b: 3, c: 4 }`. -## $page.data +## page.data The `+page.svelte` component, and each `+layout.svelte` component above it, has access to its own data plus all the data from its parents. -In some cases, we might need the opposite — a parent layout might need to access page data or data from a child layout. For example, the root layout might want to access a `title` property returned from a `load` function in `+page.js` or `+page.server.js`. This can be done with `$page.data`: +In some cases, we might need the opposite — a parent layout might need to access page data or data from a child layout. For example, the root layout might want to access a `title` property returned from a `load` function in `+page.js` or `+page.server.js`. This can be done with `page.data`: ```svelte - {$page.data.title} + {page.data.title} ``` -Type information for `$page.data` is provided by `App.PageData`. +Type information for `page.data` is provided by `App.PageData`. + +> [!LEGACY] +> `$app/state` was added in SvelteKit 2.12. If you're using an earlier version or are using Svelte 4, use `$app/stores` instead. +> It provides a `page` store with the same interface that you can subscribe to, e.g. `$page.data.title`. ## Universal vs server @@ -166,13 +188,15 @@ Conceptually, they're the same thing, but there are some important differences t Server `load` functions _always_ run on the server. -By default, universal `load` functions run on the server during SSR when the user first visits your page. They will then run again during hydration, reusing any responses from [fetch requests](#making-fetch-requests). All subsequent invocations of universal `load` functions happen in the browser. You can customize the behavior through [page options](page-options). If you disable [server side rendering](page-options#ssr), you'll get an SPA and universal `load` functions _always_ run on the client. +By default, universal `load` functions run on the server during SSR when the user first visits your page. They will then run again during hydration, reusing any responses from [fetch requests](#Making-fetch-requests). All subsequent invocations of universal `load` functions happen in the browser. You can customize the behavior through [page options](page-options). If you disable [server side rendering](page-options#ssr), you'll get an SPA and universal `load` functions _always_ run on the client. + +If a route contains both universal and server `load` functions, the server `load` runs first. A `load` function is invoked at runtime, unless you [prerender](page-options#prerender) the page — in that case, it's invoked at build time. ### Input -Both universal and server `load` functions have access to properties describing the request (`params`, `route` and `url`) and various functions (`fetch`, `setHeaders`, `parent` and `depends`). These are described in the following sections. +Both universal and server `load` functions have access to properties describing the request (`params`, `route` and `url`) and various functions (`fetch`, `setHeaders`, `parent`, `depends` and `untrack`). These are described in the following sections. Server `load` functions are called with a `ServerLoadEvent`, which inherits `clientAddress`, `cookies`, `locals`, `platform` and `request` from `RequestEvent`. @@ -182,7 +206,7 @@ Universal `load` functions are called with a `LoadEvent`, which has a `data` pro A universal `load` function can return an object containing any values, including things like custom classes and component constructors. -A server `load` function must return data that can be serialized with [devalue](https://github.com/rich-harris/devalue) — anything that can be represented as JSON plus things like `BigInt`, `Date`, `Map`, `Set` and `RegExp`, or repeated/cyclical references — so that it can be transported over the network. Your data can include [promises](#streaming-with-promises), in which case it will be streamed to browsers. +A server `load` function must return data that can be serialized with [devalue](https://github.com/rich-harris/devalue) — anything that can be represented as JSON plus things like `BigInt`, `Date`, `Map`, `Set` and `RegExp`, or repeated/cyclical references — so that it can be transported over the network. Your data can include [promises](#Streaming-with-promises), in which case it will be streamed to browsers. ### When to use which @@ -190,7 +214,29 @@ Server `load` functions are convenient when you need to access data directly fro Universal `load` functions are useful when you need to `fetch` data from an external API and don't need private credentials, since SvelteKit can get the data directly from the API rather than going via your server. They are also useful when you need to return something that can't be serialized, such as a Svelte component constructor. -In rare cases, you might need to use both together — for example, you might need to return an instance of a custom class that was initialised with data from your server. +In rare cases, you might need to use both together — for example, you might need to return an instance of a custom class that was initialised with data from your server. When using both, the server `load` return value is _not_ passed directly to the page, but to the universal `load` function (as the `data` property): + +```js +/// file: src/routes/+page.server.js +/** @type {import('./$types').PageServerLoad} */ +export async function load() { + return { + serverMessage: 'hello from server load function' + }; +} +``` + +```js +/// file: src/routes/+page.js +// @errors: 18047 +/** @type {import('./$types').PageLoad} */ +export async function load({ data }) { + return { + serverMessage: data.serverMessage, + universalMessage: 'hello from universal load function' + }; +} +``` ## Using URL data @@ -200,7 +246,7 @@ Often the `load` function depends on the URL in one way or another. For this, th An instance of [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL), containing properties like the `origin`, `hostname`, `pathname` and `searchParams` (which contains the parsed query string as a [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) object). `url.hash` cannot be accessed during `load`, since it is unavailable on the server. -> In some environments this is derived from request headers during server-side rendering. If you're using [adapter-node](adapter-node), for example, you may need to configure the adapter in order for the URL to be correct. +> [!NOTE] In some environments this is derived from request headers during server-side rendering. If you're using [adapter-node](adapter-node), for example, you may need to configure the adapter in order for the URL to be correct. ### route @@ -234,7 +280,7 @@ To get data from an external API or a `+server.js` handler, you can use the prov - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request. - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context). - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call. -- During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](hooks#server-hooks-handle). +- During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text`, `json` and `arrayBuffer` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](hooks#Server-hooks-handle). - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request - if you received a warning in your browser console when using the browser `fetch` instead of the `load` `fetch`, this is why. ```js @@ -250,7 +296,7 @@ export async function load({ fetch, params }) { ## Cookies -A server `load` function can get and set [`cookies`](types#public-types-cookies). +A server `load` function can get and set [`cookies`](@sveltejs-kit#Cookies). ```js /// file: src/routes/+layout.server.js @@ -278,12 +324,10 @@ Cookies will only be passed through the provided `fetch` function if the target For example, if SvelteKit is serving my.domain.com: - domain.com WILL NOT receive cookies - my.domain.com WILL receive cookies -- api.domain.dom WILL NOT receive cookies +- api.domain.com WILL NOT receive cookies - sub.my.domain.com WILL receive cookies -Other cookies will not be passed when `credentials: 'include'` is set, because SvelteKit does not know which domain which cookie belongs to (the browser does not pass this information along), so it's not safe to forward any of them. Use the [handleFetch hook](hooks#server-hooks-handlefetch) to work around it. - -> When setting cookies, be aware of the `path` property. By default, the `path` of a cookie is the current pathname. If you for example set a cookie at page `admin/user`, the cookie will only be available within the `admin` pages by default. In most cases you likely want to set `path` to `'/'` to make the cookie available throughout your app. +Other cookies will not be passed when `credentials: 'include'` is set, because SvelteKit does not know which domain which cookie belongs to (the browser does not pass this information along), so it's not safe to forward any of them. Use the [handleFetch hook](hooks#Server-hooks-handleFetch) to work around it. ## Headers @@ -297,8 +341,8 @@ export async function load({ fetch, setHeaders }) { const url = `https://cms.example.com/products.json`; const response = await fetch(url); - // cache the page for the same length of time - // as the underlying data + // Headers are only set during SSR, caching the page's HTML + // for the same length of time as the underlying data. setHeaders({ age: response.headers.get('age'), 'cache-control': response.headers.get('cache-control') @@ -308,7 +352,7 @@ export async function load({ fetch, setHeaders }) { } ``` -Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once. You cannot add a `set-cookie` header with `setHeaders` — use `cookies.set(name, value, options)` instead. +Setting the same header multiple times (even in separate `load` functions) is an error. You can only set a given header once using the `setHeaders` function. You cannot add a `set-cookie` header with `setHeaders` — use `cookies.set(name, value, options)` instead. ## Using parent data @@ -343,15 +387,15 @@ export async function load({ parent }) { ```svelte

{data.a} + {data.b} = {data.c}

``` -> Notice that the `load` function in `+page.js` receives the merged data from both layout `load` functions, not just the immediate parent. +> [!NOTE] Notice that the `load` function in `+page.js` receives the merged data from both layout `load` functions, not just the immediate parent. Inside `+page.server.js` and `+layout.server.js`, `parent` returns data from parent `+layout.server.js` files. @@ -359,16 +403,21 @@ In `+page.js` or `+layout.js` it will return data from parent `+layout.js` files Take care not to introduce waterfalls when using `await parent()`. Here, for example, `getData(params)` does not depend on the result of calling `parent()`, so we should call it first to avoid a delayed render. -```diff +```js /// file: +page.js +// @filename: ambient.d.ts +declare function getData(params: Record): Promise<{ meta: any }> + +// @filename: index.js +// ---cut--- /** @type {import('./$types').PageLoad} */ export async function load({ params, parent }) { -- const parentData = await parent(); + ---const parentData = await parent();--- const data = await getData(params); -+ const parentData = await parent(); + +++const parentData = await parent();+++ return { - ...data + ...data, meta: { ...parentData.meta, ...data.meta } }; } @@ -376,7 +425,7 @@ export async function load({ params, parent }) { ## Errors -If an error is thrown during `load`, the nearest [`+error.svelte`](routing#error) will be rendered. For _expected_ errors, use the `error` helper from `@sveltejs/kit` to specify the HTTP status code and an optional message: +If an error is thrown during `load`, the nearest [`+error.svelte`](routing#error) will be rendered. For [_expected_](errors#Expected-errors) errors, use the `error` helper from `@sveltejs/kit` to specify the HTTP status code and an optional message: ```js /// file: src/routes/admin/+layout.server.js @@ -397,20 +446,24 @@ import { error } from '@sveltejs/kit'; /** @type {import('./$types').LayoutServerLoad} */ export function load({ locals }) { if (!locals.user) { - throw error(401, 'not logged in'); + error(401, 'not logged in'); } if (!locals.user.isAdmin) { - throw error(403, 'not an admin'); + error(403, 'not an admin'); } } ``` -If an _unexpected_ error is thrown, SvelteKit will invoke [`handleError`](hooks#shared-hooks-handleerror) and treat it as a 500 Internal Error. +Calling `error(...)` will throw an exception, making it easy to stop execution from inside helper functions. + +If an [_unexpected_](errors#Unexpected-errors) error is thrown, SvelteKit will invoke [`handleError`](hooks#Shared-hooks-handleError) and treat it as a 500 Internal Error. + +> [!NOTE] [In SvelteKit 1.x](migrating-to-sveltekit-2#redirect-and-error-are-no-longer-thrown-by-you) you had to `throw` the error yourself ## Redirects -To redirect users, use the `redirect` helper from `@sveltejs/kit` to specify the location to which they should be redirected alongside a `3xx` status code. +To redirect users, use the `redirect` helper from `@sveltejs/kit` to specify the location to which they should be redirected alongside a `3xx` status code. Like `error(...)`, calling `redirect(...)` will throw an exception, making it easy to stop execution from inside helper functions. ```js /// file: src/routes/user/+layout.server.js @@ -430,33 +483,40 @@ import { redirect } from '@sveltejs/kit'; /** @type {import('./$types').LayoutServerLoad} */ export function load({ locals }) { if (!locals.user) { - throw redirect(307, '/login'); + redirect(307, '/login'); } } ``` -> Don't use `throw redirect()` from within a try-catch block, as the redirect will immediately trigger the catch statement. +> [!NOTE] Don't use `redirect()` inside a `try {...}` block, as the redirect will immediately trigger the catch statement. + +In the browser, you can also navigate programmatically outside of a `load` function using [`goto`]($app-navigation#goto) from [`$app.navigation`]($app-navigation). -In the browser, you can also navigate programmatically outside of a `load` function using [`goto`](modules#$app-navigation-goto) from [`$app.navigation`](modules#$app-navigation). +> [!NOTE] [In SvelteKit 1.x](migrating-to-sveltekit-2#redirect-and-error-are-no-longer-thrown-by-you) you had to `throw` the `redirect` yourself ## Streaming with promises -Promises at the _top level_ of the returned object will be awaited, making it easy to return multiple promises without creating a waterfall. When using a server `load`, _nested_ promises will be streamed to the browser as they resolve. This is useful if you have slow, non-essential data, since you can start rendering the page before all the data is available: +When using a server `load`, promises will be streamed to the browser as they resolve. This is useful if you have slow, non-essential data, since you can start rendering the page before all the data is available: ```js -/// file: src/routes/+page.server.js +/// file: src/routes/blog/[slug]/+page.server.js +// @filename: ambient.d.ts +declare global { + const loadPost: (slug: string) => Promise<{ title: string, content: string }>; + const loadComments: (slug: string) => Promise<{ content: string }>; +} + +export {}; + +// @filename: index.js +// ---cut--- /** @type {import('./$types').PageServerLoad} */ -export function load() { +export async function load({ params }) { return { - one: Promise.resolve(1), - two: Promise.resolve(2), - streamed: { - three: new Promise((fulfil) => { - setTimeout(() => { - fulfil(3) - }, 1000); - }) - } + // make sure the `await` happens at the end, otherwise we + // can't start loading comments until we've loaded the post + comments: loadComments(params.slug), + post: await loadPost(params.slug) }; } ``` @@ -464,35 +524,50 @@ export function load() { This is useful for creating skeleton loading states, for example: ```svelte - + -

- one: {data.one} -

-

- two: {data.two} -

-

- three: - {#await data.streamed.three} - Loading... - {:then value} - {value} - {:catch error} - {error.message} - {/await} -

+

{data.post.title}

+
{@html data.post.content}
+ +{#await data.comments} + Loading comments... +{:then comments} + {#each comments as comment} +

{comment.content}

+ {/each} +{:catch error} +

error loading comments: {error.message}

+{/await} +``` + +When streaming data, be careful to handle promise rejections correctly. More specifically, the server could crash with an "unhandled promise rejection" error if a lazy-loaded promise fails before rendering starts (at which point it's caught) and isn't handling the error in some way. When using SvelteKit's `fetch` directly in the `load` function, SvelteKit will handle this case for you. For other promises, it is enough to attach a noop-`catch` to the promise to mark it as handled. + +```js +/// file: src/routes/+page.server.js +/** @type {import('./$types').PageServerLoad} */ +export function load({ fetch }) { + const ok_manual = Promise.reject(); + ok_manual.catch(() => {}); + + return { + ok_manual, + ok_fetch: fetch('/fetch/that/could/fail'), + dangerous_unhandled: Promise.reject() + }; +} ``` -> On platforms that do not support streaming, such as AWS Lambda, responses will be buffered. This means the page will only render once all promises resolve. If you are using a proxy (e.g. NGINX), make sure it does not buffer responses from the proxied server. +> [!NOTE] On platforms that do not support streaming, such as AWS Lambda or Firebase, responses will be buffered. This means the page will only render once all promises resolve. If you are using a proxy (e.g. NGINX), make sure it does not buffer responses from the proxied server. -> Streaming data will only work when JavaScript is enabled. You should avoid returning nested promises from a universal `load` function if the page is server rendered, as these are _not_ streamed — instead, the promise is recreated when the function reruns in the browser. +> [!NOTE] Streaming data will only work when JavaScript is enabled. You should avoid returning promises from a universal `load` function if the page is server rendered, as these are _not_ streamed — instead, the promise is recreated when the function reruns in the browser. -> The headers and status code of a response cannot be changed once the response has started streaming, therefore you cannot `setHeaders` or throw redirects inside a streamed promise. +> [!NOTE] The headers and status code of a response cannot be changed once the response has started streaming, therefore you cannot `setHeaders` or throw redirects inside a streamed promise. + +> [!NOTE] [In SvelteKit 1.x](migrating-to-sveltekit-2#Top-level-promises-are-no-longer-awaited) top-level promises were automatically awaited, only nested promises were streamed. ## Parallel loading @@ -546,11 +621,28 @@ export async function load() { A `load` function that calls `await parent()` will also rerun if a parent `load` function is rerun. -Dependency tracking does not apply _after_ the `load` function has returned — for example, accessing `params.x` inside a nested [promise](#streaming-with-promises) will not cause the function to rerun when `params.x` changes. (Don't worry, you'll get a warning in development if you accidentally do this.) Instead, access the parameter in the main body of your `load` function. +Dependency tracking does not apply _after_ the `load` function has returned — for example, accessing `params.x` inside a nested [promise](#Streaming-with-promises) will not cause the function to rerun when `params.x` changes. (Don't worry, you'll get a warning in development if you accidentally do this.) Instead, access the parameter in the main body of your `load` function. + +Search parameters are tracked independently from the rest of the url. For example, accessing `event.url.searchParams.get("x")` inside a `load` function will make that `load` function re-run when navigating from `?x=1` to `?x=2`, but not when navigating from `?x=1&y=1` to `?x=1&y=2`. + +### Untracking dependencies + +In rare cases, you may wish to exclude something from the dependency tracking mechanism. You can do this with the provided `untrack` function: + +```js +/// file: src/routes/+page.js +/** @type {import('./$types').PageLoad} */ +export async function load({ untrack, url }) { + // Untrack url.pathname so that path changes don't trigger a rerun + if (untrack(() => url.pathname === '/')) { + return { message: 'Welcome!' }; + } +} +``` ### Manual invalidation -You can also rerun `load` functions that apply to the current page using [`invalidate(url)`](modules#$app-navigation-invalidate), which reruns all `load` functions that depend on `url`, and [`invalidateAll()`](modules#$app-navigation-invalidateall), which reruns every `load` function. Server load functions will never automatically depend on a fetched `url` to avoid leaking secrets to the client. +You can also rerun `load` functions that apply to the current page using [`invalidate(url)`]($app-navigation#invalidate), which reruns all `load` functions that depend on `url`, and [`invalidateAll()`]($app-navigation#invalidateAll), which reruns every `load` function. Server load functions will never automatically depend on a fetched `url` to avoid leaking secrets to the client. A `load` function depends on `url` if it calls `fetch(url)` or `depends(url)`. Note that `url` can be a custom identifier that starts with `[a-z]:`: @@ -575,8 +667,8 @@ export async function load({ fetch, depends }) {

random number: {data.number}

- + ``` ### When do load functions rerun? @@ -597,16 +689,100 @@ To summarize, a `load` function will rerun in the following situations: - It references a property of `params` whose value has changed - It references a property of `url` (such as `url.pathname` or `url.search`) whose value has changed. Properties in `request.url` are _not_ tracked +- It calls `url.searchParams.get(...)`, `url.searchParams.getAll(...)` or `url.searchParams.has(...)` and the parameter in question changes. Accessing other properties of `url.searchParams` will have the same effect as accessing `url.search`. - It calls `await parent()` and a parent `load` function reran -- It declared a dependency on a specific URL via [`fetch`](#making-fetch-requests) (universal load only) or [`depends`](types#public-types-loadevent), and that URL was marked invalid with [`invalidate(url)`](modules#$app-navigation-invalidate) -- All active `load` functions were forcibly rerun with [`invalidateAll()`](modules#$app-navigation-invalidateall) +- A child `load` function calls `await parent()` and is rerunning, and the parent is a server load function +- It declared a dependency on a specific URL via [`fetch`](#Making-fetch-requests) (universal load only) or [`depends`](@sveltejs-kit#LoadEvent), and that URL was marked invalid with [`invalidate(url)`]($app-navigation#invalidate) +- All active `load` functions were forcibly rerun with [`invalidateAll()`]($app-navigation#invalidateAll) + +`params` and `url` can change in response to a `` link click, a [`
` interaction](form-actions#GET-vs-POST), a [`goto`]($app-navigation#goto) invocation, or a [`redirect`](@sveltejs-kit#redirect). + +Note that rerunning a `load` function will update the `data` prop inside the corresponding `+layout.svelte` or `+page.svelte`; it does _not_ cause the component to be recreated. As a result, internal state is preserved. If this isn't what you want, you can reset whatever you need to reset inside an [`afterNavigate`]($app-navigation#afterNavigate) callback, and/or wrap your component in a [`{#key ...}`](../svelte/key) block. + +## Implications for authentication + +A couple features of loading data have important implications for auth checks: +- Layout `load` functions do not run on every request, such as during client side navigation between child routes. [(When do load functions rerun?)](load#Rerunning-load-functions-When-do-load-functions-rerun) +- Layout and page `load` functions run concurrently unless `await parent()` is called. If a layout `load` throws, the page `load` function runs, but the client will not receive the returned data. -`params` and `url` can change in response to a `` link click, a [`` interaction](form-actions#get-vs-post), a [`goto`](modules#$app-navigation-goto) invocation, or a [`redirect`](modules#sveltejs-kit-redirect). +There are a few possible strategies to ensure an auth check occurs before protected code. + +To prevent data waterfalls and preserve layout `load` caches: +- Use [hooks](hooks) to protect multiple routes before any `load` functions run +- Use auth guards directly in `+page.server.js` `load` functions for route specific protection + +Putting an auth guard in `+layout.server.js` requires all child pages to call `await parent()` before protected code. Unless every child page depends on returned data from `await parent()`, the other options will be more performant. + +## Using `getRequestEvent` + +When running server `load` functions, the `event` object passed to the function as an argument can also be retrieved with [`getRequestEvent`]($app-server#getRequestEvent). This allows shared logic (such as authentication guards) to access information about the current request without it needing to be passed around. + +For example, you might have a function that requires users to be logged in, and redirects them to `/login` if not: + +```js +/// file: src/lib/server/auth.js +// @filename: ambient.d.ts +interface User { + name: string; +} + +declare namespace App { + interface Locals { + user?: User; + } +} -Note that rerunning a `load` function will update the `data` prop inside the corresponding `+layout.svelte` or `+page.svelte`; it does _not_ cause the component to be recreated. As a result, internal state is preserved. If this isn't what you want, you can reset whatever you need to reset inside an [`afterNavigate`](modules#$app-navigation-afternavigate) callback, and/or wrap your component in a [`{#key ...}`](https://svelte.dev/docs#template-syntax-key) block. +// @filename: index.ts +// ---cut--- +import { redirect } from '@sveltejs/kit'; +import { getRequestEvent } from '$app/server'; + +export function requireLogin() { + const { locals, url } = getRequestEvent(); + + // assume `locals.user` is populated in `handle` + if (!locals.user) { + const redirectTo = url.pathname + url.search; + const params = new URLSearchParams({ redirectTo }); + + redirect(307, `/login?${params}`); + } + + return locals.user; +} +``` + +Now, you can call `requireLogin` in any `load` function (or [form action](form-actions), for example) to guarantee that the user is logged in: + +```js +/// file: +page.server.js +// @filename: ambient.d.ts + +declare module '$lib/server/auth' { + interface User { + name: string; + } + + export function requireLogin(): User; +} + +// @filename: index.ts +// ---cut--- +import { requireLogin } from '$lib/server/auth'; + +export function load() { + const user = requireLogin(); + + // `user` is guaranteed to be a user object here, because otherwise + // `requireLogin` would throw a redirect and we wouldn't get here + return { + message: `hello ${user.name}!` + }; +} +``` ## Further reading -- [Tutorial: Loading data](https://learn.svelte.dev/tutorial/page-data) -- [Tutorial: Errors and redirects](https://learn.svelte.dev/tutorial/error-basics) -- [Tutorial: Advanced loading](https://learn.svelte.dev/tutorial/await-parent) +- [Tutorial: Loading data](/tutorial/kit/page-data) +- [Tutorial: Errors and redirects](/tutorial/kit/error-basics) +- [Tutorial: Advanced loading](/tutorial/kit/await-parent) diff --git a/documentation/docs/20-core-concepts/30-form-actions.md b/documentation/docs/20-core-concepts/30-form-actions.md index d25e141eadc7..8dc852b985c0 100644 --- a/documentation/docs/20-core-concepts/30-form-actions.md +++ b/documentation/docs/20-core-concepts/30-form-actions.md @@ -12,7 +12,7 @@ In the simplest case, a page declares a `default` action: ```js /// file: src/routes/login/+page.server.js -/** @type {import('./$types').Actions} */ +/** @satisfies {import('./$types').Actions} */ export const actions = { default: async (event) => { // TODO log the user in @@ -39,7 +39,7 @@ To invoke this action from the `/login` page, just add a `` — no JavaScr If someone were to click the button, the browser would send the form data via `POST` request to the server, running the default action. -> Actions always use `POST` requests, since `GET` requests should never have side-effects. +> [!NOTE] Actions always use `POST` requests, since `GET` requests should never have side-effects. We can also invoke the action from other pages (for example if there's a login widget in the nav in the root layout) by adding the `action` attribute, pointing to the page: @@ -54,17 +54,17 @@ We can also invoke the action from other pages (for example if there's a login w Instead of one `default` action, a page can have as many named actions as it needs: -```diff +```js /// file: src/routes/login/+page.server.js -/** @type {import('./$types').Actions} */ +/** @satisfies {import('./$types').Actions} */ export const actions = { -- default: async (event) => { -+ login: async (event) => { +--- default: async (event) => {--- ++++ login: async (event) => {+++ // TODO log the user in }, -+ register: async (event) => { -+ // TODO register the user -+ } ++++ register: async (event) => { + // TODO register the user + }+++ }; ``` @@ -82,10 +82,9 @@ To invoke a named action, add a query parameter with the name prefixed by a `/` As well as the `action` attribute, we can use the `formaction` attribute on a button to `POST` the same form data to a different action than the parent ``: -```diff +```svelte /// file: src/routes/login/+page.svelte -- -+ + -+ + ++++++ ``` -> We can't have default actions next to named actions, because if you POST to a named action without a redirect, the query parameter is persisted in the URL, which means the next default POST would go through the named action from before. +> [!NOTE] We can't have default actions next to named actions, because if you POST to a named action without a redirect, the query parameter is persisted in the URL, which means the next default POST would go through the named action from before. ## Anatomy of an action -Each action receives a `RequestEvent` object, allowing you to read the data with `request.formData()`. After processing the request (for example, logging the user in by setting a cookie), the action can respond with data that will be available through the `form` property on the corresponding page and through `$page.form` app-wide until the next update. +Each action receives a `RequestEvent` object, allowing you to read the data with `request.formData()`. After processing the request (for example, logging the user in by setting a cookie), the action can respond with data that will be available through the `form` property on the corresponding page and through `page.form` app-wide until the next update. ```js -// @errors: 2304 /// file: src/routes/login/+page.server.js +// @filename: ambient.d.ts +declare module '$lib/server/db'; + +// @filename: index.js +// ---cut--- +import * as db from '$lib/server/db'; + /** @type {import('./$types').PageServerLoad} */ export async function load({ cookies }) { const user = await db.getUserFromSession(cookies.get('sessionid')); return { user }; } -/** @type {import('./$types').Actions} */ +/** @satisfies {import('./$types').Actions} */ export const actions = { login: async ({ cookies, request }) => { const data = await request.formData(); @@ -122,7 +127,7 @@ export const actions = { const password = data.get('password'); const user = await db.getUser(email); - cookies.set('sessionid', await db.createSession(user)); + cookies.set('sessionid', await db.createSession(user), { path: '/' }); return { success: true }; }, @@ -135,11 +140,8 @@ export const actions = { ```svelte {#if form?.success} @@ -149,32 +151,48 @@ export const actions = { {/if} ``` +> [!LEGACY] +> `PageProps` was added in 2.16.0. In earlier versions, you had to type the `data` and `form` properties individually: +> ```js +> /// file: +page.svelte +> /** @type {{ data: import('./$types').PageData, form: import('./$types').ActionData }} */ +> let { data, form } = $props(); +> ``` +> +> In Svelte 4, you'd use `export let data` and `export let form` instead to declare properties. + ### Validation errors -If the request couldn't be processed because of invalid data, you can return validation errors — along with the previously submitted form values — back to the user so that they can try again. The `fail` function lets you return an HTTP status code (typically 400 or 422, in the case of validation errors) along with the data. The status code is available through `$page.status` and the data through `form`: +If the request couldn't be processed because of invalid data, you can return validation errors — along with the previously submitted form values — back to the user so that they can try again. The `fail` function lets you return an HTTP status code (typically 400 or 422, in the case of validation errors) along with the data. The status code is available through `page.status` and the data through `form`: -```diff +```js /// file: src/routes/login/+page.server.js -+import { fail } from '@sveltejs/kit'; +// @filename: ambient.d.ts +declare module '$lib/server/db'; + +// @filename: index.js +// ---cut--- ++++import { fail } from '@sveltejs/kit';+++ +import * as db from '$lib/server/db'; -/** @type {import('./$types').Actions} */ +/** @satisfies {import('./$types').Actions} */ export const actions = { login: async ({ cookies, request }) => { const data = await request.formData(); const email = data.get('email'); const password = data.get('password'); -+ if (!email) { -+ return fail(400, { email, missing: true }); -+ } ++++ if (!email) { + return fail(400, { email, missing: true }); + }+++ const user = await db.getUser(email); -+ if (!user || user.password !== hash(password)) { -+ return fail(400, { email, incorrect: true }); -+ } ++++ if (!user || user.password !== db.hash(password)) { + return fail(400, { email, incorrect: true }); + }+++ - cookies.set('sessionid', await db.createSession(user)); + cookies.set('sessionid', await db.createSession(user), { path: '/' }); return { success: true }; }, @@ -184,17 +202,16 @@ export const actions = { }; ``` -> Note that as a precaution, we only return the email back to the page — not the password. +> [!NOTE] Note that as a precaution, we only return the email back to the page — not the password. -```diff +```svelte /// file: src/routes/login/+page.svelte
-+ {#if form?.missing}

The email field is required

{/if} -+ {#if form?.incorrect}

Invalid credentials!

{/if} ++++ {#if form?.missing}

The email field is required

{/if} + {#if form?.incorrect}

Invalid credentials!

{/if}+++
` elements that point to other pages that are candidates for prerendering — because of this, you generally don't need to specify which pages should be accessed. If you _do_ need to specify which pages should be accessed by the prerenderer, you can do so with [`config.kit.prerender.entries`](configuration#prerender), or by exporting an [`entries`](#entries) function from your dynamic route. -While prerendering, the value of `building` imported from [`$app/environment`](modules#$app-environment) will be `true`. +While prerendering, the value of `building` imported from [`$app/environment`]($app-environment) will be `true`. ### Prerendering server routes -Unlike the other page options, `prerender` also applies to `+server.js` files. These files are _not_ affected from layouts, but will inherit default values from the pages that fetch data from them, if any. For example if a `+page.js` contains this `load` function... +Unlike the other page options, `prerender` also applies to `+server.js` files. These files are _not_ affected by layouts, but will inherit default values from the pages that fetch data from them, if any. For example if a `+page.js` contains this `load` function... ```js /// file: +page.js @@ -58,11 +58,11 @@ export async function load({ fetch }) { The basic rule is this: for a page to be prerenderable, any two users hitting it directly must get the same content from the server. -> Not all pages are suitable for prerendering. Any content that is prerendered will be seen by all users. You can of course fetch personalized data in `onMount` in a prerendered page, but this may result in a poorer user experience since it will involve blank initial content or loading indicators. +> [!NOTE] Not all pages are suitable for prerendering. Any content that is prerendered will be seen by all users. You can of course fetch personalized data in `onMount` in a prerendered page, but this may result in a poorer user experience since it will involve blank initial content or loading indicators. Note that you can still prerender pages that load data based on the page's parameters, such as a `src/routes/blog/[slug]/+page.svelte` route. -Accessing [`url.searchParams`](load#using-url-data-url) during prerendering is forbidden. If you need to use it, ensure you are only doing so in the browser (for example in `onMount`). +Accessing [`url.searchParams`](load#Using-URL-data-url) during prerendering is forbidden. If you need to use it, ensure you are only doing so in the browser (for example in `onMount`). Pages with [actions](form-actions) cannot be prerendered, because a server must be able to handle the action `POST` requests. @@ -76,11 +76,12 @@ For _pages_, we skirt around this problem by writing `foo/index.html` instead of ### Troubleshooting -If you encounter an error like 'The following routes were marked as prerenderable, but were not prerendered' it's because the route in question (or a parent layout, if it's a page) has `export const prerender = true` but the page wasn't actually prerendered, because it wasn't reached by the prerendering crawler. +If you encounter an error like 'The following routes were marked as prerenderable, but were not prerendered' it's because the route in question (or a parent layout, if it's a page) has `export const prerender = true` but the page wasn't reached by the prerendering crawler and thus wasn't prerendered. -Since these routes cannot be dynamically server-rendered, this will cause errors when people try to access the route in question. There are two ways to fix it: +Since these routes cannot be dynamically server-rendered, this will cause errors when people try to access the route in question. There are a few ways to fix it: * Ensure that SvelteKit can find the route by following links from [`config.kit.prerender.entries`](configuration#prerender) or the [`entries`](#entries) page option. Add links to dynamic routes (i.e. pages with `[parameters]` ) to this option if they are not found through crawling the other entry points, else they are not prerendered because SvelteKit doesn't know what value the parameters should have. Pages not marked as prerenderable will be ignored and their links to other pages will not be crawled, even if some of them would be prerenderable. +* Ensure that SvelteKit can find the route by discovering a link to it from one of your other prerendered pages that have server-side rendering enabled. * Change `export const prerender = true` to `export const prerender = 'auto'`. Routes with `'auto'` can be dynamically server rendered ## entries @@ -116,25 +117,44 @@ export const prerender = true; ## ssr -Normally, SvelteKit renders your page on the server first and sends that HTML to the client where it's [hydrated](glossary#hydration). If you set `ssr` to `false`, it renders an empty 'shell' page instead. This is useful if your page is unable to be rendered on the server (because you use browser-only globals like `document` for example), but in most situations it's not recommended ([see appendix](glossary#ssr)). +Normally, SvelteKit renders your page on the server first and sends that HTML to the client where it's [hydrated](glossary#Hydration). If you set `ssr` to `false`, it renders an empty 'shell' page instead. This is useful if your page is unable to be rendered on the server (because you use browser-only globals like `document` for example), but in most situations it's not recommended ([see appendix](glossary#SSR)). ```js /// file: +page.js export const ssr = false; +// If both `ssr` and `csr` are `false`, nothing will be rendered! ``` If you add `export const ssr = false` to your root `+layout.js`, your entire app will only be rendered on the client — which essentially means you turn your app into an SPA. +> [!NOTE] If all your page options are boolean or string literal values, SvelteKit will evaluate them statically. If not, it will import your `+page.js` or `+layout.js` file on the server (both at build time, and at runtime if your app isn't fully static) so it can evaluate the options. In the second case, browser-only code must not run when the module is loaded. In practice, this means you should import browser-only code in your `+page.svelte` or `+layout.svelte` file instead. + ## csr -Ordinarily, SvelteKit [hydrates](glossary#hydration) your server-rendered HTML into an interactive client-side-rendered (CSR) page. Some pages don't require JavaScript at all — many blog posts and 'about' pages fall into this category. In these cases you can disable CSR: +Ordinarily, SvelteKit [hydrates](glossary#Hydration) your server-rendered HTML into an interactive client-side-rendered (CSR) page. Some pages don't require JavaScript at all — many blog posts and 'about' pages fall into this category. In these cases you can disable CSR: ```js /// file: +page.js export const csr = false; +// If both `csr` and `ssr` are `false`, nothing will be rendered! ``` -> If both `ssr` and `csr` are `false`, nothing will be rendered! +Disabling CSR does not ship any JavaScript to the client. This means: + +* The webpage should work with HTML and CSS only. +* ` ``` @@ -110,22 +107,27 @@ You might wonder how we're able to use `$page.data` and other [app stores](modul const user = getContext('user'); -

Welcome {$user.name}

+

Welcome {user().name}

``` -Updating the context-based store value in deeper-level pages or components will not affect the value in the parent component when the page is rendered via SSR: The parent component has already been rendered by the time the store value is updated. To avoid values 'flashing' during state updates during hydration, it is generally recommended to pass state down into components rather than up. +> [!NOTE] We're passing a function into `setContext` to keep reactivity across boundaries. Read more about it [here](/docs/svelte/$state#Passing-state-into-functions) + +> [!LEGACY] +> You also use stores from `svelte/store` for this, but when using Svelte 5 it is recommended to make use of universal reactivity instead. + +Updating the value of context-based state in deeper-level pages or components while the page is being rendered via SSR will not affect the value in the parent component because it has already been rendered by the time the state value is updated. In contrast, on the client (when CSR is enabled, which is the default) the value will be propagated and components, pages, and layouts higher in the hierarchy will react to the new value. Therefore, to avoid values 'flashing' during state updates during hydration, it is generally recommended to pass state down into components rather than up. If you're not using SSR (and can guarantee that you won't need to use SSR in future) then you can safely keep state in a shared module, without using the context API. -## Component state is preserved +## Component and page state is preserved When you navigate around your application, SvelteKit reuses existing layout and page components. For example, if you have a route like this... ```svelte ``` -Reusing components like this means that things like sidebar scroll state are preserved, and you can easily animate between changing values. However, if you do need to completely destroy and remount a component on navigation, you can use this pattern: +> [!NOTE] If your code in `onMount` and `onDestroy` has to run again after navigation you can use [afterNavigate]($app-navigation#afterNavigate) and [beforeNavigate]($app-navigation#beforeNavigate) respectively. + +Reusing components like this means that things like sidebar scroll state are preserved, and you can easily animate between changing values. In the case that you do need to completely destroy and remount a component on navigation, you can use this pattern: ```svelte -{#key $page.url.pathname} + + +{#key page.url.pathname} {/key} ``` ## Storing state in the URL -If you have state that should survive a reload and/or affect SSR, such as filters or sorting rules on a table, URL search parameters (like `?sort=price&order=ascending`) are a good place to put them. You can put them in `
` or `
` attributes, or set them programmatically via `goto('?key=value')`. They can be accessed inside `load` functions via the `url` parameter, and inside components via `$page.url.searchParams`. +If you have state that should survive a reload and/or affect SSR, such as filters or sorting rules on a table, URL search parameters (like `?sort=price&order=ascending`) are a good place to put them. You can put them in `` or `` attributes, or set them programmatically via `goto('?key=value')`. They can be accessed inside `load` functions via the `url` parameter, and inside components via `page.url.searchParams`. ## Storing ephemeral state in snapshots diff --git a/documentation/docs/20-core-concepts/index.md b/documentation/docs/20-core-concepts/index.md new file mode 100644 index 000000000000..46f1e3708cf8 --- /dev/null +++ b/documentation/docs/20-core-concepts/index.md @@ -0,0 +1,3 @@ +--- +title: Core concepts +--- diff --git a/documentation/docs/20-core-concepts/meta.json b/documentation/docs/20-core-concepts/meta.json deleted file mode 100644 index ec4007c842a5..000000000000 --- a/documentation/docs/20-core-concepts/meta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "title": "Core concepts" -} diff --git a/documentation/docs/25-build-and-deploy/10-building-your-app.md b/documentation/docs/25-build-and-deploy/10-building-your-app.md index d7c4cb71b50c..e641b4cfeaad 100644 --- a/documentation/docs/25-build-and-deploy/10-building-your-app.md +++ b/documentation/docs/25-build-and-deploy/10-building-your-app.md @@ -10,15 +10,15 @@ Secondly, an _adapter_ takes this production build and tunes it for your target ## During the build -SvelteKit will load your `+page/layout(.server).js` files (and all files they import) for analysis during the build. Any code that should _not_ be executed at this stage must check that `building` from [`$app/environment`](modules#$app-environment) is `false`: +SvelteKit will load your `+page/layout(.server).js` files (and all files they import) for analysis during the build. Any code that should _not_ be executed at this stage must check that `building` from [`$app/environment`]($app-environment) is `false`: -```diff -+import { building } from '$app/environment'; +```js ++++import { building } from '$app/environment';+++ import { setupMyDatabase } from '$lib/server/database'; -+if (!building) { ++++if (!building) {+++ setupMyDatabase(); -+} ++++}+++ export function load() { // ... @@ -27,4 +27,4 @@ export function load() { ## Preview your app -After building, you can view your production build locally with `vite preview` (via `npm run preview`). Note that this will run the app in Node, and so is not a perfect reproduction of your deployed app — adapter-specific adjustments like the [`platform` object](adapters#platform-specific-context) do not apply to previews. +After building, you can view your production build locally with `vite preview` (via `npm run preview`). Note that this will run the app in Node, and so is not a perfect reproduction of your deployed app — adapter-specific adjustments like the [`platform` object](adapters#Platform-specific-context) do not apply to previews. diff --git a/documentation/docs/25-build-and-deploy/20-adapters.md b/documentation/docs/25-build-and-deploy/20-adapters.md index 15acd012fd06..62f0cc20fb8a 100644 --- a/documentation/docs/25-build-and-deploy/20-adapters.md +++ b/documentation/docs/25-build-and-deploy/20-adapters.md @@ -6,14 +6,13 @@ Before you can deploy your SvelteKit app, you need to _adapt_ it for your deploy Official adapters exist for a variety of platforms — these are documented on the following pages: -- [`@sveltejs/adapter-cloudflare`](adapter-cloudflare) for Cloudflare Pages -- [`@sveltejs/adapter-cloudflare-workers`](adapter-cloudflare-workers) for Cloudflare Workers +- [`@sveltejs/adapter-cloudflare`](adapter-cloudflare) for Cloudflare Workers and Cloudflare Pages - [`@sveltejs/adapter-netlify`](adapter-netlify) for Netlify - [`@sveltejs/adapter-node`](adapter-node) for Node servers - [`@sveltejs/adapter-static`](adapter-static) for static site generation (SSG) - [`@sveltejs/adapter-vercel`](adapter-vercel) for Vercel -Additional [community-provided adapters](https://sveltesociety.dev/components#adapters) exist for other platforms. +Additional [community-provided adapters](https://sveltesociety.dev/packages?category=sveltekit-adapters) exist for other platforms. ## Using adapters diff --git a/documentation/docs/25-build-and-deploy/30-adapter-auto.md b/documentation/docs/25-build-and-deploy/30-adapter-auto.md index e52f5967bd3b..0e60deae69e1 100644 --- a/documentation/docs/25-build-and-deploy/30-adapter-auto.md +++ b/documentation/docs/25-build-and-deploy/30-adapter-auto.md @@ -2,13 +2,14 @@ title: Zero-config deployments --- -When you create a new SvelteKit project with `npm create svelte@latest`, it installs [`adapter-auto`](https://github.com/sveltejs/kit/tree/master/packages/adapter-auto) by default. This adapter automatically installs and uses the correct adapter for supported environments when you deploy: +When you create a new SvelteKit project with `npx sv create`, it installs [`adapter-auto`](https://github.com/sveltejs/kit/tree/main/packages/adapter-auto) by default. This adapter automatically installs and uses the correct adapter for supported environments when you deploy: - [`@sveltejs/adapter-cloudflare`](adapter-cloudflare) for [Cloudflare Pages](https://developers.cloudflare.com/pages/) - [`@sveltejs/adapter-netlify`](adapter-netlify) for [Netlify](https://netlify.com/) - [`@sveltejs/adapter-vercel`](adapter-vercel) for [Vercel](https://vercel.com/) - [`svelte-adapter-azure-swa`](https://github.com/geoffrich/svelte-adapter-azure-swa) for [Azure Static Web Apps](https://docs.microsoft.com/en-us/azure/static-web-apps/) -- [`svelte-kit-sst`](https://github.com/serverless-stack/sst/tree/master/packages/svelte-kit-sst) for [AWS via SST](https://docs.sst.dev/start/svelte) +- [`svelte-kit-sst`](https://github.com/sst/v2/tree/master/packages/svelte-kit-sst) for [AWS via SST](https://sst.dev/docs/start/aws/svelte) +- [`@sveltejs/adapter-node`](adapter-node) for [Google Cloud Run](https://cloud.google.com/run) It's recommended to install the appropriate adapter to your `devDependencies` once you've settled on a target environment, since this will add the adapter to your lockfile and slightly improve install times on CI. @@ -18,4 +19,4 @@ To add configuration options, such as `{ edge: true }` in [`adapter-vercel`](ada ## Adding community adapters -You can add zero-config support for additional adapters by editing [adapters.js](https://github.com/sveltejs/kit/blob/master/packages/adapter-auto/adapters.js) and opening a pull request. \ No newline at end of file +You can add zero-config support for additional adapters by editing [adapters.js](https://github.com/sveltejs/kit/blob/main/packages/adapter-auto/adapters.js) and opening a pull request. diff --git a/documentation/docs/25-build-and-deploy/40-adapter-node.md b/documentation/docs/25-build-and-deploy/40-adapter-node.md index f3c04bfa85c3..c67db0714efa 100644 --- a/documentation/docs/25-build-and-deploy/40-adapter-node.md +++ b/documentation/docs/25-build-and-deploy/40-adapter-node.md @@ -2,7 +2,7 @@ title: Node servers --- -To generate a standalone Node server, use [`adapter-node`](https://github.com/sveltejs/kit/tree/master/packages/adapter-node). +To generate a standalone Node server, use [`adapter-node`](https://github.com/sveltejs/kit/tree/main/packages/adapter-node). ## Usage @@ -32,6 +32,12 @@ node build Development dependencies will be bundled into your app using [Rollup](https://rollupjs.org). To control whether a given package is bundled or externalised, place it in `devDependencies` or `dependencies` respectively in your `package.json`. +### Compressing responses + +You will typically want to compress responses coming from the server. If you're already deploying your server behind a reverse proxy for SSL or load balancing, it typically results in better performance to also handle compression at that layer since Node.js is single-threaded. + +However, if you're building a [custom server](#Custom-server) and do want to add a compression middleware there, note that we would recommend using [`@polka/compression`](https://www.npmjs.com/package/@polka/compression) since SvelteKit streams responses and the more popular `compression` package does not support streaming and may cause errors when used. + ## Environment variables In `dev` and `preview`, SvelteKit will read environment variables from your `.env` file (or `.env.local`, or `.env.[mode]`, [as determined by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files).) @@ -44,30 +50,35 @@ npm install dotenv ...and invoke it before running the built app: -```diff --node build -+node -r dotenv/config build +```bash +node +++-r dotenv/config+++ build +``` + +If you use Node.js v20.6+, you can use the [`--env-file`](https://nodejs.org/en/learn/command-line/how-to-read-environment-variables-from-nodejs) flag instead: + +```bash +node +++--env-file=.env+++ build ``` ### `PORT`, `HOST` and `SOCKET_PATH` By default, the server will accept connections on `0.0.0.0` using port 3000. These can be customised with the `PORT` and `HOST` environment variables: -``` +```bash HOST=127.0.0.1 PORT=4000 node build ``` Alternatively, the server can be configured to accept connections on a specified socket path. When this is done using the `SOCKET_PATH` environment variable, the `HOST` and `PORT` environment variables will be disregarded. -``` +```bash SOCKET_PATH=/tmp/socket node build ``` -### `ORIGIN`, `PROTOCOL_HEADER` and `HOST_HEADER` +### `ORIGIN`, `PROTOCOL_HEADER`, `HOST_HEADER`, and `PORT_HEADER` HTTP doesn't give SvelteKit a reliable way to know the URL that is currently being requested. The simplest way to tell SvelteKit where the app is being served is to set the `ORIGIN` environment variable: -``` +```bash ORIGIN=https://my.site node build # or e.g. for local previewing and testing @@ -76,25 +87,27 @@ ORIGIN=http://localhost:3000 node build With this, a request for the `/stuff` pathname will correctly resolve to `https://my.site/stuff`. Alternatively, you can specify headers that tell SvelteKit about the request protocol and host, from which it can construct the origin URL: -``` +```bash PROTOCOL_HEADER=x-forwarded-proto HOST_HEADER=x-forwarded-host node build ``` -> [`x-forwarded-proto`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto) and [`x-forwarded-host`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host) are de facto standard headers that forward the original protocol and host if you're using a reverse proxy (think load balancers and CDNs). You should only set these variables if your server is behind a trusted reverse proxy; otherwise, it'd be possible for clients to spoof these headers. +> [!NOTE] [`x-forwarded-proto`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto) and [`x-forwarded-host`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host) are de facto standard headers that forward the original protocol and host if you're using a reverse proxy (think load balancers and CDNs). You should only set these variables if your server is behind a trusted reverse proxy; otherwise, it'd be possible for clients to spoof these headers. +> +> If you're hosting your proxy on a non-standard port and your reverse proxy supports `x-forwarded-port`, you can also set `PORT_HEADER=x-forwarded-port`. If `adapter-node` can't correctly determine the URL of your deployment, you may experience this error when using [form actions](form-actions): -> Cross-site POST form submissions are forbidden +> [!NOTE] Cross-site POST form submissions are forbidden ### `ADDRESS_HEADER` and `XFF_DEPTH` -The [RequestEvent](types#public-types-requestevent) object passed to hooks and endpoints includes an `event.getClientAddress()` function that returns the client's IP address. By default this is the connecting `remoteAddress`. If your server is behind one or more proxies (such as a load balancer), this value will contain the innermost proxy's IP address rather than the client's, so we need to specify an `ADDRESS_HEADER` to read the address from: +The [`RequestEvent`](@sveltejs-kit#RequestEvent) object passed to hooks and endpoints includes an `event.getClientAddress()` function that returns the client's IP address. By default this is the connecting `remoteAddress`. If your server is behind one or more proxies (such as a load balancer), this value will contain the innermost proxy's IP address rather than the client's, so we need to specify an `ADDRESS_HEADER` to read the address from: -``` +```bash ADDRESS_HEADER=True-Client-IP node build ``` -> Headers can easily be spoofed. As with `PROTOCOL_HEADER` and `HOST_HEADER`, you should [know what you're doing](https://adam-p.ca/blog/2022/03/x-forwarded-for/) before setting these. +> [!NOTE] Headers can easily be spoofed. As with `PROTOCOL_HEADER` and `HOST_HEADER`, you should [know what you're doing](https://adam-p.ca/blog/2022/03/x-forwarded-for/) before setting these. If the `ADDRESS_HEADER` is `X-Forwarded-For`, the header value will contain a comma-separated list of IP addresses. The `XFF_DEPTH` environment variable should specify how many trusted proxies sit in front of your server. E.g. if there are three trusted proxies, proxy 3 will forward the addresses of the original connection and the first two proxies: @@ -110,11 +123,19 @@ Some guides will tell you to read the left-most address, but this leaves you [vu We instead read from the _right_, accounting for the number of trusted proxies. In this case, we would use `XFF_DEPTH=3`. -> If you need to read the left-most address instead (and don't care about spoofing) — for example, to offer a geolocation service, where it's more important for the IP address to be _real_ than _trusted_, you can do so by inspecting the `x-forwarded-for` header within your app. +> [!NOTE] If you need to read the left-most address instead (and don't care about spoofing) — for example, to offer a geolocation service, where it's more important for the IP address to be _real_ than _trusted_, you can do so by inspecting the `x-forwarded-for` header within your app. ### `BODY_SIZE_LIMIT` -The maximum request body size to accept in bytes including while streaming. Defaults to 512kb. You can disable this option with a value of 0 and implement a custom check in [`handle`](hooks#server-hooks-handle) if you need something more advanced. +The maximum request body size to accept in bytes including while streaming. The body size can also be specified with a unit suffix for kilobytes (`K`), megabytes (`M`), or gigabytes (`G`). For example, `512K` or `1M`. Defaults to 512kb. You can disable this option with a value of `Infinity` (0 in older versions of the adapter) and implement a custom check in [`handle`](hooks#Server-hooks-handle) if you need something more advanced. + +### `SHUTDOWN_TIMEOUT` + +The number of seconds to wait before forcefully closing any remaining connections after receiving a `SIGTERM` or `SIGINT` signal. Defaults to `30`. Internally the adapter calls [`closeAllConnections`](https://nodejs.org/api/http.html#servercloseallconnections). See [Graceful shutdown](#Graceful-shutdown) for more details. + +### `IDLE_TIMEOUT` + +When using systemd socket activation, `IDLE_TIMEOUT` specifies the number of seconds after which the app is automatically put to sleep when receiving no requests. If not set, the app runs continuously. See [Socket activation](#Socket-activation) for more details. ## Options @@ -130,9 +151,8 @@ export default { adapter: adapter({ // default options are shown out: 'build', - precompress: false, - envPrefix: '', - polyfill: true + precompress: true, + envPrefix: '' }) } }; @@ -144,7 +164,7 @@ The directory to build the server to. It defaults to `build` — i.e. `node buil ### precompress -Enables precompressing using gzip and brotli for assets and prerendered pages. It defaults to `false`. +Enables precompressing using gzip and brotli for assets and prerendered pages. It defaults to `true`. ### envPrefix @@ -154,18 +174,68 @@ If you need to change the name of the environment variables used to configure th envPrefix: 'MY_CUSTOM_'; ``` -```sh +```bash MY_CUSTOM_HOST=127.0.0.1 \ MY_CUSTOM_PORT=4000 \ MY_CUSTOM_ORIGIN=https://my.site \ node build ``` -### polyfill +## Graceful shutdown + +By default `adapter-node` gracefully shuts down the HTTP server when a `SIGTERM` or `SIGINT` signal is received. It will: + +1. reject new requests ([`server.close`](https://nodejs.org/api/http.html#serverclosecallback)) +2. wait for requests that have already been made but not received a response yet to finish and close connections once they become idle ([`server.closeIdleConnections`](https://nodejs.org/api/http.html#servercloseidleconnections)) +3. and finally, close any remaining connections that are still active after [`SHUTDOWN_TIMEOUT`](#Environment-variables-SHUTDOWN_TIMEOUT) seconds. ([`server.closeAllConnections`](https://nodejs.org/api/http.html#servercloseallconnections)) -Controls whether your build will load polyfills for missing modules. It defaults to `true`, and should only be disabled when using Node 18.11 or greater. +> [!NOTE] If you want to customize this behaviour you can use a [custom server](#Custom-server). -Note: to use Node's built-in `crypto` global with Node 18 you will need to use the `--experimental-global-webcrypto` flag. This flag is not required with Node 20. +You can listen to the `sveltekit:shutdown` event which is emitted after the HTTP server has closed all connections. Unlike Node's `exit` event, the `sveltekit:shutdown` event supports asynchronous operations and is always emitted when all connections are closed even if the server has dangling work such as open database connections. + +```js +// @errors: 2304 +process.on('sveltekit:shutdown', async (reason) => { + await jobs.stop(); + await db.close(); +}); +``` + +The parameter `reason` has one of the following values: + +- `SIGINT` - shutdown was triggered by a `SIGINT` signal +- `SIGTERM` - shutdown was triggered by a `SIGTERM` signal +- `IDLE` - shutdown was triggered by [`IDLE_TIMEOUT`](#Environment-variables-IDLE_TIMEOUT) + +## Socket activation + +Most Linux operating systems today use a modern process manager called systemd to start the server and run and manage services. You can configure your server to allocate a socket and start and scale your app on demand. This is called [socket activation](http://0pointer.de/blog/projects/socket-activated-containers.html). In this case, the OS will pass two environment variables to your app — `LISTEN_PID` and `LISTEN_FDS`. The adapter will then listen on file descriptor 3 which refers to a systemd socket unit that you will have to create. + +> [!NOTE] You can still use [`envPrefix`](#Options-envPrefix) with systemd socket activation. `LISTEN_PID` and `LISTEN_FDS` are always read without a prefix. + +To take advantage of socket activation follow these steps. + +1. Run your app as a [systemd service](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html). It can either run directly on the host system or inside a container (using Docker or a systemd portable service for example). If you additionally pass an [`IDLE_TIMEOUT`](#Environment-variables-IDLE_TIMEOUT) environment variable to your app it will gracefully shutdown if there are no requests for `IDLE_TIMEOUT` seconds. systemd will automatically start your app again when new requests are coming in. + +```ini +/// file: /etc/systemd/system/myapp.service +[Service] +Environment=NODE_ENV=production IDLE_TIMEOUT=60 +ExecStart=/usr/bin/node /usr/bin/myapp/build +``` + +2. Create an accompanying [socket unit](https://www.freedesktop.org/software/systemd/man/latest/systemd.socket.html). The adapter only accepts a single socket. + +```ini +/// file: /etc/systemd/system/myapp.socket +[Socket] +ListenStream=3000 + +[Install] +WantedBy=sockets.target +``` + +3. Make sure systemd has recognised both units by running `sudo systemctl daemon-reload`. Then enable the socket on boot and start it immediately using `sudo systemctl enable --now myapp.socket`. The app will then automatically start once the first request is made to `localhost:3000`. ## Custom server @@ -193,20 +263,3 @@ app.listen(3000, () => { console.log('listening on port 3000'); }); ``` - -## Troubleshooting - -### Is there a hook for cleaning up before the server exits? - -There's nothing built-in to SvelteKit for this, because such a cleanup hook depends highly on the execution environment you're on. For Node, you can use its built-in `process.on(..)` to implement a callback that runs before the server exits: - -```js -// @errors: 2304 2580 -function shutdownGracefully() { - // anything you need to clean up manually goes in here - db.shutdown(); -} - -process.on('SIGINT', shutdownGracefully); -process.on('SIGTERM', shutdownGracefully); -``` diff --git a/documentation/docs/25-build-and-deploy/50-adapter-static.md b/documentation/docs/25-build-and-deploy/50-adapter-static.md index ad2a2ce63be8..c1d4845af154 100644 --- a/documentation/docs/25-build-and-deploy/50-adapter-static.md +++ b/documentation/docs/25-build-and-deploy/50-adapter-static.md @@ -2,7 +2,7 @@ title: Static site generation --- -To use SvelteKit as a static site generator (SSG), use [`adapter-static`](https://github.com/sveltejs/kit/tree/master/packages/adapter-static). +To use SvelteKit as a static site generator (SSG), use [`adapter-static`](https://github.com/sveltejs/kit/tree/main/packages/adapter-static). This will prerender your entire site as a collection of static files. If you'd like to prerender only some pages and dynamically server-render others, you will need to use a different adapter together with [the `prerender` option](page-options#prerender). @@ -38,7 +38,7 @@ export default { export const prerender = true; ``` -> You must ensure SvelteKit's [`trailingSlash`](page-options#trailingslash) option is set appropriately for your environment. If your host does not render `/a.html` upon receiving a request for `/a` then you will need to set `trailingSlash: 'always'` in your root layout to create `/a/index.html` instead. +> [!NOTE] You must ensure SvelteKit's [`trailingSlash`](page-options#trailingSlash) option is set appropriately for your environment. If your host does not render `/a.html` upon receiving a request for `/a` then you will need to set `trailingSlash: 'always'` in your root layout to create `/a/index.html` instead. ## Zero-config support @@ -48,12 +48,12 @@ Some platforms have zero-config support (more to come in future): On these platforms, you should omit the adapter options so that `adapter-static` can provide the optimal configuration: -```diff +```js +// @errors: 2304 /// file: svelte.config.js export default { kit: { -- adapter: adapter({...}) -+ adapter: adapter() + adapter: adapter(---{...}---) } }; ``` @@ -82,7 +82,9 @@ By default, `adapter-static` checks that either all pages and endpoints (if any) ## GitHub Pages -When building for GitHub Pages, make sure to update [`paths.base`](configuration#paths) to match your repo name, since the site will be served from rather than from the root. +When building for [GitHub Pages](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages), if your repo name is not equivalent to `your-username.github.io`, make sure to update [`config.kit.paths.base`](configuration#paths) to match your repo name. This is because the site will be served from `https://your-username.github.io/your-repo-name` rather than from the root. + +You'll also want to generate a fallback `404.html` page to replace the default 404 page shown by GitHub Pages. A config for GitHub Pages might look like the following: @@ -94,12 +96,15 @@ import adapter from '@sveltejs/adapter-static'; /** @type {import('@sveltejs/kit').Config} */ const config = { kit: { - adapter: adapter() + adapter: adapter({ + fallback: '404.html' + }), + paths: { + base: process.argv.includes('dev') ? '' : process.env.BASE_PATH + } } }; -config.paths = { base: process.argv.includes('dev') ? '' : process.env.BASE_PATH } - export default config; ``` @@ -118,18 +123,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 # If you're using pnpm, add this step then change the commands and cache key below to use `pnpm` # - name: Install pnpm - # uses: pnpm/action-setup@v2 + # uses: pnpm/action-setup@v3 # with: # version: 8 - name: Install Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 cache: npm - name: Install dependencies @@ -142,7 +147,7 @@ jobs: npm run build - name: Upload Artifacts - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: # this should match the `pages` option in your adapter-static options path: 'build/' @@ -162,5 +167,7 @@ jobs: steps: - name: Deploy id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 ``` + +If you're not using GitHub actions to deploy your site (for example, you're pushing the built site to its own repo), add an empty `.nojekyll` file in your `static` directory to prevent Jekyll from interfering. diff --git a/documentation/docs/25-build-and-deploy/55-single-page-apps.md b/documentation/docs/25-build-and-deploy/55-single-page-apps.md index c830470cbaae..9747c4288a51 100644 --- a/documentation/docs/25-build-and-deploy/55-single-page-apps.md +++ b/documentation/docs/25-build-and-deploy/55-single-page-apps.md @@ -9,7 +9,7 @@ You can turn any SvelteKit app, using any adapter, into a fully client-rendered export const ssr = false; ``` -> In most situations this is not recommended: it harms SEO, tends to slow down perceived performance, and makes your app inaccessible to users if JavaScript fails or is disabled (which happens [more often than you probably think](https://kryogenix.org/code/browser/everyonehasjs.html)). +> [!NOTE] In most situations this is not recommended: it harms SEO, tends to slow down perceived performance, and makes your app inaccessible to users if JavaScript fails or is disabled (which happens [more often than you probably think](https://kryogenix.org/code/browser/everyonehasjs.html)). If you don't have any server-side logic (i.e. `+page.server.js`, `+layout.server.js` or `+server.js` files) you can use [`adapter-static`](adapter-static) to create your SPA by adding a _fallback page_. @@ -35,6 +35,8 @@ The `fallback` page is an HTML page created by SvelteKit from your page template On some hosts it may be `index.html` or something else entirely — consult your platform's documentation. +> [!NOTE] Note that the fallback page will always contain absolute asset paths (i.e. beginning with `/` rather than `.`) regardless of the value of [`paths.relative`](configuration#paths), since it is used to respond to requests for arbitrary paths. + ## Apache To run an SPA on [Apache](https://httpd.apache.org/), you should add a `static/.htaccess` file to route requests to the fallback page: @@ -58,4 +60,4 @@ If you want certain pages to be prerendered, you can re-enable `ssr` alongside ` /// file: src/routes/my-prerendered-page/+page.js export const prerender = true; export const ssr = true; -``` \ No newline at end of file +``` diff --git a/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md b/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md index 92ceff556129..0e438e5b0f12 100644 --- a/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md +++ b/documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md @@ -1,23 +1,22 @@ --- -title: Cloudflare Pages +title: Cloudflare --- -To deploy to [Cloudflare Pages](https://developers.cloudflare.com/pages/), use [`adapter-cloudflare`](https://github.com/sveltejs/kit/tree/master/packages/adapter-cloudflare). +To deploy to [Cloudflare Workers](https://workers.cloudflare.com/) or [Cloudflare Pages](https://pages.cloudflare.com/), use [`adapter-cloudflare`](https://github.com/sveltejs/kit/tree/main/packages/adapter-cloudflare). -This adapter will be installed by default when you use [`adapter-auto`](adapter-auto). If you plan on staying with Cloudflare Pages you can switch from [`adapter-auto`](adapter-auto) to using this adapter directly so that type declarations will be automatically applied and you can set Cloudflare-specific options. +This adapter will be installed by default when you use [`adapter-auto`](adapter-auto). If you plan on staying with Cloudflare, you can switch from [`adapter-auto`](adapter-auto) to using this adapter directly so that `event.platform` is emulated during local development, type declarations are automatically applied, and the ability to set Cloudflare-specific options is provided. ## Comparisons -- `adapter-cloudflare` – supports all SvelteKit features; builds for [Cloudflare Pages](https://blog.cloudflare.com/cloudflare-pages-goes-full-stack/) -- `adapter-cloudflare-workers` – supports all SvelteKit features; builds for Cloudflare Workers -- `adapter-static` – only produces client-side static assets; compatible with Cloudflare Pages +- `adapter-cloudflare` – supports all SvelteKit features; builds for Cloudflare Workers Static Assets and Cloudflare Pages +- `adapter-cloudflare-workers` – deprecated. Supports all SvelteKit features; builds for Cloudflare Workers Sites +- `adapter-static` – only produces client-side static assets; compatible with Cloudflare Workers Static Assets and Cloudflare Pages ## Usage Install with `npm i -D @sveltejs/adapter-cloudflare`, then add the adapter to your `svelte.config.js`: ```js -// @errors: 2307 /// file: svelte.config.js import adapter from '@sveltejs/adapter-cloudflare'; @@ -25,6 +24,13 @@ export default { kit: { adapter: adapter({ // See below for an explanation of these options + config: undefined, + platformProxy: { + configPath: undefined, + environment: undefined, + persist: undefined + }, + fallback: 'plaintext', routes: { include: ['/*'], exclude: [''] @@ -36,7 +42,31 @@ export default { ## Options -The `routes` option allows you to customise the [`_routes.json`](https://developers.cloudflare.com/pages/platform/functions/routing/#create-a-_routesjson-file) file generated by `adapter-cloudflare`. +### config + +Path to your [Wrangler configuration file](https://developers.cloudflare.com/workers/wrangler/configuration/). If you would like to use a Wrangler configuration filename other than `wrangler.jsonc`, `wrangler.json`, or `wrangler.toml` you can specify it using this option. + +### platformProxy + +Preferences for the emulated `platform.env` local bindings. See the [getPlatformProxy](https://developers.cloudflare.com/workers/wrangler/api/#parameters-1) Wrangler API documentation for a full list of options. + +### fallback + +Whether to render a plaintext 404.html page or a rendered SPA fallback page for non-matching asset requests. + +For Cloudflare Workers, the default behaviour is to return a null-body 404-status response for non-matching assets requests. However, if the [`assets.not_found_handling`](https://developers.cloudflare.com/workers/static-assets/routing/#2-not_found_handling) Wrangler configuration setting is set to `"404-page"`, this page will be served if a request fails to match an asset. If `assets.not_found_handling` is set to `"single-page-application"`, the adapter will render a SPA fallback index.html page regardless of the `fallback` option specified. + +For Cloudflare Pages, this page will only be served when a request that matches an entry in `routes.exclude` fails to match an asset. + +Most of the time `plaintext` is sufficient, but if you are using `routes.exclude` to manually +exclude a set of prerendered pages without exceeding the 100 route limit, you may wish to +use `spa` instead to avoid showing an unstyled 404 page to users. + +See Cloudflare Pages' [Not Found behaviour](https://developers.cloudflare.com/pages/configuration/serving-pages/#not-found-behavior) for more info. + +### routes + +Only for Cloudflare Pages. Allows you to customise the [`_routes.json`](https://developers.cloudflare.com/pages/functions/routing/#create-a-_routesjson-file) file generated by `adapter-cloudflare`. - `include` defines routes that will invoke a function, and defaults to `['/*']` - `exclude` defines routes that will _not_ invoke a function — this is a faster and cheaper way to serve your app's static assets. This array can include the following special values: @@ -47,19 +77,52 @@ The `routes` option allows you to customise the [`_routes.json`](https://develop You can have up to 100 `include` and `exclude` rules combined. Generally you can omit the `routes` options, but if (for example) your `` paths exceed that limit, you may find it helpful to manually create an `exclude` list that includes `'/articles/*'` instead of the auto-generated `['/articles/foo', '/articles/bar', '/articles/baz', ...]`. -## Deployment +## Cloudflare Workers + +### Basic configuration + +When building for Cloudflare Workers, this adapter expects to find a [Wrangler configuration file](https://developers.cloudflare.com/workers/configuration/sites/configuration/) in the project root. It should look something like this: + +```jsonc +/// file: wrangler.jsonc +{ + "name": "", + "main": ".svelte-kit/cloudflare/_worker.js", + "compatibility_date": "2025-01-01", + "assets": { + "binding": "ASSETS", + "directory": ".svelte-kit/cloudflare", + } +} +``` + +### Deployment + +Please follow the [framework guide](https://developers.cloudflare.com/workers/frameworks/framework-guides/svelte/) for Cloudflare Workers to begin. + +## Cloudflare Pages + +### Deployment + +Please follow the [Get Started Guide](https://developers.cloudflare.com/pages/get-started/) for Cloudflare Pages to begin. + +If you're using the [Git integration](https://developers.cloudflare.com/pages/get-started/git-integration/), your build settings should look like this: + +- Framework preset – SvelteKit +- Build command – `npm run build` or `vite build` +- Build output directory – `.svelte-kit/cloudflare` + +### Further reading -Please follow the [Get Started Guide](https://developers.cloudflare.com/pages/get-started) for Cloudflare Pages to begin. +You may wish to refer to [Cloudflare's documentation for deploying a SvelteKit site on Cloudflare Pages](https://developers.cloudflare.com/pages/framework-guides/deploy-a-svelte-kit-site/). -When configuring your project settings, you must use the following settings: +### Notes -- **Framework preset** – SvelteKit -- **Build command** – `npm run build` or `vite build` -- **Build output directory** – `.svelte-kit/cloudflare` +Functions contained in the [`/functions` directory](https://developers.cloudflare.com/pages/functions/routing/) at the project's root will _not_ be included in the deployment. Instead, functions should be implemented as [server endpoints](routing#server) in your SvelteKit app, which is compiled to a [single `_worker.js` file](https://developers.cloudflare.com/pages/functions/advanced-mode/). -## Bindings +## Runtime APIs -The [`env`](https://developers.cloudflare.com/workers/runtime-apis/fetch-event#parameters) object contains your project's [bindings](https://developers.cloudflare.com/workers/platform/environment-variables/), which consist of KV/DO namespaces, etc. It is passed to SvelteKit via the `platform` property, along with `context` and `caches`, meaning that you can access it in hooks and endpoints: +The [`env`](https://developers.cloudflare.com/workers/runtime-apis/fetch-event#parameters) object contains your project's [bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/), which consist of KV/DO namespaces, etc. It is passed to SvelteKit via the `platform` property, along with [`ctx`](https://developers.cloudflare.com/workers/runtime-apis/context/), [`caches`](https://developers.cloudflare.com/workers/runtime-apis/cache/), and [`cf`](https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties), meaning that you can access it in hooks and endpoints: ```js // @errors: 7031 @@ -68,19 +131,21 @@ export async function POST({ request, platform }) { } ``` -> SvelteKit's built-in `$env` module should be preferred for environment variables. +> [!NOTE] SvelteKit's built-in [`$env` module]($env-static-private) should be preferred for environment variables. -To make these types available to your app, reference them in your `src/app.d.ts`: +To make these types available to your app, install [`@cloudflare/workers-types`](https://www.npmjs.com/package/@cloudflare/workers-types) and reference them in your `src/app.d.ts`: -```diff +```ts /// file: src/app.d.ts ++++import { KVNamespace, DurableObjectNamespace } from '@cloudflare/workers-types';+++ + declare global { namespace App { interface Platform { -+ env?: { -+ YOUR_KV_NAMESPACE: KVNamespace; -+ YOUR_DURABLE_OBJECT_NAMESPACE: DurableObjectNamespace; -+ }; ++++ env?: { + YOUR_KV_NAMESPACE: KVNamespace; + YOUR_DURABLE_OBJECT_NAMESPACE: DurableObjectNamespace; + };+++ } } } @@ -88,24 +153,77 @@ declare global { export {}; ``` -### Testing Locally +### Testing locally -`platform.env` is only available in the final build and not in dev mode. For testing the build, you can use [wrangler](https://developers.cloudflare.com/workers/cli-wrangler) **version 3**. Once you have built your site, run `wrangler pages dev .svelte-kit/cloudflare`. Ensure you have your [bindings](https://developers.cloudflare.com/workers/wrangler/configuration/#bindings) in your `wrangler.toml`. +Cloudflare specific values in the `platform` property are emulated during dev and preview modes. Local [bindings](https://developers.cloudflare.com/workers/wrangler/configuration/#bindings) are created based on your [Wrangler configuration file](https://developers.cloudflare.com/workers/wrangler/) and are used to populate `platform.env` during development and preview. Use the adapter config [`platformProxy` option](#Options-platformProxy) to change your preferences for the bindings. -## Notes +For testing the build, you should use [Wrangler](https://developers.cloudflare.com/workers/wrangler/) version 4. Once you have built your site, run `wrangler dev .svelte-kit/cloudflare` if you're testing for Cloudflare Workers or `wrangler pages dev .svelte-kit/cloudflare` for Cloudflare Pages. -Functions contained in the `/functions` directory at the project's root will _not_ be included in the deployment, which is compiled to a [single `_worker.js` file](https://developers.cloudflare.com/pages/platform/functions/#advanced-mode). Functions should be implemented as [server endpoints](https://kit.svelte.dev/docs/routing#server) in your SvelteKit app. +## Headers and redirects -The `_headers` and `_redirects` files specific to Cloudflare Pages can be used for static asset responses (like images) by putting them into the `/static` folder. +The [`_headers`](https://developers.cloudflare.com/pages/configuration/headers/) and [`_redirects`](https://developers.cloudflare.com/pages/configuration/redirects/) files, specific to Cloudflare, can be used for static asset responses (like images) by putting them into the project root folder. -However, they will have no effect on responses dynamically rendered by SvelteKit, which should return custom headers or redirect responses from [server endpoints](https://kit.svelte.dev/docs/routing#server) or with the [`handle`](https://kit.svelte.dev/docs/hooks#server-hooks-handle) hook. +However, they will have no effect on responses dynamically rendered by SvelteKit, which should return custom headers or redirect responses from [server endpoints](routing#server) or with the [`handle`](hooks#Server-hooks-handle) hook. ## Troubleshooting -### Further reading +### Node.js compatibility + +If you would like to enable [Node.js compatibility](https://developers.cloudflare.com/workers/runtime-apis/nodejs/), you can add the `nodejs_compat` compatibility flag to your Wrangler configuration file: + +```jsonc +/// file: wrangler.jsonc +{ + "compatibility_flags": ["nodejs_compat"] +} +``` + +### Worker size limits -You may wish to refer to [Cloudflare's documentation for deploying a SvelteKit site](https://developers.cloudflare.com/pages/framework-guides/deploy-a-svelte-site). +When deploying your application, the server generated by SvelteKit is bundled into a single file. Wrangler will fail to publish your worker if it exceeds [the size limits](https://developers.cloudflare.com/workers/platform/limits/#worker-size) after minification. You're unlikely to hit this limit usually, but some large libraries can cause this to happen. In that case, you can try to reduce the size of your worker by only importing such libraries on the client side. See [the FAQ](./faq#How-do-I-use-a-client-side-library-accessing-document-or-window) for more information. ### Accessing the file system -You can't access the file system through methods like `fs.readFileSync` in Serverless/Edge environments. If you need to access files that way, do that during building the app through [prerendering](https://kit.svelte.dev/docs/page-options#prerender). If you have a blog for example and don't want to manage your content through a CMS, then you need to prerender the content (or prerender the endpoint from which you get it) and redeploy your blog everytime you add new content. +You can't use `fs` in Cloudflare Workers — you must [prerender](page-options#prerender) the routes in question. + +## Migrating from Workers Sites + +Cloudflare no longer recommends using [Workers Sites](https://developers.cloudflare.com/workers/configuration/sites/configuration/) and instead recommends using [Workers Static Assets](https://developers.cloudflare.com/workers/static-assets/). To migrate, replace `@sveltejs/adapter-cloudflare-workers` with `@sveltejs/adapter-cloudflare` and remove all `site` configuration settings from your Wrangler configuration file, then add the `assets.directory` and `assets.binding` configuration settings: + +### svelte.config.js + +```js +/// file: svelte.config.js +---import adapter from '@sveltejs/adapter-cloudflare-workers';--- ++++import adapter from '@sveltejs/adapter-cloudflare';+++ + +export default { + kit: { + adapter: adapter() + } +}; +``` + +### wrangler.toml + +```toml +/// file: wrangler.toml +---site.bucket = ".cloudflare/public"--- ++++assets.directory = ".cloudflare/public" +assets.binding = "ASSETS"+++ +``` + +### wrangler.jsonc + +```jsonc +/// file: wrangler.jsonc +{ +--- "site": { + "bucket": ".cloudflare/public" + },--- ++++ "assets": { + "directory": ".cloudflare/public", + "binding": "ASSETS" + }+++ +} +``` diff --git a/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md b/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md index 48d1335c206e..73a771459543 100644 --- a/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md +++ b/documentation/docs/25-build-and-deploy/70-adapter-cloudflare-workers.md @@ -2,9 +2,9 @@ title: Cloudflare Workers --- -To deploy to [Cloudflare Workers](https://workers.cloudflare.com/), use [`adapter-cloudflare-workers`](https://github.com/sveltejs/kit/tree/master/packages/adapter-cloudflare-workers). +> [!NOTE] `adapter-cloudflare-workers` has been deprecated in favour of [`adapter-cloudflare`](adapter-cloudflare). We recommend using `adapter-cloudflare` to deploy to Cloudflare Workers with [Static Assets](https://developers.cloudflare.com/workers/static-assets/) since Cloudflare Workers Sites will be deprecated in favour of it. -> Unless you have a specific reason to use `adapter-cloudflare-workers`, it's recommended that you use `adapter-cloudflare` instead. Both adapters have equivalent functionality, but Cloudflare Pages offers features like GitHub integration with automatic builds and deploys, preview deployments, instant rollback and so on. +To deploy to [Cloudflare Workers](https://workers.cloudflare.com/) with [Workers Sites](https://developers.cloudflare.com/workers/configuration/sites/), use `adapter-cloudflare-workers`. ## Usage @@ -17,69 +17,67 @@ import adapter from '@sveltejs/adapter-cloudflare-workers'; export default { kit: { - adapter: adapter() + adapter: adapter({ + // see below for options that can be set here + }) } }; ``` -## Basic Configuration +## Options + +### config -This adapter expects to find a [wrangler.toml](https://developers.cloudflare.com/workers/platform/sites/configuration) file in the project root. It should look something like this: +Path to your [Wrangler configuration file](https://developers.cloudflare.com/workers/wrangler/configuration/). If you would like to use a Wrangler configuration filename other than `wrangler.jsonc`, `wrangler.json`, or `wrangler.toml` you can specify it using this option. -```toml -/// file: wrangler.toml -name = "" -account_id = "" +### platformProxy -main = "./.cloudflare/worker.js" -site.bucket = "./.cloudflare/public" +Preferences for the emulated `platform.env` local bindings. See the [getPlatformProxy](https://developers.cloudflare.com/workers/wrangler/api/#parameters-1) Wrangler API documentation for a full list of options. -build.command = "npm run build" +## Basic Configuration -compatibility_date = "2021-11-12" -workers_dev = true +This adapter expects to find a [Wrangler configuration file](https://developers.cloudflare.com/workers/configuration/sites/configuration/) in the project root. It should look something like this: + +```jsonc +/// file: wrangler.jsonc +{ + "name": "", + "account_id": "", + "main": "./.cloudflare/worker.js", + "site": { + "bucket": "./.cloudflare/public" + }, + "build": { + "command": "npm run build" + }, + "compatibility_date": "2021-11-12" +} ``` -`` can be anything. `` can be found by logging into your [Cloudflare dashboard](https://dash.cloudflare.com) and grabbing it from the end of the URL: +`` can be anything. `` can be found by running `wrangler whoami` using the Wrangler CLI tool or by logging into your [Cloudflare dashboard](https://dash.cloudflare.com) and grabbing it from the end of the URL: ``` -https://dash.cloudflare.com/ +https://dash.cloudflare.com//home ``` -> You should add the `.cloudflare` directory (or whichever directories you specified for `main` and `site.bucket`) to your `.gitignore`. +> [!NOTE] You should add the `.cloudflare` directory (or whichever directories you specified for `main` and `site.bucket`) and the `.wrangler` directory to your `.gitignore`. -You will need to install [wrangler](https://developers.cloudflare.com/workers/wrangler/get-started/) and log in, if you haven't already: +You will need to install [Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/) and log in, if you haven't already: -``` -npm i -g wrangler +```bash +npm i -D wrangler wrangler login ``` Then, you can build your app and deploy it: -```sh -wrangler publish +```bash +wrangler deploy ``` -## Custom config +## Runtime APIs -If you would like to use a config file other than `wrangler.toml`, you can do like so: - -```js -// @errors: 2307 -/// file: svelte.config.js -import adapter from '@sveltejs/adapter-cloudflare-workers'; - -export default { - kit: { - adapter: adapter({ config: '.toml' }) - } -}; -``` - -## Bindings - -The [`env`](https://developers.cloudflare.com/workers/runtime-apis/fetch-event#parameters) object contains your project's [bindings](https://developers.cloudflare.com/workers/platform/environment-variables/), which consist of KV/DO namespaces, etc. It is passed to SvelteKit via the `platform` property, along with `context` and `caches`, meaning that you can access it in hooks and endpoints: +The [`env`](https://developers.cloudflare.com/workers/runtime-apis/fetch-event#parameters) object contains your project's [bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/), which consist of KV/DO namespaces, etc. It is passed to SvelteKit via the `platform` property, along with [`ctx`](https://developers.cloudflare.com/workers/runtime-apis/context/), [`caches`](https://developers.cloudflare.com/workers/runtime-apis/cache/), and [`cf`](https://developers.cloudflare.com/workers/runtime-apis/request/#incomingrequestcfproperties), meaning that you can access it in hooks and endpoints: ```js // @errors: 7031 @@ -88,19 +86,21 @@ export async function POST({ request, platform }) { } ``` -> SvelteKit's built-in `$env` module should be preferred for environment variables. +> [!NOTE] SvelteKit's built-in [`$env` module]($env-static-private) should be preferred for environment variables. -To make these types available to your app, reference them in your `src/app.d.ts`: +To make these types available to your app, install [`@cloudflare/workers-types`](https://www.npmjs.com/package/@cloudflare/workers-types) and reference them in your `src/app.d.ts`: -```diff +```ts /// file: src/app.d.ts ++++import { KVNamespace, DurableObjectNamespace } from '@cloudflare/workers-types';+++ + declare global { namespace App { interface Platform { -+ env?: { -+ YOUR_KV_NAMESPACE: KVNamespace; -+ YOUR_DURABLE_OBJECT_NAMESPACE: DurableObjectNamespace; -+ }; ++++ env?: { + YOUR_KV_NAMESPACE: KVNamespace; + YOUR_DURABLE_OBJECT_NAMESPACE: DurableObjectNamespace; + };+++ } } } @@ -110,14 +110,27 @@ export {}; ### Testing Locally -`platform.env` is only available in the final build and not in dev mode. For testing the build, you can use [wrangler](https://developers.cloudflare.com/workers/cli-wrangler). Once you have built your site, run `wrangler dev`. Ensure you have your [bindings](https://developers.cloudflare.com/workers/wrangler/configuration/#bindings) in your `wrangler.toml`. Wrangler version 3 is recommended. +Cloudflare Workers specific values in the `platform` property are emulated during dev and preview modes. Local [bindings](https://developers.cloudflare.com/workers/wrangler/configuration/#bindings) are created based on your [Wrangler configuration file](https://developers.cloudflare.com/workers/wrangler/) and are used to populate `platform.env` during development and preview. Use the adapter config [`platformProxy` option](#Options-platformProxy) to change your preferences for the bindings. + +For testing the build, you should use [Wrangler](https://developers.cloudflare.com/workers/wrangler/) version 4. Once you have built your site, run `wrangler dev`. ## Troubleshooting +### Node.js compatibility + +If you would like to enable [Node.js compatibility](https://developers.cloudflare.com/workers/runtime-apis/nodejs/), you can add the `nodejs_compat` compatibility flag to your Wrangler configuration file: + +```jsonc +/// file: wrangler.jsonc +{ + "compatibility_flags": ["nodejs_compat"] +} +``` + ### Worker size limits -When deploying to workers, the server generated by SvelteKit is bundled into a single file. Wrangler will fail to publish your worker if it exceeds [the size limits](https://developers.cloudflare.com/workers/platform/limits/#worker-size) after minification. You're unlikely to hit this limit usually, but some large libraries can cause this to happen. In that case, you can try to reduce the size of your worker by only importing such libraries on the client side. See [the FAQ](./faq#how-do-i-use-x-with-sveltekit-how-do-i-use-a-client-side-only-library-that-depends-on-document-or-window) for more information. +When deploying your application, the server generated by SvelteKit is bundled into a single file. Wrangler will fail to publish your worker if it exceeds [the size limits](https://developers.cloudflare.com/workers/platform/limits/#worker-size) after minification. You're unlikely to hit this limit usually, but some large libraries can cause this to happen. In that case, you can try to reduce the size of your worker by only importing such libraries on the client side. See [the FAQ](./faq#How-do-I-use-a-client-side-library-accessing-document-or-window) for more information. ### Accessing the file system -You can't access the file system through methods like `fs.readFileSync` in Serverless/Edge environments. If you need to access files that way, do that during building the app through [prerendering](https://kit.svelte.dev/docs/page-options#prerender). If you have a blog for example and don't want to manage your content through a CMS, then you need to prerender the content (or prerender the endpoint from which you get it) and redeploy your blog everytime you add new content. +You can't use `fs` in Cloudflare Workers — you must [prerender](page-options#prerender) the routes in question. diff --git a/documentation/docs/25-build-and-deploy/80-adapter-netlify.md b/documentation/docs/25-build-and-deploy/80-adapter-netlify.md index 168f1bdc073d..75f2203df301 100644 --- a/documentation/docs/25-build-and-deploy/80-adapter-netlify.md +++ b/documentation/docs/25-build-and-deploy/80-adapter-netlify.md @@ -2,7 +2,7 @@ title: Netlify --- -To deploy to Netlify, use [`adapter-netlify`](https://github.com/sveltejs/kit/tree/master/packages/adapter-netlify). +To deploy to Netlify, use [`adapter-netlify`](https://github.com/sveltejs/kit/tree/main/packages/adapter-netlify). This adapter will be installed by default when you use [`adapter-auto`](adapter-auto), but adding it to your project allows you to specify Netlify-specific options. @@ -44,7 +44,7 @@ If the `netlify.toml` file or the `build.publish` value is missing, a default va ### Node version -New projects will use Node 16 by default. However, if you're upgrading a project you created a while ago it may be stuck on an older version. See [the Netlify docs](https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-and-javascript) for details on manually specifying Node 16 or newer. +New projects will use the current Node LTS version by default. However, if you're upgrading a project you created a while ago it may be stuck on an older version. See [the Netlify docs](https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-and-javascript) for details on manually specifying a current Node version. ## Netlify Edge Functions @@ -70,6 +70,10 @@ export default { You may build your app using functionality provided directly by SvelteKit without relying on any Netlify functionality. Using the SvelteKit versions of these features will allow them to be used in dev mode, tested with integration tests, and to work with other adapters should you ever decide to switch away from Netlify. However, in some scenarios you may find it beneficial to use the Netlify versions of these features. One example would be if you're migrating an app that's already hosted on Netlify to SvelteKit. +### `_headers` and `_redirects` + +The [`_headers`](https://docs.netlify.com/routing/headers/#syntax-for-the-headers-file) and [`_redirects`](https://docs.netlify.com/routing/redirects/redirect-options/) files specific to Netlify can be used for static asset responses (like images) by putting them into the project root folder. + ### Redirect rules During compilation, redirect rules are automatically appended to your `_redirects` file. (If it doesn't exist yet, it will be created.) That means: @@ -80,7 +84,7 @@ During compilation, redirect rules are automatically appended to your `_redirect ### Netlify Forms 1. Create your Netlify HTML form as described [here](https://docs.netlify.com/forms/setup/#html-forms), e.g. as `/routes/contact/+page.svelte`. (Don't forget to add the hidden `form-name` input element!) -2. Netlify's build bot parses your HTML files at deploy time, which means your form must be [prerendered](https://kit.svelte.dev/docs/page-options#prerender) as HTML. You can either add `export const prerender = true` to your `contact.svelte` to prerender just that page or set the `kit.prerender.force: true` option to prerender all pages. +2. Netlify's build bot parses your HTML files at deploy time, which means your form must be [prerendered](page-options#prerender) as HTML. You can either add `export const prerender = true` to your `contact.svelte` to prerender just that page or set the `kit.prerender.force: true` option to prerender all pages. 3. If your Netlify form has a [custom success message](https://docs.netlify.com/forms/setup/#success-messages) like `` then ensure the corresponding `/routes/success/+page.svelte` exists and is prerendered. ### Netlify Functions @@ -111,4 +115,8 @@ Additionally, you can add your own Netlify functions by creating a directory for ### Accessing the file system -You can't access the file system through methods like `fs.readFileSync` in Serverless/Edge environments. If you need to access files that way, do that during building the app through [prerendering](https://kit.svelte.dev/docs/page-options#prerender). If you have a blog for example and don't want to manage your content through a CMS, then you need to prerender the content (or prerender the endpoint from which you get it) and redeploy your blog everytime you add new content. +You can't use `fs` in edge deployments. + +You _can_ use it in serverless deployments, but it won't work as expected, since files are not copied from your project into your deployment. Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. `read` does not work inside edge deployments (this may change in future). + +Alternatively, you can [prerender](page-options#prerender) the routes in question. diff --git a/documentation/docs/25-build-and-deploy/90-adapter-vercel.md b/documentation/docs/25-build-and-deploy/90-adapter-vercel.md index 6f72025b9565..d15ae0f3aca3 100644 --- a/documentation/docs/25-build-and-deploy/90-adapter-vercel.md +++ b/documentation/docs/25-build-and-deploy/90-adapter-vercel.md @@ -2,7 +2,7 @@ title: Vercel --- -To deploy to Vercel, use [`adapter-vercel`](https://github.com/sveltejs/kit/tree/master/packages/adapter-vercel). +To deploy to Vercel, use [`adapter-vercel`](https://github.com/sveltejs/kit/tree/main/packages/adapter-vercel). This adapter will be installed by default when you use [`adapter-auto`](adapter-auto), but adding it to your project allows you to specify Vercel-specific options. @@ -18,7 +18,7 @@ import adapter from '@sveltejs/adapter-vercel'; export default { kit: { adapter: adapter({ - // see the 'Deployment configuration' section below + // see below for options that can be set here }) } }; @@ -44,13 +44,13 @@ export const config = { /// file: admin/+layout.js /** @type {import('@sveltejs/adapter-vercel').Config} */ export const config = { - runtime: 'nodejs18.x' + runtime: 'nodejs22.x' }; ``` The following options apply to all functions: -- `runtime`: `'edge'`, `'nodejs16.x'` or `'nodejs18.x'`. By default, the adapter will select `'nodejs16.x'` or `'nodejs18.x'` depending on the Node version your project is configured to use on the Vercel dashboard +- `runtime`: `'edge'`, `'nodejs18.x'`, `'nodejs20.x'` or `'nodejs22.x'`. By default, the adapter will select the `'nodejs.x'` corresponding to the Node version your project is configured to use on the Vercel dashboard - `regions`: an array of [edge network regions](https://vercel.com/docs/concepts/edge-network/regions) (defaulting to `["iad1"]` for serverless functions) or `'all'` if `runtime` is `edge` (its default). Note that multiple regions for serverless functions are only supported on Enterprise plans - `split`: if `true`, causes a route to be deployed as an individual function. If `split` is set to `true` at the adapter level, all routes will be deployed as individual functions @@ -59,48 +59,87 @@ Additionally, the following option applies to edge functions: And the following option apply to serverless functions: - `memory`: the amount of memory available to the function. Defaults to `1024` Mb, and can be decreased to `128` Mb or [increased](https://vercel.com/docs/concepts/limits/overview#serverless-function-memory) in 64Mb increments up to `3008` Mb on Pro or Enterprise accounts -- `maxDuration`: maximum execution duration of the function. Defaults to `10` seconds for Hobby accounts, `15` for Pro and `900` for Enterprise +- `maxDuration`: [maximum execution duration](https://vercel.com/docs/functions/runtimes#max-duration) of the function. Defaults to `10` seconds for Hobby accounts, `15` for Pro and `900` for Enterprise - `isr`: configuration Incremental Static Regeneration, described below If your functions need to access data in a specific region, it's recommended that they be deployed in the same region (or close to it) for optimal performance. +## Image Optimization + +You may set the `images` config to control how Vercel builds your images. See the [image configuration reference](https://vercel.com/docs/build-output-api/v3/configuration#images) for full details. As an example, you may set: + +```js +/// file: svelte.config.js +import adapter from '@sveltejs/adapter-vercel'; + +export default { + kit: { + adapter: adapter({ + images: { + sizes: [640, 828, 1200, 1920, 3840], + formats: ['image/avif', 'image/webp'], + minimumCacheTTL: 300, + domains: ['example-app.vercel.app'], + } + }) + } +}; +``` + ## Incremental Static Regeneration -Vercel supports [Incremental Static Regeneration](https://vercel.com/docs/concepts/incremental-static-regeneration/overview) (ISR), which provides the performance and cost advantages of prerendered content with the flexibility of dynamically rendered content. +Vercel supports [Incremental Static Regeneration](https://vercel.com/docs/incremental-static-regeneration) (ISR), which provides the performance and cost advantages of prerendered content with the flexibility of dynamically rendered content. + +> Use ISR only on routes where every visitor should see the same content (much like when you prerender). If there's anything user-specific happening (like session cookies), they should happen on the client via JavaScript only to not leak sensitive information across visits To add ISR to a route, include the `isr` property in your `config` object: ```js -/// file: blog/[slug]/+page.server.js -// @filename: ambient.d.ts -declare module '$env/static/private' { - export const BYPASS_TOKEN: string; -} - -// @filename: index.js -// ---cut--- +// @errors: 2664 import { BYPASS_TOKEN } from '$env/static/private'; export const config = { isr: { - // Expiration time (in seconds) before the cached asset will be re-generated by invoking the Serverless Function. - // Setting the value to `false` means it will never expire. expiration: 60, - - // Random token that can be provided in the URL to bypass the cached version of the asset, by requesting the asset - // with a __prerender_bypass= cookie. - // - // Making a `GET` or `HEAD` request with `x-prerender-revalidate: ` will force the asset to be re-validated. bypassToken: BYPASS_TOKEN, - - // List of valid query parameters. Other parameters (such as utm tracking codes) will be ignored, - // ensuring that they do not result in content being regenerated unnecessarily allowQuery: ['search'] } }; ``` -The `expiration` property is required; all others are optional. +> Using ISR on a route with `export const prerender = true` will have no effect, since the route is prerendered at build time + +The `expiration` property is required; all others are optional. The properties are discussed in more detail below. + +### expiration + +The expiration time (in seconds) before the cached asset will be re-generated by invoking the Serverless Function. Setting the value to `false` means it will never expire. In that case, you likely want to define a bypass token to re-generate on demand. + +### bypassToken + +A random token that can be provided in the URL to bypass the cached version of the asset, by requesting the asset with a `__prerender_bypass=` cookie. + +Making a `GET` or `HEAD` request with `x-prerender-revalidate: ` will force the asset to be re-validated. + +Note that the `BYPASS_TOKEN` string must be at least 32 characters long. You could generate one using the JavaScript console like so: + +```js +crypto.randomUUID(); +``` + +Set this string as an environment variable on Vercel by logging in and going to your project then Settings > Environment Variables. For "Key" put `BYPASS_TOKEN` and for "value" use the string generated above, then hit "Save". + +To get this key known about for local development, you can use the [Vercel CLI](https://vercel.com/docs/cli/env) by running the `vercel env pull` command locally like so: + +```bash +vercel env pull .env.development.local +``` + +### allowQuery + +A list of valid query parameters that contribute to the cache key. Other parameters (such as utm tracking codes) will be ignored, ensuring that they do not result in content being re-generated unnecessarily. By default, query parameters are ignored. + +> Pages that are [prerendered](page-options#prerender) will ignore ISR configuration. ## Environment variables @@ -122,8 +161,8 @@ export function load() { ```svelte

This staging environment was deployed from {data.deploymentGitBranch}.

@@ -131,18 +170,30 @@ export function load() { Since all of these variables are unchanged between build time and run time when building on Vercel, we recommend using `$env/static/private` — which will statically replace the variables, enabling optimisations like dead code elimination — rather than `$env/dynamic/private`. +## Skew protection + +When a new version of your app is deployed, assets belonging to the previous version may no longer be accessible. If a user is actively using your app when this happens, it can cause errors when they navigate — this is known as _version skew_. SvelteKit mitigates this by detecting errors resulting from version skew and causing a hard reload to get the latest version of the app, but this will cause any client-side state to be lost. (You can also proactively mitigate it by observing [`updated.current`]($app-state#updated) from `$app/state`, which tells clients when a new version has been deployed.) + +[Skew protection](https://vercel.com/docs/deployments/skew-protection) is a Vercel feature that routes client requests to their original deployment. When a user visits your app, a cookie is set with the deployment ID, and any subsequent requests will be routed to that deployment for as long as skew protection is active. When they reload the page, they will get the newest deployment. (`updated.current` is exempted from this behaviour, and so will continue to report new deployments.) To enable it, visit the Advanced section of your project settings on Vercel. + +Cookie-based skew protection comes with one caveat: if a user has multiple versions of your app open in multiple tabs, requests from older versions will be routed to the newer one, meaning they will fall back to SvelteKit's built-in skew protection. + ## Notes ### Vercel functions -If you have Vercel functions contained in the `api` directory at the project's root, any requests for `/api/*` will _not_ be handled by SvelteKit. You should implement these as [API routes](https://kit.svelte.dev/docs/routing#server) in your SvelteKit app instead, unless you need to use a non-JavaScript language in which case you will need to ensure that you don't have any `/api/*` routes in your SvelteKit app. +If you have Vercel functions contained in the `api` directory at the project's root, any requests for `/api/*` will _not_ be handled by SvelteKit. You should implement these as [API routes](routing#server) in your SvelteKit app instead, unless you need to use a non-JavaScript language in which case you will need to ensure that you don't have any `/api/*` routes in your SvelteKit app. ### Node version -Projects created before a certain date will default to using Node 14, while SvelteKit requires Node 16 or later. You can [change the Node version in your project settings](https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/node-js#node.js-version). +Projects created before a certain date may default to using an older Node version than what SvelteKit currently requires. You can [change the Node version in your project settings](https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/node-js#node.js-version). ## Troubleshooting ### Accessing the file system -You can't access the file system through methods like `fs.readFileSync` in Serverless/Edge environments. If you need to access files that way, do that during building the app through [prerendering](https://kit.svelte.dev/docs/page-options#prerender). If you have a blog for example and don't want to manage your content through a CMS, then you need to prerender the content (or prerender the endpoint from which you get it) and redeploy your blog everytime you add new content. +You can't use `fs` in edge functions. + +You _can_ use it in serverless functions, but it won't work as expected, since files are not copied from your project into your deployment. Instead, use the [`read`]($app-server#read) function from `$app/server` to access your files. `read` does not work inside routes deployed as edge functions (this may change in future). + +Alternatively, you can [prerender](page-options#prerender) the routes in question. diff --git a/documentation/docs/25-build-and-deploy/99-writing-adapters.md b/documentation/docs/25-build-and-deploy/99-writing-adapters.md index 25b22f4037fc..a2bfb50cd7b2 100644 --- a/documentation/docs/25-build-and-deploy/99-writing-adapters.md +++ b/documentation/docs/25-build-and-deploy/99-writing-adapters.md @@ -2,11 +2,12 @@ title: Writing adapters --- -If an adapter for your preferred environment doesn't yet exist, you can build your own. We recommend [looking at the source for an adapter](https://github.com/sveltejs/kit/tree/master/packages) to a platform similar to yours and copying it as a starting point. +If an adapter for your preferred environment doesn't yet exist, you can build your own. We recommend [looking at the source for an adapter](https://github.com/sveltejs/kit/tree/main/packages) to a platform similar to yours and copying it as a starting point. -Adapters packages must implement the following API, which creates an `Adapter`: +Adapter packages implement the following API, which creates an `Adapter`: ```js +// @errors: 2322 // @filename: ambient.d.ts type AdapterSpecificOptions = any; @@ -19,6 +20,21 @@ export default function (options) { name: 'adapter-package-name', async adapt(builder) { // adapter implementation + }, + async emulate() { + return { + async platform({ config, prerender }) { + // the returned object becomes `event.platform` during dev, build and + // preview. Its shape is that of `App.Platform` + } + } + }, + supports: { + read: ({ config, route }) => { + // Return `true` if the route with the given `config` can use `read` + // from `$app/server` in production, return `false` if it can't. + // Or throw a descriptive error describing how to configure the deployment + } } }; @@ -26,6 +42,8 @@ export default function (options) { } ``` +Of these, `name` and `adapt` are required. `emulate` and `supports` are optional. + Within the `adapt` method, there are a number of things that an adapter should do: - Clear out the build directory @@ -33,7 +51,7 @@ Within the `adapt` method, there are a number of things that an adapter should d - Output code that: - Imports `Server` from `${builder.getServerDirectory()}/index.js` - Instantiates the app with a manifest generated with `builder.generateManifest({ relativePath })` - - Listens for requests from the platform, converts them to a standard [Request](https://developer.mozilla.org/en-US/docs/Web/API/Request) if necessary, calls the `server.respond(request, { getClientAddress })` function to generate a [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) and responds with it + - Listens for requests from the platform, converts them to a standard [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) if necessary, calls the `server.respond(request, { getClientAddress })` function to generate a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) and responds with it - expose any platform-specific information to SvelteKit via the `platform` option passed to `server.respond` - Globally shims `fetch` to work on the target platform, if necessary. SvelteKit provides a `@sveltejs/kit/node/polyfills` helper for platforms that can use `undici` - Bundle the output to avoid needing to install dependencies on the target platform, if necessary diff --git a/documentation/docs/25-build-and-deploy/index.md b/documentation/docs/25-build-and-deploy/index.md new file mode 100644 index 000000000000..2c342fe66060 --- /dev/null +++ b/documentation/docs/25-build-and-deploy/index.md @@ -0,0 +1,3 @@ +--- +title: Build and deploy +--- diff --git a/documentation/docs/25-build-and-deploy/meta.json b/documentation/docs/25-build-and-deploy/meta.json deleted file mode 100644 index 528879bbebda..000000000000 --- a/documentation/docs/25-build-and-deploy/meta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "title": "Build and deploy" -} diff --git a/documentation/docs/30-advanced/10-advanced-routing.md b/documentation/docs/30-advanced/10-advanced-routing.md index ca84a27df22b..06122648f170 100644 --- a/documentation/docs/30-advanced/10-advanced-routing.md +++ b/documentation/docs/30-advanced/10-advanced-routing.md @@ -10,25 +10,25 @@ If the number of route segments is unknown, you can use rest syntax — for exam /[org]/[repo]/tree/[branch]/[...file] ``` -...in which case a request for `/sveltejs/kit/tree/master/documentation/docs/04-advanced-routing.md` would result in the following parameters being available to the page: +...in which case a request for `/sveltejs/kit/tree/main/documentation/docs/04-advanced-routing.md` would result in the following parameters being available to the page: ```js // @noErrors { org: 'sveltejs', repo: 'kit', - branch: 'master', + branch: 'main', file: 'documentation/docs/04-advanced-routing.md' } ``` -> `src/routes/a/[...rest]/z/+page.svelte` will match `/a/z` (i.e. there's no parameter at all) as well as `/a/b/z` and `/a/b/c/z` and so on. Make sure you check that the value of the rest parameter is valid, for example using a [matcher](#matching). +> [!NOTE] `src/routes/a/[...rest]/z/+page.svelte` will match `/a/z` (i.e. there's no parameter at all) as well as `/a/b/z` and `/a/b/c/z` and so on. Make sure you check that the value of the rest parameter is valid, for example using a [matcher](#Matching). ### 404 pages Rest parameters also allow you to render custom 404s. Given these routes... -``` +```tree src/routes/ ├ marx-brothers/ │ ├ chico/ @@ -40,10 +40,10 @@ src/routes/ ...the `marx-brothers/+error.svelte` file will _not_ be rendered if you visit `/marx-brothers/karl`, because no route was matched. If you want to render the nested error page, you should create a route that matches any `/marx-brothers/*` request, and return a 404 from it: -```diff +```tree src/routes/ ├ marx-brothers/ -+| ├ [...path]/ ++++| ├ [...path]/+++ │ ├ chico/ │ ├ harpo/ │ ├ groucho/ @@ -57,11 +57,11 @@ import { error } from '@sveltejs/kit'; /** @type {import('./$types').PageLoad} */ export function load(event) { - throw error(404, 'Not Found'); + error(404, 'Not Found'); } ``` -> If you don't handle 404 cases, they will appear in [`handleError`](hooks#shared-hooks-handleerror) +> [!NOTE] If you don't handle 404 cases, they will appear in [`handleError`](hooks#Shared-hooks-handleError) ## Optional parameters @@ -71,28 +71,31 @@ Note that an optional route parameter cannot follow a rest parameter (`[...rest] ## Matching -A route like `src/routes/archive/[page]` would match `/archive/3`, but it would also match `/archive/potato`. We don't want that. You can ensure that route parameters are well-formed by adding a _matcher_ — which takes the parameter string (`"3"` or `"potato"`) and returns `true` if it is valid — to your [`params`](configuration#files) directory... +A route like `src/routes/fruits/[page]` would match `/fruits/apple`, but it would also match `/fruits/rocketship`. We don't want that. You can ensure that route parameters are well-formed by adding a _matcher_ — which takes the parameter string (`"apple"` or `"rocketship"`) and returns `true` if it is valid — to your [`params`](configuration#files) directory... ```js -/// file: src/params/integer.js -/** @type {import('@sveltejs/kit').ParamMatcher} */ +/// file: src/params/fruit.js +/** + * @param {string} param + * @return {param is ('apple' | 'orange')} + * @satisfies {import('@sveltejs/kit').ParamMatcher} + */ export function match(param) { - return /^\d+$/.test(param); + return param === 'apple' || param === 'orange'; } ``` ...and augmenting your routes: -```diff --src/routes/archive/[page] -+src/routes/archive/[page=integer] +``` +src/routes/fruits/[page+++=fruit+++] ``` If the pathname doesn't match, SvelteKit will try to match other routes (using the sort order specified below), before eventually returning a 404. Each module in the `params` directory corresponds to a matcher, with the exception of `*.test.js` and `*.spec.js` files which may be used to unit test your matchers. -> Matchers run both on the server and in the browser. +> [!NOTE] Matchers run both on the server and in the browser. ## Sorting @@ -109,7 +112,7 @@ src/routes/foo-abc/+page.svelte SvelteKit needs to know which route is being requested. To do so, it sorts them according to the following rules... - More specific routes are higher priority (e.g. a route with no parameters is more specific than a route with one dynamic parameter, and so on) -- Parameters with [matchers](#matching) (`[name=type]`) are higher priority than those without (`[name]`) +- Parameters with [matchers](#Matching) (`[name=type]`) are higher priority than those without (`[name]`) - `[[optional]]` and `[...rest]` parameters are ignored unless they are the final part of the route, in which case they are treated with lowest priority. In other words `x/[[y]]/z` is treated equivalently to `x/z` for the purposes of sorting - Ties are resolved alphabetically @@ -162,7 +165,7 @@ src/routes/🤪/+page.svelte The format for a Unicode escape sequence is `[u+nnnn]` where `nnnn` is a valid value between `0000` and `10ffff`. (Unlike JavaScript string escaping, there's no need to use surrogate pairs to represent code points above `ffff`.) To learn more about Unicode encodings, consult [Programming with Unicode](https://unicodebook.readthedocs.io/unicode_encodings.html). -> Since TypeScript [struggles](https://github.com/microsoft/TypeScript/issues/13399) with directories with a leading `.` character, you may find it useful to encode these characters when creating e.g. [`.well-known`](https://en.wikipedia.org/wiki/Well-known_URI) routes: `src/routes/[x+2e]well-known/...` +> [!NOTE] Since TypeScript [struggles](https://github.com/microsoft/TypeScript/issues/13399) with directories with a leading `.` character, you may find it useful to encode these characters when creating e.g. [`.well-known`](https://en.wikipedia.org/wiki/Well-known_URI) routes: `src/routes/[x+2e]well-known/...` ## Advanced layouts @@ -172,13 +175,13 @@ By default, the _layout hierarchy_ mirrors the _route hierarchy_. In some cases, Perhaps you have some routes that are 'app' routes that should have one layout (e.g. `/dashboard` or `/item`), and others that are 'marketing' routes that should have a different layout (`/about` or `/testimonials`). We can group these routes with a directory whose name is wrapped in parentheses — unlike normal directories, `(app)` and `(marketing)` do not affect the URL pathname of the routes inside them: -```diff +```tree src/routes/ -+│ (app)/ ++++│ (app)/+++ │ ├ dashboard/ │ ├ item/ │ └ +layout.svelte -+│ (marketing)/ ++++│ (marketing)/+++ │ ├ about/ │ ├ testimonials/ │ └ +layout.svelte @@ -190,7 +193,7 @@ You can also put a `+page` directly inside a `(group)`, for example if `/` shoul ### Breaking out of layouts -The root layout applies to every page of your app — if omitted, it defaults to ``. If you want some pages to have a different layout hierarchy than the rest, then you can put your entire app inside one or more groups _except_ the routes that should not inherit the common layouts. +The root layout applies to every page of your app — if omitted, it defaults to `{@render children()}`. If you want some pages to have a different layout hierarchy than the rest, then you can put your entire app inside one or more groups _except_ the routes that should not inherit the common layouts. In the example above, the `/admin` route does not inherit either the `(app)` or `(marketing)` layouts. @@ -198,13 +201,13 @@ In the example above, the `/admin` route does not inherit either the `(app)` or Pages can break out of the current layout hierarchy on a route-by-route basis. Suppose we have an `/item/[id]/embed` route inside the `(app)` group from the previous example: -```diff +```tree src/routes/ ├ (app)/ │ ├ item/ │ │ ├ [id]/ │ │ │ ├ embed/ -+│ │ │ │ └ +page.svelte ++++│ │ │ │ └ +page.svelte+++ │ │ │ └ +layout.svelte │ │ └ +layout.svelte │ └ +layout.svelte @@ -218,13 +221,13 @@ Ordinarily, this would inherit the root layout, the `(app)` layout, the `item` l - `+page@(app).svelte` - inherits from `src/routes/(app)/+layout.svelte` - `+page@.svelte` - inherits from `src/routes/+layout.svelte` -```diff +```tree src/routes/ ├ (app)/ │ ├ item/ │ │ ├ [id]/ │ │ │ ├ embed/ -+│ │ │ │ └ +page@(app).svelte ++++│ │ │ │ └ +page@(app).svelte+++ │ │ │ └ +layout.svelte │ │ └ +layout.svelte │ └ +layout.svelte @@ -257,11 +260,11 @@ Not all use cases are suited for layout grouping, nor should you feel compelled - + {@render children()} ``` @@ -284,4 +287,4 @@ export function load(event) { ## Further reading -- [Tutorial: Advanced Routing](https://learn.svelte.dev/tutorial/optional-params) +- [Tutorial: Advanced Routing](/tutorial/kit/optional-params) diff --git a/documentation/docs/30-advanced/20-hooks.md b/documentation/docs/30-advanced/20-hooks.md index 02496849b69b..4a2239ad2240 100644 --- a/documentation/docs/30-advanced/20-hooks.md +++ b/documentation/docs/30-advanced/20-hooks.md @@ -4,14 +4,15 @@ title: Hooks 'Hooks' are app-wide functions you declare that SvelteKit will call in response to specific events, giving you fine-grained control over the framework's behaviour. -There are two hooks files, both optional: +There are three hooks files, all optional: - `src/hooks.server.js` — your app's server hooks - `src/hooks.client.js` — your app's client hooks +- `src/hooks.js` — your app's hooks that run on both the client and server Code in these modules will run when the application starts up, making them useful for initializing database clients and so on. -> You can configure the location of these files with [`config.kit.files.hooks`](configuration#files). +> [!NOTE] You can configure the location of these files with [`config.kit.files.hooks`](configuration#files). ## Server hooks @@ -19,7 +20,7 @@ The following hooks can be added to `src/hooks.server.js`: ### handle -This function runs every time the SvelteKit server receives a [request](web-standards#fetch-apis-request) — whether that happens while the app is running, or during [prerendering](page-options#prerender) — and determines the [response](web-standards#fetch-apis-response). It receives an `event` object representing the request and a function called `resolve`, which renders the route and generates a `Response`. This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing routes programmatically, for example). +This function runs every time the SvelteKit server receives a [request](web-standards#Fetch-APIs-Request) — whether that happens while the app is running, or during [prerendering](page-options#prerender) — and determines the [response](web-standards#Fetch-APIs-Response). It receives an `event` object representing the request and a function called `resolve`, which renders the route and generates a `Response`. This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing routes programmatically, for example). ```js /// file: src/hooks.server.js @@ -34,9 +35,15 @@ export async function handle({ event, resolve }) { } ``` -> Requests for static assets — which includes pages that were already prerendered — are _not_ handled by SvelteKit. +> [!NOTE] Requests for static assets — which includes pages that were already prerendered — are _not_ handled by SvelteKit. -If unimplemented, defaults to `({ event, resolve }) => resolve(event)`. To add custom data to the request, which is passed to handlers in `+server.js` and server `load` functions, populate the `event.locals` object, as shown below. +If unimplemented, defaults to `({ event, resolve }) => resolve(event)`. + +During prerendering, SvelteKit crawls your pages for links and renders each route it finds. Rendering the route invokes the `handle` function (and all other route dependencies, like `load`). If you need to exclude some code from running during this phase, check that the app is not [`building`]($app-environment#building) beforehand. + +### locals + +To add custom data to the request, which is passed to handlers in `+server.js` and server `load` functions, populate the `event.locals` object, as shown below. ```js /// file: src/hooks.server.js @@ -60,13 +67,20 @@ export async function handle({ event, resolve }) { event.locals.user = await getUserInformation(event.cookies.get('sessionid')); const response = await resolve(event); + + // Note that modifying response headers isn't always safe. + // Response objects can have immutable headers + // (e.g. Response.redirect() returned from an endpoint). + // Modifying immutable headers throws a TypeError. + // In that case, clone the response or avoid creating a + // response object with immutable headers. response.headers.set('x-custom-header', 'potato'); return response; } ``` -You can define multiple `handle` functions and execute them with [the `sequence` helper function](modules#sveltejs-kit-hooks). +You can define multiple `handle` functions and execute them with [the `sequence` helper function](@sveltejs-kit-hooks). `resolve` also supports a second, optional parameter that gives you more control over how the response will be rendered. That parameter is an object that can have the following fields: @@ -92,7 +106,7 @@ Note that `resolve(...)` will never throw an error, it will always return a `Pro ### handleFetch -This function allows you to modify (or replace) a `fetch` request that happens inside a `load` or `action` function that runs on the server (or during pre-rendering). +This function allows you to modify (or replace) the result of an [`event.fetch`](load#Making-fetch-requests) call that runs on the server (or during prerendering) inside an endpoint, `load`, `action`, `handle`, `handleError` or `reroute`. For example, your `load` function might make a request to a public URL like `https://api.yourapp.com` when the user performs a client-side navigation to the respective page, but during SSR it might make sense to hit the API directly (bypassing whatever proxies and load balancers sit between it and the public internet). @@ -112,13 +126,9 @@ export async function handleFetch({ request, fetch }) { } ``` -**Credentials** +Requests made with `event.fetch` follow the browser's credentials model — for same-origin requests, `cookie` and `authorization` headers are forwarded unless the `credentials` option is set to `"omit"`. For cross-origin requests, `cookie` will be included if the request URL belongs to a subdomain of the app — for example if your app is on `my-domain.com`, and your API is on `api.my-domain.com`, cookies will be included in the request. -For same-origin requests, SvelteKit's `fetch` implementation will forward `cookie` and `authorization` headers unless the `credentials` option is set to `"omit"`. - -For cross-origin requests, `cookie` will be included if the request URL belongs to a subdomain of the app — for example if your app is on `my-domain.com`, and your API is on `api.my-domain.com`, cookies will be included in the request. - -If your app and your API are on sibling subdomains — `www.my-domain.com` and `api.my-domain.com` for example — then a cookie belonging to a common parent domain like `my-domain.com` will _not_ be included, because SvelteKit has no way to know which domain the cookie belongs to. In these cases you will need to manually include the cookie using `handleFetch`: +There is one caveat: if your app and your API are on sibling subdomains — `www.my-domain.com` and `api.my-domain.com` for example — then a cookie belonging to a common parent domain like `my-domain.com` will _not_ be included, because SvelteKit has no way to know which domain the cookie belongs to. In these cases you will need to manually include the cookie using `handleFetch`: ```js /// file: src/hooks.server.js @@ -139,12 +149,14 @@ The following can be added to `src/hooks.server.js` _and_ `src/hooks.client.js`: ### handleError -If an unexpected error is thrown during loading or rendering, this function will be called with the `error` and the `event`. This allows for two things: +If an [unexpected error](errors#Unexpected-errors) is thrown during loading, rendering, or from an endpoint, this function will be called with the `error`, `event`, `status` code and `message`. This allows for two things: - you can log the error -- you can generate a custom representation of the error that is safe to show to users, omitting sensitive details like messages and stack traces. The returned value becomes the value of `$page.error`. It defaults to `{ message: 'Not Found' }` in case of a 404 (you can detect them through `event.route.id` being `null`) and to `{ message: 'Internal Error' }` for everything else. To make this type-safe, you can customize the expected shape by declaring an `App.Error` interface (which must include `message: string`, to guarantee sensible fallback behavior). +- you can generate a custom representation of the error that is safe to show to users, omitting sensitive details like messages and stack traces. The returned value, which defaults to `{ message }`, becomes the value of `$page.error`. + +For errors thrown from your code (or library code called by your code) the status will be 500 and the message will be "Internal Error". While `error.message` may contain sensitive information that should not be exposed to users, `message` is safe (albeit meaningless to the average user). -The following code shows an example of typing the error shape as `{ message: string; errorId: string }` and returning it accordingly from the `handleError` functions: +To add more information to the `$page.error` object in a type-safe way, you can customize the expected shape by declaring an `App.Error` interface (which must include `message: string`, to guarantee sensible fallback behavior). This allows you to — for example — append a tracking ID for users to quote in correspondence with your technical support staff: ```ts /// file: src/app.d.ts @@ -162,25 +174,27 @@ export {}; ```js /// file: src/hooks.server.js -// @errors: 2322 +// @errors: 2322 2353 // @filename: ambient.d.ts -declare module '@sentry/node' { +declare module '@sentry/sveltekit' { export const init: (opts: any) => void; export const captureException: (error: any, opts: any) => void; } // @filename: index.js // ---cut--- -import * as Sentry from '@sentry/node'; -import crypto from 'crypto'; +import * as Sentry from '@sentry/sveltekit'; Sentry.init({/*...*/}) /** @type {import('@sveltejs/kit').HandleServerError} */ -export async function handleError({ error, event }) { +export async function handleError({ error, event, status, message }) { const errorId = crypto.randomUUID(); + // example integration with https://sentry.io/ - Sentry.captureException(error, { extra: { event, errorId } }); + Sentry.captureException(error, { + extra: { event, errorId, status } + }); return { message: 'Whoops!', @@ -191,24 +205,27 @@ export async function handleError({ error, event }) { ```js /// file: src/hooks.client.js -// @errors: 2322 +// @errors: 2322 2353 // @filename: ambient.d.ts -declare module '@sentry/svelte' { +declare module '@sentry/sveltekit' { export const init: (opts: any) => void; export const captureException: (error: any, opts: any) => void; } // @filename: index.js // ---cut--- -import * as Sentry from '@sentry/svelte'; +import * as Sentry from '@sentry/sveltekit'; Sentry.init({/*...*/}) /** @type {import('@sveltejs/kit').HandleClientError} */ -export async function handleError({ error, event }) { +export async function handleError({ error, event, status, message }) { const errorId = crypto.randomUUID(); + // example integration with https://sentry.io/ - Sentry.captureException(error, { extra: { event, errorId } }); + Sentry.captureException(error, { + extra: { event, errorId, status } + }); return { message: 'Whoops!', @@ -217,14 +234,108 @@ export async function handleError({ error, event }) { } ``` -> In `src/hooks.client.js`, the type of `handleError` is `HandleClientError` instead of `HandleServerError`, and `event` is a `NavigationEvent` rather than a `RequestEvent`. +> [!NOTE] In `src/hooks.client.js`, the type of `handleError` is `HandleClientError` instead of `HandleServerError`, and `event` is a `NavigationEvent` rather than a `RequestEvent`. -This function is not called for _expected_ errors (those thrown with the [`error`](modules#sveltejs-kit-error) function imported from `@sveltejs/kit`). +This function is not called for _expected_ errors (those thrown with the [`error`](@sveltejs-kit#error) function imported from `@sveltejs/kit`). During development, if an error occurs because of a syntax error in your Svelte code, the passed in error has a `frame` property appended highlighting the location of the error. -> Make sure that `handleError` _never_ throws an error +> [!NOTE] Make sure that `handleError` _never_ throws an error + +### init + +This function runs once, when the server is created or the app starts in the browser, and is a useful place to do asynchronous work such as initializing a database connection. + +> [!NOTE] If your environment supports top-level await, the `init` function is really no different from writing your initialisation logic at the top level of the module, but some environments — most notably, Safari — don't. + +```js +/// file: src/hooks.server.js +import * as db from '$lib/server/database'; + +/** @type {import('@sveltejs/kit').ServerInit} */ +export async function init() { + await db.connect(); +} +``` + +> [!NOTE] +> In the browser, asynchronous work in `init` will delay hydration, so be mindful of what you put in there. + +## Universal hooks + +The following can be added to `src/hooks.js`. Universal hooks run on both server and client (not to be confused with shared hooks, which are environment-specific). + +### reroute + +This function runs before `handle` and allows you to change how URLs are translated into routes. The returned pathname (which defaults to `url.pathname`) is used to select the route and its parameters. + +For example, you might have a `src/routes/[[lang]]/about/+page.svelte` page, which should be accessible as `/en/about` or `/de/ueber-uns` or `/fr/a-propos`. You could implement this with `reroute`: + +```js +/// file: src/hooks.js +// @errors: 2345 +// @errors: 2304 + +/** @type {Record} */ +const translated = { + '/en/about': '/en/about', + '/de/ueber-uns': '/de/about', + '/fr/a-propos': '/fr/about', +}; + +/** @type {import('@sveltejs/kit').Reroute} */ +export function reroute({ url }) { + if (url.pathname in translated) { + return translated[url.pathname]; + } +} +``` + +The `lang` parameter will be correctly derived from the returned pathname. + +Using `reroute` will _not_ change the contents of the browser's address bar, or the value of `event.url`. + +Since version 2.18, the `reroute` hook can be asynchronous, allowing it to (for example) fetch data from your backend to decide where to reroute to. Use this carefully and make sure it's fast, as it will delay navigation otherwise. If you need to fetch data, use the `fetch` provided as an argument. It has the [same benefits](load#Making-fetch-requests) as the `fetch` provided to `load` functions, with the caveat that `params` and `id` are unavailable to [`handleFetch`](#Server-hooks-handleFetch) because the route is not yet known. + +```js +/// file: src/hooks.js +// @errors: 2345` +// @errors: 2304 + +/** @type {import('@sveltejs/kit').Reroute} */ +export async function reroute({ url, fetch }) { + // Ask a special endpoint within your app about the destination + if (url.pathname === '/api/reroute') return; + + const api = new URL('/api/reroute', url); + api.searchParams.set('pathname', url.pathname); + + const result = await fetch(api).then(r => r.json()); + return result.pathname; +} +``` + + +> [!NOTE] `reroute` is considered a pure, idempotent function. As such, it must always return the same output for the same input and not have side effects. Under these assumptions, SvelteKit caches the result of `reroute` on the client so it is only called once per unique URL. + +### transport + +This is a collection of _transporters_, which allow you to pass custom types — returned from `load` and form actions — across the server/client boundary. Each transporter contains an `encode` function, which encodes values on the server (or returns a falsy value for anything that isn't an instance of the type) and a corresponding `decode` function: + +```js +/// file: src/hooks.js +import { Vector } from '$lib/math'; + +/** @type {import('@sveltejs/kit').Transport} */ +export const transport = { + Vector: { + encode: (value) => value instanceof Vector && [value.x, value.y], + decode: ([x, y]) => new Vector(x, y) + } +}; +``` + ## Further reading -- [Tutorial: Hooks](https://learn.svelte.dev/tutorial/handle) +- [Tutorial: Hooks](/tutorial/kit/handle) diff --git a/documentation/docs/30-advanced/25-errors.md b/documentation/docs/30-advanced/25-errors.md index 7a3ca93d70c0..17d7eabc8268 100644 --- a/documentation/docs/30-advanced/25-errors.md +++ b/documentation/docs/30-advanced/25-errors.md @@ -8,11 +8,11 @@ Errors are an inevitable fact of software development. SvelteKit handles errors SvelteKit distinguishes between expected and unexpected errors, both of which are represented as simple `{ message: string }` objects by default. -You can add additional properties, like a `code` or a tracking `id`, as shown in the examples below. (When using TypeScript this requires you to redefine the `Error` type as described in [type safety](errors#type-safety)). +You can add additional properties, like a `code` or a tracking `id`, as shown in the examples below. (When using TypeScript this requires you to redefine the `Error` type as described in [type safety](errors#Type-safety)). ## Expected errors -An _expected_ error is one created with the [`error`](modules#sveltejs-kit-error) helper imported from `@sveltejs/kit`: +An _expected_ error is one created with the [`error`](@sveltejs-kit#error) helper imported from `@sveltejs/kit`: ```js /// file: src/routes/blog/[slug]/+page.server.js @@ -31,7 +31,7 @@ export async function load({ params }) { const post = await db.getPost(params.slug); if (!post) { - throw error(404, { + error(404, { message: 'Not found' }); } @@ -40,33 +40,54 @@ export async function load({ params }) { } ``` -This tells SvelteKit to set the response status code to 404 and render an [`+error.svelte`](routing#error) component, where `$page.error` is the object provided as the second argument to `error(...)`. +This throws an exception that SvelteKit catches, causing it to set the response status code to 404 and render an [`+error.svelte`](routing#error) component, where `page.error` is the object provided as the second argument to `error(...)`. ```svelte -

{$page.error.message}

+

{page.error.message}

``` +> [!LEGACY] +> `$app/state` was added in SvelteKit 2.12. If you're using an earlier version or are using Svelte 4, use `$app/stores` instead. + You can add extra properties to the error object if needed... -```diff -throw error(404, { +```js +// @filename: ambient.d.ts +declare global { + namespace App { + interface Error { + message: string; + code: string; + } + } +} +export {} + +// @filename: index.js +import { error } from '@sveltejs/kit'; +// ---cut--- +error(404, { message: 'Not found', -+ code: 'NOT_FOUND' + +++code: 'NOT_FOUND'+++ }); ``` ...otherwise, for convenience, you can pass a string as the second argument: -```diff --throw error(404, { message: 'Not found' }); -+throw error(404, 'Not found'); +```js +import { error } from '@sveltejs/kit'; +// ---cut--- +---error(404, { message: 'Not found' });--- ++++error(404, 'Not found');+++ ``` +> [!NOTE] [In SvelteKit 1.x](migrating-to-sveltekit-2#redirect-and-error-are-no-longer-thrown-by-you) you had to `throw` the `error` yourself + ## Unexpected errors An _unexpected_ error is any other exception that occurs while handling a request. Since these can contain sensitive information, unexpected error messages and stack traces are not exposed to users. @@ -77,36 +98,7 @@ By default, unexpected errors are printed to the console (or, in production, you { "message": "Internal Error" } ``` -Unexpected errors will go through the [`handleError`](hooks#shared-hooks-handleerror) hook, where you can add your own error handling — for example, sending errors to a reporting service, or returning a custom error object. - -```js -/// file: src/hooks.server.js -// @errors: 2322 1360 2571 2339 -// @filename: ambient.d.ts -declare module '@sentry/node' { - export const init: (opts: any) => void; - export const captureException: (error: any, opts: any) => void; -} - -// @filename: index.js -// ---cut--- -import * as Sentry from '@sentry/node'; - -Sentry.init({/*...*/}) - -/** @type {import('@sveltejs/kit').HandleServerError} */ -export function handleError({ error, event }) { - // example integration with https://sentry.io/ - Sentry.captureException(error, { extra: { event } }); - - return { - message: 'Whoops!', - code: error?.code ?? 'UNKNOWN' - }; -} -``` - -> Make sure that `handleError` _never_ throws an error +Unexpected errors will go through the [`handleError`](hooks#Shared-hooks-handleError) hook, where you can add your own error handling — for example, sending errors to a reporting service, or returning a custom error object which becomes `$page.error`. ## Responses @@ -139,13 +131,13 @@ The exception is when the error occurs inside the root `+layout.js` or `+layout. If you're using TypeScript and need to customize the shape of errors, you can do so by declaring an `App.Error` interface in your app (by convention, in `src/app.d.ts`, though it can live anywhere that TypeScript can 'see'): -```diff +```ts /// file: src/app.d.ts declare global { namespace App { interface Error { -+ code: string; -+ id: string; ++++ code: string; + id: string;+++ } } } @@ -157,5 +149,5 @@ This interface always includes a `message: string` property. ## Further reading -- [Tutorial: Errors and redirects](https://learn.svelte.dev/tutorial/error-basics) -- [Tutorial: Hooks](https://learn.svelte.dev/tutorial/handle) +- [Tutorial: Errors and redirects](/tutorial/kit/error-basics) +- [Tutorial: Hooks](/tutorial/kit/handle) diff --git a/documentation/docs/30-advanced/30-link-options.md b/documentation/docs/30-advanced/30-link-options.md index 37d3c3a4c35f..bf368876ffa9 100644 --- a/documentation/docs/30-advanced/30-link-options.md +++ b/documentation/docs/30-advanced/30-link-options.md @@ -6,7 +6,7 @@ In SvelteKit, `
` elements (rather than framework-specific `` components You can customise the behaviour of links with `data-sveltekit-*` attributes. These can be applied to the `` itself, or to a parent element. -These options also apply to `` elements with [`method="GET"`](form-actions#get-vs-post). +These options also apply to `` elements with [`method="GET"`](form-actions#GET-vs-POST). ## data-sveltekit-preload-data @@ -37,7 +37,7 @@ In these cases, you can specify the `"tap"` value, which causes SvelteKit to cal ``` -> You can also programmatically invoke `preloadData` from `$app/navigation`. +> [!NOTE] You can also programmatically invoke `preloadData` from `$app/navigation`. Data will never be preloaded if the user has chosen reduced data usage, meaning [`navigator.connection.saveData`](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/saveData) is `true`. @@ -52,7 +52,7 @@ Even in cases where you don't want to preload _data_ for a link, it can be benef Note that `viewport` and `eager` only apply to links that are present in the DOM immediately following navigation — if a link is added later (in an `{#if ...}` block, for example) it will not be preloaded until triggered by `hover` or `tap`. This is to avoid performance pitfalls resulting from aggressively observing the DOM for changes. -> Since preloading code is a prerequisite for preloading data, this attribute will only have an effect if it specifies a more eager value than any `data-sveltekit-preload-data` attribute that is present. +> [!NOTE] Since preloading code is a prerequisite for preloading data, this attribute will only have an effect if it specifies a more eager value than any `data-sveltekit-preload-data` attribute that is present. As with `data-sveltekit-preload-data`, this attribute will be ignored if the user has chosen reduced data usage. @@ -80,7 +80,7 @@ Sometimes you don't want navigation to create a new entry in the browser's sessi ## data-sveltekit-keepfocus -Sometimes you don't want [focus to be reset](accessibility#focus-management) after navigation. For example, maybe you have a search form that submits as the user is typing, and you want to keep focus on the text input. Adding a `data-sveltekit-keepfocus` attribute to it... +Sometimes you don't want [focus to be reset](accessibility#Focus-management) after navigation. For example, maybe you have a search form that submits as the user is typing, and you want to keep focus on the text input. Adding a `data-sveltekit-keepfocus` attribute to it... ```html @@ -122,8 +122,8 @@ To disable any of these options inside an element where they have been enabled, ``` -To apply an attribute to an element conditionally, do this (`"true"` and `"false"` are both accepted values): +To apply an attribute to an element conditionally, do this: -```html -
-``` \ No newline at end of file +```svelte +
+``` diff --git a/documentation/docs/30-advanced/40-service-workers.md b/documentation/docs/30-advanced/40-service-workers.md index 33c90f663289..f57dba4abc7e 100644 --- a/documentation/docs/30-advanced/40-service-workers.md +++ b/documentation/docs/30-advanced/40-service-workers.md @@ -6,7 +6,7 @@ Service workers act as proxy servers that handle network requests inside your ap In SvelteKit, if you have a `src/service-worker.js` file (or `src/service-worker/index.js`) it will be bundled and automatically registered. You can change the [location of your service worker](configuration#files) if you need to. -You can [disable automatic registration](configuration#serviceworker) if you need to register the service worker with your own logic or use another solution. The default registration looks something like this: +You can [disable automatic registration](configuration#serviceWorker) if you need to register the service worker with your own logic or use another solution. The default registration looks something like this: ```js if ('serviceWorker' in navigator) { @@ -18,7 +18,7 @@ if ('serviceWorker' in navigator) { ## Inside the service worker -Inside the service worker you have access to the [`$service-worker` module](modules#$service-worker), which provides you with the paths to all static assets, build files and prerendered pages. You're also provided with an app version string, which you can use for creating a unique cache name, and the deployment's `base` path. If your Vite config specifies `define` (used for global variable replacements), this will be applied to service workers as well as your server/client builds. +Inside the service worker you have access to the [`$service-worker` module]($service-worker), which provides you with the paths to all static assets, build files and prerendered pages. You're also provided with an app version string, which you can use for creating a unique cache name, and the deployment's `base` path. If your Vite config specifies `define` (used for global variable replacements), this will be applied to service workers as well as your server/client builds. The following example caches the built app and any files in `static` eagerly, and caches all other requests as they happen. This would make each page work offline once visited. @@ -66,7 +66,11 @@ self.addEventListener('fetch', (event) => { // `build`/`files` can always be served from the cache if (ASSETS.includes(url.pathname)) { - return cache.match(url.pathname); + const response = await cache.match(url.pathname); + + if (response) { + return response; + } } // for everything else, try the network first, but @@ -74,13 +78,27 @@ self.addEventListener('fetch', (event) => { try { const response = await fetch(event.request); + // if we're offline, fetch can return a value that is not a Response + // instead of throwing - and we can't pass this non-Response to respondWith + if (!(response instanceof Response)) { + throw new Error('invalid response from fetch'); + } + if (response.status === 200) { cache.put(event.request, response.clone()); } return response; - } catch { - return cache.match(event.request); + } catch (err) { + const response = await cache.match(event.request); + + if (response) { + return response; + } + + // if there's no cache, then just error out + // as there is nothing we can do to respond to this request + throw err; } } @@ -88,7 +106,7 @@ self.addEventListener('fetch', (event) => { }); ``` -> Be careful when caching! In some cases, stale data might be worse than data that's unavailable while offline. Since browsers will empty caches if they get too full, you should also be careful about caching large assets like video files. +> [!NOTE] Be careful when caching! In some cases, stale data might be worse than data that's unavailable while offline. Since browsers will empty caches if they get too full, you should also be careful about caching large assets like video files. ## During development @@ -102,7 +120,7 @@ navigator.serviceWorker.register('/service-worker.js', { }); ``` -> `build` and `prerendered` are empty arrays during development +> [!NOTE] `build` and `prerendered` are empty arrays during development ## Type safety @@ -125,8 +143,12 @@ const sw = /** @type {ServiceWorkerGlobalScope} */ (/** @type {unknown} */ (self const sw = self as unknown as ServiceWorkerGlobalScope; ``` -This disables access to DOM typings like `HTMLElement` which are not available inside a service worker and instantiates the correct globals. The reassignment of `self` to `sw` allows you to type cast it in the process (there are a couple of ways to do this, but the easiest that requires no additional files). Use `sw` instead of `self` in the rest of the file. The reference to the SvelteKit types ensures that the `$service-worker` import has proper type definitions. +This disables access to DOM typings like `HTMLElement` which are not available inside a service worker and instantiates the correct globals. The reassignment of `self` to `sw` allows you to type cast it in the process (there are a couple of ways to do this, but this is the easiest that requires no additional files). Use `sw` instead of `self` in the rest of the file. The reference to the SvelteKit types ensures that the `$service-worker` import has proper type definitions. If you import `$env/static/public` you either have to `// @ts-ignore` the import or add `/// ` to the reference types. ## Other solutions -SvelteKit's service worker implementation is deliberately low-level. If you need a more full-flegded but also more opinionated solution, we recommend looking at solutions like [Vite PWA plugin](https://vite-pwa-org.netlify.app/frameworks/sveltekit.html), which uses [Workbox](https://web.dev/learn/pwa/workbox). For more general information on service workers, we recommend [the MDN web docs](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers). +SvelteKit's service worker implementation is designed to be easy to work with and is probably a good solution for most users. However, outside of SvelteKit, many PWA applications leverage the [Workbox](https://web.dev/learn/pwa/workbox) library. If you're used to using Workbox you may prefer [Vite PWA plugin](https://vite-pwa-org.netlify.app/frameworks/sveltekit.html). + +## References + +For more general information on service workers, we recommend [the MDN web docs](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers). diff --git a/documentation/docs/30-advanced/50-server-only-modules.md b/documentation/docs/30-advanced/50-server-only-modules.md index 78f3a75da261..34299d1ddaf9 100644 --- a/documentation/docs/30-advanced/50-server-only-modules.md +++ b/documentation/docs/30-advanced/50-server-only-modules.md @@ -6,7 +6,11 @@ Like a good friend, SvelteKit keeps your secrets. When writing your backend and ## Private environment variables -The `$env/static/private` and `$env/dynamic/private` modules, which are covered in the [modules](modules) section, can only be imported into modules that only run on the server, such as [`hooks.server.js`](hooks#server-hooks) or [`+page.server.js`](routing#page-page-server-js). +The [`$env/static/private`]($env-static-private) and [`$env/dynamic/private`]($env-dynamic-private) modules can only be imported into modules that only run on the server, such as [`hooks.server.js`](hooks#Server-hooks) or [`+page.server.js`](routing#page-page.server.js). + +## Server-only utilities + +The [`$app/server`]($app-server) module, which contains a [`read`]($app-server#read) function for reading assets from the filesystem, can likewise only be imported by code that runs on the server. ## Your modules @@ -53,8 +57,8 @@ Even though the public-facing code — `src/routes/+page.svelte` — only uses t This feature also works with dynamic imports, even interpolated ones like ``await import(`./${foo}.js`)``, with one small caveat: during development, if there are two or more dynamic imports between the public-facing code and the server-only module, the illegal import will not be detected the first time the code is loaded. -> Unit testing frameworks like Vitest do not distinguish between server-only and public-facing code. For this reason, illegal import detection is disabled when running tests, as determined by `process.env.TEST === 'true'`. +> [!NOTE] Unit testing frameworks like Vitest do not distinguish between server-only and public-facing code. For this reason, illegal import detection is disabled when running tests, as determined by `process.env.TEST === 'true'`. ## Further reading -- [Tutorial: Environment variables](https://learn.svelte.dev/tutorial/env-static-private) +- [Tutorial: Environment variables](/tutorial/kit/env-static-private) diff --git a/documentation/docs/30-advanced/60-assets.md b/documentation/docs/30-advanced/60-assets.md deleted file mode 100644 index 98edc45dd91b..000000000000 --- a/documentation/docs/30-advanced/60-assets.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Asset handling ---- - -## Caching and inlining - -[Vite will automatically process imported assets](https://vitejs.dev/guide/assets.html) for improved performance. Hashes will be added to the filenames so that they can be cached and assets smaller than `assetsInlineLimit` will be inlined. - -```html - - -The project logo -``` - -If you prefer to reference assets directly in the markup, you can use a preprocessor such as [svelte-preprocess-import-assets](https://github.com/bluwy/svelte-preprocess-import-assets). - -For assets included via the CSS `url()` function, you may find [`vitePreprocess`](https://kit.svelte.dev/docs/integrations#preprocessors-vitepreprocess) useful. - -## Transforming - -You may wish to transform your images to output compressed image formats such as `.webp` or `.avif`, responsive images with different sizes for different devices, or images with the EXIF data stripped for privacy. For images that are included statically, you may use a Vite plugin such as [vite-imagetools](https://github.com/JonasKruckenberg/imagetools). You may also consider a CDN, which can serve the appropriate transformed image based on the `Accept` HTTP header and query string parameters. diff --git a/documentation/docs/30-advanced/65-snapshots.md b/documentation/docs/30-advanced/65-snapshots.md index 2ea91be8b357..cc7477f0fe66 100644 --- a/documentation/docs/30-advanced/65-snapshots.md +++ b/documentation/docs/30-advanced/65-snapshots.md @@ -4,14 +4,14 @@ title: Snapshots Ephemeral DOM state — like scroll positions on sidebars, the content of `` elements and so on — is discarded when you navigate from one page to another. -For example, if the user fills out a form but clicks a link before submitting, then hits the browser's back button, the values they filled in will be lost. In cases where it's valuable to preserve that input, you can take a _snapshot_ of DOM state, which can then be restored if the user navigates back. +For example, if the user fills out a form but navigates away and then back before submitting, or if the user refreshes the page, the values they filled in will be lost. In cases where it's valuable to preserve that input, you can take a _snapshot_ of DOM state, which can then be restored if the user navigates back. To do this, export a `snapshot` object with `capture` and `restore` methods from a `+page.svelte` or `+layout.svelte`: ```svelte + +{#if page.state.showModal} + history.back()} /> +{/if} +``` + +The modal can be dismissed by navigating back (unsetting `page.state.showModal`) or by interacting with it in a way that causes the `close` callback to run, which will navigate back programmatically. + +## API + +The first argument to `pushState` is the URL, relative to the current URL. To stay on the current URL, use `''`. + +The second argument is the new page state, which can be accessed via the [page object]($app-state#page) as `page.state`. You can make page state type-safe by declaring an [`App.PageState`](types#PageState) interface (usually in `src/app.d.ts`). + +To set page state without creating a new history entry, use `replaceState` instead of `pushState`. + +> [!LEGACY] +> `page.state` from `$app/state` was added in SvelteKit 2.12. If you're using an earlier version or are using Svelte 4, use `$page.state` from `$app/stores` instead. + +## Loading data for a route + +When shallow routing, you may want to render another `+page.svelte` inside the current page. For example, clicking on a photo thumbnail could pop up the detail view without navigating to the photo page. + +For this to work, you need to load the data that the `+page.svelte` expects. A convenient way to do this is to use [`preloadData`]($app-navigation#preloadData) inside the `click` handler of an `` element. If the element (or a parent) uses [`data-sveltekit-preload-data`](link-options#data-sveltekit-preload-data), the data will have already been requested, and `preloadData` will reuse that request. + +```svelte + + + +{#each data.thumbnails as thumbnail} + { + if (innerWidth < 640 // bail if the screen is too small + || e.shiftKey // or the link is opened in a new window + || e.metaKey || e.ctrlKey // or a new tab (mac: metaKey, win/linux: ctrlKey) + // should also consider clicking with a mouse scroll wheel + ) return; + + // prevent navigation + e.preventDefault(); + + const { href } = e.currentTarget; + + // run `load` functions (or rather, get the result of the `load` functions + // that are already running because of `data-sveltekit-preload-data`) + const result = await preloadData(href); + + if (result.type === 'loaded' && result.status === 200) { + pushState(href, { selected: result.data }); + } else { + // something bad happened! try navigating + goto(href); + } + }} + > + {thumbnail.alt} + +{/each} + +{#if page.state.selected} + history.back()}> + + + +{/if} +``` + +## Caveats + +During server-side rendering, `page.state` is always an empty object. The same is true for the first page the user lands on — if the user reloads the page (or returns from another document), state will _not_ be applied until they navigate. + +Shallow routing is a feature that requires JavaScript to work. Be mindful when using it and try to think of sensible fallback behavior in case JavaScript isn't available. diff --git a/documentation/docs/30-advanced/70-packaging.md b/documentation/docs/30-advanced/70-packaging.md index 602bce96860b..285094390c94 100644 --- a/documentation/docs/30-advanced/70-packaging.md +++ b/documentation/docs/30-advanced/70-packaging.md @@ -2,18 +2,18 @@ title: Packaging --- -You can use SvelteKit to build apps as well as component libraries, using the `@sveltejs/package` package (`npm create svelte` has an option to set this up for you). +You can use SvelteKit to build apps as well as component libraries, using the `@sveltejs/package` package (`npx sv create` has an option to set this up for you). -When you're creating an app, the contents of `src/routes` is the public-facing stuff; [`src/lib`](modules#$lib) contains your app's internal library. +When you're creating an app, the contents of `src/routes` is the public-facing stuff; [`src/lib`]($lib) contains your app's internal library. A component library has the exact same structure as a SvelteKit app, except that `src/lib` is the public-facing bit, and your root `package.json` is used to publish the package. `src/routes` might be a documentation or demo site that accompanies the library, or it might just be a sandbox you use during development. -Running the `svelte-package` command from `@sveltejs/package` will take the contents of `src/lib` and generate a `dist` directory (which can be [configured](#options)) containing the following: +Running the `svelte-package` command from `@sveltejs/package` will take the contents of `src/lib` and generate a `dist` directory (which can be [configured](#Options)) containing the following: - All the files in `src/lib`. Svelte components will be preprocessed, TypeScript files will be transpiled to JavaScript. -- Type definitions (`d.ts` files) which are generated for Svelte, JavaScript and TypeScript files. You need to install `typescript >= 4.0.0` for this. Type definitions are placed next to their implementation, hand-written `d.ts` files are copied over as is. You can [disable generation](#options), but we strongly recommend against it — people using your library might use TypeScript, for which they require these type definition files. +- Type definitions (`d.ts` files) which are generated for Svelte, JavaScript and TypeScript files. You need to install `typescript >= 4.0.0` for this. Type definitions are placed next to their implementation, hand-written `d.ts` files are copied over as is. You can [disable generation](#Options), but we strongly recommend against it — people using your library might use TypeScript, for which they require these type definition files. -> `@sveltejs/package` version 1 generated a `package.json`. This is no longer the case and it will now use the `package.json` from your project and validate that it is correct instead. If you're still on version 1, see [this PR](https://github.com/sveltejs/kit/pull/8922) for migration instructions. +> [!NOTE] `@sveltejs/package` version 1 generated a `package.json`. This is no longer the case and it will now use the `package.json` from your project and validate that it is correct instead. If you're still on version 1, see [this PR](https://github.com/sveltejs/kit/pull/8922) for migration instructions. ## Anatomy of a package.json @@ -59,7 +59,7 @@ Read more about it [here](https://docs.npmjs.com/cli/v9/configuring-npm/package- ### exports -The `"exports"` field contains the package's entry points. If you set up a new library project through `npm create svelte@latest`, it's set to a single export, the package root: +The `"exports"` field contains the package's entry points. If you set up a new library project through `npx sv create`, it's set to a single export, the package root: ```json { @@ -84,7 +84,7 @@ The `types` and `svelte` keys are [export conditions](https://nodejs.org/api/pac - TypeScript sees the `types` condition and looks up the type definition file. If you don't publish type definitions, omit this condition. - Svelte-aware tooling sees the `svelte` condition and knows this is a Svelte component library. If you publish a library that does not export any Svelte components and that could also work in non-Svelte projects (for example a Svelte store library), you can replace this condition with `default`. -> Previous versions of `@sveltejs/package` also added a `package.json` export. This is no longer part of the template because all tooling can now deal with a `package.json` not being explicitly exported. +> [!NOTE] Previous versions of `@sveltejs/package` also added a `package.json` export. This is no longer part of the template because all tooling can now deal with a `package.json` not being explicitly exported. You can adjust `exports` to your liking and provide more entry points. For example, if instead of a `src/lib/index.js` file that re-exported components you wanted to expose a `src/lib/Foo.svelte` component directly, you could create the following export map... @@ -110,7 +110,7 @@ declare module 'your-library/Foo.svelte'; import Foo from 'your-library/Foo.svelte'; ``` -> Beware that doing this will need additional care if you provide type definitions. Read more about the caveat [here](#typescript) +> [!NOTE] Beware that doing this will need additional care if you provide type definitions. Read more about the caveat [here](#TypeScript) In general, each key of the exports map is the path the user will have to use to import something from your package, and the value is the path to the file that will be imported or a map of export conditions which in turn contains these file paths. @@ -118,7 +118,7 @@ Read more about `exports` [here](https://nodejs.org/docs/latest-v18.x/api/packag ### svelte -This is a legacy field that enabled tooling to recognise Svelte component libraries. It's no longer necessary when using the `svelte` [export condition](#anatomy-of-a-package-json-exports), but for backwards compatibility with outdated tooling that doesn't yet know about export conditions it's good to keep it around. It should point towards your root entry point. +This is a legacy field that enabled tooling to recognise Svelte component libraries. It's no longer necessary when using the `svelte` [export condition](#Anatomy-of-a-package.json-exports), but for backwards compatibility with outdated tooling that doesn't yet know about export conditions it's good to keep it around. It should point towards your root entry point. ```json { @@ -126,9 +126,38 @@ This is a legacy field that enabled tooling to recognise Svelte component librar } ``` +### sideEffects + +The `sideEffects` field in `package.json` is used by bundlers to determine if a module may contain code that has side effects. A module is considered to have side effects if it makes changes that are observable from other scripts outside the module when it's imported. For example, side effects include modifying global variables or the prototype of built-in JavaScript objects. Because a side effect could potentially affect the behavior of other parts of the application, these files/modules will be included in the final bundle regardless of whether their exports are used in the application. It is a best practice to avoid side effects in your code. + +Setting the `sideEffects` field in `package.json` can help the bundler to be more aggressive in eliminating unused exports from the final bundle, a process known as tree-shaking. This results in smaller and more efficient bundles. Different bundlers handle `sideEffects` in various manners. While not necessary for Vite, we recommend that libraries state that all CSS files have side effects so that your library will be [compatible with webpack](https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free). This is the configuration that comes with newly created projects: + +```json +/// file: package.json +{ + "sideEffects": ["**/*.css"] +} +``` + +> If the scripts in your library have side effects, ensure that you update the `sideEffects` field. All scripts are marked as side effect free by default in newly created projects. If a file with side effects is incorrectly marked as having no side effects, it can result in broken functionality. + +If your package has files with side effects, you can specify them in an array: + +```json +/// file: package.json +{ + "sideEffects": [ + "**/*.css", + "./dist/sideEffectfulFile.js" + ] +} +``` + +This will treat only the specified files as having side effects. + ## TypeScript -You should ship type definitions for your library even if you don't use TypeScript yourself so that people who do get proper intellisense when using your library. `@sveltejs/package` makes the process of generating types mostly opaque to you. By default, when packaging your library, type definitions are auto-generated for JavaScript, TypeScript and Svelte files. All you need to ensure is that the `types` condition in the [exports](#anatomy-of-a-package-json-exports) map points to the correct files. When initialising a library project through `npm create svelte@latest`, this is automatically setup for the root export. +You should ship type definitions for your library even if you don't use TypeScript yourself so that people who do get proper intellisense when using your library. `@sveltejs/package` makes the process of generating types mostly opaque to you. By default, when packaging your library, type definitions are auto-generated for JavaScript, TypeScript and Svelte files. All you need to ensure is that the `types` condition in the [exports](#Anatomy-of-a-package.json-exports) map points to the correct files. When initialising a library project through `npx sv create`, this is automatically setup for the root export. If you have something else than a root export however — for example providing a `your-library/foo` import — you need to take additional care for providing type definitions. Unfortunately, TypeScript by default will _not_ resolve the `types` condition for an export like `{ "./foo": { "types": "./dist/foo.d.ts", ... }}`. Instead, it will search for a `foo.d.ts` relative to the root of your library (i.e. `your-library/foo.d.ts` instead of `your-library/dist/foo.d.ts`). To fix this, you have two options: @@ -158,51 +187,69 @@ You can read more about that feature [here](https://www.typescriptlang.org/docs/ ## Best practices -You should avoid using [SvelteKit-specific modules](modules) like `$app` in your packages unless you intend for them to only be consumable by other SvelteKit projects. E.g. rather than using `import { browser } from '$app/environment'` you could use `import { BROWSER } from 'esm-env'` ([see esm-env docs](https://github.com/benmccann/esm-env)). You may also wish to pass in things like the current URL or a navigation action as a prop rather than relying directly on `$app/stores`, `$app/navigation`, etc. Writing your app in this more generic fashion will also make it easier to setup tools for testing, UI demos and so on. +You should avoid using SvelteKit-specific modules like `$app/environment` in your packages unless you intend for them to only be consumable by other SvelteKit projects. E.g. rather than using `import { browser } from '$app/environment'` you could use `import { BROWSER } from 'esm-env'` ([see esm-env docs](https://github.com/benmccann/esm-env)). You may also wish to pass in things like the current URL or a navigation action as a prop rather than relying directly on `$app/state`, `$app/navigation`, etc. Writing your app in this more generic fashion will also make it easier to setup tools for testing, UI demos and so on. Ensure that you add [aliases](configuration#alias) via `svelte.config.js` (not `vite.config.js` or `tsconfig.json`), so that they are processed by `svelte-package`. You should think carefully about whether or not the changes you make to your package are a bug fix, a new feature, or a breaking change, and update the package version accordingly. Note that if you remove any paths from `exports` or any `export` conditions inside them from your existing library, that should be regarded as a breaking change. -```diff +```json { "exports": { ".": { "types": "./dist/index.d.ts", // changing `svelte` to `default` is a breaking change: -- "svelte": "./dist/index.js" -+ "default": "./dist/index.js" +--- "svelte": "./dist/index.js"--- ++++ "default": "./dist/index.js"+++ }, // removing this is a breaking change: -- "./foo": { -- "types": "./dist/foo.d.ts", -- "svelte": "./dist/foo.js", -- "default": "./dist/foo.js" -- }, +--- "./foo": { + "types": "./dist/foo.d.ts", + "svelte": "./dist/foo.js", + "default": "./dist/foo.js" + },--- // adding this is ok: -+ "./bar": { -+ "types": "./dist/bar.d.ts", -+ "svelte": "./dist/bar.js", -+ "default": "./dist/bar.js" -+ } ++++ "./bar": { + "types": "./dist/bar.d.ts", + "svelte": "./dist/bar.js", + "default": "./dist/bar.js" + }+++ } } ``` +## Source maps + +You can create so-called declaration maps (`d.ts.map` files) by setting `"declarationMap": true` in your `tsconfig.json`. This will allow editors such as VS Code to go to the original `.ts` or `.svelte` file when using features like _Go to Definition_. This means you also need to publish your source files alongside your dist folder in a way that the relative path inside the declaration files leads to a file on disk. Assuming that you have all your library code inside `src/lib` as suggested by Svelte's CLI, this is as simple as adding `src/lib` to `files` in your `package.json`: + +```json +{ + "files": [ + "dist", + "!dist/**/*.test.*", + "!dist/**/*.spec.*", + +++"src/lib", + "!src/lib/**/*.test.*", + "!src/lib/**/*.spec.*"+++ + ] +} +``` + ## Options `svelte-package` accepts the following options: - `-w`/`--watch` — watch files in `src/lib` for changes and rebuild the package - `-i`/`--input` — the input directory which contains all the files of the package. Defaults to `src/lib` -- `-o`/`--o` — the output directory where the processed files are written to. Your `package.json`'s `exports` should point to files inside there, and the `files` array should include that folder. Defaults to `dist` +- `-o`/`--output` — the output directory where the processed files are written to. Your `package.json`'s `exports` should point to files inside there, and the `files` array should include that folder. Defaults to `dist` - `-t`/`--types` — whether or not to create type definitions (`d.ts` files). We strongly recommend doing this as it fosters ecosystem library quality. Defaults to `true` +- `--tsconfig` - the path to a tsconfig or jsconfig. When not provided, searches for the next upper tsconfig/jsconfig in the workspace path. ## Publishing To publish the generated package: -```sh +```bash npm publish ``` @@ -210,9 +257,9 @@ npm publish All relative file imports need to be fully specified, adhering to Node's ESM algorithm. This means that for a file like `src/lib/something/index.js`, you must include the filename with the extension: -```diff --import { something } from './something'; -+import { something } from './something/index.js'; +```js +// @errors: 2307 +import { something } from './something+++/index.js+++'; ``` If you are using TypeScript, you need to import `.ts` files the same way, but using a `.js` file ending, _not_ a `.ts` file ending. (This is a TypeScript design decision outside our control.) Setting `"moduleResolution": "NodeNext"` in your `tsconfig.json` or `jsconfig.json` will help you with this. diff --git a/documentation/docs/30-advanced/index.md b/documentation/docs/30-advanced/index.md new file mode 100644 index 000000000000..f8c158a040eb --- /dev/null +++ b/documentation/docs/30-advanced/index.md @@ -0,0 +1,3 @@ +--- +title: Advanced +--- diff --git a/documentation/docs/30-advanced/meta.json b/documentation/docs/30-advanced/meta.json deleted file mode 100644 index 59e6001d3dd5..000000000000 --- a/documentation/docs/30-advanced/meta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "title": "Advanced" -} diff --git a/documentation/docs/40-best-practices/03-auth.md b/documentation/docs/40-best-practices/03-auth.md new file mode 100644 index 000000000000..349548fdf1e3 --- /dev/null +++ b/documentation/docs/40-best-practices/03-auth.md @@ -0,0 +1,23 @@ +--- +title: Auth +--- + +Auth refers to authentication and authorization, which are common needs when building a web application. Authentication means verifying that the user is who they say they are based on their provided credentials. Authorization means determining which actions they are allowed to take. + +## Sessions vs tokens + +After the user has provided their credentials such as a username and password, we want to allow them to use the application without needing to provide their credentials again for future requests. Users are commonly authenticated on subsequent requests with either a session identifier or signed token such as a JSON Web Token (JWT). + +Session IDs are most commonly stored in a database. They can be immediately revoked, but require a database query to be made on each request. + +In contrast, JWT generally are not checked against a datastore, which means they cannot be immediately revoked. The advantage of this method is improved latency and reduced load on your datastore. + +## Integration points + +Auth [cookies](@sveltejs-kit#Cookies) can be checked inside [server hooks](hooks#Server-hooks). If a user is found matching the provided credentials, the user information can be stored in [`locals`](hooks#Server-hooks-locals). + +## Guides + +[Lucia](https://lucia-auth.com/) is a good reference for session-based web app auth. It contains example code snippets and projects for implementing session-based auth within SvelteKit and other JS projects. You can add code which follows the Lucia guide to your project with `npx sv create` when creating a new project or `npx sv add lucia` for an existing project. + +An auth system is tightly coupled to a web framework because most of the code lies in validating user input, handling errors, and directing users to the appropriate next page. As a result, many of the generic JS auth libraries include one or more web frameworks within them. For this reason, many users will find it preferrable to follow a SvelteKit-specific guide such as the examples found in [Lucia](https://lucia-auth.com/) rather than having multiple web frameworks inside their project. diff --git a/documentation/docs/40-best-practices/05-performance.md b/documentation/docs/40-best-practices/05-performance.md new file mode 100644 index 000000000000..2e358921dc7f --- /dev/null +++ b/documentation/docs/40-best-practices/05-performance.md @@ -0,0 +1,102 @@ +--- +title: Performance +--- + +Out of the box, SvelteKit does a lot of work to make your applications as performant as possible: + +- Code-splitting, so that only the code you need for the current page is loaded +- Asset preloading, so that 'waterfalls' (of files requesting other files) are prevented +- File hashing, so that your assets can be cached forever +- Request coalescing, so that data fetched from separate server `load` functions is grouped into a single HTTP request +- Parallel loading, so that separate universal `load` functions fetch data simultaneously +- Data inlining, so that requests made with `fetch` during server rendering can be replayed in the browser without issuing a new request +- Conservative invalidation, so that `load` functions are only re-run when necessary +- Prerendering (configurable on a per-route basis, if necessary) so that pages without dynamic data can be served instantaneously +- Link preloading, so that data and code requirements for a client-side navigation are eagerly anticipated + +Nevertheless, we can't (yet) eliminate all sources of slowness. To eke out maximum performance, you should be mindful of the following tips. + +## Diagnosing issues + +Google's [PageSpeed Insights](https://pagespeed.web.dev/) and (for more advanced analysis) [WebPageTest](https://www.webpagetest.org/) are excellent ways to understand the performance characteristics of a site that is already deployed to the internet. + +Your browser also includes useful developer tools for analysing your site, whether deployed or running locally: + +* Chrome - [Lighthouse](https://developer.chrome.com/docs/lighthouse/overview#devtools), [Network](https://developer.chrome.com/docs/devtools/network), and [Performance](https://developer.chrome.com/docs/devtools/performance) devtools +* Edge - [Lighthouse](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/lighthouse/lighthouse-tool), [Network](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/network/), and [Performance](https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/evaluate-performance/) devtools +* Firefox - [Network](https://firefox-source-docs.mozilla.org/devtools-user/network_monitor/) and [Performance](https://hacks.mozilla.org/2022/03/performance-tool-in-firefox-devtools-reloaded/) devtools +* Safari - [enhancing the performance of your webpage](https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/Web_Inspector_Tutorial/EnhancingyourWebpagesPerformance/EnhancingyourWebpagesPerformance.html) + +Note that your site running locally in `dev` mode will exhibit different behaviour than your production app, so you should do performance testing in [preview](building-your-app#Preview-your-app) mode after building. + +### Instrumenting + +If you see in the network tab of your browser that an API call is taking a long time and you'd like to understand why, you may consider instrumenting your backend with a tool like [OpenTelemetry](https://opentelemetry.io/) or [Server-Timing headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing). + +## Optimizing assets + +### Images + +Reducing the size of image files is often one of the most impactful changes you can make to a site's performance. Svelte provides the `@sveltejs/enhanced-img` package, detailed on the [images](images) page, for making this easier. Additionally, Lighthouse is useful for identifying the worst offenders. + +### Videos + +Video files can be very large, so extra care should be taken to ensure that they're optimized: + +- Compress videos with tools such as [Handbrake](https://handbrake.fr/). Consider converting the videos to web-friendly formats such as `.webm` or `.mp4`. +- You can [lazy-load videos](https://web.dev/articles/lazy-loading-video) located below the fold with `preload="none"` (though note that this will slow down playback when the user _does_ initiate it). +- Strip the audio track out of muted videos using a tool like [FFmpeg](https://ffmpeg.org/). + +### Fonts + +SvelteKit automatically preloads critical `.js` and `.css` files when the user visits a page, but it does _not_ preload fonts by default, since this may cause unnecessary files (such as font weights that are referenced by your CSS but not actually used on the current page) to be downloaded. Having said that, preloading fonts correctly can make a big difference to how fast your site feels. In your [`handle`](hooks#Server-hooks-handle) hook, you can call `resolve` with a `preload` filter that includes your fonts. + +You can reduce the size of font files by [subsetting](https://web.dev/learn/performance/optimize-web-fonts#subset_your_web_fonts) your fonts. + +## Reducing code size + +### Svelte version + +We recommend running the latest version of Svelte. Svelte 5 is smaller and faster than Svelte 4, which is smaller and faster than Svelte 3. + +### Packages + +[`rollup-plugin-visualizer`](https://www.npmjs.com/package/rollup-plugin-visualizer) can be helpful for identifying which packages are contributing the most to the size of your site. You may also find opportunities to remove code by manually inspecting the build output (use `build: { minify: false }` in your [Vite config](https://vitejs.dev/config/build-options.html#build-minify) to make the output readable, but remember to undo that before deploying your app), or via the network tab of your browser's devtools. + +### External scripts + +Try to minimize the number of third-party scripts running in the browser. For example, instead of using JavaScript-based analytics consider using server-side implementations, such as those offered by many platforms with SvelteKit adapters including [Cloudflare](https://www.cloudflare.com/web-analytics/), [Netlify](https://docs.netlify.com/monitor-sites/site-analytics/), and [Vercel](https://vercel.com/docs/analytics). + +To run third party scripts in a web worker (which avoids blocking the main thread), use [Partytown's SvelteKit integration](https://partytown.builder.io/sveltekit). + +### Selective loading + +Code imported with static `import` declarations will be automatically bundled with the rest of your page. If there is a piece of code you need only when some condition is met, use the dynamic `import(...)` form to selectively lazy-load the component. + +## Navigation + +### Preloading + +You can speed up client-side navigations by eagerly preloading the necessary code and data, using [link options](link-options). This is configured by default on the `` element when you create a new SvelteKit app. + +### Non-essential data + +For slow-loading data that isn't needed immediately, the object returned from your `load` function can contain promises rather than the data itself. For server `load` functions, this will cause the data to [stream](load#Streaming-with-promises) in after the navigation (or initial page load). + +### Preventing waterfalls + +One of the biggest performance killers is what is referred to as a _waterfall_, which is a series of requests that is made sequentially. This can happen on the server or in the browser. + +- Asset waterfalls can occur in the browser when your HTML requests JS which requests CSS which requests a background image and web font. SvelteKit will largely solve this class of problems for you by adding [`modulepreload`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/modulepreload) tags or headers, but you should view [the network tab in your devtools](#Diagnosing-issues) to check whether additional resources need to be preloaded. Pay special attention to this if you use web [fonts](#Optimizing-assets-Fonts) since they need to be handled manually. +- If a universal `load` function makes an API call to fetch the current user, then uses the details from that response to fetch a list of saved items, and then uses _that_ response to fetch the details for each item, the browser will end up making multiple sequential requests. This is deadly for performance, especially for users that are physically located far from your backend. Avoid this issue by using [server `load` functions](load#Universal-vs-server) where possible. +- Server `load` functions are also not immune to waterfalls (though they are much less costly since they rarely involve roundtrips with high latency). For example if you query a database to get the current user and then use that data to make a second query for a list of saved items, it will typically be more performant to issue a single query with a database join. + +## Hosting + +Your frontend should be located in the same data center as your backend to minimize latency. For sites with no central backend, many SvelteKit adapters support deploying to the _edge_, which means handling each user's requests from a nearby server. This can reduce load times significantly. Some adapters even support [configuring deployment on a per-route basis](page-options#config). You should also consider serving images from a CDN (which are typically edge networks) — the hosts for many SvelteKit adapters will do this automatically. + +Ensure your host uses HTTP/2 or newer. Vite's code splitting creates numerous small files for improved cacheability, which results in excellent performance, but this does assume that your files can be loaded in parallel with HTTP/2. + +## Further reading + +For the most part, building a performant SvelteKit app is the same as building any performant web app. You should be able to apply information from general performance resources such as [Core Web Vitals](https://web.dev/explore/learn-core-web-vitals) to any web experience you build. diff --git a/documentation/docs/40-best-practices/06-icons.md b/documentation/docs/40-best-practices/06-icons.md new file mode 100644 index 000000000000..20f8a9fab12b --- /dev/null +++ b/documentation/docs/40-best-practices/06-icons.md @@ -0,0 +1,11 @@ +--- +title: Icons +--- + +## CSS + +A great way to use icons is to define them purely via CSS. Iconify offers support for [many popular icon sets](https://icon-sets.iconify.design/) that [can be included via CSS](https://iconify.design/docs/usage/css/). This method can also be used with popular CSS frameworks by leveraging the Iconify [Tailwind CSS plugin](https://iconify.design/docs/usage/css/tailwind/) or [UnoCSS plugin](https://iconify.design/docs/usage/css/unocss/). As opposed to libraries based on Svelte components, it doesn't require each icon to be imported into your `.svelte` file. + +## Svelte + +There are many [icon libraries for Svelte](https://www.sveltesociety.dev/packages?category=icons). When choosing an icon library, it is recommended to avoid those that provide a `.svelte` file per icon as these libraries can have thousands of `.svelte` files which really slow down [Vite's dependency optimization](https://vite.dev/guide/dep-pre-bundling.html). This can become especially pathological if the icons are imported both via an umbrella import and subpath import [as described in the `vite-plugin-svelte` FAQ](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#what-is-going-on-with-vite-and-pre-bundling-dependencies). diff --git a/documentation/docs/40-best-practices/07-images.md b/documentation/docs/40-best-practices/07-images.md new file mode 100644 index 000000000000..c0cc54f2724a --- /dev/null +++ b/documentation/docs/40-best-practices/07-images.md @@ -0,0 +1,162 @@ +--- +title: Images +--- + +Images can have a big impact on your app's performance. For best results, you should optimize them by doing the following: + +- generate optimal formats like `.avif` and `.webp` +- create different sizes for different screens +- ensure that assets can be cached effectively + +Doing this manually is tedious. There are a variety of techniques you can use, depending on your needs and preferences. + +## Vite's built-in handling + +[Vite will automatically process imported assets](https://vitejs.dev/guide/assets.html) for improved performance. This includes assets referenced via the CSS `url()` function. Hashes will be added to the filenames so that they can be cached, and assets smaller than `assetsInlineLimit` will be inlined. Vite's asset handling is most often used for images, but is also useful for video, audio, etc. + +```svelte + + +The project logo +``` + +## @sveltejs/enhanced-img + +`@sveltejs/enhanced-img` is a plugin offered on top of Vite's built-in asset handling. It provides plug and play image processing that serves smaller file formats like `avif` or `webp`, automatically sets the intrinsic `width` and `height` of the image to avoid layout shift, creates images of multiple sizes for various devices, and strips EXIF data for privacy. It will work in any Vite-based project including, but not limited to, SvelteKit projects. + +> [!NOTE] As a build plugin, `@sveltejs/enhanced-img` can only optimize files located on your machine during the build process. If you have an image located elsewhere (such as a path served from your database, CMS, or backend), please read about [loading images dynamically from a CDN](#Loading-images-dynamically-from-a-CDN). + +### Setup + +Install: + +```bash +npm install --save-dev @sveltejs/enhanced-img +``` + +Adjust `vite.config.js`: + +```js +import { sveltekit } from '@sveltejs/kit/vite'; ++++import { enhancedImages } from '@sveltejs/enhanced-img';+++ +import { defineConfig } from 'vite'; + +export default defineConfig({ + plugins: [ + +++enhancedImages(), // must come before the SvelteKit plugin+++ + sveltekit() + ] +}); +``` + +Building will take longer on the first build due to the computational expense of transforming images. However, the build output will be cached in `./node_modules/.cache/imagetools` so that subsequent builds will be fast. + +### Basic usage + +Use in your `.svelte` components by using `` rather than `` and referencing the image file with a [Vite asset import](https://vitejs.dev/guide/assets.html#static-asset-handling) path: + +```svelte + +``` + +At build time, your `` tag will be replaced with an `` wrapped by a `` providing multiple image types and sizes. It's only possible to downscale images without losing quality, which means that you should provide the highest resolution image that you need — smaller versions will be generated for the various device types that may request an image. + +You should provide your image at 2x resolution for HiDPI displays (a.k.a. retina displays). `` will automatically take care of serving smaller versions to smaller devices. + +> [!NOTE] if you wish to use a [tag name CSS selector](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Basic_selectors#type_selectors) in your ` +``` + +### `srcset` and `sizes` + +If you have a large image, such as a hero image taking the width of the design, you should specify `sizes` so that smaller versions are requested on smaller devices. E.g. if you have a 1280px image you may want to specify something like: + +```svelte + +``` + +If `sizes` is specified, `` will generate small images for smaller devices and populate the `srcset` attribute. + +The smallest picture generated automatically will have a width of 540px. If you'd like smaller images or would otherwise like to specify custom widths, you can do that with the `w` query parameter: +```svelte + +``` + +If `sizes` is not provided, then a HiDPI/Retina image and a standard resolution image will be generated. The image you provide should be 2x the resolution you wish to display so that the browser can display that image on devices with a high [device pixel ratio](https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio). + +### Per-image transforms + +By default, enhanced images will be transformed to more efficient formats. However, you may wish to apply other transforms such as a blur, quality, flatten, or rotate operation. You can run per-image transforms by appending a query string: + +```svelte + +``` + +[See the imagetools repo for the full list of directives](https://github.com/JonasKruckenberg/imagetools/blob/main/docs/directives.md). + +## Loading images dynamically from a CDN + +In some cases, the images may not be accessible at build time — e.g. they may live inside a content management system or elsewhere. + +Using a content delivery network (CDN) can allow you to optimize these images dynamically, and provides more flexibility with regards to sizes, but it may involve some setup overhead and usage costs. Depending on caching strategy, the browser may not be able to use a cached copy of the asset until a [304 response](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304) is received from the CDN. Building HTML to target CDNs allows using an `` tag since the CDN can serve the appropriate format based on the `User-Agent` header, whereas build-time optimizations must produce `` tags with multiple sources. Finally, some CDNs may generate images lazily, which could have a negative performance impact for sites with low traffic and frequently changing images. + +CDNs can generally be used without any need for a library. However, there are a number of libraries with Svelte support that make it easier. [`@unpic/svelte`](https://unpic.pics/img/svelte/) is a CDN-agnostic library with support for a large number of providers. You may also find that specific CDNs like [Cloudinary](https://svelte.cloudinary.dev/) have Svelte support. Finally, some content management systems (CMS) which support Svelte (such as [Contentful](https://www.contentful.com/sveltekit-starter-guide/), [Storyblok](https://github.com/storyblok/storyblok-svelte), and [Contentstack](https://www.contentstack.com/docs/developers/sample-apps/build-a-starter-website-with-sveltekit-and-contentstack)) have built-in support for image handling. + +## Best practices + +- For each image type, use the appropriate solution from those discussed above. You can mix and match all three solutions in one project. For example, you may use Vite's built-in handling to provide images for `` tags, display images on your homepage with `@sveltejs/enhanced-img`, and display user-submitted content with a dynamic approach. +- Consider serving all images via CDN regardless of the image optimization types you use. CDNs reduce latency by distributing copies of static assets globally. +- Your original images should have a good quality/resolution and should have 2x the width it will be displayed at to serve HiDPI devices. Image processing can size images down to save bandwidth when serving smaller screens, but it would be a waste of bandwidth to invent pixels to size images up. +- For images which are much larger than the width of a mobile device (roughly 400px), such as a hero image taking the width of the page design, specify `sizes` so that smaller images can be served on smaller devices. +- For important images, such as the [largest contentful paint (LCP)](https://web.dev/articles/lcp) image, set `fetchpriority="high"` and avoid `loading="lazy"` to prioritize loading as early as possible. +- Give the image a container or styling so that it is constrained and does not jump around while the page is loading affecting your [cumulative layout shift (CLS)](https://web.dev/articles/cls). `width` and `height` help the browser to reserve space while the image is still loading, so `@sveltejs/enhanced-img` will add a `width` and `height` for you. +- Always provide a good `alt` text. The Svelte compiler will warn you if you don't do this. +- Do not use `em` or `rem` in `sizes` and change the default size of these measures. When used in `sizes` or `@media` queries, `em` and `rem` are both defined to mean the user's default `font-size`. For a `sizes` declaration like `sizes="(min-width: 768px) min(100vw, 108rem), 64rem"`, the actual `em` or `rem` that controls how the image is laid out on the page can be different if changed by CSS. For example, do not do something like `html { font-size: 62.5%; }` as the slot reserved by the browser preloader will now end up being larger than the actual slot of the CSS object model once it has been created. diff --git a/documentation/docs/40-best-practices/10-accessibility.md b/documentation/docs/40-best-practices/10-accessibility.md index af8264837004..a432acbe6687 100644 --- a/documentation/docs/40-best-practices/10-accessibility.md +++ b/documentation/docs/40-best-practices/10-accessibility.md @@ -2,9 +2,9 @@ title: Accessibility --- -SvelteKit strives to provide an accessible platform for your app by default. Svelte's [compile-time accessibility checks](https://svelte.dev/docs#accessibility-warnings) will also apply to any SvelteKit application you build. +SvelteKit strives to provide an accessible platform for your app by default. Svelte's [compile-time accessibility checks](../svelte/compiler-warnings) will also apply to any SvelteKit application you build. -Here's how SvelteKit's built-in accessibility features work and what you need to do to help these features to work as well as possible. Keep in mind that while SvelteKit provides an accessible foundation, you are still responsible for making sure your application code is accessible. If you're new to accessibility, see the ["further reading"](accessibility#further-reading) section of this guide for additional resources. +Here's how SvelteKit's built-in accessibility features work and what you need to do to help these features to work as well as possible. Keep in mind that while SvelteKit provides an accessible foundation, you are still responsible for making sure your application code is accessible. If you're new to accessibility, see the ["further reading"](accessibility#Further-reading) section of this guide for additional resources. We recognize that accessibility can be hard to get right. If you want to suggest improvements to how SvelteKit handles accessibility, please [open a GitHub issue](https://github.com/sveltejs/kit/issues). @@ -12,7 +12,7 @@ We recognize that accessibility can be hard to get right. If you want to suggest In traditional server-rendered applications, every navigation (e.g. clicking on an `` tag) triggers a full page reload. When this happens, screen readers and other assistive technology will read out the new page's title so that users understand that the page has changed. -Since navigation between pages in SvelteKit happens without reloading the page (known as [client-side routing](glossary#routing)), SvelteKit injects a [live region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) onto the page that will read out the new page name after each navigation. This determines the page name to announce by inspecting the `` element. +Since navigation between pages in SvelteKit happens without reloading the page (known as [client-side routing](glossary#Routing)), SvelteKit injects a [live region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) onto the page that will read out the new page name after each navigation. This determines the page name to announce by inspecting the `<title>` element. Because of this behavior, every page in your app should have a unique, descriptive title. In SvelteKit, you can do this by placing a `<svelte:head>` element on each page: @@ -23,13 +23,13 @@ Because of this behavior, every page in your app should have a unique, descripti </svelte:head> ``` -This will allow screen readers and other assistive technology to identify the new page after a navigation occurs. Providing a descriptive title is also important for [SEO](seo#manual-setup-title-and-meta). +This will allow screen readers and other assistive technology to identify the new page after a navigation occurs. Providing a descriptive title is also important for [SEO](seo#Manual-setup-title-and-meta). ## Focus management In traditional server-rendered applications, every navigation will reset focus to the top of the page. This ensures that people browsing the web with a keyboard or screen reader will start interacting with the page from the beginning. -To simulate this behavior during client-side routing, SvelteKit focuses the `<body>` element after each navigation and [enhanced form submission](https://kit.svelte.dev/docs/form-actions#progressive-enhancement). There is one exception - if an element with the [`autofocus`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus) attribute is present, SvelteKit will focus that element instead. Make sure to [consider the implications for assistive technology](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_considerations) when using that attribute. +To simulate this behavior during client-side routing, SvelteKit focuses the `<body>` element after each navigation and [enhanced form submission](form-actions#Progressive-enhancement). There is one exception - if an element with the [`autofocus`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus) attribute is present, SvelteKit will focus that element instead. Make sure to [consider the implications for assistive technology](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_considerations) when using that attribute. If you want to customize SvelteKit's focus management, you can use the `afterNavigate` hook: @@ -45,7 +45,7 @@ afterNavigate(() => { }); ``` -You can also programmatically navigate to a different page using the [`goto`](modules#$app-navigation-goto) function. By default, this will have the same client-side routing behavior as clicking on a link. However, `goto` also accepts a `keepFocus` option that will preserve the currently-focused element instead of resetting focus. If you enable this option, make sure the currently-focused element still exists on the page after navigation. If the element no longer exists, the user's focus will be lost, making for a confusing experience for assistive technology users. +You can also programmatically navigate to a different page using the [`goto`]($app-navigation#goto) function. By default, this will have the same client-side routing behavior as clicking on a link. However, `goto` also accepts a `keepFocus` option that will preserve the currently-focused element instead of resetting focus. If you enable this option, make sure the currently-focused element still exists on the page after navigation. If the element no longer exists, the user's focus will be lost, making for a confusing experience for assistive technology users. ## The "lang" attribute @@ -56,7 +56,7 @@ By default, SvelteKit's page template sets the default language of the document <html lang="de"> ``` -If your content is available in multiple languages, you should set the `lang` attribute based on the language of the current page. You can do this with SvelteKit's [handle hook](hooks#server-hooks-handle): +If your content is available in multiple languages, you should set the `lang` attribute based on the language of the current page. You can do this with SvelteKit's [handle hook](hooks#Server-hooks-handle): ```html /// file: src/app.html diff --git a/documentation/docs/40-best-practices/20-seo.md b/documentation/docs/40-best-practices/20-seo.md index d26e5fbd0ab2..7ca688cae108 100644 --- a/documentation/docs/40-best-practices/20-seo.md +++ b/documentation/docs/40-best-practices/20-seo.md @@ -8,49 +8,25 @@ The most important aspect of SEO is to create high-quality content that is widel ### SSR -While search engines have got better in recent years at indexing content that was rendered with client-side JavaScript, server-side rendered content is indexed more frequently and reliably. SvelteKit employs SSR by default, and while you can disable it in [`handle`](hooks#server-hooks-handle), you should leave it on unless you have a good reason not to. +While search engines have got better in recent years at indexing content that was rendered with client-side JavaScript, server-side rendered content is indexed more frequently and reliably. SvelteKit employs SSR by default, and while you can disable it in [`handle`](hooks#Server-hooks-handle), you should leave it on unless you have a good reason not to. -> SvelteKit's rendering is highly configurable and you can implement [dynamic rendering](https://developers.google.com/search/docs/advanced/javascript/dynamic-rendering) if necessary. It's not generally recommended, since SSR has other benefits beyond SEO. +> [!NOTE] SvelteKit's rendering is highly configurable and you can implement [dynamic rendering](https://developers.google.com/search/docs/advanced/javascript/dynamic-rendering) if necessary. It's not generally recommended, since SSR has other benefits beyond SEO. ### Performance -Signals such as [Core Web Vitals](https://web.dev/vitals/#core-web-vitals) impact search engine ranking. Because Svelte and SvelteKit introduce minimal overhead, it's easier to build high performance sites. You can test your site's performance using Google's [PageSpeed Insights](https://pagespeed.web.dev/) or [Lighthouse](https://developers.google.com/web/tools/lighthouse). +Signals such as [Core Web Vitals](https://web.dev/vitals/#core-web-vitals) impact search engine ranking. Because Svelte and SvelteKit introduce minimal overhead, it's easier to build high performance sites. You can test your site's performance using Google's [PageSpeed Insights](https://pagespeed.web.dev/) or [Lighthouse](https://developers.google.com/web/tools/lighthouse). Read [the performance page](performance) for more details. ### Normalized URLs -SvelteKit redirects pathnames with trailing slashes to ones without (or vice versa depending on your [configuration](page-options#trailingslash)), as duplicate URLs are bad for SEO. +SvelteKit redirects pathnames with trailing slashes to ones without (or vice versa depending on your [configuration](page-options#trailingSlash)), as duplicate URLs are bad for SEO. ## Manual setup ### <title> and <meta> -Every page should have well-written and unique `<title>` and `<meta name="description">` elements inside a [`<svelte:head>`](https://svelte.dev/docs#template-syntax-svelte-head). Guidance on how to write descriptive titles and descriptions, along with other suggestions on making content understandable by search engines, can be found on Google's [Lighthouse SEO audits](https://web.dev/lighthouse-seo/) documentation. +Every page should have well-written and unique `<title>` and `<meta name="description">` elements inside a [`<svelte:head>`](../svelte/svelte-head). Guidance on how to write descriptive titles and descriptions, along with other suggestions on making content understandable by search engines, can be found on Google's [Lighthouse SEO audits](https://web.dev/lighthouse-seo/) documentation. -> A common pattern is to return SEO-related `data` from page [`load`](load) functions, then use it (as [`$page.data`](modules#$app-stores)) in a `<svelte:head>` in your root [layout](routing#layout). - -### Structured data - -[Structured data](https://developers.google.com/search/docs/advanced/structured-data/intro-structured-data) helps search engines understand the content of a page. If you're using structured data alongside [`svelte-preprocess`](https://github.com/sveltejs/svelte-preprocess), you will need to explicitly preserve `ld+json` data (this [may change in future](https://github.com/sveltejs/svelte-preprocess/issues/305)): - -```js -/// file: svelte.config.js -// @filename: ambient.d.ts -declare module 'svelte-preprocess'; - -// @filename: index.js -// ---cut--- -import preprocess from 'svelte-preprocess'; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - preprocess: preprocess({ - preserve: ['ld+json'] - // ... - }) -}; - -export default config; -``` +> [!NOTE] A common pattern is to return SEO-related `data` from page [`load`](load) functions, then use it (as [`page.data`]($app-state)) in a `<svelte:head>` in your root [layout](routing#layout). ### Sitemaps @@ -83,7 +59,7 @@ export async function GET() { ### AMP -An unfortunate reality of modern web development is that it is sometimes necessary to create an [Accelerated Mobile Pages (AMP)](https://amp.dev/) version of your site. In SvelteKit this can be done by setting the [`inlineStyleThreshold`](configuration#inlinestylethreshold) option... +An unfortunate reality of modern web development is that it is sometimes necessary to create an [Accelerated Mobile Pages (AMP)](https://amp.dev/) version of your site. In SvelteKit this can be done by setting the [`inlineStyleThreshold`](configuration#inlineStyleThreshold) option... ```js /// file: svelte.config.js @@ -134,6 +110,11 @@ export async function handle({ event, resolve }) { To prevent shipping any unused CSS as a result of transforming the page to amp, we can use [`dropcss`](https://www.npmjs.com/package/dropcss): ```js +// @filename: ambient.d.ts +declare module 'dropcss'; + +// @filename: index.js +// ---cut--- /// file: src/hooks.server.js // @errors: 2307 import * as amp from '@sveltejs/amp'; @@ -166,4 +147,4 @@ export async function handle({ event, resolve }) { ``` -> It's a good idea to use the `handle` hook to validate the transformed HTML using `amphtml-validator`, but only if you're prerendering pages since it's very slow. +> [!NOTE] It's a good idea to use the `handle` hook to validate the transformed HTML using `amphtml-validator`, but only if you're prerendering pages since it's very slow. diff --git a/documentation/docs/40-best-practices/index.md b/documentation/docs/40-best-practices/index.md new file mode 100644 index 000000000000..182d497f4cce --- /dev/null +++ b/documentation/docs/40-best-practices/index.md @@ -0,0 +1,3 @@ +--- +title: Best practices +--- diff --git a/documentation/docs/40-best-practices/meta.json b/documentation/docs/40-best-practices/meta.json deleted file mode 100644 index 3b8b86368da7..000000000000 --- a/documentation/docs/40-best-practices/meta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "title": "Best practices" -} diff --git a/documentation/docs/50-reference/30-modules.md b/documentation/docs/50-reference/30-modules.md deleted file mode 100644 index 7140726eb783..000000000000 --- a/documentation/docs/50-reference/30-modules.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Modules ---- - -SvelteKit makes a number of modules available to your application. - -> MODULES diff --git a/documentation/docs/50-reference/40-types.md b/documentation/docs/50-reference/40-types.md deleted file mode 100644 index ba34e6543cb1..000000000000 --- a/documentation/docs/50-reference/40-types.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: Types ---- - -## Public types - -The following types can be imported from `@sveltejs/kit`: - -> TYPES: @sveltejs/kit - -## Private types - -The following are referenced by the public types documented above, but cannot be imported directly: - -> TYPES: Private types - -## Generated types - -The `RequestHandler` and `Load` types both accept a `Params` argument allowing you to type the `params` object. For example this endpoint expects `foo`, `bar` and `baz` params: - -```js -/// file: src/routes/[foo]/[bar]/[baz]/+page.server.js -// @errors: 2355 2322 1360 -/** @type {import('@sveltejs/kit').RequestHandler<{ - foo: string; - bar: string; - baz: string - }>} */ -export async function GET({ params }) { - // ... -} -``` - -Needless to say, this is cumbersome to write out, and less portable (if you were to rename the `[foo]` directory to `[qux]`, the type would no longer reflect reality). - -To solve this problem, SvelteKit generates `.d.ts` files for each of your endpoints and pages: - -```ts -/// file: .svelte-kit/types/src/routes/[foo]/[bar]/[baz]/$types.d.ts -/// link: false -import type * as Kit from '@sveltejs/kit'; - -type RouteParams = { - foo: string; - bar: string; - baz: string; -} - -export type PageServerLoad = Kit.ServerLoad<RouteParams>; -export type PageLoad = Kit.Load<RouteParams>; -``` - -These files can be imported into your endpoints and pages as siblings, thanks to the [`rootDirs`](https://www.typescriptlang.org/tsconfig#rootDirs) option in your TypeScript configuration: - -```js -/// file: src/routes/[foo]/[bar]/[baz]/+page.server.js -// @filename: $types.d.ts -import type * as Kit from '@sveltejs/kit'; - -type RouteParams = { - foo: string; - bar: string; - baz: string; -} - -export type PageServerLoad = Kit.ServerLoad<RouteParams>; - -// @filename: index.js -// @errors: 2355 -// ---cut--- -/** @type {import('./$types').PageServerLoad} */ -export async function GET({ params }) { - // ... -} -``` - -```js -/// file: src/routes/[foo]/[bar]/[baz]/+page.js -// @filename: $types.d.ts -import type * as Kit from '@sveltejs/kit'; - -type RouteParams = { - foo: string; - bar: string; - baz: string; -} - -export type PageLoad = Kit.Load<RouteParams>; - -// @filename: index.js -// @errors: 2355 -// ---cut--- -/** @type {import('./$types').PageLoad} */ -export async function load({ params, fetch }) { - // ... -} -``` - -> For this to work, your own `tsconfig.json` or `jsconfig.json` should extend from the generated `.svelte-kit/tsconfig.json` (where `.svelte-kit` is your [`outDir`](configuration#outdir)): -> -> `{ "extends": "./.svelte-kit/tsconfig.json" }` - -### Default tsconfig.json - -The generated `.svelte-kit/tsconfig.json` file contains a mixture of options. Some are generated programmatically based on your project configuration, and should generally not be overridden without good reason: - -```json -/// file: .svelte-kit/tsconfig.json -{ - "compilerOptions": { - "baseUrl": "..", - "paths": { - "$lib": "src/lib", - "$lib/*": "src/lib/*" - }, - "rootDirs": ["..", "./types"] - }, - "include": ["../src/**/*.js", "../src/**/*.ts", "../src/**/*.svelte"], - "exclude": ["../node_modules/**", "./**"] -} -``` - -Others are required for SvelteKit to work properly, and should also be left untouched unless you know what you're doing: - -```json -/// file: .svelte-kit/tsconfig.json -{ - "compilerOptions": { - // this ensures that types are explicitly - // imported with `import type`, which is - // necessary as svelte-preprocess cannot - // otherwise compile components correctly - "importsNotUsedAsValues": "error", - - // Vite compiles one TypeScript module - // at a time, rather than compiling - // the entire module graph - "isolatedModules": true, - - // TypeScript cannot 'see' when you - // use an imported value in your - // markup, so we need this - "preserveValueImports": true, - - // This ensures both `vite build` - // and `svelte-package` work correctly - "lib": ["esnext", "DOM", "DOM.Iterable"], - "moduleResolution": "node", - "module": "esnext", - "target": "esnext" - } -} -``` - -## App - -> TYPES: App diff --git a/documentation/docs/50-reference/meta.json b/documentation/docs/50-reference/meta.json deleted file mode 100644 index aa111a0d6dd3..000000000000 --- a/documentation/docs/50-reference/meta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "title": "Reference" -} diff --git a/documentation/docs/60-appendix/05-integrations.md b/documentation/docs/60-appendix/05-integrations.md deleted file mode 100644 index 4bf23ff97c51..000000000000 --- a/documentation/docs/60-appendix/05-integrations.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Integrations ---- - -## Preprocessors - -Preprocessors transform your `.svelte` files before passing them to the compiler. For example, if your `.svelte` file uses TypeScript and PostCSS, it must first be transformed into JavaScript and CSS so that the Svelte compiler can handle it. There are many [available preprocessors](https://sveltesociety.dev/tools#preprocessors). The Svelte team maintains two official ones discussed below. - -### `vitePreprocess` - -`vite-plugin-svelte` offers a [`vitePreprocess`](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/preprocess.md) feature which utilizes Vite for preprocessing. It is capable of handling the language flavors Vite handles: TypeScript, PostCSS, SCSS, Less, Stylus, and SugarSS. For convenience, it is re-exported from the `@sveltejs/kit/vite` package. If you set your project up with TypeScript it will be included by default: - -```js -// svelte.config.js -import { vitePreprocess } from '@sveltejs/kit/vite'; - -export default { - preprocess: [vitePreprocess()] -}; -``` - -### `svelte-preprocess` - -`svelte-preprocess` has some additional functionality not found in `vitePreprocess` such as support for Pug, Babel, and global styles. However, `vitePreprocess` may be faster and require less configuration, so it is used by default. Note that CoffeeScript is [not supported](https://github.com/sveltejs/kit/issues/2920#issuecomment-996469815) by SvelteKit. - -You will need to install `svelte-preprocess` with `npm install --save-dev svelte-preprocess` and [add it to your `svelte.config.js`](https://github.com/sveltejs/svelte-preprocess/blob/main/docs/usage.md#with-svelte-config). After that, you will often need to [install the corresponding library](https://github.com/sveltejs/svelte-preprocess/blob/main/docs/getting-started.md) such as `npm install -D sass` or `npm install -D less`. - -## Adders - -[Svelte Adders](https://sveltesociety.dev/templates#adders) allow you to setup many different complex integrations like Tailwind, PostCSS, Storybook, Firebase, GraphQL, mdsvex, and more with a single command. Please see [sveltesociety.dev](https://sveltesociety.dev/) for a full listing of templates, components, and tools available for use with Svelte and SvelteKit. - -## Vite plugins - -Since SvelteKit projects are built with Vite, you can use Vite plugins to enhance your project. See a list of available plugins at [`vitejs/awesome-vite`](https://github.com/vitejs/awesome-vite). - -## Integration FAQs - -The SvelteKit FAQ has a [how to do X with SvelteKit](./faq#how-do-i-use-x-with-sveltekit), which may be helpful if you still have questions. diff --git a/documentation/docs/60-appendix/01-faq.md b/documentation/docs/60-appendix/10-faq.md similarity index 59% rename from documentation/docs/60-appendix/01-faq.md rename to documentation/docs/60-appendix/10-faq.md index 1dfb031c76da..94ebe4950cec 100644 --- a/documentation/docs/60-appendix/01-faq.md +++ b/documentation/docs/60-appendix/10-faq.md @@ -4,48 +4,20 @@ title: Frequently asked questions ## Other resources -Please see [the Svelte FAQ](https://svelte.dev/faq) and [`vite-plugin-svelte` FAQ](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md) as well for the answers to questions deriving from those libraries. +Please see [the Svelte FAQ](../svelte/faq) and [`vite-plugin-svelte` FAQ](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md) as well for the answers to questions deriving from those libraries. ## What can I make with SvelteKit? -SvelteKit can be used to create most kinds of applications. Out of the box, SvelteKit supports many features including: - -- Dynamic page content with [load](/docs/load) functions and [API routes](/docs/routing#server). -- SEO-friendly dynamic content with [server-side rendering (SSR)](/docs/glossary#ssr). -- User-friendly progressively-enhanced interactive pages with SSR and [Form Actions](/docs/form-actions). -- Static pages with [prerendering](/docs/page-options#prerender). - -SvelteKit can also be deployed to a wide spectrum of hosted architectures via [adapters](/docs/adapters). In cases where SSR is used (or server-side logic is added without prerendering), those functions will be adapted to the target backend. Some examples include: - -- Self-hosted dynamic web applications with a [Node.js backend](/docs/adapter-node). -- Serverless web applications with backend loaders and APIs deployed as remote functions. See [zero-config deployments](/docs/adapter-auto) for popular deployment options. -- [Static pre-rendered sites](/docs/adapter-static) such as a blog or multi-page site hosted on a CDN or static host. Statically-generated sites are shipped without a backend. -- [Single-page Applications (SPAs)](/docs/single-page-apps) with client-side routing and rendering for API-driven dynamic content. SPAs are shipped without a backend and are not server-rendered. This option is commonly chosen when bundling SvelteKit with an app written in PHP, .Net, Java, C, Golang, Rust, etc. -- A mix of the above; some routes can be static, and some routes can use backend functions to fetch dynamic information. This can be configured with [page options](/docs/page-options) that includes the option to opt out of SSR. - -In order to support SSR, a JS backend — such as Node.js or Deno-based server, serverless function, or edge function — is required. - -It is also possible to write custom adapters or leverage community adapters to deploy SvelteKit to more platforms such as specialized server environments, browser extensions, or native applications. See [integrations](./integrations) for more examples and integrations. - -## How do I use HMR with SvelteKit? - -SvelteKit has HMR enabled by default powered by [svelte-hmr](https://github.com/sveltejs/svelte-hmr). If you saw [Rich's presentation at the 2020 Svelte Summit](https://svelte.dev/blog/whats-the-deal-with-sveltekit), you may have seen a more powerful-looking version of HMR presented. This demo had `svelte-hmr`'s `preserveLocalState` flag on. This flag is now off by default because it may lead to unexpected behaviour and edge cases. But don't worry, you are still getting HMR with SvelteKit! If you'd like to preserve local state you can use the `@hmr:keep` or `@hmr:keep-all` directives as documented on the [svelte-hmr](https://github.com/sveltejs/svelte-hmr) page. +See [the documentation regarding project types](project-types) for more details. ## How do I include details from package.json in my application? -You cannot directly require JSON files, since SvelteKit expects [`svelte.config.js`](./configuration) to be an ES module. If you'd like to include your application's version number or other information from `package.json` in your application, you can load JSON like so: +If you'd like to include your application's version number or other information from `package.json` in your application, you can load JSON like so: -```js +```ts +// @errors: 2732 /// file: svelte.config.js -// @filename: index.js -/// <reference types="@types/node" /> -import { URL } from 'node:url'; -// ---cut--- -import { readFileSync } from 'node:fs'; -import { fileURLToPath } from 'node:url'; - -const path = fileURLToPath(new URL('package.json', import.meta.url)); -const pkg = JSON.parse(readFileSync(path, 'utf8')); +import pkg from './package.json' with { type: 'json' }; ``` ## How do I fix the error I'm getting trying to include a package? @@ -63,9 +35,9 @@ Libraries work best in the browser with Vite when they distribute an ESM version If you are still encountering issues we recommend searching both [the Vite issue tracker](https://github.com/vitejs/vite/issues) and the issue tracker of the library in question. Sometimes issues can be worked around by fiddling with the [`optimizeDeps`](https://vitejs.dev/config/#dep-optimization-options) or [`ssr`](https://vitejs.dev/config/#ssr-options) config values though we recommend this as only a short-term workaround in favor of fixing the library in question. -## How do I use the view transitions API with SvelteKit? +## How do I use the view transitions API? -While SvelteKit does not have any specific integration with [view transitions](https://developer.chrome.com/docs/web-platform/view-transitions/), you can call `document.startViewTransition` in [`onNavigate`](/docs/modules#$app-navigation-onnavigate) to trigger a view transition on every navigation. +While SvelteKit does not have any specific integration with [view transitions](https://developer.chrome.com/docs/web-platform/view-transitions/), you can call `document.startViewTransition` in [`onNavigate`]($app-navigation#onNavigate) to trigger a view transition on every client-side navigation. ```js // @errors: 2339 2810 @@ -83,17 +55,15 @@ onNavigate((navigation) => { }); ``` -For more, see ["Unlocking view transitions"](https://svelte.dev/blog/view-transitions) on the Svelte blog. +For more, see ["Unlocking view transitions"](/blog/view-transitions) on the Svelte blog. -## How do I use X with SvelteKit? +## How do I set up a database? -Make sure you've read the [documentation section on integrations](./integrations). If you're still having trouble, solutions to common issues are listed below. +Put the code to query your database in a [server route](./routing#server) - don't query the database in .svelte files. You can create a `db.js` or similar that sets up a connection immediately and makes the client accessible throughout the app as a singleton. You can execute any one-time setup code in `hooks.server.js` and import your database helpers into any endpoint that needs them. -### How do I setup a database? +You can use [the Svelte CLI](/docs/cli/overview) to automatically set up database integrations. -Put the code to query your database in a [server route](./routing#server) - don't query the database in .svelte files. You can create a `db.js` or similar that sets up a connection immediately and makes the client accessible throughout the app as a singleton. You can execute any one-time setup code in `hooks.js` and import your database helpers into any endpoint that needs them. - -### How do I use a client-side only library that depends on `document` or `window`? +## How do I use a client-side library accessing `document` or `window`? If you need access to the `document` or `window` variables or otherwise need code to run only on the client-side you can wrap it in a `browser` check: @@ -141,26 +111,29 @@ onMount(() => { }); ``` -Otherwise, if the library has side effects and you'd still prefer to use static imports, check out [vite-plugin-iso-import](https://github.com/bluwy/vite-plugin-iso-import) to support the `?client` import suffix. The import will be stripped out in SSR builds. However, note that you will lose the ability to use VS Code Intellisense if you use this method. - -```js -// @filename: ambient.d.ts -// @lib: ES2015 -declare module 'some-browser-only-library?client'; - -// @filename: index.js -// ---cut--- -import { onMount } from 'svelte'; -import { method } from 'some-browser-only-library?client'; - -onMount(() => { - method('hello world'); -}); +Finally, you may also consider using an `{#await}` block: +```svelte +<!--- file: index.svelte ---> +<script> + import { browser } from '$app/environment'; + + const ComponentConstructor = browser ? + import('some-browser-only-library').then((module) => module.Component) : + new Promise(() => {}); +</script> + +{#await ComponentConstructor} + <p>Loading...</p> +{:then component} + <svelte:component this={component} /> +{:catch error} + <p>Something went wrong: {error.message}</p> +{/await} ``` -### How do I use a different backend API server? +## How do I use a different backend API server? -You can use [`event.fetch`](./load#making-fetch-requests) to request data from an external API server, but be aware that you would need to deal with [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), which will result in complications such as generally requiring requests to be preflighted resulting in higher latency. Requests to a separate subdomain may also increase latency due to an additional DNS lookup, TLS setup, etc. If you wish to use this method, you may find [`handleFetch`](./hooks#server-hooks-handlefetch) helpful. +You can use [`event.fetch`](./load#Making-fetch-requests) to request data from an external API server, but be aware that you would need to deal with [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), which will result in complications such as generally requiring requests to be preflighted resulting in higher latency. Requests to a separate subdomain may also increase latency due to an additional DNS lookup, TLS setup, etc. If you wish to use this method, you may find [`handleFetch`](./hooks#Server-hooks-handleFetch) helpful. Another approach is to set up a proxy to bypass CORS headaches. In production, you would rewrite a path like `/api` to the API server; for local development, use Vite's [`server.proxy`](https://vitejs.dev/config/server-options.html#server-proxy) option. @@ -176,7 +149,7 @@ export function GET({ params, url }) { (Note that you may also need to proxy `POST`/`PATCH` etc requests, and forward `request.headers`, depending on your needs.) -### How do I use middleware? +## How do I use middleware? `adapter-node` builds a middleware that you can use with your own server for production mode. In dev, you can add middleware to Vite by using a Vite plugin. For example: @@ -210,6 +183,8 @@ export default config; See [Vite's `configureServer` docs](https://vitejs.dev/guide/api-plugin.html#configureserver) for more details including how to control ordering. +## How do I use Yarn? + ### Does it work with Yarn 2? Sort of. The Plug'n'Play feature, aka 'pnp', is broken (it deviates from the Node module resolution algorithm, and [doesn't yet work with native JavaScript modules](https://github.com/yarnpkg/berry/issues/638) which SvelteKit — along with an [increasing number of packages](https://blog.sindresorhus.com/get-ready-for-esm-aa53530b3f77) — uses). You can use `nodeLinker: 'node-modules'` in your [`.yarnrc.yml`](https://yarnpkg.com/configuration/yarnrc#nodeLinker) file to disable pnp, but it's probably easier to just use npm or [pnpm](https://pnpm.io/), which is similarly fast and efficient but without the compatibility headaches. @@ -218,27 +193,23 @@ Sort of. The Plug'n'Play feature, aka 'pnp', is broken (it deviates from the Nod Currently ESM Support within the latest Yarn (version 3) is considered [experimental](https://github.com/yarnpkg/berry/pull/2161). -The below seems to work although your results may vary. +The below seems to work although your results may vary. First create a new application: -First create a new application: - -```sh +```bash yarn create svelte myapp cd myapp ``` And enable Yarn Berry: -```sh +```bash yarn set version berry yarn install ``` -**Yarn 3 global cache** - One of the more interesting features of Yarn Berry is the ability to have a single global cache for packages, instead of having multiple copies for each project on the disk. However, setting `enableGlobalCache` to true causes building to fail, so it is recommended to add the following to the `.yarnrc.yml` file: -``` +```yaml nodeLinker: node-modules ``` diff --git a/documentation/docs/60-appendix/20-additional-resources.md b/documentation/docs/60-appendix/20-additional-resources.md deleted file mode 100644 index 4877ef984568..000000000000 --- a/documentation/docs/60-appendix/20-additional-resources.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Additional resources ---- - -## FAQs - -Please see the [SvelteKit FAQ](../faq) for solutions to common issues and helpful tips and tricks. - -The [Svelte FAQ](https://svelte.dev/faq) and [`vite-plugin-svelte` FAQ](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md) may also be helpful for questions deriving from those libraries. - -## Examples - -We've written and published a few different SvelteKit sites as examples: - -- [`sveltejs/realworld`](https://github.com/sveltejs/realworld) contains an example blog site -- [The `sites/kit.svelte.dev` directory](https://github.com/sveltejs/kit/tree/master/sites/kit.svelte.dev) contains the code for this site -- [`sveltejs/sites`](https://github.com/sveltejs/sites) contains the code for [svelte.dev](https://github.com/sveltejs/sites/tree/master/sites/svelte.dev) and for a [HackerNews clone](https://github.com/sveltejs/sites/tree/master/sites/hn.svelte.dev) - -SvelteKit users have also published plenty of examples on GitHub, under the [#sveltekit](https://github.com/topics/sveltekit) and [#sveltekit-template](https://github.com/topics/sveltekit-template) topics, as well as on [the Svelte Society site](https://sveltesociety.dev/templates#svelte-kit). Note that these have not been vetted by the maintainers and may not be up to date. - -## Support - -You can ask for help on [Discord](https://svelte.dev/chat) and [StackOverflow](https://stackoverflow.com/questions/tagged/sveltekit). Please first search for information related to your issue in the FAQ, Google or another search engine, issue tracker, and Discord chat history in order to be respectful of others' time. There are many more people asking questions than answering them, so this will help in allowing the community to grow in a scalable fashion. diff --git a/documentation/docs/60-appendix/20-integrations.md b/documentation/docs/60-appendix/20-integrations.md new file mode 100644 index 000000000000..a4213c44da4a --- /dev/null +++ b/documentation/docs/60-appendix/20-integrations.md @@ -0,0 +1,52 @@ +--- +title: Integrations +--- + +## `vitePreprocess` + +Including [`vitePreprocess`](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/preprocess.md) in your project will allow you to use the various flavors of CSS that Vite supports: PostCSS, SCSS, Less, Stylus, and SugarSS. If you set your project up with TypeScript it will be included by default: + +```js +// svelte.config.js +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; + +export default { + preprocess: [vitePreprocess()] +}; +``` + +You will also need to use a preprocessor if you're using TypeScript with Svelte 4. TypeScript is supported natively in Svelte 5 if you're using only the type syntax. To use more complex TypeScript syntax in Svelte 5, you will need still need a preprocessor and can use `vitePreprocess({ script: true })`. + +## Adders + +Run `npx sv add` to setup many different complex integrations with a single command including: +- prettier (formatting) +- eslint (linting) +- vitest (unit testing) +- playwright (e2e testing) +- lucia (auth) +- tailwind (CSS) +- drizzle (DB) +- paraglide (i18n) +- mdsvex (markdown) +- storybook (frontend workshop) + +## Directory + +See [sveltesociety.dev](https://sveltesociety.dev/) for a full listing of [packages](https://sveltesociety.dev/packages) and [templates](https://sveltesociety.dev/templates) available for use with Svelte and SvelteKit. + +## Additional integrations + +### `svelte-preprocess` + +`svelte-preprocess` has some additional functionality not found in `vitePreprocess` such as support for Pug, Babel, and global styles. However, `vitePreprocess` may be faster and require less configuration, so it is used by default. Note that CoffeeScript is [not supported](https://github.com/sveltejs/kit/issues/2920#issuecomment-996469815) by SvelteKit. + +You will need to install `svelte-preprocess` with `npm install --save-dev svelte-preprocess` and [add it to your `svelte.config.js`](https://github.com/sveltejs/svelte-preprocess/blob/main/docs/usage.md#with-svelte-config). After that, you will often need to [install the corresponding library](https://github.com/sveltejs/svelte-preprocess/blob/main/docs/getting-started.md) such as `npm install -D sass` or `npm install -D less`. + +## Vite plugins + +Since SvelteKit projects are built with Vite, you can use Vite plugins to enhance your project. See a list of available plugins at [`vitejs/awesome-vite`](https://github.com/vitejs/awesome-vite?tab=readme-ov-file#plugins). + +## Integration FAQs + +[The SvelteKit FAQ](./faq) answers many questions about how to do X with SvelteKit, which may be helpful if you still have questions. diff --git a/documentation/docs/60-appendix/25-debugging.md b/documentation/docs/60-appendix/25-debugging.md new file mode 100644 index 000000000000..68c3f055eee4 --- /dev/null +++ b/documentation/docs/60-appendix/25-debugging.md @@ -0,0 +1,68 @@ +--- +title: Breakpoint Debugging +--- + +In addition to the [`@debug`](../svelte/@debug) tag, you can also debug Svelte and SvelteKit projects using breakpoints within various tools and development environments. This includes both frontend and backend code. + +The following guides assume your JavaScript runtime environment is Node.js. + +## Visual Studio Code + +With the built-in debug terminal, you can set up breakpoints in source files within VSCode. + +1. Open the command palette: `CMD/Ctrl` + `Shift` + `P`. +2. Find and launch "Debug: JavaScript Debug Terminal". +3. Start your project using the debug terminal. For example: `npm run dev`. +4. Set some breakpoints in your client or server-side source code. +5. Trigger the breakpoint. + +### Launch via debug pane + +You may alternatively set up a `.vscode/launch.json` in your project. To set one up automatically: + +1. Go to the "Run and Debug" pane. +2. In the "Run" select menu, choose "Node.js...". +3. Select the "run script" that corresponds to your project, such as "Run script: dev". +4. Press the "Start debugging" play button, or hit `F5` to begin breakpoint debugging. + +Here's an example `launch.json`: + +```json +{ + "version": "0.2.0", + "configurations": [ + { + "command": "npm run dev", + "name": "Run development server", + "request": "launch", + "type": "node-terminal" + } + ] +} +``` + +Further reading: <https://code.visualstudio.com/docs/editor/debugging>. + +## Other Editors + +If you use a different editor, these community guides might be useful for you: + +- [WebStorm Svelte: Debug Your Application](https://www.jetbrains.com/help/webstorm/svelte.html#ws_svelte_debug) +- [Debugging JavaScript Frameworks in Neovim](https://theosteiner.de/debugging-javascript-frameworks-in-neovim) + +## Google Chrome and Microsoft Edge Developer Tools + +It's possible to debug Node.js applications using a browser-based debugger. + +> [!NOTE] Note this only works with debugging client-side SvelteKit source maps. + +1. Run the `--inspect` flag when starting the Vite server with Node.js. For instance: `NODE_OPTIONS="--inspect" npm run dev` +2. Open your site in a new tab. Typically at `localhost:5173`. +3. Open your browser's dev tools, and click on the "Open dedicated DevTools for Node.js" icon near the top-left. It should display the Node.js logo. +4. Set up breakpoints and debug your application. + +You may alternatively open the debugger devtools by navigating to `chrome://inspect` in Google Chrome, or `edge://inspect` in Microsoft Edge. + +## References + +- [Debugging Node.js](https://nodejs.org/en/learn/getting-started/debugging) diff --git a/documentation/docs/60-appendix/30-migrating-to-sveltekit-2.md b/documentation/docs/60-appendix/30-migrating-to-sveltekit-2.md new file mode 100644 index 000000000000..72b3b2f3fbd4 --- /dev/null +++ b/documentation/docs/60-appendix/30-migrating-to-sveltekit-2.md @@ -0,0 +1,193 @@ +--- +title: Migrating to SvelteKit v2 +--- + +Upgrading from SvelteKit version 1 to version 2 should be mostly seamless. There are a few breaking changes to note, which are listed here. You can use `npx sv migrate sveltekit-2` to migrate some of these changes automatically. + +We highly recommend upgrading to the most recent 1.x version before upgrading to 2.0, so that you can take advantage of targeted deprecation warnings. We also recommend [updating to Svelte 4](../svelte/v4-migration-guide) first: Later versions of SvelteKit 1.x support it, and SvelteKit 2.0 requires it. + +## `redirect` and `error` are no longer thrown by you + +Previously, you had to `throw` the values returned from `error(...)` and `redirect(...)` yourself. In SvelteKit 2 this is no longer the case — calling the functions is sufficient. + +```js +import { error } from '@sveltejs/kit' + +// ... +---throw error(500, 'something went wrong');--- ++++error(500, 'something went wrong');+++ +``` + +`svelte-migrate` will do these changes automatically for you. + +If the error or redirect is thrown inside a `try {...}` block (hint: don't do this!), you can distinguish them from unexpected errors using [`isHttpError`](@sveltejs-kit#isHttpError) and [`isRedirect`](@sveltejs-kit#isRedirect) imported from `@sveltejs/kit`. + +## path is required when setting cookies + +When receiving a `Set-Cookie` header that doesn't specify a `path`, browsers will [set the cookie path](https://www.rfc-editor.org/rfc/rfc6265#section-5.1.4) to the parent of the resource in question. This behaviour isn't particularly helpful or intuitive, and frequently results in bugs because the developer expected the cookie to apply to the domain as a whole. + +As of SvelteKit 2.0, you need to set a `path` when calling `cookies.set(...)`, `cookies.delete(...)` or `cookies.serialize(...)` so that there's no ambiguity. Most of the time, you probably want to use `path: '/'`, but you can set it to whatever you like, including relative paths — `''` means 'the current path', `'.'` means 'the current directory'. + +```js +/** @type {import('./$types').PageServerLoad} */ +export function load({ cookies }) { + cookies.set(name, value, +++{ path: '/' }+++); + return { response } +} +``` + +`svelte-migrate` will add comments highlighting the locations that need to be adjusted. + +## Top-level promises are no longer awaited + +In SvelteKit version 1, if the top-level properties of the object returned from a `load` function were promises, they were automatically awaited. With the introduction of [streaming](/blog/streaming-snapshots-sveltekit) this behavior became a bit awkward as it forces you to nest your streamed data one level deep. + +As of version 2, SvelteKit no longer differentiates between top-level and non-top-level promises. To get back the blocking behavior, use `await` (with `Promise.all` to prevent waterfalls, where appropriate): + +```js +// @filename: ambient.d.ts +declare const url: string; + +// @filename: index.js +// ---cut--- +// If you have a single promise +/** @type {import('./$types').PageServerLoad} */ +export +++async+++ function load({ fetch }) { + const response = +++await+++ fetch(url).then(r => r.json()); + return { response } +} +``` + +```js +// @filename: ambient.d.ts +declare const url1: string; +declare const url2: string; + +// @filename: index.js +// ---cut--- +// If you have multiple promises +/** @type {import('./$types').PageServerLoad} */ +export +++async+++ function load({ fetch }) { +--- const a = fetch(url1).then(r => r.json());--- +--- const b = fetch(url2).then(r => r.json());--- ++++ const [a, b] = await Promise.all([ + fetch(url1).then(r => r.json()), + fetch(url2).then(r => r.json()), + ]);+++ + return { a, b }; +} +``` + +## goto(...) changes + +`goto(...)` no longer accepts external URLs. To navigate to an external URL, use `window.location.href = url`. The `state` object now determines `$page.state` and must adhere to the `App.PageState` interface, if declared. See [shallow routing](shallow-routing) for more details. + +## paths are now relative by default + +In SvelteKit 1, `%sveltekit.assets%` in your `app.html` was replaced with a relative path by default (i.e. `.` or `..` or `../..` etc, depending on the path being rendered) during server-side rendering unless the [`paths.relative`](configuration#paths) config option was explicitly set to `false`. The same was true for `base` and `assets` imported from `$app/paths`, but only if the `paths.relative` option was explicitly set to `true`. + +This inconsistency is fixed in version 2. Paths are either always relative or always absolute, depending on the value of [`paths.relative`](configuration#paths). It defaults to `true` as this results in more portable apps: if the `base` is something other than the app expected (as is the case when viewed on the [Internet Archive](https://archive.org/), for example) or unknown at build time (as is the case when deploying to [IPFS](https://ipfs.tech/) and so on), fewer things are likely to break. + +## Server fetches are not trackable anymore + +Previously it was possible to track URLs from `fetch`es on the server in order to rerun load functions. This poses a possible security risk (private URLs leaking), and as such it was behind the `dangerZone.trackServerFetches` setting, which is now removed. + +## `preloadCode` arguments must be prefixed with `base` + +SvelteKit exposes two functions, [`preloadCode`]($app-navigation#preloadCode) and [`preloadData`]($app-navigation#preloadData), for programmatically loading the code and data associated with a particular path. In version 1, there was a subtle inconsistency — the path passed to `preloadCode` did not need to be prefixed with the `base` path (if set), while the path passed to `preloadData` did. + +This is fixed in SvelteKit 2 — in both cases, the path should be prefixed with `base` if it is set. + +Additionally, `preloadCode` now takes a single argument rather than _n_ arguments. + +## `resolvePath` has been removed + +SvelteKit 1 included a function called `resolvePath` which allows you to resolve a route ID (like `/blog/[slug]`) and a set of parameters (like `{ slug: 'hello' }`) to a pathname. Unfortunately the return value didn't include the `base` path, limiting its usefulness in cases where `base` was set. + +As such, SvelteKit 2 replaces `resolvePath` with a (slightly better named) function called `resolveRoute`, which is imported from `$app/paths` and which takes `base` into account. + +```js +---import { resolvePath } from '@sveltejs/kit'; +import { base } from '$app/paths';--- ++++import { resolveRoute } from '$app/paths';+++ + +---const path = base + resolvePath('/blog/[slug]', { slug });--- ++++const path = resolveRoute('/blog/[slug]', { slug });+++ +``` + +`svelte-migrate` will do the method replacement for you, though if you later prepend the result with `base`, you need to remove that yourself. + +## Improved error handling + +Errors are handled inconsistently in SvelteKit 1. Some errors trigger the `handleError` hook but there is no good way to discern their status (for example, the only way to tell a 404 from a 500 is by seeing if `event.route.id` is `null`), while others (such as 405 errors for `POST` requests to pages without actions) don't trigger `handleError` at all, but should. In the latter case, the resulting `$page.error` will deviate from the [`App.Error`](types#Error) type, if it is specified. + +SvelteKit 2 cleans this up by calling `handleError` hooks with two new properties: `status` and `message`. For errors thrown from your code (or library code called by your code) the status will be `500` and the message will be `Internal Error`. While `error.message` may contain sensitive information that should not be exposed to users, `message` is safe. + +## Dynamic environment variables cannot be used during prerendering + +The `$env/dynamic/public` and `$env/dynamic/private` modules provide access to _run time_ environment variables, as opposed to the _build time_ environment variables exposed by `$env/static/public` and `$env/static/private`. + +During prerendering in SvelteKit 1, they are one and the same. As such, prerendered pages that make use of 'dynamic' environment variables are really 'baking in' build time values, which is incorrect. Worse, `$env/dynamic/public` is populated in the browser with these stale values if the user happens to land on a prerendered page before navigating to dynamically-rendered pages. + +Because of this, dynamic environment variables can no longer be read during prerendering in SvelteKit 2 — you should use the `static` modules instead. If the user lands on a prerendered page, SvelteKit will request up-to-date values for `$env/dynamic/public` from the server (by default from a module called `/_app/env.js`) instead of reading them from the server-rendered HTML. + +## `form` and `data` have been removed from `use:enhance` callbacks + +If you provide a callback to [`use:enhance`](form-actions#Progressive-enhancement-use:enhance), it will be called with an object containing various useful properties. + +In SvelteKit 1, those properties included `form` and `data`. These were deprecated some time ago in favour of `formElement` and `formData`, and have been removed altogether in SvelteKit 2. + +## Forms containing file inputs must use `multipart/form-data` + +If a form contains an `<input type="file">` but does not have an `enctype="multipart/form-data"` attribute, non-JS submissions will omit the file. SvelteKit 2 will throw an error if it encounters a form like this during a `use:enhance` submission to ensure that your forms work correctly when JavaScript is not present. + +## Generated `tsconfig.json` is more strict + +Previously, the generated `tsconfig.json` was trying its best to still produce a somewhat valid config when your `tsconfig.json` included `paths` or `baseUrl`. In SvelteKit 2, the validation is more strict and will warn when you use either `paths` or `baseUrl` in your `tsconfig.json`. These settings are used to generate path aliases and you should use [the `alias` config](configuration#alias) option in your `svelte.config.js` instead, to also create a corresponding alias for the bundler. + +## `getRequest` no longer throws errors + +The `@sveltejs/kit/node` module exports helper functions for use in Node environments, including `getRequest` which turns a Node [`ClientRequest`](https://nodejs.org/api/http.html#class-httpclientrequest) into a standard [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) object. + +In SvelteKit 1, `getRequest` could throw if the `Content-Length` header exceeded the specified size limit. In SvelteKit 2, the error will not be thrown until later, when the request body (if any) is being read. This enables better diagnostics and simpler code. + +## `vitePreprocess` is no longer exported from `@sveltejs/kit/vite` + +Since `@sveltejs/vite-plugin-svelte` is now a peer dependency, SvelteKit 2 no longer re-exports `vitePreprocess`. You should import it directly from `@sveltejs/vite-plugin-svelte`. + +## Updated dependency requirements + +SvelteKit 2 requires Node `18.13` or higher, and the following minimum dependency versions: + +- `svelte@4` +- `vite@5` +- `typescript@5` +- `@sveltejs/vite-plugin-svelte@3` (this is now required as a `peerDependency` of SvelteKit — previously it was directly depended upon) +- `@sveltejs/adapter-cloudflare@3` (if you're using these adapters) +- `@sveltejs/adapter-cloudflare-workers@2` +- `@sveltejs/adapter-netlify@3` +- `@sveltejs/adapter-node@2` +- `@sveltejs/adapter-static@3` +- `@sveltejs/adapter-vercel@4` + +`svelte-migrate` will update your `package.json` for you. + +As part of the TypeScript upgrade, the generated `tsconfig.json` (the one your `tsconfig.json` extends from) now uses `"moduleResolution": "bundler"` (which is recommended by the TypeScript team, as it properly resolves types from packages with an `exports` map in package.json) and `verbatimModuleSyntax` (which replaces the existing `importsNotUsedAsValues ` and `preserveValueImports` flags — if you have those in your `tsconfig.json`, remove them. `svelte-migrate` will do this for you). + +## SvelteKit 2.12: $app/stores deprecated + +SvelteKit 2.12 introduced `$app/state` based on the [Svelte 5 runes API](/docs/svelte/what-are-runes). `$app/state` provides everything that `$app/stores` provides but with more flexibility as to where and how you use it. Most importantly, the `page` object is now fine-grained, e.g. updates to `page.state` will not invalidate `page.data` and vice-versa. + +As a consequence, `$app/stores` is deprecated and subject to be removed in SvelteKit 3. We recommend [upgrading to Svelte 5](/docs/svelte/v5-migration-guide), if you haven't already, and then migrate away from `$app/stores`. Most of the replacements should be pretty simple: Replace the `$app/stores` import with `$app/state` and remove the `$` prefixes from the usage sites. + +```svelte +<script> + ---import { page } from '$app/stores';--- + +++import { page } from '$app/state';+++ +</script> + +---{$page.data}--- ++++{page.data}+++ +``` + +Use `npx sv migrate app-state` to auto-migrate most of your `$app/stores` usages inside `.svelte` components. diff --git a/documentation/docs/60-appendix/10-migrating.md b/documentation/docs/60-appendix/40-migrating.md similarity index 86% rename from documentation/docs/60-appendix/10-migrating.md rename to documentation/docs/60-appendix/40-migrating.md index a2900db4e8a5..927d927832db 100644 --- a/documentation/docs/60-appendix/10-migrating.md +++ b/documentation/docs/60-appendix/40-migrating.md @@ -5,7 +5,7 @@ rank: 1 SvelteKit is the successor to Sapper and shares many elements of its design. -If you have an existing Sapper app that you plan to migrate to SvelteKit, there are a number of changes you will need to make. You may find it helpful to view [some examples](additional-resources#examples) while migrating. +If you have an existing Sapper app that you plan to migrate to SvelteKit, there are a number of changes you will need to make. You may find it helpful to view [some examples](additional-resources#Examples) while migrating. ## package.json @@ -20,7 +20,7 @@ Remove `polka` or `express`, if you're using one of those, and any middleware su ### devDependencies -Remove `sapper` from your `devDependencies` and replace it with `@sveltejs/kit` and whichever [adapter](adapters) you plan to use (see [next section](migrating#project-files-configuration)). +Remove `sapper` from your `devDependencies` and replace it with `@sveltejs/kit` and whichever [adapter](adapters) you plan to use (see [next section](migrating#Project-files-Configuration)). ### scripts @@ -39,9 +39,9 @@ The bulk of your app, in `src/routes`, can be left where it is, but several proj Your `webpack.config.js` or `rollup.config.js` should be replaced with a `svelte.config.js`, as documented [here](configuration). Svelte preprocessor options should be moved to `config.preprocess`. -You will need to add an [adapter](adapters). `sapper build` is roughly equivalent to [adapter-node](https://github.com/sveltejs/kit/tree/master/packages/adapter-node) while `sapper export` is roughly equivalent to [adapter-static](https://github.com/sveltejs/kit/tree/master/packages/adapter-static), though you might prefer to use an adapter designed for the platform you're deploying to. +You will need to add an [adapter](adapters). `sapper build` is roughly equivalent to [adapter-node](adapter-node) while `sapper export` is roughly equivalent to [adapter-static](adapter-static), though you might prefer to use an adapter designed for the platform you're deploying to. -If you were using plugins for filetypes that are not automatically handled by [Vite](https://vitejs.dev), you will need to find Vite equivalents and add them to the [Vite config](project-structure#project-files-vite-config-js). +If you were using plugins for filetypes that are not automatically handled by [Vite](https://vitejs.dev), you will need to find Vite equivalents and add them to the [Vite config](project-structure#Project-files-vite.config.js). ### src/client.js @@ -49,11 +49,11 @@ This file has no equivalent in SvelteKit. Any custom logic (beyond `sapper.start ### src/server.js -When using `adapter-node` the equivalent is a [custom server](adapter-node#custom-server). Otherwise, this file has no direct equivalent, since SvelteKit apps can run in serverless environments. +When using `adapter-node` the equivalent is a [custom server](adapter-node#Custom-server). Otherwise, this file has no direct equivalent, since SvelteKit apps can run in serverless environments. ### src/service-worker.js -Most imports from `@sapper/service-worker` have equivalents in [`$service-worker`](modules#$service-worker): +Most imports from `@sapper/service-worker` have equivalents in [`$service-worker`]($service-worker): - `files` is unchanged - `routes` has been removed @@ -68,7 +68,7 @@ Remove `%sapper.base%`, `%sapper.scripts%` and `%sapper.styles%`. Replace `%sapp ### src/node_modules -A common pattern in Sapper apps is to put your internal library in a directory inside `src/node_modules`. This doesn't work with Vite, so we use [`src/lib`](modules#$lib) instead. +A common pattern in Sapper apps is to put your internal library in a directory inside `src/node_modules`. This doesn't work with Vite, so we use [`src/lib`]($lib) instead. ## Pages and layouts @@ -81,15 +81,15 @@ Routes now are made up of the folder name exclusively to remove ambiguity, the f | routes/about/index.svelte | routes/about/+page.svelte | | routes/about.svelte | routes/about/+page.svelte | -Your custom error page component should be renamed from `_error.svelte` to `+error.svelte`. Any `_layout.svelte` files should likewise be renamed `+layout.svelte`. [Any other files are ignored](routing#other-files). +Your custom error page component should be renamed from `_error.svelte` to `+error.svelte`. Any `_layout.svelte` files should likewise be renamed `+layout.svelte`. [Any other files are ignored](routing#Other-files). ### Imports -The `goto`, `prefetch` and `prefetchRoutes` imports from `@sapper/app` should be replaced with `goto`, `preloadData` and `preloadCode` imports respectively from [`$app/navigation`](modules#$app-navigation). +The `goto`, `prefetch` and `prefetchRoutes` imports from `@sapper/app` should be replaced with `goto`, `preloadData` and `preloadCode` imports respectively from [`$app/navigation`]($app-navigation). -The `stores` import from `@sapper/app` should be replaced — see the [Stores](migrating#pages-and-layouts-stores) section below. +The `stores` import from `@sapper/app` should be replaced — see the [Stores](migrating#Pages-and-layouts-Stores) section below. -Any files you previously imported from directories in `src/node_modules` will need to be replaced with [`$lib`](modules#$lib) imports. +Any files you previously imported from directories in `src/node_modules` will need to be replaced with [`$lib`]($lib) imports. ### Preload @@ -97,7 +97,7 @@ As before, pages and layouts can export a function that allows data to be loaded This function has been renamed from `preload` to [`load`](load), it now lives in a `+page.js` (or `+layout.js`) next to its `+page.svelte` (or `+layout.svelte`), and its API has changed. Instead of two arguments — `page` and `session` — there is a single `event` argument. -There is no more `this` object, and consequently no `this.fetch`, `this.error` or `this.redirect`. Instead, you can get [`fetch`](load#making-fetch-requests) from the input methods, and both [`error`](load#errors) and [`redirect`](load#redirects) are now thrown. +There is no more `this` object, and consequently no `this.fetch`, `this.error` or `this.redirect`. Instead, you can get [`fetch`](load#Making-fetch-requests) from the input methods, and both [`error`](load#Errors) and [`redirect`](load#Redirects) are now thrown. ### Stores @@ -115,15 +115,15 @@ const { preloading, page, session } = stores(); The `page` store still exists; `preloading` has been replaced with a `navigating` store that contains `from` and `to` properties. `page` now has `url` and `params` properties, but no `path` or `query`. -You access them differently in SvelteKit. `stores` is now `getStores`, but in most cases it is unnecessary since you can import `navigating`, and `page` directly from [`$app/stores`](modules#$app-stores). +You access them differently in SvelteKit. `stores` is now `getStores`, but in most cases it is unnecessary since you can import `navigating`, and `page` directly from [`$app/stores`]($app-stores). If you're on Svelte 5 and SvelteKit 2.12 or higher, consider using [`$app/state`]($app-state) instead. ### Routing -Regex routes are no longer supported. Instead, use [advanced route matching](advanced-routing#matching). +Regex routes are no longer supported. Instead, use [advanced route matching](advanced-routing#Matching). ### Segments -Previously, layout components received a `segment` prop indicating the child segment. This has been removed; you should use the more flexible `$page.url.pathname` value to derive the segment you're interested in. +Previously, layout components received a `segment` prop indicating the child segment. This has been removed; you should use the more flexible `$page.url.pathname` (or `page.url.pathname`) value to derive the segment you're interested in. ### URLs @@ -150,7 +150,7 @@ See [integrations](./integrations) for detailed information about integrations. ### HTML minifier -Sapper includes `html-minifier` by default. SvelteKit does not include this, but you can add it as a prod dependency and then use it through a [hook](hooks#server-hooks-handle): +Sapper includes `html-minifier` by default. SvelteKit does not include this, but you can add it as a prod dependency and then use it through a [hook](hooks#Server-hooks-handle): ```js // @filename: ambient.d.ts diff --git a/documentation/docs/60-appendix/50-additional-resources.md b/documentation/docs/60-appendix/50-additional-resources.md new file mode 100644 index 000000000000..edc816f38c4f --- /dev/null +++ b/documentation/docs/60-appendix/50-additional-resources.md @@ -0,0 +1,23 @@ +--- +title: Additional resources +--- + +## FAQs + +Please see the [SvelteKit FAQ](faq) for solutions to common issues and helpful tips and tricks. + +The [Svelte FAQ](../svelte/faq) and [`vite-plugin-svelte` FAQ](https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md) may also be helpful for questions deriving from those libraries. + +## Examples + +We've written and published a few different SvelteKit sites as examples: + +- [`sveltejs/realworld`](https://github.com/sveltejs/realworld) contains an example blog site +- [A HackerNews clone](https://github.com/sveltejs/sites/tree/master/sites/hn.svelte.dev) +- [`svelte.dev`](https://github.com/sveltejs/svelte.dev) + +SvelteKit users have also published plenty of examples on GitHub, under the [#sveltekit](https://github.com/topics/sveltekit) and [#sveltekit-template](https://github.com/topics/sveltekit-template) topics, as well as on [the Svelte Society site](https://sveltesociety.dev/templates?category=sveltekit). Note that these have not been vetted by the maintainers and may not be up to date. + +## Support + +You can ask for help on [Discord](/chat) and [StackOverflow](https://stackoverflow.com/questions/tagged/sveltekit). Please first search for information related to your issue in the FAQ, Google or another search engine, issue tracker, and Discord chat history in order to be respectful of others' time. There are many more people asking questions than answering them, so this will help in allowing the community to grow in a scalable fashion. diff --git a/documentation/docs/60-appendix/30-glossary.md b/documentation/docs/60-appendix/60-glossary.md similarity index 71% rename from documentation/docs/60-appendix/30-glossary.md rename to documentation/docs/60-appendix/60-glossary.md index ce80e9ef60ea..e071b2024b00 100644 --- a/documentation/docs/60-appendix/30-glossary.md +++ b/documentation/docs/60-appendix/60-glossary.md @@ -10,12 +10,24 @@ Client-side rendering (CSR) is the generation of the page contents in the web br In SvelteKit, client-side rendering will be used by default, but you can turn off JavaScript with [the `csr = false` page option](page-options#csr). +## Edge + +Rendering on the edge refers to rendering an application in a content delivery network (CDN) near the user. Edge rendering allows the request and response for a page to travel a shorter distance thus improving latency. + ## Hydration Svelte components store some state and update the DOM when the state is updated. When fetching data during SSR, by default SvelteKit will store this data and transmit it to the client along with the server-rendered HTML. The components can then be initialized on the client with that data without having to call the same API endpoints again. Svelte will then check that the DOM is in the expected state and attach event listeners in a process called hydration. Once the components are fully hydrated, they can react to changes to their properties just like any newly created Svelte component. In SvelteKit, pages will be hydrated by default, but you can turn off JavaScript with [the `csr = false` page option](page-options#csr). +## ISR + +Incremental static regeneration (ISR) allows you to generate static pages on your site as visitors request those pages without redeploying. This may reduces build times compared to [SSG](#SSG) sites with a large number of pages. You can do [ISR with `adapter-vercel`](adapter-vercel#Incremental-Static-Regeneration). + +## MPA + +Traditional applications that render each page view on the server — such as those written in languages other than JavaScript — are often referred to as multi-page apps (MPA). + ## Prerendering Prerendering means computing the contents of a page at build time and saving the HTML for display. This approach has the same benefits as traditional server-rendered pages, but avoids recomputing the page for each visitor and so scales nearly for free as the number of visitors increases. The tradeoff is that the build process is more expensive and prerendered content can only be updated by building and deploying a new version of the application. @@ -26,6 +38,10 @@ Pre-rendered pages are not limited to static content. You can build personalized In SvelteKit, you can control prerendering with [the `prerender` page option](page-options#prerender) and [`prerender` config](configuration#prerender) in `svelte.config.js`. +## PWA + +A progressive web app (PWA) is an app that's built using web APIs and technologies, but functions like a mobile or desktop app. Sites served as [PWAs can be installed](https://web.dev/learn/pwa/installation), allowing you to add a shortcut to the application on your launcher, home screen, or start menu. Many PWAs will utilize [service workers](service-workers) to build offline capabilities. + ## Routing By default, when you navigate to a new page (by clicking on a link or using the browser's forward or back buttons), SvelteKit will intercept the attempted navigation and handle it instead of allowing the browser to send a request to the server for the destination page. SvelteKit will then update the displayed contents on the client by rendering the component for the new page, which in turn can make calls to the necessary API endpoints. This process of updating the page on the client in response to attempted navigation is called client-side routing. @@ -34,13 +50,13 @@ In SvelteKit, client-side routing will be used by default, but you can skip it w ## SPA -A single-page app (SPA) is an application in which all requests to the server load a single HTML file which then does client-side rendering of the requested contents based on the requested URL. All navigation is handled on the client-side in a process called client-side routing with per-page contents being updated and common layout elements remaining largely unchanged. SPAs do not provide SSR, which has the shortcoming described above. However, some applications are not greatly impacted by these shortcomings such as a complex business application behind a login where SEO would not be important and it is known that users will be accessing the application from a consistent computing environment. +A single-page app (SPA) is an application in which all requests to the server load a single HTML file which then does client-side rendering of the requested contents based on the requested URL. All navigation is handled on the client-side in a process called client-side routing with per-page contents being updated and common layout elements remaining largely unchanged. SPAs do not provide SSR and thus have worse performance and SEO characteristics. However, some applications are not greatly impacted by these shortcomings such as a complex business application behind a login where SEO would not be important and it is known that users will be accessing the application from a consistent computing environment. In SvelteKit, you can [build an SPA with `adapter-static`](single-page-apps). ## SSG -Static Site Generation (SSG) is a term that refers to a site where every page is prerendered. SvelteKit was not built to do only static site generation like some tools and so may not scale as well to efficiently render a very large number of pages as tools built specifically for that purpose. However, in contrast to most purpose-built SSGs, SvelteKit does nicely allow for mixing and matching different rendering types on different pages. One benefit of fully prerendering a site is that you do not need to maintain or pay for servers to perform SSR. Once generated, the site can be served from CDNs, leading to great "time to first byte" performance. This delivery model is often referred to as JAMstack. +Static Site Generation (SSG) is a term that refers to a site where every page is prerendered. One benefit of fully prerendering a site is that you do not need to maintain or pay for servers to perform SSR. Once generated, the site can be served from CDNs, leading to great “time to first byte” performance. This delivery model is often referred to as JAMstack. In SvelteKit, you can do static site generation by using [`adapter-static`](adapter-static) or by configuring every page to be prerendered using [the `prerender` page option](page-options#prerender) or [`prerender` config](configuration#prerender) in `svelte.config.js`. @@ -48,4 +64,4 @@ In SvelteKit, you can do static site generation by using [`adapter-static`](adap Server-side rendering (SSR) is the generation of the page contents on the server. SSR is generally preferred for SEO. While some search engines can index content that is dynamically generated on the client-side it may take longer even in these cases. It also tends to improve perceived performance and makes your app accessible to users if JavaScript fails or is disabled (which happens [more often than you probably think](https://kryogenix.org/code/browser/everyonehasjs.html)). -In SvelteKit, pages are server-side rendered by default. You can disable SSR with [the `ssr` page option](https://kit.svelte.dev/docs/page-options#ssr). +In SvelteKit, pages are server-side rendered by default. You can disable SSR with [the `ssr` page option](page-options#ssr). diff --git a/documentation/docs/60-appendix/index.md b/documentation/docs/60-appendix/index.md new file mode 100644 index 000000000000..a8e02800ad96 --- /dev/null +++ b/documentation/docs/60-appendix/index.md @@ -0,0 +1,3 @@ +--- +title: Appendix +--- diff --git a/documentation/docs/60-appendix/meta.json b/documentation/docs/60-appendix/meta.json deleted file mode 100644 index 5b62b9209c1b..000000000000 --- a/documentation/docs/60-appendix/meta.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "title": "Appendix" -} diff --git a/documentation/docs/98-reference/10-@sveltejs-kit.md b/documentation/docs/98-reference/10-@sveltejs-kit.md new file mode 100644 index 000000000000..a89badb6359f --- /dev/null +++ b/documentation/docs/98-reference/10-@sveltejs-kit.md @@ -0,0 +1,11 @@ +--- +title: @sveltejs/kit +--- + +> MODULE: @sveltejs/kit + +## Private types + +The following are referenced by the public types documented above, but cannot be imported directly: + +> TYPES: Private types diff --git a/documentation/docs/98-reference/15-@sveltejs-kit-hooks.md b/documentation/docs/98-reference/15-@sveltejs-kit-hooks.md new file mode 100644 index 000000000000..b4a1456ab655 --- /dev/null +++ b/documentation/docs/98-reference/15-@sveltejs-kit-hooks.md @@ -0,0 +1,5 @@ +--- +title: @sveltejs/kit/hooks +--- + +> MODULE: @sveltejs/kit/hooks diff --git a/documentation/docs/98-reference/15-@sveltejs-kit-node-polyfills.md b/documentation/docs/98-reference/15-@sveltejs-kit-node-polyfills.md new file mode 100644 index 000000000000..a80c80ab3139 --- /dev/null +++ b/documentation/docs/98-reference/15-@sveltejs-kit-node-polyfills.md @@ -0,0 +1,5 @@ +--- +title: @sveltejs/kit/node/polyfills +--- + +> MODULE: @sveltejs/kit/node/polyfills diff --git a/documentation/docs/98-reference/15-@sveltejs-kit-node.md b/documentation/docs/98-reference/15-@sveltejs-kit-node.md new file mode 100644 index 000000000000..bf12433b0cc0 --- /dev/null +++ b/documentation/docs/98-reference/15-@sveltejs-kit-node.md @@ -0,0 +1,5 @@ +--- +title: @sveltejs/kit/node +--- + +> MODULE: @sveltejs/kit/node diff --git a/documentation/docs/98-reference/15-@sveltejs-kit-vite.md b/documentation/docs/98-reference/15-@sveltejs-kit-vite.md new file mode 100644 index 000000000000..4935ede2c1d5 --- /dev/null +++ b/documentation/docs/98-reference/15-@sveltejs-kit-vite.md @@ -0,0 +1,5 @@ +--- +title: @sveltejs/kit/vite +--- + +> MODULE: @sveltejs/kit/vite diff --git a/documentation/docs/98-reference/20-$app-environment.md b/documentation/docs/98-reference/20-$app-environment.md new file mode 100644 index 000000000000..4f81897214c5 --- /dev/null +++ b/documentation/docs/98-reference/20-$app-environment.md @@ -0,0 +1,5 @@ +--- +title: $app/environment +--- + +> MODULE: $app/environment diff --git a/documentation/docs/98-reference/20-$app-forms.md b/documentation/docs/98-reference/20-$app-forms.md new file mode 100644 index 000000000000..667c84c9a609 --- /dev/null +++ b/documentation/docs/98-reference/20-$app-forms.md @@ -0,0 +1,5 @@ +--- +title: $app/forms +--- + +> MODULE: $app/forms diff --git a/documentation/docs/98-reference/20-$app-navigation.md b/documentation/docs/98-reference/20-$app-navigation.md new file mode 100644 index 000000000000..cb9b0b967985 --- /dev/null +++ b/documentation/docs/98-reference/20-$app-navigation.md @@ -0,0 +1,5 @@ +--- +title: $app/navigation +--- + +> MODULE: $app/navigation diff --git a/documentation/docs/98-reference/20-$app-paths.md b/documentation/docs/98-reference/20-$app-paths.md new file mode 100644 index 000000000000..32a350965e4a --- /dev/null +++ b/documentation/docs/98-reference/20-$app-paths.md @@ -0,0 +1,5 @@ +--- +title: $app/paths +--- + +> MODULE: $app/paths diff --git a/documentation/docs/98-reference/20-$app-server.md b/documentation/docs/98-reference/20-$app-server.md new file mode 100644 index 000000000000..284a470ffae0 --- /dev/null +++ b/documentation/docs/98-reference/20-$app-server.md @@ -0,0 +1,5 @@ +--- +title: $app/server +--- + +> MODULE: $app/server diff --git a/documentation/docs/98-reference/20-$app-state.md b/documentation/docs/98-reference/20-$app-state.md new file mode 100644 index 000000000000..9362eacad82f --- /dev/null +++ b/documentation/docs/98-reference/20-$app-state.md @@ -0,0 +1,10 @@ +--- +title: $app/state +--- + +SvelteKit makes three read-only state objects available via the `$app/state` module — `page`, `navigating` and `updated`. + +> [!NOTE] +> This module was added in 2.12. If you're using an earlier version of SvelteKit, use [`$app/stores`]($app-stores) instead. + +> MODULE: $app/state diff --git a/documentation/docs/98-reference/20-$app-stores.md b/documentation/docs/98-reference/20-$app-stores.md new file mode 100644 index 000000000000..ff7cf8999e82 --- /dev/null +++ b/documentation/docs/98-reference/20-$app-stores.md @@ -0,0 +1,7 @@ +--- +title: $app/stores +--- + +This module contains store-based equivalents of the exports from [`$app/state`]($app-state). If you're using SvelteKit 2.12 or later, use that module instead. + +> MODULE: $app/stores diff --git a/documentation/docs/98-reference/25-$env-dynamic-private.md b/documentation/docs/98-reference/25-$env-dynamic-private.md new file mode 100644 index 000000000000..e16a1b68dec8 --- /dev/null +++ b/documentation/docs/98-reference/25-$env-dynamic-private.md @@ -0,0 +1,5 @@ +--- +title: $env/dynamic/private +--- + +> MODULE: $env/dynamic/private diff --git a/documentation/docs/98-reference/25-$env-dynamic-public.md b/documentation/docs/98-reference/25-$env-dynamic-public.md new file mode 100644 index 000000000000..6f6ee967fafa --- /dev/null +++ b/documentation/docs/98-reference/25-$env-dynamic-public.md @@ -0,0 +1,5 @@ +--- +title: $env/dynamic/public +--- + +> MODULE: $env/dynamic/public diff --git a/documentation/docs/98-reference/25-$env-static-private.md b/documentation/docs/98-reference/25-$env-static-private.md new file mode 100644 index 000000000000..d33ddd685c59 --- /dev/null +++ b/documentation/docs/98-reference/25-$env-static-private.md @@ -0,0 +1,5 @@ +--- +title: $env/static/private +--- + +> MODULE: $env/static/private diff --git a/documentation/docs/98-reference/25-$env-static-public.md b/documentation/docs/98-reference/25-$env-static-public.md new file mode 100644 index 000000000000..590aabd8efc5 --- /dev/null +++ b/documentation/docs/98-reference/25-$env-static-public.md @@ -0,0 +1,5 @@ +--- +title: $env/static/public +--- + +> MODULE: $env/static/public diff --git a/documentation/docs/98-reference/26-$lib.md b/documentation/docs/98-reference/26-$lib.md new file mode 100644 index 000000000000..d9262a29542c --- /dev/null +++ b/documentation/docs/98-reference/26-$lib.md @@ -0,0 +1,19 @@ +--- +title: $lib +--- + +SvelteKit automatically makes files under `src/lib` available using the `$lib` import alias. You can change which directory this alias points to in your [config file](configuration#files). + +```svelte +<!--- file: src/lib/Component.svelte ---> +A reusable component +``` + +```svelte +<!--- file: src/routes/+page.svelte ---> +<script> + import Component from '$lib/Component.svelte'; +</script> + +<Component /> +``` diff --git a/documentation/docs/98-reference/27-$service-worker.md b/documentation/docs/98-reference/27-$service-worker.md new file mode 100644 index 000000000000..a8f7388ba7a9 --- /dev/null +++ b/documentation/docs/98-reference/27-$service-worker.md @@ -0,0 +1,5 @@ +--- +title: $service-worker +--- + +> MODULE: $service-worker diff --git a/documentation/docs/50-reference/10-configuration.md b/documentation/docs/98-reference/50-configuration.md similarity index 88% rename from documentation/docs/50-reference/10-configuration.md rename to documentation/docs/98-reference/50-configuration.md index 5a4f2de14147..ab9e48e7841f 100644 --- a/documentation/docs/50-reference/10-configuration.md +++ b/documentation/docs/98-reference/50-configuration.md @@ -26,8 +26,12 @@ const config = { export default config; ``` -> TYPES: @sveltejs/kit#Config +## Config + +> TYPES: Configuration#Config + +## KitConfig The `kit` property configures SvelteKit, and can have the following properties: -> EXPANDED_TYPES: @sveltejs/kit#KitConfig \ No newline at end of file +> EXPANDED_TYPES: Configuration#KitConfig diff --git a/documentation/docs/50-reference/20-cli.md b/documentation/docs/98-reference/52-cli.md similarity index 100% rename from documentation/docs/50-reference/20-cli.md rename to documentation/docs/98-reference/52-cli.md diff --git a/documentation/docs/98-reference/54-types.md b/documentation/docs/98-reference/54-types.md new file mode 100644 index 000000000000..608e08bf46e6 --- /dev/null +++ b/documentation/docs/98-reference/54-types.md @@ -0,0 +1,207 @@ +--- +title: Types +--- + +## Generated types + +The `RequestHandler` and `Load` types both accept a `Params` argument allowing you to type the `params` object. For example this endpoint expects `foo`, `bar` and `baz` params: + +```js +/// file: src/routes/[foo]/[bar]/[baz]/+server.js +// @errors: 2355 2322 1360 +/** @type {import('@sveltejs/kit').RequestHandler<{ + foo: string; + bar: string; + baz: string + }>} */ +export async function GET({ params }) { + // ... +} +``` + +Needless to say, this is cumbersome to write out, and less portable (if you were to rename the `[foo]` directory to `[qux]`, the type would no longer reflect reality). + +To solve this problem, SvelteKit generates `.d.ts` files for each of your endpoints and pages: + +```ts +/// file: .svelte-kit/types/src/routes/[foo]/[bar]/[baz]/$types.d.ts +/// link: true +import type * as Kit from '@sveltejs/kit'; + +type RouteParams = { + foo: string; + bar: string; + baz: string; +}; + +export type RequestHandler = Kit.RequestHandler<RouteParams>; +export type PageLoad = Kit.Load<RouteParams>; +``` + +These files can be imported into your endpoints and pages as siblings, thanks to the [`rootDirs`](https://www.typescriptlang.org/tsconfig#rootDirs) option in your TypeScript configuration: + +```js +/// file: src/routes/[foo]/[bar]/[baz]/+server.js +// @filename: $types.d.ts +import type * as Kit from '@sveltejs/kit'; + +type RouteParams = { + foo: string; + bar: string; + baz: string; +} + +export type RequestHandler = Kit.RequestHandler<RouteParams>; + +// @filename: index.js +// @errors: 2355 2322 +// ---cut--- +/** @type {import('./$types').RequestHandler} */ +export async function GET({ params }) { + // ... +} +``` + +```js +/// file: src/routes/[foo]/[bar]/[baz]/+page.js +// @filename: $types.d.ts +import type * as Kit from '@sveltejs/kit'; + +type RouteParams = { + foo: string; + bar: string; + baz: string; +} + +export type PageLoad = Kit.Load<RouteParams>; + +// @filename: index.js +// @errors: 2355 +// ---cut--- +/** @type {import('./$types').PageLoad} */ +export async function load({ params, fetch }) { + // ... +} +``` + +The return types of the load functions are then available through the `$types` module as `PageData` and `LayoutData` respectively, while the union of the return values of all `Actions` is available as `ActionData`. + +Starting with version 2.16.0, two additional helper types are provided: `PageProps` defines `data: PageData`, as well as `form: ActionData`, when there are actions defined, while `LayoutProps` defines `data: LayoutData`, as well as `children: Snippet`. + +```svelte +<!--- file: src/routes/+page.svelte ---> +<script> + /** @type {import('./$types').PageProps} */ + let { data, form } = $props(); +</script> +``` + +> [!LEGACY] +> Before 2.16.0: +> ```svelte +> <!--- file: src/routes/+page.svelte ---> +> <script> +> /** @type {{ data: import('./$types').PageData, form: import('./$types').ActionData }} */ +> let { data, form } = $props(); +> </script> +> ``` +> +> Using Svelte 4: +> ```svelte +> <!--- file: src/routes/+page.svelte ---> +> <script> +> /** @type {import('./$types').PageData} */ +> export let data; +> /** @type {import('./$types').ActionData} */ +> export let form; +> </script> +> ``` + +> [!NOTE] For this to work, your own `tsconfig.json` or `jsconfig.json` should extend from the generated `.svelte-kit/tsconfig.json` (where `.svelte-kit` is your [`outDir`](configuration#outDir)): +> +> `{ "extends": "./.svelte-kit/tsconfig.json" }` + +### Default tsconfig.json + +The generated `.svelte-kit/tsconfig.json` file contains a mixture of options. Some are generated programmatically based on your project configuration, and should generally not be overridden without good reason: + +```json +/// file: .svelte-kit/tsconfig.json +{ + "compilerOptions": { + "paths": { + "$lib": ["../src/lib"], + "$lib/*": ["../src/lib/*"] + }, + "rootDirs": ["..", "./types"] + }, + "include": [ + "ambient.d.ts", + "non-ambient.d.ts", + "./types/**/$types.d.ts", + "../vite.config.js", + "../vite.config.ts", + "../src/**/*.js", + "../src/**/*.ts", + "../src/**/*.svelte", + "../tests/**/*.js", + "../tests/**/*.ts", + "../tests/**/*.svelte" + ], + "exclude": [ + "../node_modules/**", + "../src/service-worker.js", + "../src/service-worker/**/*.js", + "../src/service-worker.ts", + "../src/service-worker/**/*.ts", + "../src/service-worker.d.ts", + "../src/service-worker/**/*.d.ts" + ] +} +``` + +Others are required for SvelteKit to work properly, and should also be left untouched unless you know what you're doing: + +```json +/// file: .svelte-kit/tsconfig.json +{ + "compilerOptions": { + // this ensures that types are explicitly + // imported with `import type`, which is + // necessary as Svelte/Vite cannot + // otherwise compile components correctly + "verbatimModuleSyntax": true, + + // Vite compiles one TypeScript module + // at a time, rather than compiling + // the entire module graph + "isolatedModules": true, + + // Tell TS it's used only for type-checking + "noEmit": true, + + // This ensures both `vite build` + // and `svelte-package` work correctly + "lib": ["esnext", "DOM", "DOM.Iterable"], + "moduleResolution": "bundler", + "module": "esnext", + "target": "esnext" + } +} +``` + +## $lib + +This is a simple alias to `src/lib`, or whatever directory is specified as [`config.kit.files.lib`](configuration#files). It allows you to access common components and utility modules without `../../../../` nonsense. + +### $lib/server + +A subdirectory of `$lib`. SvelteKit will prevent you from importing any modules in `$lib/server` into client-side code. See [server-only modules](server-only-modules). + +## app.d.ts + +The `app.d.ts` file is home to the ambient types of your apps, i.e. types that are available without explicitly importing them. + +Always part of this file is the `App` namespace. This namespace contains several types that influence the shape of certain SvelteKit features you interact with. + +> TYPES: App diff --git a/documentation/docs/98-reference/index.md b/documentation/docs/98-reference/index.md new file mode 100644 index 000000000000..b98302768eb0 --- /dev/null +++ b/documentation/docs/98-reference/index.md @@ -0,0 +1,3 @@ +--- +title: Reference +--- diff --git a/documentation/docs/index.md b/documentation/docs/index.md new file mode 100644 index 000000000000..e653b7f063c6 --- /dev/null +++ b/documentation/docs/index.md @@ -0,0 +1,3 @@ +--- +title: SvelteKit +--- diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000000..9bb8dd2a7156 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,47 @@ +import svelte_config from '@sveltejs/eslint-config'; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + ...svelte_config, + { + rules: { + 'no-undef': 'off' + } + }, + { + ignores: [ + '**/.svelte-kit', + '**/test-results', + '**/build', + '**/.custom-out-dir', + 'packages/adapter-*/files' + ] + }, + { + languageOptions: { + parserOptions: { + projectService: true + } + }, + rules: { + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/no-unused-expressions': 'off', + '@typescript-eslint/require-await': 'error', + '@typescript-eslint/no-floating-promises': 'error' + }, + ignores: [ + 'packages/adapter-cloudflare/test/apps/**/*', + 'packages/adapter-node/rollup.config.js', + 'packages/adapter-node/tests/smoke.spec_disabled.js', + 'packages/adapter-static/test/apps/**/*', + 'packages/create-svelte/shared/**/*', + 'packages/create-svelte/templates/**/*', + 'packages/kit/src/core/sync/create_manifest_data/test/samples/**/*', + 'packages/kit/test/apps/**/*', + 'packages/kit/test/build-errors/**/*', + 'packages/kit/test/prerendering/**/*', + 'packages/package/test/errors/**/*', + 'packages/package/test/fixtures/**/*' + ] + } +]; diff --git a/package.json b/package.json index 26de3310fe0c..09052d1b6a80 100644 --- a/package.json +++ b/package.json @@ -5,40 +5,43 @@ "private": true, "type": "module", "scripts": { - "test": "pnpm test -r --filter=./packages/* --filter=!./packages/create-svelte", + "test:kit": "pnpm run --dir packages/kit test", "test:cross-platform:dev": "pnpm run --dir packages/kit test:cross-platform:dev", "test:cross-platform:build": "pnpm run --dir packages/kit test:cross-platform:build", - "test:vite-ecosystem-ci": "pnpm test --dir packages/kit", - "test:create-svelte": "pnpm run --dir packages/create-svelte test", + "test:server-side-route-resolution:dev": "pnpm run --dir packages/kit test:server-side-route-resolution:dev", + "test:server-side-route-resolution:build": "pnpm run --dir packages/kit test:server-side-route-resolution:build", + "test:vite-ecosystem-ci": "pnpm --dir packages/kit test", + "test:others": "pnpm -r --filter=./packages/* --filter=!./packages/kit/ --workspace-concurrency=1 test", "check": "pnpm -r prepublishOnly && pnpm -r check", "lint": "pnpm -r lint && eslint --cache --cache-location node_modules/.eslintcache 'packages/**/*.js'", "format": "pnpm -r format", "precommit": "pnpm format && pnpm lint", "changeset:version": "changeset version && pnpm -r generate:version && git add --all", "changeset:release": "changeset publish", - "start": "cd sites/kit.svelte.dev && npm run dev", - "postinstall": "pnpm -r generate:types" + "build": "pnpm --filter @sveltejs/* -r build", + "sync-all": "node scripts/sync-all.js" }, "devDependencies": { - "@changesets/cli": "^2.26.0", - "@rollup/plugin-commonjs": "^25.0.0", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-node-resolve": "^15.0.1", - "@sveltejs/eslint-config": "^6.0.4", - "@svitejs/changesets-changelog-github-compact": "^1.1.0", - "@typescript-eslint/eslint-plugin": "^6.0.0", - "eslint": "^8.45.0", - "eslint-config-prettier": "^9.0.0", - "eslint-plugin-svelte": "^2.31.0", - "eslint-plugin-unicorn": "^48.0.0", - "playwright": "1.30.0", - "prettier": "^2.8.0", - "rollup": "^3.7.0", - "svelte": "^4.0.5", - "typescript": "^4.9.4" + "@changesets/cli": "^2.29.5", + "@playwright/test": "catalog:", + "@sveltejs/eslint-config": "^8.2.0", + "@svitejs/changesets-changelog-github-compact": "^1.2.0", + "eslint": "^9.29.0", + "prettier": "^3.6.0", + "prettier-plugin-svelte": "^3.4.0", + "typescript-eslint": "^8.35.0" }, - "packageManager": "pnpm@8.9.2", + "packageManager": "pnpm@10.12.4", "engines": { - "pnpm": "^8.0.0" + "pnpm": ">=9.0.0" + }, + "pnpm": { + "onlyBuiltDependencies": [ + "esbuild", + "rolldown", + "sharp", + "svelte-preprocess", + "workerd" + ] } } diff --git a/packages/adapter-auto/CHANGELOG.md b/packages/adapter-auto/CHANGELOG.md index ac7c9c066087..c0373fa2e695 100644 --- a/packages/adapter-auto/CHANGELOG.md +++ b/packages/adapter-auto/CHANGELOG.md @@ -1,5 +1,140 @@ # @sveltejs/adapter-auto +## 6.0.1 +### Patch Changes + + +- chore: remove `import-meta-resolve` dependency ([#13629](https://github.com/sveltejs/kit/pull/13629)) + +- Updated dependencies [[`bd1c04662332cbafa843c35a2e783486116af3d5`](https://github.com/sveltejs/kit/commit/bd1c04662332cbafa843c35a2e783486116af3d5), [`09f61ec2a14573e27769edb403c58aea5433a39f`](https://github.com/sveltejs/kit/commit/09f61ec2a14573e27769edb403c58aea5433a39f), [`09f61ec2a14573e27769edb403c58aea5433a39f`](https://github.com/sveltejs/kit/commit/09f61ec2a14573e27769edb403c58aea5433a39f)]: + - @sveltejs/kit@2.21.0 + +## 6.0.0 +### Major Changes + + +- feat: upgrade `@sveltejs/adapter-cloudflare` to version 7 ([#13661](https://github.com/sveltejs/kit/pull/13661)) + +## 5.0.0 +### Major Changes + + +- feat: update Netlify and Cloudflare Pages major versions ([#13615](https://github.com/sveltejs/kit/pull/13615)) + +## 4.0.0 +### Major Changes + + +- feat: update Vercel, Cloudflare Pages, and Netlify adapter major versions ([#13142](https://github.com/sveltejs/kit/pull/13142)) + + +### Patch Changes + +- Updated dependencies [[`1bedcc1cfc1f2d85946c1423f60faa8a2a56148b`](https://github.com/sveltejs/kit/commit/1bedcc1cfc1f2d85946c1423f60faa8a2a56148b), [`e201fa9380a00e072a80a2dcab56de3d77e5b67c`](https://github.com/sveltejs/kit/commit/e201fa9380a00e072a80a2dcab56de3d77e5b67c), [`f3f08582d41b08c3fd1daf742e5703d9cdca7823`](https://github.com/sveltejs/kit/commit/f3f08582d41b08c3fd1daf742e5703d9cdca7823), [`d4bcfccb4503b12fe76140dbb6cfddc81f9419fc`](https://github.com/sveltejs/kit/commit/d4bcfccb4503b12fe76140dbb6cfddc81f9419fc), [`d09bc033123903f359c1ad6fd3a6d8d7fc19298a`](https://github.com/sveltejs/kit/commit/d09bc033123903f359c1ad6fd3a6d8d7fc19298a)]: + - @sveltejs/kit@2.15.3 + +## 3.3.1 +### Patch Changes + + +- docs: update URLs for new svelte.dev site ([#12857](https://github.com/sveltejs/kit/pull/12857)) + +- Updated dependencies [[`dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46`](https://github.com/sveltejs/kit/commit/dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46), [`4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d`](https://github.com/sveltejs/kit/commit/4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d), [`3a9b78f04786898ca93f6d4b75ab18d26bc45192`](https://github.com/sveltejs/kit/commit/3a9b78f04786898ca93f6d4b75ab18d26bc45192), [`723eb8b31e6a22c82f730c30e485386c8676b746`](https://github.com/sveltejs/kit/commit/723eb8b31e6a22c82f730c30e485386c8676b746), [`8ec471c875345b751344e67580ff1b772ef2735b`](https://github.com/sveltejs/kit/commit/8ec471c875345b751344e67580ff1b772ef2735b)]: + - @sveltejs/kit@2.7.3 + +## 3.3.0 +### Minor Changes + + +- feat: add support for Bun package manager ([#12854](https://github.com/sveltejs/kit/pull/12854)) + +## 3.2.5 +### Patch Changes + + +- fix: import `node:process` instead of using globals ([#12641](https://github.com/sveltejs/kit/pull/12641)) + +- Updated dependencies [[`e798ef718f163bed4f93e1918bd8294f765376ad`](https://github.com/sveltejs/kit/commit/e798ef718f163bed4f93e1918bd8294f765376ad)]: + - @sveltejs/kit@2.5.28 + +## 3.2.4 +### Patch Changes + + +- chore: configure provenance in a simpler manner ([#12570](https://github.com/sveltejs/kit/pull/12570)) + +- Updated dependencies [[`087a43d391fc38b8c008fb39a804dc6988974101`](https://github.com/sveltejs/kit/commit/087a43d391fc38b8c008fb39a804dc6988974101)]: + - @sveltejs/kit@2.5.22 + +## 3.2.3 +### Patch Changes + + +- chore: package provenance ([#12567](https://github.com/sveltejs/kit/pull/12567)) + +- Updated dependencies [[`4930a8443caa53bcecee7b690cd28e429b1c8a20`](https://github.com/sveltejs/kit/commit/4930a8443caa53bcecee7b690cd28e429b1c8a20)]: + - @sveltejs/kit@2.5.21 + +## 3.2.2 + +### Patch Changes + +- chore: add keywords for discovery in npm search ([#12330](https://github.com/sveltejs/kit/pull/12330)) + +- Updated dependencies [[`25acb1d9fce998dccd8050b93cf4142c2b082611`](https://github.com/sveltejs/kit/commit/25acb1d9fce998dccd8050b93cf4142c2b082611), [`642c4a4aff4351b786fe6274aa2f0bf7d905faf9`](https://github.com/sveltejs/kit/commit/642c4a4aff4351b786fe6274aa2f0bf7d905faf9), [`0a0e9aa897123ebec50af08e9385b2ca4fc5bb28`](https://github.com/sveltejs/kit/commit/0a0e9aa897123ebec50af08e9385b2ca4fc5bb28)]: + - @sveltejs/kit@2.5.11 + +## 3.2.1 + +### Patch Changes + +- fix: bump import-meta-resolve to remove deprecation warnings ([#12240](https://github.com/sveltejs/kit/pull/12240)) + +- Updated dependencies [[`460d4526c80358958e58a2451fe1b663fdc656e9`](https://github.com/sveltejs/kit/commit/460d4526c80358958e58a2451fe1b663fdc656e9), [`16cd900c304e0cf0f16b484aa61a5ba0531d8751`](https://github.com/sveltejs/kit/commit/16cd900c304e0cf0f16b484aa61a5ba0531d8751)]: + - @sveltejs/kit@2.5.10 + +## 3.2.0 + +### Minor Changes + +- feat: add support for Google Cloud Run ([#12015](https://github.com/sveltejs/kit/pull/12015)) + +## 3.1.1 + +### Patch Changes + +- fix: better error message when using `read` ([#11689](https://github.com/sveltejs/kit/pull/11689)) + +## 3.1.0 + +### Minor Changes + +- feat: bump Azure adapter version ([#11496](https://github.com/sveltejs/kit/pull/11496)) + +## 3.0.1 + +### Patch Changes + +- chore: update primary branch from master to main ([`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d)) + +- Updated dependencies [[`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d), [`16961e8cd3fa6a7f382153b1ff056bc2aae9b31b`](https://github.com/sveltejs/kit/commit/16961e8cd3fa6a7f382153b1ff056bc2aae9b31b), [`197e01f95652f511160f38b37b9da73a124ecd48`](https://github.com/sveltejs/kit/commit/197e01f95652f511160f38b37b9da73a124ecd48), [`102e4a5ae5b29624302163faf5a20c94a64a5b2c`](https://github.com/sveltejs/kit/commit/102e4a5ae5b29624302163faf5a20c94a64a5b2c), [`f8e3d8b9728c9f1ab63389342c31d7246b6f9db6`](https://github.com/sveltejs/kit/commit/f8e3d8b9728c9f1ab63389342c31d7246b6f9db6)]: + - @sveltejs/kit@2.0.4 + +## 3.0.0 + +### Major Changes + +- breaking: require SvelteKit 2 ([#11316](https://github.com/sveltejs/kit/pull/11316)) + +## 2.1.1 + +### Patch Changes + +- chore(deps): update dependency `import-meta-resolve` to v4 ([#10970](https://github.com/sveltejs/kit/pull/10970)) + +- Updated dependencies [[`072430ec5`](https://github.com/sveltejs/kit/commit/072430ec5c64782cd25c750f40534fea9cab4b40)]: + - @sveltejs/kit@1.27.3 + ## 2.1.0 ### Minor Changes diff --git a/packages/adapter-auto/README.md b/packages/adapter-auto/README.md index c0e2ba93474c..ed96335346a5 100644 --- a/packages/adapter-auto/README.md +++ b/packages/adapter-auto/README.md @@ -4,8 +4,8 @@ Automatically chooses the SvelteKit adapter for your current environment, if pos ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-auto) +[Docs](https://svelte.dev/docs/kit/adapter-auto) ## Changelog -[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/master/packages/adapter-auto/CHANGELOG.md). +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-auto/CHANGELOG.md). diff --git a/packages/adapter-auto/adapters.js b/packages/adapter-auto/adapters.js index 13ec6d189b97..94fe1417ec73 100644 --- a/packages/adapter-auto/adapters.js +++ b/packages/adapter-auto/adapters.js @@ -1,3 +1,5 @@ +import process from 'node:process'; + // List of adapters to check for. `version` is used to pin the installed adapter version and should point // to the latest version of the adapter that is compatible with adapter-auto's current peerDependency version of SvelteKit. export const adapters = [ @@ -5,30 +7,36 @@ export const adapters = [ name: 'Vercel', test: () => !!process.env.VERCEL, module: '@sveltejs/adapter-vercel', - version: '2' + version: '5' }, { name: 'Cloudflare Pages', test: () => !!process.env.CF_PAGES, module: '@sveltejs/adapter-cloudflare', - version: '2' + version: '7' }, { name: 'Netlify', test: () => !!process.env.NETLIFY, module: '@sveltejs/adapter-netlify', - version: '2' + version: '5' }, { name: 'Azure Static Web Apps', test: () => process.env.GITHUB_ACTION_REPOSITORY === 'Azure/static-web-apps-deploy', module: 'svelte-adapter-azure-swa', - version: '0.13' + version: '0.20' }, { name: 'AWS via SST', test: () => !!process.env.SST, module: 'svelte-kit-sst', version: '2' + }, + { + name: 'Google Cloud Run', + test: () => !!process.env.GCP_BUILDPACKS, + module: '@sveltejs/adapter-node', + version: '5' } ]; diff --git a/packages/adapter-auto/index.js b/packages/adapter-auto/index.js index 14115c45b888..0a2c0030e643 100644 --- a/packages/adapter-auto/index.js +++ b/packages/adapter-auto/index.js @@ -1,25 +1,29 @@ import { execSync } from 'node:child_process'; -import { pathToFileURL } from 'node:url'; -import { resolve } from 'import-meta-resolve'; import { adapters } from './adapters.js'; -import { dirname, join } from 'node:path'; -import { existsSync } from 'node:fs'; +import path from 'node:path'; +import fs from 'node:fs'; +import process from 'node:process'; /** @type {Record<string, (name: string, version: string) => string>} */ const commands = { npm: (name, version) => `npm install -D ${name}@${version}`, pnpm: (name, version) => `pnpm add -D ${name}@${version}`, - yarn: (name, version) => `yarn add -D ${name}@${version}` + yarn: (name, version) => `yarn add -D ${name}@${version}`, + bun: (name, version) => `bun add -D ${name}@${version}` }; function detect_lockfile() { let dir = process.cwd(); + /** @param {string} file */ + const exists = (file) => fs.existsSync(path.join(dir, file)); + do { - if (existsSync(join(dir, 'pnpm-lock.yaml'))) return 'pnpm'; - if (existsSync(join(dir, 'yarn.lock'))) return 'yarn'; - if (existsSync(join(dir, 'package-lock.json'))) return 'npm'; - } while (dir !== (dir = dirname(dir))); + if (exists('pnpm-lock.yaml')) return 'pnpm'; + if (exists('yarn.lock')) return 'yarn'; + if (exists('package-lock.json')) return 'npm'; + if (exists('bun.lockb') || exists('bun.lock')) return 'bun'; + } while (dir !== (dir = path.dirname(dir))); return 'npm'; } @@ -35,12 +39,40 @@ function detect_package_manager() { } } -/** @param {string} name */ -async function import_from_cwd(name) { - const cwd = pathToFileURL(process.cwd()).href; - const url = await resolve(name, cwd + '/x.js'); +/** + * Resolves a peer dependency relative to the current CWD. Duplicated with `packages/kit` + * @param {string} dependency + */ +function resolve_peer(dependency) { + let [name, ...parts] = dependency.split('/'); + if (name[0] === '@') name += `/${parts.shift()}`; + + let dir = process.cwd(); + + while (!fs.existsSync(`${dir}/node_modules/${name}/package.json`)) { + if (dir === (dir = path.dirname(dir))) { + throw new Error( + `Could not resolve peer dependency "${name}" relative to your project — please install it and try again.` + ); + } + } + + const pkg_dir = `${dir}/node_modules/${name}`; + const pkg = JSON.parse(fs.readFileSync(`${pkg_dir}/package.json`, 'utf-8')); + + const subpackage = ['.', ...parts].join('/'); + + let exported = pkg.exports[subpackage]; + + while (typeof exported !== 'string') { + if (!exported) { + throw new Error(`Could not find valid "${subpackage}" export in ${name}/package.json`); + } + + exported = exported['import'] ?? exported['default']; + } - return import(url); + return path.resolve(pkg_dir, exported); } /** @typedef {import('@sveltejs/kit').Adapter} Adapter */ @@ -53,47 +85,43 @@ async function get_adapter() { if (!match) return; - /** @type {{ default: () => Adapter }} */ - let module; + /** @type {string} */ + let resolved; try { - module = await import_from_cwd(match.module); - } catch (error) { - if ( - error.code === 'ERR_MODULE_NOT_FOUND' && - error.message.startsWith(`Cannot find package '${match.module}'`) - ) { - const package_manager = detect_package_manager(); - const command = commands[package_manager](match.module, match.version); - - try { - console.log(`Installing ${match.module}...`); - - execSync(command, { - stdio: 'inherit', - env: { - ...process.env, - NODE_ENV: undefined - } - }); - - module = await import_from_cwd(match.module); - - console.log(`Successfully installed ${match.module}.`); - console.warn( - `\nIf you plan on staying on this deployment platform, consider replacing @sveltejs/adapter-auto with ${match.module}. This will give you faster and more robust installs, and more control over deployment configuration.\n` - ); - } catch (e) { - throw new Error( - `Could not install ${match.module}. Please install it yourself by adding it to your package.json's devDependencies and try building your project again.`, - { cause: e } - ); - } - } else { - throw error; + resolved = resolve_peer(match.module); + } catch { + const package_manager = detect_package_manager(); + const command = commands[package_manager](match.module, match.version); + + try { + console.log(`Installing ${match.module}...`); + + execSync(command, { + stdio: 'inherit', + env: { + ...process.env, + NODE_ENV: undefined + } + }); + + resolved = resolve_peer(match.module); + + console.log(`Successfully installed ${match.module}.`); + console.warn( + `\nIf you plan on staying on this deployment platform, consider replacing @sveltejs/adapter-auto with ${match.module}. This will give you faster and more robust installs, and more control over deployment configuration.\n` + ); + } catch (e) { + throw new Error( + `Could not install ${match.module}. Please install it yourself by adding it to your package.json's devDependencies and try building your project again.`, + { cause: e } + ); } } + /** @type {{ default: () => Adapter }} */ + const module = await import(resolved); + const adapter = module.default(); return { @@ -114,7 +142,25 @@ export default () => ({ if (adapter) return adapter.adapt(builder); builder.log.warn( - 'Could not detect a supported production environment. See https://kit.svelte.dev/docs/adapters to learn how to configure your app to run on the platform of your choosing' + 'Could not detect a supported production environment. See https://svelte.dev/docs/kit/adapters to learn how to configure your app to run on the platform of your choosing' ); + }, + supports: { + read: () => { + supports_error( + 'The read function imported from $app/server only works in certain environments' + ); + } } }); + +/** + * @param {string} message + * @returns {never} + * @throws {Error} + */ +function supports_error(message) { + throw new Error( + `${message}. Since you're using @sveltejs/adapter-auto, SvelteKit cannot determine whether it will work when your app is deployed. Please replace it with an adapter tailored to your target environment.` + ); +} diff --git a/packages/adapter-auto/package.json b/packages/adapter-auto/package.json index 856e80a17038..e0e6d6692149 100644 --- a/packages/adapter-auto/package.json +++ b/packages/adapter-auto/package.json @@ -1,14 +1,23 @@ { "name": "@sveltejs/adapter-auto", - "version": "2.1.0", + "version": "6.0.1", "description": "Automatically chooses the SvelteKit adapter for your current environment, if possible.", + "keywords": [ + "adapter", + "automatically", + "deploy", + "hosting", + "platform", + "svelte", + "sveltekit" + ], "repository": { "type": "git", "url": "https://github.com/sveltejs/kit", "directory": "packages/adapter-auto" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { @@ -25,19 +34,19 @@ "adapters.js" ], "scripts": { - "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore", + "lint": "prettier --check .", "format": "pnpm lint --write", - "check": "tsc" + "check": "tsc", + "test": "vitest run" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "@types/node": "^16.18.6", - "typescript": "^4.9.4" - }, - "dependencies": { - "import-meta-resolve": "^3.0.0" + "@sveltejs/vite-plugin-svelte": "catalog:", + "@types/node": "^18.19.48", + "typescript": "^5.3.3", + "vitest": "catalog:" }, "peerDependencies": { - "@sveltejs/kit": "^1.0.0" + "@sveltejs/kit": "^2.0.0" } } diff --git a/packages/adapter-auto/test/adapters.spec.js b/packages/adapter-auto/test/adapters.spec.js new file mode 100644 index 000000000000..abb873fa6a78 --- /dev/null +++ b/packages/adapter-auto/test/adapters.spec.js @@ -0,0 +1,16 @@ +import { assert, test } from 'vitest'; +import { adapters } from 'adapters.js'; +import { existsSync, readFileSync } from 'node:fs'; + +test('adapter versions are up to date', () => { + for (const adapter of adapters) { + const dir = adapter.module.replace('@sveltejs/', ''); + const package_json = `../${dir}/package.json`; + if (!existsSync(package_json)) { + continue; + } + const adapter_version = JSON.parse(readFileSync(package_json, 'utf-8')).version; + const [major] = adapter_version.split('.'); + assert.equal(adapter.version, major, `${adapter.name} adapter is outdated`); + } +}); diff --git a/packages/adapter-auto/tsconfig.json b/packages/adapter-auto/tsconfig.json index d42c1c9c4b32..c1f396b255ce 100644 --- a/packages/adapter-auto/tsconfig.json +++ b/packages/adapter-auto/tsconfig.json @@ -4,9 +4,8 @@ "checkJs": true, "noEmit": true, "noImplicitAny": true, - "module": "esnext", - "target": "esnext", - "skipLibCheck": true, + "target": "es2022", + "module": "node16", "moduleResolution": "node16", "baseUrl": "." }, diff --git a/packages/adapter-cloudflare-workers/CHANGELOG.md b/packages/adapter-cloudflare-workers/CHANGELOG.md deleted file mode 100644 index 7ee49c4401af..000000000000 --- a/packages/adapter-cloudflare-workers/CHANGELOG.md +++ /dev/null @@ -1,520 +0,0 @@ -# @sveltejs/adapter-cloudflare-workers - -## 1.1.4 - -### Patch Changes - -- fix: mark `cloudflare:` packages as external ([#10404](https://github.com/sveltejs/kit/pull/10404)) - -- Updated dependencies [[`0f0049810`](https://github.com/sveltejs/kit/commit/0f00498100361ef0a4ea8b0b4e8465e442fa22a6), [`6f36aefe1`](https://github.com/sveltejs/kit/commit/6f36aefe13bf55cfaef14166c60ecee989061ddd)]: - - @sveltejs/kit@1.22.4 - -## 1.1.3 - -### Patch Changes - -- chore: upgrade to esbuild 0.18.11 ([#10330](https://github.com/sveltejs/kit/pull/10330)) - -- Updated dependencies [[`23d1df702`](https://github.com/sveltejs/kit/commit/23d1df702f0fd77983040404352d8d83fd1dd8a1), [`486a971fe`](https://github.com/sveltejs/kit/commit/486a971fe7c375aae1585f1fa2505e28f86f4b8e)]: - - @sveltejs/kit@1.22.2 - -## 1.1.2 - -### Patch Changes - -- fix: Copy .wasm files during build ([#9940](https://github.com/sveltejs/kit/pull/9940)) - -- Updated dependencies [[`50acb22ca`](https://github.com/sveltejs/kit/commit/50acb22caf2901283e044cdfda36db6f07b3e0ae), [`2e6da9496`](https://github.com/sveltejs/kit/commit/2e6da9496bdace2c65040b9d1845c44801ca868c), [`a81106b3a`](https://github.com/sveltejs/kit/commit/a81106b3a817829c41e048207d6253e63988c58c), [`a6338a0b1`](https://github.com/sveltejs/kit/commit/a6338a0b124f54bda7ba3fe64be1d6173e118d00), [`4a85b7f08`](https://github.com/sveltejs/kit/commit/4a85b7f0820d35c7830c00afe1df3c94fcbf8c3d), [`26d2b7f8f`](https://github.com/sveltejs/kit/commit/26d2b7f8f5ca29c60ef61b936ff86deaeb1636ce), [`bc70b4e63`](https://github.com/sveltejs/kit/commit/bc70b4e636fcbd9593356996bf737e014ff8c238), [`ab9f57721`](https://github.com/sveltejs/kit/commit/ab9f57721fca146af7c4eb41f4875fafa5dfc0d2)]: - - @sveltejs/kit@1.17.0 - -## 1.1.1 - -### Patch Changes - -- chore: update all dependencies with minor version bumps ([#9761](https://github.com/sveltejs/kit/pull/9761)) - -## 1.1.0 - -### Minor Changes - -- feat: use `es2022` target ([#9293](https://github.com/sveltejs/kit/pull/9293)) - -### Patch Changes - -- Updated dependencies [[`2b647fd8`](https://github.com/sveltejs/kit/commit/2b647fd85be028bc5775894567ee8b13f91411a7), [`fbe4fe76`](https://github.com/sveltejs/kit/commit/fbe4fe768140abac09bd66edd12c77787cafc2c5), [`744dc81c`](https://github.com/sveltejs/kit/commit/744dc81c6b0d8cade087df733c6d3d3f1281e68c)]: - - @sveltejs/kit@1.10.0 - -## 1.0.6 - -### Patch Changes - -- feat: expose `App.Platform` interface automatically ([#8531](https://github.com/sveltejs/kit/pull/8531)) - -- docs: move adapter docs to site ([#8531](https://github.com/sveltejs/kit/pull/8531)) - -- fix: amend `App.Platform` ([#8531](https://github.com/sveltejs/kit/pull/8531)) - -## 1.0.5 - -### Patch Changes - -- fix: publish missing files ([#8532](https://github.com/sveltejs/kit/pull/8532)) - -## 1.0.4 - -### Patch Changes - -- chore: remove superfluous main field from package.json ([#8519](https://github.com/sveltejs/kit/pull/8519)) - -- Updated dependencies [[`7e2d3405`](https://github.com/sveltejs/kit/commit/7e2d34056e99f371e22406d941b764df365a2649)]: - - @sveltejs/kit@1.1.1 - -## 1.0.3 - -### Patch Changes - -- fix: don't load ambient worker types ([#8483](https://github.com/sveltejs/kit/pull/8483)) - -## 1.0.2 - -### Patch Changes - -- docs: add note about inability to access file system at runtime ([#8441](https://github.com/sveltejs/kit/pull/8441)) - -- Updated dependencies [[`9c01c32e`](https://github.com/sveltejs/kit/commit/9c01c32ef72bbed630fadcb8283f8f8533ced5e1), [`b6ca02a6`](https://github.com/sveltejs/kit/commit/b6ca02a684dbf13a3138b552e2d2be64697f2254), [`130abe43`](https://github.com/sveltejs/kit/commit/130abe43cef2cfbaf922aa16b20cbd4332a07c15), [`c4137536`](https://github.com/sveltejs/kit/commit/c4137536f2c6572eaeec1a82ccea0852f5be6b98), [`40464efa`](https://github.com/sveltejs/kit/commit/40464efab172a17f0b637d7dadea30d77ef1ed10), [`ce028470`](https://github.com/sveltejs/kit/commit/ce0284708184198efdd30f3ff72fd579cef830b4)]: - - @sveltejs/kit@1.0.12 - -## 1.0.1 - -### Patch Changes - -- chore: update @cloudflare/kv-asset-handler ([`30e1130e`](https://github.com/sveltejs/kit/commit/30e1130ef84e56a77be5cb1136d5c53edef6e5f9)) -- Updated dependencies [[`fab0de4f`](https://github.com/sveltejs/kit/commit/fab0de4f06ac5b1e9b049e106889b193975c1c29), [`89b8d94b`](https://github.com/sveltejs/kit/commit/89b8d94b1b20d586e1ca525c30d07587c3f2d8f2)]: - - @sveltejs/kit@1.0.2 - -## 1.0.0 - -### Major Changes - -First major release, see below for the history of changes that lead up to this. -Starting from now all releases follow semver and changes will be listed as Major/Minor/Patch - -## 1.0.0-next.65 - -### Patch Changes - -- breaking: remove warnings/errors about removed/changed APIs ([#8019](https://github.com/sveltejs/kit/pull/8019)) -- Updated dependencies [[`f42604a2`](https://github.com/sveltejs/kit/commit/f42604a2b4c04026d3d8bad95807720b79529539)]: - - @sveltejs/kit@1.0.0-next.589 - -## 1.0.0-next.64 - -### Patch Changes - -- chore: add peerDependencies, add more specific next version ([#8141](https://github.com/sveltejs/kit/pull/8141)) - -## 1.0.0-next.63 - -### Patch Changes - -- fix: revert platform change from browser to neutral ([#8122](https://github.com/sveltejs/kit/pull/8122)) - -## 1.0.0-next.62 - -### Patch Changes - -- fix: set esbuild platform to neutral ([#8083](https://github.com/sveltejs/kit/pull/8083)) - -## 1.0.0-next.61 - -### Patch Changes - -- update esbuild to ^0.16.3 ([#7543](https://github.com/sveltejs/kit/pull/7543)) - -## 1.0.0-next.60 - -### Patch Changes - -- update dependencies ([#7355](https://github.com/sveltejs/kit/pull/7355)) - -## 1.0.0-next.59 - -### Patch Changes - -- Use config.kit.paths.base prefix for static assets ([#4448](https://github.com/sveltejs/kit/pull/4448)) - -## 1.0.0-next.58 - -### Patch Changes - -- Add config option to set custom `wrangler.toml` file name ([#7104](https://github.com/sveltejs/kit/pull/7104)) - -## 1.0.0-next.57 - -### Patch Changes - -- Include ambient.d.ts files in adapter packages. ([#6917](https://github.com/sveltejs/kit/pull/6917)) - -## 1.0.0-next.56 - -### Patch Changes - -- chore: bump esbuild ([#6829](https://github.com/sveltejs/kit/pull/6829)) - -## 1.0.0-next.55 - -### Patch Changes - -- Update to esbuild 0.15 ([#6740](https://github.com/sveltejs/kit/pull/6740)) - -## 1.0.0-next.54 - -### Patch Changes - -- feat: Moved hooks.js initialization from Server.respond into Server.init ([#6179](https://github.com/sveltejs/kit/pull/6179)) - -## 1.0.0-next.53 - -### Patch Changes - -- expose caches on platform ([#5887](https://github.com/sveltejs/kit/pull/5887)) - -## 1.0.0-next.52 - -### Patch Changes - -- Initialise `env` ([#5663](https://github.com/sveltejs/kit/pull/5663)) - -## 1.0.0-next.51 - -### Patch Changes - -- breaking: remove writeStatic to align with Vite ([#5618](https://github.com/sveltejs/kit/pull/5618)) - -## 1.0.0-next.50 - -### Patch Changes - -- Update dependencies ([#5005](https://github.com/sveltejs/kit/pull/5005)) - -## 1.0.0-next.49 - -### Patch Changes - -- breaking: Don't pass arbitrary options to esbuild ([#4639](https://github.com/sveltejs/kit/pull/4639)) - -## 1.0.0-next.48 - -### Patch Changes - -- Expose App interfaces ([#5386](https://github.com/sveltejs/kit/pull/5386)) - -## 1.0.0-next.47 - -### Patch Changes - -- chore: upgrade TypeScript to 4.7.4 ([#5414](https://github.com/sveltejs/kit/pull/5414)) - -## 1.0.0-next.46 - -### Patch Changes - -- Generate sourcemaps for server-side functions when bundling with esbuild ([#5258](https://github.com/sveltejs/kit/pull/5258)) - -## 1.0.0-next.45 - -### Patch Changes - -- Simplify example wrangler.toml, and fix outdated README ([#5187](https://github.com/sveltejs/kit/pull/5187)) - -## 1.0.0-next.44 - -### Patch Changes - -- Update dependencies ([#5121](https://github.com/sveltejs/kit/pull/5121)) - -## 1.0.0-next.43 - -### Patch Changes - -- Update adapter entrypoint typings to be NodeNext/ESNext-compatible ([#5111](https://github.com/sveltejs/kit/pull/5111)) - -## 1.0.0-next.42 - -### Patch Changes - -- only serve `_app/immutable` with immutable cache header, not `_app/version.json` ([#5051](https://github.com/sveltejs/kit/pull/5051)) - -## 1.0.0-next.41 - -### Patch Changes - -- Add types to pkg.exports ([#5045](https://github.com/sveltejs/kit/pull/5045)) - -## 1.0.0-next.40 - -### Patch Changes - -- breaking: support Wrangler 2, drop Wrangler 1 ([#4887](https://github.com/sveltejs/kit/pull/4887)) - -## 1.0.0-next.39 - -### Patch Changes - -- breaking: Remove try-catch around server.respond ([#4738](https://github.com/sveltejs/kit/pull/4738)) - -## 1.0.0-next.38 - -### Patch Changes - -- - Fix an issue related to prerendered pages incorrectly resolving in @sveltejs/adapter-cloudflare-workers ([#4626](https://github.com/sveltejs/kit/pull/4626)) - -## 1.0.0-next.37 - -### Patch Changes - -- Breaking: refactor implementation from "Service Worker" pattern to "Module Worker" used in adapter-cloudflare ([#4276](https://github.com/sveltejs/kit/pull/4276)) - - #### add the following to your wrangler.toml - - ```toml - [build.upload] - format = "modules" - main = "./worker.mjs" - ``` - -## 1.0.0-next.36 - -### Patch Changes - -- Provide getClientAddress function ([#4289](https://github.com/sveltejs/kit/pull/4289)) - -## 1.0.0-next.35 - -### Patch Changes - -- breaking: replace builder.prerender() with builder.writePrerendered() and builder.prerendered ([#4192](https://github.com/sveltejs/kit/pull/4192)) ([#4229](https://github.com/sveltejs/kit/pull/4229)) - -## 1.0.0-next.34 - -### Patch Changes - -- breaking: rename `app.render` to `server.respond` ([#4034](https://github.com/sveltejs/kit/pull/4034)) - -## 1.0.0-next.33 - -### Patch Changes - -- revert change to Cloudflare ES target version ([#3847](https://github.com/sveltejs/kit/pull/3847)) - -## 1.0.0-next.32 - -### Patch Changes - -- Fix Cloudflare adapter targets ([#3827](https://github.com/sveltejs/kit/pull/3827)) - -## 1.0.0-next.31 - -### Patch Changes - -- update to Vite 2.8 and esbuild 0.14 ([#3791](https://github.com/sveltejs/kit/pull/3791)) - -## 1.0.0-next.30 - -### Patch Changes - -- Breaking: change app.render signature to (request: Request) => Promise<Response> ([#3384](https://github.com/sveltejs/kit/pull/3384)) - -## 1.0.0-next.29 - -### Patch Changes - -- Add immutable cache headers to generated assets ([#3222](https://github.com/sveltejs/kit/pull/3222)) - -## 1.0.0-next.28 - -### Patch Changes - -- use path/posix to resolve relative paths for esmodules ([#3212](https://github.com/sveltejs/kit/pull/3212)) - -## 1.0.0-next.27 - -### Patch Changes - -- Overhaul adapter API ([#2931](https://github.com/sveltejs/kit/pull/2931)) -- Remove esbuild options ([#2931](https://github.com/sveltejs/kit/pull/2931)) -- Update adapters to provide app.render with a url ([#3133](https://github.com/sveltejs/kit/pull/3133)) - -## 1.0.0-next.26 - -### Patch Changes - -- update to esbuild 0.13.15 and other dependency updates ([#2957](https://github.com/sveltejs/kit/pull/2957)) - -## 1.0.0-next.25 - -### Patch Changes - -- chore: upgrade `@cloudflare/kv-asset-handler` ([#2650](https://github.com/sveltejs/kit/pull/2650)) - -## 1.0.0-next.24 - -### Patch Changes - -- update dependencies ([#2574](https://github.com/sveltejs/kit/pull/2574)) - -## 1.0.0-next.23 - -### Patch Changes - -- update to vite 2.6.0 and esbuild 0.13 ([#2522](https://github.com/sveltejs/kit/pull/2522)) - -## 1.0.0-next.22 - -### Patch Changes - -- chore: add links to repository and homepage to package.json ([#2425](https://github.com/sveltejs/kit/pull/2425)) - -## 1.0.0-next.21 - -### Patch Changes - -- chore: export package.json from adapters ([#2351](https://github.com/sveltejs/kit/pull/2351)) - -## 1.0.0-next.20 - -### Patch Changes - -- Support assigning multiple values to a header ([#2313](https://github.com/sveltejs/kit/pull/2313)) - -## 1.0.0-next.19 - -### Patch Changes - -- Ensure the raw body is an Uint8Array before passing it to request handlers ([#2215](https://github.com/sveltejs/kit/pull/2215)) - -## 1.0.0-next.18 - -### Patch Changes - -- d81de603: revert adapters automatically updating .gitignore ([#1924](https://github.com/sveltejs/kit/pull/1924)) - -## 1.0.0-next.17 - -### Patch Changes - -- e9f78999: fix: include esbuild config in adapter type definition ([#1954](https://github.com/sveltejs/kit/pull/1954)) - -## 1.0.0-next.16 - -### Patch Changes - -- e6995797: feat(adapters): expose esbuild configuration ([#1914](https://github.com/sveltejs/kit/pull/1914)) - -## 1.0.0-next.15 - -### Patch Changes - -- 4720b67: Default body parsing to binary ([#1890](https://github.com/sveltejs/kit/pull/1890)) - -## 1.0.0-next.14 - -### Patch Changes - -- 7faf52f: Update and consolidate checks for binary body types ([#1687](https://github.com/sveltejs/kit/pull/1687)) - -## 1.0.0-next.13 - -### Patch Changes - -- 9f0c54a: Externalize app initialization to adapters ([#1804](https://github.com/sveltejs/kit/pull/1804)) - -## 1.0.0-next.12 - -### Patch Changes - -- c51ab7d: Upgrade esbuild to ^0.12.5 ([#1627](https://github.com/sveltejs/kit/pull/1627)) - -## 1.0.0-next.11 - -### Patch Changes - -- edc307d: Remove peerDependencies due to pnpm bug ([#1621](https://github.com/sveltejs/kit/pull/1621)) -- 2636e68: Attempt to fix peerDependencies specification ([#1620](https://github.com/sveltejs/kit/pull/1620)) - -## 1.0.0-next.10 - -### Patch Changes - -- 028abd9: Pass validated svelte config to adapter adapt function ([#1559](https://github.com/sveltejs/kit/pull/1559)) -- Updated dependencies [6372690] -- Updated dependencies [c3d36a3] -- Updated dependencies [bf77940] -- Updated dependencies [2172469] -- Updated dependencies [028abd9] - - @sveltejs/kit@1.0.0-next.110 - -## 1.0.0-next.9 - -### Patch Changes - -- 71e293d: change toml parser to support dotted keys and other language features added after the TOML v0.4.0 spec ([#1509](https://github.com/sveltejs/kit/pull/1509)) -- dca4946: Make kit a peerDependency of the adapters ([#1505](https://github.com/sveltejs/kit/pull/1505)) -- Updated dependencies [261ee1c] -- Updated dependencies [ec156c6] -- Updated dependencies [586785d] - - @sveltejs/kit@1.0.0-next.109 - -## 1.0.0-next.8 - -### Patch Changes - -- dad93fc: Fix workspace dependencies ([#1434](https://github.com/sveltejs/kit/pull/1434)) - -## 1.0.0-next.7 - -### Patch Changes - -- 11e7840: Ensure rawBody is a string or Uint8Array ([#1382](https://github.com/sveltejs/kit/pull/1382)) - -## 0.0.2-next.6 - -### Patch Changes - -- c6fde99: Convert to ESM ([#1323](https://github.com/sveltejs/kit/pull/1323)) - -## 0.0.2-next.5 - -### Patch Changes - -- 9e67505: Add es2020 target to esbuild function to solve Unexpected character '#' error ([#1287](https://github.com/sveltejs/kit/pull/1287)) - -## 0.0.2-next.4 - -### Patch Changes - -- 2e72a94: Add type declarations ([#1230](https://github.com/sveltejs/kit/pull/1230)) - -## 0.0.2-next.3 - -### Patch Changes - -- b372d61: Generate required package.json ([#1116](https://github.com/sveltejs/kit/pull/1116)) - -## 0.0.2-next.2 - -### Patch Changes - -- 1237eb3: Pass rawBody to SvelteKit, bundle worker with esbuild ([#1109](https://github.com/sveltejs/kit/pull/1109)) - -## 0.0.2-next.1 - -### Patch Changes - -- 4325b39: Aligns request/response API of cloudflare-workers adapter with others ([#946](https://github.com/sveltejs/kit/pull/946)) - -## 0.0.2-next.0 - -### Patch Changes - -- e890031: Fix dev/prod deps (oops) ([#749](https://github.com/sveltejs/kit/pull/749)) diff --git a/packages/adapter-cloudflare-workers/README.md b/packages/adapter-cloudflare-workers/README.md deleted file mode 100644 index ab34b9418023..000000000000 --- a/packages/adapter-cloudflare-workers/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# adapter-cloudflare-workers - -SvelteKit adapter that creates a Cloudflare Workers site using a function for dynamic server rendering. - -**Requires [Wrangler v2](https://developers.cloudflare.com/workers/wrangler/get-started/).** Wrangler v1 is no longer supported. - -## Docs - -[Docs](https://kit.svelte.dev/docs/adapter-cloudflare-workers) - -## Changelog - -[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/master/packages/adapter-cloudflare-workers/CHANGELOG.md). diff --git a/packages/adapter-cloudflare-workers/ambient.d.ts b/packages/adapter-cloudflare-workers/ambient.d.ts deleted file mode 100644 index 5978f0dd3850..000000000000 --- a/packages/adapter-cloudflare-workers/ambient.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { CacheStorage } from '@cloudflare/workers-types'; - -declare global { - namespace App { - export interface Platform { - context: { - waitUntil(promise: Promise<any>): void; - }; - caches: CacheStorage; - } - } -} diff --git a/packages/adapter-cloudflare-workers/files/_package.json b/packages/adapter-cloudflare-workers/files/_package.json deleted file mode 100644 index bc4c8d4aabac..000000000000 --- a/packages/adapter-cloudflare-workers/files/_package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "private": true, - "version": "0.0.1", - "description": "Worker site generated by SvelteKit", - "main": "index.js", - "dependencies": { - "@cloudflare/kv-asset-handler": "~0.1.3" - } -} diff --git a/packages/adapter-cloudflare-workers/files/entry.js b/packages/adapter-cloudflare-workers/files/entry.js deleted file mode 100644 index 0969ba1bbf07..000000000000 --- a/packages/adapter-cloudflare-workers/files/entry.js +++ /dev/null @@ -1,110 +0,0 @@ -import { Server } from 'SERVER'; -import { manifest, prerendered } from 'MANIFEST'; -import { getAssetFromKV, mapRequestToAsset } from '@cloudflare/kv-asset-handler'; -import static_asset_manifest_json from '__STATIC_CONTENT_MANIFEST'; -const static_asset_manifest = JSON.parse(static_asset_manifest_json); - -const server = new Server(manifest); - -const app_path = `/${manifest.appPath}/`; - -export default { - /** - * @param {Request} req - * @param {any} env - * @param {any} context - */ - async fetch(req, env, context) { - await server.init({ env }); - - const url = new URL(req.url); - - // static assets - if (url.pathname.startsWith(app_path)) { - /** @type {Response} */ - const res = await get_asset_from_kv(req, env, context); - if (is_error(res.status)) return res; - - const cache_control = url.pathname.startsWith(app_path + 'immutable/') - ? 'public, immutable, max-age=31536000' - : 'no-cache'; - - return new Response(res.body, { - headers: { - // include original headers, minus cache-control which - // is overridden, and etag which is no longer useful - 'cache-control': cache_control, - 'content-type': res.headers.get('content-type'), - 'x-robots-tag': 'noindex' - } - }); - } - - // prerendered pages and index.html files - const pathname = url.pathname.replace(/\/$/, ''); - let file = pathname.substring(1); - - try { - file = decodeURIComponent(file); - } catch (err) { - // ignore - } - - if ( - manifest.assets.has(file) || - manifest.assets.has(file + '/index.html') || - prerendered.has(pathname || '/') - ) { - return get_asset_from_kv(req, env, context, (request, options) => { - if (prerendered.has(pathname || '/')) { - url.pathname = '/' + prerendered.get(pathname || '/').file; - return new Request(url.toString(), request); - } - - return mapRequestToAsset(request, options); - }); - } - - // dynamically-generated pages - return await server.respond(req, { - platform: { - env, - context, - // @ts-expect-error lib.dom is interfering with workers-types - caches - }, - getClientAddress() { - return req.headers.get('cf-connecting-ip'); - } - }); - } -}; - -/** - * @param {Request} req - * @param {any} env - * @param {any} context - */ -async function get_asset_from_kv(req, env, context, map = mapRequestToAsset) { - return await getAssetFromKV( - { - request: req, - waitUntil(promise) { - return context.waitUntil(promise); - } - }, - { - ASSET_NAMESPACE: env.__STATIC_CONTENT, - ASSET_MANIFEST: static_asset_manifest, - mapRequestToAsset: map - } - ); -} - -/** - * @param {number} status - * @returns {boolean} - */ -function is_error(status) { - return status > 399; -} diff --git a/packages/adapter-cloudflare-workers/index.d.ts b/packages/adapter-cloudflare-workers/index.d.ts deleted file mode 100644 index 8b90611b73c3..000000000000 --- a/packages/adapter-cloudflare-workers/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Adapter } from '@sveltejs/kit'; -import './ambient.js'; - -export default function plugin(options: { config?: string }): Adapter; diff --git a/packages/adapter-cloudflare-workers/index.js b/packages/adapter-cloudflare-workers/index.js deleted file mode 100644 index 6ab595989024..000000000000 --- a/packages/adapter-cloudflare-workers/index.js +++ /dev/null @@ -1,137 +0,0 @@ -import { existsSync, readFileSync, writeFileSync } from 'node:fs'; -import { posix, dirname } from 'node:path'; -import { execSync } from 'node:child_process'; -import esbuild from 'esbuild'; -import toml from '@iarna/toml'; -import { fileURLToPath } from 'node:url'; - -/** - * @typedef {{ - * main: string; - * site: { - * bucket: string; - * } - * }} WranglerConfig - */ - -/** @type {import('.').default} */ -export default function ({ config = 'wrangler.toml' } = {}) { - return { - name: '@sveltejs/adapter-cloudflare-workers', - - async adapt(builder) { - const { main, site } = validate_config(builder, config); - - const files = fileURLToPath(new URL('./files', import.meta.url).href); - const tmp = builder.getBuildDirectory('cloudflare-workers-tmp'); - - builder.rimraf(site.bucket); - builder.rimraf(dirname(main)); - - builder.log.info('Installing worker dependencies...'); - builder.copy(`${files}/_package.json`, `${tmp}/package.json`); - - // TODO would be cool if we could make this step unnecessary somehow - const stdout = execSync('npm install', { cwd: tmp }); - builder.log.info(stdout.toString()); - - builder.log.minor('Generating worker...'); - const relativePath = posix.relative(tmp, builder.getServerDirectory()); - - builder.copy(`${files}/entry.js`, `${tmp}/entry.js`, { - replace: { - SERVER: `${relativePath}/index.js`, - MANIFEST: './manifest.js' - } - }); - - writeFileSync( - `${tmp}/manifest.js`, - `export const manifest = ${builder.generateManifest({ - relativePath - })};\n\nexport const prerendered = new Map(${JSON.stringify( - Array.from(builder.prerendered.pages.entries()) - )});\n` - ); - - await esbuild.build({ - platform: 'browser', - conditions: ['worker', 'browser'], - sourcemap: 'linked', - target: 'es2022', - entryPoints: [`${tmp}/entry.js`], - outfile: main, - bundle: true, - external: ['__STATIC_CONTENT_MANIFEST', 'cloudflare:*'], - format: 'esm', - loader: { - '.wasm': 'copy' - } - }); - - builder.log.minor('Copying assets...'); - const bucket_dir = `${site.bucket}${builder.config.kit.paths.base}`; - builder.writeClient(bucket_dir); - builder.writePrerendered(bucket_dir); - } - }; -} - -/** - * @param {import('@sveltejs/kit').Builder} builder - * @param {string} config_file - * @returns {WranglerConfig} - */ -function validate_config(builder, config_file) { - if (existsSync(config_file)) { - /** @type {WranglerConfig} */ - let wrangler_config; - - try { - wrangler_config = /** @type {WranglerConfig} */ ( - toml.parse(readFileSync(config_file, 'utf-8')) - ); - } catch (err) { - err.message = `Error parsing ${config_file}: ${err.message}`; - throw err; - } - - if (!wrangler_config.site?.bucket) { - throw new Error( - `You must specify site.bucket in ${config_file}. Consult https://developers.cloudflare.com/workers/platform/sites/configuration` - ); - } - - if (!wrangler_config.main) { - throw new Error( - `You must specify main option in ${config_file}. Consult https://github.com/sveltejs/kit/tree/master/packages/adapter-cloudflare-workers` - ); - } - - return wrangler_config; - } - - builder.log.error( - 'Consult https://developers.cloudflare.com/workers/platform/sites/configuration on how to setup your site' - ); - - builder.log( - ` - Sample wrangler.toml: - - name = "<your-site-name>" - account_id = "<your-account-id>" - - main = "./.cloudflare/worker.js" - site.bucket = "./.cloudflare/public" - - build.command = "npm run build" - - compatibility_date = "2021-11-12" - workers_dev = true` - .replace(/^\t+/gm, '') - .trim() - ); - - throw new Error(`Missing a ${config_file} file`); -} diff --git a/packages/adapter-cloudflare-workers/package.json b/packages/adapter-cloudflare-workers/package.json deleted file mode 100644 index 2af2481474b2..000000000000 --- a/packages/adapter-cloudflare-workers/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "@sveltejs/adapter-cloudflare-workers", - "version": "1.1.4", - "description": "SvelteKit adapter that creates a Cloudflare Workers site using a function for dynamic server rendering", - "repository": { - "type": "git", - "url": "https://github.com/sveltejs/kit", - "directory": "packages/adapter-cloudflare-workers" - }, - "license": "MIT", - "homepage": "https://kit.svelte.dev", - "type": "module", - "exports": { - ".": { - "types": "./index.d.ts", - "import": "./index.js" - }, - "./package.json": "./package.json" - }, - "types": "index.d.ts", - "files": [ - "ambient.d.ts", - "files", - "index.js", - "index.d.ts" - ], - "scripts": { - "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore", - "format": "pnpm lint --write", - "check": "tsc" - }, - "dependencies": { - "@cloudflare/workers-types": "^4.20230404.0", - "@iarna/toml": "^2.2.5", - "esbuild": "^0.18.11" - }, - "devDependencies": { - "@cloudflare/kv-asset-handler": "^0.3.0", - "@types/node": "^16.18.6", - "typescript": "^4.9.4" - }, - "peerDependencies": { - "@sveltejs/kit": "^1.0.0" - } -} diff --git a/packages/adapter-cloudflare-workers/placeholders.d.ts b/packages/adapter-cloudflare-workers/placeholders.d.ts deleted file mode 100644 index 78ceb0e62887..000000000000 --- a/packages/adapter-cloudflare-workers/placeholders.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -declare module 'SERVER' { - export { Server } from '@sveltejs/kit'; -} - -declare module 'MANIFEST' { - import { SSRManifest } from '@sveltejs/kit'; - - export const manifest: SSRManifest; - export const prerendered: Map<string, { file: string }>; -} - -declare module '__STATIC_CONTENT_MANIFEST' { - const json: string; - export default json; -} diff --git a/packages/adapter-cloudflare-workers/tsconfig.json b/packages/adapter-cloudflare-workers/tsconfig.json deleted file mode 100644 index f4c98fd3be96..000000000000 --- a/packages/adapter-cloudflare-workers/tsconfig.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "noEmit": true, - "noImplicitAny": true, - "module": "es2020", - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "baseUrl": ".", - "paths": { - "@sveltejs/kit": ["../kit/types/index"] - } - }, - "include": ["**/*.js", "placeholders.d.ts"] -} diff --git a/packages/adapter-cloudflare/CHANGELOG.md b/packages/adapter-cloudflare/CHANGELOG.md index 9802f2dc9f5f..492f5c883497 100644 --- a/packages/adapter-cloudflare/CHANGELOG.md +++ b/packages/adapter-cloudflare/CHANGELOG.md @@ -1,5 +1,342 @@ # @sveltejs/adapter-cloudflare +## 7.0.4 +### Patch Changes + + +- fix: address build failure when using `paths.base` (#13769) ([#13846](https://github.com/sveltejs/kit/pull/13846)) + +- Updated dependencies [[`6a6538c4bd937667a56ef5f6673cdef3f2ea7a77`](https://github.com/sveltejs/kit/commit/6a6538c4bd937667a56ef5f6673cdef3f2ea7a77), [`6261a877ae97ff85d07277c51391d925ed1bd096`](https://github.com/sveltejs/kit/commit/6261a877ae97ff85d07277c51391d925ed1bd096), [`e7b57e74bdea976ae070562bda76d4bb78cdb6da`](https://github.com/sveltejs/kit/commit/e7b57e74bdea976ae070562bda76d4bb78cdb6da), [`408e1f5c2ae593b460861098e8e01f945af395ab`](https://github.com/sveltejs/kit/commit/408e1f5c2ae593b460861098e8e01f945af395ab), [`c6cd8c3a5ed96d423a65af5cb5468e3e963cfb54`](https://github.com/sveltejs/kit/commit/c6cd8c3a5ed96d423a65af5cb5468e3e963cfb54), [`1a406752aafc2b80d9ccb49f15ebc10301c84480`](https://github.com/sveltejs/kit/commit/1a406752aafc2b80d9ccb49f15ebc10301c84480), [`6c442395a8e6656ff49ecd4041d8e12ed65e80dd`](https://github.com/sveltejs/kit/commit/6c442395a8e6656ff49ecd4041d8e12ed65e80dd)]: + - @sveltejs/kit@2.21.3 + +## 7.0.3 +### Patch Changes + + +- chore(deps): upgrade @cloudflare/workers-types to 4.20250507.0 ([#13773](https://github.com/sveltejs/kit/pull/13773)) + +## 7.0.2 +### Patch Changes + + +- chore(deps): upgrade @cloudflare/workers-types to 4.20250415.0 ([#13716](https://github.com/sveltejs/kit/pull/13716)) + +- Updated dependencies [[`c51fb554416e0c4a21655c1d79e834f69743d1d5`](https://github.com/sveltejs/kit/commit/c51fb554416e0c4a21655c1d79e834f69743d1d5)]: + - @sveltejs/kit@2.20.8 + +## 7.0.1 +### Patch Changes + + +- fix: correctly write the worker to the `pages_build_output_dir` path if set in the Wrangler configuration path ([#13671](https://github.com/sveltejs/kit/pull/13671)) + + +- fix: correctly resolve paths provided by the Wrangler config on Windows ([#13671](https://github.com/sveltejs/kit/pull/13671)) + +- Updated dependencies [[`7fd7bcb7142e7d0d2dd64174fa1a94d56a45d643`](https://github.com/sveltejs/kit/commit/7fd7bcb7142e7d0d2dd64174fa1a94d56a45d643)]: + - @sveltejs/kit@2.20.4 + +## 7.0.0 +### Major Changes + + +- feat: support specifically building for Cloudflare Workers Static Assets ([#13634](https://github.com/sveltejs/kit/pull/13634)) + + +### Patch Changes + + +- chore: remove `esbuild` as dependency ([#13633](https://github.com/sveltejs/kit/pull/13633)) + +- Updated dependencies [[`370e9f95c1d6efd5393f73d2dbef68143b27f681`](https://github.com/sveltejs/kit/commit/370e9f95c1d6efd5393f73d2dbef68143b27f681)]: + - @sveltejs/kit@2.20.3 + +## 6.0.1 +### Patch Changes + + +- fix: revert writing server files to the cloudflare build directory ([#13622](https://github.com/sveltejs/kit/pull/13622)) + +## 6.0.0 +### Major Changes + + +- fix: copy the `_headers` and `_redirects` files from the project root instead of the `/static` directory ([#13227](https://github.com/sveltejs/kit/pull/13227)) + + +### Patch Changes + + +- fix: write server files to the cloudflare build directory ([#13610](https://github.com/sveltejs/kit/pull/13610)) + +## 5.1.0 +### Minor Changes + + +- feat: support wrangler 4 ([#13580](https://github.com/sveltejs/kit/pull/13580)) + + +### Patch Changes + +- Updated dependencies [[`001bc04dece9b0983efc2187225772c19d135345`](https://github.com/sveltejs/kit/commit/001bc04dece9b0983efc2187225772c19d135345)]: + - @sveltejs/kit@2.19.2 + +## 5.0.3 +### Patch Changes + + +- fix: exclude the dynamic route `/_app/env.js` from the adapter config `routes.exclude` special value `<build>` ([#13411](https://github.com/sveltejs/kit/pull/13411)) + +- Updated dependencies [[`9612a60a0277aef0ab4723a0e7ed8dd03a7ffb95`](https://github.com/sveltejs/kit/commit/9612a60a0277aef0ab4723a0e7ed8dd03a7ffb95), [`3d88ae33fc14b08a1d48c2cb7315739c8cfcd9fd`](https://github.com/sveltejs/kit/commit/3d88ae33fc14b08a1d48c2cb7315739c8cfcd9fd)]: + - @sveltejs/kit@2.17.2 + +## 5.0.2 +### Patch Changes + + +- fix: prevent Vitest from hanging, which was not fully addressed in [#12830](https://github.com/sveltejs/kit/pull/12830) ([#13373](https://github.com/sveltejs/kit/pull/13373)) + +- Updated dependencies [[`09296d0f19c8d1ff57d699e637bd1beabb69d438`](https://github.com/sveltejs/kit/commit/09296d0f19c8d1ff57d699e637bd1beabb69d438), [`d62ed39a431f0db3db4dd90bf6b17ed2a2a2de79`](https://github.com/sveltejs/kit/commit/d62ed39a431f0db3db4dd90bf6b17ed2a2a2de79), [`f30352f874790b9de0bd0eba985a21aef23e158e`](https://github.com/sveltejs/kit/commit/f30352f874790b9de0bd0eba985a21aef23e158e), [`180fa3467e195065c0a25206c6328a908e6952d7`](https://github.com/sveltejs/kit/commit/180fa3467e195065c0a25206c6328a908e6952d7), [`5906e9708965b848b468d0014999c36272dc8d50`](https://github.com/sveltejs/kit/commit/5906e9708965b848b468d0014999c36272dc8d50), [`d62ed39a431f0db3db4dd90bf6b17ed2a2a2de79`](https://github.com/sveltejs/kit/commit/d62ed39a431f0db3db4dd90bf6b17ed2a2a2de79)]: + - @sveltejs/kit@2.17.0 + +## 5.0.1 +### Patch Changes + + +- fix: prevent vitest from hanging ([#12830](https://github.com/sveltejs/kit/pull/12830)) + +- Updated dependencies [[`1bedcc1cfc1f2d85946c1423f60faa8a2a56148b`](https://github.com/sveltejs/kit/commit/1bedcc1cfc1f2d85946c1423f60faa8a2a56148b), [`e201fa9380a00e072a80a2dcab56de3d77e5b67c`](https://github.com/sveltejs/kit/commit/e201fa9380a00e072a80a2dcab56de3d77e5b67c), [`f3f08582d41b08c3fd1daf742e5703d9cdca7823`](https://github.com/sveltejs/kit/commit/f3f08582d41b08c3fd1daf742e5703d9cdca7823), [`d4bcfccb4503b12fe76140dbb6cfddc81f9419fc`](https://github.com/sveltejs/kit/commit/d4bcfccb4503b12fe76140dbb6cfddc81f9419fc), [`d09bc033123903f359c1ad6fd3a6d8d7fc19298a`](https://github.com/sveltejs/kit/commit/d09bc033123903f359c1ad6fd3a6d8d7fc19298a)]: + - @sveltejs/kit@2.15.3 + +## 5.0.0 +### Major Changes + + +- feat: remove esbuild step ([#13132](https://github.com/sveltejs/kit/pull/13132)) + + +### Patch Changes + +- Updated dependencies [[`12ce7eb19fb57907e3db29ef981a8c7a0afc4b6f`](https://github.com/sveltejs/kit/commit/12ce7eb19fb57907e3db29ef981a8c7a0afc4b6f), [`528af75f846f971ef64e4d109ac5e22fca046b90`](https://github.com/sveltejs/kit/commit/528af75f846f971ef64e4d109ac5e22fca046b90)]: + - @sveltejs/kit@2.15.1 + +## 4.9.0 +### Minor Changes + + +- feat: generate `.assetsignore` file for use with Cloudflare Workers Static Assets ([#13109](https://github.com/sveltejs/kit/pull/13109)) + + +### Patch Changes + +- Updated dependencies [[`20f2720aa3455f38fa2630a33d52f7532da27fce`](https://github.com/sveltejs/kit/commit/20f2720aa3455f38fa2630a33d52f7532da27fce)]: + - @sveltejs/kit@2.13.0 + +## 4.8.0 +### Minor Changes + + +- chore: upgrade esbuild to 0.24.0 ([#12270](https://github.com/sveltejs/kit/pull/12270)) + + +### Patch Changes + +- Updated dependencies [[`d030f4bb285e70844d09b3f0c87809bae43014b8`](https://github.com/sveltejs/kit/commit/d030f4bb285e70844d09b3f0c87809bae43014b8), [`67dd214863cbc5852eb0e8512efbb7bad5358e8a`](https://github.com/sveltejs/kit/commit/67dd214863cbc5852eb0e8512efbb7bad5358e8a)]: + - @sveltejs/kit@2.9.0 + +## 4.7.4 +### Patch Changes + + +- docs: update URLs for new svelte.dev site ([#12857](https://github.com/sveltejs/kit/pull/12857)) + +- Updated dependencies [[`dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46`](https://github.com/sveltejs/kit/commit/dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46), [`4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d`](https://github.com/sveltejs/kit/commit/4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d), [`3a9b78f04786898ca93f6d4b75ab18d26bc45192`](https://github.com/sveltejs/kit/commit/3a9b78f04786898ca93f6d4b75ab18d26bc45192), [`723eb8b31e6a22c82f730c30e485386c8676b746`](https://github.com/sveltejs/kit/commit/723eb8b31e6a22c82f730c30e485386c8676b746), [`8ec471c875345b751344e67580ff1b772ef2735b`](https://github.com/sveltejs/kit/commit/8ec471c875345b751344e67580ff1b772ef2735b)]: + - @sveltejs/kit@2.7.3 + +## 4.7.3 +### Patch Changes + + +- fix: correctly handle relative paths when fetching assets on the server ([#12113](https://github.com/sveltejs/kit/pull/12113)) + +- Updated dependencies [[`df48fc6ede3859beabaae9fd7c6f722215bb8a42`](https://github.com/sveltejs/kit/commit/df48fc6ede3859beabaae9fd7c6f722215bb8a42), [`5780deba8e3ebd0e2b0abea029068ad0c6daf6ad`](https://github.com/sveltejs/kit/commit/5780deba8e3ebd0e2b0abea029068ad0c6daf6ad), [`6f9aefdb8699fc126d76a88471602cb9a80822eb`](https://github.com/sveltejs/kit/commit/6f9aefdb8699fc126d76a88471602cb9a80822eb), [`8aa95b4b3431e79f62f580abdcdcb157b4de86cd`](https://github.com/sveltejs/kit/commit/8aa95b4b3431e79f62f580abdcdcb157b4de86cd)]: + - @sveltejs/kit@2.7.0 + +## 4.7.2 +### Patch Changes + + +- chore: configure provenance in a simpler manner ([#12570](https://github.com/sveltejs/kit/pull/12570)) + +- Updated dependencies [[`087a43d391fc38b8c008fb39a804dc6988974101`](https://github.com/sveltejs/kit/commit/087a43d391fc38b8c008fb39a804dc6988974101)]: + - @sveltejs/kit@2.5.22 + +## 4.7.1 +### Patch Changes + + +- chore: package provenance ([#12567](https://github.com/sveltejs/kit/pull/12567)) + +- Updated dependencies [[`4930a8443caa53bcecee7b690cd28e429b1c8a20`](https://github.com/sveltejs/kit/commit/4930a8443caa53bcecee7b690cd28e429b1c8a20)]: + - @sveltejs/kit@2.5.21 + +## 4.7.0 +### Minor Changes + + +- feat: generate static `_redirects` for Cloudflare Pages ([#12199](https://github.com/sveltejs/kit/pull/12199)) + + +### Patch Changes + + +- fix: correctly return static assets if base path is set ([#12075](https://github.com/sveltejs/kit/pull/12075)) + +## 4.6.1 +### Patch Changes + + +- fix: copy `.eot`, `.otf`, `.ttf`, `.woff`, and `woff2` font files when bundling ([#12439](https://github.com/sveltejs/kit/pull/12439)) + +## 4.6.0 +### Minor Changes + + +- chore(deps): upgrade to esbuild 0.21 ([#12415](https://github.com/sveltejs/kit/pull/12415)) + + +### Patch Changes + +- Updated dependencies [[`84298477a014ec471839adf7a4448d91bc7949e4`](https://github.com/sveltejs/kit/commit/84298477a014ec471839adf7a4448d91bc7949e4), [`5645614f497931f587b7cb8b3c885fce892a6a72`](https://github.com/sveltejs/kit/commit/5645614f497931f587b7cb8b3c885fce892a6a72), [`84298477a014ec471839adf7a4448d91bc7949e4`](https://github.com/sveltejs/kit/commit/84298477a014ec471839adf7a4448d91bc7949e4)]: + - @sveltejs/kit@2.5.18 + +## 4.5.0 + +### Minor Changes + +- feat: validate that no `_routes.json` is present to avoid overwriting it ([#12360](https://github.com/sveltejs/kit/pull/12360)) + +### Patch Changes + +- Updated dependencies [[`121836fcbf6c615fd18c79a12203613ddbe49acf`](https://github.com/sveltejs/kit/commit/121836fcbf6c615fd18c79a12203613ddbe49acf)]: + - @sveltejs/kit@2.5.17 + +## 4.4.1 + +### Patch Changes + +- chore: add keywords for discovery in npm search ([#12330](https://github.com/sveltejs/kit/pull/12330)) + +- Updated dependencies [[`25acb1d9fce998dccd8050b93cf4142c2b082611`](https://github.com/sveltejs/kit/commit/25acb1d9fce998dccd8050b93cf4142c2b082611), [`642c4a4aff4351b786fe6274aa2f0bf7d905faf9`](https://github.com/sveltejs/kit/commit/642c4a4aff4351b786fe6274aa2f0bf7d905faf9), [`0a0e9aa897123ebec50af08e9385b2ca4fc5bb28`](https://github.com/sveltejs/kit/commit/0a0e9aa897123ebec50af08e9385b2ca4fc5bb28)]: + - @sveltejs/kit@2.5.11 + +## 4.4.0 + +### Minor Changes + +- chore(deps): upgrade esbuild ([#12118](https://github.com/sveltejs/kit/pull/12118)) + +### Patch Changes + +- Updated dependencies [[`bbab296f6fcc05af6b999182798bcdedabbaa4c9`](https://github.com/sveltejs/kit/commit/bbab296f6fcc05af6b999182798bcdedabbaa4c9)]: + - @sveltejs/kit@2.5.6 + +## 4.3.0 + +### Minor Changes + +- feat: support platform emulation configuration via the `platformProxy` adapter option ([#12011](https://github.com/sveltejs/kit/pull/12011)) + +## 4.2.1 + +### Patch Changes + +- fix: add `workerd` to esbuild conditions ([#12069](https://github.com/sveltejs/kit/pull/12069)) + +## 4.2.0 + +### Minor Changes + +- feat: emulate Cloudflare Workers bindings and incoming request properties in `event.platform` for `dev` and `preview` ([#11974](https://github.com/sveltejs/kit/pull/11974)) + +### Patch Changes + +- Updated dependencies [[`4562275ed42964148df03c79434172024897c08c`](https://github.com/sveltejs/kit/commit/4562275ed42964148df03c79434172024897c08c)]: + - @sveltejs/kit@2.5.4 + +## 4.1.0 + +### Minor Changes + +- feat: more helpful errors when using incompatible Node modules ([#11673](https://github.com/sveltejs/kit/pull/11673)) + +- feat: support compatible node modules without prefixes ([#11672](https://github.com/sveltejs/kit/pull/11672)) + +- feat: Add Node.js compatibility ([#10544](https://github.com/sveltejs/kit/pull/10544)) + +### Patch Changes + +- Updated dependencies [[`288f731c8a5b20cadb9e219f9583f3f16bf8c7b8`](https://github.com/sveltejs/kit/commit/288f731c8a5b20cadb9e219f9583f3f16bf8c7b8)]: + - @sveltejs/kit@2.4.0 + +## 4.0.2 + +### Patch Changes + +- chore(deps): update dependency worktop to v0.8.0-next.18 ([#11618](https://github.com/sveltejs/kit/pull/11618)) + +## 4.0.1 + +### Patch Changes + +- chore: upgrade esbuild to 0.19.11 ([#11632](https://github.com/sveltejs/kit/pull/11632)) + +## 4.0.0 + +### Major Changes + +- breaking: generate plaintext 404.html instead of SPA-style fallback page ([#11596](https://github.com/sveltejs/kit/pull/11596)) + +### Patch Changes + +- Updated dependencies [[`2137717ea8592c310ada93490feabbd9eea125ea`](https://github.com/sveltejs/kit/commit/2137717ea8592c310ada93490feabbd9eea125ea)]: + - @sveltejs/kit@2.3.3 + +## 3.0.2 + +### Patch Changes + +- fix: serve static files in `_app` from function, if not already handled ([#11593](https://github.com/sveltejs/kit/pull/11593)) + +- Updated dependencies [[`553e14c8320ad9c6ebb3c554c35f1482755c9555`](https://github.com/sveltejs/kit/commit/553e14c8320ad9c6ebb3c554c35f1482755c9555), [`48576de0dc8b1fbbab7954113004540ea4e76935`](https://github.com/sveltejs/kit/commit/48576de0dc8b1fbbab7954113004540ea4e76935)]: + - @sveltejs/kit@2.3.2 + +## 3.0.1 + +### Patch Changes + +- chore: update primary branch from master to main ([`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d)) + +- Updated dependencies [[`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d), [`16961e8cd3fa6a7f382153b1ff056bc2aae9b31b`](https://github.com/sveltejs/kit/commit/16961e8cd3fa6a7f382153b1ff056bc2aae9b31b), [`197e01f95652f511160f38b37b9da73a124ecd48`](https://github.com/sveltejs/kit/commit/197e01f95652f511160f38b37b9da73a124ecd48), [`102e4a5ae5b29624302163faf5a20c94a64a5b2c`](https://github.com/sveltejs/kit/commit/102e4a5ae5b29624302163faf5a20c94a64a5b2c), [`f8e3d8b9728c9f1ab63389342c31d7246b6f9db6`](https://github.com/sveltejs/kit/commit/f8e3d8b9728c9f1ab63389342c31d7246b6f9db6)]: + - @sveltejs/kit@2.0.4 + +## 3.0.0 + +### Major Changes + +- breaking: require SvelteKit 2 ([#11316](https://github.com/sveltejs/kit/pull/11316)) + +- chore: upgrade esbuild ([#11122](https://github.com/sveltejs/kit/pull/11122)) + +## 2.3.4 + +### Patch Changes + +- fix: retain URL query string for trailing slash redirects to prerendered pages ([#11142](https://github.com/sveltejs/kit/pull/11142)) + +- Updated dependencies [[`a7f8bdcfa`](https://github.com/sveltejs/kit/commit/a7f8bdcfabce5cda85dd073a21d0afb6138a7a08), [`a4d91304e`](https://github.com/sveltejs/kit/commit/a4d91304eebc08bf2e748d83a46d3548a546e3ab)]: + - @sveltejs/kit@1.27.7 + ## 2.3.3 ### Patch Changes diff --git a/packages/adapter-cloudflare/README.md b/packages/adapter-cloudflare/README.md index 775351116cc0..fb8ce1266e61 100644 --- a/packages/adapter-cloudflare/README.md +++ b/packages/adapter-cloudflare/README.md @@ -1,11 +1,11 @@ # adapter-cloudflare -[Adapter](https://kit.svelte.dev/docs/building-your-app) for building SvelteKit applications on [Cloudflare Pages](https://developers.cloudflare.com/pages/) with [Workers integration](https://developers.cloudflare.com/pages/platform/functions). +[Adapter](https://svelte.dev/docs/kit/building-your-app) for building SvelteKit applications on [Cloudflare Workers](https://developers.cloudflare.com/workers/) with [static assets](https://developers.cloudflare.com/workers/static-assets/) or [Cloudflare Pages](https://developers.cloudflare.com/pages/) with [Workers integration](https://developers.cloudflare.com/pages/functions/). ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-cloudflare) +[Docs](https://svelte.dev/docs/kit/adapter-cloudflare) ## Changelog -[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/master/packages/adapter-cloudflare/CHANGELOG.md). +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-cloudflare/CHANGELOG.md). diff --git a/packages/adapter-cloudflare/ambient.d.ts b/packages/adapter-cloudflare/ambient.d.ts index 5b3c951b4139..d99dd15ab6cc 100644 --- a/packages/adapter-cloudflare/ambient.d.ts +++ b/packages/adapter-cloudflare/ambient.d.ts @@ -1,12 +1,17 @@ -import { Cache, CacheStorage, IncomingRequestCfProperties } from '@cloudflare/workers-types'; +import { + CacheStorage, + IncomingRequestCfProperties, + ExecutionContext +} from '@cloudflare/workers-types'; declare global { namespace App { export interface Platform { - context?: { - waitUntil(promise: Promise<any>): void; - }; - caches?: CacheStorage & { default: Cache }; + env: unknown; + ctx: ExecutionContext; + /** @deprecated Use `ctx` instead */ + context: ExecutionContext; + caches: CacheStorage; cf?: IncomingRequestCfProperties; } } diff --git a/packages/adapter-cloudflare/index.d.ts b/packages/adapter-cloudflare/index.d.ts index e6fb925ff102..0c02fb786cee 100644 --- a/packages/adapter-cloudflare/index.d.ts +++ b/packages/adapter-cloudflare/index.d.ts @@ -1,12 +1,41 @@ import { Adapter } from '@sveltejs/kit'; import './ambient.js'; +import { GetPlatformProxyOptions } from 'wrangler'; export default function plugin(options?: AdapterOptions): Adapter; export interface AdapterOptions { /** - * Customize the automatically-generated `_routes.json` file - * https://developers.cloudflare.com/pages/platform/functions/routing/#create-a-_routesjson-file + * Path to your [Wrangler configuration file](https://developers.cloudflare.com/workers/wrangler/configuration/). + */ + config?: string; + /** + * Whether to render a plaintext 404.html page or a rendered SPA fallback page + * for non-matching asset requests. + * + * For Cloudflare Workers, the default behaviour is to return a null-body + * 404-status response for non-matching assets requests. However, if the + * [`assets.not_found_handling`](https://developers.cloudflare.com/workers/static-assets/routing/#2-not_found_handling) + * Wrangler configuration setting is set to `"404-page"`, this page will be + * served if a request fails to match an asset. If `assets.not_found_handling` + * is set to `"single-page-application"`, the adapter will render a SPA fallback + * index.html page regardless of the `fallback` option specified. + * + * For Cloudflare Pages, this page will only be served when a request that + * matches an entry in `routes.exclude` fails to match an asset. + * + * Most of the time `plaintext` is sufficient, but if you are using `routes.exclude` to manually + * exclude a set of prerendered pages without exceeding the 100 route limit, you may wish to + * use `spa` instead to avoid showing an unstyled 404 page to users. + * + * See [Cloudflare Pages' Not Found behavior](https://developers.cloudflare.com/pages/configuration/serving-pages/#not-found-behavior) for more info. + * + * @default 'plaintext' + */ + fallback?: 'plaintext' | 'spa'; + + /** + * Only for Cloudflare Pages. Customize the automatically-generated [`_routes.json`](https://developers.cloudflare.com/pages/platform/functions/routing/#create-a-_routesjson-file) file. */ routes?: { /** @@ -30,6 +59,12 @@ export interface AdapterOptions { */ exclude?: string[]; }; + + /** + * Config object passed to [`getPlatformProxy`](https://developers.cloudflare.com/workers/wrangler/api/#getplatformproxy) + * during development and preview. + */ + platformProxy?: GetPlatformProxyOptions; } export interface RoutesJSONSpec { diff --git a/packages/adapter-cloudflare/index.js b/packages/adapter-cloudflare/index.js index 1dd0abd06470..266265556369 100644 --- a/packages/adapter-cloudflare/index.js +++ b/packages/adapter-cloudflare/index.js @@ -1,65 +1,167 @@ -import { writeFileSync } from 'node:fs'; -import * as path from 'node:path'; +import { copyFileSync, existsSync, writeFileSync } from 'node:fs'; +import path from 'node:path'; +import process from 'node:process'; import { fileURLToPath } from 'node:url'; -import * as esbuild from 'esbuild'; +import { getPlatformProxy, unstable_readConfig } from 'wrangler'; -/** @type {import('.').default} */ +/** @type {import('./index.js').default} */ export default function (options = {}) { return { name: '@sveltejs/adapter-cloudflare', async adapt(builder) { + if (existsSync('_routes.json')) { + throw new Error( + "Cloudflare Pages' _routes.json should be configured in svelte.config.js. See https://svelte.dev/docs/kit/adapter-cloudflare#Options-routes" + ); + } + + if (existsSync(`${builder.config.kit.files.assets}/_headers`)) { + throw new Error( + `The _headers file should be placed in the project root rather than the ${builder.config.kit.files.assets} directory` + ); + } + + if (existsSync(`${builder.config.kit.files.assets}/_redirects`)) { + throw new Error( + `The _redirects file should be placed in the project root rather than the ${builder.config.kit.files.assets} directory` + ); + } + + const wrangler_config = validate_config(options.config); + const building_for_cloudflare_pages = is_building_for_cloudflare_pages(wrangler_config); + + let dest = builder.getBuildDirectory('cloudflare'); + let worker_dest = `${dest}/_worker.js`; + let assets_binding = 'ASSETS'; + + if (building_for_cloudflare_pages) { + if (wrangler_config.pages_build_output_dir) { + dest = wrangler_config.pages_build_output_dir; + worker_dest = `${dest}/_worker.js`; + } + } else { + if (wrangler_config.main) { + worker_dest = wrangler_config.main; + } + if (wrangler_config.assets?.directory) { + dest = wrangler_config.assets.directory; + } + if (wrangler_config.assets?.binding) { + assets_binding = wrangler_config.assets.binding; + } + } + const files = fileURLToPath(new URL('./files', import.meta.url).href); - const dest = builder.getBuildDirectory('cloudflare'); const tmp = builder.getBuildDirectory('cloudflare-tmp'); builder.rimraf(dest); - builder.rimraf(tmp); - builder.mkdirp(tmp); - - // generate 404.html first which can then be overridden by prerendering, if the user defined such a page - await builder.generateFallback(path.join(dest, '404.html')); + builder.rimraf(worker_dest); - const dest_dir = `${dest}${builder.config.kit.paths.base}`; - const written_files = builder.writeClient(dest_dir); - builder.writePrerendered(dest_dir); + builder.mkdirp(dest); + builder.mkdirp(tmp); - const relativePath = path.posix.relative(tmp, builder.getServerDirectory()); + // client assets and prerendered pages + const assets_dest = `${dest}${builder.config.kit.paths.base}`; + builder.mkdirp(assets_dest); + if ( + building_for_cloudflare_pages || + wrangler_config.assets?.not_found_handling === '404-page' + ) { + // generate plaintext 404.html first which can then be overridden by prerendering, if the user defined such a page + const fallback = path.join(assets_dest, '404.html'); + if (options.fallback === 'spa') { + await builder.generateFallback(fallback); + } else { + writeFileSync(fallback, 'Not Found'); + } + } + const client_assets = builder.writeClient(assets_dest); + builder.writePrerendered(assets_dest); + if ( + !building_for_cloudflare_pages && + wrangler_config.assets?.not_found_handling === 'single-page-application' + ) { + await builder.generateFallback(path.join(assets_dest, 'index.html')); + } + // worker + const worker_dest_dir = path.dirname(worker_dest); writeFileSync( `${tmp}/manifest.js`, - `export const manifest = ${builder.generateManifest({ relativePath })};\n\n` + - `export const prerendered = new Set(${JSON.stringify(builder.prerendered.paths)});\n` - ); - - writeFileSync( - `${dest}/_routes.json`, - JSON.stringify(get_routes_json(builder, written_files, options.routes ?? {}), null, '\t') + `export const manifest = ${builder.generateManifest({ relativePath: path.posix.relative(tmp, builder.getServerDirectory()) })};\n\n` + + `export const prerendered = new Set(${JSON.stringify(builder.prerendered.paths)});\n\n` + + `export const base_path = ${JSON.stringify(builder.config.kit.paths.base)};\n` ); + builder.copy(`${files}/worker.js`, worker_dest, { + replace: { + // the paths returned by the Wrangler config might be Windows paths, + // so we need to convert them to POSIX paths or else the backslashes + // will be interpreted as escape characters and create an incorrect import path + SERVER: `${posixify(path.relative(worker_dest_dir, builder.getServerDirectory()))}/index.js`, + MANIFEST: `${posixify(path.relative(worker_dest_dir, tmp))}/manifest.js`, + ASSETS: assets_binding + } + }); + // _headers + if (existsSync('_headers')) { + copyFileSync('_headers', `${dest}/_headers`); + } writeFileSync(`${dest}/_headers`, generate_headers(builder.getAppPath()), { flag: 'a' }); - builder.copy(`${files}/worker.js`, `${tmp}/_worker.js`, { - replace: { - SERVER: `${relativePath}/index.js`, - MANIFEST: './manifest.js' + // _redirects + if (existsSync('_redirects')) { + copyFileSync('_redirects', `${dest}/_redirects`); + } + if (builder.prerendered.redirects.size > 0) { + writeFileSync(`${dest}/_redirects`, generate_redirects(builder.prerendered.redirects), { + flag: 'a' + }); + } + + writeFileSync(`${dest}/.assetsignore`, generate_assetsignore(), { flag: 'a' }); + + if (building_for_cloudflare_pages) { + writeFileSync( + `${dest}/_routes.json`, + JSON.stringify(get_routes_json(builder, client_assets, options.routes ?? {}), null, '\t') + ); + } + }, + emulate() { + // we want to invoke `getPlatformProxy` only once, but await it only when it is accessed. + // If we would await it here, it would hang indefinitely because the platform proxy only resolves once a request happens + const get_emulated = async () => { + const proxy = await getPlatformProxy(options.platformProxy); + const platform = /** @type {App.Platform} */ ({ + env: proxy.env, + ctx: proxy.ctx, + context: proxy.ctx, // deprecated in favor of ctx + caches: proxy.caches, + cf: proxy.cf + }); + /** @type {Record<string, any>} */ + const env = {}; + const prerender_platform = /** @type {App.Platform} */ (/** @type {unknown} */ ({ env })); + for (const key in proxy.env) { + Object.defineProperty(env, key, { + get: () => { + throw new Error(`Cannot access platform.env.${key} in a prerenderable route`); + } + }); } - }); + return { platform, prerender_platform }; + }; - await esbuild.build({ - platform: 'browser', - conditions: ['worker', 'browser'], - sourcemap: 'linked', - target: 'es2022', - entryPoints: [`${tmp}/_worker.js`], - outfile: `${dest}/_worker.js`, - allowOverwrite: true, - format: 'esm', - bundle: true, - loader: { - '.wasm': 'copy' - }, - external: ['cloudflare:*'] - }); + /** @type {{ platform: App.Platform, prerender_platform: App.Platform }} */ + let emulated; + + return { + platform: async ({ prerender }) => { + emulated ??= await get_emulated(); + return prerender ? emulated.prerender_platform : emulated.platform; + } + }; } }; } @@ -67,8 +169,8 @@ export default function (options = {}) { /** * @param {import('@sveltejs/kit').Builder} builder * @param {string[]} assets - * @param {import('./index').AdapterOptions['routes']} routes - * @returns {import('.').RoutesJSONSpec} + * @param {import('./index.js').AdapterOptions['routes']} routes + * @returns {import('./index.js').RoutesJSONSpec} */ function get_routes_json(builder, assets, { include = ['/*'], exclude = ['<all>'] }) { if (!Array.isArray(include) || !Array.isArray(exclude)) { @@ -87,7 +189,7 @@ function get_routes_json(builder, assets, { include = ['/*'], exclude = ['<all>' .flatMap((rule) => (rule === '<all>' ? ['<build>', '<files>', '<prerendered>'] : rule)) .flatMap((rule) => { if (rule === '<build>') { - return `/${builder.getAppPath()}/*`; + return [`/${builder.getAppPath()}/immutable/*`, `/${builder.getAppPath()}/version.json`]; } if (rule === '<files>') { @@ -100,18 +202,11 @@ function get_routes_json(builder, assets, { include = ['/*'], exclude = ['<all>' file === '_redirects' ) ) - .map((file) => `/${file}`); + .map((file) => `${builder.config.kit.paths.base}/${file}`); } if (rule === '<prerendered>') { - const prerendered = []; - for (const path of builder.prerendered.paths) { - if (!builder.prerendered.redirects.has(path)) { - prerendered.push(path); - } - } - - return prerendered; + return builder.prerendered.paths; } return rule; @@ -119,7 +214,7 @@ function get_routes_json(builder, assets, { include = ['/*'], exclude = ['<all>' const excess = include.length + exclude.length - 100; if (excess > 0) { - const message = `Function includes/excludes exceeds _routes.json limits (see https://developers.cloudflare.com/pages/platform/functions/routing/#limits). Dropping ${excess} exclude rules — this will cause unnecessary function invocations.`; + const message = `Cloudflare Pages Functions' includes/excludes exceeds _routes.json limits (see https://developers.cloudflare.com/pages/platform/functions/routing/#limits). Dropping ${excess} exclude rules — this will cause unnecessary function invocations.`; builder.log.warn(message); exclude.length -= excess; @@ -146,3 +241,82 @@ function generate_headers(app_dir) { # === END AUTOGENERATED SVELTE IMMUTABLE HEADERS === `.trimEnd(); } + +/** @param {Map<string, { status: number; location: string }>} redirects */ +function generate_redirects(redirects) { + const rules = Array.from( + redirects.entries(), + ([path, redirect]) => `${path} ${redirect.location} ${redirect.status}` + ).join('\n'); + + return ` +# === START AUTOGENERATED SVELTE PRERENDERED REDIRECTS === +${rules} +# === END AUTOGENERATED SVELTE PRERENDERED REDIRECTS === +`.trimEnd(); +} + +function generate_assetsignore() { + // this comes from https://github.com/cloudflare/workers-sdk/blob/main/packages/create-cloudflare/templates-experimental/svelte/templates/static/.assetsignore + return ` +_worker.js +_routes.json +_headers +_redirects +`; +} + +/** + * @param {string} config_file + * @returns {import('wrangler').Unstable_Config} + */ +function validate_config(config_file = undefined) { + const wrangler_config = unstable_readConfig({ config: config_file }); + + // we don't support workers sites + if (wrangler_config.site) { + throw new Error( + `You must remove all \`site\` keys in ${wrangler_config.configPath}. Consult https://svelte.dev/docs/kit/adapter-cloudflare#Migrating-from-Workers-Sites-to-Workers-Static-Assets` + ); + } + + if (is_building_for_cloudflare_pages(wrangler_config)) { + return wrangler_config; + } + + // probably deploying to Cloudflare Workers + if (wrangler_config.main || wrangler_config.assets) { + if (!wrangler_config.assets?.directory) { + throw new Error( + `You must specify the \`assets.directory\` key in ${wrangler_config.configPath}. Consult https://developers.cloudflare.com/workers/static-assets/binding/#directory` + ); + } + + if (!wrangler_config.assets?.binding) { + throw new Error( + `You must specify the \`assets.binding\` key in ${wrangler_config.configPath}. Consult https://developers.cloudflare.com/workers/static-assets/binding/#binding` + ); + } + } + + return wrangler_config; +} + +/** + * @param {import('wrangler').Unstable_Config} wrangler_config + * @returns {boolean} + */ +function is_building_for_cloudflare_pages(wrangler_config) { + return ( + !!process.env.CF_PAGES || + !wrangler_config.configPath || + !!wrangler_config.pages_build_output_dir || + !wrangler_config.main || + !wrangler_config.assets + ); +} + +/** @param {string} str */ +function posixify(str) { + return str.replace(/\\/g, '/'); +} diff --git a/packages/adapter-cloudflare/placeholders.ts b/packages/adapter-cloudflare/internal.d.ts similarity index 77% rename from packages/adapter-cloudflare/placeholders.ts rename to packages/adapter-cloudflare/internal.d.ts index 3689c3f5e51e..6c79569f7f7f 100644 --- a/packages/adapter-cloudflare/placeholders.ts +++ b/packages/adapter-cloudflare/internal.d.ts @@ -7,4 +7,6 @@ declare module 'MANIFEST' { export const manifest: SSRManifest; export const prerendered: Set<string>; + export const app_path: string; + export const base_path: string; } diff --git a/packages/adapter-cloudflare/package.json b/packages/adapter-cloudflare/package.json index a686bfa841f3..479a8781ca6f 100644 --- a/packages/adapter-cloudflare/package.json +++ b/packages/adapter-cloudflare/package.json @@ -1,14 +1,22 @@ { "name": "@sveltejs/adapter-cloudflare", - "version": "2.3.3", + "version": "7.0.4", "description": "Adapter for building SvelteKit applications on Cloudflare Pages with Workers integration", + "keywords": [ + "adapter", + "cloudflare pages", + "deploy", + "hosting", + "svelte", + "sveltekit" + ], "repository": { "type": "git", "url": "https://github.com/sveltejs/kit", "directory": "packages/adapter-cloudflare" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { @@ -26,25 +34,25 @@ ], "scripts": { "build": "esbuild src/worker.js --bundle --outfile=files/worker.js --external:SERVER --external:MANIFEST --format=esm", - "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore", + "lint": "prettier --check .", "format": "pnpm lint --write", "check": "tsc --skipLibCheck", - "prepublishOnly": "pnpm build" + "prepublishOnly": "pnpm build", + "test": "pnpm build && pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test" }, "dependencies": { - "@cloudflare/workers-types": "^4.20230404.0", - "esbuild": "^0.18.11", - "worktop": "0.8.0-next.15" + "@cloudflare/workers-types": "^4.20250507.0", + "worktop": "0.8.0-next.18" }, "devDependencies": { - "@types/node": "^16.18.6", - "@types/ws": "^8.5.3", - "typescript": "^4.9.4" + "@playwright/test": "catalog:", + "@sveltejs/kit": "workspace:^", + "@types/node": "^18.19.48", + "esbuild": "^0.25.4", + "typescript": "^5.3.3" }, "peerDependencies": { - "@sveltejs/kit": "^1.0.0" - }, - "publishConfig": { - "access": "public" + "@sveltejs/kit": "^2.0.0", + "wrangler": "^4.0.0" } } diff --git a/packages/adapter-cloudflare/src/worker.js b/packages/adapter-cloudflare/src/worker.js index 59e6af9f54a3..7a89657b3997 100644 --- a/packages/adapter-cloudflare/src/worker.js +++ b/packages/adapter-cloudflare/src/worker.js @@ -1,20 +1,33 @@ import { Server } from 'SERVER'; -import { manifest, prerendered } from 'MANIFEST'; +import { manifest, prerendered, base_path } from 'MANIFEST'; import * as Cache from 'worktop/cfw.cache'; const server = new Server(manifest); -/** @type {import('worktop/cfw').Module.Worker<{ ASSETS: import('worktop/cfw.durable').Durable.Object }>} */ -const worker = { - async fetch(req, env, context) { - // @ts-ignore - await server.init({ env }); +const app_path = `/${manifest.appPath}`; + +const immutable = `${app_path}/immutable/`; +const version_file = `${app_path}/version.json`; + +export default { + /** + * @param {Request} req + * @param {{ ASSETS: { fetch: typeof fetch } }} env + * @param {ExecutionContext} ctx + * @returns {Promise<Response>} + */ + async fetch(req, env, ctx) { + await server.init({ + // @ts-expect-error env contains environment variables and bindings + env + }); + // skip cache if "cache-control: no-cache" in request let pragma = req.headers.get('cache-control') || ''; let res = !pragma.includes('no-cache') && (await Cache.lookup(req)); if (res) return res; - let { pathname } = new URL(req.url); + let { pathname, search } = new URL(req.url); try { pathname = decodeURIComponent(pathname); } catch { @@ -23,19 +36,29 @@ const worker = { const stripped_pathname = pathname.replace(/\/$/, ''); - // prerendered pages and /static files + // files in /static, the service worker, and Vite imported server assets let is_static_asset = false; - const filename = stripped_pathname.substring(1); + const filename = stripped_pathname.slice(base_path.length + 1); if (filename) { is_static_asset = - manifest.assets.has(filename) || manifest.assets.has(filename + '/index.html'); + manifest.assets.has(filename) || + manifest.assets.has(filename + '/index.html') || + filename in manifest._.server_assets || + filename + '/index.html' in manifest._.server_assets; } - const location = pathname.at(-1) === '/' ? stripped_pathname : pathname + '/'; + let location = pathname.at(-1) === '/' ? stripped_pathname : pathname + '/'; - if (is_static_asset || prerendered.has(pathname)) { + if ( + is_static_asset || + prerendered.has(pathname) || + pathname === version_file || + pathname.startsWith(immutable) + ) { res = await env.ASSETS.fetch(req); } else if (location && prerendered.has(location)) { + // trailing slash redirect for prerendered pages + if (search) location += search; res = new Response('', { status: 308, headers: { @@ -45,8 +68,15 @@ const worker = { } else { // dynamically-generated pages res = await server.respond(req, { - // @ts-ignore - platform: { env, context, caches, cf: req.cf }, + platform: { + env, + ctx, + context: ctx, // deprecated in favor of ctx + // @ts-expect-error webworker types from worktop are not compatible with Cloudflare Workers types + caches, + // @ts-expect-error the type is correct but ts is confused because platform.cf uses the type from index.ts while req.cf uses the type from index.d.ts + cf: req.cf + }, getClientAddress() { return req.headers.get('cf-connecting-ip'); } @@ -56,8 +86,6 @@ const worker = { // write to `Cache` only if response is not an error, // let `Cache.save` handle the Cache-Control and Vary headers pragma = res.headers.get('cache-control') || ''; - return pragma && res.status < 400 ? Cache.save(req, res, context) : res; + return pragma && res.status < 400 ? Cache.save(req, res, ctx) : res; } }; - -export default worker; diff --git a/packages/adapter-cloudflare-workers/.gitignore b/packages/adapter-cloudflare/test/apps/pages/.gitignore similarity index 50% rename from packages/adapter-cloudflare-workers/.gitignore rename to packages/adapter-cloudflare/test/apps/pages/.gitignore index 9daa8247da45..1bd7b63de4b6 100644 --- a/packages/adapter-cloudflare-workers/.gitignore +++ b/packages/adapter-cloudflare/test/apps/pages/.gitignore @@ -1,2 +1,4 @@ .DS_Store node_modules +/.svelte-kit +/.wrangler \ No newline at end of file diff --git a/packages/adapter-cloudflare/test/apps/pages/package.json b/packages/adapter-cloudflare/test/apps/pages/package.json new file mode 100644 index 000000000000..249371fc1ba8 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/package.json @@ -0,0 +1,21 @@ +{ + "name": "test-cloudflare-pages", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "wrangler pages dev .svelte-kit/cloudflare --port 8787", + "prepare": "svelte-kit sync || echo ''", + "test": "playwright test" + }, + "devDependencies": { + "@sveltejs/kit": "workspace:^", + "@sveltejs/vite-plugin-svelte": "catalog:", + "server-side-dep": "file:server-side-dep", + "svelte": "^5.23.1", + "vite": "catalog:", + "wrangler": "^4.14.3" + }, + "type": "module" +} diff --git a/packages/adapter-cloudflare/test/apps/pages/playwright.config.js b/packages/adapter-cloudflare/test/apps/pages/playwright.config.js new file mode 100644 index 000000000000..33d36b651014 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/playwright.config.js @@ -0,0 +1 @@ +export { config as default } from '../../utils.js'; diff --git a/packages/adapter-cloudflare/test/apps/pages/server-side-dep/index.d.ts b/packages/adapter-cloudflare/test/apps/pages/server-side-dep/index.d.ts new file mode 100644 index 000000000000..0e1188e04a67 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/server-side-dep/index.d.ts @@ -0,0 +1 @@ +export function sum(a: number, b: number): number; diff --git a/packages/adapter-cloudflare/test/apps/pages/server-side-dep/index.js b/packages/adapter-cloudflare/test/apps/pages/server-side-dep/index.js new file mode 100644 index 000000000000..568b90577d43 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/server-side-dep/index.js @@ -0,0 +1,4 @@ +/** @type {import('./index.js').sum} */ +export function sum(a, b) { + return a + b; +} diff --git a/packages/adapter-cloudflare/test/apps/pages/server-side-dep/package.json b/packages/adapter-cloudflare/test/apps/pages/server-side-dep/package.json new file mode 100644 index 000000000000..5b26c9d1855a --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/server-side-dep/package.json @@ -0,0 +1,11 @@ +{ + "name": "server-side-dep", + "version": "0.0.1", + "type": "module", + "exports": { + ".": { + "default": "./index.js", + "types": "./index.d.ts" + } + } +} diff --git a/packages/adapter-cloudflare/test/apps/pages/src/app.html b/packages/adapter-cloudflare/test/apps/pages/src/app.html new file mode 100644 index 000000000000..d533c5e31716 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/src/app.html @@ -0,0 +1,11 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + %sveltekit.head% + </head> + <body> + <div>%sveltekit.body%</div> + </body> +</html> diff --git a/packages/adapter-cloudflare/test/apps/pages/src/routes/+page.server.js b/packages/adapter-cloudflare/test/apps/pages/src/routes/+page.server.js new file mode 100644 index 000000000000..0eeb7d398ffd --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/src/routes/+page.server.js @@ -0,0 +1,8 @@ +// this tests that Wrangler can correctly resolve and bundle server-side dependencies +import { sum } from 'server-side-dep'; + +export function load() { + return { + sum: sum(1, 2) + }; +} diff --git a/packages/adapter-cloudflare/test/apps/pages/src/routes/+page.svelte b/packages/adapter-cloudflare/test/apps/pages/src/routes/+page.svelte new file mode 100644 index 000000000000..d5e339683387 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/src/routes/+page.svelte @@ -0,0 +1,5 @@ +<script> + export let data; +</script> + +<h1>Sum: {data.sum}</h1> diff --git a/packages/adapter-cloudflare/test/apps/pages/svelte.config.js b/packages/adapter-cloudflare/test/apps/pages/svelte.config.js new file mode 100644 index 000000000000..20cd2b3ff5b8 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/svelte.config.js @@ -0,0 +1,10 @@ +import adapter from '../../../index.js'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + kit: { + adapter: adapter() + } +}; + +export default config; diff --git a/packages/adapter-cloudflare/test/apps/pages/test/test.js b/packages/adapter-cloudflare/test/apps/pages/test/test.js new file mode 100644 index 000000000000..0619c030bbc2 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/test/test.js @@ -0,0 +1,6 @@ +import { expect, test } from '@playwright/test'; + +test('worker', async ({ page }) => { + await page.goto('/'); + await expect(page.locator('h1')).toContainText('Sum: 3'); +}); diff --git a/packages/create-svelte/shared/+skeletonlib-typescript/jsconfig.json b/packages/adapter-cloudflare/test/apps/pages/tsconfig.json similarity index 56% rename from packages/create-svelte/shared/+skeletonlib-typescript/jsconfig.json rename to packages/adapter-cloudflare/test/apps/pages/tsconfig.json index 7125447cb881..34380ebc986e 100644 --- a/packages/create-svelte/shared/+skeletonlib-typescript/jsconfig.json +++ b/packages/adapter-cloudflare/test/apps/pages/tsconfig.json @@ -1,11 +1,14 @@ { - "extends": "./.svelte-kit/tsconfig.json", "compilerOptions": { + "allowJs": true, + "checkJs": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, - "moduleResolution": "NodeNext" - } + "strict": true, + "moduleResolution": "bundler" + }, + "extends": "./.svelte-kit/tsconfig.json" } diff --git a/packages/adapter-cloudflare/test/apps/pages/vite.config.js b/packages/adapter-cloudflare/test/apps/pages/vite.config.js new file mode 100644 index 000000000000..29ad08debe6a --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/pages/vite.config.js @@ -0,0 +1,11 @@ +import { sveltekit } from '@sveltejs/kit/vite'; + +/** @type {import('vite').UserConfig} */ +const config = { + build: { + minify: false + }, + plugins: [sveltekit()] +}; + +export default config; diff --git a/packages/adapter-cloudflare/test/apps/workers/.gitignore b/packages/adapter-cloudflare/test/apps/workers/.gitignore new file mode 100644 index 000000000000..f9ee23cc8621 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/.gitignore @@ -0,0 +1,5 @@ +.DS_Store +node_modules +/.svelte-kit +/.wrangler +/dist \ No newline at end of file diff --git a/packages/adapter-cloudflare/test/apps/workers/package.json b/packages/adapter-cloudflare/test/apps/workers/package.json new file mode 100644 index 000000000000..35398cb300a4 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/package.json @@ -0,0 +1,24 @@ +{ + "name": "test-cloudflare-workers", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "wrangler dev dist/index.js", + "prepare": "svelte-kit sync || echo ''", + "test:dev": "cross-env DEV=true playwright test", + "test:build": "playwright test", + "test": "pnpm test:dev && pnpm test:build" + }, + "devDependencies": { + "@sveltejs/kit": "workspace:^", + "@sveltejs/vite-plugin-svelte": "catalog:", + "cross-env": "catalog:", + "server-side-dep": "file:server-side-dep", + "svelte": "^5.23.1", + "vite": "catalog:", + "wrangler": "^4.14.3" + }, + "type": "module" +} diff --git a/packages/adapter-cloudflare/test/apps/workers/playwright.config.js b/packages/adapter-cloudflare/test/apps/workers/playwright.config.js new file mode 100644 index 000000000000..33d36b651014 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/playwright.config.js @@ -0,0 +1 @@ +export { config as default } from '../../utils.js'; diff --git a/packages/adapter-cloudflare/test/apps/workers/server-side-dep/index.d.ts b/packages/adapter-cloudflare/test/apps/workers/server-side-dep/index.d.ts new file mode 100644 index 000000000000..0e1188e04a67 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/server-side-dep/index.d.ts @@ -0,0 +1 @@ +export function sum(a: number, b: number): number; diff --git a/packages/adapter-cloudflare/test/apps/workers/server-side-dep/index.js b/packages/adapter-cloudflare/test/apps/workers/server-side-dep/index.js new file mode 100644 index 000000000000..568b90577d43 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/server-side-dep/index.js @@ -0,0 +1,4 @@ +/** @type {import('./index.js').sum} */ +export function sum(a, b) { + return a + b; +} diff --git a/packages/adapter-cloudflare/test/apps/workers/server-side-dep/package.json b/packages/adapter-cloudflare/test/apps/workers/server-side-dep/package.json new file mode 100644 index 000000000000..5b26c9d1855a --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/server-side-dep/package.json @@ -0,0 +1,11 @@ +{ + "name": "server-side-dep", + "version": "0.0.1", + "type": "module", + "exports": { + ".": { + "default": "./index.js", + "types": "./index.d.ts" + } + } +} diff --git a/packages/adapter-cloudflare/test/apps/workers/src/app.d.ts b/packages/adapter-cloudflare/test/apps/workers/src/app.d.ts new file mode 100644 index 000000000000..101a9db0b8bf --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/src/app.d.ts @@ -0,0 +1,3 @@ +// TODO: remove this in 3.0 once svelte.config.js is included by the generated tsconfig.json +// this ensures we get the ambient types from the adapter +import '../../../../index.js'; diff --git a/packages/adapter-cloudflare/test/apps/workers/src/app.html b/packages/adapter-cloudflare/test/apps/workers/src/app.html new file mode 100644 index 000000000000..d533c5e31716 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/src/app.html @@ -0,0 +1,11 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + %sveltekit.head% + </head> + <body> + <div>%sveltekit.body%</div> + </body> +</html> diff --git a/packages/adapter-cloudflare/test/apps/workers/src/routes/+page.server.js b/packages/adapter-cloudflare/test/apps/workers/src/routes/+page.server.js new file mode 100644 index 000000000000..0eeb7d398ffd --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/src/routes/+page.server.js @@ -0,0 +1,8 @@ +// this tests that Wrangler can correctly resolve and bundle server-side dependencies +import { sum } from 'server-side-dep'; + +export function load() { + return { + sum: sum(1, 2) + }; +} diff --git a/packages/adapter-cloudflare/test/apps/workers/src/routes/+page.svelte b/packages/adapter-cloudflare/test/apps/workers/src/routes/+page.svelte new file mode 100644 index 000000000000..d5e339683387 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/src/routes/+page.svelte @@ -0,0 +1,5 @@ +<script> + export let data; +</script> + +<h1>Sum: {data.sum}</h1> diff --git a/packages/adapter-cloudflare/test/apps/workers/src/routes/ctx/+server.js b/packages/adapter-cloudflare/test/apps/workers/src/routes/ctx/+server.js new file mode 100644 index 000000000000..e26ae2cbbd71 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/src/routes/ctx/+server.js @@ -0,0 +1,3 @@ +export function GET({ platform }) { + return new Response(platform?.ctx.waitUntil ? 'ctx works' : 'ctx does not work'); +} diff --git a/packages/adapter-cloudflare/test/apps/workers/svelte.config.js b/packages/adapter-cloudflare/test/apps/workers/svelte.config.js new file mode 100644 index 000000000000..20cd2b3ff5b8 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/svelte.config.js @@ -0,0 +1,10 @@ +import adapter from '../../../index.js'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + kit: { + adapter: adapter() + } +}; + +export default config; diff --git a/packages/adapter-cloudflare/test/apps/workers/test/test.js b/packages/adapter-cloudflare/test/apps/workers/test/test.js new file mode 100644 index 000000000000..f938d3cf5bf2 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/test/test.js @@ -0,0 +1,11 @@ +import { expect, test } from '@playwright/test'; + +test('worker', async ({ page }) => { + await page.goto('/'); + await expect(page.locator('h1')).toContainText('Sum: 3'); +}); + +test('ctx', async ({ request }) => { + const res = await request.get('/ctx'); + expect(await res.text()).toBe('ctx works'); +}); diff --git a/packages/adapter-cloudflare/test/apps/workers/tsconfig.json b/packages/adapter-cloudflare/test/apps/workers/tsconfig.json new file mode 100644 index 000000000000..34380ebc986e --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler" + }, + "extends": "./.svelte-kit/tsconfig.json" +} diff --git a/packages/adapter-cloudflare/test/apps/workers/vite.config.js b/packages/adapter-cloudflare/test/apps/workers/vite.config.js new file mode 100644 index 000000000000..29ad08debe6a --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/vite.config.js @@ -0,0 +1,11 @@ +import { sveltekit } from '@sveltejs/kit/vite'; + +/** @type {import('vite').UserConfig} */ +const config = { + build: { + minify: false + }, + plugins: [sveltekit()] +}; + +export default config; diff --git a/packages/adapter-cloudflare/test/apps/workers/wrangler.jsonc b/packages/adapter-cloudflare/test/apps/workers/wrangler.jsonc new file mode 100644 index 000000000000..1f2cb073f7b6 --- /dev/null +++ b/packages/adapter-cloudflare/test/apps/workers/wrangler.jsonc @@ -0,0 +1,7 @@ +{ + "main": "./dist/index.js", + "assets": { + "directory": "./dist/public", + "binding": "ASSETS" + } +} diff --git a/packages/adapter-cloudflare/test/utils.js b/packages/adapter-cloudflare/test/utils.js new file mode 100644 index 000000000000..3b15f891cf0a --- /dev/null +++ b/packages/adapter-cloudflare/test/utils.js @@ -0,0 +1,28 @@ +import { devices } from '@playwright/test'; +import process from 'node:process'; + +/** @type {import('@playwright/test').PlaywrightTestConfig} */ +export const config = { + forbidOnly: !!process.env.CI, + // generous timeouts on CI + timeout: process.env.CI ? 45000 : 15000, + webServer: { + command: process.env.DEV ? 'pnpm dev' : 'pnpm build && pnpm preview', + port: process.env.DEV ? 5173 : 8787 + }, + retries: process.env.CI ? 2 : 0, + projects: [ + { + name: 'chromium' + } + ], + use: { + ...devices['Desktop Chrome'], + screenshot: 'only-on-failure', + trace: 'retain-on-failure' + }, + workers: process.env.CI ? 2 : undefined, + reporter: 'list', + testDir: 'test', + testMatch: /(.+\.)?(test|spec)\.[jt]s/ +}; diff --git a/packages/adapter-cloudflare/tsconfig.json b/packages/adapter-cloudflare/tsconfig.json index 4a37ad69ac8c..dea57ac8d9a4 100644 --- a/packages/adapter-cloudflare/tsconfig.json +++ b/packages/adapter-cloudflare/tsconfig.json @@ -4,12 +4,16 @@ "checkJs": true, "noEmit": true, "noImplicitAny": true, - "module": "es2020", - "moduleResolution": "node", + "target": "es2022", + "module": "node16", + "moduleResolution": "node16", "baseUrl": ".", "paths": { "@sveltejs/kit": ["../kit/types/index"] - } + }, + // taken from the Cloudflare Workers TypeScript template https://github.com/cloudflare/workers-sdk/blob/main/packages/create-cloudflare/templates/hello-world/ts/tsconfig.json + "lib": ["es2021"], + "types": ["@cloudflare/workers-types"] }, - "include": ["index.js", "placeholders.ts", "src/worker.js"] + "include": ["index.js", "utils.js", "test/utils.js", "internal.d.ts", "src/worker.js"] } diff --git a/packages/adapter-netlify/CHANGELOG.md b/packages/adapter-netlify/CHANGELOG.md index b6f7b7bfe41d..f817f79cf49f 100644 --- a/packages/adapter-netlify/CHANGELOG.md +++ b/packages/adapter-netlify/CHANGELOG.md @@ -1,5 +1,187 @@ # @sveltejs/adapter-netlify +## 5.0.2 +### Patch Changes + + +- chore(deps): upgrade to esbuild 0.25.4 ([#13770](https://github.com/sveltejs/kit/pull/13770)) + +## 5.0.1 +### Patch Changes + + +- chore(deps): upgrade esbuild to 0.25.2 ([#13716](https://github.com/sveltejs/kit/pull/13716)) + +- Updated dependencies [[`c51fb554416e0c4a21655c1d79e834f69743d1d5`](https://github.com/sveltejs/kit/commit/c51fb554416e0c4a21655c1d79e834f69743d1d5)]: + - @sveltejs/kit@2.20.8 + +## 5.0.0 +### Major Changes + + +- fix: error if the `_headers` and `_redirects` files are in the `/static` directory instead of the project root ([#13227](https://github.com/sveltejs/kit/pull/13227)) + +## 4.4.2 +### Patch Changes + + +- fix: correctly import manifest on Windows machines ([#13495](https://github.com/sveltejs/kit/pull/13495)) + +- Updated dependencies [[`28cf64589a331ea4770c0883216c5e16d1de7496`](https://github.com/sveltejs/kit/commit/28cf64589a331ea4770c0883216c5e16d1de7496), [`ef1e8047225e7a79c6d121d8ed1a571e5ea44f08`](https://github.com/sveltejs/kit/commit/ef1e8047225e7a79c6d121d8ed1a571e5ea44f08), [`2e6527b92875976b79cc00e7b75ee0ad8b69a239`](https://github.com/sveltejs/kit/commit/2e6527b92875976b79cc00e7b75ee0ad8b69a239), [`0c0172e1463218fe63a67c587173bb3065a53c49`](https://github.com/sveltejs/kit/commit/0c0172e1463218fe63a67c587173bb3065a53c49)]: + - @sveltejs/kit@2.17.3 + +## 4.4.1 +### Patch Changes + + +- fix: avoid unnecessary Netlify edge function invocations for static files, which resolves a conflict between Netlify Edge Functions and Netlify Identity ([#12052](https://github.com/sveltejs/kit/pull/12052)) + +## 4.4.0 +### Minor Changes + + +- chore: upgrade esbuild to 0.24.0 ([#12270](https://github.com/sveltejs/kit/pull/12270)) + + +### Patch Changes + +- Updated dependencies [[`d030f4bb285e70844d09b3f0c87809bae43014b8`](https://github.com/sveltejs/kit/commit/d030f4bb285e70844d09b3f0c87809bae43014b8), [`67dd214863cbc5852eb0e8512efbb7bad5358e8a`](https://github.com/sveltejs/kit/commit/67dd214863cbc5852eb0e8512efbb7bad5358e8a)]: + - @sveltejs/kit@2.9.0 + +## 4.3.6 +### Patch Changes + + +- docs: update URLs for new svelte.dev site ([#12857](https://github.com/sveltejs/kit/pull/12857)) + +- Updated dependencies [[`dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46`](https://github.com/sveltejs/kit/commit/dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46), [`4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d`](https://github.com/sveltejs/kit/commit/4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d), [`3a9b78f04786898ca93f6d4b75ab18d26bc45192`](https://github.com/sveltejs/kit/commit/3a9b78f04786898ca93f6d4b75ab18d26bc45192), [`723eb8b31e6a22c82f730c30e485386c8676b746`](https://github.com/sveltejs/kit/commit/723eb8b31e6a22c82f730c30e485386c8676b746), [`8ec471c875345b751344e67580ff1b772ef2735b`](https://github.com/sveltejs/kit/commit/8ec471c875345b751344e67580ff1b772ef2735b)]: + - @sveltejs/kit@2.7.3 + +## 4.3.5 +### Patch Changes + + +- fix: correctly handle relative paths when fetching assets on the server ([#12113](https://github.com/sveltejs/kit/pull/12113)) + +- Updated dependencies [[`df48fc6ede3859beabaae9fd7c6f722215bb8a42`](https://github.com/sveltejs/kit/commit/df48fc6ede3859beabaae9fd7c6f722215bb8a42), [`5780deba8e3ebd0e2b0abea029068ad0c6daf6ad`](https://github.com/sveltejs/kit/commit/5780deba8e3ebd0e2b0abea029068ad0c6daf6ad), [`6f9aefdb8699fc126d76a88471602cb9a80822eb`](https://github.com/sveltejs/kit/commit/6f9aefdb8699fc126d76a88471602cb9a80822eb), [`8aa95b4b3431e79f62f580abdcdcb157b4de86cd`](https://github.com/sveltejs/kit/commit/8aa95b4b3431e79f62f580abdcdcb157b4de86cd)]: + - @sveltejs/kit@2.7.0 + +## 4.3.4 +### Patch Changes + + +- fix: import `node:process` instead of using globals ([#12641](https://github.com/sveltejs/kit/pull/12641)) + +- Updated dependencies [[`e798ef718f163bed4f93e1918bd8294f765376ad`](https://github.com/sveltejs/kit/commit/e798ef718f163bed4f93e1918bd8294f765376ad)]: + - @sveltejs/kit@2.5.28 + +## 4.3.3 +### Patch Changes + + +- chore: configure provenance in a simpler manner ([#12570](https://github.com/sveltejs/kit/pull/12570)) + +- Updated dependencies [[`087a43d391fc38b8c008fb39a804dc6988974101`](https://github.com/sveltejs/kit/commit/087a43d391fc38b8c008fb39a804dc6988974101)]: + - @sveltejs/kit@2.5.22 + +## 4.3.2 +### Patch Changes + + +- chore: package provenance ([#12567](https://github.com/sveltejs/kit/pull/12567)) + +- Updated dependencies [[`4930a8443caa53bcecee7b690cd28e429b1c8a20`](https://github.com/sveltejs/kit/commit/4930a8443caa53bcecee7b690cd28e429b1c8a20)]: + - @sveltejs/kit@2.5.21 + +## 4.3.1 +### Patch Changes + + +- fix: copy `.eot`, `.otf`, `.ttf`, `.woff`, and `woff2` font files when bundling ([#12439](https://github.com/sveltejs/kit/pull/12439)) + +## 4.3.0 +### Minor Changes + + +- chore(deps): upgrade to esbuild 0.21 ([#12415](https://github.com/sveltejs/kit/pull/12415)) + + +### Patch Changes + +- Updated dependencies [[`84298477a014ec471839adf7a4448d91bc7949e4`](https://github.com/sveltejs/kit/commit/84298477a014ec471839adf7a4448d91bc7949e4), [`5645614f497931f587b7cb8b3c885fce892a6a72`](https://github.com/sveltejs/kit/commit/5645614f497931f587b7cb8b3c885fce892a6a72), [`84298477a014ec471839adf7a4448d91bc7949e4`](https://github.com/sveltejs/kit/commit/84298477a014ec471839adf7a4448d91bc7949e4)]: + - @sveltejs/kit@2.5.18 + +## 4.2.1 + +### Patch Changes + +- chore: update to @rollup/plugin-commonjs@26 ([#12326](https://github.com/sveltejs/kit/pull/12326)) + +- chore: add keywords for discovery in npm search ([#12330](https://github.com/sveltejs/kit/pull/12330)) + +- Updated dependencies [[`25acb1d9fce998dccd8050b93cf4142c2b082611`](https://github.com/sveltejs/kit/commit/25acb1d9fce998dccd8050b93cf4142c2b082611), [`642c4a4aff4351b786fe6274aa2f0bf7d905faf9`](https://github.com/sveltejs/kit/commit/642c4a4aff4351b786fe6274aa2f0bf7d905faf9), [`0a0e9aa897123ebec50af08e9385b2ca4fc5bb28`](https://github.com/sveltejs/kit/commit/0a0e9aa897123ebec50af08e9385b2ca4fc5bb28)]: + - @sveltejs/kit@2.5.11 + +## 4.2.0 + +### Minor Changes + +- chore(deps): upgrade esbuild ([#12118](https://github.com/sveltejs/kit/pull/12118)) + +### Patch Changes + +- Updated dependencies [[`bbab296f6fcc05af6b999182798bcdedabbaa4c9`](https://github.com/sveltejs/kit/commit/bbab296f6fcc05af6b999182798bcdedabbaa4c9)]: + - @sveltejs/kit@2.5.6 + +## 4.1.0 + +### Minor Changes + +- feat: allow Node.js built-in modules when targeting edge functions ([#11675](https://github.com/sveltejs/kit/pull/11675)) + +### Patch Changes + +- Updated dependencies [[`36dc54ac740b8b4c6a2b904a1d0aadd8923a875c`](https://github.com/sveltejs/kit/commit/36dc54ac740b8b4c6a2b904a1d0aadd8923a875c), [`5dae3676b8cc6f8ee0def57340e6a6e591bafecd`](https://github.com/sveltejs/kit/commit/5dae3676b8cc6f8ee0def57340e6a6e591bafecd), [`ada595908b5501b8f4ac30c89c0d6314f364fde3`](https://github.com/sveltejs/kit/commit/ada595908b5501b8f4ac30c89c0d6314f364fde3), [`e228f8997840b89c6248e1c5df6f3108008a06be`](https://github.com/sveltejs/kit/commit/e228f8997840b89c6248e1c5df6f3108008a06be)]: + - @sveltejs/kit@2.4.1 + +## 4.0.0 + +### Major Changes + +- breaking: update peer dependency on `@sveltejs/kit` ([#11649](https://github.com/sveltejs/kit/pull/11649)) + +### Minor Changes + +- feat: support `read` from `$app/server` ([#11649](https://github.com/sveltejs/kit/pull/11649)) + +### Patch Changes + +- Updated dependencies [[`288f731c8a5b20cadb9e219f9583f3f16bf8c7b8`](https://github.com/sveltejs/kit/commit/288f731c8a5b20cadb9e219f9583f3f16bf8c7b8)]: + - @sveltejs/kit@2.4.0 + +## 3.0.2 + +### Patch Changes + +- chore: upgrade esbuild to 0.19.11 ([#11632](https://github.com/sveltejs/kit/pull/11632)) + +## 3.0.1 + +### Patch Changes + +- chore: update primary branch from master to main ([`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d)) + +- Updated dependencies [[`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d), [`16961e8cd3fa6a7f382153b1ff056bc2aae9b31b`](https://github.com/sveltejs/kit/commit/16961e8cd3fa6a7f382153b1ff056bc2aae9b31b), [`197e01f95652f511160f38b37b9da73a124ecd48`](https://github.com/sveltejs/kit/commit/197e01f95652f511160f38b37b9da73a124ecd48), [`102e4a5ae5b29624302163faf5a20c94a64a5b2c`](https://github.com/sveltejs/kit/commit/102e4a5ae5b29624302163faf5a20c94a64a5b2c), [`f8e3d8b9728c9f1ab63389342c31d7246b6f9db6`](https://github.com/sveltejs/kit/commit/f8e3d8b9728c9f1ab63389342c31d7246b6f9db6)]: + - @sveltejs/kit@2.0.4 + +## 3.0.0 + +### Major Changes + +- breaking: require SvelteKit 2 ([#11316](https://github.com/sveltejs/kit/pull/11316)) + +- chore: upgrade esbuild ([#11122](https://github.com/sveltejs/kit/pull/11122)) + ## 2.0.8 ### Patch Changes diff --git a/packages/adapter-netlify/README.md b/packages/adapter-netlify/README.md index a5ae3a601d8e..339311ffb2df 100644 --- a/packages/adapter-netlify/README.md +++ b/packages/adapter-netlify/README.md @@ -4,8 +4,8 @@ A SvelteKit adapter that creates a Netlify app. ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-netlify) +[Docs](https://svelte.dev/docs/kit/adapter-netlify) ## Changelog -[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/master/packages/adapter-netlify/CHANGELOG.md). +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-netlify/CHANGELOG.md). diff --git a/packages/adapter-netlify/index.d.ts b/packages/adapter-netlify/index.d.ts index aef282740b2f..6bdc8db882dc 100644 --- a/packages/adapter-netlify/index.d.ts +++ b/packages/adapter-netlify/index.d.ts @@ -1,4 +1,3 @@ import { Adapter } from '@sveltejs/kit'; -import './ambient.js'; export default function plugin(opts?: { split?: boolean; edge?: boolean }): Adapter; diff --git a/packages/adapter-netlify/index.js b/packages/adapter-netlify/index.js index 3307a730935e..348ebdea52b7 100644 --- a/packages/adapter-netlify/index.js +++ b/packages/adapter-netlify/index.js @@ -1,6 +1,8 @@ import { appendFileSync, existsSync, readdirSync, readFileSync, writeFileSync } from 'node:fs'; import { dirname, join, resolve, posix } from 'node:path'; import { fileURLToPath } from 'node:url'; +import { builtinModules } from 'node:module'; +import process from 'node:process'; import esbuild from 'esbuild'; import toml from '@iarna/toml'; @@ -12,21 +14,26 @@ import toml from '@iarna/toml'; */ /** + * TODO(serhalp) Replace this custom type with an import from `@netlify/edge-functions`, + * once that type is fixed to include `excludedPath` and `function`. * @typedef {{ * functions: Array< * | { * function: string; * path: string; + * excludedPath?: string | string[]; * } * | { * function: string; * pattern: string; + * excludedPattern?: string | string[]; * } * >; * version: 1; * }} HandlerManifest */ +const name = '@sveltejs/adapter-netlify'; const files = fileURLToPath(new URL('./files', import.meta.url).href); const edge_set_in_env_var = @@ -35,10 +42,10 @@ const edge_set_in_env_var = const FUNCTION_PREFIX = 'sveltekit-'; -/** @type {import('.').default} */ +/** @type {import('./index.js').default} */ export default function ({ split = false, edge = edge_set_in_env_var } = {}) { return { - name: '@sveltejs/adapter-netlify', + name, async adapt(builder) { if (!builder.routes) { @@ -48,6 +55,18 @@ export default function ({ split = false, edge = edge_set_in_env_var } = {}) { ); } + if (existsSync(`${builder.config.kit.files.assets}/_headers`)) { + throw new Error( + `The _headers file should be placed in the project root rather than the ${builder.config.kit.files.assets} directory` + ); + } + + if (existsSync(`${builder.config.kit.files.assets}/_redirects`)) { + throw new Error( + `The _redirects file should be placed in the project root rather than the ${builder.config.kit.files.assets} directory` + ); + } + const netlify_config = get_netlify_config(); // "build" is the default publish directory when Netlify detects SvelteKit @@ -90,7 +109,20 @@ export default function ({ split = false, edge = edge_set_in_env_var } = {}) { await generate_edge_functions({ builder }); } else { - await generate_lambda_functions({ builder, split, publish }); + generate_lambda_functions({ builder, split, publish }); + } + }, + + supports: { + // reading from the filesystem only works in serverless functions + read: ({ route }) => { + if (edge) { + throw new Error( + `${name}: Cannot use \`read\` from \`$app/server\` in route \`${route.id}\` when using edge functions` + ); + } + + return true; } } }; @@ -106,23 +138,6 @@ async function generate_edge_functions({ builder }) { builder.mkdirp('.netlify/edge-functions'); - // Don't match the static directory - const pattern = '^/.*$'; - - // Go doesn't support lookarounds, so we can't do this - // const pattern = appDir ? `^/(?!${escapeStringRegexp(appDir)}).*$` : '^/.*$'; - - /** @type {HandlerManifest} */ - const edge_manifest = { - functions: [ - { - function: 'render', - pattern - } - ], - version: 1 - }; - builder.log.minor('Generating Edge Function...'); const relativePath = posix.relative(tmp, builder.getServerDirectory()); @@ -137,12 +152,44 @@ async function generate_edge_functions({ builder }) { relativePath }); - writeFileSync( - `${tmp}/manifest.js`, - `export const manifest = ${manifest};\n\nexport const prerendered = new Set(${JSON.stringify( - builder.prerendered.paths - )});\n` - ); + writeFileSync(`${tmp}/manifest.js`, `export const manifest = ${manifest};\n`); + + /** @type {{ assets: Set<string> }} */ + // we have to prepend the file:// protocol because Windows doesn't support absolute path imports + const { assets } = (await import(`file://${tmp}/manifest.js`)).manifest; + + const path = '/*'; + // We only need to specify paths without the trailing slash because + // Netlify will handle the optional trailing slash for us + const excludedPath = [ + // Contains static files + `/${builder.getAppPath()}/*`, + ...builder.prerendered.paths, + ...Array.from(assets).flatMap((asset) => { + if (asset.endsWith('/index.html')) { + const dir = asset.replace(/\/index\.html$/, ''); + return [ + `${builder.config.kit.paths.base}/${asset}`, + `${builder.config.kit.paths.base}/${dir}` + ]; + } + return `${builder.config.kit.paths.base}/${asset}`; + }), + // Should not be served by SvelteKit at all + '/.netlify/*' + ]; + + /** @type {HandlerManifest} */ + const edge_manifest = { + functions: [ + { + function: 'render', + path, + excludedPath + } + ], + version: 1 + }; await esbuild.build({ entryPoints: [`${tmp}/entry.js`], @@ -151,7 +198,19 @@ async function generate_edge_functions({ builder }) { format: 'esm', platform: 'browser', sourcemap: 'linked', - target: 'es2020' + target: 'es2020', + loader: { + '.wasm': 'copy', + '.woff': 'copy', + '.woff2': 'copy', + '.ttf': 'copy', + '.eot': 'copy', + '.otf': 'copy' + }, + // Node built-ins are allowed, but must be prefixed with `node:` + // https://docs.netlify.com/edge-functions/api/#runtime-environment + external: builtinModules.map((id) => `node:${id}`), + alias: Object.fromEntries(builtinModules.map((id) => [id, `node:${id}`])) }); writeFileSync('.netlify/edge-functions/manifest.json', JSON.stringify(edge_manifest)); @@ -162,7 +221,7 @@ async function generate_edge_functions({ builder }) { * @param { string } params.publish * @param { boolean } params.split */ -async function generate_lambda_functions({ builder, publish, split }) { +function generate_lambda_functions({ builder, publish, split }) { builder.mkdirp('.netlify/functions-internal/.svelte-kit'); /** @type {string[]} */ @@ -251,12 +310,12 @@ async function generate_lambda_functions({ builder, publish, split }) { // so that generated redirects are appended to custom redirects // rather than replaced by them builder.log.minor('Writing redirects...'); - const redirect_file = join(publish, '_redirects'); + const redirects_file = join(publish, '_redirects'); if (existsSync('_redirects')) { - builder.copy('_redirects', redirect_file); + builder.copy('_redirects', redirects_file); } - builder.mkdirp(dirname(redirect_file)); - appendFileSync(redirect_file, `\n\n${redirects.join('\n')}`); + builder.mkdirp(dirname(redirects_file)); + appendFileSync(redirects_file, `\n\n${redirects.join('\n')}`); } function get_netlify_config() { @@ -295,7 +354,7 @@ function get_publish_directory(netlify_config, builder) { } builder.log.warn( - 'No netlify.toml found. Using default publish directory. Consult https://kit.svelte.dev/docs/adapter-netlify#usage for more details' + 'No netlify.toml found. Using default publish directory. Consult https://svelte.dev/docs/kit/adapter-netlify#usage for more details' ); } diff --git a/packages/adapter-netlify/ambient.d.ts b/packages/adapter-netlify/internal.d.ts similarity index 82% rename from packages/adapter-netlify/ambient.d.ts rename to packages/adapter-netlify/internal.d.ts index 450140da9871..55da8ba1fbf5 100644 --- a/packages/adapter-netlify/ambient.d.ts +++ b/packages/adapter-netlify/internal.d.ts @@ -6,5 +6,4 @@ declare module 'MANIFEST' { import { SSRManifest } from '@sveltejs/kit'; export const manifest: SSRManifest; - export const prerendered: Set<string>; } diff --git a/packages/adapter-netlify/package.json b/packages/adapter-netlify/package.json index f690d3c931a8..a08e049cc5ea 100644 --- a/packages/adapter-netlify/package.json +++ b/packages/adapter-netlify/package.json @@ -1,14 +1,22 @@ { "name": "@sveltejs/adapter-netlify", - "version": "2.0.8", + "version": "5.0.2", "description": "A SvelteKit adapter that creates a Netlify app", + "keywords": [ + "adapter", + "deploy", + "hosting", + "netlify", + "svelte", + "sveltekit" + ], "repository": { "type": "git", "url": "https://github.com/sveltejs/kit", "directory": "packages/adapter-netlify" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { @@ -25,31 +33,32 @@ ], "scripts": { "dev": "node -e \"fs.rmSync('files', { force: true, recursive: true })\" && rollup -cw", - "build": "node -e \"fs.rmSync('files', { force: true, recursive: true })\" && rollup -c && cp src/edge.js files/edge.js", + "build": "node -e \"fs.rmSync('files', { force: true, recursive: true })\" && rollup -c && node -e \"fs.cpSync('src/edge.js', 'files/edge.js')\"", "test": "vitest run", "check": "tsc", - "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore", + "lint": "prettier --check .", "format": "pnpm lint --write", "prepublishOnly": "pnpm build" }, "dependencies": { "@iarna/toml": "^2.2.5", - "esbuild": "^0.18.11", + "esbuild": "^0.25.4", "set-cookie-parser": "^2.6.0" }, "devDependencies": { - "@netlify/functions": "^2.0.1", - "@rollup/plugin-commonjs": "^25.0.0", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-node-resolve": "^15.0.1", + "@netlify/functions": "^4.0.0", + "@rollup/plugin-commonjs": "^28.0.1", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^16.0.0", "@sveltejs/kit": "workspace:^", - "@types/node": "^16.18.6", - "@types/set-cookie-parser": "^2.4.2", - "rollup": "^3.7.0", - "typescript": "^4.9.4", - "vitest": "^0.34.5" + "@sveltejs/vite-plugin-svelte": "catalog:", + "@types/node": "^18.19.48", + "@types/set-cookie-parser": "^2.4.7", + "rollup": "^4.14.2", + "typescript": "^5.3.3", + "vitest": "catalog:" }, "peerDependencies": { - "@sveltejs/kit": "^1.5.0" + "@sveltejs/kit": "^2.4.0" } } diff --git a/packages/adapter-netlify/rollup.config.js b/packages/adapter-netlify/rollup.config.js index 7eca711c728c..b69d62886502 100644 --- a/packages/adapter-netlify/rollup.config.js +++ b/packages/adapter-netlify/rollup.config.js @@ -12,6 +12,7 @@ const config = { dir: 'files/esm', format: 'esm' }, + // @ts-ignore https://github.com/rollup/plugins/issues/1329 plugins: [nodeResolve({ preferBuiltins: true }), commonjs(), json()], external: (id) => id === '0SERVER' || id.startsWith('node:'), preserveEntrySignatures: 'exports-only' diff --git a/packages/adapter-netlify/src/edge.js b/packages/adapter-netlify/src/edge.js index 819c6047e825..f6aeb2b25655 100644 --- a/packages/adapter-netlify/src/edge.js +++ b/packages/adapter-netlify/src/edge.js @@ -1,8 +1,7 @@ import { Server } from '0SERVER'; -import { manifest, prerendered } from 'MANIFEST'; +import { manifest } from 'MANIFEST'; const server = new Server(manifest); -const prefix = `/${manifest.appPath}/`; const initialized = server.init({ // @ts-ignore @@ -15,12 +14,6 @@ const initialized = server.init({ * @returns { Promise<Response> } */ export default async function handler(request, context) { - if (is_static_file(request)) { - // Static files can skip the handler - // TODO can we serve _app/immutable files with an immutable cache header? - return; - } - await initialized; return server.respond(request, { platform: { context }, @@ -29,31 +22,3 @@ export default async function handler(request, context) { } }); } - -/** - * @param {Request} request - */ -function is_static_file(request) { - const url = new URL(request.url); - - // Assets in the app dir - if (url.pathname.startsWith(prefix)) { - return true; - } - - // prerendered pages and index.html files - const pathname = url.pathname.replace(/\/$/, ''); - let file = pathname.substring(1); - - try { - file = decodeURIComponent(file); - } catch (err) { - // ignore - } - - return ( - manifest.assets.has(file) || - manifest.assets.has(file + '/index.html') || - prerendered.has(pathname || '/') - ); -} diff --git a/packages/adapter-netlify/src/serverless.js b/packages/adapter-netlify/src/serverless.js index f898796b8902..486e4f8c3c6d 100644 --- a/packages/adapter-netlify/src/serverless.js +++ b/packages/adapter-netlify/src/serverless.js @@ -1,6 +1,8 @@ import './shims'; import { Server } from '0SERVER'; -import { split_headers } from './headers'; +import { split_headers } from './headers.js'; +import { createReadableStream } from '@sveltejs/kit/node'; +import process from 'node:process'; /** * @param {import('@sveltejs/kit').SSRManifest} manifest @@ -10,7 +12,8 @@ export function init(manifest) { const server = new Server(manifest); let init_promise = server.init({ - env: process.env + env: process.env, + read: (file) => createReadableStream(`.netlify/server/${file}`) }); return async (event, context) => { diff --git a/packages/adapter-netlify/tsconfig.json b/packages/adapter-netlify/tsconfig.json index 0a6b886c8407..f491fb068241 100644 --- a/packages/adapter-netlify/tsconfig.json +++ b/packages/adapter-netlify/tsconfig.json @@ -4,14 +4,17 @@ "checkJs": true, "noEmit": true, "noImplicitAny": true, - "module": "es2022", "target": "es2022", - "moduleResolution": "node", + "module": "node16", + "moduleResolution": "node16", + // Some `@netlify/functions` types we don't use cause a type error + // see https://github.com/netlify/primitives/issues/302 + "skipLibCheck": true, "allowSyntheticDefaultImports": true, "baseUrl": ".", "paths": { "@sveltejs/kit": ["../kit/types/index"] } }, - "include": ["*.js", "src/**/*.js", "ambient.d.ts"] + "include": ["*.js", "src/**/*.js", "internal.d.ts"] } diff --git a/packages/adapter-node/CHANGELOG.md b/packages/adapter-node/CHANGELOG.md index 086a4c0cabb9..801c1d19a294 100644 --- a/packages/adapter-node/CHANGELOG.md +++ b/packages/adapter-node/CHANGELOG.md @@ -1,5 +1,269 @@ # @sveltejs/adapter-node +## 5.2.12 +### Patch Changes + + +- fix: include ambient type declarations ([#12088](https://github.com/sveltejs/kit/pull/12088)) + +- Updated dependencies [[`d440c68acac67ed64eea4b9bda267e229303db7b`](https://github.com/sveltejs/kit/commit/d440c68acac67ed64eea4b9bda267e229303db7b), [`6774ebc34330b12ae8c0cae08e98b577d819fffb`](https://github.com/sveltejs/kit/commit/6774ebc34330b12ae8c0cae08e98b577d819fffb), [`777c8ef11f17d2ab48aee0f2347c051663da5826`](https://github.com/sveltejs/kit/commit/777c8ef11f17d2ab48aee0f2347c051663da5826), [`f451f6c4a3dbbc73dc86667c6ff89ab2f46ca9d2`](https://github.com/sveltejs/kit/commit/f451f6c4a3dbbc73dc86667c6ff89ab2f46ca9d2), [`34a03ff16af29e917abebb649b31eadfc40a98a0`](https://github.com/sveltejs/kit/commit/34a03ff16af29e917abebb649b31eadfc40a98a0), [`1c77e283896058084c1cb5752d9ec207987a585e`](https://github.com/sveltejs/kit/commit/1c77e283896058084c1cb5752d9ec207987a585e), [`04958cca5905aaeeff367c9e4a5ce6e90fc64779`](https://github.com/sveltejs/kit/commit/04958cca5905aaeeff367c9e4a5ce6e90fc64779), [`9dc5c0e3e01a3c07010e9996688169be68e1dde8`](https://github.com/sveltejs/kit/commit/9dc5c0e3e01a3c07010e9996688169be68e1dde8), [`00e1a7621de554054d068e4525a9e505d1c2e588`](https://github.com/sveltejs/kit/commit/00e1a7621de554054d068e4525a9e505d1c2e588), [`9fcd1e7574197fa6e7ac000a030378d877cb8837`](https://github.com/sveltejs/kit/commit/9fcd1e7574197fa6e7ac000a030378d877cb8837), [`e541a4057a00f5ab6740fb51b7f88f17776da50a`](https://github.com/sveltejs/kit/commit/e541a4057a00f5ab6740fb51b7f88f17776da50a), [`37f72fbb075b481de8263f62c77125333735f382`](https://github.com/sveltejs/kit/commit/37f72fbb075b481de8263f62c77125333735f382), [`b60707ca8e755be95c86490122aa1b792b9bd6be`](https://github.com/sveltejs/kit/commit/b60707ca8e755be95c86490122aa1b792b9bd6be), [`699f4405c752261cf46c1ad32e4dbadceaffc75b`](https://github.com/sveltejs/kit/commit/699f4405c752261cf46c1ad32e4dbadceaffc75b), [`e2a4538c48295cde06f64fb8c7f0b333fbf95496`](https://github.com/sveltejs/kit/commit/e2a4538c48295cde06f64fb8c7f0b333fbf95496), [`a91ba1f326b6e244503de9a010771d942b461dad`](https://github.com/sveltejs/kit/commit/a91ba1f326b6e244503de9a010771d942b461dad)]: + - @sveltejs/kit@2.16.0 + +## 5.2.11 +### Patch Changes + + +- chore(deps): update dependency @rollup/plugin-node-resolve to v16 ([#13164](https://github.com/sveltejs/kit/pull/13164)) + +- Updated dependencies [[`19823dd716568140011eaa86110bb8868f0e2513`](https://github.com/sveltejs/kit/commit/19823dd716568140011eaa86110bb8868f0e2513), [`5d30191d13a596bda50e27e54522c10f3f6461e3`](https://github.com/sveltejs/kit/commit/5d30191d13a596bda50e27e54522c10f3f6461e3)]: + - @sveltejs/kit@2.12.2 + +## 5.2.10 +### Patch Changes + + +- chore: append http on listening address ([#13146](https://github.com/sveltejs/kit/pull/13146)) + +- Updated dependencies [[`11a9f66922199ee5925cc71c0efc513376753754`](https://github.com/sveltejs/kit/commit/11a9f66922199ee5925cc71c0efc513376753754), [`3d9e03a8a55a539b02c76d44df4874e4642bbd17`](https://github.com/sveltejs/kit/commit/3d9e03a8a55a539b02c76d44df4874e4642bbd17)]: + - @sveltejs/kit@2.11.0 + +## 5.2.9 +### Patch Changes + + +- docs: update URLs for new svelte.dev site ([#12857](https://github.com/sveltejs/kit/pull/12857)) + +- Updated dependencies [[`dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46`](https://github.com/sveltejs/kit/commit/dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46), [`4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d`](https://github.com/sveltejs/kit/commit/4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d), [`3a9b78f04786898ca93f6d4b75ab18d26bc45192`](https://github.com/sveltejs/kit/commit/3a9b78f04786898ca93f6d4b75ab18d26bc45192), [`723eb8b31e6a22c82f730c30e485386c8676b746`](https://github.com/sveltejs/kit/commit/723eb8b31e6a22c82f730c30e485386c8676b746), [`8ec471c875345b751344e67580ff1b772ef2735b`](https://github.com/sveltejs/kit/commit/8ec471c875345b751344e67580ff1b772ef2735b)]: + - @sveltejs/kit@2.7.3 + +## 5.2.8 +### Patch Changes + + +- chore: upgrade @rollup/plugin-commonjs to 28.0.1 ([#12817](https://github.com/sveltejs/kit/pull/12817)) + +## 5.2.7 +### Patch Changes + + +- chore: upgrade to sirv 3.0 ([#12796](https://github.com/sveltejs/kit/pull/12796)) + +- Updated dependencies [[`dbc9c9486f962af7dbd9123d12d8a6829700d00f`](https://github.com/sveltejs/kit/commit/dbc9c9486f962af7dbd9123d12d8a6829700d00f), [`96642d234d1f5e961e919da725a1f6188e8aba2c`](https://github.com/sveltejs/kit/commit/96642d234d1f5e961e919da725a1f6188e8aba2c)]: + - @sveltejs/kit@2.7.1 + +## 5.2.6 +### Patch Changes + + +- fix: use `node:` imports to support Deno ([#12785](https://github.com/sveltejs/kit/pull/12785)) + +## 5.2.5 +### Patch Changes + + +- chore: upgrade rollup plugins ([#12706](https://github.com/sveltejs/kit/pull/12706)) + +- Updated dependencies [[`a233f53f28fcb4c3ea63d2faf156fba09a18456c`](https://github.com/sveltejs/kit/commit/a233f53f28fcb4c3ea63d2faf156fba09a18456c), [`5b40b04608023a3fcb6c601a5f2d36485ce07196`](https://github.com/sveltejs/kit/commit/5b40b04608023a3fcb6c601a5f2d36485ce07196)]: + - @sveltejs/kit@2.6.0 + +## 5.2.4 +### Patch Changes + + +- chore: upgrade polka to 1.0.0-next.28 ([#12693](https://github.com/sveltejs/kit/pull/12693)) + +## 5.2.3 +### Patch Changes + + +- fix: import `node:process` instead of using globals ([#12641](https://github.com/sveltejs/kit/pull/12641)) + +- Updated dependencies [[`e798ef718f163bed4f93e1918bd8294f765376ad`](https://github.com/sveltejs/kit/commit/e798ef718f163bed4f93e1918bd8294f765376ad)]: + - @sveltejs/kit@2.5.28 + +## 5.2.2 +### Patch Changes + + +- chore: configure provenance in a simpler manner ([#12570](https://github.com/sveltejs/kit/pull/12570)) + +- Updated dependencies [[`087a43d391fc38b8c008fb39a804dc6988974101`](https://github.com/sveltejs/kit/commit/087a43d391fc38b8c008fb39a804dc6988974101)]: + - @sveltejs/kit@2.5.22 + +## 5.2.1 +### Patch Changes + + +- chore: package provenance ([#12567](https://github.com/sveltejs/kit/pull/12567)) + +- Updated dependencies [[`4930a8443caa53bcecee7b690cd28e429b1c8a20`](https://github.com/sveltejs/kit/commit/4930a8443caa53bcecee7b690cd28e429b1c8a20)]: + - @sveltejs/kit@2.5.21 + +## 5.2.0 + +### Minor Changes + +- feat: add unit suffixes to the `BODY_SIZE_LIMIT` environment variable ([#11680](https://github.com/sveltejs/kit/pull/11680)) + +### Patch Changes + +- Updated dependencies [[`121836fcbf6c615fd18c79a12203613ddbe49acf`](https://github.com/sveltejs/kit/commit/121836fcbf6c615fd18c79a12203613ddbe49acf)]: + - @sveltejs/kit@2.5.17 + +## 5.1.1 + +### Patch Changes + +- fix: do not create more than one shutdown timeout ([#12359](https://github.com/sveltejs/kit/pull/12359)) + +- Updated dependencies [[`835ebf6ce9979203992cca30f434b3785afae818`](https://github.com/sveltejs/kit/commit/835ebf6ce9979203992cca30f434b3785afae818)]: + - @sveltejs/kit@2.5.16 + +## 5.1.0 + +### Minor Changes + +- feat: add shutdown event ([#12153](https://github.com/sveltejs/kit/pull/12153)) + +### Patch Changes + +- fix: close keep-alive connections as soon as possible during graceful shutdown rather than accepting new requests ([#12153](https://github.com/sveltejs/kit/pull/12153)) + +## 5.0.2 + +### Patch Changes + +- chore: update to @rollup/plugin-commonjs@26 ([#12326](https://github.com/sveltejs/kit/pull/12326)) + +- chore(deps): update dependency @rollup/plugin-commonjs to v26 ([`9aa59db67080248eb22fd227e7a491102b011c47`](https://github.com/sveltejs/kit/commit/9aa59db67080248eb22fd227e7a491102b011c47)) + +- chore: add keywords for discovery in npm search ([#12330](https://github.com/sveltejs/kit/pull/12330)) + +- Updated dependencies [[`25acb1d9fce998dccd8050b93cf4142c2b082611`](https://github.com/sveltejs/kit/commit/25acb1d9fce998dccd8050b93cf4142c2b082611), [`642c4a4aff4351b786fe6274aa2f0bf7d905faf9`](https://github.com/sveltejs/kit/commit/642c4a4aff4351b786fe6274aa2f0bf7d905faf9), [`0a0e9aa897123ebec50af08e9385b2ca4fc5bb28`](https://github.com/sveltejs/kit/commit/0a0e9aa897123ebec50af08e9385b2ca4fc5bb28)]: + - @sveltejs/kit@2.5.11 + +## 5.0.1 + +### Patch Changes + +- fix: regression preventing built application from starting ([#11960](https://github.com/sveltejs/kit/pull/11960)) + +## 5.0.0 + +### Major Changes + +- breaking: add graceful shutdown ([#11653](https://github.com/sveltejs/kit/pull/11653)) + +- breaking: change default value of `precompress` option to true to serve precompressed assets by default ([#11945](https://github.com/sveltejs/kit/pull/11945)) + +### Minor Changes + +- feat: add systemd socket activation ([#11653](https://github.com/sveltejs/kit/pull/11653)) + +### Patch Changes + +- Updated dependencies [[`873a09eac86817d1cbb53bf3f9c8842d7346d20d`](https://github.com/sveltejs/kit/commit/873a09eac86817d1cbb53bf3f9c8842d7346d20d), [`30c78f223a4f9e6c4547d087338a8b8cc477ba55`](https://github.com/sveltejs/kit/commit/30c78f223a4f9e6c4547d087338a8b8cc477ba55)]: + - @sveltejs/kit@2.5.3 + +## 4.0.1 + +### Patch Changes + +- fix: return 400 response if request construction fails ([#11713](https://github.com/sveltejs/kit/pull/11713)) + +- Updated dependencies [[`f56781fa47a0f958b228e4a51bb3cbf173854f12`](https://github.com/sveltejs/kit/commit/f56781fa47a0f958b228e4a51bb3cbf173854f12)]: + - @sveltejs/kit@2.4.3 + +## 4.0.0 + +### Major Changes + +- breaking: update peer dependency on `@sveltejs/kit` ([#11649](https://github.com/sveltejs/kit/pull/11649)) + +### Minor Changes + +- feat: support `read` from `$app/server` ([#11649](https://github.com/sveltejs/kit/pull/11649)) + +### Patch Changes + +- Updated dependencies [[`288f731c8a5b20cadb9e219f9583f3f16bf8c7b8`](https://github.com/sveltejs/kit/commit/288f731c8a5b20cadb9e219f9583f3f16bf8c7b8)]: + - @sveltejs/kit@2.4.0 + +## 3.0.3 + +### Patch Changes + +- fix: return 400 response if request construction fails + +## 3.0.2 + +### Patch Changes + +- fix: return 400 response if request construction fails + +## 3.0.1 + +### Patch Changes + +- chore: upgrade rollup to 4.9.5 ([#11632](https://github.com/sveltejs/kit/pull/11632)) + +## 3.0.0 + +### Major Changes + +- breaking: allow any numeric value for `BODY_SIZE_LIMIT`, and interpret literally. Use `Infinity` rather than `0` for unrestricted body sizes ([#11589](https://github.com/sveltejs/kit/pull/11589)) + +## 2.1.2 + +### Patch Changes + +- fix: return 400 response if request construction fails + +## 2.1.1 + +### Patch Changes + +- fix: correctly handle BODY_SIZE_LIMIT=0 ([#11574](https://github.com/sveltejs/kit/pull/11574)) + +## 2.1.0 + +### Minor Changes + +- feat: add `PORT_HEADER` env var for reverse proxies with non-standard ports ([#11249](https://github.com/sveltejs/kit/pull/11249)) + +### Patch Changes + +- Updated dependencies [[`9556abae4ba28c02ba468735beb9eb868876a9a1`](https://github.com/sveltejs/kit/commit/9556abae4ba28c02ba468735beb9eb868876a9a1), [`8468af597c6240f7a3687ef1ed3873990b944f8c`](https://github.com/sveltejs/kit/commit/8468af597c6240f7a3687ef1ed3873990b944f8c)]: + - @sveltejs/kit@2.1.1 + +## 2.0.2 + +### Patch Changes + +- fix: upgrade `sirv` and `mrmime` to modernize javascript mime type ([#11419](https://github.com/sveltejs/kit/pull/11419)) + +- Updated dependencies [[`b999cfdea24e72043505e032ed9d621590896263`](https://github.com/sveltejs/kit/commit/b999cfdea24e72043505e032ed9d621590896263), [`2a091dcbbdf7d2a70a38316638e16761bd1b9b59`](https://github.com/sveltejs/kit/commit/2a091dcbbdf7d2a70a38316638e16761bd1b9b59)]: + - @sveltejs/kit@2.0.5 + +## 2.0.1 + +### Patch Changes + +- chore: update primary branch from master to main ([`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d)) + +- Updated dependencies [[`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d), [`16961e8cd3fa6a7f382153b1ff056bc2aae9b31b`](https://github.com/sveltejs/kit/commit/16961e8cd3fa6a7f382153b1ff056bc2aae9b31b), [`197e01f95652f511160f38b37b9da73a124ecd48`](https://github.com/sveltejs/kit/commit/197e01f95652f511160f38b37b9da73a124ecd48), [`102e4a5ae5b29624302163faf5a20c94a64a5b2c`](https://github.com/sveltejs/kit/commit/102e4a5ae5b29624302163faf5a20c94a64a5b2c), [`f8e3d8b9728c9f1ab63389342c31d7246b6f9db6`](https://github.com/sveltejs/kit/commit/f8e3d8b9728c9f1ab63389342c31d7246b6f9db6)]: + - @sveltejs/kit@2.0.4 + +## 2.0.0 + +### Major Changes + +- breaking: require SvelteKit 2 peer dependency ([#11289](https://github.com/sveltejs/kit/pull/11289)) + +- breaking: remove polyfill option. fetch APIs will now always come from the platform being used. File and crypto APIs will be polyfilled if not available ([#11172](https://github.com/sveltejs/kit/pull/11172)) + +- chore: upgrade rollup ([#11122](https://github.com/sveltejs/kit/pull/11122)) + ## 1.3.1 ### Patch Changes diff --git a/packages/adapter-node/README.md b/packages/adapter-node/README.md index 804a6ee9504d..22e355fee5ed 100644 --- a/packages/adapter-node/README.md +++ b/packages/adapter-node/README.md @@ -1,14 +1,14 @@ # @sveltejs/adapter-node -[Adapter](https://kit.svelte.dev/docs/adapters) for SvelteKit apps that generates a standalone Node server. +[Adapter](https://svelte.dev/docs/kit/adapters) for SvelteKit apps that generates a standalone Node server. ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-node) +[Docs](https://svelte.dev/docs/kit/adapter-node) ## Changelog -[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/master/packages/adapter-node/CHANGELOG.md). +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-node/CHANGELOG.md). ## License diff --git a/packages/adapter-node/ambient.d.ts b/packages/adapter-node/ambient.d.ts index 7d45ea6dc64a..7fbdd5adb583 100644 --- a/packages/adapter-node/ambient.d.ts +++ b/packages/adapter-node/ambient.d.ts @@ -1,27 +1,12 @@ -declare module 'ENV' { - export function env(key: string, fallback?: any): string; -} - -declare module 'HANDLER' { - export const handler: import('polka').Middleware; -} - -declare module 'MANIFEST' { - import { SSRManifest } from '@sveltejs/kit'; - - export const manifest: SSRManifest; - export const prerendered: Set<string>; -} - -declare module 'SERVER' { - export { Server } from '@sveltejs/kit'; -} - -declare namespace App { - export interface Platform { - /** - * The original Node request object (https://nodejs.org/api/http.html#class-httpincomingmessage) - */ - req: import('http').IncomingMessage; +import http from 'node:http'; + +declare global { + namespace App { + export interface Platform { + /** + * The original Node request object (https://nodejs.org/api/http.html#class-httpincomingmessage) + */ + req: http.IncomingMessage; + } } } diff --git a/packages/adapter-node/index.d.ts b/packages/adapter-node/index.d.ts index 12ea6273dd66..d32510e25186 100644 --- a/packages/adapter-node/index.d.ts +++ b/packages/adapter-node/index.d.ts @@ -9,7 +9,6 @@ interface AdapterOptions { out?: string; precompress?: boolean; envPrefix?: string; - polyfill?: boolean; } export default function plugin(options?: AdapterOptions): Adapter; diff --git a/packages/adapter-node/index.js b/packages/adapter-node/index.js index 8d5c1629a4cf..9b0b3158ab82 100644 --- a/packages/adapter-node/index.js +++ b/packages/adapter-node/index.js @@ -7,9 +7,9 @@ import json from '@rollup/plugin-json'; const files = fileURLToPath(new URL('./files', import.meta.url).href); -/** @type {import('.').default} */ +/** @type {import('./index.js').default} */ export default function (opts = {}) { - const { out = 'build', precompress, envPrefix = '', polyfill = true } = opts; + const { out = 'build', precompress = true, envPrefix = '' } = opts; return { name: '@sveltejs/adapter-node', @@ -39,8 +39,11 @@ export default function (opts = {}) { writeFileSync( `${tmp}/manifest.js`, - `export const manifest = ${builder.generateManifest({ relativePath: './' })};\n\n` + - `export const prerendered = new Set(${JSON.stringify(builder.prerendered.paths)});\n` + [ + `export const manifest = ${builder.generateManifest({ relativePath: './' })};`, + `export const prerendered = new Set(${JSON.stringify(builder.prerendered.paths)});`, + `export const base = ${JSON.stringify(builder.config.kit.paths.base)};` + ].join('\n\n') ); const pkg = JSON.parse(readFileSync('package.json', 'utf8')); @@ -62,7 +65,9 @@ export default function (opts = {}) { preferBuiltins: true, exportConditions: ['node'] }), + // @ts-ignore https://github.com/rollup/plugins/issues/1329 commonjs({ strictRequires: true }), + // @ts-ignore https://github.com/rollup/plugins/issues/1329 json() ] }); @@ -84,11 +89,10 @@ export default function (opts = {}) { ENV_PREFIX: JSON.stringify(envPrefix) } }); + }, - // If polyfills aren't wanted then clear the file - if (!polyfill) { - writeFileSync(`${out}/shims.js`, '', 'utf-8'); - } + supports: { + read: () => true } }; } diff --git a/packages/adapter-node/internal.d.ts b/packages/adapter-node/internal.d.ts new file mode 100644 index 000000000000..fed0584d1851 --- /dev/null +++ b/packages/adapter-node/internal.d.ts @@ -0,0 +1,19 @@ +declare module 'ENV' { + export function env(key: string, fallback?: any): string; +} + +declare module 'HANDLER' { + export const handler: import('polka').Middleware; +} + +declare module 'MANIFEST' { + import { SSRManifest } from '@sveltejs/kit'; + + export const base: string; + export const manifest: SSRManifest; + export const prerendered: Set<string>; +} + +declare module 'SERVER' { + export { Server } from '@sveltejs/kit'; +} diff --git a/packages/adapter-node/package.json b/packages/adapter-node/package.json index 6b13c7272a30..58e92ccc2852 100644 --- a/packages/adapter-node/package.json +++ b/packages/adapter-node/package.json @@ -1,14 +1,22 @@ { "name": "@sveltejs/adapter-node", - "version": "1.3.1", + "version": "5.2.12", "description": "Adapter for SvelteKit apps that generates a standalone Node server", + "keywords": [ + "adapter", + "deploy", + "hosting", + "node.js", + "svelte", + "sveltekit" + ], "repository": { "type": "git", "url": "https://github.com/sveltejs/kit", "directory": "packages/adapter-node" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { @@ -21,34 +29,35 @@ "files": [ "files", "index.js", - "index.d.ts" + "index.d.ts", + "ambient.d.ts" ], "scripts": { "dev": "node -e \"fs.rmSync('files', { force: true, recursive: true })\" && rollup -cw", "build": "node -e \"fs.rmSync('files', { force: true, recursive: true })\" && rollup -c", - "test": "echo \"tests temporarily disabled\" # c8 vitest run", + "test": "vitest run", "check": "tsc", - "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore", + "lint": "prettier --check .", "format": "pnpm lint --write", "prepublishOnly": "pnpm build" }, "devDependencies": { - "@polka/url": "^1.0.0-next.21", + "@polka/url": "^1.0.0-next.28", "@sveltejs/kit": "workspace:^", - "@types/node": "^16.18.6", - "c8": "^8.0.0", - "polka": "^1.0.0-next.22", - "sirv": "^2.0.3", - "typescript": "^4.9.4", - "vitest": "^0.34.5" + "@sveltejs/vite-plugin-svelte": "catalog:", + "@types/node": "^18.19.48", + "polka": "^1.0.0-next.28", + "sirv": "^3.0.0", + "typescript": "^5.3.3", + "vitest": "catalog:" }, "dependencies": { - "@rollup/plugin-commonjs": "^25.0.0", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-node-resolve": "^15.0.1", - "rollup": "^3.7.0" + "@rollup/plugin-commonjs": "^28.0.1", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^16.0.0", + "rollup": "^4.9.5" }, "peerDependencies": { - "@sveltejs/kit": "^1.0.0" + "@sveltejs/kit": "^2.4.0" } } diff --git a/packages/adapter-node/rollup.config.js b/packages/adapter-node/rollup.config.js index 16c4a20c37a7..fb9d113b5965 100644 --- a/packages/adapter-node/rollup.config.js +++ b/packages/adapter-node/rollup.config.js @@ -3,6 +3,16 @@ import commonjs from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; import { builtinModules } from 'node:module'; +function prefixBuiltinModules() { + return { + resolveId(source) { + if (builtinModules.includes(source)) { + return { id: 'node:' + source, external: true }; + } + } + }; +} + export default [ { input: 'src/index.js', @@ -10,8 +20,8 @@ export default [ file: 'files/index.js', format: 'esm' }, - plugins: [nodeResolve({ preferBuiltins: true }), commonjs(), json()], - external: ['ENV', 'HANDLER', ...builtinModules] + plugins: [nodeResolve({ preferBuiltins: true }), commonjs(), json(), prefixBuiltinModules()], + external: ['ENV', 'HANDLER'] }, { input: 'src/env.js', @@ -19,8 +29,8 @@ export default [ file: 'files/env.js', format: 'esm' }, - plugins: [nodeResolve(), commonjs(), json()], - external: ['HANDLER', ...builtinModules] + plugins: [nodeResolve(), commonjs(), json(), prefixBuiltinModules()], + external: ['HANDLER'] }, { input: 'src/handler.js', @@ -29,8 +39,8 @@ export default [ format: 'esm', inlineDynamicImports: true }, - plugins: [nodeResolve(), commonjs(), json()], - external: ['ENV', 'MANIFEST', 'SERVER', 'SHIMS', ...builtinModules] + plugins: [nodeResolve(), commonjs(), json(), prefixBuiltinModules()], + external: ['ENV', 'MANIFEST', 'SERVER', 'SHIMS'] }, { input: 'src/shims.js', @@ -38,7 +48,6 @@ export default [ file: 'files/shims.js', format: 'esm' }, - plugins: [nodeResolve(), commonjs()], - external: builtinModules + plugins: [nodeResolve(), commonjs(), prefixBuiltinModules()] } ]; diff --git a/packages/adapter-node/src/env.js b/packages/adapter-node/src/env.js index 841bddf2c237..b8e44ee0c7f5 100644 --- a/packages/adapter-node/src/env.js +++ b/packages/adapter-node/src/env.js @@ -1,4 +1,5 @@ /* global ENV_PREFIX */ +import process from 'node:process'; const expected = new Set([ 'SOCKET_PATH', @@ -9,9 +10,14 @@ const expected = new Set([ 'ADDRESS_HEADER', 'PROTOCOL_HEADER', 'HOST_HEADER', - 'BODY_SIZE_LIMIT' + 'PORT_HEADER', + 'BODY_SIZE_LIMIT', + 'SHUTDOWN_TIMEOUT', + 'IDLE_TIMEOUT' ]); +const expected_unprefixed = new Set(['LISTEN_PID', 'LISTEN_FDS']); + if (ENV_PREFIX) { for (const name in process.env) { if (name.startsWith(ENV_PREFIX)) { @@ -30,6 +36,7 @@ if (ENV_PREFIX) { * @param {any} fallback */ export function env(name, fallback) { - const prefixed = ENV_PREFIX + name; + const prefix = expected_unprefixed.has(name) ? '' : ENV_PREFIX; + const prefixed = prefix + name; return prefixed in process.env ? process.env[prefixed] : fallback; } diff --git a/packages/adapter-node/src/handler.js b/packages/adapter-node/src/handler.js index bae1854bdd7e..aec40af5566d 100644 --- a/packages/adapter-node/src/handler.js +++ b/packages/adapter-node/src/handler.js @@ -1,27 +1,44 @@ import 'SHIMS'; import fs from 'node:fs'; import path from 'node:path'; +import process from 'node:process'; import sirv from 'sirv'; import { fileURLToPath } from 'node:url'; import { parse as polka_url_parser } from '@polka/url'; -import { getRequest, setResponse } from '@sveltejs/kit/node'; +import { getRequest, setResponse, createReadableStream } from '@sveltejs/kit/node'; import { Server } from 'SERVER'; -import { manifest, prerendered } from 'MANIFEST'; +import { manifest, prerendered, base } from 'MANIFEST'; import { env } from 'ENV'; +import { parse_as_bytes } from '../utils.js'; /* global ENV_PREFIX */ const server = new Server(manifest); -await server.init({ env: process.env }); + const origin = env('ORIGIN', undefined); const xff_depth = parseInt(env('XFF_DEPTH', '1')); const address_header = env('ADDRESS_HEADER', '').toLowerCase(); const protocol_header = env('PROTOCOL_HEADER', '').toLowerCase(); const host_header = env('HOST_HEADER', 'host').toLowerCase(); -const body_size_limit = parseInt(env('BODY_SIZE_LIMIT', '524288')); +const port_header = env('PORT_HEADER', '').toLowerCase(); + +const body_size_limit = parse_as_bytes(env('BODY_SIZE_LIMIT', '512K')); + +if (isNaN(body_size_limit)) { + throw new Error( + `Invalid BODY_SIZE_LIMIT: '${env('BODY_SIZE_LIMIT')}'. Please provide a numeric value.` + ); +} const dir = path.dirname(fileURLToPath(import.meta.url)); +const asset_dir = `${dir}/client${base}`; + +await server.init({ + env: process.env, + read: (file) => createReadableStream(`${asset_dir}/${file}`) +}); + /** * @param {string} path * @param {boolean} client @@ -69,14 +86,14 @@ function serve_prerendered() { if (query) location += search; res.writeHead(308, { location }).end(); } else { - next(); + void next(); } }; } /** @type {import('polka').Middleware} */ const ssr = async (req, res) => { - /** @type {Request | undefined} */ + /** @type {Request} */ let request; try { @@ -85,13 +102,13 @@ const ssr = async (req, res) => { request: req, bodySizeLimit: body_size_limit }); - } catch (err) { - res.statusCode = err.status || 400; - res.end('Invalid request body'); + } catch { + res.statusCode = 400; + res.end('Bad Request'); return; } - setResponse( + await setResponse( res, await server.respond(request, { platform: { req }, @@ -167,14 +184,14 @@ function sequence(handlers) { function get_origin(headers) { const protocol = (protocol_header && headers[protocol_header]) || 'https'; const host = headers[host_header]; - return `${protocol}://${host}`; + const port = port_header && headers[port_header]; + if (port) { + return `${protocol}://${host}:${port}`; + } else { + return `${protocol}://${host}`; + } } export const handler = sequence( - [ - serve(path.join(dir, 'client'), true), - serve(path.join(dir, 'static')), - serve_prerendered(), - ssr - ].filter(Boolean) + [serve(path.join(dir, 'client'), true), serve_prerendered(), ssr].filter(Boolean) ); diff --git a/packages/adapter-node/src/index.js b/packages/adapter-node/src/index.js index ea3feee05860..ef1ab701a2a3 100644 --- a/packages/adapter-node/src/index.js +++ b/packages/adapter-node/src/index.js @@ -1,3 +1,4 @@ +import process from 'node:process'; import { handler } from 'HANDLER'; import { env } from 'ENV'; import polka from 'polka'; @@ -6,10 +7,99 @@ export const path = env('SOCKET_PATH', false); export const host = env('HOST', '0.0.0.0'); export const port = env('PORT', !path && '3000'); +const shutdown_timeout = parseInt(env('SHUTDOWN_TIMEOUT', '30')); +const idle_timeout = parseInt(env('IDLE_TIMEOUT', '0')); +const listen_pid = parseInt(env('LISTEN_PID', '0')); +const listen_fds = parseInt(env('LISTEN_FDS', '0')); +// https://www.freedesktop.org/software/systemd/man/latest/sd_listen_fds.html +const SD_LISTEN_FDS_START = 3; + +if (listen_pid !== 0 && listen_pid !== process.pid) { + throw new Error(`received LISTEN_PID ${listen_pid} but current process id is ${process.pid}`); +} +if (listen_fds > 1) { + throw new Error( + `only one socket is allowed for socket activation, but LISTEN_FDS was set to ${listen_fds}` + ); +} + +const socket_activation = listen_pid === process.pid && listen_fds === 1; + +let requests = 0; +/** @type {NodeJS.Timeout | void} */ +let shutdown_timeout_id; +/** @type {NodeJS.Timeout | void} */ +let idle_timeout_id; + const server = polka().use(handler); -server.listen({ path, host, port }, () => { - console.log(`Listening on ${path ? path : host + ':' + port}`); -}); +if (socket_activation) { + server.listen({ fd: SD_LISTEN_FDS_START }, () => { + console.log(`Listening on file descriptor ${SD_LISTEN_FDS_START}`); + }); +} else { + server.listen({ path, host, port }, () => { + console.log(`Listening on ${path || `http://${host}:${port}`}`); + }); +} + +/** @param {'SIGINT' | 'SIGTERM' | 'IDLE'} reason */ +function graceful_shutdown(reason) { + if (shutdown_timeout_id) return; + + // If a connection was opened with a keep-alive header close() will wait for the connection to + // time out rather than close it even if it is not handling any requests, so call this first + // @ts-expect-error this was added in 18.2.0 but is not reflected in the types + server.server.closeIdleConnections(); + + server.server.close((error) => { + // occurs if the server is already closed + if (error) return; + + if (shutdown_timeout_id) { + clearTimeout(shutdown_timeout_id); + } + if (idle_timeout_id) { + clearTimeout(idle_timeout_id); + } + + // @ts-expect-error custom events cannot be typed + process.emit('sveltekit:shutdown', reason); + }); + + shutdown_timeout_id = setTimeout( + // @ts-expect-error this was added in 18.2.0 but is not reflected in the types + () => server.server.closeAllConnections(), + shutdown_timeout * 1000 + ); +} + +server.server.on( + 'request', + /** @param {import('node:http').IncomingMessage} req */ + (req) => { + requests++; + + if (socket_activation && idle_timeout_id) { + idle_timeout_id = clearTimeout(idle_timeout_id); + } + + req.on('close', () => { + requests--; + + if (shutdown_timeout_id) { + // close connections as soon as they become idle, so they don't accept new requests + // @ts-expect-error this was added in 18.2.0 but is not reflected in the types + server.server.closeIdleConnections(); + } + if (requests === 0 && socket_activation && idle_timeout) { + idle_timeout_id = setTimeout(() => graceful_shutdown('IDLE'), idle_timeout * 1000); + } + }); + } +); + +process.on('SIGTERM', graceful_shutdown); +process.on('SIGINT', graceful_shutdown); export { server }; diff --git a/packages/adapter-node/tests/smoke.spec.js b/packages/adapter-node/tests/smoke.spec_disabled.js similarity index 97% rename from packages/adapter-node/tests/smoke.spec.js rename to packages/adapter-node/tests/smoke.spec_disabled.js index ea7f27658cf6..58809bf6cb59 100644 --- a/packages/adapter-node/tests/smoke.spec.js +++ b/packages/adapter-node/tests/smoke.spec_disabled.js @@ -1,3 +1,4 @@ +import process from 'node:process'; import { assert, test } from 'vitest'; import { create_kit_middleware } from '../src/handler.js'; import fetch from 'node-fetch'; diff --git a/packages/adapter-node/tests/utils.spec.js b/packages/adapter-node/tests/utils.spec.js new file mode 100644 index 000000000000..06a495fde9ba --- /dev/null +++ b/packages/adapter-node/tests/utils.spec.js @@ -0,0 +1,21 @@ +import { expect, test, describe } from 'vitest'; +import { parse_as_bytes } from '../utils.js'; + +describe('parse_as_bytes', () => { + test('parses correctly', () => { + const testData = { + 200: 200, + '512K': 512 * 1024, + '200M': 200 * 1024 * 1024, + '1G': 1024 * 1024 * 1024, + Infinity, + asdf: NaN + }; + + Object.keys(testData).forEach((input) => { + const expected = testData[/** @type {keyof typeof testData} */ (input)]; + const actual = parse_as_bytes(input); + expect(actual, `Testing input '${input}'`).toBe(expected); + }); + }); +}); diff --git a/packages/adapter-node/tsconfig.json b/packages/adapter-node/tsconfig.json index 63ea97316689..895d76f908cf 100644 --- a/packages/adapter-node/tsconfig.json +++ b/packages/adapter-node/tsconfig.json @@ -5,13 +5,14 @@ "noEmit": true, "noImplicitAny": true, "allowSyntheticDefaultImports": true, - "moduleResolution": "node", - "module": "es2022", - "target": "es2017", + "target": "es2022", + "module": "node16", + "moduleResolution": "node16", "baseUrl": ".", "paths": { "@sveltejs/kit": ["../kit/types/index"] } }, - "include": ["index.js", "src/**/*.js", "ambient.d.ts"] + "include": ["index.js", "src/**/*.js", "tests/**/*.js", "internal.d.ts", "utils.js"], + "exclude": ["tests/smoke.spec_disabled.js"] } diff --git a/packages/adapter-node/utils.js b/packages/adapter-node/utils.js new file mode 100644 index 000000000000..16769eaa0027 --- /dev/null +++ b/packages/adapter-node/utils.js @@ -0,0 +1,15 @@ +/** + * Parses the given value into number of bytes. + * + * @param {string} value - Size in bytes. Can also be specified with a unit suffix kilobytes (K), megabytes (M), or gigabytes (G). + * @returns {number} + */ +export function parse_as_bytes(value) { + const multiplier = + { + K: 1024, + M: 1024 * 1024, + G: 1024 * 1024 * 1024 + }[value[value.length - 1]?.toUpperCase()] ?? 1; + return Number(multiplier != 1 ? value.substring(0, value.length - 1) : value) * multiplier; +} diff --git a/packages/adapter-static/CHANGELOG.md b/packages/adapter-static/CHANGELOG.md index f4c59705696b..1aa68f9c87b6 100644 --- a/packages/adapter-static/CHANGELOG.md +++ b/packages/adapter-static/CHANGELOG.md @@ -1,5 +1,77 @@ # @sveltejs/adapter-static +## 3.0.8 +### Patch Changes + + +- fix: use optional chaining when checking router type ([#13218](https://github.com/sveltejs/kit/pull/13218)) + +## 3.0.7 +### Patch Changes + + +- fix: allow dynamic routes with missing fallback in hash mode ([#13213](https://github.com/sveltejs/kit/pull/13213)) + +## 3.0.6 +### Patch Changes + + +- docs: update URLs for new svelte.dev site ([#12857](https://github.com/sveltejs/kit/pull/12857)) + +- Updated dependencies [[`dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46`](https://github.com/sveltejs/kit/commit/dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46), [`4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d`](https://github.com/sveltejs/kit/commit/4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d), [`3a9b78f04786898ca93f6d4b75ab18d26bc45192`](https://github.com/sveltejs/kit/commit/3a9b78f04786898ca93f6d4b75ab18d26bc45192), [`723eb8b31e6a22c82f730c30e485386c8676b746`](https://github.com/sveltejs/kit/commit/723eb8b31e6a22c82f730c30e485386c8676b746), [`8ec471c875345b751344e67580ff1b772ef2735b`](https://github.com/sveltejs/kit/commit/8ec471c875345b751344e67580ff1b772ef2735b)]: + - @sveltejs/kit@2.7.3 + +## 3.0.5 +### Patch Changes + + +- fix: import `node:process` instead of using globals ([#12641](https://github.com/sveltejs/kit/pull/12641)) + +- Updated dependencies [[`e798ef718f163bed4f93e1918bd8294f765376ad`](https://github.com/sveltejs/kit/commit/e798ef718f163bed4f93e1918bd8294f765376ad)]: + - @sveltejs/kit@2.5.28 + +## 3.0.4 +### Patch Changes + + +- chore: configure provenance in a simpler manner ([#12570](https://github.com/sveltejs/kit/pull/12570)) + +- Updated dependencies [[`087a43d391fc38b8c008fb39a804dc6988974101`](https://github.com/sveltejs/kit/commit/087a43d391fc38b8c008fb39a804dc6988974101)]: + - @sveltejs/kit@2.5.22 + +## 3.0.3 +### Patch Changes + + +- chore: package provenance ([#12567](https://github.com/sveltejs/kit/pull/12567)) + +- Updated dependencies [[`4930a8443caa53bcecee7b690cd28e429b1c8a20`](https://github.com/sveltejs/kit/commit/4930a8443caa53bcecee7b690cd28e429b1c8a20)]: + - @sveltejs/kit@2.5.21 + +## 3.0.2 + +### Patch Changes + +- chore: add keywords for discovery in npm search ([#12330](https://github.com/sveltejs/kit/pull/12330)) + +- Updated dependencies [[`25acb1d9fce998dccd8050b93cf4142c2b082611`](https://github.com/sveltejs/kit/commit/25acb1d9fce998dccd8050b93cf4142c2b082611), [`642c4a4aff4351b786fe6274aa2f0bf7d905faf9`](https://github.com/sveltejs/kit/commit/642c4a4aff4351b786fe6274aa2f0bf7d905faf9), [`0a0e9aa897123ebec50af08e9385b2ca4fc5bb28`](https://github.com/sveltejs/kit/commit/0a0e9aa897123ebec50af08e9385b2ca4fc5bb28)]: + - @sveltejs/kit@2.5.11 + +## 3.0.1 + +### Patch Changes + +- chore: update primary branch from master to main ([`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d)) + +- Updated dependencies [[`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d), [`16961e8cd3fa6a7f382153b1ff056bc2aae9b31b`](https://github.com/sveltejs/kit/commit/16961e8cd3fa6a7f382153b1ff056bc2aae9b31b), [`197e01f95652f511160f38b37b9da73a124ecd48`](https://github.com/sveltejs/kit/commit/197e01f95652f511160f38b37b9da73a124ecd48), [`102e4a5ae5b29624302163faf5a20c94a64a5b2c`](https://github.com/sveltejs/kit/commit/102e4a5ae5b29624302163faf5a20c94a64a5b2c), [`f8e3d8b9728c9f1ab63389342c31d7246b6f9db6`](https://github.com/sveltejs/kit/commit/f8e3d8b9728c9f1ab63389342c31d7246b6f9db6)]: + - @sveltejs/kit@2.0.4 + +## 3.0.0 + +### Major Changes + +- breaking: update SvelteKit peer dependency to version 2 ([#11277](https://github.com/sveltejs/kit/pull/11277)) + ## 2.0.3 ### Patch Changes diff --git a/packages/adapter-static/README.md b/packages/adapter-static/README.md index f32fef4240c4..b612f2aa6122 100644 --- a/packages/adapter-static/README.md +++ b/packages/adapter-static/README.md @@ -1,14 +1,14 @@ # @sveltejs/adapter-static -[Adapter](https://kit.svelte.dev/docs/adapters) for SvelteKit apps that prerenders your entire site as a collection of static files. It's also possible to create an SPA with it by specifying a fallback page which renders an empty shell. If you'd like to prerender only some pages and not create an SPA for those left out, you will need to use a different adapter together with [the `prerender` option](https://kit.svelte.dev/docs/page-options#prerender). +[Adapter](https://svelte.dev/docs/kit/adapters) for SvelteKit apps that prerenders your entire site as a collection of static files. It's also possible to create an SPA with it by specifying a fallback page which renders an empty shell. If you'd like to prerender only some pages and not create an SPA for those left out, you will need to use a different adapter together with [the `prerender` option](https://svelte.dev/docs/kit/page-options#prerender). ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-static) +[Docs](https://svelte.dev/docs/kit/adapter-static) ## Changelog -[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/master/packages/adapter-static/CHANGELOG.md). +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-static/CHANGELOG.md). ## License diff --git a/packages/adapter-static/index.js b/packages/adapter-static/index.js index 96ccf731dd98..cfeb7fba1628 100644 --- a/packages/adapter-static/index.js +++ b/packages/adapter-static/index.js @@ -1,13 +1,13 @@ import path from 'node:path'; import { platforms } from './platforms.js'; -/** @type {import('.').default} */ +/** @type {import('./index.js').default} */ export default function (options) { return { name: '@sveltejs/adapter-static', async adapt(builder) { - if (!options?.fallback) { + if (!options?.fallback && builder.config.kit.router?.type !== 'hash') { const dynamic_routes = builder.routes.filter((route) => route.prerender !== true); if (dynamic_routes.length > 0 && options?.strict !== false) { const prefix = path.relative('.', builder.config.kit.files.routes); @@ -18,7 +18,7 @@ export default function (options) { has_param_routes ? '(routes with parameters are not part of entry points by default)' : '' - } — see https://kit.svelte.dev/docs/configuration#prerender for more info.` + } — see https://svelte.dev/docs/kit/configuration#prerender for more info.` : ''; builder.log.error( @@ -26,14 +26,14 @@ export default function (options) { ${dynamic_routes.map((route) => ` - ${path.posix.join(prefix, route.id)}`).join('\n')} You have the following options: - - set the \`fallback\` option — see https://kit.svelte.dev/docs/single-page-apps#usage for more info. + - set the \`fallback\` option — see https://svelte.dev/docs/kit/single-page-apps#usage for more info. - add \`export const prerender = true\` to your root \`+layout.js/.ts\` or \`+layout.server.js/.ts\` file. This will try to prerender all pages. - add \`export const prerender = true\` to any \`+server.js/ts\` files that are not fetched by page \`load\` functions. ${config_option} - - pass \`strict: false\` to \`adapter-static\` to ignore this error. Only do this if you are sure you don't need the routes in question in your final app, as they will be unavailable. See https://github.com/sveltejs/kit/tree/master/packages/adapter-static#strict for more info. + - pass \`strict: false\` to \`adapter-static\` to ignore this error. Only do this if you are sure you don't need the routes in question in your final app, as they will be unavailable. See https://github.com/sveltejs/kit/tree/main/packages/adapter-static#strict for more info. If this doesn't help, you may need to use a different adapter. @sveltejs/adapter-static can only be used for sites that don't need a server for dynamic rendering, and can run on just a static file server. -See https://kit.svelte.dev/docs/page-options#prerender for more details` +See https://svelte.dev/docs/kit/page-options#prerender for more details` ); throw new Error('Encountered dynamic routes'); } @@ -52,15 +52,17 @@ See https://kit.svelte.dev/docs/page-options#prerender for more details` } const { + // @ts-ignore pages = 'build', assets = pages, fallback, precompress - } = options ?? platform?.defaults ?? /** @type {import('./index').AdapterOptions} */ ({}); + } = options ?? platform?.defaults ?? /** @type {import('./index.js').AdapterOptions} */ ({}); builder.rimraf(assets); builder.rimraf(pages); + builder.generateEnvModule(); builder.writeClient(assets); builder.writePrerendered(pages); diff --git a/packages/adapter-static/package.json b/packages/adapter-static/package.json index 0a070b6ae962..51f9907badf8 100644 --- a/packages/adapter-static/package.json +++ b/packages/adapter-static/package.json @@ -1,14 +1,23 @@ { "name": "@sveltejs/adapter-static", - "version": "2.0.3", + "version": "3.0.8", "description": "Adapter for SvelteKit apps that prerenders your entire site as a collection of static files", + "keywords": [ + "adapter", + "deploy", + "hosting", + "ssg", + "static site generation", + "svelte", + "sveltekit" + ], "repository": { "type": "git", "url": "https://github.com/sveltejs/kit", "directory": "packages/adapter-static" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { @@ -24,21 +33,22 @@ "platforms.js" ], "scripts": { - "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore", + "lint": "prettier --check .", "check": "tsc", "format": "pnpm lint --write", "test": "pnpm -r --workspace-concurrency 1 --filter=\"./test/**\" test" }, "devDependencies": { - "@playwright/test": "1.30.0", + "@playwright/test": "catalog:", "@sveltejs/kit": "workspace:^", - "@types/node": "^16.18.6", - "sirv": "^2.0.3", - "svelte": "^4.0.5", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "@types/node": "^18.19.48", + "sirv": "^3.0.0", + "svelte": "^5.23.1", + "typescript": "^5.3.3", + "vite": "catalog:" }, "peerDependencies": { - "@sveltejs/kit": "^1.5.0" + "@sveltejs/kit": "^2.0.0" } } diff --git a/packages/adapter-static/platforms.js b/packages/adapter-static/platforms.js index 189865b106b8..51a6bf0a3562 100644 --- a/packages/adapter-static/platforms.js +++ b/packages/adapter-static/platforms.js @@ -1,10 +1,11 @@ import fs from 'node:fs'; +import process from 'node:process'; /** * @typedef {{ * name: string; * test: () => boolean; - * defaults: import('./index').AdapterOptions; + * defaults: import('./index.js').AdapterOptions; * done: (builder: import('@sveltejs/kit').Builder) => void; * }} * Platform */ diff --git a/packages/adapter-static/test/apps/prerendered/package.json b/packages/adapter-static/test/apps/prerendered/package.json index ee51a824ea8a..cb42b62284e7 100644 --- a/packages/adapter-static/test/apps/prerendered/package.json +++ b/packages/adapter-static/test/apps/prerendered/package.json @@ -10,9 +10,10 @@ }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "sirv-cli": "^2.0.2", - "svelte": "^4.0.5", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "sirv-cli": "^3.0.0", + "svelte": "^5.23.1", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/adapter-static/test/apps/prerendered/src/app.html b/packages/adapter-static/test/apps/prerendered/src/app.html index 568b69b887b8..d533c5e31716 100644 --- a/packages/adapter-static/test/apps/prerendered/src/app.html +++ b/packages/adapter-static/test/apps/prerendered/src/app.html @@ -1,4 +1,4 @@ -<!DOCTYPE html> +<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> diff --git a/packages/adapter-static/test/apps/prerendered/src/routes/public-env/+page.svelte b/packages/adapter-static/test/apps/prerendered/src/routes/public-env/+page.svelte index 1c06b45b43e4..a36f01afaa54 100644 --- a/packages/adapter-static/test/apps/prerendered/src/routes/public-env/+page.svelte +++ b/packages/adapter-static/test/apps/prerendered/src/routes/public-env/+page.svelte @@ -1,5 +1,11 @@ <script> + import { browser } from '$app/environment'; + import { PUBLIC_ANSWER } from '$env/static/public'; import { env } from '$env/dynamic/public'; </script> -<h1>The answer is {env.PUBLIC_ANSWER}</h1> +<h1>The answer is {PUBLIC_ANSWER}</h1> + +{#if browser} + <h2>The dynamic answer is {env.PUBLIC_ANSWER}</h2> +{/if} diff --git a/packages/adapter-static/test/apps/prerendered/test/test.js b/packages/adapter-static/test/apps/prerendered/test/test.js index 6a5ea0c2ee8b..6b16d2fed83b 100644 --- a/packages/adapter-static/test/apps/prerendered/test/test.js +++ b/packages/adapter-static/test/apps/prerendered/test/test.js @@ -1,4 +1,5 @@ import * as fs from 'node:fs'; +import process from 'node:process'; import { expect, test } from '@playwright/test'; const cwd = process.cwd(); @@ -24,4 +25,5 @@ test('prerenders a referenced endpoint with implicit `prerender` setting', async test('exposes public env vars to the client', async ({ page }) => { await page.goto('/public-env'); expect(await page.textContent('h1')).toEqual('The answer is 42'); + expect(await page.textContent('h2')).toEqual('The dynamic answer is 42'); }); diff --git a/packages/adapter-static/test/apps/spa/.env.production b/packages/adapter-static/test/apps/spa/.env.production new file mode 100644 index 000000000000..79d571855ca8 --- /dev/null +++ b/packages/adapter-static/test/apps/spa/.env.production @@ -0,0 +1 @@ +PUBLIC_VALUE="a .env.production variable should NOT be included in a mode=staging build" \ No newline at end of file diff --git a/packages/adapter-static/test/apps/spa/.env.staging b/packages/adapter-static/test/apps/spa/.env.staging new file mode 100644 index 000000000000..8483bf2722dd --- /dev/null +++ b/packages/adapter-static/test/apps/spa/.env.staging @@ -0,0 +1 @@ +PUBLIC_VALUE=42 \ No newline at end of file diff --git a/packages/adapter-static/test/apps/spa/README.md b/packages/adapter-static/test/apps/spa/README.md index c7f00c26d735..16c7d1981629 100644 --- a/packages/adapter-static/test/apps/spa/README.md +++ b/packages/adapter-static/test/apps/spa/README.md @@ -1,6 +1,6 @@ # create-svelte -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte); +Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte); ## Creating a project @@ -27,7 +27,7 @@ npm run dev -- --open ## Building -Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. Then: +Before creating a production version of your app, install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. Then: ```bash npm run build diff --git a/packages/adapter-static/test/apps/spa/package.json b/packages/adapter-static/test/apps/spa/package.json index bfac503ef925..772221641e3e 100644 --- a/packages/adapter-static/test/apps/spa/package.json +++ b/packages/adapter-static/test/apps/spa/package.json @@ -4,16 +4,17 @@ "private": true, "scripts": { "dev": "vite dev", - "build": "vite build", + "build": "vite build --mode staging", "preview": "sirv -p 5173 -s 200.html build", "test": "playwright test" }, "devDependencies": { "@sveltejs/adapter-node": "workspace:^", "@sveltejs/kit": "workspace:^", - "sirv-cli": "^2.0.2", - "svelte": "^4.0.5", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "sirv-cli": "^3.0.0", + "svelte": "^5.23.1", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/adapter-static/test/apps/spa/src/app.html b/packages/adapter-static/test/apps/spa/src/app.html index 568b69b887b8..d533c5e31716 100644 --- a/packages/adapter-static/test/apps/spa/src/app.html +++ b/packages/adapter-static/test/apps/spa/src/app.html @@ -1,4 +1,4 @@ -<!DOCTYPE html> +<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> diff --git a/packages/adapter-static/test/apps/spa/src/routes/+error.svelte b/packages/adapter-static/test/apps/spa/src/routes/+error.svelte index 9b0abbfdda47..fe313e063894 100644 --- a/packages/adapter-static/test/apps/spa/src/routes/+error.svelte +++ b/packages/adapter-static/test/apps/spa/src/routes/+error.svelte @@ -1,5 +1,5 @@ <script> - import { page } from '$app/stores'; + import { page } from '$app/state'; </script> -<h1>{$page.status}</h1> +<h1>{page.status}</h1> diff --git a/packages/adapter-static/test/apps/spa/src/routes/+layout.svelte b/packages/adapter-static/test/apps/spa/src/routes/+layout.svelte index d89ceb3fed43..439e52c54c97 100644 --- a/packages/adapter-static/test/apps/spa/src/routes/+layout.svelte +++ b/packages/adapter-static/test/apps/spa/src/routes/+layout.svelte @@ -3,4 +3,4 @@ <a href="/about">about</a> </nav> -<slot></slot> \ No newline at end of file +<slot /> diff --git a/packages/adapter-static/test/apps/spa/src/routes/+page.svelte b/packages/adapter-static/test/apps/spa/src/routes/+page.svelte index 913f0784cbb6..aaa08e08c0a1 100644 --- a/packages/adapter-static/test/apps/spa/src/routes/+page.svelte +++ b/packages/adapter-static/test/apps/spa/src/routes/+page.svelte @@ -1 +1 @@ -<h1>This page was not prerendered</h1> \ No newline at end of file +<h1>This page was not prerendered</h1> diff --git a/packages/adapter-static/test/apps/spa/src/routes/about/+page.svelte b/packages/adapter-static/test/apps/spa/src/routes/about/+page.svelte index 404fd77511d2..07dd2ffa5038 100644 --- a/packages/adapter-static/test/apps/spa/src/routes/about/+page.svelte +++ b/packages/adapter-static/test/apps/spa/src/routes/about/+page.svelte @@ -1 +1 @@ -<h1>This page was prerendered</h1> \ No newline at end of file +<h1>This page was prerendered</h1> diff --git a/packages/adapter-static/test/apps/spa/src/routes/fallback/[...rest]/+page.svelte b/packages/adapter-static/test/apps/spa/src/routes/fallback/[...rest]/+page.svelte index 671b43ec7195..55b4798e99c5 100644 --- a/packages/adapter-static/test/apps/spa/src/routes/fallback/[...rest]/+page.svelte +++ b/packages/adapter-static/test/apps/spa/src/routes/fallback/[...rest]/+page.svelte @@ -1 +1,7 @@ +<script> + import { PUBLIC_VALUE } from '$env/static/public'; +</script> + <h1>the fallback page was rendered</h1> + +<b>{PUBLIC_VALUE}</b> diff --git a/packages/adapter-static/test/apps/spa/test/test.js b/packages/adapter-static/test/apps/spa/test/test.js index 70f18670ea1b..5963f490df7f 100644 --- a/packages/adapter-static/test/apps/spa/test/test.js +++ b/packages/adapter-static/test/apps/spa/test/test.js @@ -1,4 +1,5 @@ import * as fs from 'node:fs'; +import process from 'node:process'; import { expect, test } from '@playwright/test'; const cwd = process.cwd(); @@ -27,3 +28,8 @@ test('renders error page for missing page', async ({ page }) => { await page.goto('/nosuchpage'); expect(await page.textContent('h1')).toEqual('404'); }); + +test('uses correct environment variables for fallback page (mode = staging)', async ({ page }) => { + await page.goto('/fallback/x/y/z'); + expect(await page.textContent('b')).toEqual('42'); +}); diff --git a/packages/adapter-static/test/utils.js b/packages/adapter-static/test/utils.js index 28a931073483..52d5adbf7759 100644 --- a/packages/adapter-static/test/utils.js +++ b/packages/adapter-static/test/utils.js @@ -1,4 +1,5 @@ import { devices } from '@playwright/test'; +import process from 'node:process'; /** @type {import('@playwright/test').PlaywrightTestConfig} */ export const config = { diff --git a/packages/adapter-static/tsconfig.json b/packages/adapter-static/tsconfig.json index 7953ec985e76..dafbce422a39 100644 --- a/packages/adapter-static/tsconfig.json +++ b/packages/adapter-static/tsconfig.json @@ -4,14 +4,14 @@ "checkJs": true, "noEmit": true, "noImplicitAny": true, - "module": "es2022", "target": "es2022", - "moduleResolution": "node", + "module": "node16", + "moduleResolution": "node16", "allowSyntheticDefaultImports": true, "baseUrl": ".", "paths": { "@sveltejs/kit": ["../kit/types/index"] } }, - "include": ["index.js"] + "include": ["index.js", "test/utils.js"] } diff --git a/packages/adapter-vercel/CHANGELOG.md b/packages/adapter-vercel/CHANGELOG.md index 52911cba3385..aa022f8732f9 100644 --- a/packages/adapter-vercel/CHANGELOG.md +++ b/packages/adapter-vercel/CHANGELOG.md @@ -1,5 +1,307 @@ # @sveltejs/adapter-vercel +## 5.7.2 +### Patch Changes + + +- chore(deps): upgrade to esbuild 0.25.4 ([#13770](https://github.com/sveltejs/kit/pull/13770)) + +## 5.7.1 +### Patch Changes + + +- chore(deps): upgrade esbuild to 0.25.2 ([#13716](https://github.com/sveltejs/kit/pull/13716)) + + +- fix: include the `edge-light` bundling condition when building edge functions ([#13720](https://github.com/sveltejs/kit/pull/13720)) + +- Updated dependencies [[`c51fb554416e0c4a21655c1d79e834f69743d1d5`](https://github.com/sveltejs/kit/commit/c51fb554416e0c4a21655c1d79e834f69743d1d5)]: + - @sveltejs/kit@2.20.8 + +## 5.7.0 +### Minor Changes + + +- feat: create symlink functions for each route, for better observability ([#13679](https://github.com/sveltejs/kit/pull/13679)) + + +### Patch Changes + +- Updated dependencies [[`7fd7bcb7142e7d0d2dd64174fa1a94d56a45d643`](https://github.com/sveltejs/kit/commit/7fd7bcb7142e7d0d2dd64174fa1a94d56a45d643)]: + - @sveltejs/kit@2.20.4 + +## 5.6.3 +### Patch Changes + + +- chore(deps): upgrade @vercel/nft to fix glob deprecation warnings ([`b1e9781a6dff41841d8e1509311d948421956746`](https://github.com/sveltejs/kit/commit/b1e9781a6dff41841d8e1509311d948421956746)) + +## 5.6.2 +### Patch Changes + + +- fix: change server-side route resolution endpoint ([#13461](https://github.com/sveltejs/kit/pull/13461)) + +- Updated dependencies [[`9612a60a0277aef0ab4723a0e7ed8dd03a7ffb95`](https://github.com/sveltejs/kit/commit/9612a60a0277aef0ab4723a0e7ed8dd03a7ffb95), [`3d88ae33fc14b08a1d48c2cb7315739c8cfcd9fd`](https://github.com/sveltejs/kit/commit/3d88ae33fc14b08a1d48c2cb7315739c8cfcd9fd)]: + - @sveltejs/kit@2.17.2 + +## 5.6.1 +### Patch Changes + + +- fix: correct edge function path for route resolution endpoint ([#13409](https://github.com/sveltejs/kit/pull/13409)) + +## 5.6.0 +### Minor Changes + + +- feat: generate edge function dedicated to server side route resolution when using that option in SvelteKit ([#13379](https://github.com/sveltejs/kit/pull/13379)) + + +### Patch Changes + +- Updated dependencies [[`09296d0f19c8d1ff57d699e637bd1beabb69d438`](https://github.com/sveltejs/kit/commit/09296d0f19c8d1ff57d699e637bd1beabb69d438), [`d62ed39a431f0db3db4dd90bf6b17ed2a2a2de79`](https://github.com/sveltejs/kit/commit/d62ed39a431f0db3db4dd90bf6b17ed2a2a2de79), [`f30352f874790b9de0bd0eba985a21aef23e158e`](https://github.com/sveltejs/kit/commit/f30352f874790b9de0bd0eba985a21aef23e158e), [`180fa3467e195065c0a25206c6328a908e6952d7`](https://github.com/sveltejs/kit/commit/180fa3467e195065c0a25206c6328a908e6952d7), [`5906e9708965b848b468d0014999c36272dc8d50`](https://github.com/sveltejs/kit/commit/5906e9708965b848b468d0014999c36272dc8d50), [`d62ed39a431f0db3db4dd90bf6b17ed2a2a2de79`](https://github.com/sveltejs/kit/commit/d62ed39a431f0db3db4dd90bf6b17ed2a2a2de79)]: + - @sveltejs/kit@2.17.0 + +## 5.5.3 +### Patch Changes + + +- fix: include ambient type declarations ([#12088](https://github.com/sveltejs/kit/pull/12088)) + +- Updated dependencies [[`d440c68acac67ed64eea4b9bda267e229303db7b`](https://github.com/sveltejs/kit/commit/d440c68acac67ed64eea4b9bda267e229303db7b), [`6774ebc34330b12ae8c0cae08e98b577d819fffb`](https://github.com/sveltejs/kit/commit/6774ebc34330b12ae8c0cae08e98b577d819fffb), [`777c8ef11f17d2ab48aee0f2347c051663da5826`](https://github.com/sveltejs/kit/commit/777c8ef11f17d2ab48aee0f2347c051663da5826), [`f451f6c4a3dbbc73dc86667c6ff89ab2f46ca9d2`](https://github.com/sveltejs/kit/commit/f451f6c4a3dbbc73dc86667c6ff89ab2f46ca9d2), [`34a03ff16af29e917abebb649b31eadfc40a98a0`](https://github.com/sveltejs/kit/commit/34a03ff16af29e917abebb649b31eadfc40a98a0), [`1c77e283896058084c1cb5752d9ec207987a585e`](https://github.com/sveltejs/kit/commit/1c77e283896058084c1cb5752d9ec207987a585e), [`04958cca5905aaeeff367c9e4a5ce6e90fc64779`](https://github.com/sveltejs/kit/commit/04958cca5905aaeeff367c9e4a5ce6e90fc64779), [`9dc5c0e3e01a3c07010e9996688169be68e1dde8`](https://github.com/sveltejs/kit/commit/9dc5c0e3e01a3c07010e9996688169be68e1dde8), [`00e1a7621de554054d068e4525a9e505d1c2e588`](https://github.com/sveltejs/kit/commit/00e1a7621de554054d068e4525a9e505d1c2e588), [`9fcd1e7574197fa6e7ac000a030378d877cb8837`](https://github.com/sveltejs/kit/commit/9fcd1e7574197fa6e7ac000a030378d877cb8837), [`e541a4057a00f5ab6740fb51b7f88f17776da50a`](https://github.com/sveltejs/kit/commit/e541a4057a00f5ab6740fb51b7f88f17776da50a), [`37f72fbb075b481de8263f62c77125333735f382`](https://github.com/sveltejs/kit/commit/37f72fbb075b481de8263f62c77125333735f382), [`b60707ca8e755be95c86490122aa1b792b9bd6be`](https://github.com/sveltejs/kit/commit/b60707ca8e755be95c86490122aa1b792b9bd6be), [`699f4405c752261cf46c1ad32e4dbadceaffc75b`](https://github.com/sveltejs/kit/commit/699f4405c752261cf46c1ad32e4dbadceaffc75b), [`e2a4538c48295cde06f64fb8c7f0b333fbf95496`](https://github.com/sveltejs/kit/commit/e2a4538c48295cde06f64fb8c7f0b333fbf95496), [`a91ba1f326b6e244503de9a010771d942b461dad`](https://github.com/sveltejs/kit/commit/a91ba1f326b6e244503de9a010771d942b461dad)]: + - @sveltejs/kit@2.16.0 + +## 5.5.2 +### Patch Changes + + +- chore: upgrade `@vercel/nft` to 0.27.9 ([#13129](https://github.com/sveltejs/kit/pull/13129)) + +- Updated dependencies [[`9fc5ff3339e543b956f7ce5eb31267fa73ee332a`](https://github.com/sveltejs/kit/commit/9fc5ff3339e543b956f7ce5eb31267fa73ee332a), [`85b57168189fa16fe966434ec50cc19425cab275`](https://github.com/sveltejs/kit/commit/85b57168189fa16fe966434ec50cc19425cab275)]: + - @sveltejs/kit@2.10.0 + +## 5.5.1 +### Patch Changes + + +- chore: upgrade @vercel/nft to 0.27.7 ([#13082](https://github.com/sveltejs/kit/pull/13082)) + +- Updated dependencies [[`78404dfe1eb346723eefc183278b85f25485b419`](https://github.com/sveltejs/kit/commit/78404dfe1eb346723eefc183278b85f25485b419)]: + - @sveltejs/kit@2.9.1 + +## 5.5.0 +### Minor Changes + + +- chore: upgrade esbuild to 0.24.0 ([#12270](https://github.com/sveltejs/kit/pull/12270)) + + +### Patch Changes + +- Updated dependencies [[`d030f4bb285e70844d09b3f0c87809bae43014b8`](https://github.com/sveltejs/kit/commit/d030f4bb285e70844d09b3f0c87809bae43014b8), [`67dd214863cbc5852eb0e8512efbb7bad5358e8a`](https://github.com/sveltejs/kit/commit/67dd214863cbc5852eb0e8512efbb7bad5358e8a)]: + - @sveltejs/kit@2.9.0 + +## 5.4.8 +### Patch Changes + + +- chore: support building with Node 22 ([#13043](https://github.com/sveltejs/kit/pull/13043)) + +- Updated dependencies [[`570562b74d9e9f295d9b617478088a650f51e96b`](https://github.com/sveltejs/kit/commit/570562b74d9e9f295d9b617478088a650f51e96b), [`1358cccd52190df3c74bdd8970dbfb06ffc4ec72`](https://github.com/sveltejs/kit/commit/1358cccd52190df3c74bdd8970dbfb06ffc4ec72)]: + - @sveltejs/kit@2.8.2 + +## 5.4.7 +### Patch Changes + + +- fix: disregard presence/absence of trailing slash in prerendered redirect ([#12966](https://github.com/sveltejs/kit/pull/12966)) + +- Updated dependencies [[`92b2686314a7dbebee1761c3da7719d599f003c7`](https://github.com/sveltejs/kit/commit/92b2686314a7dbebee1761c3da7719d599f003c7)]: + - @sveltejs/kit@2.8.0 + +## 5.4.6 +### Patch Changes + + +- docs: update URLs for new svelte.dev site ([#12857](https://github.com/sveltejs/kit/pull/12857)) + +- Updated dependencies [[`dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46`](https://github.com/sveltejs/kit/commit/dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46), [`4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d`](https://github.com/sveltejs/kit/commit/4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d), [`3a9b78f04786898ca93f6d4b75ab18d26bc45192`](https://github.com/sveltejs/kit/commit/3a9b78f04786898ca93f6d4b75ab18d26bc45192), [`723eb8b31e6a22c82f730c30e485386c8676b746`](https://github.com/sveltejs/kit/commit/723eb8b31e6a22c82f730c30e485386c8676b746), [`8ec471c875345b751344e67580ff1b772ef2735b`](https://github.com/sveltejs/kit/commit/8ec471c875345b751344e67580ff1b772ef2735b)]: + - @sveltejs/kit@2.7.3 + +## 5.4.5 +### Patch Changes + + +- fix: updated `@default` annotation for runtime ([#12717](https://github.com/sveltejs/kit/pull/12717)) + +- Updated dependencies [[`3591411e880ed5337123c66365433afe8c2f747b`](https://github.com/sveltejs/kit/commit/3591411e880ed5337123c66365433afe8c2f747b), [`2292170ecba27c70600fae0c2adc473ac9d938e8`](https://github.com/sveltejs/kit/commit/2292170ecba27c70600fae0c2adc473ac9d938e8), [`809983f377f0b18c4651a8a4f3af7b69c0df20ab`](https://github.com/sveltejs/kit/commit/809983f377f0b18c4651a8a4f3af7b69c0df20ab)]: + - @sveltejs/kit@2.6.3 + +## 5.4.4 +### Patch Changes + + +- fix: import `node:process` instead of using globals ([#12641](https://github.com/sveltejs/kit/pull/12641)) + +- Updated dependencies [[`e798ef718f163bed4f93e1918bd8294f765376ad`](https://github.com/sveltejs/kit/commit/e798ef718f163bed4f93e1918bd8294f765376ad)]: + - @sveltejs/kit@2.5.28 + +## 5.4.3 +### Patch Changes + + +- chore: configure provenance in a simpler manner ([#12570](https://github.com/sveltejs/kit/pull/12570)) + +- Updated dependencies [[`087a43d391fc38b8c008fb39a804dc6988974101`](https://github.com/sveltejs/kit/commit/087a43d391fc38b8c008fb39a804dc6988974101)]: + - @sveltejs/kit@2.5.22 + +## 5.4.2 +### Patch Changes + + +- chore: package provenance ([#12567](https://github.com/sveltejs/kit/pull/12567)) + +- Updated dependencies [[`4930a8443caa53bcecee7b690cd28e429b1c8a20`](https://github.com/sveltejs/kit/commit/4930a8443caa53bcecee7b690cd28e429b1c8a20)]: + - @sveltejs/kit@2.5.21 + +## 5.4.1 +### Patch Changes + + +- fix: copy `.eot`, `.otf`, `.ttf`, `.woff`, and `woff2` font files when bundling ([#12439](https://github.com/sveltejs/kit/pull/12439)) + +## 5.4.0 +### Minor Changes + + +- chore(deps): upgrade to esbuild 0.21 ([#12415](https://github.com/sveltejs/kit/pull/12415)) + + +### Patch Changes + +- Updated dependencies [[`84298477a014ec471839adf7a4448d91bc7949e4`](https://github.com/sveltejs/kit/commit/84298477a014ec471839adf7a4448d91bc7949e4), [`5645614f497931f587b7cb8b3c885fce892a6a72`](https://github.com/sveltejs/kit/commit/5645614f497931f587b7cb8b3c885fce892a6a72), [`84298477a014ec471839adf7a4448d91bc7949e4`](https://github.com/sveltejs/kit/commit/84298477a014ec471839adf7a4448d91bc7949e4)]: + - @sveltejs/kit@2.5.18 + +## 5.3.2 + +### Patch Changes + +- fix: remove `images` from route-level config ([#12280](https://github.com/sveltejs/kit/pull/12280)) + +- chore: add keywords for discovery in npm search ([#12330](https://github.com/sveltejs/kit/pull/12330)) + +- Updated dependencies [[`25acb1d9fce998dccd8050b93cf4142c2b082611`](https://github.com/sveltejs/kit/commit/25acb1d9fce998dccd8050b93cf4142c2b082611), [`642c4a4aff4351b786fe6274aa2f0bf7d905faf9`](https://github.com/sveltejs/kit/commit/642c4a4aff4351b786fe6274aa2f0bf7d905faf9), [`0a0e9aa897123ebec50af08e9385b2ca4fc5bb28`](https://github.com/sveltejs/kit/commit/0a0e9aa897123ebec50af08e9385b2ca4fc5bb28)]: + - @sveltejs/kit@2.5.11 + +## 5.3.1 + +### Patch Changes + +- chore(deps): upgrade to `@vercel/nft` version 0.27.1 ([#12274](https://github.com/sveltejs/kit/pull/12274)) + +## 5.3.0 + +### Minor Changes + +- chore(deps): upgrade esbuild ([#12118](https://github.com/sveltejs/kit/pull/12118)) + +### Patch Changes + +- Updated dependencies [[`bbab296f6fcc05af6b999182798bcdedabbaa4c9`](https://github.com/sveltejs/kit/commit/bbab296f6fcc05af6b999182798bcdedabbaa4c9)]: + - @sveltejs/kit@2.5.6 + +## 5.2.0 + +### Minor Changes + +- feat: add framework metadata in Vercel build output files ([#11800](https://github.com/sveltejs/kit/pull/11800)) + +- feat: implement version skew protection ([#11987](https://github.com/sveltejs/kit/pull/11987)) + +## 5.1.1 + +### Patch Changes + +- fix: handle optional and rest routes for incremental static regeneration (ISR) correctly ([#11928](https://github.com/sveltejs/kit/pull/11928)) + +## 5.1.0 + +### Minor Changes + +- feat: allow compatible subset of Node.js built-in modules when targeting edge functions ([#11675](https://github.com/sveltejs/kit/pull/11675)) + +### Patch Changes + +- Updated dependencies [[`36dc54ac740b8b4c6a2b904a1d0aadd8923a875c`](https://github.com/sveltejs/kit/commit/36dc54ac740b8b4c6a2b904a1d0aadd8923a875c), [`5dae3676b8cc6f8ee0def57340e6a6e591bafecd`](https://github.com/sveltejs/kit/commit/5dae3676b8cc6f8ee0def57340e6a6e591bafecd), [`ada595908b5501b8f4ac30c89c0d6314f364fde3`](https://github.com/sveltejs/kit/commit/ada595908b5501b8f4ac30c89c0d6314f364fde3), [`e228f8997840b89c6248e1c5df6f3108008a06be`](https://github.com/sveltejs/kit/commit/e228f8997840b89c6248e1c5df6f3108008a06be)]: + - @sveltejs/kit@2.4.1 + +## 5.0.0 + +### Major Changes + +- breaking: update peer dependency on `@sveltejs/kit` ([#11649](https://github.com/sveltejs/kit/pull/11649)) + +### Minor Changes + +- feat: support `read` from `$app/server` ([#11649](https://github.com/sveltejs/kit/pull/11649)) + +### Patch Changes + +- Updated dependencies [[`288f731c8a5b20cadb9e219f9583f3f16bf8c7b8`](https://github.com/sveltejs/kit/commit/288f731c8a5b20cadb9e219f9583f3f16bf8c7b8)]: + - @sveltejs/kit@2.4.0 + +## 4.0.5 + +### Patch Changes + +- chore: upgrade esbuild to 0.19.11 ([#11632](https://github.com/sveltejs/kit/pull/11632)) + +## 4.0.4 + +### Patch Changes + +- fix: update @vercel/nft to 0.26.1 ([#11508](https://github.com/sveltejs/kit/pull/11508)) + +## 4.0.3 + +### Patch Changes + +- chore: update primary branch from master to main ([`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d)) + +- Updated dependencies [[`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d), [`16961e8cd3fa6a7f382153b1ff056bc2aae9b31b`](https://github.com/sveltejs/kit/commit/16961e8cd3fa6a7f382153b1ff056bc2aae9b31b), [`197e01f95652f511160f38b37b9da73a124ecd48`](https://github.com/sveltejs/kit/commit/197e01f95652f511160f38b37b9da73a124ecd48), [`102e4a5ae5b29624302163faf5a20c94a64a5b2c`](https://github.com/sveltejs/kit/commit/102e4a5ae5b29624302163faf5a20c94a64a5b2c), [`f8e3d8b9728c9f1ab63389342c31d7246b6f9db6`](https://github.com/sveltejs/kit/commit/f8e3d8b9728c9f1ab63389342c31d7246b6f9db6)]: + - @sveltejs/kit@2.0.4 + +## 4.0.2 + +### Patch Changes + +- fix: remove broken node 16 support ([#11328](https://github.com/sveltejs/kit/pull/11328)) + +## 4.0.1 + +### Patch Changes + +- chore(deps): update `@vercel/nft` ([#11281](https://github.com/sveltejs/kit/pull/11281)) + +## 4.0.0 + +### Major Changes + +- breaking: require SvelteKit 2 peer dependency ([#11289](https://github.com/sveltejs/kit/pull/11289)) + +- chore: upgrade esbuild ([#11122](https://github.com/sveltejs/kit/pull/11122)) + +### Minor Changes + +- feat: expose vercel image optimization config in adapter config ([#8667](https://github.com/sveltejs/kit/pull/8667)) + +## 3.1.0 + +### Minor Changes + +- feat: add support for nodejs20.x ([#11067](https://github.com/sveltejs/kit/pull/11067)) + ## 3.0.3 ### Patch Changes diff --git a/packages/adapter-vercel/README.md b/packages/adapter-vercel/README.md index 8a09e256d6e2..ce1a3c89595e 100644 --- a/packages/adapter-vercel/README.md +++ b/packages/adapter-vercel/README.md @@ -4,8 +4,8 @@ A SvelteKit adapter that creates a Vercel app. ## Docs -[Docs](https://kit.svelte.dev/docs/adapter-vercel) +[Docs](https://svelte.dev/docs/kit/adapter-vercel) ## Changelog -[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/master/packages/adapter-vercel/CHANGELOG.md). +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-vercel/CHANGELOG.md). diff --git a/packages/adapter-vercel/files/edge.js b/packages/adapter-vercel/files/edge.js index ce603b6e3920..1098fbf31379 100644 --- a/packages/adapter-vercel/files/edge.js +++ b/packages/adapter-vercel/files/edge.js @@ -1,3 +1,5 @@ +/* eslint-disable n/prefer-global/process -- + Vercel Edge Runtime does not support node:process */ import { Server } from 'SERVER'; import { manifest } from 'MANIFEST'; @@ -12,6 +14,7 @@ const initialized = server.init({ */ export default async (request, context) => { await initialized; + return server.respond(request, { getClientAddress() { return /** @type {string} */ (request.headers.get('x-forwarded-for')); diff --git a/packages/adapter-vercel/files/serverless.js b/packages/adapter-vercel/files/serverless.js index 5a6c2f64e2fd..a8f774be9424 100644 --- a/packages/adapter-vercel/files/serverless.js +++ b/packages/adapter-vercel/files/serverless.js @@ -1,14 +1,16 @@ import { installPolyfills } from '@sveltejs/kit/node/polyfills'; -import { getRequest, setResponse } from '@sveltejs/kit/node'; +import { getRequest, setResponse, createReadableStream } from '@sveltejs/kit/node'; import { Server } from 'SERVER'; import { manifest } from 'MANIFEST'; +import process from 'node:process'; installPolyfills(); const server = new Server(manifest); await server.init({ - env: /** @type {Record<string, string>} */ (process.env) + env: /** @type {Record<string, string>} */ (process.env), + read: createReadableStream }); const DATA_SUFFIX = '/__data.json'; @@ -32,15 +34,7 @@ export default async (req, res) => { } } - /** @type {Request} */ - let request; - - try { - request = await getRequest({ base: `https://${req.headers.host}`, request: req }); - } catch (err) { - res.statusCode = /** @type {any} */ (err).status || 400; - return res.end('Invalid request body'); - } + const request = await getRequest({ base: `https://${req.headers.host}`, request: req }); setResponse( res, diff --git a/packages/adapter-vercel/index.d.ts b/packages/adapter-vercel/index.d.ts index 634f90ed8db9..ffd6ae11d40b 100644 --- a/packages/adapter-vercel/index.d.ts +++ b/packages/adapter-vercel/index.d.ts @@ -5,10 +5,10 @@ export default function plugin(config?: Config): Adapter; export interface ServerlessConfig { /** - * Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions) - * @default 'nodejs18.x' + * Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) (`'edge'`) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions) (`'nodejs18.x'`, `'nodejs20.x'` etc). + * @default Same as the build environment */ - runtime?: 'nodejs16.x' | 'nodejs18.x'; + runtime?: `nodejs${number}.x`; /** * To which regions to deploy the app. A list of regions. * More info: https://vercel.com/docs/concepts/edge-network/regions @@ -28,6 +28,7 @@ export interface ServerlessConfig { * If `true`, this route will always be deployed as its own separate function */ split?: boolean; + /** * [Incremental Static Regeneration](https://vercel.com/docs/concepts/incremental-static-regeneration/overview) configuration. * Serverless only. @@ -53,9 +54,29 @@ export interface ServerlessConfig { | false; } +type ImageFormat = 'image/avif' | 'image/webp'; + +type RemotePattern = { + protocol?: 'http' | 'https'; + hostname: string; + port?: string; + pathname?: string; +}; + +type ImagesConfig = { + sizes: number[]; + domains: string[]; + remotePatterns?: RemotePattern[]; + minimumCacheTTL?: number; // seconds + formats?: ImageFormat[]; + dangerouslyAllowSVG?: boolean; + contentSecurityPolicy?: string; + contentDispositionType?: string; +}; + export interface EdgeConfig { /** - * Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions) + * Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) (`'edge'`) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions) (`'nodejs18.x'`, `'nodejs20.x'` etc). */ runtime?: 'edge'; /** @@ -74,7 +95,12 @@ export interface EdgeConfig { split?: boolean; } -export type Config = EdgeConfig | ServerlessConfig; +export type Config = (EdgeConfig | ServerlessConfig) & { + /** + * https://vercel.com/docs/build-output-api/v3/configuration#images + */ + images?: ImagesConfig; +}; // we copy the RequestContext interface from `@vercel/edge` because that package can't co-exist with `@types/node`. // see https://github.com/sveltejs/kit/pull/9280#issuecomment-1452110035 diff --git a/packages/adapter-vercel/index.js b/packages/adapter-vercel/index.js index a46a953dd32f..a1f141d3bc12 100644 --- a/packages/adapter-vercel/index.js +++ b/packages/adapter-vercel/index.js @@ -1,32 +1,50 @@ import fs from 'node:fs'; import path from 'node:path'; +import process from 'node:process'; import { fileURLToPath } from 'node:url'; import { nodeFileTrace } from '@vercel/nft'; import esbuild from 'esbuild'; -import { get_pathname } from './utils.js'; +import { get_pathname, pattern_to_src } from './utils.js'; +import { VERSION } from '@sveltejs/kit'; -const VALID_RUNTIMES = ['edge', 'nodejs16.x', 'nodejs18.x']; - -const DEFAULT_FUNCTION_NAME = 'fn'; +const name = '@sveltejs/adapter-vercel'; +const INTERNAL = '![-]'; // this name is guaranteed not to conflict with user routes const get_default_runtime = () => { - const major = process.version.slice(1).split('.')[0]; - if (major === '16') return 'nodejs16.x'; - if (major === '18') return 'nodejs18.x'; + const major = Number(process.version.slice(1).split('.')[0]); + + // If we're building on Vercel, we know that the version will be fine because Vercel + // provides Node (and Vercel won't provide something it doesn't support). + // Also means we're not on the hook for updating the adapter every time a new Node + // version is added to Vercel. + if (!process.env.VERCEL) { + if (major < 18 || major > 22) { + throw new Error( + `Building locally with unsupported Node.js version: ${process.version}. Please use Node 18, 20 or 22 to build your project, or explicitly specify a runtime in your adapter configuration.` + ); + } - throw new Error( - `Unsupported Node.js version: ${process.version}. Please use Node 16 or Node 18 to build your project, or explicitly specify a runtime in your adapter configuration.` - ); + if (major % 2 !== 0) { + throw new Error( + `Unsupported Node.js version: ${process.version}. Please use an even-numbered Node version to build your project, or explicitly specify a runtime in your adapter configuration.` + ); + } + } + + return `nodejs${major}.x`; }; -/** @type {import('.').default} **/ +// https://vercel.com/docs/functions/edge-functions/edge-runtime#compatible-node.js-modules +const compatible_node_modules = ['async_hooks', 'events', 'buffer', 'assert', 'util']; + +/** @type {import('./index.js').default} **/ const plugin = function (defaults = {}) { if ('edge' in defaults) { throw new Error("{ edge: true } has been removed in favour of { runtime: 'edge' }"); } return { - name: '@sveltejs/adapter-vercel', + name, async adapt(builder) { if (!builder.routes) { @@ -55,16 +73,23 @@ const plugin = function (defaults = {}) { functions: `${dir}/functions` }; - const static_config = static_vercel_config(builder); + builder.log.minor('Copying assets...'); + + builder.writeClient(dirs.static); + builder.writePrerendered(dirs.static); + + const static_config = static_vercel_config(builder, defaults, dirs.static); builder.log.minor('Generating serverless function...'); /** * @param {string} name - * @param {import('.').ServerlessConfig} config - * @param {import('@sveltejs/kit').RouteDefinition<import('.').Config>[]} routes + * @param {import('./index.js').ServerlessConfig} config + * @param {import('@sveltejs/kit').RouteDefinition<import('./index.js').Config>[]} routes */ async function generate_serverless_function(name, config, routes) { + const dir = `${dirs.functions}/${name}.func`; + const relativePath = path.posix.relative(tmp, builder.getServerDirectory()); builder.copy(`${files}/serverless.js`, `${tmp}/index.js`, { @@ -79,18 +104,18 @@ const plugin = function (defaults = {}) { `export const manifest = ${builder.generateManifest({ relativePath, routes })};\n` ); - await create_function_bundle( - builder, - `${tmp}/index.js`, - `${dirs.functions}/${name}.func`, - config - ); + await create_function_bundle(builder, `${tmp}/index.js`, dir, config); + + for (const asset of builder.findServerAssets(routes)) { + // TODO use symlinks, once Build Output API supports doing so + builder.copy(`${builder.getServerDirectory()}/${asset}`, `${dir}/${asset}`); + } } /** * @param {string} name - * @param {import('.').EdgeConfig} config - * @param {import('@sveltejs/kit').RouteDefinition<import('.').EdgeConfig>[]} routes + * @param {import('./index.js').EdgeConfig} config + * @param {import('@sveltejs/kit').RouteDefinition<import('./index.js').EdgeConfig>[]} routes */ async function generate_edge_function(name, config, routes) { const tmp = builder.getBuildDirectory(`vercel-tmp/${name}`); @@ -108,20 +133,77 @@ const plugin = function (defaults = {}) { `export const manifest = ${builder.generateManifest({ relativePath, routes })};\n` ); - await esbuild.build({ - entryPoints: [`${tmp}/edge.js`], - outfile: `${dirs.functions}/${name}.func/index.js`, - target: 'es2020', // TODO verify what the edge runtime supports - bundle: true, - platform: 'browser', - format: 'esm', - external: config.external, - sourcemap: 'linked', - banner: { js: 'globalThis.global = globalThis;' }, - loader: { - '.wasm': 'copy' + try { + const result = await esbuild.build({ + entryPoints: [`${tmp}/edge.js`], + outfile: `${dirs.functions}/${name}.func/index.js`, + // minimum Node.js version supported is v14.6.0 that is mapped to ES2019 + // https://edge-runtime.vercel.app/features/polyfills + // TODO verify the latest ES version the edge runtime supports + target: 'es2020', + bundle: true, + platform: 'browser', + conditions: [ + // Vercel's Edge runtime key https://runtime-keys.proposal.wintercg.org/#edge-light + 'edge-light', + // re-include these since they are included by default when no conditions are specified + // https://esbuild.github.io/api/#conditions + 'module' + ], + format: 'esm', + external: [ + ...compatible_node_modules, + ...compatible_node_modules.map((id) => `node:${id}`), + ...(config.external || []) + ], + sourcemap: 'linked', + banner: { js: 'globalThis.global = globalThis;' }, + loader: { + '.wasm': 'copy', + '.woff': 'copy', + '.woff2': 'copy', + '.ttf': 'copy', + '.eot': 'copy', + '.otf': 'copy' + } + }); + + if (result.warnings.length > 0) { + const formatted = await esbuild.formatMessages(result.warnings, { + kind: 'warning', + color: true + }); + + console.error(formatted.join('\n')); } - }); + } catch (err) { + const error = /** @type {import('esbuild').BuildFailure} */ (err); + for (const e of error.errors) { + for (const node of e.notes) { + const match = + /The package "(.+)" wasn't found on the file system but is built into node/.exec( + node.text + ); + + if (match) { + node.text = `Cannot use "${match[1]}" when deploying to Vercel Edge Functions.`; + } + } + } + + const formatted = await esbuild.formatMessages(error.errors, { + kind: 'error', + color: true + }); + + console.error(formatted.join('\n')); + + throw new Error( + `Bundling with esbuild failed with ${error.errors.length} ${ + error.errors.length === 1 ? 'error' : 'errors' + }` + ); + } write( `${dirs.functions}/${name}.func/.vc-config.json`, @@ -129,7 +211,11 @@ const plugin = function (defaults = {}) { { runtime: config.runtime, regions: config.regions, - entrypoint: 'index.js' + entrypoint: 'index.js', + framework: { + slug: 'sveltekit', + version: VERSION + } }, null, '\t' @@ -137,7 +223,7 @@ const plugin = function (defaults = {}) { ); } - /** @type {Map<string, { i: number, config: import('.').Config, routes: import('@sveltejs/kit').RouteDefinition<import('.').Config>[] }>} */ + /** @type {Map<string, { i: number, config: import('./index.js').Config, routes: import('@sveltejs/kit').RouteDefinition<import('./index.js').Config>[] }>} */ const groups = new Map(); /** @type {Map<string, { hash: string, route_id: string }>} */ @@ -146,7 +232,7 @@ const plugin = function (defaults = {}) { /** @type {Map<string, string>} */ const functions = new Map(); - /** @type {Map<import('@sveltejs/kit').RouteDefinition<import('.').Config>, { expiration: number | false, bypassToken: string | undefined, allowQuery: string[], group: number, passQuery: true }>} */ + /** @type {Map<import('@sveltejs/kit').RouteDefinition<import('./index.js').Config>, { expiration: number | false, bypassToken: string | undefined, allowQuery: string[], group: number, passQuery: true }>} */ const isr_config = new Map(); /** @type {Set<string>} */ @@ -164,20 +250,20 @@ const plugin = function (defaults = {}) { continue; } - if (runtime && !VALID_RUNTIMES.includes(runtime)) { + const node_runtime = /nodejs([0-9]+)\.x/.exec(runtime); + if (runtime !== 'edge' && (!node_runtime || parseInt(node_runtime[1]) < 18)) { throw new Error( - `Invalid runtime '${runtime}' for route ${ - route.id - }. Valid runtimes are ${VALID_RUNTIMES.join(', ')}` + `Invalid runtime '${runtime}' for route ${route.id}. Valid runtimes are 'edge' and 'nodejs18.x' or higher ` + + '(see the Node.js Version section in your Vercel project settings for info on the currently supported versions).' ); } if (config.isr) { const directory = path.relative('.', builder.config.kit.files.routes + route.id); - if (runtime !== 'nodejs16.x' && runtime !== 'nodejs18.x') { + if (!runtime.startsWith('nodejs')) { throw new Error( - `${directory}: Routes using \`isr\` must use either \`runtime: 'nodejs16.x'\` or \`runtime: 'nodejs18.x'\`` + `${directory}: Routes using \`isr\` must use a Node.js runtime (for example 'nodejs20.x')` ); } @@ -243,7 +329,7 @@ const plugin = function (defaults = {}) { group.config.runtime === 'edge' ? generate_edge_function : generate_serverless_function; // generate one function for the group - const name = singular ? DEFAULT_FUNCTION_NAME : `fn-${group.i}`; + const name = singular ? `${INTERNAL}/catchall` : `${INTERNAL}/${group.i}`; await generate_function( name, @@ -256,23 +342,27 @@ const plugin = function (defaults = {}) { } } - for (const route of builder.routes) { - if (is_prerendered(route)) continue; + if (!singular) { + // we need to create a catch-all route so that 404s are handled + // by SvelteKit rather than Vercel - const pattern = route.pattern.toString(); + const runtime = defaults.runtime ?? get_default_runtime(); + const generate_function = + runtime === 'edge' ? generate_edge_function : generate_serverless_function; - let src = pattern - // remove leading / and trailing $/ - .slice(1, -2) - // replace escaped \/ with / - .replace(/\\\//g, '/'); + await generate_function( + `${INTERNAL}/catchall`, + /** @type {any} */ ({ runtime, ...defaults }), + [] + ); + } - // replace the root route "^/" with "^/?" - if (src === '^/') { - src = '^/?'; - } + for (const route of builder.routes) { + if (is_prerendered(route)) continue; - const name = functions.get(pattern) ?? 'fn-0'; + const pattern = route.pattern.toString(); + const src = pattern_to_src(pattern); + const name = functions.get(pattern); const isr = isr_config.get(route); if (isr) { @@ -305,43 +395,92 @@ const plugin = function (defaults = {}) { src: src + '/__data.json$', dest: `/${isr_name}/__data.json${q}` }); - } else if (!singular) { - static_config.routes.push({ src: src + '(?:/__data.json)?$', dest: `/${name}` }); - } - } + } else { + // Create a symlink for each route to the main function for better observability + // (without this, every request appears to go through `/![-]`) - if (!singular) { - // we need to create a catch-all route so that 404s are handled - // by SvelteKit rather than Vercel + // Use 'index' for the root route's filesystem representation + // Use an empty string ('') for the root route's destination name part in Vercel config + const is_root = route.id === '/'; + const route_fs_name = is_root ? 'index' : route.id.slice(1); + const route_dest_name = is_root ? '' : route.id.slice(1); - const runtime = defaults.runtime ?? get_default_runtime(); - const generate_function = - runtime === 'edge' ? generate_edge_function : generate_serverless_function; + // Define paths using path.join for safety + const base_dir = path.join(dirs.functions, route_fs_name); // e.g., .vercel/output/functions/index + // The main symlink should be named based on the route, adjacent to its potential directory + const main_symlink_path = `${base_dir}.func`; // e.g., .vercel/output/functions/index.func + // The data symlink goes inside the directory + const data_symlink_path = path.join(base_dir, '__data.json.func'); // e.g., .vercel/output/functions/index/__data.json.func - await generate_function( - DEFAULT_FUNCTION_NAME, - /** @type {any} */ ({ runtime, ...defaults }), + const target = path.join(dirs.functions, `${name}.func`); // The actual function directory e.g., .vercel/output/functions/![-].func + + // Ensure the directory for the data endpoint symlink exists (e.g., functions/index/) + builder.mkdirp(base_dir); + + // Calculate relative paths FROM the directory containing the symlink TO the target + const relative_for_main = path.relative(path.dirname(main_symlink_path), target); + const relative_for_data = path.relative(path.dirname(data_symlink_path), target); // This is path.relative(base_dir, target) + + // Create symlinks + fs.symlinkSync(relative_for_main, main_symlink_path); // Creates functions/index.func -> ![-].func + fs.symlinkSync(relative_for_data, data_symlink_path); // Creates functions/index/__data.json.func -> ../![-].func + + // Add route to the config + static_config.routes.push({ + src: src + '(?:/__data.json)?$', // Matches the incoming request path + dest: `/${route_dest_name}` // Maps to the function: '/' for root, '/about' for about, etc. + // Vercel uses this dest to find the corresponding .func dir/symlink + }); + } + } + + // optional chaining to support older versions that don't have this setting yet + if (builder.config.kit.router?.resolution === 'server') { + // Create a separate edge function just for server-side route resolution. + // By omitting all routes we're ensuring it's small (the routes will still be available + // to the route resolution, because it does not rely on the server routing manifest) + await generate_edge_function( + `${builder.config.kit.appDir}/route`, + { + external: 'external' in defaults ? defaults.external : undefined, + runtime: 'edge' + }, [] ); + + static_config.routes.push({ + src: `${builder.config.kit.paths.base}/(|.+/)__route\\.js`, + dest: `${builder.config.kit.paths.base}/${builder.config.kit.appDir}/route` + }); } // Catch-all route must come at the end, otherwise it will swallow all other routes, // including ISR aliases if there is only one function - static_config.routes.push({ src: '/.*', dest: `/${DEFAULT_FUNCTION_NAME}` }); - - builder.log.minor('Copying assets...'); - - builder.writeClient(dirs.static); - builder.writePrerendered(dirs.static); + static_config.routes.push({ src: '/.*', dest: `/${INTERNAL}/catchall` }); builder.log.minor('Writing routes...'); write(`${dir}/config.json`, JSON.stringify(static_config, null, '\t')); + }, + + supports: { + // reading from the filesystem only works in serverless functions + read: ({ config, route }) => { + const runtime = config.runtime ?? defaults.runtime; + + if (runtime === 'edge') { + throw new Error( + `${name}: Cannot use \`read\` from \`$app/server\` in route \`${route.id}\` configured with \`runtime: 'edge'\`` + ); + } + + return true; + } } }; }; -/** @param {import('.').EdgeConfig & import('.').ServerlessConfig} config */ +/** @param {import('./index.js').EdgeConfig & import('./index.js').ServerlessConfig} config */ function hash_config(config) { return [ config.runtime ?? '', @@ -368,15 +507,32 @@ function write(file, data) { } // This function is duplicated in adapter-static -/** @param {import('@sveltejs/kit').Builder} builder */ -function static_vercel_config(builder) { +/** + * @param {import('@sveltejs/kit').Builder} builder + * @param {import('./index.js').Config} config + * @param {string} dir + */ +function static_vercel_config(builder, config, dir) { /** @type {any[]} */ const prerendered_redirects = []; /** @type {Record<string, { path: string }>} */ const overrides = {}; - for (const [src, redirect] of builder.prerendered.redirects) { + /** @type {import('./index.js').ImagesConfig | undefined} */ + const images = config.images; + + for (let [src, redirect] of builder.prerendered.redirects) { + if (src.replace(/\/$/, '') === redirect.location.replace(/\/$/, '')) { + // ignore the extreme edge case of a `/foo` -> `/foo/` redirect, + // which would only arise if the response was generated by a + // `handle` hook or outside the app altogether (since you + // can't declaratively create both routes) + } else { + // redirect both `/foo` and `/foo/` to `redirect.location` + src = src.replace(/\/?$/, '/?'); + } + prerendered_redirects.push({ src, headers: { @@ -407,21 +563,62 @@ function static_vercel_config(builder) { overrides[page.file] = { path: overrides_path }; } - return { - version: 3, - routes: [ - ...prerendered_redirects, - { - src: `/${builder.getAppPath()}/immutable/.+`, - headers: { - 'cache-control': 'public, immutable, max-age=31536000' + const routes = [ + ...prerendered_redirects, + { + src: `/${builder.getAppPath()}/immutable/.+`, + headers: { + 'cache-control': 'public, immutable, max-age=31536000' + } + } + ]; + + // https://vercel.com/docs/deployments/skew-protection + if (process.env.VERCEL_SKEW_PROTECTION_ENABLED) { + routes.push({ + src: '/.*', + has: [ + { + type: 'header', + key: 'Sec-Fetch-Dest', + value: 'document' } + ], + headers: { + 'Set-Cookie': `__vdpl=${process.env.VERCEL_DEPLOYMENT_ID}; Path=${builder.config.kit.paths.base}/; SameSite=Strict; Secure; HttpOnly` }, - { - handle: 'filesystem' - } - ], - overrides + continue: true + }); + + // this is a dreadful hack that is necessary until the Vercel Build Output API + // allows you to set multiple cookies for a single route. essentially, since we + // know that the entry file will be requested immediately, we can set the second + // cookie in _that_ response rather than the document response + const base = `${dir}/${builder.config.kit.appDir}/immutable/entry`; + const entry = fs.readdirSync(base).find((file) => file.startsWith('start.')); + + if (!entry) { + throw new Error('Could not find entry point'); + } + + routes.splice(-2, 0, { + src: `/${builder.getAppPath()}/immutable/entry/${entry}`, + headers: { + 'Set-Cookie': `__vdpl=; Path=/${builder.getAppPath()}/version.json; SameSite=Strict; Secure; HttpOnly` + }, + continue: true + }); + } + + routes.push({ + handle: 'filesystem' + }); + + return { + version: 3, + routes, + overrides, + images }; } @@ -429,7 +626,7 @@ function static_vercel_config(builder) { * @param {import('@sveltejs/kit').Builder} builder * @param {string} entry * @param {string} dir - * @param {import('.').ServerlessConfig} config + * @param {import('./index.js').ServerlessConfig} config */ async function create_function_bundle(builder, entry, dir, config) { fs.rmSync(dir, { force: true, recursive: true }); @@ -532,7 +729,11 @@ async function create_function_bundle(builder, entry, dir, config) { maxDuration: config.maxDuration, handler: path.relative(base + ancestor, entry), launcherType: 'Nodejs', - experimentalResponseStreaming: !config.isr + experimentalResponseStreaming: !config.isr, + framework: { + slug: 'sveltekit', + version: VERSION + } }, null, '\t' diff --git a/packages/adapter-vercel/package.json b/packages/adapter-vercel/package.json index e9af9d7f78f2..7bca4f37fe09 100644 --- a/packages/adapter-vercel/package.json +++ b/packages/adapter-vercel/package.json @@ -1,14 +1,22 @@ { "name": "@sveltejs/adapter-vercel", - "version": "3.0.3", + "version": "5.7.2", "description": "A SvelteKit adapter that creates a Vercel app", + "keywords": [ + "adapter", + "deploy", + "hosting", + "svelte", + "sveltekit", + "vercel" + ], "repository": { "type": "git", "url": "https://github.com/sveltejs/kit", "directory": "packages/adapter-vercel" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { @@ -22,25 +30,27 @@ "files", "index.js", "utils.js", - "index.d.ts" + "index.d.ts", + "ambient.d.ts" ], "scripts": { - "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore", + "lint": "prettier --check .", "format": "pnpm lint --write", "check": "tsc", "test": "vitest run" }, "dependencies": { - "@vercel/nft": "^0.24.0", - "esbuild": "^0.18.11" + "@vercel/nft": "^0.29.2", + "esbuild": "^0.25.4" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "@types/node": "^16.18.6", - "typescript": "^4.9.4", - "vitest": "^0.34.5" + "@sveltejs/vite-plugin-svelte": "catalog:", + "@types/node": "^18.19.48", + "typescript": "^5.3.3", + "vitest": "catalog:" }, "peerDependencies": { - "@sveltejs/kit": "^1.5.0" + "@sveltejs/kit": "^2.4.0" } } diff --git a/packages/adapter-vercel/test/utils.spec.js b/packages/adapter-vercel/test/utils.spec.js index 077040135338..866523a99351 100644 --- a/packages/adapter-vercel/test/utils.spec.js +++ b/packages/adapter-vercel/test/utils.spec.js @@ -1,5 +1,8 @@ import { assert, test } from 'vitest'; -import { get_pathname } from '../utils.js'; +import { get_pathname, pattern_to_src } from '../utils.js'; + +// workaround so that TypeScript doesn't follow that import which makes it pick up that file and then error on missing import aliases +const { parse_route_id } = await import('../../kit/src/' + 'utils/routing.js'); /** * @param {import('@sveltejs/kit').RouteDefinition<any>['segments']} segments @@ -14,6 +17,16 @@ test('get_pathname for simple route', () => { run_get_pathname_test([{ content: 'foo', dynamic: false, rest: false }], 'foo'); }); +test('get_pathname for simple route with multiple segments', () => { + run_get_pathname_test( + [ + { content: 'foo', dynamic: false, rest: false }, + { content: 'bar', dynamic: false, rest: false } + ], + 'foo/bar' + ); +}); + test('get_pathname for route with parameters', () => { run_get_pathname_test( [ @@ -33,3 +46,87 @@ test('get_pathname for route with parameters within segment', () => { 'foo-$1/$2-buz' ); }); + +test('get_pathname for route with optional parameters within segment', () => { + run_get_pathname_test( + [ + { content: 'foo-[[bar]]', dynamic: true, rest: false }, + { content: '[[baz]]-buz', dynamic: true, rest: false } + ], + 'foo-$1/$2-buz' + ); +}); + +test('get_pathname for route with rest parameter', () => { + run_get_pathname_test( + [ + { content: 'foo', dynamic: false, rest: false }, + { content: '[[...rest]]', dynamic: true, rest: true } + ], + 'foo$1' + ); +}); + +test('get_pathname for route with required and rest parameter', () => { + run_get_pathname_test( + [ + { content: '[foo]', dynamic: true, rest: false }, + { content: '[...rest]', dynamic: true, rest: true } + ], + '$1$2' + ); +}); + +test('get_pathname for route with required and optional parameter', () => { + run_get_pathname_test( + [ + { content: '[foo]', dynamic: true, rest: false }, + { content: '[[optional]]', dynamic: true, rest: true } + ], + '$1$2' + ); +}); + +test('get_pathname for route with required and optional parameter', () => { + run_get_pathname_test( + [ + { content: '[foo]', dynamic: true, rest: false }, + { content: '[[...rest]]', dynamic: true, rest: true }, + { content: 'bar', dynamic: false, rest: false } + ], + '$1$2/bar' + ); +}); + +/** + * @param {string} route_id + * @param {string} expected + */ +function run_pattern_to_src_test(route_id, expected) { + const { pattern } = parse_route_id(route_id); + assert.equal(pattern_to_src(pattern.toString()), expected); +} + +test('pattern_to_src for simple route', () => { + run_pattern_to_src_test('/', '^/?'); +}); + +test('pattern_to_src for route with parameters', () => { + run_pattern_to_src_test('/foo/[bar]', '^/foo/([^/]+?)/?'); +}); + +test('pattern_to_src for route with optional parameters', () => { + run_pattern_to_src_test('/foo/[[bar]]', '^/foo(/[^/]+)?/?'); +}); + +test('pattern_to_src for route with optional parameter in the middle', () => { + run_pattern_to_src_test('/foo/[[bar]]/baz', '^/foo(/[^/]+)?/baz/?'); +}); + +test('pattern_to_src for route with rest parameter', () => { + run_pattern_to_src_test('/foo/[...bar]', '^/foo(/.*)?/?'); +}); + +test('pattern_to_src for route with rest parameter in the middle', () => { + run_pattern_to_src_test('/foo/[...bar]/baz', '^/foo(/.*)?/baz/?'); +}); diff --git a/packages/adapter-vercel/tsconfig.json b/packages/adapter-vercel/tsconfig.json index f93d6d1bbcc8..3d157ebc29e5 100644 --- a/packages/adapter-vercel/tsconfig.json +++ b/packages/adapter-vercel/tsconfig.json @@ -5,14 +5,13 @@ "strict": true, "noEmit": true, "noImplicitAny": true, - "module": "es2022", - "moduleResolution": "node", "target": "es2022", + "module": "node16", + "moduleResolution": "node16", "allowSyntheticDefaultImports": true, "baseUrl": ".", "paths": { "@sveltejs/kit": ["../kit/types/index"] } - }, - "include": ["**/*.js", "index.d.ts", "internal.d.ts"] + } } diff --git a/packages/adapter-vercel/utils.js b/packages/adapter-vercel/utils.js index de10073e8846..a41a9cb7a92c 100644 --- a/packages/adapter-vercel/utils.js +++ b/packages/adapter-vercel/utils.js @@ -2,22 +2,68 @@ export function get_pathname(route) { let i = 1; - return route.segments + const pathname = route.segments .map((segment) => { if (!segment.dynamic) { - return segment.content; + return '/' + segment.content; } const parts = segment.content.split(/\[(.+?)\](?!\])/); - return parts - .map((content, j) => { - if (j % 2) { - return `$${i++}`; - } else { - return content; - } - }) - .join(''); + let result = ''; + + if ( + parts.length === 3 && + !parts[0] && + !parts[2] && + (parts[1].startsWith('...') || parts[1][0] === '[') + ) { + // Special case: segment is a single optional or rest parameter. + // In that case we don't prepend a slash (also see comment in pattern_to_src). + result = `$${i++}`; + } else { + result = + '/' + + parts + .map((content, j) => { + if (j % 2) { + return `$${i++}`; + } else { + return content; + } + }) + .join(''); + } + + return result; }) - .join('/'); + .join(''); + + return pathname[0] === '/' ? pathname.slice(1) : pathname; +} + +/** + * Adjusts the stringified route regex for Vercel's routing system + * @param {string} pattern stringified route regex + */ +export function pattern_to_src(pattern) { + let src = pattern + // remove leading / and trailing $/ + .slice(1, -2) + // replace escaped \/ with / + .replace(/\\\//g, '/'); + + // replace the root route "^/" with "^/?" + if (src === '^/') { + src = '^/?'; + } + + // Move non-capturing groups that swallow slashes into their following capturing groups. + // This is necessary because during ISR we're using the regex to construct the __pathname + // query parameter: In case of a route like [required]/[...rest] we need to turn them + // into $1$2 and not $1/$2, because if [...rest] is empty, we don't want to have a trailing + // slash in the __pathname query parameter which wasn't there in the original URL, as that + // could result in a false trailing slash redirect in the SvelteKit runtime, leading to infinite redirects. + src = src.replace(/\(\?:\/\((.+?)\)\)/g, '(/$1)'); + + return src; } diff --git a/packages/amp/CHANGELOG.md b/packages/amp/CHANGELOG.md index 6e2faf9b7596..b7e808115ec2 100644 --- a/packages/amp/CHANGELOG.md +++ b/packages/amp/CHANGELOG.md @@ -1,5 +1,47 @@ # @sveltejs/amp +## 1.1.4 +### Patch Changes + + +- docs: update URLs for new svelte.dev site ([#12857](https://github.com/sveltejs/kit/pull/12857)) + +- Updated dependencies [[`dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46`](https://github.com/sveltejs/kit/commit/dcbe4222a194c5f90cfc0fc020cf065f7a4e4c46), [`4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d`](https://github.com/sveltejs/kit/commit/4cdbf76fbbf0c0ce7f574ef69c8daddcf954d39d), [`3a9b78f04786898ca93f6d4b75ab18d26bc45192`](https://github.com/sveltejs/kit/commit/3a9b78f04786898ca93f6d4b75ab18d26bc45192), [`723eb8b31e6a22c82f730c30e485386c8676b746`](https://github.com/sveltejs/kit/commit/723eb8b31e6a22c82f730c30e485386c8676b746), [`8ec471c875345b751344e67580ff1b772ef2735b`](https://github.com/sveltejs/kit/commit/8ec471c875345b751344e67580ff1b772ef2735b)]: + - @sveltejs/kit@2.7.3 + +## 1.1.3 +### Patch Changes + + +- chore: configure provenance in a simpler manner ([#12570](https://github.com/sveltejs/kit/pull/12570)) + +- Updated dependencies [[`087a43d391fc38b8c008fb39a804dc6988974101`](https://github.com/sveltejs/kit/commit/087a43d391fc38b8c008fb39a804dc6988974101)]: + - @sveltejs/kit@2.5.22 + +## 1.1.2 +### Patch Changes + + +- chore: package provenance ([#12567](https://github.com/sveltejs/kit/pull/12567)) + +- Updated dependencies [[`4930a8443caa53bcecee7b690cd28e429b1c8a20`](https://github.com/sveltejs/kit/commit/4930a8443caa53bcecee7b690cd28e429b1c8a20)]: + - @sveltejs/kit@2.5.21 + +## 1.1.1 + +### Patch Changes + +- chore: add keywords for discovery in npm search ([#12330](https://github.com/sveltejs/kit/pull/12330)) + +- Updated dependencies [[`25acb1d9fce998dccd8050b93cf4142c2b082611`](https://github.com/sveltejs/kit/commit/25acb1d9fce998dccd8050b93cf4142c2b082611), [`642c4a4aff4351b786fe6274aa2f0bf7d905faf9`](https://github.com/sveltejs/kit/commit/642c4a4aff4351b786fe6274aa2f0bf7d905faf9), [`0a0e9aa897123ebec50af08e9385b2ca4fc5bb28`](https://github.com/sveltejs/kit/commit/0a0e9aa897123ebec50af08e9385b2ca4fc5bb28)]: + - @sveltejs/kit@2.5.11 + +## 1.1.0 + +### Minor Changes + +- feat: allow SvelteKit 2 as peer dependency ([#11233](https://github.com/sveltejs/kit/pull/11233)) + ## 1.0.2 ### Patch Changes diff --git a/packages/amp/package.json b/packages/amp/package.json index c204ba87f343..972f6a56e4b8 100644 --- a/packages/amp/package.json +++ b/packages/amp/package.json @@ -1,14 +1,20 @@ { "name": "@sveltejs/amp", - "version": "1.0.2", + "version": "1.1.4", "description": "AMP integration for SvelteKit", + "keywords": [ + "accelerated mobile pages", + "amp", + "svelte", + "sveltekit" + ], "repository": { "type": "git", "url": "https://github.com/sveltejs/kit", "directory": "packages/amp" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "exports": { ".": { @@ -23,10 +29,14 @@ "index.d.ts" ], "scripts": { - "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore", + "check": "tsc", + "lint": "prettier --check .", "format": "pnpm lint --write" }, + "devDependencies": { + "typescript": "^5.3.3" + }, "peerDependencies": { - "@sveltejs/kit": "^1.0.0" + "@sveltejs/kit": "^1.0.0 || ^2.0.0" } } diff --git a/packages/amp/tsconfig.json b/packages/amp/tsconfig.json new file mode 100644 index 000000000000..26885cff272f --- /dev/null +++ b/packages/amp/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "noEmit": true, + "strict": true, + "target": "es2022", + "module": "node16", + "moduleResolution": "node16", + "allowSyntheticDefaultImports": true + } +} diff --git a/packages/create-svelte/.gitignore b/packages/create-svelte/.gitignore index 46c461e5b123..14b636183d83 100644 --- a/packages/create-svelte/.gitignore +++ b/packages/create-svelte/.gitignore @@ -11,4 +11,4 @@ /templates/*/.vercel_build_output /templates/*/.netlify /templates/*/dist -/templates/*/package \ No newline at end of file +/templates/*/package diff --git a/packages/create-svelte/CHANGELOG.md b/packages/create-svelte/CHANGELOG.md index 92a8d4a3f20d..9c00ac242399 100644 --- a/packages/create-svelte/CHANGELOG.md +++ b/packages/create-svelte/CHANGELOG.md @@ -1,5 +1,248 @@ # create-svelte +## 7.0.0 +### Major Changes + + +- breaking: the `create-svelte` package has been replaced by the `sv` package ([#12850](https://github.com/sveltejs/kit/pull/12850)) + +## 6.4.0 +### Minor Changes + + +- feat: mark scripts in libraries as being side effect free by default ([#12372](https://github.com/sveltejs/kit/pull/12372)) + +## 6.3.12 +### Patch Changes + + +- chore: update typescript-eslint configs ([#12721](https://github.com/sveltejs/kit/pull/12721)) + +## 6.3.11 +### Patch Changes + + +- fix: import `node:process` instead of using globals ([#12641](https://github.com/sveltejs/kit/pull/12641)) + +## 6.3.10 +### Patch Changes + + +- chore: bump svelte-check to v4 ([#12642](https://github.com/sveltejs/kit/pull/12642)) + +## 6.3.9 +### Patch Changes + + +- chore: bump publint to v0.2 ([#12602](https://github.com/sveltejs/kit/pull/12602)) + +## 6.3.8 +### Patch Changes + + +- fix: use `vite-plugin-svelte` v4 pre-release when Svelte 5 is chosen ([#12586](https://github.com/sveltejs/kit/pull/12586)) + +## 6.3.7 +### Patch Changes + + +- chore: configure provenance in a simpler manner ([#12570](https://github.com/sveltejs/kit/pull/12570)) + +## 6.3.6 +### Patch Changes + + +- chore: package provenance ([#12567](https://github.com/sveltejs/kit/pull/12567)) + +## 6.3.5 +### Patch Changes + + +- chore: upgrade to @fontsource/fira-mono v5 and @neoconfetti/svelte v2 ([#12497](https://github.com/sveltejs/kit/pull/12497)) + + +- chore: upgrade to typescript-eslint 8 final ([#12528](https://github.com/sveltejs/kit/pull/12528)) + +## 6.3.4 +### Patch Changes + + +- chore: upgrade to vitest 2 ([#12462](https://github.com/sveltejs/kit/pull/12462)) + + +- fix: remove unnecessary `tslib` dependency ([#12453](https://github.com/sveltejs/kit/pull/12453)) + + +- chore: bump @types/eslint to v9 ([#12496](https://github.com/sveltejs/kit/pull/12496)) + +## 6.3.3 +### Patch Changes + + +- chore: rename styles.css to app.css ([#12426](https://github.com/sveltejs/kit/pull/12426)) + +## 6.3.2 + +### Patch Changes + +- chore: update text about svelte-add ([#12337](https://github.com/sveltejs/kit/pull/12337)) + +## 6.3.1 + +### Patch Changes + +- chore: overhaul ignore configs ([#11938](https://github.com/sveltejs/kit/pull/11938)) + +- chore: add keywords for discovery in npm search ([#12330](https://github.com/sveltejs/kit/pull/12330)) + +## 6.3.0 + +### Minor Changes + +- feat: upgrade eslint to v9 ([#12268](https://github.com/sveltejs/kit/pull/12268)) + +## 6.2.1 + +### Patch Changes + +- fix: update default playwright test case for lib-project ([#12261](https://github.com/sveltejs/kit/pull/12261)) + +## 6.2.0 + +### Minor Changes + +- feat: make TypeScript the default for apps ([#12186](https://github.com/sveltejs/kit/pull/12186)) + +## 6.1.2 + +### Patch Changes + +- fix: set peerDependencies based on chosen Svelte version ([#12117](https://github.com/sveltejs/kit/pull/12117)) + +## 6.1.1 + +### Patch Changes + +- fix: go back to eslint 8 until typescript-eslint supports eslint 9 ([#12124](https://github.com/sveltejs/kit/pull/12124)) + +## 6.1.0 + +### Minor Changes + +- feat: upgrade eslint to v9 ([#12089](https://github.com/sveltejs/kit/pull/12089)) + +## 6.0.10 + +### Patch Changes + +- docs: update comment about path aliases ([#11788](https://github.com/sveltejs/kit/pull/11788)) + +## 6.0.9 + +### Patch Changes + +- chore: bump typescript-eslint to v7 ([#11845](https://github.com/sveltejs/kit/pull/11845)) + +## 6.0.8 + +### Patch Changes + +- chore: upgrade to vite 5.0.11 and vitest 1.2.0 ([#11632](https://github.com/sveltejs/kit/pull/11632)) + +## 6.0.7 + +### Patch Changes + +- fix: install eslint-plugin-svelte@next for svelte5 ([#11627](https://github.com/sveltejs/kit/pull/11627)) + +## 6.0.6 + +### Patch Changes + +- fix: set path: '/' in demo ([#11495](https://github.com/sveltejs/kit/pull/11495)) + +## 6.0.5 + +### Patch Changes + +- fix: set the correct type for the ESLint config object ([#11453](https://github.com/sveltejs/kit/pull/11453)) + +## 6.0.4 + +### Patch Changes + +- chore: update primary branch from master to main ([`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d)) + +## 6.0.3 + +### Patch Changes + +- fix: remove unnecessary @types/cookie package ([#11375](https://github.com/sveltejs/kit/pull/11375)) + +## 6.0.2 + +### Patch Changes + +- fix: use vitest 1.0 in playwright + vitest template ([#11376](https://github.com/sveltejs/kit/pull/11376)) + +## 6.0.1 + +### Patch Changes + +- chore: simplify `.prettierignore` ([#11349](https://github.com/sveltejs/kit/pull/11349)) + +## 6.0.0 + +### Major Changes + +- feat: create projects with SvelteKit 2 ([#11236](https://github.com/sveltejs/kit/pull/11236)) + +- breaking: require Node 18.13 or newer ([#11172](https://github.com/sveltejs/kit/pull/11172)) + +### Minor Changes + +- feat: update vitest to 1.0 ([#11196](https://github.com/sveltejs/kit/pull/11196)) + +## 5.3.4 + +### Patch Changes + +- chore: upgrade to prettier 3.1.1 ([#11304](https://github.com/sveltejs/kit/pull/11304)) + +## 5.3.3 + +### Patch Changes + +- fix: call Svelte 5 an alpha rather than beta ([#11119](https://github.com/sveltejs/kit/pull/11119)) + +## 5.3.2 + +### Patch Changes + +- chore: add type declaration to `.eslintrc.cjs` files ([#11091](https://github.com/sveltejs/kit/pull/11091)) + +## 5.3.1 + +### Patch Changes + +- chore: upgrade eslint-config-prettier ([#11037](https://github.com/sveltejs/kit/pull/11037)) + +## 5.3.0 + +### Minor Changes + +- feat: upgrade to prettier 3 and prettier-plugin-svelte 3 ([#10410](https://github.com/sveltejs/kit/pull/10410)) + +### Patch Changes + +- fix: correctly configure `module` and `noEmit` tsconfig and jsconfig properties ([#11029](https://github.com/sveltejs/kit/pull/11029)) + +## 5.2.0 + +### Minor Changes + +- feat: add option to try out Svelte 5 beta ([#11026](https://github.com/sveltejs/kit/pull/11026)) + ## 5.1.1 ### Patch Changes diff --git a/packages/create-svelte/README.md b/packages/create-svelte/README.md index 4a55cf05b021..74cacad79bde 100644 --- a/packages/create-svelte/README.md +++ b/packages/create-svelte/README.md @@ -1,33 +1,11 @@ # create-svelte -A CLI for creating new [SvelteKit](https://kit.svelte.dev) projects. Just run... +This package has been deprecated. Please see [`sv`](https://npmjs.com/package/sv) instead: ```bash -npm create svelte@latest +npx sv create ``` -...and follow the prompts. - -## API - -You can also use `create-svelte` programmatically: - -```js -import { create } from 'create-svelte'; - -await create('my-new-app', { - name: 'my-new-app', - template: 'default', // or 'skeleton' or 'skeletonlib' - types: 'checkjs', // or 'typescript' or null; - prettier: false, - eslint: false, - playwright: false, - vitest: false -}); -``` - -`checkjs` means your project will use TypeScript to typecheck JavaScript via [JSDoc comments](https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html). - ## License -[MIT](../../LICENSE). +[MIT](../../LICENSE) diff --git a/packages/create-svelte/bin.js b/packages/create-svelte/bin.js index fa5fc87cfb84..f4e33242a8e4 100755 --- a/packages/create-svelte/bin.js +++ b/packages/create-svelte/bin.js @@ -1,170 +1,3 @@ #!/usr/bin/env node -import fs from 'node:fs'; -import path from 'node:path'; -import * as p from '@clack/prompts'; -import { bold, cyan, grey, yellow } from 'kleur/colors'; -import { create } from './index.js'; -import { dist, package_manager } from './utils.js'; -const { version } = JSON.parse(fs.readFileSync(new URL('package.json', import.meta.url), 'utf-8')); -let cwd = process.argv[2] || '.'; - -console.log(` -${grey(`create-svelte version ${version}`)} -`); - -p.intro('Welcome to SvelteKit!'); - -if (cwd === '.') { - const dir = await p.text({ - message: 'Where should we create your project?', - placeholder: ' (hit Enter to use current directory)' - }); - - if (p.isCancel(dir)) process.exit(1); - - if (dir) { - cwd = /** @type {string} */ (dir); - } -} - -if (fs.existsSync(cwd)) { - if (fs.readdirSync(cwd).length > 0) { - const force = await p.confirm({ - message: 'Directory not empty. Continue?', - initialValue: false - }); - - // bail if `force` is `false` or the user cancelled with Ctrl-C - if (force !== true) { - process.exit(1); - } - } -} - -const options = await p.group( - { - template: () => - p.select({ - message: 'Which Svelte app template?', - // @ts-expect-error i have no idea what is going on here - options: fs.readdirSync(dist('templates')).map((dir) => { - const meta_file = dist(`templates/${dir}/meta.json`); - const { title, description } = JSON.parse(fs.readFileSync(meta_file, 'utf8')); - - return { - label: title, - hint: description, - value: dir - }; - }) - }), - - types: () => - p.select({ - message: 'Add type checking with TypeScript?', - initialValue: /** @type {'checkjs' | 'typescript' | null} */ ('checkjs'), - options: [ - { - label: 'Yes, using JavaScript with JSDoc comments', - value: 'checkjs' - }, - { - label: 'Yes, using TypeScript syntax', - value: 'typescript' - }, - { label: 'No', value: null } - ] - }), - - features: () => - p.multiselect({ - message: 'Select additional options (use arrow keys/space bar)', - required: false, - options: [ - { - value: 'eslint', - label: 'Add ESLint for code linting' - }, - { - value: 'prettier', - label: 'Add Prettier for code formatting' - }, - { - value: 'playwright', - label: 'Add Playwright for browser testing' - }, - { - value: 'vitest', - label: 'Add Vitest for unit testing' - } - ] - }) - }, - { onCancel: () => process.exit(1) } -); - -await create(cwd, { - name: path.basename(path.resolve(cwd)), - template: /** @type {'default' | 'skeleton' | 'skeletonlib'} */ (options.template), - types: options.types, - prettier: options.features.includes('prettier'), - eslint: options.features.includes('eslint'), - playwright: options.features.includes('playwright'), - vitest: options.features.includes('vitest') -}); - -p.outro('Your project is ready!'); - -if (options.types === 'typescript') { - console.log(bold('✔ Typescript')); - console.log(' Inside Svelte components, use <script lang="ts">\n'); -} else if (options.types === 'checkjs') { - console.log(bold('✔ Type-checked JavaScript')); - console.log(cyan(' https://www.typescriptlang.org/tsconfig#checkJs\n')); -} else if (options.template === 'skeletonlib') { - const warning = yellow('▲'); - console.log( - `${warning} You chose to not add type checking, but TypeScript will still be installed in order to generate type definitions when building the library\n` - ); -} - -if (options.features.includes('eslint')) { - console.log(bold('✔ ESLint')); - console.log(cyan(' https://github.com/sveltejs/eslint-plugin-svelte\n')); -} - -if (options.features.includes('prettier')) { - console.log(bold('✔ Prettier')); - console.log(cyan(' https://prettier.io/docs/en/options.html')); - console.log(cyan(' https://github.com/sveltejs/prettier-plugin-svelte#options\n')); -} - -if (options.features.includes('playwright')) { - console.log(bold('✔ Playwright')); - console.log(cyan(' https://playwright.dev\n')); -} - -if (options.features.includes('vitest')) { - console.log(bold('✔ Vitest')); - console.log(cyan(' https://vitest.dev\n')); -} - -console.log('Install community-maintained integrations:'); -console.log(cyan(' https://github.com/svelte-add/svelte-add')); - -console.log('\nNext steps:'); -let i = 1; - -const relative = path.relative(process.cwd(), cwd); -if (relative !== '') { - console.log(` ${i++}: ${bold(cyan(`cd ${relative}`))}`); -} - -console.log(` ${i++}: ${bold(cyan(`${package_manager} install`))}`); -// prettier-ignore -console.log(` ${i++}: ${bold(cyan('git init && git add -A && git commit -m "Initial commit"'))} (optional)`); -console.log(` ${i++}: ${bold(cyan(`${package_manager} run dev -- --open`))}`); - -console.log(`\nTo close the dev server, hit ${bold(cyan('Ctrl-C'))}`); -console.log(`\nStuck? Visit us at ${cyan('https://svelte.dev/chat')}`); +console.warn("'npm create svelte' has been replaced with 'npx sv create'"); diff --git a/packages/create-svelte/index.js b/packages/create-svelte/index.js deleted file mode 100755 index d6888950c337..000000000000 --- a/packages/create-svelte/index.js +++ /dev/null @@ -1,161 +0,0 @@ -import fs from 'node:fs'; -import path from 'node:path'; -import { mkdirp, copy, dist } from './utils.js'; - -/** @type {import('./types/index').create} */ -export async function create(cwd, options) { - mkdirp(cwd); - - write_template_files(options.template, options.types, options.name, cwd); - write_common_files(cwd, options, options.name); -} - -/** - * @param {string} template - * @param {'typescript' | 'checkjs' | null} types - * @param {string} name - * @param {string} cwd - */ -function write_template_files(template, types, name, cwd) { - const dir = dist(`templates/${template}`); - copy(`${dir}/assets`, cwd, (name) => name.replace('DOT-', '.')); - copy(`${dir}/package.json`, `${cwd}/package.json`); - - const manifest = `${dir}/files.types=${types}.json`; - const files = /** @type {import('./types/internal').File[]} */ ( - JSON.parse(fs.readFileSync(manifest, 'utf-8')) - ); - - files.forEach((file) => { - const dest = path.join(cwd, file.name); - mkdirp(path.dirname(dest)); - - fs.writeFileSync(dest, file.contents.replace(/~TODO~/g, name)); - }); -} - -/** - * - * @param {string} cwd - * @param {import('./types/internal').Options} options - * @param {string} name - */ -function write_common_files(cwd, options, name) { - const shared = dist('shared.json'); - const { files } = /** @type {import('./types/internal').Common} */ ( - JSON.parse(fs.readFileSync(shared, 'utf-8')) - ); - - const pkg_file = path.join(cwd, 'package.json'); - const pkg = /** @type {any} */ (JSON.parse(fs.readFileSync(pkg_file, 'utf-8'))); - - sort_files(files).forEach((file) => { - const include = file.include.every((condition) => matches_condition(condition, options)); - const exclude = file.exclude.some((condition) => matches_condition(condition, options)); - - if (exclude || !include) return; - - if (file.name === 'package.json') { - const new_pkg = JSON.parse(file.contents); - merge(pkg, new_pkg); - } else { - const dest = path.join(cwd, file.name); - mkdirp(path.dirname(dest)); - fs.writeFileSync(dest, file.contents); - } - }); - - pkg.dependencies = sort_keys(pkg.dependencies); - pkg.devDependencies = sort_keys(pkg.devDependencies); - pkg.name = to_valid_package_name(name); - - fs.writeFileSync(pkg_file, JSON.stringify(pkg, null, '\t') + '\n'); -} - -/** - * @param {import('./types/internal').Condition} condition - * @param {import('./types/internal').Options} options - * @returns {boolean} - */ -function matches_condition(condition, options) { - if (condition === 'default' || condition === 'skeleton' || condition === 'skeletonlib') { - return options.template === condition; - } - if (condition === 'typescript' || condition === 'checkjs') { - return options.types === condition; - } - return options[condition]; -} - -/** - * @param {any} target - * @param {any} source - */ -function merge(target, source) { - for (const key in source) { - if (key in target) { - const target_value = target[key]; - const source_value = source[key]; - - if ( - typeof source_value !== typeof target_value || - Array.isArray(source_value) !== Array.isArray(target_value) - ) { - throw new Error('Mismatched values'); - } - - if (typeof source_value === 'object') { - merge(target_value, source_value); - } else { - target[key] = source_value; - } - } else { - target[key] = source[key]; - } - } -} - -/** @param {Record<string, any>} obj */ -function sort_keys(obj) { - if (!obj) return; - - /** @type {Record<string, any>} */ - const sorted = {}; - Object.keys(obj) - .sort() - .forEach((key) => { - sorted[key] = obj[key]; - }); - - return sorted; -} - -/** - * Sort files so that those which apply more generically come first so they - * can be overwritten by files for more precise cases later. - * - * @param files {import('./types/internal').Common['files']} - * */ -function sort_files(files) { - return files.sort((f1, f2) => { - const f1_more_generic = - f1.include.every((include) => f2.include.includes(include)) && - f1.exclude.every((exclude) => f2.exclude.includes(exclude)); - const f2_more_generic = - f2.include.every((include) => f1.include.includes(include)) && - f2.exclude.every((exclude) => f1.exclude.includes(exclude)); - const same = f1_more_generic && f2_more_generic; - const different = !f1_more_generic && !f2_more_generic; - return same || different ? 0 : f1_more_generic ? -1 : 1; - }); -} - -/** @param {string} name */ -function to_valid_package_name(name) { - return name - .trim() - .toLowerCase() - .replace(/\s+/g, '-') - .replace(/^[._]/, '') - .replace(/[^a-z0-9~.-]+/g, '-'); -} diff --git a/packages/create-svelte/package.json b/packages/create-svelte/package.json index 28d4636f3390..f0a172780880 100644 --- a/packages/create-svelte/package.json +++ b/packages/create-svelte/package.json @@ -1,48 +1,27 @@ { "name": "create-svelte", - "version": "5.1.1", + "version": "7.0.0", + "type": "module", "description": "A CLI for creating new SvelteKit projects", + "keywords": [ + "create", + "new", + "project", + "starter", + "svelte", + "sveltekit", + "template", + "wizard" + ], "repository": { "type": "git", "url": "https://github.com/sveltejs/kit", "directory": "packages/create-svelte" }, "license": "MIT", - "homepage": "https://kit.svelte.dev", - "bin": "./bin.js", - "main": "./index.js", - "dependencies": { - "@clack/prompts": "^0.7.0", - "kleur": "^4.1.5" - }, - "devDependencies": { - "@playwright/test": "1.30.0", - "@types/gitignore-parser": "^0.0.2", - "@types/prettier": "^2.7.1", - "gitignore-parser": "^0.0.2", - "prettier": "^2.8.0", - "prettier-plugin-svelte": "^2.10.1", - "sucrase": "^3.29.0", - "svelte": "^4.0.5", - "tiny-glob": "^0.2.9", - "vitest": "^0.34.5" - }, - "scripts": { - "build": "node scripts/build-templates", - "test": "pnpm build && vitest run", - "check": "tsc", - "lint": "prettier --check . --config ../../.prettierrc --ignore-path ../../.gitignore --ignore-path .gitignore --plugin prettier-plugin-svelte --plugin-search-dir=.", - "format": "pnpm lint --write", - "prepublishOnly": "pnpm build", - "postpublish": "echo \"Updating template repo\" && bash ./scripts/update-template-repo.sh" - }, + "homepage": "https://svelte.dev", "files": [ - "index.js", - "dist", - "bin.js", - "utils.js", - "types" + "bin.js" ], - "types": "types/index.d.ts", - "type": "module" + "bin": "./bin.js" } diff --git a/packages/create-svelte/scripts/build-templates.js b/packages/create-svelte/scripts/build-templates.js deleted file mode 100644 index b1181243e3e1..000000000000 --- a/packages/create-svelte/scripts/build-templates.js +++ /dev/null @@ -1,286 +0,0 @@ -import fs from 'node:fs'; -import path from 'node:path'; -import parser from 'gitignore-parser'; -import prettier from 'prettier'; -import { transform } from 'sucrase'; -import glob from 'tiny-glob/sync.js'; -import { mkdirp, rimraf } from '../utils.js'; - -/** @param {string} content */ -function convert_typescript(content) { - let { code } = transform(content, { - transforms: ['typescript'], - disableESTransforms: true - }); - - // sucrase leaves invalid class fields intact - code = code.replace(/^\s*[a-z]+;$/gm, ''); - - // Prettier strips 'unnecessary' parens from .ts files, we need to hack them back in - code = code.replace(/(\/\*\* @type.+? \*\/) (.+?) \/\*\*\*\//g, '$1($2)'); - - return prettier.format(code, { - parser: 'babel', - useTabs: true, - singleQuote: true, - trailingComma: 'none', - printWidth: 100 - }); -} - -/** @param {string} content */ -function strip_jsdoc(content) { - return content - .replace(/ \/\*\*\*\//g, '') - .replace( - /\/\*\*([\s\S]+?)(@[\s\S]+?)?\*\/([\s\n]+)/g, - (match, description, tags, whitespace) => { - if (/^\s+(\*\s*)?$/.test(description)) { - return ''; - } - - return `/**${description.replace(/\* $/, '')}*/${whitespace}`; - } - ); -} - -/** @param {Set<string>} shared */ -async function generate_templates(shared) { - const templates = fs.readdirSync('templates'); - - for (const template of templates) { - if (template[0] === '.') continue; - - const dir = `dist/templates/${template}`; - const assets = `${dir}/assets`; - mkdirp(assets); - - const cwd = path.resolve('templates', template); - - const gitignore_file = path.join(cwd, '.gitignore'); - if (!fs.existsSync(gitignore_file)) { - throw new Error(`"${template}" template must have a .gitignore file`); - } - - const gitignore = parser.compile(fs.readFileSync(gitignore_file, 'utf-8')); - - const ignore_file = path.join(cwd, '.ignore'); - if (!fs.existsSync(ignore_file)) throw new Error('Template must have a .ignore file'); - const ignore = parser.compile(fs.readFileSync(ignore_file, 'utf-8')); - - const meta_file = path.join(cwd, '.meta.json'); - if (!fs.existsSync(meta_file)) throw new Error('Template must have a .meta.json file'); - - /** @type {Record<string, import('../types/internal.js').File[]>} */ - const types = { - typescript: [], - checkjs: [], - null: [] - }; - - glob('**/*', { cwd, filesOnly: true, dot: true }).forEach((name) => { - // the package.template.json thing is a bit annoying — basically we want - // to be able to develop and deploy the app from here, but have a different - // package.json in newly created projects (based on package.template.json) - if (name === 'package.template.json') { - let contents = fs.readFileSync(path.join(cwd, name), 'utf8'); - // TODO package-specific versions - contents = contents.replace(/workspace:\*/g, 'next'); - fs.writeFileSync(`${dir}/package.json`, contents); - return; - } - - // ignore files that are written conditionally - if (shared.has(name)) return; - - // ignore contents of .gitignore or .ignore - if (!gitignore.accepts(name) || !ignore.accepts(name) || name === '.ignore') return; - - if (/\.(ts|svelte)$/.test(name)) { - const contents = fs.readFileSync(path.join(cwd, name), 'utf8'); - - if (name.endsWith('.d.ts')) { - if (name.endsWith('app.d.ts')) types.checkjs.push({ name, contents }); - types.typescript.push({ name, contents }); - } else if (name.endsWith('.ts')) { - const js = convert_typescript(contents); - - types.typescript.push({ - name, - contents: strip_jsdoc(contents) - }); - - types.checkjs.push({ - name: name.replace(/\.ts$/, '.js'), - contents: js - }); - - types.null.push({ - name: name.replace(/\.ts$/, '.js'), - contents: strip_jsdoc(js) - }); - } else { - // we jump through some hoops, rather than just using svelte.preprocess, - // so that the output preserves the original formatting to the extent - // possible (e.g. preserving double line breaks). Sucrase is the best - // tool for the job because it just removes the types; Prettier then - // tidies up the end result - const js_contents = contents.replace( - /<script([^>]+)>([\s\S]+?)<\/script>/g, - (m, attrs, typescript) => { - // Sucrase assumes 'unused' imports (which _are_ used, but only - // in the markup) are type imports, and strips them. This step - // prevents it from drawing that conclusion - const imports = []; - const import_pattern = /import (.+?) from/g; - let import_match; - while ((import_match = import_pattern.exec(typescript))) { - const word_pattern = /[a-z_$][a-z0-9_$]*/gi; - let word_match; - while ((word_match = word_pattern.exec(import_match[1]))) { - imports.push(word_match[0]); - } - } - - const suffix = `\n${imports.join(',')}`; - - const transformed = transform(typescript + suffix, { - transforms: ['typescript'], - disableESTransforms: true - }).code.slice(0, -suffix.length); - - const contents = prettier - .format(transformed, { - parser: 'babel', - useTabs: true, - singleQuote: true, - trailingComma: 'none', - printWidth: 100 - }) - .trim() - .replace(/^(.)/gm, '\t$1'); - - return `<script${attrs.replace(' lang="ts"', '')}>\n${contents}\n</script>`; - } - ); - - types.typescript.push({ - name, - contents: strip_jsdoc(contents) - }); - - types.checkjs.push({ - name, - contents: js_contents - }); - - types.null.push({ - name, - contents: strip_jsdoc(js_contents) - }); - } - } else { - const dest = path.join(assets, name.replace(/^\./, 'DOT-')); - mkdirp(path.dirname(dest)); - fs.copyFileSync(path.join(cwd, name), dest); - } - }); - - fs.copyFileSync(meta_file, `${dir}/meta.json`); - fs.writeFileSync( - `${dir}/files.types=typescript.json`, - JSON.stringify(types.typescript, null, '\t') - ); - fs.writeFileSync(`${dir}/files.types=checkjs.json`, JSON.stringify(types.checkjs, null, '\t')); - fs.writeFileSync(`${dir}/files.types=null.json`, JSON.stringify(types.null, null, '\t')); - } -} - -async function generate_shared() { - const cwd = path.resolve('shared'); - - /** @type {Set<string>} */ - const shared = new Set(); - - /** @type {Array<{ name: string, include: string[], exclude: string[], contents: string }>} */ - const files = []; - - glob('**/*', { cwd, filesOnly: true, dot: true }).forEach((file) => { - const contents = fs.readFileSync(path.join(cwd, file), 'utf8'); - - /** @type {string[]} */ - const include = []; - - /** @type {string[]} */ - const exclude = []; - - let name = file; - - if (file.startsWith('+') || file.startsWith('-')) { - const [conditions, ...rest] = file.split(path.sep); - - const pattern = /([+-])([a-z]+)/g; - let match; - while ((match = pattern.exec(conditions))) { - const set = match[1] === '+' ? include : exclude; - set.push(match[2]); - } - - name = rest.join('/'); - } - - if (name.endsWith('.ts') && !include.includes('typescript')) { - // file includes types in TypeScript and JSDoc — - // create .js file, with and without JSDoc - const js = convert_typescript(contents); - const js_name = name.replace(/\.ts$/, '.js'); - - // typescript - files.push({ - name, - include: [...include, 'typescript'], - exclude, - contents: strip_jsdoc(contents) - }); - - // checkjs - files.push({ - name: js_name, - include: [...include, 'checkjs'], - exclude, - contents: js - }); - - // no typechecking - files.push({ - name: js_name, - include, - exclude: [...exclude, 'typescript', 'checkjs'], - contents: strip_jsdoc(js) - }); - - shared.add(name); - shared.add(js_name); - } else { - shared.add(name); - files.push({ name, include, exclude, contents }); - } - }); - - files.sort((a, b) => a.include.length + a.exclude.length - (b.include.length + b.exclude.length)); - - fs.writeFileSync('dist/shared.json', JSON.stringify({ files }, null, '\t')); - - shared.delete('package.json'); - return shared; -} - -async function main() { - rimraf('dist'); - mkdirp('dist'); - - const shared = await generate_shared(); - await generate_templates(shared); -} - -main(); diff --git a/packages/create-svelte/scripts/update-template-repo-contents.js b/packages/create-svelte/scripts/update-template-repo-contents.js deleted file mode 100644 index 78ec904d6a66..000000000000 --- a/packages/create-svelte/scripts/update-template-repo-contents.js +++ /dev/null @@ -1,43 +0,0 @@ -import fs from 'node:fs'; -import path from 'node:path'; -import { create } from '../index.js'; - -const repo = process.argv[2]; - -fs.readdirSync(repo).forEach((file) => { - if (file !== '.git') { - fs.rmSync(path.join(repo, file), { - recursive: true, - force: true - }); - } -}); - -await create(repo, { - name: 'kit-template-default', - template: 'default', - eslint: false, - types: 'checkjs', - prettier: true, - playwright: false, - vitest: false -}); - -// Remove the Sverdle from the template because it doesn't work within Stackblitz (cookies not set) -fs.rmSync(path.join(repo, 'src', 'routes', 'sverdle'), { force: true, recursive: true }); - -const header_file = path.join(repo, 'src', 'routes', 'Header.svelte'); -const header = fs.readFileSync(header_file, 'utf-8'); -fs.writeFileSync( - header_file, - // Remove the Sverdle link from the header - header.replace(/<\/li>\s+<li.+?'\/sverdle'[\s\S]+?<\/li>/, '</li>') -); - -const about_file = path.join(repo, 'src', 'routes', 'about', '+page.svelte'); -const about = fs.readFileSync(about_file, 'utf-8'); -fs.writeFileSync( - about_file, - // Remove the Sverdle paragraph from the about page - about.replace(/<\/p>\s+<p>\s+?[\s\S]+?Sverdle[\s\S]+?<\/p>/, '</p>') -); diff --git a/packages/create-svelte/scripts/update-template-repo.sh b/packages/create-svelte/scripts/update-template-repo.sh deleted file mode 100755 index f3997e29e43e..000000000000 --- a/packages/create-svelte/scripts/update-template-repo.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -get_abs_filename() { - # $1 : relative filename - echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")" -} - -DIR=$(get_abs_filename $(dirname "$0")) -TMP=$(get_abs_filename "$DIR/../node_modules/.tmp") - -mkdir -p $TMP -cd $TMP - -if [ "$CI" ]; then - (umask 0077; echo "$UPDATE_TEMPLATE_SSH_KEY" > ~/ssh_key;) - export GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=accept-new -i ~/ssh_key' -fi - -# clone the template repo -rm -rf kit-template-default -git clone --depth 1 --single-branch --branch main git@github.com:sveltejs/kit-template-default.git kit-template-default - -# empty out the repo -cd kit-template-default -node $DIR/update-template-repo-contents.js $TMP/kit-template-default - -if [ "$CI" ]; then - git config user.email 'noreply@svelte.dev' - git config user.name '[bot]' -fi - -# commit the new files -git add -A -git commit -m "version $npm_package_version" - -git push git@github.com:sveltejs/kit-template-default.git main -f \ No newline at end of file diff --git a/packages/create-svelte/shared/+checkjs/package.json b/packages/create-svelte/shared/+checkjs/package.json deleted file mode 100644 index dd9befe46702..000000000000 --- a/packages/create-svelte/shared/+checkjs/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "scripts": { - "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch" - }, - "devDependencies": { - "typescript": "^5.0.0", - "svelte-check": "^3.4.3" - } -} diff --git a/packages/create-svelte/shared/+default+checkjs/package.json b/packages/create-svelte/shared/+default+checkjs/package.json deleted file mode 100644 index c06981203bab..000000000000 --- a/packages/create-svelte/shared/+default+checkjs/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "devDependencies": { - "@types/cookie": "^0.5.1" - } -} diff --git a/packages/create-svelte/shared/+default+checkjs/svelte.config.js b/packages/create-svelte/shared/+default+checkjs/svelte.config.js deleted file mode 100644 index 1cf26a00dfea..000000000000 --- a/packages/create-svelte/shared/+default+checkjs/svelte.config.js +++ /dev/null @@ -1,18 +0,0 @@ -import adapter from '@sveltejs/adapter-auto'; -import { vitePreprocess } from '@sveltejs/kit/vite'; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - // Consult https://kit.svelte.dev/docs/integrations#preprocessors - // for more information about preprocessors - preprocess: vitePreprocess(), - - kit: { - // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. - // If your environment is not supported or you settled on a specific environment, switch out the adapter. - // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter() - } -}; - -export default config; diff --git a/packages/create-svelte/shared/+default+typescript/package.json b/packages/create-svelte/shared/+default+typescript/package.json deleted file mode 100644 index c06981203bab..000000000000 --- a/packages/create-svelte/shared/+default+typescript/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "devDependencies": { - "@types/cookie": "^0.5.1" - } -} diff --git a/packages/create-svelte/shared/+default+typescript/svelte.config.js b/packages/create-svelte/shared/+default+typescript/svelte.config.js deleted file mode 100644 index 1cf26a00dfea..000000000000 --- a/packages/create-svelte/shared/+default+typescript/svelte.config.js +++ /dev/null @@ -1,18 +0,0 @@ -import adapter from '@sveltejs/adapter-auto'; -import { vitePreprocess } from '@sveltejs/kit/vite'; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - // Consult https://kit.svelte.dev/docs/integrations#preprocessors - // for more information about preprocessors - preprocess: vitePreprocess(), - - kit: { - // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. - // If your environment is not supported or you settled on a specific environment, switch out the adapter. - // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter() - } -}; - -export default config; diff --git a/packages/create-svelte/shared/+default+vitest/src/routes/sverdle/game.test.ts b/packages/create-svelte/shared/+default+vitest/src/routes/sverdle/game.test.ts deleted file mode 100644 index 99028b6f561e..000000000000 --- a/packages/create-svelte/shared/+default+vitest/src/routes/sverdle/game.test.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import { Game } from './game'; - -describe('game test', () => { - it('returns true when a valid word is entered', () => { - const game = new Game(); - expect(game.enter('zorro'.split(''))).toBe(true); - }); -}); diff --git a/packages/create-svelte/shared/+default-typescript/svelte.config.js b/packages/create-svelte/shared/+default-typescript/svelte.config.js deleted file mode 100644 index 348fa324acaa..000000000000 --- a/packages/create-svelte/shared/+default-typescript/svelte.config.js +++ /dev/null @@ -1,13 +0,0 @@ -import adapter from '@sveltejs/adapter-auto'; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - kit: { - // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. - // If your environment is not supported or you settled on a specific environment, switch out the adapter. - // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter() - } -}; - -export default config; diff --git a/packages/create-svelte/shared/+eslint+prettier+typescript/.eslintrc.cjs b/packages/create-svelte/shared/+eslint+prettier+typescript/.eslintrc.cjs deleted file mode 100644 index ebc19589fa57..000000000000 --- a/packages/create-svelte/shared/+eslint+prettier+typescript/.eslintrc.cjs +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - root: true, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:svelte/recommended', - 'prettier' - ], - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020, - extraFileExtensions: ['.svelte'] - }, - env: { - browser: true, - es2017: true, - node: true - }, - overrides: [ - { - files: ['*.svelte'], - parser: 'svelte-eslint-parser', - parserOptions: { - parser: '@typescript-eslint/parser' - } - } - ] -}; diff --git a/packages/create-svelte/shared/+eslint+prettier-typescript/.eslintrc.cjs b/packages/create-svelte/shared/+eslint+prettier-typescript/.eslintrc.cjs deleted file mode 100644 index 29c1d31bc5e5..000000000000 --- a/packages/create-svelte/shared/+eslint+prettier-typescript/.eslintrc.cjs +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - root: true, - extends: ['eslint:recommended', 'plugin:svelte/recommended', 'prettier'], - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020, - extraFileExtensions: ['.svelte'] - }, - env: { - browser: true, - es2017: true, - node: true - } -}; diff --git a/packages/create-svelte/shared/+eslint+prettier/package.json b/packages/create-svelte/shared/+eslint+prettier/package.json deleted file mode 100644 index 808ff280d4b8..000000000000 --- a/packages/create-svelte/shared/+eslint+prettier/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "devDependencies": { - "eslint-config-prettier": "^8.5.0" - }, - "scripts": { - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." - } -} diff --git a/packages/create-svelte/shared/+eslint+typescript/.eslintrc.cjs b/packages/create-svelte/shared/+eslint+typescript/.eslintrc.cjs deleted file mode 100644 index 9586e74c9f38..000000000000 --- a/packages/create-svelte/shared/+eslint+typescript/.eslintrc.cjs +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = { - root: true, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:svelte/recommended' - ], - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020, - extraFileExtensions: ['.svelte'] - }, - env: { - browser: true, - es2017: true, - node: true - }, - overrides: [ - { - files: ['*.svelte'], - parser: 'svelte-eslint-parser', - parserOptions: { - parser: '@typescript-eslint/parser' - } - } - ] -}; diff --git a/packages/create-svelte/shared/+eslint+typescript/package.json b/packages/create-svelte/shared/+eslint+typescript/package.json deleted file mode 100644 index d2072f21cd2b..000000000000 --- a/packages/create-svelte/shared/+eslint+typescript/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "@typescript-eslint/eslint-plugin": "^6.0.0", - "@typescript-eslint/parser": "^6.0.0" - } -} diff --git a/packages/create-svelte/shared/+eslint-prettier/package.json b/packages/create-svelte/shared/+eslint-prettier/package.json deleted file mode 100644 index d19da8e92a5e..000000000000 --- a/packages/create-svelte/shared/+eslint-prettier/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "scripts": { - "lint": "eslint ." - } -} diff --git a/packages/create-svelte/shared/+eslint-typescript/.eslintrc.cjs b/packages/create-svelte/shared/+eslint-typescript/.eslintrc.cjs deleted file mode 100644 index e52c4810ae6d..000000000000 --- a/packages/create-svelte/shared/+eslint-typescript/.eslintrc.cjs +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - root: true, - extends: ['eslint:recommended', 'plugin:svelte/recommended'], - parserOptions: { - sourceType: 'module', - ecmaVersion: 2020, - extraFileExtensions: ['.svelte'] - }, - env: { - browser: true, - es2017: true, - node: true - } -}; diff --git a/packages/create-svelte/shared/+eslint/.eslintignore b/packages/create-svelte/shared/+eslint/.eslintignore deleted file mode 100644 index 38972655faff..000000000000 --- a/packages/create-svelte/shared/+eslint/.eslintignore +++ /dev/null @@ -1,13 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example - -# Ignore files for PNPM, NPM and YARN -pnpm-lock.yaml -package-lock.json -yarn.lock diff --git a/packages/create-svelte/shared/+eslint/package.json b/packages/create-svelte/shared/+eslint/package.json deleted file mode 100644 index 375357e2deae..000000000000 --- a/packages/create-svelte/shared/+eslint/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "eslint": "^8.28.0", - "eslint-plugin-svelte": "^2.30.0" - } -} diff --git a/packages/create-svelte/shared/+playwright+default/tests/test.ts b/packages/create-svelte/shared/+playwright+default/tests/test.ts deleted file mode 100644 index 09d2c0346e57..000000000000 --- a/packages/create-svelte/shared/+playwright+default/tests/test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { expect, test } from '@playwright/test'; - -test('about page has expected h1', async ({ page }) => { - await page.goto('/about'); - await expect(page.getByRole('heading', { name: 'About this app' })).toBeVisible(); -}); diff --git a/packages/create-svelte/shared/+playwright+skeleton/tests/test.ts b/packages/create-svelte/shared/+playwright+skeleton/tests/test.ts deleted file mode 100644 index 5816be4132cb..000000000000 --- a/packages/create-svelte/shared/+playwright+skeleton/tests/test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { expect, test } from '@playwright/test'; - -test('index page has expected h1', async ({ page }) => { - await page.goto('/'); - await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible(); -}); diff --git a/packages/create-svelte/shared/+playwright+skeletonlib/tests/test.ts b/packages/create-svelte/shared/+playwright+skeletonlib/tests/test.ts deleted file mode 100644 index 5816be4132cb..000000000000 --- a/packages/create-svelte/shared/+playwright+skeletonlib/tests/test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { expect, test } from '@playwright/test'; - -test('index page has expected h1', async ({ page }) => { - await page.goto('/'); - await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible(); -}); diff --git a/packages/create-svelte/shared/+playwright+typescript/playwright.config.ts b/packages/create-svelte/shared/+playwright+typescript/playwright.config.ts deleted file mode 100644 index 1c5d7a1fd310..000000000000 --- a/packages/create-svelte/shared/+playwright+typescript/playwright.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { PlaywrightTestConfig } from '@playwright/test'; - -const config: PlaywrightTestConfig = { - webServer: { - command: 'npm run build && npm run preview', - port: 4173 - }, - testDir: 'tests', - testMatch: /(.+\.)?(test|spec)\.[jt]s/ -}; - -export default config; diff --git a/packages/create-svelte/shared/+playwright+vitest/package.json b/packages/create-svelte/shared/+playwright+vitest/package.json deleted file mode 100644 index 0e69c1babe7a..000000000000 --- a/packages/create-svelte/shared/+playwright+vitest/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "devDependencies": { - "@playwright/test": "^1.28.1", - "vitest": "^0.32.2" - }, - "scripts": { - "test:integration": "playwright test", - "test:unit": "vitest", - "test": "npm run test:integration && npm run test:unit" - } -} diff --git a/packages/create-svelte/shared/+playwright-typescript/playwright.config.js b/packages/create-svelte/shared/+playwright-typescript/playwright.config.js deleted file mode 100644 index a43c8c02d8cb..000000000000 --- a/packages/create-svelte/shared/+playwright-typescript/playwright.config.js +++ /dev/null @@ -1,11 +0,0 @@ -/** @type {import('@playwright/test').PlaywrightTestConfig} */ -const config = { - webServer: { - command: 'npm run build && npm run preview', - port: 4173 - }, - testDir: 'tests', - testMatch: /(.+\.)?(test|spec)\.[jt]s/ -}; - -export default config; diff --git a/packages/create-svelte/shared/+playwright/package.json b/packages/create-svelte/shared/+playwright/package.json deleted file mode 100644 index 4094202b8631..000000000000 --- a/packages/create-svelte/shared/+playwright/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "devDependencies": { - "@playwright/test": "^1.28.1" - }, - "scripts": { - "test": "playwright test" - } -} diff --git a/packages/create-svelte/shared/+prettier/.prettierignore b/packages/create-svelte/shared/+prettier/.prettierignore deleted file mode 100644 index 38972655faff..000000000000 --- a/packages/create-svelte/shared/+prettier/.prettierignore +++ /dev/null @@ -1,13 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example - -# Ignore files for PNPM, NPM and YARN -pnpm-lock.yaml -package-lock.json -yarn.lock diff --git a/packages/create-svelte/shared/+prettier/.prettierrc b/packages/create-svelte/shared/+prettier/.prettierrc deleted file mode 100644 index a77fddea9097..000000000000 --- a/packages/create-svelte/shared/+prettier/.prettierrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "useTabs": true, - "singleQuote": true, - "trailingComma": "none", - "printWidth": 100, - "plugins": ["prettier-plugin-svelte"], - "pluginSearchDirs": ["."], - "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] -} diff --git a/packages/create-svelte/shared/+prettier/package.json b/packages/create-svelte/shared/+prettier/package.json deleted file mode 100644 index e368023fb43e..000000000000 --- a/packages/create-svelte/shared/+prettier/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "prettier": "^2.8.0", - "prettier-plugin-svelte": "^2.10.1" - } -} diff --git a/packages/create-svelte/shared/+skeletonlib/README.md b/packages/create-svelte/shared/+skeletonlib/README.md deleted file mode 100644 index 4fee31f6f8e6..000000000000 --- a/packages/create-svelte/shared/+skeletonlib/README.md +++ /dev/null @@ -1,58 +0,0 @@ -# create-svelte - -Everything you need to build a Svelte library, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). - -Read more about creating a library [in the docs](https://kit.svelte.dev/docs/packaging). - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npm create svelte@latest - -# create a new project in my-app -npm create svelte@latest my-app -``` - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app. - -## Building - -To build your library: - -```bash -npm run package -``` - -To create a production version of your showcase app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. - -## Publishing - -Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)). - -To publish your library to [npm](https://www.npmjs.com): - -```bash -npm publish -``` diff --git a/packages/create-svelte/shared/+typescript/package.json b/packages/create-svelte/shared/+typescript/package.json deleted file mode 100644 index f7fe142530a8..000000000000 --- a/packages/create-svelte/shared/+typescript/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "scripts": { - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" - }, - "devDependencies": { - "typescript": "^5.0.0", - "tslib": "^2.4.1", - "svelte-check": "^3.4.3" - } -} diff --git a/packages/create-svelte/shared/+typescript/svelte.config.js b/packages/create-svelte/shared/+typescript/svelte.config.js deleted file mode 100644 index 1cf26a00dfea..000000000000 --- a/packages/create-svelte/shared/+typescript/svelte.config.js +++ /dev/null @@ -1,18 +0,0 @@ -import adapter from '@sveltejs/adapter-auto'; -import { vitePreprocess } from '@sveltejs/kit/vite'; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - // Consult https://kit.svelte.dev/docs/integrations#preprocessors - // for more information about preprocessors - preprocess: vitePreprocess(), - - kit: { - // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. - // If your environment is not supported or you settled on a specific environment, switch out the adapter. - // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter() - } -}; - -export default config; diff --git a/packages/create-svelte/shared/+vitest+skeleton/src/index.test.ts b/packages/create-svelte/shared/+vitest+skeleton/src/index.test.ts deleted file mode 100644 index e07cbbd72507..000000000000 --- a/packages/create-svelte/shared/+vitest+skeleton/src/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { describe, it, expect } from 'vitest'; - -describe('sum test', () => { - it('adds 1 + 2 to equal 3', () => { - expect(1 + 2).toBe(3); - }); -}); diff --git a/packages/create-svelte/shared/+vitest+skeletonlib/src/index.test.ts b/packages/create-svelte/shared/+vitest+skeletonlib/src/index.test.ts deleted file mode 100644 index e07cbbd72507..000000000000 --- a/packages/create-svelte/shared/+vitest+skeletonlib/src/index.test.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { describe, it, expect } from 'vitest'; - -describe('sum test', () => { - it('adds 1 + 2 to equal 3', () => { - expect(1 + 2).toBe(3); - }); -}); diff --git a/packages/create-svelte/shared/+vitest/package.json b/packages/create-svelte/shared/+vitest/package.json deleted file mode 100644 index 58c77018dcf5..000000000000 --- a/packages/create-svelte/shared/+vitest/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "devDependencies": { - "vitest": "^0.34.0" - }, - "scripts": { - "test": "vitest" - } -} diff --git a/packages/create-svelte/shared/+vitest/vite.config.ts b/packages/create-svelte/shared/+vitest/vite.config.ts deleted file mode 100644 index 37b6a84bc3c4..000000000000 --- a/packages/create-svelte/shared/+vitest/vite.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vitest/config'; - -export default defineConfig({ - plugins: [sveltekit()], - test: { - include: ['src/**/*.{test,spec}.{js,ts}'] - } -}); diff --git a/packages/create-svelte/shared/-eslint+prettier/package.json b/packages/create-svelte/shared/-eslint+prettier/package.json deleted file mode 100644 index 0193de97cbb4..000000000000 --- a/packages/create-svelte/shared/-eslint+prettier/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "scripts": { - "lint": "prettier --plugin-search-dir . --check .", - "format": "prettier --plugin-search-dir . --write ." - } -} diff --git a/packages/create-svelte/shared/-typescript/svelte.config.js b/packages/create-svelte/shared/-typescript/svelte.config.js deleted file mode 100644 index 348fa324acaa..000000000000 --- a/packages/create-svelte/shared/-typescript/svelte.config.js +++ /dev/null @@ -1,13 +0,0 @@ -import adapter from '@sveltejs/adapter-auto'; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - kit: { - // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. - // If your environment is not supported or you settled on a specific environment, switch out the adapter. - // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter() - } -}; - -export default config; diff --git a/packages/create-svelte/shared/README.md b/packages/create-svelte/shared/README.md deleted file mode 100644 index 5c91169b0ca6..000000000000 --- a/packages/create-svelte/shared/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# create-svelte - -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npm create svelte@latest - -# create a new project in my-app -npm create svelte@latest my-app -``` - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -To create a production version of your app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/packages/create-svelte/shared/vite.config.ts b/packages/create-svelte/shared/vite.config.ts deleted file mode 100644 index bbf8c7da43f0..000000000000 --- a/packages/create-svelte/shared/vite.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vite'; - -export default defineConfig({ - plugins: [sveltekit()] -}); diff --git a/packages/create-svelte/templates/default/.gitignore b/packages/create-svelte/templates/default/.gitignore deleted file mode 100644 index 8f6c617ecf16..000000000000 --- a/packages/create-svelte/templates/default/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example -.vercel -.output -vite.config.js.timestamp-* -vite.config.ts.timestamp-* diff --git a/packages/create-svelte/templates/default/.ignore b/packages/create-svelte/templates/default/.ignore deleted file mode 100644 index 9b5d703a4b8a..000000000000 --- a/packages/create-svelte/templates/default/.ignore +++ /dev/null @@ -1,9 +0,0 @@ -.meta.json -package.json -netlify.toml -wrangler.toml -vercel.json -.cloudflare -.netlify -.turbo -README.md \ No newline at end of file diff --git a/packages/create-svelte/templates/default/.meta.json b/packages/create-svelte/templates/default/.meta.json deleted file mode 100644 index e26f2d89a1ff..000000000000 --- a/packages/create-svelte/templates/default/.meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title": "SvelteKit demo app", - "description": "A demo app showcasing some of the features of SvelteKit - play a word guessing game that works without JavaScript!" -} diff --git a/packages/create-svelte/templates/default/README.md b/packages/create-svelte/templates/default/README.md deleted file mode 100644 index 9c8dc797a0be..000000000000 --- a/packages/create-svelte/templates/default/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# Default SvelteKit template - -This README isn't part of the template; it is ignored, and replaced with [the shared README](../../shared/README.md) when a project is created. - -The default template is automatically deployed to Cloudflare Pages, Netlify and Vercel on every commit. Commits to `master` will update production deployments: - -- https://cloudflare.demo.svelte.dev -- https://kit-demo.netlify.app -- https://kit-demo.vercel.app - -## Cloudflare Pages settings - -### Build command - -``` -npm i -g pnpm && pnpm i && pnpm build -r -``` - -### Build output directory - -``` -/packages/create-svelte/templates/default/.svelte-kit/cloudflare -``` - -### Environment variables - -``` -NPM_FLAGS=--version -``` - -## Netlify settings - -Most settings are contained in [netlify.toml](netlify.toml). - -### Build directory - -``` -packages/create-svelte/templates/default -``` - -## Vercel settings - -### Install command - -``` -npm install -g pnpm && pnpm install && pnpm build -r -``` - -### Root directory - -``` -packages/create-svelte/templates/default -``` diff --git a/packages/create-svelte/templates/default/netlify.toml b/packages/create-svelte/templates/default/netlify.toml deleted file mode 100644 index 7dca1fcad039..000000000000 --- a/packages/create-svelte/templates/default/netlify.toml +++ /dev/null @@ -1,9 +0,0 @@ -[build] - command = "npx pnpm install --store=node_modules/.pnpm-store && npx pnpm build -r" - publish = "build" - -[build.environment] - NPM_FLAGS = "--version" # this prevents npm install from happening - -[functions] - node_bundler = "esbuild" \ No newline at end of file diff --git a/packages/create-svelte/templates/default/package.json b/packages/create-svelte/templates/default/package.json deleted file mode 100644 index b46793b54717..000000000000 --- a/packages/create-svelte/templates/default/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "default-template", - "version": "0.0.2-next.0", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview" - }, - "devDependencies": { - "@neoconfetti/svelte": "^1.0.0", - "@sveltejs/adapter-auto": "workspace:*", - "@sveltejs/kit": "workspace:*", - "svelte": "^4.0.5", - "typescript": "^5.0.0", - "vite": "^4.4.9" - }, - "type": "module", - "dependencies": { - "@fontsource/fira-mono": "^5.0.5" - } -} diff --git a/packages/create-svelte/templates/default/package.template.json b/packages/create-svelte/templates/default/package.template.json deleted file mode 100644 index 6e96dfb86f88..000000000000 --- a/packages/create-svelte/templates/default/package.template.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "~TODO~", - "version": "0.0.1", - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview" - }, - "devDependencies": { - "@fontsource/fira-mono": "^4.5.10", - "@neoconfetti/svelte": "^1.0.0", - "@sveltejs/adapter-auto": "^2.0.0", - "@sveltejs/kit": "^1.20.4", - "svelte": "^4.0.5", - "vite": "^4.4.2" - }, - "type": "module" -} diff --git a/packages/create-svelte/templates/default/src/lib/images/github.svg b/packages/create-svelte/templates/default/src/lib/images/github.svg deleted file mode 100644 index bc5d249d333e..000000000000 --- a/packages/create-svelte/templates/default/src/lib/images/github.svg +++ /dev/null @@ -1,16 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 30 30"> - <path - fill-rule="evenodd" - clip-rule="evenodd" - d="M12 2C6.47715 2 2 6.47715 2 12C2 17.5229 6.47715 22 12 22C17.5229 22 22 17.5229 22 12C22 6.47715 17.5229 2 12 2ZM0 12C0 5.3726 5.3726 0 12 0C18.6274 0 24 5.3726 24 12C24 18.6274 18.6274 24 12 24C5.3726 24 0 18.6274 0 12Z" - fill="rgba(0,0,0,0.7)" - stroke="none" - /> - <path - fill-rule="evenodd" - clip-rule="evenodd" - d="M9.59162 22.7357C9.49492 22.6109 9.49492 21.4986 9.59162 19.399C8.55572 19.4347 7.90122 19.3628 7.62812 19.1833C7.21852 18.9139 6.80842 18.0833 6.44457 17.4979C6.08072 16.9125 5.27312 16.8199 4.94702 16.6891C4.62091 16.5582 4.53905 16.0247 5.84562 16.4282C7.15222 16.8316 7.21592 17.9303 7.62812 18.1872C8.04032 18.4441 9.02572 18.3317 9.47242 18.1259C9.91907 17.9201 9.88622 17.1538 9.96587 16.8503C10.0666 16.5669 9.71162 16.5041 9.70382 16.5018C9.26777 16.5018 6.97697 16.0036 6.34772 13.7852C5.71852 11.5669 6.52907 10.117 6.96147 9.49369C7.24972 9.07814 7.22422 8.19254 6.88497 6.83679C8.11677 6.67939 9.06732 7.06709 9.73672 7.99999C9.73737 8.00534 10.6143 7.47854 12.0001 7.47854C13.386 7.47854 13.8777 7.90764 14.2571 7.99999C14.6365 8.09234 14.94 6.36699 17.2834 6.83679C16.7942 7.79839 16.3844 8.99999 16.6972 9.49369C17.0099 9.98739 18.2372 11.5573 17.4833 13.7852C16.9807 15.2706 15.9927 16.1761 14.5192 16.5018C14.3502 16.5557 14.2658 16.6427 14.2658 16.7627C14.2658 16.9427 14.4942 16.9624 14.8233 17.8058C15.0426 18.368 15.0585 19.9739 14.8708 22.6234C14.3953 22.7445 14.0254 22.8257 13.7611 22.8673C13.2924 22.9409 12.7835 22.9822 12.2834 22.9982C11.7834 23.0141 11.6098 23.0123 10.9185 22.948C10.4577 22.9051 10.0154 22.8343 9.59162 22.7357Z" - fill="rgba(0,0,0,0.7)" - stroke="none" - /> -</svg> \ No newline at end of file diff --git a/packages/create-svelte/templates/default/src/lib/images/svelte-logo.svg b/packages/create-svelte/templates/default/src/lib/images/svelte-logo.svg deleted file mode 100644 index 49492a83cc2f..000000000000 --- a/packages/create-svelte/templates/default/src/lib/images/svelte-logo.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="107" height="128" viewBox="0 0 107 128"><title>svelte-logo \ No newline at end of file diff --git a/packages/create-svelte/templates/default/src/lib/images/svelte-welcome.png b/packages/create-svelte/templates/default/src/lib/images/svelte-welcome.png deleted file mode 100644 index fe7d2d6b50ce..000000000000 Binary files a/packages/create-svelte/templates/default/src/lib/images/svelte-welcome.png and /dev/null differ diff --git a/packages/create-svelte/templates/default/src/lib/images/svelte-welcome.webp b/packages/create-svelte/templates/default/src/lib/images/svelte-welcome.webp deleted file mode 100644 index 6ec1a28d63b4..000000000000 Binary files a/packages/create-svelte/templates/default/src/lib/images/svelte-welcome.webp and /dev/null differ diff --git a/packages/create-svelte/templates/default/src/routes/+layout.svelte b/packages/create-svelte/templates/default/src/routes/+layout.svelte deleted file mode 100644 index 9c7445f55ec8..000000000000 --- a/packages/create-svelte/templates/default/src/routes/+layout.svelte +++ /dev/null @@ -1,53 +0,0 @@ - - - - - diff --git a/packages/create-svelte/templates/default/src/routes/+page.svelte b/packages/create-svelte/templates/default/src/routes/+page.svelte deleted file mode 100644 index 97201ef364c8..000000000000 --- a/packages/create-svelte/templates/default/src/routes/+page.svelte +++ /dev/null @@ -1,59 +0,0 @@ - - - - Home - - - -
-

- - - - Welcome - - - - to your new
SvelteKit app -

- -

- try editing src/routes/+page.svelte -

- - -
- - diff --git a/packages/create-svelte/templates/default/src/routes/+page.ts b/packages/create-svelte/templates/default/src/routes/+page.ts deleted file mode 100644 index a72419a63f41..000000000000 --- a/packages/create-svelte/templates/default/src/routes/+page.ts +++ /dev/null @@ -1,3 +0,0 @@ -// since there's no dynamic data here, we can prerender -// it so that it gets served as a static asset in production -export const prerender = true; diff --git a/packages/create-svelte/templates/default/src/routes/Counter.svelte b/packages/create-svelte/templates/default/src/routes/Counter.svelte deleted file mode 100644 index e40221d44b60..000000000000 --- a/packages/create-svelte/templates/default/src/routes/Counter.svelte +++ /dev/null @@ -1,106 +0,0 @@ - - -
- - -
-
- - {Math.floor($displayed_count)} -
-
- - -
- - diff --git a/packages/create-svelte/templates/default/src/routes/Header.svelte b/packages/create-svelte/templates/default/src/routes/Header.svelte deleted file mode 100644 index 368b721e891b..000000000000 --- a/packages/create-svelte/templates/default/src/routes/Header.svelte +++ /dev/null @@ -1,129 +0,0 @@ - - -
-
- - SvelteKit - -
- - - -
- - GitHub - -
-
- - diff --git a/packages/create-svelte/templates/default/src/routes/about/+page.svelte b/packages/create-svelte/templates/default/src/routes/about/+page.svelte deleted file mode 100644 index 7f7946d23050..000000000000 --- a/packages/create-svelte/templates/default/src/routes/about/+page.svelte +++ /dev/null @@ -1,26 +0,0 @@ - - About - - - -
-

About this app

- -

- This is a SvelteKit app. You can make your own by typing the - following into your command line and following the prompts: -

- -
npm create svelte@latest
- -

- The page you're looking at is purely static HTML, with no client-side interactivity needed. - Because of that, we don't need to load any JavaScript. Try viewing the page's source, or opening - the devtools network panel and reloading. -

- -

- The Sverdle page illustrates SvelteKit's data loading and form handling. Try - using it with JavaScript disabled! -

-
diff --git a/packages/create-svelte/templates/default/src/routes/about/+page.ts b/packages/create-svelte/templates/default/src/routes/about/+page.ts deleted file mode 100644 index e739ef4b6c11..000000000000 --- a/packages/create-svelte/templates/default/src/routes/about/+page.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { dev } from '$app/environment'; - -// we don't need any JS on this page, though we'll load -// it in dev so that we get hot module replacement -export const csr = dev; - -// since there's no dynamic data here, we can prerender -// it so that it gets served as a static asset in production -export const prerender = true; diff --git a/packages/create-svelte/templates/default/src/routes/styles.css b/packages/create-svelte/templates/default/src/routes/styles.css deleted file mode 100644 index 1441d9408f3a..000000000000 --- a/packages/create-svelte/templates/default/src/routes/styles.css +++ /dev/null @@ -1,107 +0,0 @@ -@import '@fontsource/fira-mono'; - -:root { - --font-body: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, - Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - --font-mono: 'Fira Mono', monospace; - --color-bg-0: rgb(202, 216, 228); - --color-bg-1: hsl(209, 36%, 86%); - --color-bg-2: hsl(224, 44%, 95%); - --color-theme-1: #ff3e00; - --color-theme-2: #4075a6; - --color-text: rgba(0, 0, 0, 0.7); - --column-width: 42rem; - --column-margin-top: 4rem; - font-family: var(--font-body); - color: var(--color-text); -} - -body { - min-height: 100vh; - margin: 0; - background-attachment: fixed; - background-color: var(--color-bg-1); - background-size: 100vw 100vh; - background-image: radial-gradient( - 50% 50% at 50% 50%, - rgba(255, 255, 255, 0.75) 0%, - rgba(255, 255, 255, 0) 100% - ), - linear-gradient(180deg, var(--color-bg-0) 0%, var(--color-bg-1) 15%, var(--color-bg-2) 50%); -} - -h1, -h2, -p { - font-weight: 400; -} - -p { - line-height: 1.5; -} - -a { - color: var(--color-theme-1); - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - -h1 { - font-size: 2rem; - text-align: center; -} - -h2 { - font-size: 1rem; -} - -pre { - font-size: 16px; - font-family: var(--font-mono); - background-color: rgba(255, 255, 255, 0.45); - border-radius: 3px; - box-shadow: 2px 2px 6px rgb(255 255 255 / 25%); - padding: 0.5em; - overflow-x: auto; - color: var(--color-text); -} - -.text-column { - display: flex; - max-width: 48rem; - flex: 0.6; - flex-direction: column; - justify-content: center; - margin: 0 auto; -} - -input, -button { - font-size: inherit; - font-family: inherit; -} - -button:focus:not(:focus-visible) { - outline: none; -} - -@media (min-width: 720px) { - h1 { - font-size: 2.4rem; - } -} - -.visually-hidden { - border: 0; - clip: rect(0 0 0 0); - height: auto; - margin: 0; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; - white-space: nowrap; -} diff --git a/packages/create-svelte/templates/default/src/routes/sverdle/+page.server.ts b/packages/create-svelte/templates/default/src/routes/sverdle/+page.server.ts deleted file mode 100644 index 0bd1db1f264f..000000000000 --- a/packages/create-svelte/templates/default/src/routes/sverdle/+page.server.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { fail } from '@sveltejs/kit'; -import { Game } from './game'; -import type { PageServerLoad, Actions } from './$types'; - -/** @satisfies {import('./$types').PageServerLoad} */ -export const load = (({ cookies }) => { - const game = new Game(cookies.get('sverdle')); - - return { - /** - * The player's guessed words so far - */ - guesses: game.guesses, - - /** - * An array of strings like '__x_c' corresponding to the guesses, where 'x' means - * an exact match, and 'c' means a close match (right letter, wrong place) - */ - answers: game.answers, - - /** - * The correct answer, revealed if the game is over - */ - answer: game.answers.length >= 6 ? game.answer : null - }; -}) satisfies PageServerLoad; - -/** @satisfies {import('./$types').Actions} */ -export const actions = { - /** - * Modify game state in reaction to a keypress. If client-side JavaScript - * is available, this will happen in the browser instead of here - */ - update: async ({ request, cookies }) => { - const game = new Game(cookies.get('sverdle')); - - const data = await request.formData(); - const key = data.get('key'); - - const i = game.answers.length; - - if (key === 'backspace') { - game.guesses[i] = game.guesses[i].slice(0, -1); - } else { - game.guesses[i] += key; - } - - cookies.set('sverdle', game.toString()); - }, - - /** - * Modify game state in reaction to a guessed word. This logic always runs on - * the server, so that people can't cheat by peeking at the JavaScript - */ - enter: async ({ request, cookies }) => { - const game = new Game(cookies.get('sverdle')); - - const data = await request.formData(); - const guess = /** @type {string[]} */ data.getAll('guess') /***/ as string[]; - - if (!game.enter(guess)) { - return fail(400, { badGuess: true }); - } - - cookies.set('sverdle', game.toString()); - }, - - restart: async ({ cookies }) => { - cookies.delete('sverdle'); - } -} satisfies Actions; diff --git a/packages/create-svelte/templates/default/src/routes/sverdle/+page.svelte b/packages/create-svelte/templates/default/src/routes/sverdle/+page.svelte deleted file mode 100644 index 68ab6400de82..000000000000 --- a/packages/create-svelte/templates/default/src/routes/sverdle/+page.svelte +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - Sverdle - - - -

Sverdle

- - { - // prevent default callback from resetting the form - return ({ update }) => { - update({ reset: false }); - }; - }} -> - How to play - -
- {#each Array.from(Array(6).keys()) as row (row)} - {@const current = row === i} -

Row {row + 1}

-
- {#each Array.from(Array(5).keys()) as column (column)} - {@const guess = current ? currentGuess : data.guesses[row]} - {@const answer = data.answers[row]?.[column]} - {@const value = guess?.[column] ?? ''} - {@const selected = current && column === guess.length} - {@const exact = answer === 'x'} - {@const close = answer === 'c'} - {@const missing = answer === '_'} -
- {value} - - {#if exact} - (correct) - {:else if close} - (present) - {:else if missing} - (absent) - {:else} - empty - {/if} - - -
- {/each} -
- {/each} -
- -
- {#if won || data.answers.length >= 6} - {#if !won && data.answer} -

the answer was "{data.answer}"

- {/if} - - {:else} -
- - - - - {#each ['qwertyuiop', 'asdfghjkl', 'zxcvbnm'] as row} -
- {#each row as letter} - - {/each} -
- {/each} -
- {/if} -
- - -{#if won} -
-{/if} - - diff --git a/packages/create-svelte/templates/default/src/routes/sverdle/game.ts b/packages/create-svelte/templates/default/src/routes/sverdle/game.ts deleted file mode 100644 index d5cbe932e4cb..000000000000 --- a/packages/create-svelte/templates/default/src/routes/sverdle/game.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { words, allowed } from './words.server'; - -export class Game { - index: number; - guesses: string[]; - answers: string[]; - answer: string; - - /** - * Create a game object from the player's cookie, or initialise a new game - * @param {string | undefined} serialized - */ - constructor(serialized: string | undefined = undefined) { - if (serialized) { - const [index, guesses, answers] = serialized.split('-'); - - this.index = +index; - this.guesses = guesses ? guesses.split(' ') : []; - this.answers = answers ? answers.split(' ') : []; - } else { - this.index = Math.floor(Math.random() * words.length); - this.guesses = ['', '', '', '', '', '']; - this.answers = /** @type {string[]} */ [] /***/; - } - - this.answer = words[this.index]; - } - - /** - * Update game state based on a guess of a five-letter word. Returns - * true if the guess was valid, false otherwise - * @param {string[]} letters - */ - enter(letters: string[]) { - const word = letters.join(''); - const valid = allowed.has(word); - - if (!valid) return false; - - this.guesses[this.answers.length] = word; - - const available = Array.from(this.answer); - const answer = Array(5).fill('_'); - - // first, find exact matches - for (let i = 0; i < 5; i += 1) { - if (letters[i] === available[i]) { - answer[i] = 'x'; - available[i] = ' '; - } - } - - // then find close matches (this has to happen - // in a second step, otherwise an early close - // match can prevent a later exact match) - for (let i = 0; i < 5; i += 1) { - if (answer[i] === '_') { - const index = available.indexOf(letters[i]); - if (index !== -1) { - answer[i] = 'c'; - available[index] = ' '; - } - } - } - - this.answers.push(answer.join('')); - - return true; - } - - /** - * Serialize game state so it can be set as a cookie - */ - toString() { - return `${this.index}-${this.guesses.join(' ')}-${this.answers.join(' ')}`; - } -} diff --git a/packages/create-svelte/templates/default/src/routes/sverdle/how-to-play/+page.svelte b/packages/create-svelte/templates/default/src/routes/sverdle/how-to-play/+page.svelte deleted file mode 100644 index e8e2cec3198e..000000000000 --- a/packages/create-svelte/templates/default/src/routes/sverdle/how-to-play/+page.svelte +++ /dev/null @@ -1,95 +0,0 @@ - - How to play Sverdle - - - -
-

How to play Sverdle

- -

- Sverdle is a clone of Wordle, the - word guessing game. To play, enter a five-letter English word. For example: -

- -
- r - i - t - z - y -
- -

- The y is in the right place. r and - t - are the right letters, but in the wrong place. The other letters are wrong, and can be discarded. - Let's make another guess: -

- -
- p - a - r - t - y -
- -

This time we guessed right! You have six guesses to get the word.

- -

- Unlike the original Wordle, Sverdle runs on the server instead of in the browser, making it - impossible to cheat. It uses <form> and cookies to submit data, meaning you can - even play with JavaScript disabled! -

-
- - diff --git a/packages/create-svelte/templates/default/src/routes/sverdle/how-to-play/+page.ts b/packages/create-svelte/templates/default/src/routes/sverdle/how-to-play/+page.ts deleted file mode 100644 index e739ef4b6c11..000000000000 --- a/packages/create-svelte/templates/default/src/routes/sverdle/how-to-play/+page.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { dev } from '$app/environment'; - -// we don't need any JS on this page, though we'll load -// it in dev so that we get hot module replacement -export const csr = dev; - -// since there's no dynamic data here, we can prerender -// it so that it gets served as a static asset in production -export const prerender = true; diff --git a/packages/create-svelte/templates/default/src/routes/sverdle/reduced-motion.ts b/packages/create-svelte/templates/default/src/routes/sverdle/reduced-motion.ts deleted file mode 100644 index 27b9d51161d0..000000000000 --- a/packages/create-svelte/templates/default/src/routes/sverdle/reduced-motion.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { readable } from 'svelte/store'; -import { browser } from '$app/environment'; - -const reduced_motion_query = '(prefers-reduced-motion: reduce)'; - -const get_initial_motion_preference = () => { - if (!browser) return false; - return window.matchMedia(reduced_motion_query).matches; -}; - -export const reduced_motion = readable(get_initial_motion_preference(), (set) => { - if (browser) { - /** - * @param {MediaQueryListEvent} event - */ - const set_reduced_motion = (event: MediaQueryListEvent) => { - set(event.matches); - }; - const media_query_list = window.matchMedia(reduced_motion_query); - media_query_list.addEventListener('change', set_reduced_motion); - - return () => { - media_query_list.removeEventListener('change', set_reduced_motion); - }; - } -}); diff --git a/packages/create-svelte/templates/default/src/routes/sverdle/words.server.ts b/packages/create-svelte/templates/default/src/routes/sverdle/words.server.ts deleted file mode 100644 index 56082a33115d..000000000000 --- a/packages/create-svelte/templates/default/src/routes/sverdle/words.server.ts +++ /dev/null @@ -1,12980 +0,0 @@ -/** The list of possible words */ -export const words = [ - 'aback', - 'abase', - 'abate', - 'abbey', - 'abbot', - 'abhor', - 'abide', - 'abled', - 'abode', - 'abort', - 'about', - 'above', - 'abuse', - 'abyss', - 'acorn', - 'acrid', - 'actor', - 'acute', - 'adage', - 'adapt', - 'adept', - 'admin', - 'admit', - 'adobe', - 'adopt', - 'adore', - 'adorn', - 'adult', - 'affix', - 'afire', - 'afoot', - 'afoul', - 'after', - 'again', - 'agape', - 'agate', - 'agent', - 'agile', - 'aging', - 'aglow', - 'agony', - 'agora', - 'agree', - 'ahead', - 'aider', - 'aisle', - 'alarm', - 'album', - 'alert', - 'algae', - 'alibi', - 'alien', - 'align', - 'alike', - 'alive', - 'allay', - 'alley', - 'allot', - 'allow', - 'alloy', - 'aloft', - 'alone', - 'along', - 'aloof', - 'aloud', - 'alpha', - 'altar', - 'alter', - 'amass', - 'amaze', - 'amber', - 'amble', - 'amend', - 'amiss', - 'amity', - 'among', - 'ample', - 'amply', - 'amuse', - 'angel', - 'anger', - 'angle', - 'angry', - 'angst', - 'anime', - 'ankle', - 'annex', - 'annoy', - 'annul', - 'anode', - 'antic', - 'anvil', - 'aorta', - 'apart', - 'aphid', - 'aping', - 'apnea', - 'apple', - 'apply', - 'apron', - 'aptly', - 'arbor', - 'ardor', - 'arena', - 'argue', - 'arise', - 'armor', - 'aroma', - 'arose', - 'array', - 'arrow', - 'arson', - 'artsy', - 'ascot', - 'ashen', - 'aside', - 'askew', - 'assay', - 'asset', - 'atoll', - 'atone', - 'attic', - 'audio', - 'audit', - 'augur', - 'aunty', - 'avail', - 'avert', - 'avian', - 'avoid', - 'await', - 'awake', - 'award', - 'aware', - 'awash', - 'awful', - 'awoke', - 'axial', - 'axiom', - 'axion', - 'azure', - 'bacon', - 'badge', - 'badly', - 'bagel', - 'baggy', - 'baker', - 'baler', - 'balmy', - 'banal', - 'banjo', - 'barge', - 'baron', - 'basal', - 'basic', - 'basil', - 'basin', - 'basis', - 'baste', - 'batch', - 'bathe', - 'baton', - 'batty', - 'bawdy', - 'bayou', - 'beach', - 'beady', - 'beard', - 'beast', - 'beech', - 'beefy', - 'befit', - 'began', - 'begat', - 'beget', - 'begin', - 'begun', - 'being', - 'belch', - 'belie', - 'belle', - 'belly', - 'below', - 'bench', - 'beret', - 'berry', - 'berth', - 'beset', - 'betel', - 'bevel', - 'bezel', - 'bible', - 'bicep', - 'biddy', - 'bigot', - 'bilge', - 'billy', - 'binge', - 'bingo', - 'biome', - 'birch', - 'birth', - 'bison', - 'bitty', - 'black', - 'blade', - 'blame', - 'bland', - 'blank', - 'blare', - 'blast', - 'blaze', - 'bleak', - 'bleat', - 'bleed', - 'bleep', - 'blend', - 'bless', - 'blimp', - 'blind', - 'blink', - 'bliss', - 'blitz', - 'bloat', - 'block', - 'bloke', - 'blond', - 'blood', - 'bloom', - 'blown', - 'bluer', - 'bluff', - 'blunt', - 'blurb', - 'blurt', - 'blush', - 'board', - 'boast', - 'bobby', - 'boney', - 'bongo', - 'bonus', - 'booby', - 'boost', - 'booth', - 'booty', - 'booze', - 'boozy', - 'borax', - 'borne', - 'bosom', - 'bossy', - 'botch', - 'bough', - 'boule', - 'bound', - 'bowel', - 'boxer', - 'brace', - 'braid', - 'brain', - 'brake', - 'brand', - 'brash', - 'brass', - 'brave', - 'bravo', - 'brawl', - 'brawn', - 'bread', - 'break', - 'breed', - 'briar', - 'bribe', - 'brick', - 'bride', - 'brief', - 'brine', - 'bring', - 'brink', - 'briny', - 'brisk', - 'broad', - 'broil', - 'broke', - 'brood', - 'brook', - 'broom', - 'broth', - 'brown', - 'brunt', - 'brush', - 'brute', - 'buddy', - 'budge', - 'buggy', - 'bugle', - 'build', - 'built', - 'bulge', - 'bulky', - 'bully', - 'bunch', - 'bunny', - 'burly', - 'burnt', - 'burst', - 'bused', - 'bushy', - 'butch', - 'butte', - 'buxom', - 'buyer', - 'bylaw', - 'cabal', - 'cabby', - 'cabin', - 'cable', - 'cacao', - 'cache', - 'cacti', - 'caddy', - 'cadet', - 'cagey', - 'cairn', - 'camel', - 'cameo', - 'canal', - 'candy', - 'canny', - 'canoe', - 'canon', - 'caper', - 'caput', - 'carat', - 'cargo', - 'carol', - 'carry', - 'carve', - 'caste', - 'catch', - 'cater', - 'catty', - 'caulk', - 'cause', - 'cavil', - 'cease', - 'cedar', - 'cello', - 'chafe', - 'chaff', - 'chain', - 'chair', - 'chalk', - 'champ', - 'chant', - 'chaos', - 'chard', - 'charm', - 'chart', - 'chase', - 'chasm', - 'cheap', - 'cheat', - 'check', - 'cheek', - 'cheer', - 'chess', - 'chest', - 'chick', - 'chide', - 'chief', - 'child', - 'chili', - 'chill', - 'chime', - 'china', - 'chirp', - 'chock', - 'choir', - 'choke', - 'chord', - 'chore', - 'chose', - 'chuck', - 'chump', - 'chunk', - 'churn', - 'chute', - 'cider', - 'cigar', - 'cinch', - 'circa', - 'civic', - 'civil', - 'clack', - 'claim', - 'clamp', - 'clang', - 'clank', - 'clash', - 'clasp', - 'class', - 'clean', - 'clear', - 'cleat', - 'cleft', - 'clerk', - 'click', - 'cliff', - 'climb', - 'cling', - 'clink', - 'cloak', - 'clock', - 'clone', - 'close', - 'cloth', - 'cloud', - 'clout', - 'clove', - 'clown', - 'cluck', - 'clued', - 'clump', - 'clung', - 'coach', - 'coast', - 'cobra', - 'cocoa', - 'colon', - 'color', - 'comet', - 'comfy', - 'comic', - 'comma', - 'conch', - 'condo', - 'conic', - 'copse', - 'coral', - 'corer', - 'corny', - 'couch', - 'cough', - 'could', - 'count', - 'coupe', - 'court', - 'coven', - 'cover', - 'covet', - 'covey', - 'cower', - 'coyly', - 'crack', - 'craft', - 'cramp', - 'crane', - 'crank', - 'crash', - 'crass', - 'crate', - 'crave', - 'crawl', - 'craze', - 'crazy', - 'creak', - 'cream', - 'credo', - 'creed', - 'creek', - 'creep', - 'creme', - 'crepe', - 'crept', - 'cress', - 'crest', - 'crick', - 'cried', - 'crier', - 'crime', - 'crimp', - 'crisp', - 'croak', - 'crock', - 'crone', - 'crony', - 'crook', - 'cross', - 'croup', - 'crowd', - 'crown', - 'crude', - 'cruel', - 'crumb', - 'crump', - 'crush', - 'crust', - 'crypt', - 'cubic', - 'cumin', - 'curio', - 'curly', - 'curry', - 'curse', - 'curve', - 'curvy', - 'cutie', - 'cyber', - 'cycle', - 'cynic', - 'daddy', - 'daily', - 'dairy', - 'daisy', - 'dally', - 'dance', - 'dandy', - 'datum', - 'daunt', - 'dealt', - 'death', - 'debar', - 'debit', - 'debug', - 'debut', - 'decal', - 'decay', - 'decor', - 'decoy', - 'decry', - 'defer', - 'deign', - 'deity', - 'delay', - 'delta', - 'delve', - 'demon', - 'demur', - 'denim', - 'dense', - 'depot', - 'depth', - 'derby', - 'deter', - 'detox', - 'deuce', - 'devil', - 'diary', - 'dicey', - 'digit', - 'dilly', - 'dimly', - 'diner', - 'dingo', - 'dingy', - 'diode', - 'dirge', - 'dirty', - 'disco', - 'ditch', - 'ditto', - 'ditty', - 'diver', - 'dizzy', - 'dodge', - 'dodgy', - 'dogma', - 'doing', - 'dolly', - 'donor', - 'donut', - 'dopey', - 'doubt', - 'dough', - 'dowdy', - 'dowel', - 'downy', - 'dowry', - 'dozen', - 'draft', - 'drain', - 'drake', - 'drama', - 'drank', - 'drape', - 'drawl', - 'drawn', - 'dread', - 'dream', - 'dress', - 'dried', - 'drier', - 'drift', - 'drill', - 'drink', - 'drive', - 'droit', - 'droll', - 'drone', - 'drool', - 'droop', - 'dross', - 'drove', - 'drown', - 'druid', - 'drunk', - 'dryer', - 'dryly', - 'duchy', - 'dully', - 'dummy', - 'dumpy', - 'dunce', - 'dusky', - 'dusty', - 'dutch', - 'duvet', - 'dwarf', - 'dwell', - 'dwelt', - 'dying', - 'eager', - 'eagle', - 'early', - 'earth', - 'easel', - 'eaten', - 'eater', - 'ebony', - 'eclat', - 'edict', - 'edify', - 'eerie', - 'egret', - 'eight', - 'eject', - 'eking', - 'elate', - 'elbow', - 'elder', - 'elect', - 'elegy', - 'elfin', - 'elide', - 'elite', - 'elope', - 'elude', - 'email', - 'embed', - 'ember', - 'emcee', - 'empty', - 'enact', - 'endow', - 'enema', - 'enemy', - 'enjoy', - 'ennui', - 'ensue', - 'enter', - 'entry', - 'envoy', - 'epoch', - 'epoxy', - 'equal', - 'equip', - 'erase', - 'erect', - 'erode', - 'error', - 'erupt', - 'essay', - 'ester', - 'ether', - 'ethic', - 'ethos', - 'etude', - 'evade', - 'event', - 'every', - 'evict', - 'evoke', - 'exact', - 'exalt', - 'excel', - 'exert', - 'exile', - 'exist', - 'expel', - 'extol', - 'extra', - 'exult', - 'eying', - 'fable', - 'facet', - 'faint', - 'fairy', - 'faith', - 'false', - 'fancy', - 'fanny', - 'farce', - 'fatal', - 'fatty', - 'fault', - 'fauna', - 'favor', - 'feast', - 'fecal', - 'feign', - 'fella', - 'felon', - 'femme', - 'femur', - 'fence', - 'feral', - 'ferry', - 'fetal', - 'fetch', - 'fetid', - 'fetus', - 'fever', - 'fewer', - 'fiber', - 'fibre', - 'ficus', - 'field', - 'fiend', - 'fiery', - 'fifth', - 'fifty', - 'fight', - 'filer', - 'filet', - 'filly', - 'filmy', - 'filth', - 'final', - 'finch', - 'finer', - 'first', - 'fishy', - 'fixer', - 'fizzy', - 'fjord', - 'flack', - 'flail', - 'flair', - 'flake', - 'flaky', - 'flame', - 'flank', - 'flare', - 'flash', - 'flask', - 'fleck', - 'fleet', - 'flesh', - 'flick', - 'flier', - 'fling', - 'flint', - 'flirt', - 'float', - 'flock', - 'flood', - 'floor', - 'flora', - 'floss', - 'flour', - 'flout', - 'flown', - 'fluff', - 'fluid', - 'fluke', - 'flume', - 'flung', - 'flunk', - 'flush', - 'flute', - 'flyer', - 'foamy', - 'focal', - 'focus', - 'foggy', - 'foist', - 'folio', - 'folly', - 'foray', - 'force', - 'forge', - 'forgo', - 'forte', - 'forth', - 'forty', - 'forum', - 'found', - 'foyer', - 'frail', - 'frame', - 'frank', - 'fraud', - 'freak', - 'freed', - 'freer', - 'fresh', - 'friar', - 'fried', - 'frill', - 'frisk', - 'fritz', - 'frock', - 'frond', - 'front', - 'frost', - 'froth', - 'frown', - 'froze', - 'fruit', - 'fudge', - 'fugue', - 'fully', - 'fungi', - 'funky', - 'funny', - 'furor', - 'furry', - 'fussy', - 'fuzzy', - 'gaffe', - 'gaily', - 'gamer', - 'gamma', - 'gamut', - 'gassy', - 'gaudy', - 'gauge', - 'gaunt', - 'gauze', - 'gavel', - 'gawky', - 'gayer', - 'gayly', - 'gazer', - 'gecko', - 'geeky', - 'geese', - 'genie', - 'genre', - 'ghost', - 'ghoul', - 'giant', - 'giddy', - 'gipsy', - 'girly', - 'girth', - 'given', - 'giver', - 'glade', - 'gland', - 'glare', - 'glass', - 'glaze', - 'gleam', - 'glean', - 'glide', - 'glint', - 'gloat', - 'globe', - 'gloom', - 'glory', - 'gloss', - 'glove', - 'glyph', - 'gnash', - 'gnome', - 'godly', - 'going', - 'golem', - 'golly', - 'gonad', - 'goner', - 'goody', - 'gooey', - 'goofy', - 'goose', - 'gorge', - 'gouge', - 'gourd', - 'grace', - 'grade', - 'graft', - 'grail', - 'grain', - 'grand', - 'grant', - 'grape', - 'graph', - 'grasp', - 'grass', - 'grate', - 'grave', - 'gravy', - 'graze', - 'great', - 'greed', - 'green', - 'greet', - 'grief', - 'grill', - 'grime', - 'grimy', - 'grind', - 'gripe', - 'groan', - 'groin', - 'groom', - 'grope', - 'gross', - 'group', - 'grout', - 'grove', - 'growl', - 'grown', - 'gruel', - 'gruff', - 'grunt', - 'guard', - 'guava', - 'guess', - 'guest', - 'guide', - 'guild', - 'guile', - 'guilt', - 'guise', - 'gulch', - 'gully', - 'gumbo', - 'gummy', - 'guppy', - 'gusto', - 'gusty', - 'gypsy', - 'habit', - 'hairy', - 'halve', - 'handy', - 'happy', - 'hardy', - 'harem', - 'harpy', - 'harry', - 'harsh', - 'haste', - 'hasty', - 'hatch', - 'hater', - 'haunt', - 'haute', - 'haven', - 'havoc', - 'hazel', - 'heady', - 'heard', - 'heart', - 'heath', - 'heave', - 'heavy', - 'hedge', - 'hefty', - 'heist', - 'helix', - 'hello', - 'hence', - 'heron', - 'hilly', - 'hinge', - 'hippo', - 'hippy', - 'hitch', - 'hoard', - 'hobby', - 'hoist', - 'holly', - 'homer', - 'honey', - 'honor', - 'horde', - 'horny', - 'horse', - 'hotel', - 'hotly', - 'hound', - 'house', - 'hovel', - 'hover', - 'howdy', - 'human', - 'humid', - 'humor', - 'humph', - 'humus', - 'hunch', - 'hunky', - 'hurry', - 'husky', - 'hussy', - 'hutch', - 'hydro', - 'hyena', - 'hymen', - 'hyper', - 'icily', - 'icing', - 'ideal', - 'idiom', - 'idiot', - 'idler', - 'idyll', - 'igloo', - 'iliac', - 'image', - 'imbue', - 'impel', - 'imply', - 'inane', - 'inbox', - 'incur', - 'index', - 'inept', - 'inert', - 'infer', - 'ingot', - 'inlay', - 'inlet', - 'inner', - 'input', - 'inter', - 'intro', - 'ionic', - 'irate', - 'irony', - 'islet', - 'issue', - 'itchy', - 'ivory', - 'jaunt', - 'jazzy', - 'jelly', - 'jerky', - 'jetty', - 'jewel', - 'jiffy', - 'joint', - 'joist', - 'joker', - 'jolly', - 'joust', - 'judge', - 'juice', - 'juicy', - 'jumbo', - 'jumpy', - 'junta', - 'junto', - 'juror', - 'kappa', - 'karma', - 'kayak', - 'kebab', - 'khaki', - 'kinky', - 'kiosk', - 'kitty', - 'knack', - 'knave', - 'knead', - 'kneed', - 'kneel', - 'knelt', - 'knife', - 'knock', - 'knoll', - 'known', - 'koala', - 'krill', - 'label', - 'labor', - 'laden', - 'ladle', - 'lager', - 'lance', - 'lanky', - 'lapel', - 'lapse', - 'large', - 'larva', - 'lasso', - 'latch', - 'later', - 'lathe', - 'latte', - 'laugh', - 'layer', - 'leach', - 'leafy', - 'leaky', - 'leant', - 'leapt', - 'learn', - 'lease', - 'leash', - 'least', - 'leave', - 'ledge', - 'leech', - 'leery', - 'lefty', - 'legal', - 'leggy', - 'lemon', - 'lemur', - 'leper', - 'level', - 'lever', - 'libel', - 'liege', - 'light', - 'liken', - 'lilac', - 'limbo', - 'limit', - 'linen', - 'liner', - 'lingo', - 'lipid', - 'lithe', - 'liver', - 'livid', - 'llama', - 'loamy', - 'loath', - 'lobby', - 'local', - 'locus', - 'lodge', - 'lofty', - 'logic', - 'login', - 'loopy', - 'loose', - 'lorry', - 'loser', - 'louse', - 'lousy', - 'lover', - 'lower', - 'lowly', - 'loyal', - 'lucid', - 'lucky', - 'lumen', - 'lumpy', - 'lunar', - 'lunch', - 'lunge', - 'lupus', - 'lurch', - 'lurid', - 'lusty', - 'lying', - 'lymph', - 'lynch', - 'lyric', - 'macaw', - 'macho', - 'macro', - 'madam', - 'madly', - 'mafia', - 'magic', - 'magma', - 'maize', - 'major', - 'maker', - 'mambo', - 'mamma', - 'mammy', - 'manga', - 'mange', - 'mango', - 'mangy', - 'mania', - 'manic', - 'manly', - 'manor', - 'maple', - 'march', - 'marry', - 'marsh', - 'mason', - 'masse', - 'match', - 'matey', - 'mauve', - 'maxim', - 'maybe', - 'mayor', - 'mealy', - 'meant', - 'meaty', - 'mecca', - 'medal', - 'media', - 'medic', - 'melee', - 'melon', - 'mercy', - 'merge', - 'merit', - 'merry', - 'metal', - 'meter', - 'metro', - 'micro', - 'midge', - 'midst', - 'might', - 'milky', - 'mimic', - 'mince', - 'miner', - 'minim', - 'minor', - 'minty', - 'minus', - 'mirth', - 'miser', - 'missy', - 'mocha', - 'modal', - 'model', - 'modem', - 'mogul', - 'moist', - 'molar', - 'moldy', - 'money', - 'month', - 'moody', - 'moose', - 'moral', - 'moron', - 'morph', - 'mossy', - 'motel', - 'motif', - 'motor', - 'motto', - 'moult', - 'mound', - 'mount', - 'mourn', - 'mouse', - 'mouth', - 'mover', - 'movie', - 'mower', - 'mucky', - 'mucus', - 'muddy', - 'mulch', - 'mummy', - 'munch', - 'mural', - 'murky', - 'mushy', - 'music', - 'musky', - 'musty', - 'myrrh', - 'nadir', - 'naive', - 'nanny', - 'nasal', - 'nasty', - 'natal', - 'naval', - 'navel', - 'needy', - 'neigh', - 'nerdy', - 'nerve', - 'never', - 'newer', - 'newly', - 'nicer', - 'niche', - 'niece', - 'night', - 'ninja', - 'ninny', - 'ninth', - 'noble', - 'nobly', - 'noise', - 'noisy', - 'nomad', - 'noose', - 'north', - 'nosey', - 'notch', - 'novel', - 'nudge', - 'nurse', - 'nutty', - 'nylon', - 'nymph', - 'oaken', - 'obese', - 'occur', - 'ocean', - 'octal', - 'octet', - 'odder', - 'oddly', - 'offal', - 'offer', - 'often', - 'olden', - 'older', - 'olive', - 'ombre', - 'omega', - 'onion', - 'onset', - 'opera', - 'opine', - 'opium', - 'optic', - 'orbit', - 'order', - 'organ', - 'other', - 'otter', - 'ought', - 'ounce', - 'outdo', - 'outer', - 'outgo', - 'ovary', - 'ovate', - 'overt', - 'ovine', - 'ovoid', - 'owing', - 'owner', - 'oxide', - 'ozone', - 'paddy', - 'pagan', - 'paint', - 'paler', - 'palsy', - 'panel', - 'panic', - 'pansy', - 'papal', - 'paper', - 'parer', - 'parka', - 'parry', - 'parse', - 'party', - 'pasta', - 'paste', - 'pasty', - 'patch', - 'patio', - 'patsy', - 'patty', - 'pause', - 'payee', - 'payer', - 'peace', - 'peach', - 'pearl', - 'pecan', - 'pedal', - 'penal', - 'pence', - 'penne', - 'penny', - 'perch', - 'peril', - 'perky', - 'pesky', - 'pesto', - 'petal', - 'petty', - 'phase', - 'phone', - 'phony', - 'photo', - 'piano', - 'picky', - 'piece', - 'piety', - 'piggy', - 'pilot', - 'pinch', - 'piney', - 'pinky', - 'pinto', - 'piper', - 'pique', - 'pitch', - 'pithy', - 'pivot', - 'pixel', - 'pixie', - 'pizza', - 'place', - 'plaid', - 'plain', - 'plait', - 'plane', - 'plank', - 'plant', - 'plate', - 'plaza', - 'plead', - 'pleat', - 'plied', - 'plier', - 'pluck', - 'plumb', - 'plume', - 'plump', - 'plunk', - 'plush', - 'poesy', - 'point', - 'poise', - 'poker', - 'polar', - 'polka', - 'polyp', - 'pooch', - 'poppy', - 'porch', - 'poser', - 'posit', - 'posse', - 'pouch', - 'pound', - 'pouty', - 'power', - 'prank', - 'prawn', - 'preen', - 'press', - 'price', - 'prick', - 'pride', - 'pried', - 'prime', - 'primo', - 'print', - 'prior', - 'prism', - 'privy', - 'prize', - 'probe', - 'prone', - 'prong', - 'proof', - 'prose', - 'proud', - 'prove', - 'prowl', - 'proxy', - 'prude', - 'prune', - 'psalm', - 'pubic', - 'pudgy', - 'puffy', - 'pulpy', - 'pulse', - 'punch', - 'pupal', - 'pupil', - 'puppy', - 'puree', - 'purer', - 'purge', - 'purse', - 'pushy', - 'putty', - 'pygmy', - 'quack', - 'quail', - 'quake', - 'qualm', - 'quark', - 'quart', - 'quash', - 'quasi', - 'queen', - 'queer', - 'quell', - 'query', - 'quest', - 'queue', - 'quick', - 'quiet', - 'quill', - 'quilt', - 'quirk', - 'quite', - 'quota', - 'quote', - 'quoth', - 'rabbi', - 'rabid', - 'racer', - 'radar', - 'radii', - 'radio', - 'rainy', - 'raise', - 'rajah', - 'rally', - 'ralph', - 'ramen', - 'ranch', - 'randy', - 'range', - 'rapid', - 'rarer', - 'raspy', - 'ratio', - 'ratty', - 'raven', - 'rayon', - 'razor', - 'reach', - 'react', - 'ready', - 'realm', - 'rearm', - 'rebar', - 'rebel', - 'rebus', - 'rebut', - 'recap', - 'recur', - 'recut', - 'reedy', - 'refer', - 'refit', - 'regal', - 'rehab', - 'reign', - 'relax', - 'relay', - 'relic', - 'remit', - 'renal', - 'renew', - 'repay', - 'repel', - 'reply', - 'rerun', - 'reset', - 'resin', - 'retch', - 'retro', - 'retry', - 'reuse', - 'revel', - 'revue', - 'rhino', - 'rhyme', - 'rider', - 'ridge', - 'rifle', - 'right', - 'rigid', - 'rigor', - 'rinse', - 'ripen', - 'riper', - 'risen', - 'riser', - 'risky', - 'rival', - 'river', - 'rivet', - 'roach', - 'roast', - 'robin', - 'robot', - 'rocky', - 'rodeo', - 'roger', - 'rogue', - 'roomy', - 'roost', - 'rotor', - 'rouge', - 'rough', - 'round', - 'rouse', - 'route', - 'rover', - 'rowdy', - 'rower', - 'royal', - 'ruddy', - 'ruder', - 'rugby', - 'ruler', - 'rumba', - 'rumor', - 'rupee', - 'rural', - 'rusty', - 'sadly', - 'safer', - 'saint', - 'salad', - 'sally', - 'salon', - 'salsa', - 'salty', - 'salve', - 'salvo', - 'sandy', - 'saner', - 'sappy', - 'sassy', - 'satin', - 'satyr', - 'sauce', - 'saucy', - 'sauna', - 'saute', - 'savor', - 'savoy', - 'savvy', - 'scald', - 'scale', - 'scalp', - 'scaly', - 'scamp', - 'scant', - 'scare', - 'scarf', - 'scary', - 'scene', - 'scent', - 'scion', - 'scoff', - 'scold', - 'scone', - 'scoop', - 'scope', - 'score', - 'scorn', - 'scour', - 'scout', - 'scowl', - 'scram', - 'scrap', - 'scree', - 'screw', - 'scrub', - 'scrum', - 'scuba', - 'sedan', - 'seedy', - 'segue', - 'seize', - 'semen', - 'sense', - 'sepia', - 'serif', - 'serum', - 'serve', - 'setup', - 'seven', - 'sever', - 'sewer', - 'shack', - 'shade', - 'shady', - 'shaft', - 'shake', - 'shaky', - 'shale', - 'shall', - 'shalt', - 'shame', - 'shank', - 'shape', - 'shard', - 'share', - 'shark', - 'sharp', - 'shave', - 'shawl', - 'shear', - 'sheen', - 'sheep', - 'sheer', - 'sheet', - 'sheik', - 'shelf', - 'shell', - 'shied', - 'shift', - 'shine', - 'shiny', - 'shire', - 'shirk', - 'shirt', - 'shoal', - 'shock', - 'shone', - 'shook', - 'shoot', - 'shore', - 'shorn', - 'short', - 'shout', - 'shove', - 'shown', - 'showy', - 'shrew', - 'shrub', - 'shrug', - 'shuck', - 'shunt', - 'shush', - 'shyly', - 'siege', - 'sieve', - 'sight', - 'sigma', - 'silky', - 'silly', - 'since', - 'sinew', - 'singe', - 'siren', - 'sissy', - 'sixth', - 'sixty', - 'skate', - 'skier', - 'skiff', - 'skill', - 'skimp', - 'skirt', - 'skulk', - 'skull', - 'skunk', - 'slack', - 'slain', - 'slang', - 'slant', - 'slash', - 'slate', - 'slave', - 'sleek', - 'sleep', - 'sleet', - 'slept', - 'slice', - 'slick', - 'slide', - 'slime', - 'slimy', - 'sling', - 'slink', - 'sloop', - 'slope', - 'slosh', - 'sloth', - 'slump', - 'slung', - 'slunk', - 'slurp', - 'slush', - 'slyly', - 'smack', - 'small', - 'smart', - 'smash', - 'smear', - 'smell', - 'smelt', - 'smile', - 'smirk', - 'smite', - 'smith', - 'smock', - 'smoke', - 'smoky', - 'smote', - 'snack', - 'snail', - 'snake', - 'snaky', - 'snare', - 'snarl', - 'sneak', - 'sneer', - 'snide', - 'sniff', - 'snipe', - 'snoop', - 'snore', - 'snort', - 'snout', - 'snowy', - 'snuck', - 'snuff', - 'soapy', - 'sober', - 'soggy', - 'solar', - 'solid', - 'solve', - 'sonar', - 'sonic', - 'sooth', - 'sooty', - 'sorry', - 'sound', - 'south', - 'sower', - 'space', - 'spade', - 'spank', - 'spare', - 'spark', - 'spasm', - 'spawn', - 'speak', - 'spear', - 'speck', - 'speed', - 'spell', - 'spelt', - 'spend', - 'spent', - 'sperm', - 'spice', - 'spicy', - 'spied', - 'spiel', - 'spike', - 'spiky', - 'spill', - 'spilt', - 'spine', - 'spiny', - 'spire', - 'spite', - 'splat', - 'split', - 'spoil', - 'spoke', - 'spoof', - 'spook', - 'spool', - 'spoon', - 'spore', - 'sport', - 'spout', - 'spray', - 'spree', - 'sprig', - 'spunk', - 'spurn', - 'spurt', - 'squad', - 'squat', - 'squib', - 'stack', - 'staff', - 'stage', - 'staid', - 'stain', - 'stair', - 'stake', - 'stale', - 'stalk', - 'stall', - 'stamp', - 'stand', - 'stank', - 'stare', - 'stark', - 'start', - 'stash', - 'state', - 'stave', - 'stead', - 'steak', - 'steal', - 'steam', - 'steed', - 'steel', - 'steep', - 'steer', - 'stein', - 'stern', - 'stick', - 'stiff', - 'still', - 'stilt', - 'sting', - 'stink', - 'stint', - 'stock', - 'stoic', - 'stoke', - 'stole', - 'stomp', - 'stone', - 'stony', - 'stood', - 'stool', - 'stoop', - 'store', - 'stork', - 'storm', - 'story', - 'stout', - 'stove', - 'strap', - 'straw', - 'stray', - 'strip', - 'strut', - 'stuck', - 'study', - 'stuff', - 'stump', - 'stung', - 'stunk', - 'stunt', - 'style', - 'suave', - 'sugar', - 'suing', - 'suite', - 'sulky', - 'sully', - 'sumac', - 'sunny', - 'super', - 'surer', - 'surge', - 'surly', - 'sushi', - 'swami', - 'swamp', - 'swarm', - 'swash', - 'swath', - 'swear', - 'sweat', - 'sweep', - 'sweet', - 'swell', - 'swept', - 'swift', - 'swill', - 'swine', - 'swing', - 'swirl', - 'swish', - 'swoon', - 'swoop', - 'sword', - 'swore', - 'sworn', - 'swung', - 'synod', - 'syrup', - 'tabby', - 'table', - 'taboo', - 'tacit', - 'tacky', - 'taffy', - 'taint', - 'taken', - 'taker', - 'tally', - 'talon', - 'tamer', - 'tango', - 'tangy', - 'taper', - 'tapir', - 'tardy', - 'tarot', - 'taste', - 'tasty', - 'tatty', - 'taunt', - 'tawny', - 'teach', - 'teary', - 'tease', - 'teddy', - 'teeth', - 'tempo', - 'tenet', - 'tenor', - 'tense', - 'tenth', - 'tepee', - 'tepid', - 'terra', - 'terse', - 'testy', - 'thank', - 'theft', - 'their', - 'theme', - 'there', - 'these', - 'theta', - 'thick', - 'thief', - 'thigh', - 'thing', - 'think', - 'third', - 'thong', - 'thorn', - 'those', - 'three', - 'threw', - 'throb', - 'throw', - 'thrum', - 'thumb', - 'thump', - 'thyme', - 'tiara', - 'tibia', - 'tidal', - 'tiger', - 'tight', - 'tilde', - 'timer', - 'timid', - 'tipsy', - 'titan', - 'tithe', - 'title', - 'toast', - 'today', - 'toddy', - 'token', - 'tonal', - 'tonga', - 'tonic', - 'tooth', - 'topaz', - 'topic', - 'torch', - 'torso', - 'torus', - 'total', - 'totem', - 'touch', - 'tough', - 'towel', - 'tower', - 'toxic', - 'toxin', - 'trace', - 'track', - 'tract', - 'trade', - 'trail', - 'train', - 'trait', - 'tramp', - 'trash', - 'trawl', - 'tread', - 'treat', - 'trend', - 'triad', - 'trial', - 'tribe', - 'trice', - 'trick', - 'tried', - 'tripe', - 'trite', - 'troll', - 'troop', - 'trope', - 'trout', - 'trove', - 'truce', - 'truck', - 'truer', - 'truly', - 'trump', - 'trunk', - 'truss', - 'trust', - 'truth', - 'tryst', - 'tubal', - 'tuber', - 'tulip', - 'tulle', - 'tumor', - 'tunic', - 'turbo', - 'tutor', - 'twang', - 'tweak', - 'tweed', - 'tweet', - 'twice', - 'twine', - 'twirl', - 'twist', - 'twixt', - 'tying', - 'udder', - 'ulcer', - 'ultra', - 'umbra', - 'uncle', - 'uncut', - 'under', - 'undid', - 'undue', - 'unfed', - 'unfit', - 'unify', - 'union', - 'unite', - 'unity', - 'unlit', - 'unmet', - 'unset', - 'untie', - 'until', - 'unwed', - 'unzip', - 'upper', - 'upset', - 'urban', - 'urine', - 'usage', - 'usher', - 'using', - 'usual', - 'usurp', - 'utile', - 'utter', - 'vague', - 'valet', - 'valid', - 'valor', - 'value', - 'valve', - 'vapid', - 'vapor', - 'vault', - 'vaunt', - 'vegan', - 'venom', - 'venue', - 'verge', - 'verse', - 'verso', - 'verve', - 'vicar', - 'video', - 'vigil', - 'vigor', - 'villa', - 'vinyl', - 'viola', - 'viper', - 'viral', - 'virus', - 'visit', - 'visor', - 'vista', - 'vital', - 'vivid', - 'vixen', - 'vocal', - 'vodka', - 'vogue', - 'voice', - 'voila', - 'vomit', - 'voter', - 'vouch', - 'vowel', - 'vying', - 'wacky', - 'wafer', - 'wager', - 'wagon', - 'waist', - 'waive', - 'waltz', - 'warty', - 'waste', - 'watch', - 'water', - 'waver', - 'waxen', - 'weary', - 'weave', - 'wedge', - 'weedy', - 'weigh', - 'weird', - 'welch', - 'welsh', - 'wench', - 'whack', - 'whale', - 'wharf', - 'wheat', - 'wheel', - 'whelp', - 'where', - 'which', - 'whiff', - 'while', - 'whine', - 'whiny', - 'whirl', - 'whisk', - 'white', - 'whole', - 'whoop', - 'whose', - 'widen', - 'wider', - 'widow', - 'width', - 'wield', - 'wight', - 'willy', - 'wimpy', - 'wince', - 'winch', - 'windy', - 'wiser', - 'wispy', - 'witch', - 'witty', - 'woken', - 'woman', - 'women', - 'woody', - 'wooer', - 'wooly', - 'woozy', - 'wordy', - 'world', - 'worry', - 'worse', - 'worst', - 'worth', - 'would', - 'wound', - 'woven', - 'wrack', - 'wrath', - 'wreak', - 'wreck', - 'wrest', - 'wring', - 'wrist', - 'write', - 'wrong', - 'wrote', - 'wrung', - 'wryly', - 'yacht', - 'yearn', - 'yeast', - 'yield', - 'young', - 'youth', - 'zebra', - 'zesty', - 'zonal' -]; - -/** The list of valid guesses, of which the list of possible words is a subset */ -export const allowed = new Set([ - ...words, - 'aahed', - 'aalii', - 'aargh', - 'aarti', - 'abaca', - 'abaci', - 'abacs', - 'abaft', - 'abaka', - 'abamp', - 'aband', - 'abash', - 'abask', - 'abaya', - 'abbas', - 'abbed', - 'abbes', - 'abcee', - 'abeam', - 'abear', - 'abele', - 'abers', - 'abets', - 'abies', - 'abler', - 'ables', - 'ablet', - 'ablow', - 'abmho', - 'abohm', - 'aboil', - 'aboma', - 'aboon', - 'abord', - 'abore', - 'abram', - 'abray', - 'abrim', - 'abrin', - 'abris', - 'absey', - 'absit', - 'abuna', - 'abune', - 'abuts', - 'abuzz', - 'abyes', - 'abysm', - 'acais', - 'acari', - 'accas', - 'accoy', - 'acerb', - 'acers', - 'aceta', - 'achar', - 'ached', - 'aches', - 'achoo', - 'acids', - 'acidy', - 'acing', - 'acini', - 'ackee', - 'acker', - 'acmes', - 'acmic', - 'acned', - 'acnes', - 'acock', - 'acold', - 'acred', - 'acres', - 'acros', - 'acted', - 'actin', - 'acton', - 'acyls', - 'adaws', - 'adays', - 'adbot', - 'addax', - 'added', - 'adder', - 'addio', - 'addle', - 'adeem', - 'adhan', - 'adieu', - 'adios', - 'adits', - 'adman', - 'admen', - 'admix', - 'adobo', - 'adown', - 'adoze', - 'adrad', - 'adred', - 'adsum', - 'aduki', - 'adunc', - 'adust', - 'advew', - 'adyta', - 'adzed', - 'adzes', - 'aecia', - 'aedes', - 'aegis', - 'aeons', - 'aerie', - 'aeros', - 'aesir', - 'afald', - 'afara', - 'afars', - 'afear', - 'aflaj', - 'afore', - 'afrit', - 'afros', - 'agama', - 'agami', - 'agars', - 'agast', - 'agave', - 'agaze', - 'agene', - 'agers', - 'agger', - 'aggie', - 'aggri', - 'aggro', - 'aggry', - 'aghas', - 'agila', - 'agios', - 'agism', - 'agist', - 'agita', - 'aglee', - 'aglet', - 'agley', - 'agloo', - 'aglus', - 'agmas', - 'agoge', - 'agone', - 'agons', - 'agood', - 'agria', - 'agrin', - 'agros', - 'agued', - 'agues', - 'aguna', - 'aguti', - 'aheap', - 'ahent', - 'ahigh', - 'ahind', - 'ahing', - 'ahint', - 'ahold', - 'ahull', - 'ahuru', - 'aidas', - 'aided', - 'aides', - 'aidoi', - 'aidos', - 'aiery', - 'aigas', - 'aight', - 'ailed', - 'aimed', - 'aimer', - 'ainee', - 'ainga', - 'aioli', - 'aired', - 'airer', - 'airns', - 'airth', - 'airts', - 'aitch', - 'aitus', - 'aiver', - 'aiyee', - 'aizle', - 'ajies', - 'ajiva', - 'ajuga', - 'ajwan', - 'akees', - 'akela', - 'akene', - 'aking', - 'akita', - 'akkas', - 'alaap', - 'alack', - 'alamo', - 'aland', - 'alane', - 'alang', - 'alans', - 'alant', - 'alapa', - 'alaps', - 'alary', - 'alate', - 'alays', - 'albas', - 'albee', - 'alcid', - 'alcos', - 'aldea', - 'alder', - 'aldol', - 'aleck', - 'alecs', - 'alefs', - 'aleft', - 'aleph', - 'alews', - 'aleye', - 'alfas', - 'algal', - 'algas', - 'algid', - 'algin', - 'algor', - 'algum', - 'alias', - 'alifs', - 'aline', - 'alist', - 'aliya', - 'alkie', - 'alkos', - 'alkyd', - 'alkyl', - 'allee', - 'allel', - 'allis', - 'allod', - 'allyl', - 'almah', - 'almas', - 'almeh', - 'almes', - 'almud', - 'almug', - 'alods', - 'aloed', - 'aloes', - 'aloha', - 'aloin', - 'aloos', - 'alowe', - 'altho', - 'altos', - 'alula', - 'alums', - 'alure', - 'alvar', - 'alway', - 'amahs', - 'amain', - 'amate', - 'amaut', - 'amban', - 'ambit', - 'ambos', - 'ambry', - 'ameba', - 'ameer', - 'amene', - 'amens', - 'ament', - 'amias', - 'amice', - 'amici', - 'amide', - 'amido', - 'amids', - 'amies', - 'amiga', - 'amigo', - 'amine', - 'amino', - 'amins', - 'amirs', - 'amlas', - 'amman', - 'ammon', - 'ammos', - 'amnia', - 'amnic', - 'amnio', - 'amoks', - 'amole', - 'amort', - 'amour', - 'amove', - 'amowt', - 'amped', - 'ampul', - 'amrit', - 'amuck', - 'amyls', - 'anana', - 'anata', - 'ancho', - 'ancle', - 'ancon', - 'andro', - 'anear', - 'anele', - 'anent', - 'angas', - 'anglo', - 'anigh', - 'anile', - 'anils', - 'anima', - 'animi', - 'anion', - 'anise', - 'anker', - 'ankhs', - 'ankus', - 'anlas', - 'annal', - 'annas', - 'annat', - 'anoas', - 'anole', - 'anomy', - 'ansae', - 'antae', - 'antar', - 'antas', - 'anted', - 'antes', - 'antis', - 'antra', - 'antre', - 'antsy', - 'anura', - 'anyon', - 'apace', - 'apage', - 'apaid', - 'apayd', - 'apays', - 'apeak', - 'apeek', - 'apers', - 'apert', - 'apery', - 'apgar', - 'aphis', - 'apian', - 'apiol', - 'apish', - 'apism', - 'apode', - 'apods', - 'apoop', - 'aport', - 'appal', - 'appay', - 'appel', - 'appro', - 'appui', - 'appuy', - 'apres', - 'apses', - 'apsis', - 'apsos', - 'apted', - 'apter', - 'aquae', - 'aquas', - 'araba', - 'araks', - 'arame', - 'arars', - 'arbas', - 'arced', - 'archi', - 'arcos', - 'arcus', - 'ardeb', - 'ardri', - 'aread', - 'areae', - 'areal', - 'arear', - 'areas', - 'areca', - 'aredd', - 'arede', - 'arefy', - 'areic', - 'arene', - 'arepa', - 'arere', - 'arete', - 'arets', - 'arett', - 'argal', - 'argan', - 'argil', - 'argle', - 'argol', - 'argon', - 'argot', - 'argus', - 'arhat', - 'arias', - 'ariel', - 'ariki', - 'arils', - 'ariot', - 'arish', - 'arked', - 'arled', - 'arles', - 'armed', - 'armer', - 'armet', - 'armil', - 'arnas', - 'arnut', - 'aroba', - 'aroha', - 'aroid', - 'arpas', - 'arpen', - 'arrah', - 'arras', - 'arret', - 'arris', - 'arroz', - 'arsed', - 'arses', - 'arsey', - 'arsis', - 'artal', - 'artel', - 'artic', - 'artis', - 'aruhe', - 'arums', - 'arval', - 'arvee', - 'arvos', - 'aryls', - 'asana', - 'ascon', - 'ascus', - 'asdic', - 'ashed', - 'ashes', - 'ashet', - 'asked', - 'asker', - 'askoi', - 'askos', - 'aspen', - 'asper', - 'aspic', - 'aspie', - 'aspis', - 'aspro', - 'assai', - 'assam', - 'asses', - 'assez', - 'assot', - 'aster', - 'astir', - 'astun', - 'asura', - 'asway', - 'aswim', - 'asyla', - 'ataps', - 'ataxy', - 'atigi', - 'atilt', - 'atimy', - 'atlas', - 'atman', - 'atmas', - 'atmos', - 'atocs', - 'atoke', - 'atoks', - 'atoms', - 'atomy', - 'atony', - 'atopy', - 'atria', - 'atrip', - 'attap', - 'attar', - 'atuas', - 'audad', - 'auger', - 'aught', - 'aulas', - 'aulic', - 'auloi', - 'aulos', - 'aumil', - 'aunes', - 'aunts', - 'aurae', - 'aural', - 'aurar', - 'auras', - 'aurei', - 'aures', - 'auric', - 'auris', - 'aurum', - 'autos', - 'auxin', - 'avale', - 'avant', - 'avast', - 'avels', - 'avens', - 'avers', - 'avgas', - 'avine', - 'avion', - 'avise', - 'aviso', - 'avize', - 'avows', - 'avyze', - 'awarn', - 'awato', - 'awave', - 'aways', - 'awdls', - 'aweel', - 'aweto', - 'awing', - 'awmry', - 'awned', - 'awner', - 'awols', - 'awork', - 'axels', - 'axile', - 'axils', - 'axing', - 'axite', - 'axled', - 'axles', - 'axman', - 'axmen', - 'axoid', - 'axone', - 'axons', - 'ayahs', - 'ayaya', - 'ayelp', - 'aygre', - 'ayins', - 'ayont', - 'ayres', - 'ayrie', - 'azans', - 'azide', - 'azido', - 'azine', - 'azlon', - 'azoic', - 'azole', - 'azons', - 'azote', - 'azoth', - 'azuki', - 'azurn', - 'azury', - 'azygy', - 'azyme', - 'azyms', - 'baaed', - 'baals', - 'babas', - 'babel', - 'babes', - 'babka', - 'baboo', - 'babul', - 'babus', - 'bacca', - 'bacco', - 'baccy', - 'bacha', - 'bachs', - 'backs', - 'baddy', - 'baels', - 'baffs', - 'baffy', - 'bafts', - 'baghs', - 'bagie', - 'bahts', - 'bahus', - 'bahut', - 'bails', - 'bairn', - 'baisa', - 'baith', - 'baits', - 'baiza', - 'baize', - 'bajan', - 'bajra', - 'bajri', - 'bajus', - 'baked', - 'baken', - 'bakes', - 'bakra', - 'balas', - 'balds', - 'baldy', - 'baled', - 'bales', - 'balks', - 'balky', - 'balls', - 'bally', - 'balms', - 'baloo', - 'balsa', - 'balti', - 'balun', - 'balus', - 'bambi', - 'banak', - 'banco', - 'bancs', - 'banda', - 'bandh', - 'bands', - 'bandy', - 'baned', - 'banes', - 'bangs', - 'bania', - 'banks', - 'banns', - 'bants', - 'bantu', - 'banty', - 'banya', - 'bapus', - 'barbe', - 'barbs', - 'barby', - 'barca', - 'barde', - 'bardo', - 'bards', - 'bardy', - 'bared', - 'barer', - 'bares', - 'barfi', - 'barfs', - 'baric', - 'barks', - 'barky', - 'barms', - 'barmy', - 'barns', - 'barny', - 'barps', - 'barra', - 'barre', - 'barro', - 'barry', - 'barye', - 'basan', - 'based', - 'basen', - 'baser', - 'bases', - 'basho', - 'basij', - 'basks', - 'bason', - 'basse', - 'bassi', - 'basso', - 'bassy', - 'basta', - 'basti', - 'basto', - 'basts', - 'bated', - 'bates', - 'baths', - 'batik', - 'batta', - 'batts', - 'battu', - 'bauds', - 'bauks', - 'baulk', - 'baurs', - 'bavin', - 'bawds', - 'bawks', - 'bawls', - 'bawns', - 'bawrs', - 'bawty', - 'bayed', - 'bayer', - 'bayes', - 'bayle', - 'bayts', - 'bazar', - 'bazoo', - 'beads', - 'beaks', - 'beaky', - 'beals', - 'beams', - 'beamy', - 'beano', - 'beans', - 'beany', - 'beare', - 'bears', - 'beath', - 'beats', - 'beaty', - 'beaus', - 'beaut', - 'beaux', - 'bebop', - 'becap', - 'becke', - 'becks', - 'bedad', - 'bedel', - 'bedes', - 'bedew', - 'bedim', - 'bedye', - 'beedi', - 'beefs', - 'beeps', - 'beers', - 'beery', - 'beets', - 'befog', - 'begad', - 'begar', - 'begem', - 'begot', - 'begum', - 'beige', - 'beigy', - 'beins', - 'bekah', - 'belah', - 'belar', - 'belay', - 'belee', - 'belga', - 'bells', - 'belon', - 'belts', - 'bemad', - 'bemas', - 'bemix', - 'bemud', - 'bends', - 'bendy', - 'benes', - 'benet', - 'benga', - 'benis', - 'benne', - 'benni', - 'benny', - 'bento', - 'bents', - 'benty', - 'bepat', - 'beray', - 'beres', - 'bergs', - 'berko', - 'berks', - 'berme', - 'berms', - 'berob', - 'beryl', - 'besat', - 'besaw', - 'besee', - 'beses', - 'besit', - 'besom', - 'besot', - 'besti', - 'bests', - 'betas', - 'beted', - 'betes', - 'beths', - 'betid', - 'beton', - 'betta', - 'betty', - 'bever', - 'bevor', - 'bevue', - 'bevvy', - 'bewet', - 'bewig', - 'bezes', - 'bezil', - 'bezzy', - 'bhais', - 'bhaji', - 'bhang', - 'bhats', - 'bhels', - 'bhoot', - 'bhuna', - 'bhuts', - 'biach', - 'biali', - 'bialy', - 'bibbs', - 'bibes', - 'biccy', - 'bices', - 'bided', - 'bider', - 'bides', - 'bidet', - 'bidis', - 'bidon', - 'bield', - 'biers', - 'biffo', - 'biffs', - 'biffy', - 'bifid', - 'bigae', - 'biggs', - 'biggy', - 'bigha', - 'bight', - 'bigly', - 'bigos', - 'bijou', - 'biked', - 'biker', - 'bikes', - 'bikie', - 'bilbo', - 'bilby', - 'biled', - 'biles', - 'bilgy', - 'bilks', - 'bills', - 'bimah', - 'bimas', - 'bimbo', - 'binal', - 'bindi', - 'binds', - 'biner', - 'bines', - 'bings', - 'bingy', - 'binit', - 'binks', - 'bints', - 'biogs', - 'biont', - 'biota', - 'biped', - 'bipod', - 'birds', - 'birks', - 'birle', - 'birls', - 'biros', - 'birrs', - 'birse', - 'birsy', - 'bises', - 'bisks', - 'bisom', - 'bitch', - 'biter', - 'bites', - 'bitos', - 'bitou', - 'bitsy', - 'bitte', - 'bitts', - 'bivia', - 'bivvy', - 'bizes', - 'bizzo', - 'bizzy', - 'blabs', - 'blads', - 'blady', - 'blaer', - 'blaes', - 'blaff', - 'blags', - 'blahs', - 'blain', - 'blams', - 'blart', - 'blase', - 'blash', - 'blate', - 'blats', - 'blatt', - 'blaud', - 'blawn', - 'blaws', - 'blays', - 'blear', - 'blebs', - 'blech', - 'blees', - 'blent', - 'blert', - 'blest', - 'blets', - 'bleys', - 'blimy', - 'bling', - 'blini', - 'blins', - 'bliny', - 'blips', - 'blist', - 'blite', - 'blits', - 'blive', - 'blobs', - 'blocs', - 'blogs', - 'blook', - 'bloop', - 'blore', - 'blots', - 'blows', - 'blowy', - 'blubs', - 'blude', - 'bluds', - 'bludy', - 'blued', - 'blues', - 'bluet', - 'bluey', - 'bluid', - 'blume', - 'blunk', - 'blurs', - 'blype', - 'boabs', - 'boaks', - 'boars', - 'boart', - 'boats', - 'bobac', - 'bobak', - 'bobas', - 'bobol', - 'bobos', - 'bocca', - 'bocce', - 'bocci', - 'boche', - 'bocks', - 'boded', - 'bodes', - 'bodge', - 'bodhi', - 'bodle', - 'boeps', - 'boets', - 'boeuf', - 'boffo', - 'boffs', - 'bogan', - 'bogey', - 'boggy', - 'bogie', - 'bogle', - 'bogue', - 'bogus', - 'bohea', - 'bohos', - 'boils', - 'boing', - 'boink', - 'boite', - 'boked', - 'bokeh', - 'bokes', - 'bokos', - 'bolar', - 'bolas', - 'bolds', - 'boles', - 'bolix', - 'bolls', - 'bolos', - 'bolts', - 'bolus', - 'bomas', - 'bombe', - 'bombo', - 'bombs', - 'bonce', - 'bonds', - 'boned', - 'boner', - 'bones', - 'bongs', - 'bonie', - 'bonks', - 'bonne', - 'bonny', - 'bonza', - 'bonze', - 'booai', - 'booay', - 'boobs', - 'boody', - 'booed', - 'boofy', - 'boogy', - 'boohs', - 'books', - 'booky', - 'bools', - 'booms', - 'boomy', - 'boong', - 'boons', - 'boord', - 'boors', - 'boose', - 'boots', - 'boppy', - 'borak', - 'boral', - 'boras', - 'borde', - 'bords', - 'bored', - 'boree', - 'borel', - 'borer', - 'bores', - 'borgo', - 'boric', - 'borks', - 'borms', - 'borna', - 'boron', - 'borts', - 'borty', - 'bortz', - 'bosie', - 'bosks', - 'bosky', - 'boson', - 'bosun', - 'botas', - 'botel', - 'botes', - 'bothy', - 'botte', - 'botts', - 'botty', - 'bouge', - 'bouks', - 'boult', - 'bouns', - 'bourd', - 'bourg', - 'bourn', - 'bouse', - 'bousy', - 'bouts', - 'bovid', - 'bowat', - 'bowed', - 'bower', - 'bowes', - 'bowet', - 'bowie', - 'bowls', - 'bowne', - 'bowrs', - 'bowse', - 'boxed', - 'boxen', - 'boxes', - 'boxla', - 'boxty', - 'boyar', - 'boyau', - 'boyed', - 'boyfs', - 'boygs', - 'boyla', - 'boyos', - 'boysy', - 'bozos', - 'braai', - 'brach', - 'brack', - 'bract', - 'brads', - 'braes', - 'brags', - 'brail', - 'braks', - 'braky', - 'brame', - 'brane', - 'brank', - 'brans', - 'brant', - 'brast', - 'brats', - 'brava', - 'bravi', - 'braws', - 'braxy', - 'brays', - 'braza', - 'braze', - 'bream', - 'brede', - 'breds', - 'breem', - 'breer', - 'brees', - 'breid', - 'breis', - 'breme', - 'brens', - 'brent', - 'brere', - 'brers', - 'breve', - 'brews', - 'breys', - 'brier', - 'bries', - 'brigs', - 'briki', - 'briks', - 'brill', - 'brims', - 'brins', - 'brios', - 'brise', - 'briss', - 'brith', - 'brits', - 'britt', - 'brize', - 'broch', - 'brock', - 'brods', - 'brogh', - 'brogs', - 'brome', - 'bromo', - 'bronc', - 'brond', - 'brool', - 'broos', - 'brose', - 'brosy', - 'brows', - 'brugh', - 'bruin', - 'bruit', - 'brule', - 'brume', - 'brung', - 'brusk', - 'brust', - 'bruts', - 'buats', - 'buaze', - 'bubal', - 'bubas', - 'bubba', - 'bubbe', - 'bubby', - 'bubus', - 'buchu', - 'bucko', - 'bucks', - 'bucku', - 'budas', - 'budis', - 'budos', - 'buffa', - 'buffe', - 'buffi', - 'buffo', - 'buffs', - 'buffy', - 'bufos', - 'bufty', - 'buhls', - 'buhrs', - 'buiks', - 'buist', - 'bukes', - 'bulbs', - 'bulgy', - 'bulks', - 'bulla', - 'bulls', - 'bulse', - 'bumbo', - 'bumfs', - 'bumph', - 'bumps', - 'bumpy', - 'bunas', - 'bunce', - 'bunco', - 'bunde', - 'bundh', - 'bunds', - 'bundt', - 'bundu', - 'bundy', - 'bungs', - 'bungy', - 'bunia', - 'bunje', - 'bunjy', - 'bunko', - 'bunks', - 'bunns', - 'bunts', - 'bunty', - 'bunya', - 'buoys', - 'buppy', - 'buran', - 'buras', - 'burbs', - 'burds', - 'buret', - 'burfi', - 'burgh', - 'burgs', - 'burin', - 'burka', - 'burke', - 'burks', - 'burls', - 'burns', - 'buroo', - 'burps', - 'burqa', - 'burro', - 'burrs', - 'burry', - 'bursa', - 'burse', - 'busby', - 'buses', - 'busks', - 'busky', - 'bussu', - 'busti', - 'busts', - 'busty', - 'buteo', - 'butes', - 'butle', - 'butoh', - 'butts', - 'butty', - 'butut', - 'butyl', - 'buzzy', - 'bwana', - 'bwazi', - 'byded', - 'bydes', - 'byked', - 'bykes', - 'byres', - 'byrls', - 'byssi', - 'bytes', - 'byway', - 'caaed', - 'cabas', - 'caber', - 'cabob', - 'caboc', - 'cabre', - 'cacas', - 'cacks', - 'cacky', - 'cadee', - 'cades', - 'cadge', - 'cadgy', - 'cadie', - 'cadis', - 'cadre', - 'caeca', - 'caese', - 'cafes', - 'caffs', - 'caged', - 'cager', - 'cages', - 'cagot', - 'cahow', - 'caids', - 'cains', - 'caird', - 'cajon', - 'cajun', - 'caked', - 'cakes', - 'cakey', - 'calfs', - 'calid', - 'calif', - 'calix', - 'calks', - 'calla', - 'calls', - 'calms', - 'calmy', - 'calos', - 'calpa', - 'calps', - 'calve', - 'calyx', - 'caman', - 'camas', - 'cames', - 'camis', - 'camos', - 'campi', - 'campo', - 'camps', - 'campy', - 'camus', - 'caned', - 'caneh', - 'caner', - 'canes', - 'cangs', - 'canid', - 'canna', - 'canns', - 'canso', - 'canst', - 'canto', - 'cants', - 'canty', - 'capas', - 'caped', - 'capes', - 'capex', - 'caphs', - 'capiz', - 'caple', - 'capon', - 'capos', - 'capot', - 'capri', - 'capul', - 'carap', - 'carbo', - 'carbs', - 'carby', - 'cardi', - 'cards', - 'cardy', - 'cared', - 'carer', - 'cares', - 'caret', - 'carex', - 'carks', - 'carle', - 'carls', - 'carns', - 'carny', - 'carob', - 'carom', - 'caron', - 'carpi', - 'carps', - 'carrs', - 'carse', - 'carta', - 'carte', - 'carts', - 'carvy', - 'casas', - 'casco', - 'cased', - 'cases', - 'casks', - 'casky', - 'casts', - 'casus', - 'cates', - 'cauda', - 'cauks', - 'cauld', - 'cauls', - 'caums', - 'caups', - 'cauri', - 'causa', - 'cavas', - 'caved', - 'cavel', - 'caver', - 'caves', - 'cavie', - 'cawed', - 'cawks', - 'caxon', - 'ceaze', - 'cebid', - 'cecal', - 'cecum', - 'ceded', - 'ceder', - 'cedes', - 'cedis', - 'ceiba', - 'ceili', - 'ceils', - 'celeb', - 'cella', - 'celli', - 'cells', - 'celom', - 'celts', - 'cense', - 'cento', - 'cents', - 'centu', - 'ceorl', - 'cepes', - 'cerci', - 'cered', - 'ceres', - 'cerge', - 'ceria', - 'ceric', - 'cerne', - 'ceroc', - 'ceros', - 'certs', - 'certy', - 'cesse', - 'cesta', - 'cesti', - 'cetes', - 'cetyl', - 'cezve', - 'chace', - 'chack', - 'chaco', - 'chado', - 'chads', - 'chaft', - 'chais', - 'chals', - 'chams', - 'chana', - 'chang', - 'chank', - 'chape', - 'chaps', - 'chapt', - 'chara', - 'chare', - 'chark', - 'charr', - 'chars', - 'chary', - 'chats', - 'chave', - 'chavs', - 'chawk', - 'chaws', - 'chaya', - 'chays', - 'cheep', - 'chefs', - 'cheka', - 'chela', - 'chelp', - 'chemo', - 'chems', - 'chere', - 'chert', - 'cheth', - 'chevy', - 'chews', - 'chewy', - 'chiao', - 'chias', - 'chibs', - 'chica', - 'chich', - 'chico', - 'chics', - 'chiel', - 'chiks', - 'chile', - 'chimb', - 'chimo', - 'chimp', - 'chine', - 'ching', - 'chink', - 'chino', - 'chins', - 'chips', - 'chirk', - 'chirl', - 'chirm', - 'chiro', - 'chirr', - 'chirt', - 'chiru', - 'chits', - 'chive', - 'chivs', - 'chivy', - 'chizz', - 'choco', - 'chocs', - 'chode', - 'chogs', - 'choil', - 'choko', - 'choky', - 'chola', - 'choli', - 'cholo', - 'chomp', - 'chons', - 'choof', - 'chook', - 'choom', - 'choon', - 'chops', - 'chota', - 'chott', - 'chout', - 'choux', - 'chowk', - 'chows', - 'chubs', - 'chufa', - 'chuff', - 'chugs', - 'chums', - 'churl', - 'churr', - 'chuse', - 'chuts', - 'chyle', - 'chyme', - 'chynd', - 'cibol', - 'cided', - 'cides', - 'ciels', - 'ciggy', - 'cilia', - 'cills', - 'cimar', - 'cimex', - 'cinct', - 'cines', - 'cinqs', - 'cions', - 'cippi', - 'circs', - 'cires', - 'cirls', - 'cirri', - 'cisco', - 'cissy', - 'cists', - 'cital', - 'cited', - 'citer', - 'cites', - 'cives', - 'civet', - 'civie', - 'civvy', - 'clach', - 'clade', - 'clads', - 'claes', - 'clags', - 'clame', - 'clams', - 'clans', - 'claps', - 'clapt', - 'claro', - 'clart', - 'clary', - 'clast', - 'clats', - 'claut', - 'clave', - 'clavi', - 'claws', - 'clays', - 'cleck', - 'cleek', - 'cleep', - 'clefs', - 'clegs', - 'cleik', - 'clems', - 'clepe', - 'clept', - 'cleve', - 'clews', - 'clied', - 'clies', - 'clift', - 'clime', - 'cline', - 'clint', - 'clipe', - 'clips', - 'clipt', - 'clits', - 'cloam', - 'clods', - 'cloff', - 'clogs', - 'cloke', - 'clomb', - 'clomp', - 'clonk', - 'clons', - 'cloop', - 'cloot', - 'clops', - 'clote', - 'clots', - 'clour', - 'clous', - 'clows', - 'cloye', - 'cloys', - 'cloze', - 'clubs', - 'clues', - 'cluey', - 'clunk', - 'clype', - 'cnida', - 'coact', - 'coady', - 'coala', - 'coals', - 'coaly', - 'coapt', - 'coarb', - 'coate', - 'coati', - 'coats', - 'cobbs', - 'cobby', - 'cobia', - 'coble', - 'cobza', - 'cocas', - 'cocci', - 'cocco', - 'cocks', - 'cocky', - 'cocos', - 'codas', - 'codec', - 'coded', - 'coden', - 'coder', - 'codes', - 'codex', - 'codon', - 'coeds', - 'coffs', - 'cogie', - 'cogon', - 'cogue', - 'cohab', - 'cohen', - 'cohoe', - 'cohog', - 'cohos', - 'coifs', - 'coign', - 'coils', - 'coins', - 'coirs', - 'coits', - 'coked', - 'cokes', - 'colas', - 'colby', - 'colds', - 'coled', - 'coles', - 'coley', - 'colic', - 'colin', - 'colls', - 'colly', - 'colog', - 'colts', - 'colza', - 'comae', - 'comal', - 'comas', - 'combe', - 'combi', - 'combo', - 'combs', - 'comby', - 'comer', - 'comes', - 'comix', - 'commo', - 'comms', - 'commy', - 'compo', - 'comps', - 'compt', - 'comte', - 'comus', - 'coned', - 'cones', - 'coney', - 'confs', - 'conga', - 'conge', - 'congo', - 'conia', - 'conin', - 'conks', - 'conky', - 'conne', - 'conns', - 'conte', - 'conto', - 'conus', - 'convo', - 'cooch', - 'cooed', - 'cooee', - 'cooer', - 'cooey', - 'coofs', - 'cooks', - 'cooky', - 'cools', - 'cooly', - 'coomb', - 'cooms', - 'coomy', - 'coons', - 'coops', - 'coopt', - 'coost', - 'coots', - 'cooze', - 'copal', - 'copay', - 'coped', - 'copen', - 'coper', - 'copes', - 'coppy', - 'copra', - 'copsy', - 'coqui', - 'coram', - 'corbe', - 'corby', - 'cords', - 'cored', - 'cores', - 'corey', - 'corgi', - 'coria', - 'corks', - 'corky', - 'corms', - 'corni', - 'corno', - 'corns', - 'cornu', - 'corps', - 'corse', - 'corso', - 'cosec', - 'cosed', - 'coses', - 'coset', - 'cosey', - 'cosie', - 'costa', - 'coste', - 'costs', - 'cotan', - 'coted', - 'cotes', - 'coths', - 'cotta', - 'cotts', - 'coude', - 'coups', - 'courb', - 'courd', - 'coure', - 'cours', - 'couta', - 'couth', - 'coved', - 'coves', - 'covin', - 'cowal', - 'cowan', - 'cowed', - 'cowks', - 'cowls', - 'cowps', - 'cowry', - 'coxae', - 'coxal', - 'coxed', - 'coxes', - 'coxib', - 'coyau', - 'coyed', - 'coyer', - 'coypu', - 'cozed', - 'cozen', - 'cozes', - 'cozey', - 'cozie', - 'craal', - 'crabs', - 'crags', - 'craic', - 'craig', - 'crake', - 'crame', - 'crams', - 'crans', - 'crape', - 'craps', - 'crapy', - 'crare', - 'craws', - 'crays', - 'creds', - 'creel', - 'crees', - 'crems', - 'crena', - 'creps', - 'crepy', - 'crewe', - 'crews', - 'crias', - 'cribs', - 'cries', - 'crims', - 'crine', - 'crios', - 'cripe', - 'crips', - 'crise', - 'crith', - 'crits', - 'croci', - 'crocs', - 'croft', - 'crogs', - 'cromb', - 'crome', - 'cronk', - 'crons', - 'crool', - 'croon', - 'crops', - 'crore', - 'crost', - 'crout', - 'crows', - 'croze', - 'cruck', - 'crudo', - 'cruds', - 'crudy', - 'crues', - 'cruet', - 'cruft', - 'crunk', - 'cruor', - 'crura', - 'cruse', - 'crusy', - 'cruve', - 'crwth', - 'cryer', - 'ctene', - 'cubby', - 'cubeb', - 'cubed', - 'cuber', - 'cubes', - 'cubit', - 'cuddy', - 'cuffo', - 'cuffs', - 'cuifs', - 'cuing', - 'cuish', - 'cuits', - 'cukes', - 'culch', - 'culet', - 'culex', - 'culls', - 'cully', - 'culms', - 'culpa', - 'culti', - 'cults', - 'culty', - 'cumec', - 'cundy', - 'cunei', - 'cunit', - 'cunts', - 'cupel', - 'cupid', - 'cuppa', - 'cuppy', - 'curat', - 'curbs', - 'curch', - 'curds', - 'curdy', - 'cured', - 'curer', - 'cures', - 'curet', - 'curfs', - 'curia', - 'curie', - 'curli', - 'curls', - 'curns', - 'curny', - 'currs', - 'cursi', - 'curst', - 'cusec', - 'cushy', - 'cusks', - 'cusps', - 'cuspy', - 'cusso', - 'cusum', - 'cutch', - 'cuter', - 'cutes', - 'cutey', - 'cutin', - 'cutis', - 'cutto', - 'cutty', - 'cutup', - 'cuvee', - 'cuzes', - 'cwtch', - 'cyano', - 'cyans', - 'cycad', - 'cycas', - 'cyclo', - 'cyder', - 'cylix', - 'cymae', - 'cymar', - 'cymas', - 'cymes', - 'cymol', - 'cysts', - 'cytes', - 'cyton', - 'czars', - 'daals', - 'dabba', - 'daces', - 'dacha', - 'dacks', - 'dadah', - 'dadas', - 'dados', - 'daffs', - 'daffy', - 'dagga', - 'daggy', - 'dagos', - 'dahls', - 'daiko', - 'daine', - 'daint', - 'daker', - 'daled', - 'dales', - 'dalis', - 'dalle', - 'dalts', - 'daman', - 'damar', - 'dames', - 'damme', - 'damns', - 'damps', - 'dampy', - 'dancy', - 'dangs', - 'danio', - 'danks', - 'danny', - 'dants', - 'daraf', - 'darbs', - 'darcy', - 'dared', - 'darer', - 'dares', - 'darga', - 'dargs', - 'daric', - 'daris', - 'darks', - 'darky', - 'darns', - 'darre', - 'darts', - 'darzi', - 'dashi', - 'dashy', - 'datal', - 'dated', - 'dater', - 'dates', - 'datos', - 'datto', - 'daube', - 'daubs', - 'dauby', - 'dauds', - 'dault', - 'daurs', - 'dauts', - 'daven', - 'davit', - 'dawah', - 'dawds', - 'dawed', - 'dawen', - 'dawks', - 'dawns', - 'dawts', - 'dayan', - 'daych', - 'daynt', - 'dazed', - 'dazer', - 'dazes', - 'deads', - 'deair', - 'deals', - 'deans', - 'deare', - 'dearn', - 'dears', - 'deary', - 'deash', - 'deave', - 'deaws', - 'deawy', - 'debag', - 'debby', - 'debel', - 'debes', - 'debts', - 'debud', - 'debur', - 'debus', - 'debye', - 'decad', - 'decaf', - 'decan', - 'decko', - 'decks', - 'decos', - 'dedal', - 'deeds', - 'deedy', - 'deely', - 'deems', - 'deens', - 'deeps', - 'deere', - 'deers', - 'deets', - 'deeve', - 'deevs', - 'defat', - 'deffo', - 'defis', - 'defog', - 'degas', - 'degum', - 'degus', - 'deice', - 'deids', - 'deify', - 'deils', - 'deism', - 'deist', - 'deked', - 'dekes', - 'dekko', - 'deled', - 'deles', - 'delfs', - 'delft', - 'delis', - 'dells', - 'delly', - 'delos', - 'delph', - 'delts', - 'deman', - 'demes', - 'demic', - 'demit', - 'demob', - 'demoi', - 'demos', - 'dempt', - 'denar', - 'denay', - 'dench', - 'denes', - 'denet', - 'denis', - 'dents', - 'deoxy', - 'derat', - 'deray', - 'dered', - 'deres', - 'derig', - 'derma', - 'derms', - 'derns', - 'derny', - 'deros', - 'derro', - 'derry', - 'derth', - 'dervs', - 'desex', - 'deshi', - 'desis', - 'desks', - 'desse', - 'devas', - 'devel', - 'devis', - 'devon', - 'devos', - 'devot', - 'dewan', - 'dewar', - 'dewax', - 'dewed', - 'dexes', - 'dexie', - 'dhaba', - 'dhaks', - 'dhals', - 'dhikr', - 'dhobi', - 'dhole', - 'dholl', - 'dhols', - 'dhoti', - 'dhows', - 'dhuti', - 'diact', - 'dials', - 'diane', - 'diazo', - 'dibbs', - 'diced', - 'dicer', - 'dices', - 'dicht', - 'dicks', - 'dicky', - 'dicot', - 'dicta', - 'dicts', - 'dicty', - 'diddy', - 'didie', - 'didos', - 'didst', - 'diebs', - 'diels', - 'diene', - 'diets', - 'diffs', - 'dight', - 'dikas', - 'diked', - 'diker', - 'dikes', - 'dikey', - 'dildo', - 'dilli', - 'dills', - 'dimbo', - 'dimer', - 'dimes', - 'dimps', - 'dinar', - 'dined', - 'dines', - 'dinge', - 'dings', - 'dinic', - 'dinks', - 'dinky', - 'dinna', - 'dinos', - 'dints', - 'diols', - 'diota', - 'dippy', - 'dipso', - 'diram', - 'direr', - 'dirke', - 'dirks', - 'dirls', - 'dirts', - 'disas', - 'disci', - 'discs', - 'dishy', - 'disks', - 'disme', - 'dital', - 'ditas', - 'dited', - 'dites', - 'ditsy', - 'ditts', - 'ditzy', - 'divan', - 'divas', - 'dived', - 'dives', - 'divis', - 'divna', - 'divos', - 'divot', - 'divvy', - 'diwan', - 'dixie', - 'dixit', - 'diyas', - 'dizen', - 'djinn', - 'djins', - 'doabs', - 'doats', - 'dobby', - 'dobes', - 'dobie', - 'dobla', - 'dobra', - 'dobro', - 'docht', - 'docks', - 'docos', - 'docus', - 'doddy', - 'dodos', - 'doeks', - 'doers', - 'doest', - 'doeth', - 'doffs', - 'dogan', - 'doges', - 'dogey', - 'doggo', - 'doggy', - 'dogie', - 'dohyo', - 'doilt', - 'doily', - 'doits', - 'dojos', - 'dolce', - 'dolci', - 'doled', - 'doles', - 'dolia', - 'dolls', - 'dolma', - 'dolor', - 'dolos', - 'dolts', - 'domal', - 'domed', - 'domes', - 'domic', - 'donah', - 'donas', - 'donee', - 'doner', - 'donga', - 'dongs', - 'donko', - 'donna', - 'donne', - 'donny', - 'donsy', - 'doobs', - 'dooce', - 'doody', - 'dooks', - 'doole', - 'dools', - 'dooly', - 'dooms', - 'doomy', - 'doona', - 'doorn', - 'doors', - 'doozy', - 'dopas', - 'doped', - 'doper', - 'dopes', - 'dorad', - 'dorba', - 'dorbs', - 'doree', - 'dores', - 'doric', - 'doris', - 'dorks', - 'dorky', - 'dorms', - 'dormy', - 'dorps', - 'dorrs', - 'dorsa', - 'dorse', - 'dorts', - 'dorty', - 'dosai', - 'dosas', - 'dosed', - 'doseh', - 'doser', - 'doses', - 'dosha', - 'dotal', - 'doted', - 'doter', - 'dotes', - 'dotty', - 'douar', - 'douce', - 'doucs', - 'douks', - 'doula', - 'douma', - 'doums', - 'doups', - 'doura', - 'douse', - 'douts', - 'doved', - 'doven', - 'dover', - 'doves', - 'dovie', - 'dowar', - 'dowds', - 'dowed', - 'dower', - 'dowie', - 'dowle', - 'dowls', - 'dowly', - 'downa', - 'downs', - 'dowps', - 'dowse', - 'dowts', - 'doxed', - 'doxes', - 'doxie', - 'doyen', - 'doyly', - 'dozed', - 'dozer', - 'dozes', - 'drabs', - 'drack', - 'draco', - 'draff', - 'drags', - 'drail', - 'drams', - 'drant', - 'draps', - 'drats', - 'drave', - 'draws', - 'drays', - 'drear', - 'dreck', - 'dreed', - 'dreer', - 'drees', - 'dregs', - 'dreks', - 'drent', - 'drere', - 'drest', - 'dreys', - 'dribs', - 'drice', - 'dries', - 'drily', - 'drips', - 'dript', - 'droid', - 'droil', - 'droke', - 'drole', - 'drome', - 'drony', - 'droob', - 'droog', - 'drook', - 'drops', - 'dropt', - 'drouk', - 'drows', - 'drubs', - 'drugs', - 'drums', - 'drupe', - 'druse', - 'drusy', - 'druxy', - 'dryad', - 'dryas', - 'dsobo', - 'dsomo', - 'duads', - 'duals', - 'duans', - 'duars', - 'dubbo', - 'ducal', - 'ducat', - 'duces', - 'ducks', - 'ducky', - 'ducts', - 'duddy', - 'duded', - 'dudes', - 'duels', - 'duets', - 'duett', - 'duffs', - 'dufus', - 'duing', - 'duits', - 'dukas', - 'duked', - 'dukes', - 'dukka', - 'dulce', - 'dules', - 'dulia', - 'dulls', - 'dulse', - 'dumas', - 'dumbo', - 'dumbs', - 'dumka', - 'dumky', - 'dumps', - 'dunam', - 'dunch', - 'dunes', - 'dungs', - 'dungy', - 'dunks', - 'dunno', - 'dunny', - 'dunsh', - 'dunts', - 'duomi', - 'duomo', - 'duped', - 'duper', - 'dupes', - 'duple', - 'duply', - 'duppy', - 'dural', - 'duras', - 'dured', - 'dures', - 'durgy', - 'durns', - 'duroc', - 'duros', - 'duroy', - 'durra', - 'durrs', - 'durry', - 'durst', - 'durum', - 'durzi', - 'dusks', - 'dusts', - 'duxes', - 'dwaal', - 'dwale', - 'dwalm', - 'dwams', - 'dwang', - 'dwaum', - 'dweeb', - 'dwile', - 'dwine', - 'dyads', - 'dyers', - 'dyked', - 'dykes', - 'dykey', - 'dykon', - 'dynel', - 'dynes', - 'dzhos', - 'eagre', - 'ealed', - 'eales', - 'eaned', - 'eards', - 'eared', - 'earls', - 'earns', - 'earnt', - 'earst', - 'eased', - 'easer', - 'eases', - 'easle', - 'easts', - 'eathe', - 'eaved', - 'eaves', - 'ebbed', - 'ebbet', - 'ebons', - 'ebook', - 'ecads', - 'eched', - 'eches', - 'echos', - 'ecrus', - 'edema', - 'edged', - 'edger', - 'edges', - 'edile', - 'edits', - 'educe', - 'educt', - 'eejit', - 'eensy', - 'eeven', - 'eevns', - 'effed', - 'egads', - 'egers', - 'egest', - 'eggar', - 'egged', - 'egger', - 'egmas', - 'ehing', - 'eider', - 'eidos', - 'eigne', - 'eiked', - 'eikon', - 'eilds', - 'eisel', - 'ejido', - 'ekkas', - 'elain', - 'eland', - 'elans', - 'elchi', - 'eldin', - 'elemi', - 'elfed', - 'eliad', - 'elint', - 'elmen', - 'eloge', - 'elogy', - 'eloin', - 'elops', - 'elpee', - 'elsin', - 'elute', - 'elvan', - 'elven', - 'elver', - 'elves', - 'emacs', - 'embar', - 'embay', - 'embog', - 'embow', - 'embox', - 'embus', - 'emeer', - 'emend', - 'emerg', - 'emery', - 'emeus', - 'emics', - 'emirs', - 'emits', - 'emmas', - 'emmer', - 'emmet', - 'emmew', - 'emmys', - 'emoji', - 'emong', - 'emote', - 'emove', - 'empts', - 'emule', - 'emure', - 'emyde', - 'emyds', - 'enarm', - 'enate', - 'ended', - 'ender', - 'endew', - 'endue', - 'enews', - 'enfix', - 'eniac', - 'enlit', - 'enmew', - 'ennog', - 'enoki', - 'enols', - 'enorm', - 'enows', - 'enrol', - 'ensew', - 'ensky', - 'entia', - 'enure', - 'enurn', - 'envoi', - 'enzym', - 'eorls', - 'eosin', - 'epact', - 'epees', - 'ephah', - 'ephas', - 'ephod', - 'ephor', - 'epics', - 'epode', - 'epopt', - 'epris', - 'eques', - 'equid', - 'erbia', - 'erevs', - 'ergon', - 'ergos', - 'ergot', - 'erhus', - 'erica', - 'erick', - 'erics', - 'ering', - 'erned', - 'ernes', - 'erose', - 'erred', - 'erses', - 'eruct', - 'erugo', - 'eruvs', - 'erven', - 'ervil', - 'escar', - 'escot', - 'esile', - 'eskar', - 'esker', - 'esnes', - 'esses', - 'estoc', - 'estop', - 'estro', - 'etage', - 'etape', - 'etats', - 'etens', - 'ethal', - 'ethne', - 'ethyl', - 'etics', - 'etnas', - 'ettin', - 'ettle', - 'etuis', - 'etwee', - 'etyma', - 'eughs', - 'euked', - 'eupad', - 'euros', - 'eusol', - 'evens', - 'evert', - 'evets', - 'evhoe', - 'evils', - 'evite', - 'evohe', - 'ewers', - 'ewest', - 'ewhow', - 'ewked', - 'exams', - 'exeat', - 'execs', - 'exeem', - 'exeme', - 'exfil', - 'exies', - 'exine', - 'exing', - 'exits', - 'exode', - 'exome', - 'exons', - 'expat', - 'expos', - 'exude', - 'exuls', - 'exurb', - 'eyass', - 'eyers', - 'eyots', - 'eyras', - 'eyres', - 'eyrie', - 'eyrir', - 'ezine', - 'fabby', - 'faced', - 'facer', - 'faces', - 'facia', - 'facta', - 'facts', - 'faddy', - 'faded', - 'fader', - 'fades', - 'fadge', - 'fados', - 'faena', - 'faery', - 'faffs', - 'faffy', - 'faggy', - 'fagin', - 'fagot', - 'faiks', - 'fails', - 'faine', - 'fains', - 'fairs', - 'faked', - 'faker', - 'fakes', - 'fakey', - 'fakie', - 'fakir', - 'falaj', - 'falls', - 'famed', - 'fames', - 'fanal', - 'fands', - 'fanes', - 'fanga', - 'fango', - 'fangs', - 'fanks', - 'fanon', - 'fanos', - 'fanum', - 'faqir', - 'farad', - 'farci', - 'farcy', - 'fards', - 'fared', - 'farer', - 'fares', - 'farle', - 'farls', - 'farms', - 'faros', - 'farro', - 'farse', - 'farts', - 'fasci', - 'fasti', - 'fasts', - 'fated', - 'fates', - 'fatly', - 'fatso', - 'fatwa', - 'faugh', - 'fauld', - 'fauns', - 'faurd', - 'fauts', - 'fauve', - 'favas', - 'favel', - 'faver', - 'faves', - 'favus', - 'fawns', - 'fawny', - 'faxed', - 'faxes', - 'fayed', - 'fayer', - 'fayne', - 'fayre', - 'fazed', - 'fazes', - 'feals', - 'feare', - 'fears', - 'feart', - 'fease', - 'feats', - 'feaze', - 'feces', - 'fecht', - 'fecit', - 'fecks', - 'fedex', - 'feebs', - 'feeds', - 'feels', - 'feens', - 'feers', - 'feese', - 'feeze', - 'fehme', - 'feint', - 'feist', - 'felch', - 'felid', - 'fells', - 'felly', - 'felts', - 'felty', - 'femal', - 'femes', - 'femmy', - 'fends', - 'fendy', - 'fenis', - 'fenks', - 'fenny', - 'fents', - 'feods', - 'feoff', - 'ferer', - 'feres', - 'feria', - 'ferly', - 'fermi', - 'ferms', - 'ferns', - 'ferny', - 'fesse', - 'festa', - 'fests', - 'festy', - 'fetas', - 'feted', - 'fetes', - 'fetor', - 'fetta', - 'fetts', - 'fetwa', - 'feuar', - 'feuds', - 'feued', - 'feyed', - 'feyer', - 'feyly', - 'fezes', - 'fezzy', - 'fiars', - 'fiats', - 'fibro', - 'fices', - 'fiche', - 'fichu', - 'ficin', - 'ficos', - 'fides', - 'fidge', - 'fidos', - 'fiefs', - 'fient', - 'fiere', - 'fiers', - 'fiest', - 'fifed', - 'fifer', - 'fifes', - 'fifis', - 'figgy', - 'figos', - 'fiked', - 'fikes', - 'filar', - 'filch', - 'filed', - 'files', - 'filii', - 'filks', - 'fille', - 'fillo', - 'fills', - 'filmi', - 'films', - 'filos', - 'filum', - 'finca', - 'finds', - 'fined', - 'fines', - 'finis', - 'finks', - 'finny', - 'finos', - 'fiord', - 'fiqhs', - 'fique', - 'fired', - 'firer', - 'fires', - 'firie', - 'firks', - 'firms', - 'firns', - 'firry', - 'firth', - 'fiscs', - 'fisks', - 'fists', - 'fisty', - 'fitch', - 'fitly', - 'fitna', - 'fitte', - 'fitts', - 'fiver', - 'fives', - 'fixed', - 'fixes', - 'fixit', - 'fjeld', - 'flabs', - 'flaff', - 'flags', - 'flaks', - 'flamm', - 'flams', - 'flamy', - 'flane', - 'flans', - 'flaps', - 'flary', - 'flats', - 'flava', - 'flawn', - 'flaws', - 'flawy', - 'flaxy', - 'flays', - 'fleam', - 'fleas', - 'fleek', - 'fleer', - 'flees', - 'flegs', - 'fleme', - 'fleur', - 'flews', - 'flexi', - 'flexo', - 'fleys', - 'flics', - 'flied', - 'flies', - 'flimp', - 'flims', - 'flips', - 'flirs', - 'flisk', - 'flite', - 'flits', - 'flitt', - 'flobs', - 'flocs', - 'floes', - 'flogs', - 'flong', - 'flops', - 'flors', - 'flory', - 'flosh', - 'flota', - 'flote', - 'flows', - 'flubs', - 'flued', - 'flues', - 'fluey', - 'fluky', - 'flump', - 'fluor', - 'flurr', - 'fluty', - 'fluyt', - 'flyby', - 'flype', - 'flyte', - 'foals', - 'foams', - 'foehn', - 'fogey', - 'fogie', - 'fogle', - 'fogou', - 'fohns', - 'foids', - 'foils', - 'foins', - 'folds', - 'foley', - 'folia', - 'folic', - 'folie', - 'folks', - 'folky', - 'fomes', - 'fonda', - 'fonds', - 'fondu', - 'fones', - 'fonly', - 'fonts', - 'foods', - 'foody', - 'fools', - 'foots', - 'footy', - 'foram', - 'forbs', - 'forby', - 'fordo', - 'fords', - 'forel', - 'fores', - 'forex', - 'forks', - 'forky', - 'forme', - 'forms', - 'forts', - 'forza', - 'forze', - 'fossa', - 'fosse', - 'fouat', - 'fouds', - 'fouer', - 'fouet', - 'foule', - 'fouls', - 'fount', - 'fours', - 'fouth', - 'fovea', - 'fowls', - 'fowth', - 'foxed', - 'foxes', - 'foxie', - 'foyle', - 'foyne', - 'frabs', - 'frack', - 'fract', - 'frags', - 'fraim', - 'franc', - 'frape', - 'fraps', - 'frass', - 'frate', - 'frati', - 'frats', - 'fraus', - 'frays', - 'frees', - 'freet', - 'freit', - 'fremd', - 'frena', - 'freon', - 'frere', - 'frets', - 'fribs', - 'frier', - 'fries', - 'frigs', - 'frise', - 'frist', - 'frith', - 'frits', - 'fritt', - 'frize', - 'frizz', - 'froes', - 'frogs', - 'frons', - 'frore', - 'frorn', - 'frory', - 'frosh', - 'frows', - 'frowy', - 'frugs', - 'frump', - 'frush', - 'frust', - 'fryer', - 'fubar', - 'fubby', - 'fubsy', - 'fucks', - 'fucus', - 'fuddy', - 'fudgy', - 'fuels', - 'fuero', - 'fuffs', - 'fuffy', - 'fugal', - 'fuggy', - 'fugie', - 'fugio', - 'fugle', - 'fugly', - 'fugus', - 'fujis', - 'fulls', - 'fumed', - 'fumer', - 'fumes', - 'fumet', - 'fundi', - 'funds', - 'fundy', - 'fungo', - 'fungs', - 'funks', - 'fural', - 'furan', - 'furca', - 'furls', - 'furol', - 'furrs', - 'furth', - 'furze', - 'furzy', - 'fused', - 'fusee', - 'fusel', - 'fuses', - 'fusil', - 'fusks', - 'fusts', - 'fusty', - 'futon', - 'fuzed', - 'fuzee', - 'fuzes', - 'fuzil', - 'fyces', - 'fyked', - 'fykes', - 'fyles', - 'fyrds', - 'fytte', - 'gabba', - 'gabby', - 'gable', - 'gaddi', - 'gades', - 'gadge', - 'gadid', - 'gadis', - 'gadje', - 'gadjo', - 'gadso', - 'gaffs', - 'gaged', - 'gager', - 'gages', - 'gaids', - 'gains', - 'gairs', - 'gaita', - 'gaits', - 'gaitt', - 'gajos', - 'galah', - 'galas', - 'galax', - 'galea', - 'galed', - 'gales', - 'galls', - 'gally', - 'galop', - 'galut', - 'galvo', - 'gamas', - 'gamay', - 'gamba', - 'gambe', - 'gambo', - 'gambs', - 'gamed', - 'games', - 'gamey', - 'gamic', - 'gamin', - 'gamme', - 'gammy', - 'gamps', - 'ganch', - 'gandy', - 'ganef', - 'ganev', - 'gangs', - 'ganja', - 'ganof', - 'gants', - 'gaols', - 'gaped', - 'gaper', - 'gapes', - 'gapos', - 'gappy', - 'garbe', - 'garbo', - 'garbs', - 'garda', - 'gares', - 'garis', - 'garms', - 'garni', - 'garre', - 'garth', - 'garum', - 'gases', - 'gasps', - 'gaspy', - 'gasts', - 'gatch', - 'gated', - 'gater', - 'gates', - 'gaths', - 'gator', - 'gauch', - 'gaucy', - 'gauds', - 'gauje', - 'gault', - 'gaums', - 'gaumy', - 'gaups', - 'gaurs', - 'gauss', - 'gauzy', - 'gavot', - 'gawcy', - 'gawds', - 'gawks', - 'gawps', - 'gawsy', - 'gayal', - 'gazal', - 'gazar', - 'gazed', - 'gazes', - 'gazon', - 'gazoo', - 'geals', - 'geans', - 'geare', - 'gears', - 'geats', - 'gebur', - 'gecks', - 'geeks', - 'geeps', - 'geest', - 'geist', - 'geits', - 'gelds', - 'gelee', - 'gelid', - 'gelly', - 'gelts', - 'gemel', - 'gemma', - 'gemmy', - 'gemot', - 'genal', - 'genas', - 'genes', - 'genet', - 'genic', - 'genii', - 'genip', - 'genny', - 'genoa', - 'genom', - 'genro', - 'gents', - 'genty', - 'genua', - 'genus', - 'geode', - 'geoid', - 'gerah', - 'gerbe', - 'geres', - 'gerle', - 'germs', - 'germy', - 'gerne', - 'gesse', - 'gesso', - 'geste', - 'gests', - 'getas', - 'getup', - 'geums', - 'geyan', - 'geyer', - 'ghast', - 'ghats', - 'ghaut', - 'ghazi', - 'ghees', - 'ghest', - 'ghyll', - 'gibed', - 'gibel', - 'giber', - 'gibes', - 'gibli', - 'gibus', - 'gifts', - 'gigas', - 'gighe', - 'gigot', - 'gigue', - 'gilas', - 'gilds', - 'gilet', - 'gills', - 'gilly', - 'gilpy', - 'gilts', - 'gimel', - 'gimme', - 'gimps', - 'gimpy', - 'ginch', - 'ginge', - 'gings', - 'ginks', - 'ginny', - 'ginzo', - 'gipon', - 'gippo', - 'gippy', - 'girds', - 'girls', - 'girns', - 'giron', - 'giros', - 'girrs', - 'girsh', - 'girts', - 'gismo', - 'gisms', - 'gists', - 'gitch', - 'gites', - 'giust', - 'gived', - 'gives', - 'gizmo', - 'glace', - 'glads', - 'glady', - 'glaik', - 'glair', - 'glams', - 'glans', - 'glary', - 'glaum', - 'glaur', - 'glazy', - 'gleba', - 'glebe', - 'gleby', - 'glede', - 'gleds', - 'gleed', - 'gleek', - 'glees', - 'gleet', - 'gleis', - 'glens', - 'glent', - 'gleys', - 'glial', - 'glias', - 'glibs', - 'gliff', - 'glift', - 'glike', - 'glime', - 'glims', - 'glisk', - 'glits', - 'glitz', - 'gloam', - 'globi', - 'globs', - 'globy', - 'glode', - 'glogg', - 'gloms', - 'gloop', - 'glops', - 'glost', - 'glout', - 'glows', - 'gloze', - 'glued', - 'gluer', - 'glues', - 'gluey', - 'glugs', - 'glume', - 'glums', - 'gluon', - 'glute', - 'gluts', - 'gnarl', - 'gnarr', - 'gnars', - 'gnats', - 'gnawn', - 'gnaws', - 'gnows', - 'goads', - 'goafs', - 'goals', - 'goary', - 'goats', - 'goaty', - 'goban', - 'gobar', - 'gobbi', - 'gobbo', - 'gobby', - 'gobis', - 'gobos', - 'godet', - 'godso', - 'goels', - 'goers', - 'goest', - 'goeth', - 'goety', - 'gofer', - 'goffs', - 'gogga', - 'gogos', - 'goier', - 'gojis', - 'golds', - 'goldy', - 'goles', - 'golfs', - 'golpe', - 'golps', - 'gombo', - 'gomer', - 'gompa', - 'gonch', - 'gonef', - 'gongs', - 'gonia', - 'gonif', - 'gonks', - 'gonna', - 'gonof', - 'gonys', - 'gonzo', - 'gooby', - 'goods', - 'goofs', - 'googs', - 'gooks', - 'gooky', - 'goold', - 'gools', - 'gooly', - 'goons', - 'goony', - 'goops', - 'goopy', - 'goors', - 'goory', - 'goosy', - 'gopak', - 'gopik', - 'goral', - 'goras', - 'gored', - 'gores', - 'goris', - 'gorms', - 'gormy', - 'gorps', - 'gorse', - 'gorsy', - 'gosht', - 'gosse', - 'gotch', - 'goths', - 'gothy', - 'gotta', - 'gouch', - 'gouks', - 'goura', - 'gouts', - 'gouty', - 'gowan', - 'gowds', - 'gowfs', - 'gowks', - 'gowls', - 'gowns', - 'goxes', - 'goyim', - 'goyle', - 'graal', - 'grabs', - 'grads', - 'graff', - 'graip', - 'grama', - 'grame', - 'gramp', - 'grams', - 'grana', - 'grans', - 'grapy', - 'gravs', - 'grays', - 'grebe', - 'grebo', - 'grece', - 'greek', - 'grees', - 'grege', - 'grego', - 'grein', - 'grens', - 'grese', - 'greve', - 'grews', - 'greys', - 'grice', - 'gride', - 'grids', - 'griff', - 'grift', - 'grigs', - 'grike', - 'grins', - 'griot', - 'grips', - 'gript', - 'gripy', - 'grise', - 'grist', - 'grisy', - 'grith', - 'grits', - 'grize', - 'groat', - 'grody', - 'grogs', - 'groks', - 'groma', - 'grone', - 'groof', - 'grosz', - 'grots', - 'grouf', - 'grovy', - 'grows', - 'grrls', - 'grrrl', - 'grubs', - 'grued', - 'grues', - 'grufe', - 'grume', - 'grump', - 'grund', - 'gryce', - 'gryde', - 'gryke', - 'grype', - 'grypt', - 'guaco', - 'guana', - 'guano', - 'guans', - 'guars', - 'gucks', - 'gucky', - 'gudes', - 'guffs', - 'gugas', - 'guids', - 'guimp', - 'guiro', - 'gulag', - 'gular', - 'gulas', - 'gules', - 'gulet', - 'gulfs', - 'gulfy', - 'gulls', - 'gulph', - 'gulps', - 'gulpy', - 'gumma', - 'gummi', - 'gumps', - 'gundy', - 'gunge', - 'gungy', - 'gunks', - 'gunky', - 'gunny', - 'guqin', - 'gurdy', - 'gurge', - 'gurls', - 'gurly', - 'gurns', - 'gurry', - 'gursh', - 'gurus', - 'gushy', - 'gusla', - 'gusle', - 'gusli', - 'gussy', - 'gusts', - 'gutsy', - 'gutta', - 'gutty', - 'guyed', - 'guyle', - 'guyot', - 'guyse', - 'gwine', - 'gyals', - 'gyans', - 'gybed', - 'gybes', - 'gyeld', - 'gymps', - 'gynae', - 'gynie', - 'gynny', - 'gynos', - 'gyoza', - 'gypos', - 'gyppo', - 'gyppy', - 'gyral', - 'gyred', - 'gyres', - 'gyron', - 'gyros', - 'gyrus', - 'gytes', - 'gyved', - 'gyves', - 'haafs', - 'haars', - 'hable', - 'habus', - 'hacek', - 'hacks', - 'hadal', - 'haded', - 'hades', - 'hadji', - 'hadst', - 'haems', - 'haets', - 'haffs', - 'hafiz', - 'hafts', - 'haggs', - 'hahas', - 'haick', - 'haika', - 'haiks', - 'haiku', - 'hails', - 'haily', - 'hains', - 'haint', - 'hairs', - 'haith', - 'hajes', - 'hajis', - 'hajji', - 'hakam', - 'hakas', - 'hakea', - 'hakes', - 'hakim', - 'hakus', - 'halal', - 'haled', - 'haler', - 'hales', - 'halfa', - 'halfs', - 'halid', - 'hallo', - 'halls', - 'halma', - 'halms', - 'halon', - 'halos', - 'halse', - 'halts', - 'halva', - 'halwa', - 'hamal', - 'hamba', - 'hamed', - 'hames', - 'hammy', - 'hamza', - 'hanap', - 'hance', - 'hanch', - 'hands', - 'hangi', - 'hangs', - 'hanks', - 'hanky', - 'hansa', - 'hanse', - 'hants', - 'haole', - 'haoma', - 'hapax', - 'haply', - 'happi', - 'hapus', - 'haram', - 'hards', - 'hared', - 'hares', - 'harim', - 'harks', - 'harls', - 'harms', - 'harns', - 'haros', - 'harps', - 'harts', - 'hashy', - 'hasks', - 'hasps', - 'hasta', - 'hated', - 'hates', - 'hatha', - 'hauds', - 'haufs', - 'haugh', - 'hauld', - 'haulm', - 'hauls', - 'hault', - 'hauns', - 'hause', - 'haver', - 'haves', - 'hawed', - 'hawks', - 'hawms', - 'hawse', - 'hayed', - 'hayer', - 'hayey', - 'hayle', - 'hazan', - 'hazed', - 'hazer', - 'hazes', - 'heads', - 'heald', - 'heals', - 'heame', - 'heaps', - 'heapy', - 'heare', - 'hears', - 'heast', - 'heats', - 'heben', - 'hebes', - 'hecht', - 'hecks', - 'heder', - 'hedgy', - 'heeds', - 'heedy', - 'heels', - 'heeze', - 'hefte', - 'hefts', - 'heids', - 'heigh', - 'heils', - 'heirs', - 'hejab', - 'hejra', - 'heled', - 'heles', - 'helio', - 'hells', - 'helms', - 'helos', - 'helot', - 'helps', - 'helve', - 'hemal', - 'hemes', - 'hemic', - 'hemin', - 'hemps', - 'hempy', - 'hench', - 'hends', - 'henge', - 'henna', - 'henny', - 'henry', - 'hents', - 'hepar', - 'herbs', - 'herby', - 'herds', - 'heres', - 'herls', - 'herma', - 'herms', - 'herns', - 'heros', - 'herry', - 'herse', - 'hertz', - 'herye', - 'hesps', - 'hests', - 'hetes', - 'heths', - 'heuch', - 'heugh', - 'hevea', - 'hewed', - 'hewer', - 'hewgh', - 'hexad', - 'hexed', - 'hexer', - 'hexes', - 'hexyl', - 'heyed', - 'hiant', - 'hicks', - 'hided', - 'hider', - 'hides', - 'hiems', - 'highs', - 'hight', - 'hijab', - 'hijra', - 'hiked', - 'hiker', - 'hikes', - 'hikoi', - 'hilar', - 'hilch', - 'hillo', - 'hills', - 'hilts', - 'hilum', - 'hilus', - 'himbo', - 'hinau', - 'hinds', - 'hings', - 'hinky', - 'hinny', - 'hints', - 'hiois', - 'hiply', - 'hired', - 'hiree', - 'hirer', - 'hires', - 'hissy', - 'hists', - 'hithe', - 'hived', - 'hiver', - 'hives', - 'hizen', - 'hoaed', - 'hoagy', - 'hoars', - 'hoary', - 'hoast', - 'hobos', - 'hocks', - 'hocus', - 'hodad', - 'hodja', - 'hoers', - 'hogan', - 'hogen', - 'hoggs', - 'hoghs', - 'hohed', - 'hoick', - 'hoied', - 'hoiks', - 'hoing', - 'hoise', - 'hokas', - 'hoked', - 'hokes', - 'hokey', - 'hokis', - 'hokku', - 'hokum', - 'holds', - 'holed', - 'holes', - 'holey', - 'holks', - 'holla', - 'hollo', - 'holme', - 'holms', - 'holon', - 'holos', - 'holts', - 'homas', - 'homed', - 'homes', - 'homey', - 'homie', - 'homme', - 'homos', - 'honan', - 'honda', - 'honds', - 'honed', - 'honer', - 'hones', - 'hongi', - 'hongs', - 'honks', - 'honky', - 'hooch', - 'hoods', - 'hoody', - 'hooey', - 'hoofs', - 'hooka', - 'hooks', - 'hooky', - 'hooly', - 'hoons', - 'hoops', - 'hoord', - 'hoors', - 'hoosh', - 'hoots', - 'hooty', - 'hoove', - 'hopak', - 'hoped', - 'hoper', - 'hopes', - 'hoppy', - 'horah', - 'horal', - 'horas', - 'horis', - 'horks', - 'horme', - 'horns', - 'horst', - 'horsy', - 'hosed', - 'hosel', - 'hosen', - 'hoser', - 'hoses', - 'hosey', - 'hosta', - 'hosts', - 'hotch', - 'hoten', - 'hotty', - 'houff', - 'houfs', - 'hough', - 'houri', - 'hours', - 'houts', - 'hovea', - 'hoved', - 'hoven', - 'hoves', - 'howbe', - 'howes', - 'howff', - 'howfs', - 'howks', - 'howls', - 'howre', - 'howso', - 'hoxed', - 'hoxes', - 'hoyas', - 'hoyed', - 'hoyle', - 'hubby', - 'hucks', - 'hudna', - 'hudud', - 'huers', - 'huffs', - 'huffy', - 'huger', - 'huggy', - 'huhus', - 'huias', - 'hulas', - 'hules', - 'hulks', - 'hulky', - 'hullo', - 'hulls', - 'hully', - 'humas', - 'humfs', - 'humic', - 'humps', - 'humpy', - 'hunks', - 'hunts', - 'hurds', - 'hurls', - 'hurly', - 'hurra', - 'hurst', - 'hurts', - 'hushy', - 'husks', - 'husos', - 'hutia', - 'huzza', - 'huzzy', - 'hwyls', - 'hydra', - 'hyens', - 'hygge', - 'hying', - 'hykes', - 'hylas', - 'hyleg', - 'hyles', - 'hylic', - 'hymns', - 'hynde', - 'hyoid', - 'hyped', - 'hypes', - 'hypha', - 'hyphy', - 'hypos', - 'hyrax', - 'hyson', - 'hythe', - 'iambi', - 'iambs', - 'ibrik', - 'icers', - 'iched', - 'iches', - 'ichor', - 'icier', - 'icker', - 'ickle', - 'icons', - 'ictal', - 'ictic', - 'ictus', - 'idant', - 'ideas', - 'idees', - 'ident', - 'idled', - 'idles', - 'idola', - 'idols', - 'idyls', - 'iftar', - 'igapo', - 'igged', - 'iglus', - 'ihram', - 'ikans', - 'ikats', - 'ikons', - 'ileac', - 'ileal', - 'ileum', - 'ileus', - 'iliad', - 'ilial', - 'ilium', - 'iller', - 'illth', - 'imago', - 'imams', - 'imari', - 'imaum', - 'imbar', - 'imbed', - 'imide', - 'imido', - 'imids', - 'imine', - 'imino', - 'immew', - 'immit', - 'immix', - 'imped', - 'impis', - 'impot', - 'impro', - 'imshi', - 'imshy', - 'inapt', - 'inarm', - 'inbye', - 'incel', - 'incle', - 'incog', - 'incus', - 'incut', - 'indew', - 'india', - 'indie', - 'indol', - 'indow', - 'indri', - 'indue', - 'inerm', - 'infix', - 'infos', - 'infra', - 'ingan', - 'ingle', - 'inion', - 'inked', - 'inker', - 'inkle', - 'inned', - 'innit', - 'inorb', - 'inrun', - 'inset', - 'inspo', - 'intel', - 'intil', - 'intis', - 'intra', - 'inula', - 'inure', - 'inurn', - 'inust', - 'invar', - 'inwit', - 'iodic', - 'iodid', - 'iodin', - 'iotas', - 'ippon', - 'irade', - 'irids', - 'iring', - 'irked', - 'iroko', - 'irone', - 'irons', - 'isbas', - 'ishes', - 'isled', - 'isles', - 'isnae', - 'issei', - 'istle', - 'items', - 'ither', - 'ivied', - 'ivies', - 'ixias', - 'ixnay', - 'ixora', - 'ixtle', - 'izard', - 'izars', - 'izzat', - 'jaaps', - 'jabot', - 'jacal', - 'jacks', - 'jacky', - 'jaded', - 'jades', - 'jafas', - 'jaffa', - 'jagas', - 'jager', - 'jaggs', - 'jaggy', - 'jagir', - 'jagra', - 'jails', - 'jaker', - 'jakes', - 'jakey', - 'jalap', - 'jalop', - 'jambe', - 'jambo', - 'jambs', - 'jambu', - 'james', - 'jammy', - 'jamon', - 'janes', - 'janns', - 'janny', - 'janty', - 'japan', - 'japed', - 'japer', - 'japes', - 'jarks', - 'jarls', - 'jarps', - 'jarta', - 'jarul', - 'jasey', - 'jaspe', - 'jasps', - 'jatos', - 'jauks', - 'jaups', - 'javas', - 'javel', - 'jawan', - 'jawed', - 'jaxie', - 'jeans', - 'jeats', - 'jebel', - 'jedis', - 'jeels', - 'jeely', - 'jeeps', - 'jeers', - 'jeeze', - 'jefes', - 'jeffs', - 'jehad', - 'jehus', - 'jelab', - 'jello', - 'jells', - 'jembe', - 'jemmy', - 'jenny', - 'jeons', - 'jerid', - 'jerks', - 'jerry', - 'jesse', - 'jests', - 'jesus', - 'jetes', - 'jeton', - 'jeune', - 'jewed', - 'jewie', - 'jhala', - 'jiaos', - 'jibba', - 'jibbs', - 'jibed', - 'jiber', - 'jibes', - 'jiffs', - 'jiggy', - 'jigot', - 'jihad', - 'jills', - 'jilts', - 'jimmy', - 'jimpy', - 'jingo', - 'jinks', - 'jinne', - 'jinni', - 'jinns', - 'jirds', - 'jirga', - 'jirre', - 'jisms', - 'jived', - 'jiver', - 'jives', - 'jivey', - 'jnana', - 'jobed', - 'jobes', - 'jocko', - 'jocks', - 'jocky', - 'jocos', - 'jodel', - 'joeys', - 'johns', - 'joins', - 'joked', - 'jokes', - 'jokey', - 'jokol', - 'joled', - 'joles', - 'jolls', - 'jolts', - 'jolty', - 'jomon', - 'jomos', - 'jones', - 'jongs', - 'jonty', - 'jooks', - 'joram', - 'jorum', - 'jotas', - 'jotty', - 'jotun', - 'joual', - 'jougs', - 'jouks', - 'joule', - 'jours', - 'jowar', - 'jowed', - 'jowls', - 'jowly', - 'joyed', - 'jubas', - 'jubes', - 'jucos', - 'judas', - 'judgy', - 'judos', - 'jugal', - 'jugum', - 'jujus', - 'juked', - 'jukes', - 'jukus', - 'julep', - 'jumar', - 'jumby', - 'jumps', - 'junco', - 'junks', - 'junky', - 'jupes', - 'jupon', - 'jural', - 'jurat', - 'jurel', - 'jures', - 'justs', - 'jutes', - 'jutty', - 'juves', - 'juvie', - 'kaama', - 'kabab', - 'kabar', - 'kabob', - 'kacha', - 'kacks', - 'kadai', - 'kades', - 'kadis', - 'kafir', - 'kagos', - 'kagus', - 'kahal', - 'kaiak', - 'kaids', - 'kaies', - 'kaifs', - 'kaika', - 'kaiks', - 'kails', - 'kaims', - 'kaing', - 'kains', - 'kakas', - 'kakis', - 'kalam', - 'kales', - 'kalif', - 'kalis', - 'kalpa', - 'kamas', - 'kames', - 'kamik', - 'kamis', - 'kamme', - 'kanae', - 'kanas', - 'kandy', - 'kaneh', - 'kanes', - 'kanga', - 'kangs', - 'kanji', - 'kants', - 'kanzu', - 'kaons', - 'kapas', - 'kaphs', - 'kapok', - 'kapow', - 'kapus', - 'kaput', - 'karas', - 'karat', - 'karks', - 'karns', - 'karoo', - 'karos', - 'karri', - 'karst', - 'karsy', - 'karts', - 'karzy', - 'kasha', - 'kasme', - 'katal', - 'katas', - 'katis', - 'katti', - 'kaugh', - 'kauri', - 'kauru', - 'kaury', - 'kaval', - 'kavas', - 'kawas', - 'kawau', - 'kawed', - 'kayle', - 'kayos', - 'kazis', - 'kazoo', - 'kbars', - 'kebar', - 'kebob', - 'kecks', - 'kedge', - 'kedgy', - 'keech', - 'keefs', - 'keeks', - 'keels', - 'keema', - 'keeno', - 'keens', - 'keeps', - 'keets', - 'keeve', - 'kefir', - 'kehua', - 'keirs', - 'kelep', - 'kelim', - 'kells', - 'kelly', - 'kelps', - 'kelpy', - 'kelts', - 'kelty', - 'kembo', - 'kembs', - 'kemps', - 'kempt', - 'kempy', - 'kenaf', - 'kench', - 'kendo', - 'kenos', - 'kente', - 'kents', - 'kepis', - 'kerbs', - 'kerel', - 'kerfs', - 'kerky', - 'kerma', - 'kerne', - 'kerns', - 'keros', - 'kerry', - 'kerve', - 'kesar', - 'kests', - 'ketas', - 'ketch', - 'ketes', - 'ketol', - 'kevel', - 'kevil', - 'kexes', - 'keyed', - 'keyer', - 'khadi', - 'khafs', - 'khans', - 'khaph', - 'khats', - 'khaya', - 'khazi', - 'kheda', - 'kheth', - 'khets', - 'khoja', - 'khors', - 'khoum', - 'khuds', - 'kiaat', - 'kiack', - 'kiang', - 'kibbe', - 'kibbi', - 'kibei', - 'kibes', - 'kibla', - 'kicks', - 'kicky', - 'kiddo', - 'kiddy', - 'kidel', - 'kidge', - 'kiefs', - 'kiers', - 'kieve', - 'kievs', - 'kight', - 'kikes', - 'kikoi', - 'kiley', - 'kilim', - 'kills', - 'kilns', - 'kilos', - 'kilps', - 'kilts', - 'kilty', - 'kimbo', - 'kinas', - 'kinda', - 'kinds', - 'kindy', - 'kines', - 'kings', - 'kinin', - 'kinks', - 'kinos', - 'kiore', - 'kipes', - 'kippa', - 'kipps', - 'kirby', - 'kirks', - 'kirns', - 'kirri', - 'kisan', - 'kissy', - 'kists', - 'kited', - 'kiter', - 'kites', - 'kithe', - 'kiths', - 'kitul', - 'kivas', - 'kiwis', - 'klang', - 'klaps', - 'klett', - 'klick', - 'klieg', - 'kliks', - 'klong', - 'kloof', - 'kluge', - 'klutz', - 'knags', - 'knaps', - 'knarl', - 'knars', - 'knaur', - 'knawe', - 'knees', - 'knell', - 'knish', - 'knits', - 'knive', - 'knobs', - 'knops', - 'knosp', - 'knots', - 'knout', - 'knowe', - 'knows', - 'knubs', - 'knurl', - 'knurr', - 'knurs', - 'knuts', - 'koans', - 'koaps', - 'koban', - 'kobos', - 'koels', - 'koffs', - 'kofta', - 'kogal', - 'kohas', - 'kohen', - 'kohls', - 'koine', - 'kojis', - 'kokam', - 'kokas', - 'koker', - 'kokra', - 'kokum', - 'kolas', - 'kolos', - 'kombu', - 'konbu', - 'kondo', - 'konks', - 'kooks', - 'kooky', - 'koori', - 'kopek', - 'kophs', - 'kopje', - 'koppa', - 'korai', - 'koras', - 'korat', - 'kores', - 'korma', - 'koros', - 'korun', - 'korus', - 'koses', - 'kotch', - 'kotos', - 'kotow', - 'koura', - 'kraal', - 'krabs', - 'kraft', - 'krais', - 'krait', - 'krang', - 'krans', - 'kranz', - 'kraut', - 'krays', - 'kreep', - 'kreng', - 'krewe', - 'krona', - 'krone', - 'kroon', - 'krubi', - 'krunk', - 'ksars', - 'kubie', - 'kudos', - 'kudus', - 'kudzu', - 'kufis', - 'kugel', - 'kuias', - 'kukri', - 'kukus', - 'kulak', - 'kulan', - 'kulas', - 'kulfi', - 'kumis', - 'kumys', - 'kuris', - 'kurre', - 'kurta', - 'kurus', - 'kusso', - 'kutas', - 'kutch', - 'kutis', - 'kutus', - 'kuzus', - 'kvass', - 'kvell', - 'kwela', - 'kyack', - 'kyaks', - 'kyang', - 'kyars', - 'kyats', - 'kybos', - 'kydst', - 'kyles', - 'kylie', - 'kylin', - 'kylix', - 'kyloe', - 'kynde', - 'kynds', - 'kypes', - 'kyrie', - 'kytes', - 'kythe', - 'laari', - 'labda', - 'labia', - 'labis', - 'labra', - 'laced', - 'lacer', - 'laces', - 'lacet', - 'lacey', - 'lacks', - 'laddy', - 'laded', - 'lader', - 'lades', - 'laers', - 'laevo', - 'lagan', - 'lahal', - 'lahar', - 'laich', - 'laics', - 'laids', - 'laigh', - 'laika', - 'laiks', - 'laird', - 'lairs', - 'lairy', - 'laith', - 'laity', - 'laked', - 'laker', - 'lakes', - 'lakhs', - 'lakin', - 'laksa', - 'laldy', - 'lalls', - 'lamas', - 'lambs', - 'lamby', - 'lamed', - 'lamer', - 'lames', - 'lamia', - 'lammy', - 'lamps', - 'lanai', - 'lanas', - 'lanch', - 'lande', - 'lands', - 'lanes', - 'lanks', - 'lants', - 'lapin', - 'lapis', - 'lapje', - 'larch', - 'lards', - 'lardy', - 'laree', - 'lares', - 'largo', - 'laris', - 'larks', - 'larky', - 'larns', - 'larnt', - 'larum', - 'lased', - 'laser', - 'lases', - 'lassi', - 'lassu', - 'lassy', - 'lasts', - 'latah', - 'lated', - 'laten', - 'latex', - 'lathi', - 'laths', - 'lathy', - 'latke', - 'latus', - 'lauan', - 'lauch', - 'lauds', - 'laufs', - 'laund', - 'laura', - 'laval', - 'lavas', - 'laved', - 'laver', - 'laves', - 'lavra', - 'lavvy', - 'lawed', - 'lawer', - 'lawin', - 'lawks', - 'lawns', - 'lawny', - 'laxed', - 'laxer', - 'laxes', - 'laxly', - 'layed', - 'layin', - 'layup', - 'lazar', - 'lazed', - 'lazes', - 'lazos', - 'lazzi', - 'lazzo', - 'leads', - 'leady', - 'leafs', - 'leaks', - 'leams', - 'leans', - 'leany', - 'leaps', - 'leare', - 'lears', - 'leary', - 'leats', - 'leavy', - 'leaze', - 'leben', - 'leccy', - 'ledes', - 'ledgy', - 'ledum', - 'leear', - 'leeks', - 'leeps', - 'leers', - 'leese', - 'leets', - 'leeze', - 'lefte', - 'lefts', - 'leger', - 'leges', - 'legge', - 'leggo', - 'legit', - 'lehrs', - 'lehua', - 'leirs', - 'leish', - 'leman', - 'lemed', - 'lemel', - 'lemes', - 'lemma', - 'lemme', - 'lends', - 'lenes', - 'lengs', - 'lenis', - 'lenos', - 'lense', - 'lenti', - 'lento', - 'leone', - 'lepid', - 'lepra', - 'lepta', - 'lered', - 'leres', - 'lerps', - 'lesbo', - 'leses', - 'lests', - 'letch', - 'lethe', - 'letup', - 'leuch', - 'leuco', - 'leuds', - 'leugh', - 'levas', - 'levee', - 'leves', - 'levin', - 'levis', - 'lewis', - 'lexes', - 'lexis', - 'lezes', - 'lezza', - 'lezzy', - 'liana', - 'liane', - 'liang', - 'liard', - 'liars', - 'liart', - 'liber', - 'libra', - 'libri', - 'lichi', - 'licht', - 'licit', - 'licks', - 'lidar', - 'lidos', - 'liefs', - 'liens', - 'liers', - 'lieus', - 'lieve', - 'lifer', - 'lifes', - 'lifts', - 'ligan', - 'liger', - 'ligge', - 'ligne', - 'liked', - 'liker', - 'likes', - 'likin', - 'lills', - 'lilos', - 'lilts', - 'liman', - 'limas', - 'limax', - 'limba', - 'limbi', - 'limbs', - 'limby', - 'limed', - 'limen', - 'limes', - 'limey', - 'limma', - 'limns', - 'limos', - 'limpa', - 'limps', - 'linac', - 'linch', - 'linds', - 'lindy', - 'lined', - 'lines', - 'liney', - 'linga', - 'lings', - 'lingy', - 'linin', - 'links', - 'linky', - 'linns', - 'linny', - 'linos', - 'lints', - 'linty', - 'linum', - 'linux', - 'lions', - 'lipas', - 'lipes', - 'lipin', - 'lipos', - 'lippy', - 'liras', - 'lirks', - 'lirot', - 'lisks', - 'lisle', - 'lisps', - 'lists', - 'litai', - 'litas', - 'lited', - 'liter', - 'lites', - 'litho', - 'liths', - 'litre', - 'lived', - 'liven', - 'lives', - 'livor', - 'livre', - 'llano', - 'loach', - 'loads', - 'loafs', - 'loams', - 'loans', - 'loast', - 'loave', - 'lobar', - 'lobed', - 'lobes', - 'lobos', - 'lobus', - 'loche', - 'lochs', - 'locie', - 'locis', - 'locks', - 'locos', - 'locum', - 'loden', - 'lodes', - 'loess', - 'lofts', - 'logan', - 'loges', - 'loggy', - 'logia', - 'logie', - 'logoi', - 'logon', - 'logos', - 'lohan', - 'loids', - 'loins', - 'loipe', - 'loirs', - 'lokes', - 'lolls', - 'lolly', - 'lolog', - 'lomas', - 'lomed', - 'lomes', - 'loner', - 'longa', - 'longe', - 'longs', - 'looby', - 'looed', - 'looey', - 'loofa', - 'loofs', - 'looie', - 'looks', - 'looky', - 'looms', - 'loons', - 'loony', - 'loops', - 'loord', - 'loots', - 'loped', - 'loper', - 'lopes', - 'loppy', - 'loral', - 'loran', - 'lords', - 'lordy', - 'lorel', - 'lores', - 'loric', - 'loris', - 'losed', - 'losel', - 'losen', - 'loses', - 'lossy', - 'lotah', - 'lotas', - 'lotes', - 'lotic', - 'lotos', - 'lotsa', - 'lotta', - 'lotte', - 'lotto', - 'lotus', - 'loued', - 'lough', - 'louie', - 'louis', - 'louma', - 'lound', - 'louns', - 'loupe', - 'loups', - 'loure', - 'lours', - 'loury', - 'louts', - 'lovat', - 'loved', - 'loves', - 'lovey', - 'lovie', - 'lowan', - 'lowed', - 'lowes', - 'lownd', - 'lowne', - 'lowns', - 'lowps', - 'lowry', - 'lowse', - 'lowts', - 'loxed', - 'loxes', - 'lozen', - 'luach', - 'luaus', - 'lubed', - 'lubes', - 'lubra', - 'luces', - 'lucks', - 'lucre', - 'ludes', - 'ludic', - 'ludos', - 'luffa', - 'luffs', - 'luged', - 'luger', - 'luges', - 'lulls', - 'lulus', - 'lumas', - 'lumbi', - 'lumme', - 'lummy', - 'lumps', - 'lunas', - 'lunes', - 'lunet', - 'lungi', - 'lungs', - 'lunks', - 'lunts', - 'lupin', - 'lured', - 'lurer', - 'lures', - 'lurex', - 'lurgi', - 'lurgy', - 'lurks', - 'lurry', - 'lurve', - 'luser', - 'lushy', - 'lusks', - 'lusts', - 'lusus', - 'lutea', - 'luted', - 'luter', - 'lutes', - 'luvvy', - 'luxed', - 'luxer', - 'luxes', - 'lweis', - 'lyams', - 'lyard', - 'lyart', - 'lyase', - 'lycea', - 'lycee', - 'lycra', - 'lymes', - 'lynes', - 'lyres', - 'lysed', - 'lyses', - 'lysin', - 'lysis', - 'lysol', - 'lyssa', - 'lyted', - 'lytes', - 'lythe', - 'lytic', - 'lytta', - 'maaed', - 'maare', - 'maars', - 'mabes', - 'macas', - 'maced', - 'macer', - 'maces', - 'mache', - 'machi', - 'machs', - 'macks', - 'macle', - 'macon', - 'madge', - 'madid', - 'madre', - 'maerl', - 'mafic', - 'mages', - 'maggs', - 'magot', - 'magus', - 'mahoe', - 'mahua', - 'mahwa', - 'maids', - 'maiko', - 'maiks', - 'maile', - 'maill', - 'mails', - 'maims', - 'mains', - 'maire', - 'mairs', - 'maise', - 'maist', - 'makar', - 'makes', - 'makis', - 'makos', - 'malam', - 'malar', - 'malas', - 'malax', - 'males', - 'malic', - 'malik', - 'malis', - 'malls', - 'malms', - 'malmy', - 'malts', - 'malty', - 'malus', - 'malva', - 'malwa', - 'mamas', - 'mamba', - 'mamee', - 'mamey', - 'mamie', - 'manas', - 'manat', - 'mandi', - 'maneb', - 'maned', - 'maneh', - 'manes', - 'manet', - 'mangs', - 'manis', - 'manky', - 'manna', - 'manos', - 'manse', - 'manta', - 'manto', - 'manty', - 'manul', - 'manus', - 'mapau', - 'maqui', - 'marae', - 'marah', - 'maras', - 'marcs', - 'mardy', - 'mares', - 'marge', - 'margs', - 'maria', - 'marid', - 'marka', - 'marks', - 'marle', - 'marls', - 'marly', - 'marms', - 'maron', - 'maror', - 'marra', - 'marri', - 'marse', - 'marts', - 'marvy', - 'masas', - 'mased', - 'maser', - 'mases', - 'mashy', - 'masks', - 'massa', - 'massy', - 'masts', - 'masty', - 'masus', - 'matai', - 'mated', - 'mater', - 'mates', - 'maths', - 'matin', - 'matlo', - 'matte', - 'matts', - 'matza', - 'matzo', - 'mauby', - 'mauds', - 'mauls', - 'maund', - 'mauri', - 'mausy', - 'mauts', - 'mauzy', - 'maven', - 'mavie', - 'mavin', - 'mavis', - 'mawed', - 'mawks', - 'mawky', - 'mawns', - 'mawrs', - 'maxed', - 'maxes', - 'maxis', - 'mayan', - 'mayas', - 'mayed', - 'mayos', - 'mayst', - 'mazed', - 'mazer', - 'mazes', - 'mazey', - 'mazut', - 'mbira', - 'meads', - 'meals', - 'meane', - 'means', - 'meany', - 'meare', - 'mease', - 'meath', - 'meats', - 'mebos', - 'mechs', - 'mecks', - 'medii', - 'medle', - 'meeds', - 'meers', - 'meets', - 'meffs', - 'meins', - 'meint', - 'meiny', - 'meith', - 'mekka', - 'melas', - 'melba', - 'melds', - 'melic', - 'melik', - 'mells', - 'melts', - 'melty', - 'memes', - 'memos', - 'menad', - 'mends', - 'mened', - 'menes', - 'menge', - 'mengs', - 'mensa', - 'mense', - 'mensh', - 'menta', - 'mento', - 'menus', - 'meous', - 'meows', - 'merch', - 'mercs', - 'merde', - 'mered', - 'merel', - 'merer', - 'meres', - 'meril', - 'meris', - 'merks', - 'merle', - 'merls', - 'merse', - 'mesal', - 'mesas', - 'mesel', - 'meses', - 'meshy', - 'mesic', - 'mesne', - 'meson', - 'messy', - 'mesto', - 'meted', - 'metes', - 'metho', - 'meths', - 'metic', - 'metif', - 'metis', - 'metol', - 'metre', - 'meuse', - 'meved', - 'meves', - 'mewed', - 'mewls', - 'meynt', - 'mezes', - 'mezze', - 'mezzo', - 'mhorr', - 'miaou', - 'miaow', - 'miasm', - 'miaul', - 'micas', - 'miche', - 'micht', - 'micks', - 'micky', - 'micos', - 'micra', - 'middy', - 'midgy', - 'midis', - 'miens', - 'mieve', - 'miffs', - 'miffy', - 'mifty', - 'miggs', - 'mihas', - 'mihis', - 'miked', - 'mikes', - 'mikra', - 'mikva', - 'milch', - 'milds', - 'miler', - 'miles', - 'milfs', - 'milia', - 'milko', - 'milks', - 'mille', - 'mills', - 'milor', - 'milos', - 'milpa', - 'milts', - 'milty', - 'miltz', - 'mimed', - 'mimeo', - 'mimer', - 'mimes', - 'mimsy', - 'minae', - 'minar', - 'minas', - 'mincy', - 'minds', - 'mined', - 'mines', - 'minge', - 'mings', - 'mingy', - 'minis', - 'minke', - 'minks', - 'minny', - 'minos', - 'mints', - 'mired', - 'mires', - 'mirex', - 'mirid', - 'mirin', - 'mirks', - 'mirky', - 'mirly', - 'miros', - 'mirvs', - 'mirza', - 'misch', - 'misdo', - 'mises', - 'misgo', - 'misos', - 'missa', - 'mists', - 'misty', - 'mitch', - 'miter', - 'mites', - 'mitis', - 'mitre', - 'mitts', - 'mixed', - 'mixen', - 'mixer', - 'mixes', - 'mixte', - 'mixup', - 'mizen', - 'mizzy', - 'mneme', - 'moans', - 'moats', - 'mobby', - 'mobes', - 'mobey', - 'mobie', - 'moble', - 'mochi', - 'mochs', - 'mochy', - 'mocks', - 'moder', - 'modes', - 'modge', - 'modii', - 'modus', - 'moers', - 'mofos', - 'moggy', - 'mohel', - 'mohos', - 'mohrs', - 'mohua', - 'mohur', - 'moile', - 'moils', - 'moira', - 'moire', - 'moits', - 'mojos', - 'mokes', - 'mokis', - 'mokos', - 'molal', - 'molas', - 'molds', - 'moled', - 'moles', - 'molla', - 'molls', - 'molly', - 'molto', - 'molts', - 'molys', - 'momes', - 'momma', - 'mommy', - 'momus', - 'monad', - 'monal', - 'monas', - 'monde', - 'mondo', - 'moner', - 'mongo', - 'mongs', - 'monic', - 'monie', - 'monks', - 'monos', - 'monte', - 'monty', - 'moobs', - 'mooch', - 'moods', - 'mooed', - 'mooks', - 'moola', - 'mooli', - 'mools', - 'mooly', - 'moong', - 'moons', - 'moony', - 'moops', - 'moors', - 'moory', - 'moots', - 'moove', - 'moped', - 'moper', - 'mopes', - 'mopey', - 'moppy', - 'mopsy', - 'mopus', - 'morae', - 'moras', - 'morat', - 'moray', - 'morel', - 'mores', - 'moria', - 'morne', - 'morns', - 'morra', - 'morro', - 'morse', - 'morts', - 'mosed', - 'moses', - 'mosey', - 'mosks', - 'mosso', - 'moste', - 'mosts', - 'moted', - 'moten', - 'motes', - 'motet', - 'motey', - 'moths', - 'mothy', - 'motis', - 'motte', - 'motts', - 'motty', - 'motus', - 'motza', - 'mouch', - 'moues', - 'mould', - 'mouls', - 'moups', - 'moust', - 'mousy', - 'moved', - 'moves', - 'mowas', - 'mowed', - 'mowra', - 'moxas', - 'moxie', - 'moyas', - 'moyle', - 'moyls', - 'mozed', - 'mozes', - 'mozos', - 'mpret', - 'mucho', - 'mucic', - 'mucid', - 'mucin', - 'mucks', - 'mucor', - 'mucro', - 'mudge', - 'mudir', - 'mudra', - 'muffs', - 'mufti', - 'mugga', - 'muggs', - 'muggy', - 'muhly', - 'muids', - 'muils', - 'muirs', - 'muist', - 'mujik', - 'mulct', - 'muled', - 'mules', - 'muley', - 'mulga', - 'mulie', - 'mulla', - 'mulls', - 'mulse', - 'mulsh', - 'mumms', - 'mumps', - 'mumsy', - 'mumus', - 'munga', - 'munge', - 'mungo', - 'mungs', - 'munis', - 'munts', - 'muntu', - 'muons', - 'muras', - 'mured', - 'mures', - 'murex', - 'murid', - 'murks', - 'murls', - 'murly', - 'murra', - 'murre', - 'murri', - 'murrs', - 'murry', - 'murti', - 'murva', - 'musar', - 'musca', - 'mused', - 'muser', - 'muses', - 'muset', - 'musha', - 'musit', - 'musks', - 'musos', - 'musse', - 'mussy', - 'musth', - 'musts', - 'mutch', - 'muted', - 'muter', - 'mutes', - 'mutha', - 'mutis', - 'muton', - 'mutts', - 'muxed', - 'muxes', - 'muzak', - 'muzzy', - 'mvule', - 'myall', - 'mylar', - 'mynah', - 'mynas', - 'myoid', - 'myoma', - 'myope', - 'myops', - 'myopy', - 'mysid', - 'mythi', - 'myths', - 'mythy', - 'myxos', - 'mzees', - 'naams', - 'naans', - 'nabes', - 'nabis', - 'nabks', - 'nabla', - 'nabob', - 'nache', - 'nacho', - 'nacre', - 'nadas', - 'naeve', - 'naevi', - 'naffs', - 'nagas', - 'naggy', - 'nagor', - 'nahal', - 'naiad', - 'naifs', - 'naiks', - 'nails', - 'naira', - 'nairu', - 'naked', - 'naker', - 'nakfa', - 'nalas', - 'naled', - 'nalla', - 'named', - 'namer', - 'names', - 'namma', - 'namus', - 'nanas', - 'nance', - 'nancy', - 'nandu', - 'nanna', - 'nanos', - 'nanua', - 'napas', - 'naped', - 'napes', - 'napoo', - 'nappa', - 'nappe', - 'nappy', - 'naras', - 'narco', - 'narcs', - 'nards', - 'nares', - 'naric', - 'naris', - 'narks', - 'narky', - 'narre', - 'nashi', - 'natch', - 'nates', - 'natis', - 'natty', - 'nauch', - 'naunt', - 'navar', - 'naves', - 'navew', - 'navvy', - 'nawab', - 'nazes', - 'nazir', - 'nazis', - 'nduja', - 'neafe', - 'neals', - 'neaps', - 'nears', - 'neath', - 'neats', - 'nebek', - 'nebel', - 'necks', - 'neddy', - 'needs', - 'neeld', - 'neele', - 'neemb', - 'neems', - 'neeps', - 'neese', - 'neeze', - 'negro', - 'negus', - 'neifs', - 'neist', - 'neive', - 'nelis', - 'nelly', - 'nemas', - 'nemns', - 'nempt', - 'nenes', - 'neons', - 'neper', - 'nepit', - 'neral', - 'nerds', - 'nerka', - 'nerks', - 'nerol', - 'nerts', - 'nertz', - 'nervy', - 'nests', - 'netes', - 'netop', - 'netts', - 'netty', - 'neuks', - 'neume', - 'neums', - 'nevel', - 'neves', - 'nevus', - 'newbs', - 'newed', - 'newel', - 'newie', - 'newsy', - 'newts', - 'nexts', - 'nexus', - 'ngaio', - 'ngana', - 'ngati', - 'ngoma', - 'ngwee', - 'nicad', - 'nicht', - 'nicks', - 'nicol', - 'nidal', - 'nided', - 'nides', - 'nidor', - 'nidus', - 'niefs', - 'nieve', - 'nifes', - 'niffs', - 'niffy', - 'nifty', - 'niger', - 'nighs', - 'nihil', - 'nikab', - 'nikah', - 'nikau', - 'nills', - 'nimbi', - 'nimbs', - 'nimps', - 'niner', - 'nines', - 'ninon', - 'nipas', - 'nippy', - 'niqab', - 'nirls', - 'nirly', - 'nisei', - 'nisse', - 'nisus', - 'niter', - 'nites', - 'nitid', - 'niton', - 'nitre', - 'nitro', - 'nitry', - 'nitty', - 'nival', - 'nixed', - 'nixer', - 'nixes', - 'nixie', - 'nizam', - 'nkosi', - 'noahs', - 'nobby', - 'nocks', - 'nodal', - 'noddy', - 'nodes', - 'nodus', - 'noels', - 'noggs', - 'nohow', - 'noils', - 'noily', - 'noint', - 'noirs', - 'noles', - 'nolls', - 'nolos', - 'nomas', - 'nomen', - 'nomes', - 'nomic', - 'nomoi', - 'nomos', - 'nonas', - 'nonce', - 'nones', - 'nonet', - 'nongs', - 'nonis', - 'nonny', - 'nonyl', - 'noobs', - 'nooit', - 'nooks', - 'nooky', - 'noons', - 'noops', - 'nopal', - 'noria', - 'noris', - 'norks', - 'norma', - 'norms', - 'nosed', - 'noser', - 'noses', - 'notal', - 'noted', - 'noter', - 'notes', - 'notum', - 'nould', - 'noule', - 'nouls', - 'nouns', - 'nouny', - 'noups', - 'novae', - 'novas', - 'novum', - 'noway', - 'nowed', - 'nowls', - 'nowts', - 'nowty', - 'noxal', - 'noxes', - 'noyau', - 'noyed', - 'noyes', - 'nubby', - 'nubia', - 'nucha', - 'nuddy', - 'nuder', - 'nudes', - 'nudie', - 'nudzh', - 'nuffs', - 'nugae', - 'nuked', - 'nukes', - 'nulla', - 'nulls', - 'numbs', - 'numen', - 'nummy', - 'nunny', - 'nurds', - 'nurdy', - 'nurls', - 'nurrs', - 'nutso', - 'nutsy', - 'nyaff', - 'nyala', - 'nying', - 'nyssa', - 'oaked', - 'oaker', - 'oakum', - 'oared', - 'oases', - 'oasis', - 'oasts', - 'oaten', - 'oater', - 'oaths', - 'oaves', - 'obang', - 'obeah', - 'obeli', - 'obeys', - 'obias', - 'obied', - 'obiit', - 'obits', - 'objet', - 'oboes', - 'obole', - 'oboli', - 'obols', - 'occam', - 'ocher', - 'oches', - 'ochre', - 'ochry', - 'ocker', - 'ocrea', - 'octad', - 'octan', - 'octas', - 'octyl', - 'oculi', - 'odahs', - 'odals', - 'odeon', - 'odeum', - 'odism', - 'odist', - 'odium', - 'odors', - 'odour', - 'odyle', - 'odyls', - 'ofays', - 'offed', - 'offie', - 'oflag', - 'ofter', - 'ogams', - 'ogeed', - 'ogees', - 'oggin', - 'ogham', - 'ogive', - 'ogled', - 'ogler', - 'ogles', - 'ogmic', - 'ogres', - 'ohias', - 'ohing', - 'ohmic', - 'ohone', - 'oidia', - 'oiled', - 'oiler', - 'oinks', - 'oints', - 'ojime', - 'okapi', - 'okays', - 'okehs', - 'okras', - 'oktas', - 'oldie', - 'oleic', - 'olein', - 'olent', - 'oleos', - 'oleum', - 'olios', - 'ollas', - 'ollav', - 'oller', - 'ollie', - 'ology', - 'olpae', - 'olpes', - 'omasa', - 'omber', - 'ombus', - 'omens', - 'omers', - 'omits', - 'omlah', - 'omovs', - 'omrah', - 'oncer', - 'onces', - 'oncet', - 'oncus', - 'onely', - 'oners', - 'onery', - 'onium', - 'onkus', - 'onlay', - 'onned', - 'ontic', - 'oobit', - 'oohed', - 'oomph', - 'oonts', - 'ooped', - 'oorie', - 'ooses', - 'ootid', - 'oozed', - 'oozes', - 'opahs', - 'opals', - 'opens', - 'opepe', - 'oping', - 'oppos', - 'opsin', - 'opted', - 'opter', - 'orach', - 'oracy', - 'orals', - 'orang', - 'orant', - 'orate', - 'orbed', - 'orcas', - 'orcin', - 'ordos', - 'oread', - 'orfes', - 'orgia', - 'orgic', - 'orgue', - 'oribi', - 'oriel', - 'orixa', - 'orles', - 'orlon', - 'orlop', - 'ormer', - 'ornis', - 'orpin', - 'orris', - 'ortho', - 'orval', - 'orzos', - 'oscar', - 'oshac', - 'osier', - 'osmic', - 'osmol', - 'ossia', - 'ostia', - 'otaku', - 'otary', - 'ottar', - 'ottos', - 'oubit', - 'oucht', - 'ouens', - 'ouija', - 'oulks', - 'oumas', - 'oundy', - 'oupas', - 'ouped', - 'ouphe', - 'ouphs', - 'ourie', - 'ousel', - 'ousts', - 'outby', - 'outed', - 'outre', - 'outro', - 'outta', - 'ouzel', - 'ouzos', - 'ovals', - 'ovels', - 'ovens', - 'overs', - 'ovist', - 'ovoli', - 'ovolo', - 'ovule', - 'owche', - 'owies', - 'owled', - 'owler', - 'owlet', - 'owned', - 'owres', - 'owrie', - 'owsen', - 'oxbow', - 'oxers', - 'oxeye', - 'oxids', - 'oxies', - 'oxime', - 'oxims', - 'oxlip', - 'oxter', - 'oyers', - 'ozeki', - 'ozzie', - 'paals', - 'paans', - 'pacas', - 'paced', - 'pacer', - 'paces', - 'pacey', - 'pacha', - 'packs', - 'pacos', - 'pacta', - 'pacts', - 'padis', - 'padle', - 'padma', - 'padre', - 'padri', - 'paean', - 'paedo', - 'paeon', - 'paged', - 'pager', - 'pages', - 'pagle', - 'pagod', - 'pagri', - 'paiks', - 'pails', - 'pains', - 'paire', - 'pairs', - 'paisa', - 'paise', - 'pakka', - 'palas', - 'palay', - 'palea', - 'paled', - 'pales', - 'palet', - 'palis', - 'palki', - 'palla', - 'palls', - 'pally', - 'palms', - 'palmy', - 'palpi', - 'palps', - 'palsa', - 'pampa', - 'panax', - 'pance', - 'panda', - 'pands', - 'pandy', - 'paned', - 'panes', - 'panga', - 'pangs', - 'panim', - 'panko', - 'panne', - 'panni', - 'panto', - 'pants', - 'panty', - 'paoli', - 'paolo', - 'papas', - 'papaw', - 'papes', - 'pappi', - 'pappy', - 'parae', - 'paras', - 'parch', - 'pardi', - 'pards', - 'pardy', - 'pared', - 'paren', - 'pareo', - 'pares', - 'pareu', - 'parev', - 'parge', - 'pargo', - 'paris', - 'parki', - 'parks', - 'parky', - 'parle', - 'parly', - 'parma', - 'parol', - 'parps', - 'parra', - 'parrs', - 'parti', - 'parts', - 'parve', - 'parvo', - 'paseo', - 'pases', - 'pasha', - 'pashm', - 'paska', - 'paspy', - 'passe', - 'pasts', - 'pated', - 'paten', - 'pater', - 'pates', - 'paths', - 'patin', - 'patka', - 'patly', - 'patte', - 'patus', - 'pauas', - 'pauls', - 'pavan', - 'paved', - 'paven', - 'paver', - 'paves', - 'pavid', - 'pavin', - 'pavis', - 'pawas', - 'pawaw', - 'pawed', - 'pawer', - 'pawks', - 'pawky', - 'pawls', - 'pawns', - 'paxes', - 'payed', - 'payor', - 'paysd', - 'peage', - 'peags', - 'peaks', - 'peaky', - 'peals', - 'peans', - 'peare', - 'pears', - 'peart', - 'pease', - 'peats', - 'peaty', - 'peavy', - 'peaze', - 'pebas', - 'pechs', - 'pecke', - 'pecks', - 'pecky', - 'pedes', - 'pedis', - 'pedro', - 'peece', - 'peeks', - 'peels', - 'peens', - 'peeoy', - 'peepe', - 'peeps', - 'peers', - 'peery', - 'peeve', - 'peggy', - 'peghs', - 'peins', - 'peise', - 'peize', - 'pekan', - 'pekes', - 'pekin', - 'pekoe', - 'pelas', - 'pelau', - 'peles', - 'pelfs', - 'pells', - 'pelma', - 'pelon', - 'pelta', - 'pelts', - 'pends', - 'pendu', - 'pened', - 'penes', - 'pengo', - 'penie', - 'penis', - 'penks', - 'penna', - 'penni', - 'pents', - 'peons', - 'peony', - 'pepla', - 'pepos', - 'peppy', - 'pepsi', - 'perai', - 'perce', - 'percs', - 'perdu', - 'perdy', - 'perea', - 'peres', - 'peris', - 'perks', - 'perms', - 'perns', - 'perog', - 'perps', - 'perry', - 'perse', - 'perst', - 'perts', - 'perve', - 'pervo', - 'pervs', - 'pervy', - 'pesos', - 'pests', - 'pesty', - 'petar', - 'peter', - 'petit', - 'petre', - 'petri', - 'petti', - 'petto', - 'pewee', - 'pewit', - 'peyse', - 'phage', - 'phang', - 'phare', - 'pharm', - 'pheer', - 'phene', - 'pheon', - 'phese', - 'phial', - 'phish', - 'phizz', - 'phlox', - 'phoca', - 'phono', - 'phons', - 'phots', - 'phpht', - 'phuts', - 'phyla', - 'phyle', - 'piani', - 'pians', - 'pibal', - 'pical', - 'picas', - 'piccy', - 'picks', - 'picot', - 'picra', - 'picul', - 'piend', - 'piers', - 'piert', - 'pieta', - 'piets', - 'piezo', - 'pight', - 'pigmy', - 'piing', - 'pikas', - 'pikau', - 'piked', - 'piker', - 'pikes', - 'pikey', - 'pikis', - 'pikul', - 'pilae', - 'pilaf', - 'pilao', - 'pilar', - 'pilau', - 'pilaw', - 'pilch', - 'pilea', - 'piled', - 'pilei', - 'piler', - 'piles', - 'pilis', - 'pills', - 'pilow', - 'pilum', - 'pilus', - 'pimas', - 'pimps', - 'pinas', - 'pined', - 'pines', - 'pingo', - 'pings', - 'pinko', - 'pinks', - 'pinna', - 'pinny', - 'pinon', - 'pinot', - 'pinta', - 'pints', - 'pinup', - 'pions', - 'piony', - 'pious', - 'pioye', - 'pioys', - 'pipal', - 'pipas', - 'piped', - 'pipes', - 'pipet', - 'pipis', - 'pipit', - 'pippy', - 'pipul', - 'pirai', - 'pirls', - 'pirns', - 'pirog', - 'pisco', - 'pises', - 'pisky', - 'pisos', - 'pissy', - 'piste', - 'pitas', - 'piths', - 'piton', - 'pitot', - 'pitta', - 'piums', - 'pixes', - 'pized', - 'pizes', - 'plaas', - 'plack', - 'plage', - 'plans', - 'plaps', - 'plash', - 'plasm', - 'plast', - 'plats', - 'platt', - 'platy', - 'playa', - 'plays', - 'pleas', - 'plebe', - 'plebs', - 'plena', - 'pleon', - 'plesh', - 'plews', - 'plica', - 'plies', - 'plims', - 'pling', - 'plink', - 'ploat', - 'plods', - 'plong', - 'plonk', - 'plook', - 'plops', - 'plots', - 'plotz', - 'plouk', - 'plows', - 'ploye', - 'ploys', - 'plues', - 'pluff', - 'plugs', - 'plums', - 'plumy', - 'pluot', - 'pluto', - 'plyer', - 'poach', - 'poaka', - 'poake', - 'poboy', - 'pocks', - 'pocky', - 'podal', - 'poddy', - 'podex', - 'podge', - 'podgy', - 'podia', - 'poems', - 'poeps', - 'poets', - 'pogey', - 'pogge', - 'pogos', - 'pohed', - 'poilu', - 'poind', - 'pokal', - 'poked', - 'pokes', - 'pokey', - 'pokie', - 'poled', - 'poler', - 'poles', - 'poley', - 'polio', - 'polis', - 'polje', - 'polks', - 'polls', - 'polly', - 'polos', - 'polts', - 'polys', - 'pombe', - 'pomes', - 'pommy', - 'pomos', - 'pomps', - 'ponce', - 'poncy', - 'ponds', - 'pones', - 'poney', - 'ponga', - 'pongo', - 'pongs', - 'pongy', - 'ponks', - 'ponts', - 'ponty', - 'ponzu', - 'poods', - 'pooed', - 'poofs', - 'poofy', - 'poohs', - 'pooja', - 'pooka', - 'pooks', - 'pools', - 'poons', - 'poops', - 'poopy', - 'poori', - 'poort', - 'poots', - 'poove', - 'poovy', - 'popes', - 'poppa', - 'popsy', - 'porae', - 'poral', - 'pored', - 'porer', - 'pores', - 'porge', - 'porgy', - 'porin', - 'porks', - 'porky', - 'porno', - 'porns', - 'porny', - 'porta', - 'ports', - 'porty', - 'posed', - 'poses', - 'posey', - 'posho', - 'posts', - 'potae', - 'potch', - 'poted', - 'potes', - 'potin', - 'potoo', - 'potsy', - 'potto', - 'potts', - 'potty', - 'pouff', - 'poufs', - 'pouke', - 'pouks', - 'poule', - 'poulp', - 'poult', - 'poupe', - 'poupt', - 'pours', - 'pouts', - 'powan', - 'powin', - 'pownd', - 'powns', - 'powny', - 'powre', - 'poxed', - 'poxes', - 'poynt', - 'poyou', - 'poyse', - 'pozzy', - 'praam', - 'prads', - 'prahu', - 'prams', - 'prana', - 'prang', - 'praos', - 'prase', - 'prate', - 'prats', - 'pratt', - 'praty', - 'praus', - 'prays', - 'predy', - 'preed', - 'prees', - 'preif', - 'prems', - 'premy', - 'prent', - 'preon', - 'preop', - 'preps', - 'presa', - 'prese', - 'prest', - 'preve', - 'prexy', - 'preys', - 'prial', - 'pricy', - 'prief', - 'prier', - 'pries', - 'prigs', - 'prill', - 'prima', - 'primi', - 'primp', - 'prims', - 'primy', - 'prink', - 'prion', - 'prise', - 'priss', - 'proas', - 'probs', - 'prods', - 'proem', - 'profs', - 'progs', - 'proin', - 'proke', - 'prole', - 'proll', - 'promo', - 'proms', - 'pronk', - 'props', - 'prore', - 'proso', - 'pross', - 'prost', - 'prosy', - 'proto', - 'proul', - 'prows', - 'proyn', - 'prunt', - 'pruta', - 'pryer', - 'pryse', - 'pseud', - 'pshaw', - 'psion', - 'psoae', - 'psoai', - 'psoas', - 'psora', - 'psych', - 'psyop', - 'pubco', - 'pubes', - 'pubis', - 'pucan', - 'pucer', - 'puces', - 'pucka', - 'pucks', - 'puddy', - 'pudge', - 'pudic', - 'pudor', - 'pudsy', - 'pudus', - 'puers', - 'puffa', - 'puffs', - 'puggy', - 'pugil', - 'puhas', - 'pujah', - 'pujas', - 'pukas', - 'puked', - 'puker', - 'pukes', - 'pukey', - 'pukka', - 'pukus', - 'pulao', - 'pulas', - 'puled', - 'puler', - 'pules', - 'pulik', - 'pulis', - 'pulka', - 'pulks', - 'pulli', - 'pulls', - 'pully', - 'pulmo', - 'pulps', - 'pulus', - 'pumas', - 'pumie', - 'pumps', - 'punas', - 'punce', - 'punga', - 'pungs', - 'punji', - 'punka', - 'punks', - 'punky', - 'punny', - 'punto', - 'punts', - 'punty', - 'pupae', - 'pupas', - 'pupus', - 'purda', - 'pured', - 'pures', - 'purin', - 'puris', - 'purls', - 'purpy', - 'purrs', - 'pursy', - 'purty', - 'puses', - 'pusle', - 'pussy', - 'putid', - 'puton', - 'putti', - 'putto', - 'putts', - 'puzel', - 'pwned', - 'pyats', - 'pyets', - 'pygal', - 'pyins', - 'pylon', - 'pyned', - 'pynes', - 'pyoid', - 'pyots', - 'pyral', - 'pyran', - 'pyres', - 'pyrex', - 'pyric', - 'pyros', - 'pyxed', - 'pyxes', - 'pyxie', - 'pyxis', - 'pzazz', - 'qadis', - 'qaids', - 'qajaq', - 'qanat', - 'qapik', - 'qibla', - 'qophs', - 'qorma', - 'quads', - 'quaff', - 'quags', - 'quair', - 'quais', - 'quaky', - 'quale', - 'quant', - 'quare', - 'quass', - 'quate', - 'quats', - 'quayd', - 'quays', - 'qubit', - 'quean', - 'queme', - 'quena', - 'quern', - 'queyn', - 'queys', - 'quich', - 'quids', - 'quiff', - 'quims', - 'quina', - 'quine', - 'quino', - 'quins', - 'quint', - 'quipo', - 'quips', - 'quipu', - 'quire', - 'quirt', - 'quist', - 'quits', - 'quoad', - 'quods', - 'quoif', - 'quoin', - 'quoit', - 'quoll', - 'quonk', - 'quops', - 'qursh', - 'quyte', - 'rabat', - 'rabic', - 'rabis', - 'raced', - 'races', - 'rache', - 'racks', - 'racon', - 'radge', - 'radix', - 'radon', - 'raffs', - 'rafts', - 'ragas', - 'ragde', - 'raged', - 'ragee', - 'rager', - 'rages', - 'ragga', - 'raggs', - 'raggy', - 'ragis', - 'ragus', - 'rahed', - 'rahui', - 'raias', - 'raids', - 'raiks', - 'raile', - 'rails', - 'raine', - 'rains', - 'raird', - 'raita', - 'raits', - 'rajas', - 'rajes', - 'raked', - 'rakee', - 'raker', - 'rakes', - 'rakia', - 'rakis', - 'rakus', - 'rales', - 'ramal', - 'ramee', - 'ramet', - 'ramie', - 'ramin', - 'ramis', - 'rammy', - 'ramps', - 'ramus', - 'ranas', - 'rance', - 'rands', - 'ranee', - 'ranga', - 'rangi', - 'rangs', - 'rangy', - 'ranid', - 'ranis', - 'ranke', - 'ranks', - 'rants', - 'raped', - 'raper', - 'rapes', - 'raphe', - 'rappe', - 'rared', - 'raree', - 'rares', - 'rarks', - 'rased', - 'raser', - 'rases', - 'rasps', - 'rasse', - 'rasta', - 'ratal', - 'ratan', - 'ratas', - 'ratch', - 'rated', - 'ratel', - 'rater', - 'rates', - 'ratha', - 'rathe', - 'raths', - 'ratoo', - 'ratos', - 'ratus', - 'rauns', - 'raupo', - 'raved', - 'ravel', - 'raver', - 'raves', - 'ravey', - 'ravin', - 'rawer', - 'rawin', - 'rawly', - 'rawns', - 'raxed', - 'raxes', - 'rayah', - 'rayas', - 'rayed', - 'rayle', - 'rayne', - 'razed', - 'razee', - 'razer', - 'razes', - 'razoo', - 'readd', - 'reads', - 'reais', - 'reaks', - 'realo', - 'reals', - 'reame', - 'reams', - 'reamy', - 'reans', - 'reaps', - 'rears', - 'reast', - 'reata', - 'reate', - 'reave', - 'rebbe', - 'rebec', - 'rebid', - 'rebit', - 'rebop', - 'rebuy', - 'recal', - 'recce', - 'recco', - 'reccy', - 'recit', - 'recks', - 'recon', - 'recta', - 'recti', - 'recto', - 'redan', - 'redds', - 'reddy', - 'reded', - 'redes', - 'redia', - 'redid', - 'redip', - 'redly', - 'redon', - 'redos', - 'redox', - 'redry', - 'redub', - 'redux', - 'redye', - 'reech', - 'reede', - 'reeds', - 'reefs', - 'reefy', - 'reeks', - 'reeky', - 'reels', - 'reens', - 'reest', - 'reeve', - 'refed', - 'refel', - 'reffo', - 'refis', - 'refix', - 'refly', - 'refry', - 'regar', - 'reges', - 'reggo', - 'regie', - 'regma', - 'regna', - 'regos', - 'regur', - 'rehem', - 'reifs', - 'reify', - 'reiki', - 'reiks', - 'reink', - 'reins', - 'reird', - 'reist', - 'reive', - 'rejig', - 'rejon', - 'reked', - 'rekes', - 'rekey', - 'relet', - 'relie', - 'relit', - 'rello', - 'reman', - 'remap', - 'remen', - 'remet', - 'remex', - 'remix', - 'renay', - 'rends', - 'reney', - 'renga', - 'renig', - 'renin', - 'renne', - 'renos', - 'rente', - 'rents', - 'reoil', - 'reorg', - 'repeg', - 'repin', - 'repla', - 'repos', - 'repot', - 'repps', - 'repro', - 'reran', - 'rerig', - 'resat', - 'resaw', - 'resay', - 'resee', - 'reses', - 'resew', - 'resid', - 'resit', - 'resod', - 'resow', - 'resto', - 'rests', - 'resty', - 'resus', - 'retag', - 'retax', - 'retem', - 'retia', - 'retie', - 'retox', - 'revet', - 'revie', - 'rewan', - 'rewax', - 'rewed', - 'rewet', - 'rewin', - 'rewon', - 'rewth', - 'rexes', - 'rezes', - 'rheas', - 'rheme', - 'rheum', - 'rhies', - 'rhime', - 'rhine', - 'rhody', - 'rhomb', - 'rhone', - 'rhumb', - 'rhyne', - 'rhyta', - 'riads', - 'rials', - 'riant', - 'riata', - 'ribas', - 'ribby', - 'ribes', - 'riced', - 'ricer', - 'rices', - 'ricey', - 'richt', - 'ricin', - 'ricks', - 'rides', - 'ridgy', - 'ridic', - 'riels', - 'riems', - 'rieve', - 'rifer', - 'riffs', - 'rifte', - 'rifts', - 'rifty', - 'riggs', - 'rigol', - 'riled', - 'riles', - 'riley', - 'rille', - 'rills', - 'rimae', - 'rimed', - 'rimer', - 'rimes', - 'rimus', - 'rinds', - 'rindy', - 'rines', - 'rings', - 'rinks', - 'rioja', - 'riots', - 'riped', - 'ripes', - 'ripps', - 'rises', - 'rishi', - 'risks', - 'risps', - 'risus', - 'rites', - 'ritts', - 'ritzy', - 'rivas', - 'rived', - 'rivel', - 'riven', - 'rives', - 'riyal', - 'rizas', - 'roads', - 'roams', - 'roans', - 'roars', - 'roary', - 'roate', - 'robed', - 'robes', - 'roble', - 'rocks', - 'roded', - 'rodes', - 'roguy', - 'rohes', - 'roids', - 'roils', - 'roily', - 'roins', - 'roist', - 'rojak', - 'rojis', - 'roked', - 'roker', - 'rokes', - 'rolag', - 'roles', - 'rolfs', - 'rolls', - 'romal', - 'roman', - 'romeo', - 'romps', - 'ronde', - 'rondo', - 'roneo', - 'rones', - 'ronin', - 'ronne', - 'ronte', - 'ronts', - 'roods', - 'roofs', - 'roofy', - 'rooks', - 'rooky', - 'rooms', - 'roons', - 'roops', - 'roopy', - 'roosa', - 'roose', - 'roots', - 'rooty', - 'roped', - 'roper', - 'ropes', - 'ropey', - 'roque', - 'roral', - 'rores', - 'roric', - 'rorid', - 'rorie', - 'rorts', - 'rorty', - 'rosed', - 'roses', - 'roset', - 'roshi', - 'rosin', - 'rosit', - 'rosti', - 'rosts', - 'rotal', - 'rotan', - 'rotas', - 'rotch', - 'roted', - 'rotes', - 'rotis', - 'rotls', - 'roton', - 'rotos', - 'rotte', - 'rouen', - 'roues', - 'roule', - 'rouls', - 'roums', - 'roups', - 'roupy', - 'roust', - 'routh', - 'routs', - 'roved', - 'roven', - 'roves', - 'rowan', - 'rowed', - 'rowel', - 'rowen', - 'rowie', - 'rowme', - 'rownd', - 'rowth', - 'rowts', - 'royne', - 'royst', - 'rozet', - 'rozit', - 'ruana', - 'rubai', - 'rubby', - 'rubel', - 'rubes', - 'rubin', - 'ruble', - 'rubli', - 'rubus', - 'ruche', - 'rucks', - 'rudas', - 'rudds', - 'rudes', - 'rudie', - 'rudis', - 'rueda', - 'ruers', - 'ruffe', - 'ruffs', - 'rugae', - 'rugal', - 'ruggy', - 'ruing', - 'ruins', - 'rukhs', - 'ruled', - 'rules', - 'rumal', - 'rumbo', - 'rumen', - 'rumes', - 'rumly', - 'rummy', - 'rumpo', - 'rumps', - 'rumpy', - 'runch', - 'runds', - 'runed', - 'runes', - 'rungs', - 'runic', - 'runny', - 'runts', - 'runty', - 'rupia', - 'rurps', - 'rurus', - 'rusas', - 'ruses', - 'rushy', - 'rusks', - 'rusma', - 'russe', - 'rusts', - 'ruths', - 'rutin', - 'rutty', - 'ryals', - 'rybat', - 'ryked', - 'rykes', - 'rymme', - 'rynds', - 'ryots', - 'ryper', - 'saags', - 'sabal', - 'sabed', - 'saber', - 'sabes', - 'sabha', - 'sabin', - 'sabir', - 'sable', - 'sabot', - 'sabra', - 'sabre', - 'sacks', - 'sacra', - 'saddo', - 'sades', - 'sadhe', - 'sadhu', - 'sadis', - 'sados', - 'sadza', - 'safed', - 'safes', - 'sagas', - 'sager', - 'sages', - 'saggy', - 'sagos', - 'sagum', - 'saheb', - 'sahib', - 'saice', - 'saick', - 'saics', - 'saids', - 'saiga', - 'sails', - 'saims', - 'saine', - 'sains', - 'sairs', - 'saist', - 'saith', - 'sajou', - 'sakai', - 'saker', - 'sakes', - 'sakia', - 'sakis', - 'sakti', - 'salal', - 'salat', - 'salep', - 'sales', - 'salet', - 'salic', - 'salix', - 'salle', - 'salmi', - 'salol', - 'salop', - 'salpa', - 'salps', - 'salse', - 'salto', - 'salts', - 'salue', - 'salut', - 'saman', - 'samas', - 'samba', - 'sambo', - 'samek', - 'samel', - 'samen', - 'sames', - 'samey', - 'samfu', - 'sammy', - 'sampi', - 'samps', - 'sands', - 'saned', - 'sanes', - 'sanga', - 'sangh', - 'sango', - 'sangs', - 'sanko', - 'sansa', - 'santo', - 'sants', - 'saola', - 'sapan', - 'sapid', - 'sapor', - 'saran', - 'sards', - 'sared', - 'saree', - 'sarge', - 'sargo', - 'sarin', - 'saris', - 'sarks', - 'sarky', - 'sarod', - 'saros', - 'sarus', - 'saser', - 'sasin', - 'sasse', - 'satai', - 'satay', - 'sated', - 'satem', - 'sates', - 'satis', - 'sauba', - 'sauch', - 'saugh', - 'sauls', - 'sault', - 'saunt', - 'saury', - 'sauts', - 'saved', - 'saver', - 'saves', - 'savey', - 'savin', - 'sawah', - 'sawed', - 'sawer', - 'saxes', - 'sayed', - 'sayer', - 'sayid', - 'sayne', - 'sayon', - 'sayst', - 'sazes', - 'scabs', - 'scads', - 'scaff', - 'scags', - 'scail', - 'scala', - 'scall', - 'scams', - 'scand', - 'scans', - 'scapa', - 'scape', - 'scapi', - 'scarp', - 'scars', - 'scart', - 'scath', - 'scats', - 'scatt', - 'scaud', - 'scaup', - 'scaur', - 'scaws', - 'sceat', - 'scena', - 'scend', - 'schav', - 'schmo', - 'schul', - 'schwa', - 'sclim', - 'scody', - 'scogs', - 'scoog', - 'scoot', - 'scopa', - 'scops', - 'scots', - 'scoug', - 'scoup', - 'scowp', - 'scows', - 'scrab', - 'scrae', - 'scrag', - 'scran', - 'scrat', - 'scraw', - 'scray', - 'scrim', - 'scrip', - 'scrob', - 'scrod', - 'scrog', - 'scrow', - 'scudi', - 'scudo', - 'scuds', - 'scuff', - 'scuft', - 'scugs', - 'sculk', - 'scull', - 'sculp', - 'sculs', - 'scums', - 'scups', - 'scurf', - 'scurs', - 'scuse', - 'scuta', - 'scute', - 'scuts', - 'scuzz', - 'scyes', - 'sdayn', - 'sdein', - 'seals', - 'seame', - 'seams', - 'seamy', - 'seans', - 'seare', - 'sears', - 'sease', - 'seats', - 'seaze', - 'sebum', - 'secco', - 'sechs', - 'sects', - 'seder', - 'sedes', - 'sedge', - 'sedgy', - 'sedum', - 'seeds', - 'seeks', - 'seeld', - 'seels', - 'seely', - 'seems', - 'seeps', - 'seepy', - 'seers', - 'sefer', - 'segar', - 'segni', - 'segno', - 'segol', - 'segos', - 'sehri', - 'seifs', - 'seils', - 'seine', - 'seirs', - 'seise', - 'seism', - 'seity', - 'seiza', - 'sekos', - 'sekts', - 'selah', - 'seles', - 'selfs', - 'sella', - 'selle', - 'sells', - 'selva', - 'semee', - 'semes', - 'semie', - 'semis', - 'senas', - 'sends', - 'senes', - 'sengi', - 'senna', - 'senor', - 'sensa', - 'sensi', - 'sente', - 'senti', - 'sents', - 'senvy', - 'senza', - 'sepad', - 'sepal', - 'sepic', - 'sepoy', - 'septa', - 'septs', - 'serac', - 'serai', - 'seral', - 'sered', - 'serer', - 'seres', - 'serfs', - 'serge', - 'seric', - 'serin', - 'serks', - 'seron', - 'serow', - 'serra', - 'serre', - 'serrs', - 'serry', - 'servo', - 'sesey', - 'sessa', - 'setae', - 'setal', - 'seton', - 'setts', - 'sewan', - 'sewar', - 'sewed', - 'sewel', - 'sewen', - 'sewin', - 'sexed', - 'sexer', - 'sexes', - 'sexto', - 'sexts', - 'seyen', - 'shads', - 'shags', - 'shahs', - 'shako', - 'shakt', - 'shalm', - 'shaly', - 'shama', - 'shams', - 'shand', - 'shans', - 'shaps', - 'sharn', - 'shash', - 'shaul', - 'shawm', - 'shawn', - 'shaws', - 'shaya', - 'shays', - 'shchi', - 'sheaf', - 'sheal', - 'sheas', - 'sheds', - 'sheel', - 'shend', - 'shent', - 'sheol', - 'sherd', - 'shere', - 'shero', - 'shets', - 'sheva', - 'shewn', - 'shews', - 'shiai', - 'shiel', - 'shier', - 'shies', - 'shill', - 'shily', - 'shims', - 'shins', - 'ships', - 'shirr', - 'shirs', - 'shish', - 'shiso', - 'shist', - 'shite', - 'shits', - 'shiur', - 'shiva', - 'shive', - 'shivs', - 'shlep', - 'shlub', - 'shmek', - 'shmoe', - 'shoat', - 'shoed', - 'shoer', - 'shoes', - 'shogi', - 'shogs', - 'shoji', - 'shojo', - 'shola', - 'shool', - 'shoon', - 'shoos', - 'shope', - 'shops', - 'shorl', - 'shote', - 'shots', - 'shott', - 'showd', - 'shows', - 'shoyu', - 'shred', - 'shris', - 'shrow', - 'shtik', - 'shtum', - 'shtup', - 'shule', - 'shuln', - 'shuls', - 'shuns', - 'shura', - 'shute', - 'shuts', - 'shwas', - 'shyer', - 'sials', - 'sibbs', - 'sibyl', - 'sices', - 'sicht', - 'sicko', - 'sicks', - 'sicky', - 'sidas', - 'sided', - 'sider', - 'sides', - 'sidha', - 'sidhe', - 'sidle', - 'sield', - 'siens', - 'sient', - 'sieth', - 'sieur', - 'sifts', - 'sighs', - 'sigil', - 'sigla', - 'signa', - 'signs', - 'sijos', - 'sikas', - 'siker', - 'sikes', - 'silds', - 'siled', - 'silen', - 'siler', - 'siles', - 'silex', - 'silks', - 'sills', - 'silos', - 'silts', - 'silty', - 'silva', - 'simar', - 'simas', - 'simba', - 'simis', - 'simps', - 'simul', - 'sinds', - 'sined', - 'sines', - 'sings', - 'sinhs', - 'sinks', - 'sinky', - 'sinus', - 'siped', - 'sipes', - 'sippy', - 'sired', - 'siree', - 'sires', - 'sirih', - 'siris', - 'siroc', - 'sirra', - 'sirup', - 'sisal', - 'sises', - 'sista', - 'sists', - 'sitar', - 'sited', - 'sites', - 'sithe', - 'sitka', - 'situp', - 'situs', - 'siver', - 'sixer', - 'sixes', - 'sixmo', - 'sixte', - 'sizar', - 'sized', - 'sizel', - 'sizer', - 'sizes', - 'skags', - 'skail', - 'skald', - 'skank', - 'skart', - 'skats', - 'skatt', - 'skaws', - 'skean', - 'skear', - 'skeds', - 'skeed', - 'skeef', - 'skeen', - 'skeer', - 'skees', - 'skeet', - 'skegg', - 'skegs', - 'skein', - 'skelf', - 'skell', - 'skelm', - 'skelp', - 'skene', - 'skens', - 'skeos', - 'skeps', - 'skers', - 'skets', - 'skews', - 'skids', - 'skied', - 'skies', - 'skiey', - 'skimo', - 'skims', - 'skink', - 'skins', - 'skint', - 'skios', - 'skips', - 'skirl', - 'skirr', - 'skite', - 'skits', - 'skive', - 'skivy', - 'sklim', - 'skoal', - 'skody', - 'skoff', - 'skogs', - 'skols', - 'skool', - 'skort', - 'skosh', - 'skran', - 'skrik', - 'skuas', - 'skugs', - 'skyed', - 'skyer', - 'skyey', - 'skyfs', - 'skyre', - 'skyrs', - 'skyte', - 'slabs', - 'slade', - 'slaes', - 'slags', - 'slaid', - 'slake', - 'slams', - 'slane', - 'slank', - 'slaps', - 'slart', - 'slats', - 'slaty', - 'slaws', - 'slays', - 'slebs', - 'sleds', - 'sleer', - 'slews', - 'sleys', - 'slier', - 'slily', - 'slims', - 'slipe', - 'slips', - 'slipt', - 'slish', - 'slits', - 'slive', - 'sloan', - 'slobs', - 'sloes', - 'slogs', - 'sloid', - 'slojd', - 'slomo', - 'sloom', - 'sloot', - 'slops', - 'slopy', - 'slorm', - 'slots', - 'slove', - 'slows', - 'sloyd', - 'slubb', - 'slubs', - 'slued', - 'slues', - 'sluff', - 'slugs', - 'sluit', - 'slums', - 'slurb', - 'slurs', - 'sluse', - 'sluts', - 'slyer', - 'slype', - 'smaak', - 'smaik', - 'smalm', - 'smalt', - 'smarm', - 'smaze', - 'smeek', - 'smees', - 'smeik', - 'smeke', - 'smerk', - 'smews', - 'smirr', - 'smirs', - 'smits', - 'smogs', - 'smoko', - 'smolt', - 'smoor', - 'smoot', - 'smore', - 'smorg', - 'smout', - 'smowt', - 'smugs', - 'smurs', - 'smush', - 'smuts', - 'snabs', - 'snafu', - 'snags', - 'snaps', - 'snarf', - 'snark', - 'snars', - 'snary', - 'snash', - 'snath', - 'snaws', - 'snead', - 'sneap', - 'snebs', - 'sneck', - 'sneds', - 'sneed', - 'snees', - 'snell', - 'snibs', - 'snick', - 'snies', - 'snift', - 'snigs', - 'snips', - 'snipy', - 'snirt', - 'snits', - 'snobs', - 'snods', - 'snoek', - 'snoep', - 'snogs', - 'snoke', - 'snood', - 'snook', - 'snool', - 'snoot', - 'snots', - 'snowk', - 'snows', - 'snubs', - 'snugs', - 'snush', - 'snyes', - 'soaks', - 'soaps', - 'soare', - 'soars', - 'soave', - 'sobas', - 'socas', - 'soces', - 'socko', - 'socks', - 'socle', - 'sodas', - 'soddy', - 'sodic', - 'sodom', - 'sofar', - 'sofas', - 'softa', - 'softs', - 'softy', - 'soger', - 'sohur', - 'soils', - 'soily', - 'sojas', - 'sojus', - 'sokah', - 'soken', - 'sokes', - 'sokol', - 'solah', - 'solan', - 'solas', - 'solde', - 'soldi', - 'soldo', - 'solds', - 'soled', - 'solei', - 'soler', - 'soles', - 'solon', - 'solos', - 'solum', - 'solus', - 'soman', - 'somas', - 'sonce', - 'sonde', - 'sones', - 'songs', - 'sonly', - 'sonne', - 'sonny', - 'sonse', - 'sonsy', - 'sooey', - 'sooks', - 'sooky', - 'soole', - 'sools', - 'sooms', - 'soops', - 'soote', - 'soots', - 'sophs', - 'sophy', - 'sopor', - 'soppy', - 'sopra', - 'soral', - 'soras', - 'sorbo', - 'sorbs', - 'sorda', - 'sordo', - 'sords', - 'sored', - 'soree', - 'sorel', - 'sorer', - 'sores', - 'sorex', - 'sorgo', - 'sorns', - 'sorra', - 'sorta', - 'sorts', - 'sorus', - 'soths', - 'sotol', - 'souce', - 'souct', - 'sough', - 'souks', - 'souls', - 'soums', - 'soups', - 'soupy', - 'sours', - 'souse', - 'souts', - 'sowar', - 'sowce', - 'sowed', - 'sowff', - 'sowfs', - 'sowle', - 'sowls', - 'sowms', - 'sownd', - 'sowne', - 'sowps', - 'sowse', - 'sowth', - 'soyas', - 'soyle', - 'soyuz', - 'sozin', - 'spacy', - 'spado', - 'spaed', - 'spaer', - 'spaes', - 'spags', - 'spahi', - 'spail', - 'spain', - 'spait', - 'spake', - 'spald', - 'spale', - 'spall', - 'spalt', - 'spams', - 'spane', - 'spang', - 'spans', - 'spard', - 'spars', - 'spart', - 'spate', - 'spats', - 'spaul', - 'spawl', - 'spaws', - 'spayd', - 'spays', - 'spaza', - 'spazz', - 'speal', - 'spean', - 'speat', - 'specs', - 'spect', - 'speel', - 'speer', - 'speil', - 'speir', - 'speks', - 'speld', - 'spelk', - 'speos', - 'spets', - 'speug', - 'spews', - 'spewy', - 'spial', - 'spica', - 'spick', - 'spics', - 'spide', - 'spier', - 'spies', - 'spiff', - 'spifs', - 'spiks', - 'spile', - 'spims', - 'spina', - 'spink', - 'spins', - 'spirt', - 'spiry', - 'spits', - 'spitz', - 'spivs', - 'splay', - 'splog', - 'spode', - 'spods', - 'spoom', - 'spoor', - 'spoot', - 'spork', - 'sposh', - 'spots', - 'sprad', - 'sprag', - 'sprat', - 'spred', - 'sprew', - 'sprit', - 'sprod', - 'sprog', - 'sprue', - 'sprug', - 'spuds', - 'spued', - 'spuer', - 'spues', - 'spugs', - 'spule', - 'spume', - 'spumy', - 'spurs', - 'sputa', - 'spyal', - 'spyre', - 'squab', - 'squaw', - 'squeg', - 'squid', - 'squit', - 'squiz', - 'stabs', - 'stade', - 'stags', - 'stagy', - 'staig', - 'stane', - 'stang', - 'staph', - 'staps', - 'starn', - 'starr', - 'stars', - 'stats', - 'staun', - 'staws', - 'stays', - 'stean', - 'stear', - 'stedd', - 'stede', - 'steds', - 'steek', - 'steem', - 'steen', - 'steil', - 'stela', - 'stele', - 'stell', - 'steme', - 'stems', - 'stend', - 'steno', - 'stens', - 'stent', - 'steps', - 'stept', - 'stere', - 'stets', - 'stews', - 'stewy', - 'steys', - 'stich', - 'stied', - 'sties', - 'stilb', - 'stile', - 'stime', - 'stims', - 'stimy', - 'stipa', - 'stipe', - 'stire', - 'stirk', - 'stirp', - 'stirs', - 'stive', - 'stivy', - 'stoae', - 'stoai', - 'stoas', - 'stoat', - 'stobs', - 'stoep', - 'stogy', - 'stoit', - 'stoln', - 'stoma', - 'stond', - 'stong', - 'stonk', - 'stonn', - 'stook', - 'stoor', - 'stope', - 'stops', - 'stopt', - 'stoss', - 'stots', - 'stott', - 'stoun', - 'stoup', - 'stour', - 'stown', - 'stowp', - 'stows', - 'strad', - 'strae', - 'strag', - 'strak', - 'strep', - 'strew', - 'stria', - 'strig', - 'strim', - 'strop', - 'strow', - 'stroy', - 'strum', - 'stubs', - 'stude', - 'studs', - 'stull', - 'stulm', - 'stumm', - 'stums', - 'stuns', - 'stupa', - 'stupe', - 'sture', - 'sturt', - 'styed', - 'styes', - 'styli', - 'stylo', - 'styme', - 'stymy', - 'styre', - 'styte', - 'subah', - 'subas', - 'subby', - 'suber', - 'subha', - 'succi', - 'sucks', - 'sucky', - 'sucre', - 'sudds', - 'sudor', - 'sudsy', - 'suede', - 'suent', - 'suers', - 'suete', - 'suets', - 'suety', - 'sugan', - 'sughs', - 'sugos', - 'suhur', - 'suids', - 'suint', - 'suits', - 'sujee', - 'sukhs', - 'sukuk', - 'sulci', - 'sulfa', - 'sulfo', - 'sulks', - 'sulph', - 'sulus', - 'sumis', - 'summa', - 'sumos', - 'sumph', - 'sumps', - 'sunis', - 'sunks', - 'sunna', - 'sunns', - 'sunup', - 'supes', - 'supra', - 'surah', - 'sural', - 'suras', - 'surat', - 'surds', - 'sured', - 'sures', - 'surfs', - 'surfy', - 'surgy', - 'surra', - 'sused', - 'suses', - 'susus', - 'sutor', - 'sutra', - 'sutta', - 'swabs', - 'swack', - 'swads', - 'swage', - 'swags', - 'swail', - 'swain', - 'swale', - 'swaly', - 'swamy', - 'swang', - 'swank', - 'swans', - 'swaps', - 'swapt', - 'sward', - 'sware', - 'swarf', - 'swart', - 'swats', - 'swayl', - 'sways', - 'sweal', - 'swede', - 'sweed', - 'sweel', - 'sweer', - 'swees', - 'sweir', - 'swelt', - 'swerf', - 'sweys', - 'swies', - 'swigs', - 'swile', - 'swims', - 'swink', - 'swipe', - 'swire', - 'swiss', - 'swith', - 'swits', - 'swive', - 'swizz', - 'swobs', - 'swole', - 'swoln', - 'swops', - 'swopt', - 'swots', - 'swoun', - 'sybbe', - 'sybil', - 'syboe', - 'sybow', - 'sycee', - 'syces', - 'sycon', - 'syens', - 'syker', - 'sykes', - 'sylis', - 'sylph', - 'sylva', - 'symar', - 'synch', - 'syncs', - 'synds', - 'syned', - 'synes', - 'synth', - 'syped', - 'sypes', - 'syphs', - 'syrah', - 'syren', - 'sysop', - 'sythe', - 'syver', - 'taals', - 'taata', - 'taber', - 'tabes', - 'tabid', - 'tabis', - 'tabla', - 'tabor', - 'tabun', - 'tabus', - 'tacan', - 'taces', - 'tacet', - 'tache', - 'tacho', - 'tachs', - 'tacks', - 'tacos', - 'tacts', - 'taels', - 'tafia', - 'taggy', - 'tagma', - 'tahas', - 'tahrs', - 'taiga', - 'taigs', - 'taiko', - 'tails', - 'tains', - 'taira', - 'taish', - 'taits', - 'tajes', - 'takas', - 'takes', - 'takhi', - 'takin', - 'takis', - 'takky', - 'talak', - 'talaq', - 'talar', - 'talas', - 'talcs', - 'talcy', - 'talea', - 'taler', - 'tales', - 'talks', - 'talky', - 'talls', - 'talma', - 'talpa', - 'taluk', - 'talus', - 'tamal', - 'tamed', - 'tames', - 'tamin', - 'tamis', - 'tammy', - 'tamps', - 'tanas', - 'tanga', - 'tangi', - 'tangs', - 'tanhs', - 'tanka', - 'tanks', - 'tanky', - 'tanna', - 'tansy', - 'tanti', - 'tanto', - 'tanty', - 'tapas', - 'taped', - 'tapen', - 'tapes', - 'tapet', - 'tapis', - 'tappa', - 'tapus', - 'taras', - 'tardo', - 'tared', - 'tares', - 'targa', - 'targe', - 'tarns', - 'taroc', - 'tarok', - 'taros', - 'tarps', - 'tarre', - 'tarry', - 'tarsi', - 'tarts', - 'tarty', - 'tasar', - 'tased', - 'taser', - 'tases', - 'tasks', - 'tassa', - 'tasse', - 'tasso', - 'tatar', - 'tater', - 'tates', - 'taths', - 'tatie', - 'tatou', - 'tatts', - 'tatus', - 'taube', - 'tauld', - 'tauon', - 'taupe', - 'tauts', - 'tavah', - 'tavas', - 'taver', - 'tawai', - 'tawas', - 'tawed', - 'tawer', - 'tawie', - 'tawse', - 'tawts', - 'taxed', - 'taxer', - 'taxes', - 'taxis', - 'taxol', - 'taxon', - 'taxor', - 'taxus', - 'tayra', - 'tazza', - 'tazze', - 'teade', - 'teads', - 'teaed', - 'teaks', - 'teals', - 'teams', - 'tears', - 'teats', - 'teaze', - 'techs', - 'techy', - 'tecta', - 'teels', - 'teems', - 'teend', - 'teene', - 'teens', - 'teeny', - 'teers', - 'teffs', - 'teggs', - 'tegua', - 'tegus', - 'tehrs', - 'teiid', - 'teils', - 'teind', - 'teins', - 'telae', - 'telco', - 'teles', - 'telex', - 'telia', - 'telic', - 'tells', - 'telly', - 'teloi', - 'telos', - 'temed', - 'temes', - 'tempi', - 'temps', - 'tempt', - 'temse', - 'tench', - 'tends', - 'tendu', - 'tenes', - 'tenge', - 'tenia', - 'tenne', - 'tenno', - 'tenny', - 'tenon', - 'tents', - 'tenty', - 'tenue', - 'tepal', - 'tepas', - 'tepoy', - 'terai', - 'teras', - 'terce', - 'terek', - 'teres', - 'terfe', - 'terfs', - 'terga', - 'terms', - 'terne', - 'terns', - 'terry', - 'terts', - 'tesla', - 'testa', - 'teste', - 'tests', - 'tetes', - 'teths', - 'tetra', - 'tetri', - 'teuch', - 'teugh', - 'tewed', - 'tewel', - 'tewit', - 'texas', - 'texes', - 'texts', - 'thack', - 'thagi', - 'thaim', - 'thale', - 'thali', - 'thana', - 'thane', - 'thang', - 'thans', - 'thanx', - 'tharm', - 'thars', - 'thaws', - 'thawy', - 'thebe', - 'theca', - 'theed', - 'theek', - 'thees', - 'thegn', - 'theic', - 'thein', - 'thelf', - 'thema', - 'thens', - 'theow', - 'therm', - 'thesp', - 'thete', - 'thews', - 'thewy', - 'thigs', - 'thilk', - 'thill', - 'thine', - 'thins', - 'thiol', - 'thirl', - 'thoft', - 'thole', - 'tholi', - 'thoro', - 'thorp', - 'thous', - 'thowl', - 'thrae', - 'thraw', - 'thrid', - 'thrip', - 'throe', - 'thuds', - 'thugs', - 'thuja', - 'thunk', - 'thurl', - 'thuya', - 'thymi', - 'thymy', - 'tians', - 'tiars', - 'tical', - 'ticca', - 'ticed', - 'tices', - 'tichy', - 'ticks', - 'ticky', - 'tiddy', - 'tided', - 'tides', - 'tiers', - 'tiffs', - 'tifos', - 'tifts', - 'tiges', - 'tigon', - 'tikas', - 'tikes', - 'tikis', - 'tikka', - 'tilak', - 'tiled', - 'tiler', - 'tiles', - 'tills', - 'tilly', - 'tilth', - 'tilts', - 'timbo', - 'timed', - 'times', - 'timon', - 'timps', - 'tinas', - 'tinct', - 'tinds', - 'tinea', - 'tined', - 'tines', - 'tinge', - 'tings', - 'tinks', - 'tinny', - 'tints', - 'tinty', - 'tipis', - 'tippy', - 'tired', - 'tires', - 'tirls', - 'tiros', - 'tirrs', - 'titch', - 'titer', - 'titis', - 'titre', - 'titty', - 'titup', - 'tiyin', - 'tiyns', - 'tizes', - 'tizzy', - 'toads', - 'toady', - 'toaze', - 'tocks', - 'tocky', - 'tocos', - 'todde', - 'toeas', - 'toffs', - 'toffy', - 'tofts', - 'tofus', - 'togae', - 'togas', - 'toged', - 'toges', - 'togue', - 'tohos', - 'toile', - 'toils', - 'toing', - 'toise', - 'toits', - 'tokay', - 'toked', - 'toker', - 'tokes', - 'tokos', - 'tolan', - 'tolar', - 'tolas', - 'toled', - 'toles', - 'tolls', - 'tolly', - 'tolts', - 'tolus', - 'tolyl', - 'toman', - 'tombs', - 'tomes', - 'tomia', - 'tommy', - 'tomos', - 'tondi', - 'tondo', - 'toned', - 'toner', - 'tones', - 'toney', - 'tongs', - 'tonka', - 'tonks', - 'tonne', - 'tonus', - 'tools', - 'tooms', - 'toons', - 'toots', - 'toped', - 'topee', - 'topek', - 'toper', - 'topes', - 'tophe', - 'tophi', - 'tophs', - 'topis', - 'topoi', - 'topos', - 'toppy', - 'toque', - 'torah', - 'toran', - 'toras', - 'torcs', - 'tores', - 'toric', - 'torii', - 'toros', - 'torot', - 'torrs', - 'torse', - 'torsi', - 'torsk', - 'torta', - 'torte', - 'torts', - 'tosas', - 'tosed', - 'toses', - 'toshy', - 'tossy', - 'toted', - 'toter', - 'totes', - 'totty', - 'touks', - 'touns', - 'tours', - 'touse', - 'tousy', - 'touts', - 'touze', - 'touzy', - 'towed', - 'towie', - 'towns', - 'towny', - 'towse', - 'towsy', - 'towts', - 'towze', - 'towzy', - 'toyed', - 'toyer', - 'toyon', - 'toyos', - 'tozed', - 'tozes', - 'tozie', - 'trabs', - 'trads', - 'tragi', - 'traik', - 'trams', - 'trank', - 'tranq', - 'trans', - 'trant', - 'trape', - 'traps', - 'trapt', - 'trass', - 'trats', - 'tratt', - 'trave', - 'trayf', - 'trays', - 'treck', - 'treed', - 'treen', - 'trees', - 'trefa', - 'treif', - 'treks', - 'trema', - 'trems', - 'tress', - 'trest', - 'trets', - 'trews', - 'treyf', - 'treys', - 'triac', - 'tride', - 'trier', - 'tries', - 'triff', - 'trigo', - 'trigs', - 'trike', - 'trild', - 'trill', - 'trims', - 'trine', - 'trins', - 'triol', - 'trior', - 'trios', - 'trips', - 'tripy', - 'trist', - 'troad', - 'troak', - 'troat', - 'trock', - 'trode', - 'trods', - 'trogs', - 'trois', - 'troke', - 'tromp', - 'trona', - 'tronc', - 'trone', - 'tronk', - 'trons', - 'trooz', - 'troth', - 'trots', - 'trows', - 'troys', - 'trued', - 'trues', - 'trugo', - 'trugs', - 'trull', - 'tryer', - 'tryke', - 'tryma', - 'tryps', - 'tsade', - 'tsadi', - 'tsars', - 'tsked', - 'tsuba', - 'tsubo', - 'tuans', - 'tuart', - 'tuath', - 'tubae', - 'tubar', - 'tubas', - 'tubby', - 'tubed', - 'tubes', - 'tucks', - 'tufas', - 'tuffe', - 'tuffs', - 'tufts', - 'tufty', - 'tugra', - 'tuile', - 'tuina', - 'tuism', - 'tuktu', - 'tules', - 'tulpa', - 'tulsi', - 'tumid', - 'tummy', - 'tumps', - 'tumpy', - 'tunas', - 'tunds', - 'tuned', - 'tuner', - 'tunes', - 'tungs', - 'tunny', - 'tupek', - 'tupik', - 'tuple', - 'tuque', - 'turds', - 'turfs', - 'turfy', - 'turks', - 'turme', - 'turms', - 'turns', - 'turnt', - 'turps', - 'turrs', - 'tushy', - 'tusks', - 'tusky', - 'tutee', - 'tutti', - 'tutty', - 'tutus', - 'tuxes', - 'tuyer', - 'twaes', - 'twain', - 'twals', - 'twank', - 'twats', - 'tways', - 'tweel', - 'tween', - 'tweep', - 'tweer', - 'twerk', - 'twerp', - 'twier', - 'twigs', - 'twill', - 'twilt', - 'twink', - 'twins', - 'twiny', - 'twire', - 'twirp', - 'twite', - 'twits', - 'twoer', - 'twyer', - 'tyees', - 'tyers', - 'tyiyn', - 'tykes', - 'tyler', - 'tymps', - 'tynde', - 'tyned', - 'tynes', - 'typal', - 'typed', - 'types', - 'typey', - 'typic', - 'typos', - 'typps', - 'typto', - 'tyran', - 'tyred', - 'tyres', - 'tyros', - 'tythe', - 'tzars', - 'udals', - 'udons', - 'ugali', - 'ugged', - 'uhlan', - 'uhuru', - 'ukase', - 'ulama', - 'ulans', - 'ulema', - 'ulmin', - 'ulnad', - 'ulnae', - 'ulnar', - 'ulnas', - 'ulpan', - 'ulvas', - 'ulyie', - 'ulzie', - 'umami', - 'umbel', - 'umber', - 'umble', - 'umbos', - 'umbre', - 'umiac', - 'umiak', - 'umiaq', - 'ummah', - 'ummas', - 'ummed', - 'umped', - 'umphs', - 'umpie', - 'umpty', - 'umrah', - 'umras', - 'unais', - 'unapt', - 'unarm', - 'unary', - 'unaus', - 'unbag', - 'unban', - 'unbar', - 'unbed', - 'unbid', - 'unbox', - 'uncap', - 'unces', - 'uncia', - 'uncos', - 'uncoy', - 'uncus', - 'undam', - 'undee', - 'undos', - 'undug', - 'uneth', - 'unfix', - 'ungag', - 'unget', - 'ungod', - 'ungot', - 'ungum', - 'unhat', - 'unhip', - 'unica', - 'units', - 'unjam', - 'unked', - 'unket', - 'unkid', - 'unlaw', - 'unlay', - 'unled', - 'unlet', - 'unlid', - 'unman', - 'unmew', - 'unmix', - 'unpay', - 'unpeg', - 'unpen', - 'unpin', - 'unred', - 'unrid', - 'unrig', - 'unrip', - 'unsaw', - 'unsay', - 'unsee', - 'unsew', - 'unsex', - 'unsod', - 'untax', - 'untin', - 'unwet', - 'unwit', - 'unwon', - 'upbow', - 'upbye', - 'updos', - 'updry', - 'upend', - 'upjet', - 'uplay', - 'upled', - 'uplit', - 'upped', - 'upran', - 'uprun', - 'upsee', - 'upsey', - 'uptak', - 'upter', - 'uptie', - 'uraei', - 'urali', - 'uraos', - 'urare', - 'urari', - 'urase', - 'urate', - 'urbex', - 'urbia', - 'urdee', - 'ureal', - 'ureas', - 'uredo', - 'ureic', - 'urena', - 'urent', - 'urged', - 'urger', - 'urges', - 'urial', - 'urite', - 'urman', - 'urnal', - 'urned', - 'urped', - 'ursae', - 'ursid', - 'urson', - 'urubu', - 'urvas', - 'users', - 'usnea', - 'usque', - 'usure', - 'usury', - 'uteri', - 'uveal', - 'uveas', - 'uvula', - 'vacua', - 'vaded', - 'vades', - 'vagal', - 'vagus', - 'vails', - 'vaire', - 'vairs', - 'vairy', - 'vakas', - 'vakil', - 'vales', - 'valis', - 'valse', - 'vamps', - 'vampy', - 'vanda', - 'vaned', - 'vanes', - 'vangs', - 'vants', - 'vaped', - 'vaper', - 'vapes', - 'varan', - 'varas', - 'vardy', - 'varec', - 'vares', - 'varia', - 'varix', - 'varna', - 'varus', - 'varve', - 'vasal', - 'vases', - 'vasts', - 'vasty', - 'vatic', - 'vatus', - 'vauch', - 'vaute', - 'vauts', - 'vawte', - 'vaxes', - 'veale', - 'veals', - 'vealy', - 'veena', - 'veeps', - 'veers', - 'veery', - 'vegas', - 'veges', - 'vegie', - 'vegos', - 'vehme', - 'veils', - 'veily', - 'veins', - 'veiny', - 'velar', - 'velds', - 'veldt', - 'veles', - 'vells', - 'velum', - 'venae', - 'venal', - 'vends', - 'vendu', - 'veney', - 'venge', - 'venin', - 'vents', - 'venus', - 'verbs', - 'verra', - 'verry', - 'verst', - 'verts', - 'vertu', - 'vespa', - 'vesta', - 'vests', - 'vetch', - 'vexed', - 'vexer', - 'vexes', - 'vexil', - 'vezir', - 'vials', - 'viand', - 'vibes', - 'vibex', - 'vibey', - 'viced', - 'vices', - 'vichy', - 'viers', - 'views', - 'viewy', - 'vifda', - 'viffs', - 'vigas', - 'vigia', - 'vilde', - 'viler', - 'villi', - 'vills', - 'vimen', - 'vinal', - 'vinas', - 'vinca', - 'vined', - 'viner', - 'vines', - 'vinew', - 'vinic', - 'vinos', - 'vints', - 'viold', - 'viols', - 'vired', - 'vireo', - 'vires', - 'virga', - 'virge', - 'virid', - 'virls', - 'virtu', - 'visas', - 'vised', - 'vises', - 'visie', - 'visne', - 'vison', - 'visto', - 'vitae', - 'vitas', - 'vitex', - 'vitro', - 'vitta', - 'vivas', - 'vivat', - 'vivda', - 'viver', - 'vives', - 'vizir', - 'vizor', - 'vleis', - 'vlies', - 'vlogs', - 'voars', - 'vocab', - 'voces', - 'voddy', - 'vodou', - 'vodun', - 'voema', - 'vogie', - 'voids', - 'voile', - 'voips', - 'volae', - 'volar', - 'voled', - 'voles', - 'volet', - 'volks', - 'volta', - 'volte', - 'volti', - 'volts', - 'volva', - 'volve', - 'vomer', - 'voted', - 'votes', - 'vouge', - 'voulu', - 'vowed', - 'vower', - 'voxel', - 'vozhd', - 'vraic', - 'vrils', - 'vroom', - 'vrous', - 'vrouw', - 'vrows', - 'vuggs', - 'vuggy', - 'vughs', - 'vughy', - 'vulgo', - 'vulns', - 'vulva', - 'vutty', - 'waacs', - 'wacke', - 'wacko', - 'wacks', - 'wadds', - 'waddy', - 'waded', - 'wader', - 'wades', - 'wadge', - 'wadis', - 'wadts', - 'waffs', - 'wafts', - 'waged', - 'wages', - 'wagga', - 'wagyu', - 'wahoo', - 'waide', - 'waifs', - 'waift', - 'wails', - 'wains', - 'wairs', - 'waite', - 'waits', - 'wakas', - 'waked', - 'waken', - 'waker', - 'wakes', - 'wakfs', - 'waldo', - 'walds', - 'waled', - 'waler', - 'wales', - 'walie', - 'walis', - 'walks', - 'walla', - 'walls', - 'wally', - 'walty', - 'wamed', - 'wames', - 'wamus', - 'wands', - 'waned', - 'wanes', - 'waney', - 'wangs', - 'wanks', - 'wanky', - 'wanle', - 'wanly', - 'wanna', - 'wants', - 'wanty', - 'wanze', - 'waqfs', - 'warbs', - 'warby', - 'wards', - 'wared', - 'wares', - 'warez', - 'warks', - 'warms', - 'warns', - 'warps', - 'warre', - 'warst', - 'warts', - 'wases', - 'washy', - 'wasms', - 'wasps', - 'waspy', - 'wasts', - 'watap', - 'watts', - 'wauff', - 'waugh', - 'wauks', - 'waulk', - 'wauls', - 'waurs', - 'waved', - 'waves', - 'wavey', - 'wawas', - 'wawes', - 'wawls', - 'waxed', - 'waxer', - 'waxes', - 'wayed', - 'wazir', - 'wazoo', - 'weald', - 'weals', - 'weamb', - 'weans', - 'wears', - 'webby', - 'weber', - 'wecht', - 'wedel', - 'wedgy', - 'weeds', - 'weeke', - 'weeks', - 'weels', - 'weems', - 'weens', - 'weeny', - 'weeps', - 'weepy', - 'weest', - 'weete', - 'weets', - 'wefte', - 'wefts', - 'weids', - 'weils', - 'weirs', - 'weise', - 'weize', - 'wekas', - 'welds', - 'welke', - 'welks', - 'welkt', - 'wells', - 'welly', - 'welts', - 'wembs', - 'wends', - 'wenge', - 'wenny', - 'wents', - 'weros', - 'wersh', - 'wests', - 'wetas', - 'wetly', - 'wexed', - 'wexes', - 'whamo', - 'whams', - 'whang', - 'whaps', - 'whare', - 'whata', - 'whats', - 'whaup', - 'whaur', - 'wheal', - 'whear', - 'wheen', - 'wheep', - 'wheft', - 'whelk', - 'whelm', - 'whens', - 'whets', - 'whews', - 'wheys', - 'whids', - 'whift', - 'whigs', - 'whilk', - 'whims', - 'whins', - 'whios', - 'whips', - 'whipt', - 'whirr', - 'whirs', - 'whish', - 'whiss', - 'whist', - 'whits', - 'whity', - 'whizz', - 'whomp', - 'whoof', - 'whoot', - 'whops', - 'whore', - 'whorl', - 'whort', - 'whoso', - 'whows', - 'whump', - 'whups', - 'whyda', - 'wicca', - 'wicks', - 'wicky', - 'widdy', - 'wides', - 'wiels', - 'wifed', - 'wifes', - 'wifey', - 'wifie', - 'wifty', - 'wigan', - 'wigga', - 'wiggy', - 'wikis', - 'wilco', - 'wilds', - 'wiled', - 'wiles', - 'wilga', - 'wilis', - 'wilja', - 'wills', - 'wilts', - 'wimps', - 'winds', - 'wined', - 'wines', - 'winey', - 'winge', - 'wings', - 'wingy', - 'winks', - 'winna', - 'winns', - 'winos', - 'winze', - 'wiped', - 'wiper', - 'wipes', - 'wired', - 'wirer', - 'wires', - 'wirra', - 'wised', - 'wises', - 'wisha', - 'wisht', - 'wisps', - 'wists', - 'witan', - 'wited', - 'wites', - 'withe', - 'withs', - 'withy', - 'wived', - 'wiver', - 'wives', - 'wizen', - 'wizes', - 'woads', - 'woald', - 'wocks', - 'wodge', - 'woful', - 'wojus', - 'woker', - 'wokka', - 'wolds', - 'wolfs', - 'wolly', - 'wolve', - 'wombs', - 'womby', - 'womyn', - 'wonga', - 'wongi', - 'wonks', - 'wonky', - 'wonts', - 'woods', - 'wooed', - 'woofs', - 'woofy', - 'woold', - 'wools', - 'woons', - 'woops', - 'woopy', - 'woose', - 'woosh', - 'wootz', - 'words', - 'works', - 'worms', - 'wormy', - 'worts', - 'wowed', - 'wowee', - 'woxen', - 'wrang', - 'wraps', - 'wrapt', - 'wrast', - 'wrate', - 'wrawl', - 'wrens', - 'wrick', - 'wried', - 'wrier', - 'wries', - 'writs', - 'wroke', - 'wroot', - 'wroth', - 'wryer', - 'wuddy', - 'wudus', - 'wulls', - 'wurst', - 'wuses', - 'wushu', - 'wussy', - 'wuxia', - 'wyled', - 'wyles', - 'wynds', - 'wynns', - 'wyted', - 'wytes', - 'xebec', - 'xenia', - 'xenic', - 'xenon', - 'xeric', - 'xerox', - 'xerus', - 'xoana', - 'xrays', - 'xylan', - 'xylem', - 'xylic', - 'xylol', - 'xylyl', - 'xysti', - 'xysts', - 'yaars', - 'yabas', - 'yabba', - 'yabby', - 'yacca', - 'yacka', - 'yacks', - 'yaffs', - 'yager', - 'yages', - 'yagis', - 'yahoo', - 'yaird', - 'yakka', - 'yakow', - 'yales', - 'yamen', - 'yampy', - 'yamun', - 'yangs', - 'yanks', - 'yapok', - 'yapon', - 'yapps', - 'yappy', - 'yarak', - 'yarco', - 'yards', - 'yarer', - 'yarfa', - 'yarks', - 'yarns', - 'yarrs', - 'yarta', - 'yarto', - 'yates', - 'yauds', - 'yauld', - 'yaups', - 'yawed', - 'yawey', - 'yawls', - 'yawns', - 'yawny', - 'yawps', - 'ybore', - 'yclad', - 'ycled', - 'ycond', - 'ydrad', - 'ydred', - 'yeads', - 'yeahs', - 'yealm', - 'yeans', - 'yeard', - 'years', - 'yecch', - 'yechs', - 'yechy', - 'yedes', - 'yeeds', - 'yeesh', - 'yeggs', - 'yelks', - 'yells', - 'yelms', - 'yelps', - 'yelts', - 'yenta', - 'yente', - 'yerba', - 'yerds', - 'yerks', - 'yeses', - 'yesks', - 'yests', - 'yesty', - 'yetis', - 'yetts', - 'yeuks', - 'yeuky', - 'yeven', - 'yeves', - 'yewen', - 'yexed', - 'yexes', - 'yfere', - 'yiked', - 'yikes', - 'yills', - 'yince', - 'yipes', - 'yippy', - 'yirds', - 'yirks', - 'yirrs', - 'yirth', - 'yites', - 'yitie', - 'ylems', - 'ylike', - 'ylkes', - 'ymolt', - 'ympes', - 'yobbo', - 'yobby', - 'yocks', - 'yodel', - 'yodhs', - 'yodle', - 'yogas', - 'yogee', - 'yoghs', - 'yogic', - 'yogin', - 'yogis', - 'yoick', - 'yojan', - 'yoked', - 'yokel', - 'yoker', - 'yokes', - 'yokul', - 'yolks', - 'yolky', - 'yomim', - 'yomps', - 'yonic', - 'yonis', - 'yonks', - 'yoofs', - 'yoops', - 'yores', - 'yorks', - 'yorps', - 'youks', - 'yourn', - 'yours', - 'yourt', - 'youse', - 'yowed', - 'yowes', - 'yowie', - 'yowls', - 'yowza', - 'yrapt', - 'yrent', - 'yrivd', - 'yrneh', - 'ysame', - 'ytost', - 'yuans', - 'yucas', - 'yucca', - 'yucch', - 'yucko', - 'yucks', - 'yucky', - 'yufts', - 'yugas', - 'yuked', - 'yukes', - 'yukky', - 'yukos', - 'yulan', - 'yules', - 'yummo', - 'yummy', - 'yumps', - 'yupon', - 'yuppy', - 'yurta', - 'yurts', - 'yuzus', - 'zabra', - 'zacks', - 'zaida', - 'zaidy', - 'zaire', - 'zakat', - 'zaman', - 'zambo', - 'zamia', - 'zanja', - 'zante', - 'zanza', - 'zanze', - 'zappy', - 'zarfs', - 'zaris', - 'zatis', - 'zaxes', - 'zayin', - 'zazen', - 'zeals', - 'zebec', - 'zebub', - 'zebus', - 'zedas', - 'zeins', - 'zendo', - 'zerda', - 'zerks', - 'zeros', - 'zests', - 'zetas', - 'zexes', - 'zezes', - 'zhomo', - 'zibet', - 'ziffs', - 'zigan', - 'zilas', - 'zilch', - 'zilla', - 'zills', - 'zimbi', - 'zimbs', - 'zinco', - 'zincs', - 'zincy', - 'zineb', - 'zines', - 'zings', - 'zingy', - 'zinke', - 'zinky', - 'zippo', - 'zippy', - 'ziram', - 'zitis', - 'zizel', - 'zizit', - 'zlote', - 'zloty', - 'zoaea', - 'zobos', - 'zobus', - 'zocco', - 'zoeae', - 'zoeal', - 'zoeas', - 'zoism', - 'zoist', - 'zombi', - 'zonae', - 'zonda', - 'zoned', - 'zoner', - 'zones', - 'zonks', - 'zooea', - 'zooey', - 'zooid', - 'zooks', - 'zooms', - 'zoons', - 'zooty', - 'zoppa', - 'zoppo', - 'zoril', - 'zoris', - 'zorro', - 'zouks', - 'zowee', - 'zowie', - 'zulus', - 'zupan', - 'zupas', - 'zuppa', - 'zurfs', - 'zuzim', - 'zygal', - 'zygon', - 'zymes', - 'zymic' -]); diff --git a/packages/create-svelte/templates/default/static/robots.txt b/packages/create-svelte/templates/default/static/robots.txt deleted file mode 100644 index e9e57dc4d41b..000000000000 --- a/packages/create-svelte/templates/default/static/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/packages/create-svelte/templates/default/svelte.config.js b/packages/create-svelte/templates/default/svelte.config.js deleted file mode 100644 index e4597b125653..000000000000 --- a/packages/create-svelte/templates/default/svelte.config.js +++ /dev/null @@ -1,17 +0,0 @@ -import adapter from '@sveltejs/adapter-auto'; -import { vitePreprocess } from '@sveltejs/kit/vite'; - -// This config is ignored and replaced with one of the configs in the shared folder when a project is created. - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - // Consult https://kit.svelte.dev/docs/integrations#preprocessors - // for more information about preprocessors - preprocess: vitePreprocess(), - - kit: { - adapter: adapter() - } -}; - -export default config; diff --git a/packages/create-svelte/templates/default/tsconfig.json b/packages/create-svelte/templates/default/tsconfig.json deleted file mode 100644 index 81ff9770cd8a..000000000000 --- a/packages/create-svelte/templates/default/tsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./.svelte-kit/tsconfig.json" -} diff --git a/packages/create-svelte/templates/default/vercel.json b/packages/create-svelte/templates/default/vercel.json deleted file mode 100644 index 564eeeb2c771..000000000000 --- a/packages/create-svelte/templates/default/vercel.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "github": { - "silent": true - } -} diff --git a/packages/create-svelte/templates/default/wrangler.toml b/packages/create-svelte/templates/default/wrangler.toml deleted file mode 100644 index 6fa14136b41c..000000000000 --- a/packages/create-svelte/templates/default/wrangler.toml +++ /dev/null @@ -1,12 +0,0 @@ -name = "svelte-kit-demo" -account_id = "32a8245cd45a24083dd0acae1d482048" -route = "cloudflare-workers-demo.svelte.dev/*" - -main = "./.cloudflare/worker.js" -site.bucket = "./.cloudflare/public" - -build.command = "npm run build" - -compatibility_date = "2021-11-12" -workers_dev = true - diff --git a/packages/create-svelte/templates/skeleton/.ignore b/packages/create-svelte/templates/skeleton/.ignore deleted file mode 100644 index 449d6440cc69..000000000000 --- a/packages/create-svelte/templates/skeleton/.ignore +++ /dev/null @@ -1,3 +0,0 @@ -package.json -.meta.json -.turbo \ No newline at end of file diff --git a/packages/create-svelte/templates/skeleton/.meta.json b/packages/create-svelte/templates/skeleton/.meta.json deleted file mode 100644 index c707b6a95088..000000000000 --- a/packages/create-svelte/templates/skeleton/.meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title": "Skeleton project", - "description": "Barebones scaffolding for your new SvelteKit app" -} diff --git a/packages/create-svelte/templates/skeleton/package.json b/packages/create-svelte/templates/skeleton/package.json deleted file mode 100644 index 1706b9d759f8..000000000000 --- a/packages/create-svelte/templates/skeleton/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "skeleton-template", - "private": true, - "version": "0.0.1-next.0", - "devDependencies": { - "@sveltejs/adapter-auto": "workspace:*" - }, - "type": "module" -} diff --git a/packages/create-svelte/templates/skeleton/package.template.json b/packages/create-svelte/templates/skeleton/package.template.json deleted file mode 100644 index 427a2face111..000000000000 --- a/packages/create-svelte/templates/skeleton/package.template.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "~TODO~", - "version": "0.0.1", - "private": true, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview" - }, - "devDependencies": { - "@sveltejs/adapter-auto": "^2.0.0", - "@sveltejs/kit": "^1.20.4", - "svelte": "^4.0.5", - "vite": "^4.4.2" - }, - "type": "module" -} diff --git a/packages/create-svelte/templates/skeleton/src/app.d.ts b/packages/create-svelte/templates/skeleton/src/app.d.ts deleted file mode 100644 index f59b884c51ed..000000000000 --- a/packages/create-svelte/templates/skeleton/src/app.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// See https://kit.svelte.dev/docs/types#app -// for information about these interfaces -declare global { - namespace App { - // interface Error {} - // interface Locals {} - // interface PageData {} - // interface Platform {} - } -} - -export {}; diff --git a/packages/create-svelte/templates/skeleton/src/lib/index.ts b/packages/create-svelte/templates/skeleton/src/lib/index.ts deleted file mode 100644 index 856f2b6c38ae..000000000000 --- a/packages/create-svelte/templates/skeleton/src/lib/index.ts +++ /dev/null @@ -1 +0,0 @@ -// place files you want to import through the `$lib` alias in this folder. diff --git a/packages/create-svelte/templates/skeleton/src/routes/+page.svelte b/packages/create-svelte/templates/skeleton/src/routes/+page.svelte deleted file mode 100644 index 5982b0ae37dd..000000000000 --- a/packages/create-svelte/templates/skeleton/src/routes/+page.svelte +++ /dev/null @@ -1,2 +0,0 @@ -

Welcome to SvelteKit

-

Visit kit.svelte.dev to read the documentation

diff --git a/packages/create-svelte/templates/skeleton/svelte.config.js b/packages/create-svelte/templates/skeleton/svelte.config.js deleted file mode 100644 index 7b52576cd6c6..000000000000 --- a/packages/create-svelte/templates/skeleton/svelte.config.js +++ /dev/null @@ -1,12 +0,0 @@ -import adapter from '@sveltejs/adapter-auto'; - -// This config is ignored and replaced with one of the configs in the shared folder when a project is created. - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - kit: { - adapter: adapter() - } -}; - -export default config; diff --git a/packages/create-svelte/templates/skeleton/vite.config.js b/packages/create-svelte/templates/skeleton/vite.config.js deleted file mode 100644 index bbf8c7da43f0..000000000000 --- a/packages/create-svelte/templates/skeleton/vite.config.js +++ /dev/null @@ -1,6 +0,0 @@ -import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vite'; - -export default defineConfig({ - plugins: [sveltekit()] -}); diff --git a/packages/create-svelte/templates/skeletonlib/.ignore b/packages/create-svelte/templates/skeletonlib/.ignore deleted file mode 100644 index 449d6440cc69..000000000000 --- a/packages/create-svelte/templates/skeletonlib/.ignore +++ /dev/null @@ -1,3 +0,0 @@ -package.json -.meta.json -.turbo \ No newline at end of file diff --git a/packages/create-svelte/templates/skeletonlib/.meta.json b/packages/create-svelte/templates/skeletonlib/.meta.json deleted file mode 100644 index aa67986ab50e..000000000000 --- a/packages/create-svelte/templates/skeletonlib/.meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "title": "Library project", - "description": "Barebones scaffolding for your new Svelte library" -} diff --git a/packages/create-svelte/templates/skeletonlib/.npmrc b/packages/create-svelte/templates/skeletonlib/.npmrc deleted file mode 100644 index b6f27f135954..000000000000 --- a/packages/create-svelte/templates/skeletonlib/.npmrc +++ /dev/null @@ -1 +0,0 @@ -engine-strict=true diff --git a/packages/create-svelte/templates/skeletonlib/package.template.json b/packages/create-svelte/templates/skeletonlib/package.template.json deleted file mode 100644 index ed466f930e43..000000000000 --- a/packages/create-svelte/templates/skeletonlib/package.template.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "~TODO~", - "version": "0.0.1", - "scripts": { - "dev": "vite dev", - "build": "vite build && npm run package", - "preview": "vite preview", - "package": "svelte-kit sync && svelte-package && publint", - "prepublishOnly": "npm run package" - }, - "exports": { - ".": { - "types": "./dist/index.d.ts", - "svelte": "./dist/index.js" - } - }, - "files": ["dist", "!dist/**/*.test.*", "!dist/**/*.spec.*"], - "peerDependencies": { - "svelte": "^4.0.0" - }, - "devDependencies": { - "@sveltejs/adapter-auto": "^2.0.0", - "@sveltejs/kit": "^1.20.4", - "@sveltejs/package": "^2.0.0", - "publint": "^0.1.9", - "svelte": "^4.0.5", - "tslib": "^2.4.1", - "typescript": "^5.0.0", - "vite": "^4.4.2" - }, - "svelte": "./dist/index.js", - "types": "./dist/index.d.ts", - "type": "module" -} diff --git a/packages/create-svelte/templates/skeletonlib/src/app.d.ts b/packages/create-svelte/templates/skeletonlib/src/app.d.ts deleted file mode 100644 index f59b884c51ed..000000000000 --- a/packages/create-svelte/templates/skeletonlib/src/app.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// See https://kit.svelte.dev/docs/types#app -// for information about these interfaces -declare global { - namespace App { - // interface Error {} - // interface Locals {} - // interface PageData {} - // interface Platform {} - } -} - -export {}; diff --git a/packages/create-svelte/templates/skeletonlib/src/lib/index.js b/packages/create-svelte/templates/skeletonlib/src/lib/index.js deleted file mode 100644 index 47d3c46fb896..000000000000 --- a/packages/create-svelte/templates/skeletonlib/src/lib/index.js +++ /dev/null @@ -1 +0,0 @@ -// Reexport your entry components here diff --git a/packages/create-svelte/templates/skeletonlib/src/routes/+page.svelte b/packages/create-svelte/templates/skeletonlib/src/routes/+page.svelte deleted file mode 100644 index 0a45b69f099b..000000000000 --- a/packages/create-svelte/templates/skeletonlib/src/routes/+page.svelte +++ /dev/null @@ -1,3 +0,0 @@ -

Welcome to your library project

-

Create your package using @sveltejs/package and preview/showcase your work with SvelteKit

-

Visit kit.svelte.dev to read the documentation

diff --git a/packages/create-svelte/templates/skeletonlib/svelte.config.js b/packages/create-svelte/templates/skeletonlib/svelte.config.js deleted file mode 100644 index a894776b5d11..000000000000 --- a/packages/create-svelte/templates/skeletonlib/svelte.config.js +++ /dev/null @@ -1,12 +0,0 @@ -import adapter from '@sveltejs/adapter-auto'; - -// This config is ignored and replaced with one of the configs in the shared folder when a project is created. - -/** @type {import('@sveltejs/package').Config} */ -const config = { - kit: { - adapter: adapter() - } -}; - -export default config; diff --git a/packages/create-svelte/templates/skeletonlib/vite.config.js b/packages/create-svelte/templates/skeletonlib/vite.config.js deleted file mode 100644 index bbf8c7da43f0..000000000000 --- a/packages/create-svelte/templates/skeletonlib/vite.config.js +++ /dev/null @@ -1,6 +0,0 @@ -import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vite'; - -export default defineConfig({ - plugins: [sveltekit()] -}); diff --git a/packages/create-svelte/test/check.js b/packages/create-svelte/test/check.js deleted file mode 100644 index d910ee12e29a..000000000000 --- a/packages/create-svelte/test/check.js +++ /dev/null @@ -1,151 +0,0 @@ -import { exec, execSync } from 'node:child_process'; -import fs from 'node:fs'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; -import { promisify } from 'node:util'; -import glob from 'tiny-glob/sync.js'; -import { beforeAll, describe, test } from 'vitest'; -import { create } from '../index.js'; - -/** - * Resolve the given path relative to the current file - * @param {string} path - */ -const resolve_path = (path) => fileURLToPath(new URL(path, import.meta.url)); - -// use a directory outside of packages to ensure it isn't added to the pnpm workspace -const test_workspace_dir = resolve_path('../../../.test-tmp/create-svelte/'); - -const existing_workspace_overrides = JSON.parse( - fs.readFileSync(resolve_path('../../../package.json'), 'utf-8') -).pnpm?.overrides; - -const overrides = { ...existing_workspace_overrides }; - -for (const pkg_path of glob(resolve_path('../../../packages/*/package.json'))) { - const name = JSON.parse(fs.readFileSync(pkg_path, 'utf-8')).name; - // use `file:` protocol for opting into stricter resolve logic which catches more bugs, - // but only on CI because it doesn't work locally for some reason - const protocol = process.env.CI ? 'file:' : ''; - overrides[name] = `${protocol}${path.dirname(path.resolve(pkg_path))}`; -} - -try { - const kit_dir = resolve_path('../../../packages/kit'); - const ls_vite_result = execSync('pnpm ls --json vite', { cwd: kit_dir }); - const vite_version = JSON.parse(ls_vite_result.toString())[0].devDependencies.vite.version; - overrides.vite = vite_version; -} catch (e) { - console.error('failed to parse installed vite version from packages/kit'); - throw e; -} - -// prepare test pnpm workspace -fs.rmSync(test_workspace_dir, { recursive: true, force: true }); -fs.mkdirSync(test_workspace_dir, { recursive: true }); -const workspace = { - name: 'svelte-check-test-fake-pnpm-workspace', - private: true, - version: '0.0.0', - pnpm: { overrides }, - devDependencies: overrides -}; - -fs.writeFileSync( - path.join(test_workspace_dir, 'package.json'), - JSON.stringify(workspace, null, '\t') -); - -fs.writeFileSync(path.join(test_workspace_dir, 'pnpm-workspace.yaml'), 'packages:\n - ./*\n'); - -const exec_async = promisify(exec); - -beforeAll(async () => { - await exec_async('pnpm install --no-frozen-lockfile', { - cwd: test_workspace_dir - }); -}, 60000); - -/** @param {any} pkg */ -function patch_package_json(pkg) { - Object.entries(overrides).forEach(([key, value]) => { - if (pkg.devDependencies?.[key]) { - pkg.devDependencies[key] = value; - } - - if (pkg.dependencies?.[key]) { - pkg.dependencies[key] = value; - } - - if (!pkg.pnpm) { - pkg.pnpm = {}; - } - - if (!pkg.pnpm.overrides) { - pkg.pnpm.overrides = {}; - } - - pkg.pnpm.overrides = { ...pkg.pnpm.overrides, ...overrides }; - }); - pkg.private = true; -} - -/** - * Tests in different templates can be run concurrently for a nice speedup locally, but tests within a template must be run sequentially. - * It'd be better to group tests by template, but vitest doesn't support that yet. - * @type {Map import('node:child_process').PromiseWithChild][]>} - */ -const script_test_map = new Map(); - -const templates = /** @type {Array<'default' | 'skeleton' | 'skeletonlib'>} */ ( - fs.readdirSync('templates') -); - -for (const template of templates) { - if (template[0] === '.') continue; - - for (const types of /** @type {const} */ (['checkjs', 'typescript'])) { - const cwd = path.join(test_workspace_dir, `${template}-${types}`); - fs.rmSync(cwd, { recursive: true, force: true }); - - create(cwd, { - name: `create-svelte-test-${template}-${types}`, - template, - types, - prettier: true, - eslint: true, - playwright: false, - vitest: false - }); - - const pkg = JSON.parse(fs.readFileSync(path.join(cwd, 'package.json'), 'utf-8')); - patch_package_json(pkg); - - fs.writeFileSync(path.join(cwd, 'package.json'), JSON.stringify(pkg, null, '\t') + '\n'); - - // run provided scripts that are non-blocking. All of them should exit with 0 - // package script requires lib dir - // TODO: lint should run before format - const scripts_to_test = ['format', 'lint', 'check', 'build', 'package'].filter( - (s) => s in pkg.scripts - ); - - for (const script of scripts_to_test) { - const tests = script_test_map.get(script) ?? []; - tests.push([`${template}-${types}`, () => exec_async(`pnpm ${script}`, { cwd })]); - script_test_map.set(script, tests); - } - } -} - -for (const [script, tests] of script_test_map) { - describe.concurrent( - script, - () => { - for (const [name, task] of tests) { - test(name, task); - } - }, - { timeout: 60000 } - ); -} diff --git a/packages/create-svelte/tsconfig.json b/packages/create-svelte/tsconfig.json index a5d5c18dc879..e4d8da465f83 100644 --- a/packages/create-svelte/tsconfig.json +++ b/packages/create-svelte/tsconfig.json @@ -3,12 +3,11 @@ "allowJs": true, "checkJs": true, "noEmit": true, - "target": "esnext", - "module": "esnext", - "moduleResolution": "node", + "target": "es2022", + "module": "node16", + "moduleResolution": "node16", "allowSyntheticDefaultImports": true, - "strict": true, - "skipLibCheck": true + "strict": true }, - "include": ["./scripts/**/*", "./test/*.js", "./*.js"] + "include": ["./*.js"] } diff --git a/packages/create-svelte/types/index.d.ts b/packages/create-svelte/types/index.d.ts deleted file mode 100644 index ef78af4797b1..000000000000 --- a/packages/create-svelte/types/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Options } from './internal'; - -/** - * Create a new SvelteKit project. - * @param {string} cwd - Path to the directory to create - * @param {import('./internal').Options} options - */ -export function create(cwd: string, options: Options): Promise; diff --git a/packages/create-svelte/types/internal.d.ts b/packages/create-svelte/types/internal.d.ts deleted file mode 100644 index 612d1cd3ceba..000000000000 --- a/packages/create-svelte/types/internal.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -export type Options = { - name: string; - template: 'default' | 'skeleton' | 'skeletonlib'; - types: 'typescript' | 'checkjs' | null; - prettier: boolean; - eslint: boolean; - playwright: boolean; - vitest: boolean; -}; - -export type File = { - name: string; - contents: string; -}; - -export type Condition = - | 'eslint' - | 'prettier' - | 'typescript' - | 'checkjs' - | 'playwright' - | 'vitest' - | 'skeleton' - | 'default' - | 'skeletonlib'; - -export type Common = { - files: Array<{ - name: string; - include: Condition[]; - exclude: Condition[]; - contents: string; - }>; -}; diff --git a/packages/create-svelte/utils.js b/packages/create-svelte/utils.js deleted file mode 100644 index d2760749f6ae..000000000000 --- a/packages/create-svelte/utils.js +++ /dev/null @@ -1,70 +0,0 @@ -import fs from 'node:fs'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; - -/** @param {string} dir */ -export function mkdirp(dir) { - try { - fs.mkdirSync(dir, { recursive: true }); - } catch (e) { - if (/** @type {any} */ (e).code === 'EEXIST') return; - throw e; - } -} - -/** @param {string} path */ -export function rimraf(path) { - (fs.rmSync || fs.rmdirSync)(path, { recursive: true, force: true }); -} - -/** - * @template T - * @param {T} x - */ -function identity(x) { - return x; -} - -/** - * @param {string} from - * @param {string} to - * @param {(basename: string) => string} rename - */ -export function copy(from, to, rename = identity) { - if (!fs.existsSync(from)) return; - - const stats = fs.statSync(from); - - if (stats.isDirectory()) { - fs.readdirSync(from).forEach((file) => { - copy(path.join(from, file), path.join(to, rename(file))); - }); - } else { - mkdirp(path.dirname(to)); - fs.copyFileSync(from, to); - } -} - -/** @param {string} path */ -export function dist(path) { - return fileURLToPath(new URL(`./dist/${path}`, import.meta.url).href); -} - -/** @type {string} */ -export const package_manager = get_package_manager() || 'npm'; - -/** - * Supports npm, pnpm, Yarn, cnpm, bun and any other package manager that sets the - * npm_config_user_agent env variable. - * Thanks to https://github.com/zkochan/packages/tree/main/which-pm-runs for this code! - */ -function get_package_manager() { - if (!process.env.npm_config_user_agent) { - return undefined; - } - const user_agent = process.env.npm_config_user_agent; - const pm_spec = user_agent.split(' ')[0]; - const separator_pos = pm_spec.lastIndexOf('/'); - const name = pm_spec.substring(0, separator_pos); - return name === 'npminstall' ? 'cnpm' : name; -} diff --git a/packages/create-svelte/vitest.config.js b/packages/create-svelte/vitest.config.js deleted file mode 100644 index 3f5451417a27..000000000000 --- a/packages/create-svelte/vitest.config.js +++ /dev/null @@ -1,5 +0,0 @@ -import { defineConfig } from 'vitest/config'; - -export default defineConfig({ - test: { dir: './test', include: ['*.js'] } -}); diff --git a/packages/enhanced-img/.prettierignore b/packages/enhanced-img/.prettierignore new file mode 100644 index 000000000000..57a5af7f662f --- /dev/null +++ b/packages/enhanced-img/.prettierignore @@ -0,0 +1 @@ +test/Output.svelte diff --git a/packages/enhanced-img/CHANGELOG.md b/packages/enhanced-img/CHANGELOG.md new file mode 100644 index 000000000000..d298b6ed2476 --- /dev/null +++ b/packages/enhanced-img/CHANGELOG.md @@ -0,0 +1,203 @@ +# @sveltejs/enhanced-img + +## 0.6.1 +### Patch Changes + + +- feat: allow `vite-plugin-svelte` 6 peer dependency ([#13921](https://github.com/sveltejs/kit/pull/13921)) + +## 0.6.0 +### Minor Changes + + +- feat: add validation to ensure plugin occurs in correct order ([`1c3f36dc10265fb79c64643c3d7a91469d34e697`](https://github.com/sveltejs/kit/commit/1c3f36dc10265fb79c64643c3d7a91469d34e697)) + +## 0.5.1 +### Patch Changes + + +- chore(deps): upgrade sharp to 0.34.1 ([#13611](https://github.com/sveltejs/kit/pull/13611)) + +## 0.5.0 +### Minor Changes + + +- feat: add support for targeting `enhanced\:img` in CSS ([#13617](https://github.com/sveltejs/kit/pull/13617)) + +## 0.4.4 +### Patch Changes + + +- fix: handle duplicate SVG images ([`8073d7c7dcc391d406c658729221a18ac6f18102`](https://github.com/sveltejs/kit/commit/8073d7c7dcc391d406c658729221a18ac6f18102)) + +## 0.4.3 +### Patch Changes + + +- fix: properly handle multiple SVGs ([#13127](https://github.com/sveltejs/kit/pull/13127)) + +## 0.4.2 +### Patch Changes + + +- feat: set intrinsic width and height for SVGs ([#13126](https://github.com/sveltejs/kit/pull/13126)) + + +- perf: directly inline values since Svelte no longer inlines variables into template ([#13035](https://github.com/sveltejs/kit/pull/13035)) + +## 0.4.1 +### Patch Changes + + +- fix: correctly handle `` elements nested in other DOM elements ([#12945](https://github.com/sveltejs/kit/pull/12945)) + +## 0.4.0 +### Minor Changes + + +- breaking: require Svelte 5 ([#12822](https://github.com/sveltejs/kit/pull/12822)) + +## 0.3.10 +### Patch Changes + + +- docs: update URLs for new svelte.dev site ([#12857](https://github.com/sveltejs/kit/pull/12857)) + +## 0.3.9 +### Patch Changes + + +- chore: upgrade svelte-parse-markup ([#12793](https://github.com/sveltejs/kit/pull/12793)) + +## 0.3.8 +### Patch Changes + + +- fix: import `node:process` instead of using globals ([#12641](https://github.com/sveltejs/kit/pull/12641)) + +## 0.3.7 +### Patch Changes + + +- fix: avoid duplicating width/height attributes ([#12673](https://github.com/sveltejs/kit/pull/12673)) + +## 0.3.6 +### Patch Changes + + +- fix: address Svelte 5 warning ([`ec04dae73702c99652e4972d2b7363f2c11ccf5a`](https://github.com/sveltejs/kit/commit/ec04dae73702c99652e4972d2b7363f2c11ccf5a)) + +## 0.3.5 +### Patch Changes + + +- perf: hoist vite asset declarations to module block ([#12627](https://github.com/sveltejs/kit/pull/12627)) + +## 0.3.4 +### Patch Changes + + +- perf: apply performance optimization to dev srcset ([#12621](https://github.com/sveltejs/kit/pull/12621)) + +## 0.3.3 +### Patch Changes + + +- chore: configure provenance in a simpler manner ([#12570](https://github.com/sveltejs/kit/pull/12570)) + +## 0.3.2 +### Patch Changes + + +- chore: package provenance ([#12567](https://github.com/sveltejs/kit/pull/12567)) + + +- fix: ensure src attribute is properly formed ([`65931f276ac2102032e3032c864a472eee19b7bb`](https://github.com/sveltejs/kit/commit/65931f276ac2102032e3032c864a472eee19b7bb)) + +## 0.3.1 +### Patch Changes + + +- fix: make `*?enhanced` imports available in the ambient context ([#12363](https://github.com/sveltejs/kit/pull/12363)) + +## 0.3.0 + +### Minor Changes + +- breaking: return plugin synchronously from `enhancedImages()` ([#12297](https://github.com/sveltejs/kit/pull/12297)) + +### Patch Changes + +- chore: add keywords for discovery in npm search ([#12330](https://github.com/sveltejs/kit/pull/12330)) + +## 0.2.1 + +### Patch Changes + +- fix: use correct type for `*?enhanced` imports ([#12224](https://github.com/sveltejs/kit/pull/12224)) + +## 0.2.0 + +### Minor Changes + +- feat: upgrade vite-imagetools to v7. caches build output by default ([#12055](https://github.com/sveltejs/kit/pull/12055)) + +## 0.1.9 + +### Patch Changes + +- fix: support shorthand attribute syntax ([#11884](https://github.com/sveltejs/kit/pull/11884)) + +## 0.1.8 + +### Patch Changes + +- fix: correct images cache key to avoid collisions when images have same name ([#11602](https://github.com/sveltejs/kit/pull/11602)) + +## 0.1.7 + +### Patch Changes + +- chore: update primary branch from master to main ([`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d)) + +- fix: throw an error if image cannot be resolved ([#11346](https://github.com/sveltejs/kit/pull/11346)) + +- fix: attempt to address issues accessing images on filesystem ([#11403](https://github.com/sveltejs/kit/pull/11403)) + +## 0.1.6 + +### Patch Changes + +- chore: upgrade vite-imagetools ([#11122](https://github.com/sveltejs/kit/pull/11122)) + +## 0.1.5 + +### Patch Changes + +- fix: correctly generate client-side code ([#11059](https://github.com/sveltejs/kit/pull/11059)) + +## 0.1.4 + +### Patch Changes + +- fix: avoid creating conflicting import statements ([#11047](https://github.com/sveltejs/kit/pull/11047)) + +## 0.1.3 + +### Patch Changes + +- fix: only resolve images if optimizable ([#11041](https://github.com/sveltejs/kit/pull/11041)) + +## 0.1.2 + +### Patch Changes + +- fix: refresh in dev mode when an image changes ([#11033](https://github.com/sveltejs/kit/pull/11033)) + +- fix: auto-import of svg images ([`4426daebe`](https://github.com/sveltejs/kit/commit/4426daebe1d345f60554225e3f12ea932b0110e4)) + +## 0.1.1 + +### Patch Changes + +- feat: add experimental `@sveltejs/enhanced-img` package ([#10788](https://github.com/sveltejs/kit/pull/10788)) diff --git a/packages/enhanced-img/README.md b/packages/enhanced-img/README.md new file mode 100644 index 000000000000..ac87975c1f95 --- /dev/null +++ b/packages/enhanced-img/README.md @@ -0,0 +1,17 @@ +# `@sveltejs/enhanced-img` + +A Vite plugin which runs a Svelte preprocessor to locate images and then transform them at build-time. + +**WARNING**: This package is experimental. It uses pre-1.0 versioning and may introduce breaking changes with every minor version release. + +## Docs + +[Docs](https://svelte.dev/docs/kit/images) + +## Changelog + +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/enhanced-img/CHANGELOG.md). + +## Acknowledgements + +We'd like to thank the author of `svelte-preprocess-import-assets`, which this code is partially based off of. We'd also like to thank the authors of `vite-imagetools` which is used in `@sveltejs/enhanced-img`. diff --git a/packages/enhanced-img/package.json b/packages/enhanced-img/package.json new file mode 100644 index 000000000000..26d57740a1b7 --- /dev/null +++ b/packages/enhanced-img/package.json @@ -0,0 +1,60 @@ +{ + "name": "@sveltejs/enhanced-img", + "version": "0.6.1", + "description": "Image optimization for your Svelte apps", + "repository": { + "type": "git", + "url": "https://github.com/sveltejs/kit", + "directory": "packages/enhanced-img" + }, + "keywords": [ + "component", + "enhanced", + "image", + "preprocessor", + "plugin", + "svelte", + "sveltekit", + "vite" + ], + "license": "MIT", + "homepage": "https://svelte.dev", + "type": "module", + "scripts": { + "lint": "prettier --check .", + "check": "tsc", + "format": "prettier --write .", + "test": "vitest run" + }, + "files": [ + "src", + "types" + ], + "exports": { + "types": "./types/index.d.ts", + "import": "./src/index.js" + }, + "types": "types/index.d.ts", + "dependencies": { + "magic-string": "^0.30.5", + "sharp": "^0.34.1", + "svelte-parse-markup": "^0.1.5", + "vite-imagetools": "^7.1.0", + "zimmerframe": "^1.1.2" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "catalog:", + "@types/estree": "^1.0.5", + "@types/node": "^18.19.48", + "rollup": "^4.27.4", + "svelte": "^5.23.1", + "typescript": "^5.6.3", + "vite": "catalog:", + "vitest": "catalog:" + }, + "peerDependencies": { + "@sveltejs/vite-plugin-svelte": "^5.0.0 || ^6.0.0-next.0", + "svelte": "^5.0.0", + "vite": ">= 5.0.0" + } +} diff --git a/packages/enhanced-img/src/index.js b/packages/enhanced-img/src/index.js new file mode 100644 index 000000000000..485a8a3f1015 --- /dev/null +++ b/packages/enhanced-img/src/index.js @@ -0,0 +1,94 @@ +import path from 'node:path'; +import process from 'node:process'; +import { imagetools } from 'vite-imagetools'; +import { image_plugin } from './vite-plugin.js'; + +/** + * @returns {import('vite').Plugin[]} + */ +export function enhancedImages() { + const imagetools_instance = imagetools_plugin(); + return !process.versions.webcontainer + ? [image_plugin(imagetools_instance), imagetools_instance] + : []; +} + +/** @type {Record} */ +const fallback = { + '.avif': 'png', + '.gif': 'gif', + '.heif': 'jpg', + '.jpeg': 'jpg', + '.jpg': 'jpg', + '.png': 'png', + '.tiff': 'jpg', + '.webp': 'png' +}; + +function imagetools_plugin() { + /** @type {Partial} */ + const imagetools_opts = { + defaultDirectives: async ({ pathname, searchParams: qs }, metadata) => { + if (!qs.has('enhanced')) return new URLSearchParams(); + + const img_width = qs.get('imgWidth'); + const width = img_width ? parseInt(img_width) : (await metadata()).width; + if (!width) { + console.warn(`Could not determine width of image ${pathname}`); + return new URLSearchParams(); + } + + const { widths, kind } = get_widths(width, qs.get('imgSizes')); + return new URLSearchParams({ + as: 'picture', + format: `avif;webp;${fallback[path.extname(pathname)] ?? 'png'}`, + w: widths.join(';'), + ...(kind === 'x' && !qs.has('w') && { basePixels: widths[0].toString() }) + }); + }, + namedExports: false + }; + + // TODO: should we make formats or sizes configurable besides just letting people override defaultDirectives? + // TODO: generate img rather than picture if only a single format is provided + // by resolving the directives for the URL in the preprocessor + return imagetools(imagetools_opts); +} + +/** + * @param {number} width + * @param {string | null} sizes + * @returns {{ widths: number[]; kind: 'w' | 'x' }} + */ +function get_widths(width, sizes) { + // We don't really know what the user wants here. But if they have an image that's really big + // then we can probably assume they're always displaying it full viewport/breakpoint. + // If the user is displaying a responsive image then the size usually doesn't change that much + // Instead, the number of columns in the design may reduce and the image may take a greater + // fraction of the screen. + // Assume if they're bothering to specify sizes that it's going to take most of the screen + // as that's the case where an image may be rendered at very different sizes. Otherwise, it's + // probably a responsive image and a single size is okay (two when accounting for HiDPI). + if (sizes) { + // Use common device sizes. Doesn't hurt to include larger sizes as the user will rarely + // provide an image that large. + // https://screensiz.es/ + // https://gs.statcounter.com/screen-resolution-stats (note: logical. we want physical) + // Include 1080 because lighthouse uses a moto g4 with 360 logical pixels and 3x pixel ratio. + const widths = [540, 768, 1080, 1366, 1536, 1920, 2560, 3000, 4096, 5120]; + widths.push(width); + return { widths, kind: 'w' }; + } + + // Don't need more than 2x resolution. Note that due to this optimization, pixel density + // descriptors will often end up being cheaper as many mobile devices have pixel density ratios + // near 3 which would cause larger images to be chosen on mobile when using sizes. + + // Most OLED screens that say they are 3x resolution, are actually 3x in the green color, but + // only 1.5x in the red and blue colors. Showing a 3x resolution image in the app vs a 2x + // resolution image will be visually the same, though the 3x image takes significantly more + // data. Even true 3x resolution screens are wasteful as the human eye cannot see that level of + // detail without something like a magnifying glass. + // https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html + return { widths: [Math.round(width / 2), width], kind: 'x' }; +} diff --git a/packages/enhanced-img/src/vite-plugin.js b/packages/enhanced-img/src/vite-plugin.js new file mode 100644 index 000000000000..cbfb7b3a1ca7 --- /dev/null +++ b/packages/enhanced-img/src/vite-plugin.js @@ -0,0 +1,394 @@ +/** @import { AST } from 'svelte/compiler' */ + +import { existsSync } from 'node:fs'; +import path from 'node:path'; +import { loadSvelteConfig } from '@sveltejs/vite-plugin-svelte'; +import MagicString from 'magic-string'; +import sharp from 'sharp'; +import { parse } from 'svelte-parse-markup'; +import { walk } from 'zimmerframe'; + +// TODO: expose this in vite-imagetools rather than duplicating it +const OPTIMIZABLE = /^[^?]+\.(avif|heif|gif|jpeg|jpg|png|tiff|webp)(\?.*)?$/; + +/** + * Creates the Svelte image plugin. + * @param {import('vite').Plugin} imagetools_plugin + * @returns {import('vite').Plugin} + */ +export function image_plugin(imagetools_plugin) { + // TODO: clear this map in dev mode to avoid memory leak + /** + * URL to image details + * @type {Map} + */ + const images = new Map(); + + /** @type {import('vite').ResolvedConfig} */ + let vite_config; + + /** @type {Partial} */ + let svelte_config; + + const name = 'vite-plugin-enhanced-img-markup'; + + return { + name, + enforce: 'pre', + async configResolved(config) { + vite_config = config; + for (const plugin of config.plugins || []) { + if (plugin.name === name) { + break; + } + if (plugin.name === 'vite-plugin-svelte') { + throw new Error( + '@sveltejs/enhanced-img must come before the Svelte or SvelteKit plugins' + ); + } + } + svelte_config = await loadSvelteConfig(); + if (!svelte_config) throw new Error('Could not load Svelte config file'); + }, + async transform(content, filename) { + const plugin_context = this; + const extensions = svelte_config?.extensions || ['.svelte']; + if (extensions.some((ext) => filename.endsWith(ext))) { + if (!content.includes(' __IMPORTED_ASSET_0__ + * @type {Map} + */ + const imports = new Map(); + + /** + * @param {import('svelte/compiler').AST.RegularElement} node + * @param {AST.Text | AST.ExpressionTag} src_attribute + * @returns {Promise} + */ + async function update_element(node, src_attribute) { + if (src_attribute.type === 'ExpressionTag') { + const start = + 'end' in src_attribute.expression + ? src_attribute.expression.end + : src_attribute.expression.range?.[0]; + const end = + 'start' in src_attribute.expression + ? src_attribute.expression.start + : src_attribute.expression.range?.[1]; + + if (typeof start !== 'number' || typeof end !== 'number') { + throw new Error('ExpressionTag has no range'); + } + const src_var_name = content.substring(start, end).trim(); + + s.update(node.start, node.end, dynamic_img_to_picture(content, node, src_var_name)); + return; + } + + const original_url = src_attribute.raw.trim(); + let url = original_url; + + if (OPTIMIZABLE.test(url)) { + const sizes = get_attr_value(node, 'sizes'); + const width = get_attr_value(node, 'width'); + url += url.includes('?') ? '&' : '?'; + if (sizes && 'raw' in sizes) { + url += 'imgSizes=' + encodeURIComponent(sizes.raw) + '&'; + } + if (width && 'raw' in width) { + url += 'imgWidth=' + encodeURIComponent(width.raw) + '&'; + } + url += 'enhanced'; + } + + // resolves the import so that we can build the entire picture template string and don't + // need any logic blocks + const resolved_id = (await plugin_context.resolve(url, filename))?.id; + if (!resolved_id) { + const query_index = url.indexOf('?'); + const file_path = query_index >= 0 ? url.substring(0, query_index) : url; + if (existsSync(path.resolve(vite_config.publicDir, file_path))) { + throw new Error( + `Could not locate ${file_path}. Please move it to be located relative to the page in the routes directory or reference it beginning with /static/. See https://vitejs.dev/guide/assets for more details on referencing assets.` + ); + } + throw new Error( + `Could not locate ${file_path}. See https://vitejs.dev/guide/assets for more details on referencing assets.` + ); + } + + if (OPTIMIZABLE.test(url)) { + let image = images.get(resolved_id); + if (!image) { + image = await process_id(resolved_id, plugin_context, imagetools_plugin); + images.set(resolved_id, image); + } + s.update(node.start, node.end, img_to_picture(content, node, image)); + } else { + const metadata = await sharp(resolved_id).metadata(); + // this must come after the await so that we don't hand off processing between getting + // the imports.size and incrementing the imports.size + const name = imports.get(original_url) || '__IMPORTED_ASSET_' + imports.size + '__'; + const new_markup = ``; + s.update(node.start, node.end, new_markup); + imports.set(original_url, name); + } + } + + /** + * @type {Array>} + */ + const pending_ast_updates = []; + + walk(/** @type {import('svelte/compiler').AST.TemplateNode} */ (ast), null, { + RegularElement(node, { next }) { + if ('name' in node && node.name === 'enhanced:img') { + // Compare node tag match + const src = get_attr_value(node, 'src'); + + if (!src || typeof src === 'boolean') return; + + pending_ast_updates.push(update_element(node, src)); + + return; + } + + next(); + } + }); + + await Promise.all(pending_ast_updates); + + // add imports + let text = ''; + if (imports.size) { + for (const [path, import_name] of imports.entries()) { + text += `\timport ${import_name} from "${path}";\n`; + } + } + + if (ast.instance) { + // @ts-ignore + s.appendLeft(ast.instance.content.start, text); + } else { + s.prepend(`\n`); + } + + if (ast.css) { + const css = content.substring(ast.css.start, ast.css.end); + const modified = css.replaceAll('enhanced\\:img', 'img'); + if (modified !== css) { + s.update(ast.css.start, ast.css.end, modified); + } + } + + return { + code: s.toString(), + map: s.generateMap() + }; + } + } + }; +} + +/** + * @param {string} resolved_id + * @param {import('vite').Rollup.PluginContext} plugin_context + * @param {import('vite').Plugin} imagetools_plugin + * @returns {Promise} + */ +async function process_id(resolved_id, plugin_context, imagetools_plugin) { + if (!imagetools_plugin.load) { + throw new Error('Invalid instance of vite-imagetools. Could not find load method.'); + } + const hook = imagetools_plugin.load; + const handler = typeof hook === 'object' ? hook.handler : hook; + const module_info = await handler.call(plugin_context, resolved_id); + if (!module_info) { + throw new Error(`Could not load ${resolved_id}`); + } + const code = typeof module_info === 'string' ? module_info : module_info.code; + return parse_object(code.replace('export default', '').replace(/;$/, '').trim()); +} + +/** + * @param {string} str + */ +export function parse_object(str) { + const updated = str + .replaceAll(/{(\n\s*)?/gm, '{"') + .replaceAll(':', '":') + .replaceAll(/,(\n\s*)?([^ ])/g, ',"$2'); + try { + return JSON.parse(updated); + } catch { + throw new Error(`Failed parsing string to object: ${str}`); + } +} + +/** + * @param {import('../types/internal.js').TemplateNode} node + * @param {string} attr + * @returns {AST.Text | AST.ExpressionTag | undefined} + */ +function get_attr_value(node, attr) { + if (!('type' in node) || !('attributes' in node)) return; + const attribute = node.attributes.find( + /** @param {any} v */ (v) => v.type === 'Attribute' && v.name === attr + ); + + if (!attribute || !('value' in attribute) || typeof attribute.value === 'boolean') return; + + // Check if value is an array and has at least one element + if (Array.isArray(attribute.value)) { + if (attribute.value.length > 0) return attribute.value[0]; + return; + } + + // If it's not an array or is empty, return the value as is + return attribute.value; +} + +/** + * @param {string} content + * @param {import('../types/internal.js').Attribute[]} attributes + * @param {{ + * src: string, + * width: string | number, + * height: string | number + * }} details + */ +function serialize_img_attributes(content, attributes, details) { + const attribute_strings = attributes.map((attribute) => { + if ('name' in attribute && attribute.name === 'src') { + return `src=${details.src}`; + } + return content.substring(attribute.start, attribute.end); + }); + + /** @type {number | undefined} */ + let user_width; + /** @type {number | undefined} */ + let user_height; + for (const attribute of attributes) { + if ('name' in attribute && 'value' in attribute) { + const value = Array.isArray(attribute.value) ? attribute.value[0] : attribute.value; + if (typeof value === 'object' && 'raw' in value) { + if (attribute.name === 'width') user_width = parseInt(value.raw); + if (attribute.name === 'height') user_height = parseInt(value.raw); + } + } + } + if (!user_width && !user_height) { + attribute_strings.push(`width=${details.width}`); + attribute_strings.push(`height=${details.height}`); + } else if (!user_width && user_height) { + attribute_strings.push( + `width=${Math.round( + (stringToNumber(details.width) * user_height) / stringToNumber(details.height) + )}` + ); + } else if (!user_height && user_width) { + attribute_strings.push( + `height=${Math.round( + (stringToNumber(details.height) * user_width) / stringToNumber(details.width) + )}` + ); + } + + return attribute_strings.join(' '); +} + +/** + * @param {string|number} param + */ +function stringToNumber(param) { + return typeof param === 'string' ? parseInt(param) : param; +} + +/** + * @param {string} content + * @param {import('svelte/compiler').AST.RegularElement} node + * @param {import('vite-imagetools').Picture} image + */ +function img_to_picture(content, node, image) { + /** @type {import('../types/internal.js').Attribute[]} attributes */ + const attributes = node.attributes; + const index = attributes.findIndex( + (attribute) => 'name' in attribute && attribute.name === 'sizes' + ); + let sizes_string = ''; + if (index >= 0) { + sizes_string = ' ' + content.substring(attributes[index].start, attributes[index].end); + attributes.splice(index, 1); + } + + let res = ''; + + for (const [format, srcset] of Object.entries(image.sources)) { + res += ``; + } + + res += ``; + + return (res += ''); +} + +/** + * @param {string} src + */ +function to_value(src) { + // __VITE_ASSET__ needs to be contained in double quotes to work with Vite asset plugin + return src.startsWith('__VITE_ASSET__') ? `{"${src}"}` : `"${src}"`; +} + +/** + * For images like `` + * @param {string} content + * @param {import('svelte/compiler').AST.RegularElement} node + * @param {string} src_var_name + */ +function dynamic_img_to_picture(content, node, src_var_name) { + const attributes = node.attributes; + const index = attributes.findIndex( + (attribute) => 'name' in attribute && attribute.name === 'sizes' + ); + let sizes_string = ''; + if (index >= 0) { + sizes_string = ' ' + content.substring(attributes[index].start, attributes[index].end); + attributes.splice(index, 1); + } + + const details = { + src: `{${src_var_name}.img.src}`, + width: `{${src_var_name}.img.w}`, + height: `{${src_var_name}.img.h}` + }; + + return `{#if typeof ${src_var_name} === 'string'} + +{:else} + + {#each Object.entries(${src_var_name}.sources) as [format, srcset]} + + {/each} + + +{/if}`; +} diff --git a/packages/enhanced-img/test/Input.svelte b/packages/enhanced-img/test/Input.svelte new file mode 100644 index 000000000000..35fd9c59901d --- /dev/null +++ b/packages/enhanced-img/test/Input.svelte @@ -0,0 +1,60 @@ + + +{foo} + +non-enhanced test + + + +
+ +
+ + + + + + + + + + + + (foo = 'clicked an image!')} + alt="event handler test" +/> + + + + + + + +{#each images as image} + +{/each} + +{#each images as _, i} + +{/each} + + + + + + diff --git a/packages/enhanced-img/test/Output.svelte b/packages/enhanced-img/test/Output.svelte new file mode 100644 index 000000000000..d8c18c1ad88f --- /dev/null +++ b/packages/enhanced-img/test/Output.svelte @@ -0,0 +1,81 @@ + + +{foo} + +non-enhanced test + +dev test + +
+ nested test +
+ +production test + +dimensions test + +directive test + +spread attributes test + +sizes test + + (foo = 'clicked an image!')} alt="event handler test" width=1440 height=1440 /> + +alias test + +absolute path test + +{#if typeof src === 'string'} + attribute shorthand test +{:else} + + {#each Object.entries(src.sources) as [format, srcset]} + + {/each} + attribute shorthand test + +{/if} + +{#each images as image} + {#if typeof image === 'string'} + opt-in test +{:else} + + {#each Object.entries(image.sources) as [format, srcset]} + + {/each} + opt-in test + +{/if} +{/each} + +{#each images as _, i} + {#if typeof get_image(i) === 'string'} + opt-in test +{:else} + + {#each Object.entries(get_image(i).sources) as [format, srcset]} + + {/each} + opt-in test + +{/if} +{/each} + + + + + + diff --git a/packages/enhanced-img/test/markup-plugin.spec.js b/packages/enhanced-img/test/markup-plugin.spec.js new file mode 100644 index 000000000000..f5f6b7c8eb46 --- /dev/null +++ b/packages/enhanced-img/test/markup-plugin.spec.js @@ -0,0 +1,71 @@ +import fs from 'node:fs/promises'; +import path from 'node:path'; +import { expect, it } from 'vitest'; +import { image_plugin, parse_object } from '../src/vite-plugin.js'; + +const resolve = /** @param {string} file */ (file) => path.resolve(__dirname, file); + +it('Image preprocess snapshot test', async () => { + const filename = 'Input.svelte'; + const vite_plugin = image_plugin({ + name: 'vite-imagetools-mock', + load(id) { + if (id.includes('dev')) { + return 'export default {sources:{avif:"/1 1440w, /2 960w",webp:"/3 1440w, /4 960w",png:"5 1440w, /6 960w"},img:{src:"/7",w:1440,h:1440}};'; + } else if (id.includes('prod')) { + return 'export default {sources:{avif:"__VITE_ASSET__2AM7_y_a__ 1440w, __VITE_ASSET__2AM7_y_b__ 960w",webp:"__VITE_ASSET__2AM7_y_c__ 1440w, __VITE_ASSET__2AM7_y_d__ 960w",png:"__VITE_ASSET__2AM7_y_e__ 1440w, __VITE_ASSET__2AM7_y_f__ 960w"},img:{src:"__VITE_ASSET__2AM7_y_g__",w:1440,h:1440}};'; + } + throw new Error(`unrecognized id ${id}`); + } + }); + const plugin_context = /** @type {import('vite').Rollup.TransformPluginContext} */ ( + /** @type {unknown} */ ({ + // @ts-ignore + resolve(url) { + return { id: url }; + } + }) + ); + const transform = + /** @type {(this: import('vite').Rollup.TransformPluginContext, code: string, id: string, options?: {ssr?: boolean;}) => Promise} */ ( + vite_plugin.transform + ); + const transformed = await transform.call( + plugin_context, + await fs.readFile(resolve(filename), { encoding: 'utf-8' }), + filename + ); + if (!transformed) throw new Error('transform unexpectedly returned no results'); + if (typeof transformed === 'string') throw new Error('transform did not return a sourcemap'); + if (!transformed.code) throw new Error('transform did not return any code'); + + // Make imports readable + const ouput = transformed.code.replace(/import/g, '\n\timport'); + + await expect(ouput).toMatchFileSnapshot('./Output.svelte'); +}); + +it('parses a minimized object', () => { + const parsed = parse_object( + '{sources:{avif:"/@imagetools/aa851ecbdef6d98bef38810ea9212d3d4cd9712c 1440w, /@imagetools/f5bc22df4071ea198fea2206d55b7bf5f5fc83e6 960w",webp:"/@imagetools/e8afd7da22a03ee0ae914cbfac6c714bded6daaf 1440w, /@imagetools/a5a1cd19d9fdd0754c3dc5122798c31ad3586041 960w",png:"/@imagetools/216a9a139bef55f2d6d70f91bcffe8584152136b 1440w, /@imagetools/e060ca6e665a6e50a24d00e3a7be2a7c96fdeb64 960w"},img:{src:"/@imagetools/216a9a139bef55f2d6d70f91bcffe8584152136b",w:1440,h:1440}}' + ); + expect(parsed).toBeDefined(); +}); + +it('parses a non-minimized object', () => { + const parsed = parse_object( + `{ + sources: { + avif: "__VITE_ASSET__f63692be__ 1440w, __VITE_ASSET__7c12aaf8__ 960w", + webp: "__VITE_ASSET__60e1d553__ 1440w, __VITE_ASSET__d0e3c982__ 960w", + png: "__VITE_ASSET__ac99f329__ 1440w, __VITE_ASSET__33d52b23__ 960w" + }, + img: { + src: "__VITE_ASSET__ac99f329__", + w: 1440, + h: 1440 + } + }` + ); + expect(parsed).toBeDefined(); +}); diff --git a/packages/enhanced-img/tsconfig.json b/packages/enhanced-img/tsconfig.json new file mode 100644 index 000000000000..0ff94d9e3f38 --- /dev/null +++ b/packages/enhanced-img/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "noEmit": true, + "strict": true, + "target": "es2022", + "module": "node16", + "moduleResolution": "node16", + "allowSyntheticDefaultImports": true, + "paths": { + "types": ["./types/index"], + "types/*": ["./types/*"] + }, + "noUnusedLocals": true, + "noUnusedParameters": true + }, + "include": ["src/**/*", "types/**/*", "test/**/*"] +} diff --git a/packages/enhanced-img/types/ambient.d.ts b/packages/enhanced-img/types/ambient.d.ts new file mode 100644 index 000000000000..0cba3c7958f1 --- /dev/null +++ b/packages/enhanced-img/types/ambient.d.ts @@ -0,0 +1,6 @@ +declare module '*?enhanced' { + import type { Picture } from 'vite-imagetools'; + + const value: Picture; + export default value; +} diff --git a/packages/enhanced-img/types/index.d.ts b/packages/enhanced-img/types/index.d.ts new file mode 100644 index 000000000000..5d287fc672d6 --- /dev/null +++ b/packages/enhanced-img/types/index.d.ts @@ -0,0 +1,15 @@ +import type { HTMLImgAttributes } from 'svelte/elements'; +import type { Plugin } from 'vite'; +import type { Picture } from 'vite-imagetools'; +import './ambient.js'; + +type EnhancedImgAttributes = Omit & { src: string | Picture }; + +// https://svelte.dev/docs/svelte/typescript#enhancing-built-in-dom-types +declare module 'svelte/elements' { + export interface SvelteHTMLElements { + 'enhanced:img': EnhancedImgAttributes; + } +} + +export function enhancedImages(): Promise; diff --git a/packages/enhanced-img/types/internal.d.ts b/packages/enhanced-img/types/internal.d.ts new file mode 100644 index 000000000000..814511d0ed6d --- /dev/null +++ b/packages/enhanced-img/types/internal.d.ts @@ -0,0 +1,34 @@ +import type { AST } from 'svelte/compiler'; + +type ElementLike = + | AST.Component + | AST.TitleElement + | AST.SlotElement + | AST.RegularElement + | AST.SvelteBody + | AST.SvelteComponent + | AST.SvelteDocument + | AST.SvelteElement + | AST.SvelteFragment + | AST.SvelteHead + | AST.SvelteOptionsRaw + | AST.SvelteSelf + | AST.SvelteWindow; + +type Tag = AST.ExpressionTag | AST.HtmlTag | AST.ConstTag | AST.DebugTag | AST.RenderTag; + +type Directive = + | AST.AnimateDirective + | AST.BindDirective + | AST.ClassDirective + | AST.LetDirective + | AST.OnDirective + | AST.StyleDirective + | AST.TransitionDirective + | AST.UseDirective; + +type Block = AST.EachBlock | AST.IfBlock | AST.AwaitBlock | AST.KeyBlock | AST.SnippetBlock; + +export type TemplateNode = AST.Text | Tag | ElementLike | AST.Comment | Block; + +export type Attribute = AST.Attribute | AST.SpreadAttribute | Directive; diff --git a/packages/kit/.gitignore b/packages/kit/.gitignore index 913a7f9a6583..c7b5684faca6 100644 --- a/packages/kit/.gitignore +++ b/packages/kit/.gitignore @@ -1,15 +1,13 @@ .DS_Store -/node_modules -/assets/* -/dist -/docs +/node_modules/ /test/**/build !/src/core/adapt/fixtures/*/.svelte-kit !/test/node_modules /test/apps/basics/test/errors.json -/types +/types/*.map .custom-out-dir # these are already ignored by the top level .gitignore -# repeating them here as a faux prettier ignore -.svelte-kit +# repeating them here as a faux .prettierignore +/.svelte-kit/ +/dist/ diff --git a/packages/kit/.prettierignore b/packages/kit/.prettierignore new file mode 100644 index 000000000000..e0904af006f2 --- /dev/null +++ b/packages/kit/.prettierignore @@ -0,0 +1,8 @@ +test/build-errors/apps/syntax-error/src/routes/+page.svelte +/types +src/runtime/components/svelte-5/layout.svelte +.svelte-kit +.custom-out-dir +build +test-results +/test/apps/basics/test/errors.json diff --git a/packages/kit/CHANGELOG-pre-1.md b/packages/kit/CHANGELOG-pre-1.md new file mode 100644 index 000000000000..4c2b4115e47b --- /dev/null +++ b/packages/kit/CHANGELOG-pre-1.md @@ -0,0 +1,4264 @@ +# Changelog for pre 1.0 versions + +## 1.0.0-next.589 + +### Patch Changes + +- breaking: remove warnings/errors about removed/changed APIs ([#8019](https://github.com/sveltejs/kit/pull/8019)) + +## 1.0.0-next.588 + +### Patch Changes + +- fix: remove obsolete generated types correctly ([#8149](https://github.com/sveltejs/kit/pull/8149)) + +## 1.0.0-next.587 + +### Patch Changes + +- breaking: prerender shells when ssr false and prerender not false ([#8131](https://github.com/sveltejs/kit/pull/8131)) + +## 1.0.0-next.586 + +### Patch Changes + +- fix: don't de/encode initial and explicit string headers ([#8113](https://github.com/sveltejs/kit/pull/8113)) + +## 1.0.0-next.585 + +### Patch Changes + +- fix: remove unused elements from default error component ([#8110](https://github.com/sveltejs/kit/pull/8110)) + +## 1.0.0-next.584 + +### Patch Changes + +- fix: load errorTemplate from correct location ([#8096](https://github.com/sveltejs/kit/pull/8096)) +- More robust manifest error recovery ([#8095](https://github.com/sveltejs/kit/pull/8095)) + +## 1.0.0-next.583 + +### Patch Changes + +- restart vite dev-server on svelte config change ([#8087](https://github.com/sveltejs/kit/pull/8087)) +- Set correct `$page.status` when using `enhance` and result is of type `'error'` ([#8073](https://github.com/sveltejs/kit/pull/8073)) +- fix: ensure export conditions are resolve through Vite ([#8092](https://github.com/sveltejs/kit/pull/8092)) +- fix: don't crash Vite dev server on manifest error ([#8093](https://github.com/sveltejs/kit/pull/8093)) + +## 1.0.0-next.582 + +### Patch Changes + +- fix: improve split between Vite plugins ([#8055](https://github.com/sveltejs/kit/pull/8055)) +- fix: set Vite base URL ([#8046](https://github.com/sveltejs/kit/pull/8046)) +- add declaration for vitePreprocess reexport ([#8053](https://github.com/sveltejs/kit/pull/8053)) + +## 1.0.0-next.581 + +### Patch Changes + +- feat: vitePreprocess ([#8036](https://github.com/sveltejs/kit/pull/8036)) + +## 1.0.0-next.580 + +### Patch Changes + +- breaking: throw an error on invalid load response ([#8003](https://github.com/sveltejs/kit/pull/8003)) +- fix: allow SvelteKit to be used without bundling ([#7950](https://github.com/sveltejs/kit/pull/7950)) + +## 1.0.0-next.579 + +### Patch Changes + +- breaking: update svelte peerDependency to ^3.54.0 ([#7543](https://github.com/sveltejs/kit/pull/7543)) +- update esbuild to ^0.16.3 ([#7543](https://github.com/sveltejs/kit/pull/7543)) +- breaking: upgrade to Vite 4 ([#7543](https://github.com/sveltejs/kit/pull/7543)) + +## 1.0.0-next.578 + +### Patch Changes + +- fix: respect fetch cache option ([#8024](https://github.com/sveltejs/kit/pull/8024)) +- breaking: rename invalid() to fail() and ValidationError to ActionFailure ([#8012](https://github.com/sveltejs/kit/pull/8012)) +- breaking: replace automatic fallback generation with `builder.generateFallback(fallback)` ([#8013](https://github.com/sveltejs/kit/pull/8013)) + +## 1.0.0-next.577 + +### Patch Changes + +- breaking: add embedded option, turned off by default ([#7969](https://github.com/sveltejs/kit/pull/7969)) + +## 1.0.0-next.576 + +### Patch Changes + +- breaking: make `sveltekit()` return a promise of array of Vite plugins ([#7994](https://github.com/sveltejs/kit/pull/7994)) + +## 1.0.0-next.575 + +### Patch Changes + +- fix: throw error when using enhance on GET forms ([#7948](https://github.com/sveltejs/kit/pull/7948)) +- breaking: strip `__data.json` from url ([#7979](https://github.com/sveltejs/kit/pull/7979)) + +## 1.0.0-next.574 + +### Patch Changes + +- feat: split Vite plugin in two ([#7990](https://github.com/sveltejs/kit/pull/7990)) + +## 1.0.0-next.573 + +### Patch Changes + +- fix: adjust ActionData type ([#7962](https://github.com/sveltejs/kit/pull/7962)) +- breaking: disallow unknown exports (except when starting with an underscore) from `+(layout|page)(.server)?.js` and `+server.js` files ([#7878](https://github.com/sveltejs/kit/pull/7878)) +- fix: continuous optionals should not throw conflict error ([#7939](https://github.com/sveltejs/kit/pull/7939)) +- fix `enhance` error message when form action doesn't exist or csrf is enabled ([#7958](https://github.com/sveltejs/kit/pull/7958)) + +## 1.0.0-next.572 + +### Minor Changes + +- Checks that element is not null before reading getAttribute ([#7930](https://github.com/sveltejs/kit/pull/7930)) + +### Patch Changes + +- chore: update `magic-string` ([#7931](https://github.com/sveltejs/kit/pull/7931)) +- add $app and $env to optimizeDeps.exclude so that libraries using these work correctly when prebundled ([#7933](https://github.com/sveltejs/kit/pull/7933)) +- reload dev page on change of app.html ([#7944](https://github.com/sveltejs/kit/pull/7944)) + +## 1.0.0-next.571 + +### Patch Changes + +- fix: use searchParams for x-sveltekit-invalidated ([#7912](https://github.com/sveltejs/kit/pull/7912)) +- fix: correct Vite config merging with force option ([#7911](https://github.com/sveltejs/kit/pull/7911)) +- fix: rebuild manifest when client hooks or param matcher file is added/removed ([#7915](https://github.com/sveltejs/kit/pull/7915)) + +## 1.0.0-next.570 + +### Patch Changes + +- Remove prepublishOnly script ([#7893](https://github.com/sveltejs/kit/pull/7893)) + +## 1.0.0-next.569 + +### Patch Changes + +- Ignore elements that are no longer in the document ([#7881](https://github.com/sveltejs/kit/pull/7881)) +- breaking: Use client-side routing for `
` ([#7828](https://github.com/sveltejs/kit/pull/7828)) + +## 1.0.0-next.568 + +### Patch Changes + +- fix: add migration hint for renamed methods ([#7874](https://github.com/sveltejs/kit/pull/7874)) + +## 1.0.0-next.567 + +### Patch Changes + +- Co-locate synthetic types with other Kit types ([#7864](https://github.com/sveltejs/kit/pull/7864)) + +## 1.0.0-next.566 + +### Patch Changes + +- Add more type documentation ([#7003](https://github.com/sveltejs/kit/pull/7003)) +- breaking: move SubmitFunction into @sveltejs/kit ([#7003](https://github.com/sveltejs/kit/pull/7003)) + +## 1.0.0-next.565 + +### Patch Changes + +- breaking: Replace `data-sveltekit-prefetch` with `-preload-code` and `-preload-data` ([#7776](https://github.com/sveltejs/kit/pull/7776)) +- breaking: Rename `prefetch` to `preloadData` and `prefetchRoutes` to `preloadCode` ([#7776](https://github.com/sveltejs/kit/pull/7776)) + +## 1.0.0-next.564 + +### Patch Changes + +- chore: upgrade undici ([#7830](https://github.com/sveltejs/kit/pull/7830)) +- Make `$page.url` resilient against mutations ([#7827](https://github.com/sveltejs/kit/pull/7827)) + +## 1.0.0-next.563 + +### Patch Changes + +- feat: allow handleError to return a promise ([#7780](https://github.com/sveltejs/kit/pull/7780)) +- breaking: remove `format` option from `generateManifest(...)` ([#7820](https://github.com/sveltejs/kit/pull/7820)) + +## 1.0.0-next.562 + +### Patch Changes + +- fix: handle redirects in handle hook while processing data request ([#7797](https://github.com/sveltejs/kit/pull/7797)) +- Make touchstart listener passive ([#7818](https://github.com/sveltejs/kit/pull/7818)) +- breaking: remove `getStaticDirectory()` from builder API ([#7809](https://github.com/sveltejs/kit/pull/7809)) +- Make console.warn wrapper named rather than anonymous ([#7811](https://github.com/sveltejs/kit/pull/7811)) + +## 1.0.0-next.561 + +### Patch Changes + +- Upgrade vite-plugin-svelte to ^1.3.1 ([#7760](https://github.com/sveltejs/kit/pull/7760)) + +## 1.0.0-next.560 + +### Patch Changes + +- breaking: Rename `prerendering` to `building`, remove `config.kit.prerender.enabled` ([#7762](https://github.com/sveltejs/kit/pull/7762)) + +## 1.0.0-next.559 + +### Patch Changes + +- Roll over non-matching optional parameters instead of 404ing ([#7753](https://github.com/sveltejs/kit/pull/7753)) +- fix: enable Vite's modulePreload.polyfill ([#7770](https://github.com/sveltejs/kit/pull/7770)) + +## 1.0.0-next.558 + +### Patch Changes + +- breaking: Disallow error status codes outside 400-599 ([#7767](https://github.com/sveltejs/kit/pull/7767)) +- breaking: Make client-side router ignore links outside %sveltekit.body% ([#7766](https://github.com/sveltejs/kit/pull/7766)) + +## 1.0.0-next.557 + +### Patch Changes + +- external fetch calls: ensure serialized cookie values are url-encoded [#7736] ([#7736](https://github.com/sveltejs/kit/pull/7736)) + +## 1.0.0-next.556 + +### Patch Changes + +- fix: preserve Vite CLI opts ([#7749](https://github.com/sveltejs/kit/pull/7749)) + +## 1.0.0-next.555 + +### Patch Changes + +- Made `config.kit.outDir` able to be located in `node_modules` ([#7707](https://github.com/sveltejs/kit/pull/7707)) + +## 1.0.0-next.554 + +### Patch Changes + +- create stronger types for dynamically generated env modules ([#7735](https://github.com/sveltejs/kit/pull/7735)) +- breaking: Make `trailingSlash` a page option, rather than configuration ([#7719](https://github.com/sveltejs/kit/pull/7719)) +- Handle hash links with non-ASCII characters when prerendering ([#7729](https://github.com/sveltejs/kit/pull/7729)) +- Ignore popstate events from outside the router ([#7721](https://github.com/sveltejs/kit/pull/7721)) + +## 1.0.0-next.553 + +### Patch Changes + +- Prevent Vite from nuking logs on startup ([#7724](https://github.com/sveltejs/kit/pull/7724)) + +## 1.0.0-next.552 + +### Patch Changes + +- Don't hardcode version in client bundle ([#7694](https://github.com/sveltejs/kit/pull/7694)) +- Allow .d.ts files to have a + prefix ([#7682](https://github.com/sveltejs/kit/pull/7682)) +- Expose version from `$app/environment` ([#7689](https://github.com/sveltejs/kit/pull/7689)) +- fix: export HttpError/Redirect interface ([#7701](https://github.com/sveltejs/kit/pull/7701)) +- fix: don't preload fonts by default ([#7704](https://github.com/sveltejs/kit/pull/7704)) +- Always set `Accept` and `Accept-Language` headers when making a self-request ([#7722](https://github.com/sveltejs/kit/pull/7722)) +- fix: adjust interfaces to fix type errors ([#7718](https://github.com/sveltejs/kit/pull/7718)) + +## 1.0.0-next.551 + +### Patch Changes + +- Add `Access-Control-Allow-Origin: *` to static assets in dev ([#7688](https://github.com/sveltejs/kit/pull/7688)) +- Ignore presence of `keepfocus` and `noscroll` in `goto` options if correctly-cased options are also present ([#7678](https://github.com/sveltejs/kit/pull/7678)) + +## 1.0.0-next.550 + +### Patch Changes + +- feat: preload fonts and add preload customization ([#4963](https://github.com/sveltejs/kit/pull/4963)) + +## 1.0.0-next.549 + +### Patch Changes + +- Always apply Node polyfills ([#7675](https://github.com/sveltejs/kit/pull/7675)) + +## 1.0.0-next.548 + +### Patch Changes + +- Only apply polyfills where necessary ([#7668](https://github.com/sveltejs/kit/pull/7668)) + +## 1.0.0-next.547 + +### Patch Changes + +- fix: safely join url segments in manifest ([#7653](https://github.com/sveltejs/kit/pull/7653)) +- breaking: use devalue to (de)serialize action data ([#7494](https://github.com/sveltejs/kit/pull/7494)) +- Warn if `%sveltekit.body%` is direct child of `` ([#7652](https://github.com/sveltejs/kit/pull/7652)) + +## 1.0.0-next.546 + +### Patch Changes + +- fix outdated config error ([#7649](https://github.com/sveltejs/kit/pull/7649)) +- breaking: use hex/unicode escape sequences for encoding special characters in route directory names ([#7644](https://github.com/sveltejs/kit/pull/7644)) +- fix `beforeNavigate` description — `routeId` -> `route.id` ([#7643](https://github.com/sveltejs/kit/pull/7643)) + +## 1.0.0-next.545 + +### Patch Changes + +- fix: prerendering path and layout fixes ([#7639](https://github.com/sveltejs/kit/pull/7639)) +- fix: add Promise return type to the `enhance` action ([#7629](https://github.com/sveltejs/kit/pull/7629)) + +## 1.0.0-next.544 + +### Patch Changes + +- breaking: narrow down possible status codes for redirects to 300-308 ([#7615](https://github.com/sveltejs/kit/pull/7615)) +- feat: add fallback component for layouts without one ([#7619](https://github.com/sveltejs/kit/pull/7619)) + +## 1.0.0-next.543 + +### Patch Changes + +- Don't print search params error when prerendering fallback page ([#7598](https://github.com/sveltejs/kit/pull/7598)) +- allow async function for `enhance` action parameter ([#7608](https://github.com/sveltejs/kit/pull/7608)) +- Run service worker during development ([#7597](https://github.com/sveltejs/kit/pull/7597)) +- feat: support throwing redirect in handle ([#7612](https://github.com/sveltejs/kit/pull/7612)) +- Workaround for the DOM clobbering for use:enhance ([#7599](https://github.com/sveltejs/kit/pull/7599)) +- fix: don't cache prefetch errors ([#7610](https://github.com/sveltejs/kit/pull/7610)) + +## 1.0.0-next.542 + +### Patch Changes + +- Add support for linking to tags ([#7596](https://github.com/sveltejs/kit/pull/7596)) +- breaking: don't run beforeNavigate during redirects ([#7588](https://github.com/sveltejs/kit/pull/7588)) +- fix: respect autofocus following navigation or enhanced form submit ([#6643](https://github.com/sveltejs/kit/pull/6643)) + +## 1.0.0-next.541 + +### Minor Changes + +- fix: don't clean build and output directories when using `--watch` ([#7516](https://github.com/sveltejs/kit/pull/7516)) + +### Patch Changes + +- fix: handle expected errors thrown in handle hook correctly ([#7566](https://github.com/sveltejs/kit/pull/7566)) + +## 1.0.0-next.540 + +### Patch Changes + +- Serve prerendered non-page files when running preview ([#7576](https://github.com/sveltejs/kit/pull/7576)) +- fix: caching takes now into account the body payload ([#7546](https://github.com/sveltejs/kit/pull/7546)) +- fix: handle locked readable stream when reading body ([#7565](https://github.com/sveltejs/kit/pull/7565)) +- fix: prefetch should ignore links ignored by the router ([#7580](https://github.com/sveltejs/kit/pull/7580)) +- fix: migration error when using $page.routeId ([#7574](https://github.com/sveltejs/kit/pull/7574)) +- prevent loading of illegal modules in the browser, rather than during SSR ([#7507](https://github.com/sveltejs/kit/pull/7507)) +- fix: prevent double decoding of path segment ([#7550](https://github.com/sveltejs/kit/pull/7550)) + +## 1.0.0-next.539 + +### Patch Changes + +- Omit prerendered routes from server manifest ([#7541](https://github.com/sveltejs/kit/pull/7541)) + +## 1.0.0-next.538 + +### Patch Changes + +- feat: enable caching for `__data.json` requests ([#7532](https://github.com/sveltejs/kit/pull/7532)) +- fix: prevent double decoding of params ([#7521](https://github.com/sveltejs/kit/pull/7521)) +- fix: take into account Request input when serializing fetch data ([#7531](https://github.com/sveltejs/kit/pull/7531)) +- fix: better cookie warning checks ([#7528](https://github.com/sveltejs/kit/pull/7528)) + +## 1.0.0-next.537 + +### Patch Changes + +- feat: better navigation interfaces ([#7529](https://github.com/sveltejs/kit/pull/7529)) + +## 1.0.0-next.536 + +### Patch Changes + +- custom aliases resolved in service worker builds ([#7500](https://github.com/sveltejs/kit/pull/7500)) + +## 1.0.0-next.535 + +### Patch Changes + +- breaking: call beforeNavigate once with type unload on external navigation, rename type 'load' to 'enter' and type 'unload' to 'leave', add 'willUnload' property ([#6813](https://github.com/sveltejs/kit/pull/6813)) + +## 1.0.0-next.534 + +### Patch Changes + +- breaking: more consistent casing for goto options ([#7502](https://github.com/sveltejs/kit/pull/7502)) +- breaking: replace routeId with route.id ([#7450](https://github.com/sveltejs/kit/pull/7450)) +- Fix nullish data node reference ([#7503](https://github.com/sveltejs/kit/pull/7503)) + +## 1.0.0-next.533 + +### Patch Changes + +- fix: bump required Vite version and address warning ([#7491](https://github.com/sveltejs/kit/pull/7491)) + +## 1.0.0-next.532 + +### Patch Changes + +- Bump devalue version ([#7466](https://github.com/sveltejs/kit/pull/7466)) + +## 1.0.0-next.531 + +### Patch Changes + +- breaking: change `config.kit.prerender.onError` to `handleHttpError`, and check for invalid fragment links ([#7375](https://github.com/sveltejs/kit/pull/7375)) +- fix escaping bug in crawler ([#7375](https://github.com/sveltejs/kit/pull/7375)) + +## 1.0.0-next.530 + +### Patch Changes + +- fix: fetch erroring on Cloudflare ([#7453](https://github.com/sveltejs/kit/pull/7453)) +- Only simulate CORS errors for shared load functions ([#7454](https://github.com/sveltejs/kit/pull/7454)) + +## 1.0.0-next.529 + +### Patch Changes + +- fix: better type generation for load functions with different return values ([#7425](https://github.com/sveltejs/kit/pull/7425)) +- fix: correctly strip data suffix at root page ([#7445](https://github.com/sveltejs/kit/pull/7445)) +- update dependencies ([#7355](https://github.com/sveltejs/kit/pull/7355)) + +## 1.0.0-next.528 + +### Patch Changes + +- Restore `req.url` to `req.originalUrl` in dev and preview ([#7343](https://github.com/sveltejs/kit/pull/7343)) + +## 1.0.0-next.527 + +### Patch Changes + +- fix: harmonize cookie path and add dev time warnings ([#7416](https://github.com/sveltejs/kit/pull/7416)) +- feat: add invalidateAll option to goto ([#7407](https://github.com/sveltejs/kit/pull/7407)) + +## 1.0.0-next.526 + +### Patch Changes + +- declare function type with named syntax ([#7396](https://github.com/sveltejs/kit/pull/7396)) +- fix: optional params can be undefined ([#7379](https://github.com/sveltejs/kit/pull/7379)) +- fix: support undici 5.12.0 and pin it ([#7412](https://github.com/sveltejs/kit/pull/7412)) +- chore: upgrade to vite-plugin-svelte 1.1.0 and enable prebundleSvelteLibraries ([#7388](https://github.com/sveltejs/kit/pull/7388)) +- Show more descriptive error if data returned from `load` is a non-POJO ([#7386](https://github.com/sveltejs/kit/pull/7386)) + +## 1.0.0-next.525 + +### Patch Changes + +- Always avoid caching form submission on enhanced forms ([#7350](https://github.com/sveltejs/kit/pull/7350)) + +## 1.0.0-next.524 + +### Patch Changes + +- fix: get type gen working again ([#7370](https://github.com/sveltejs/kit/pull/7370)) +- fix: don't run matchers for empty optional params ([#7346](https://github.com/sveltejs/kit/pull/7346)) + +## 1.0.0-next.523 + +### Patch Changes + +- fix: split route ids into correct segments ([#7367](https://github.com/sveltejs/kit/pull/7367)) + +## 1.0.0-next.522 + +### Patch Changes + +- docs: rewrite load docs ([#7174](https://github.com/sveltejs/kit/pull/7174)) +- breaking: Prefix all route IDs with / ([#7338](https://github.com/sveltejs/kit/pull/7338)) + +## 1.0.0-next.521 + +### Patch Changes + +- feat: add reset option to update method of enhance ([#7326](https://github.com/sveltejs/kit/pull/7326)) +- breaking: remove global fetch override when prerendering ([#7318](https://github.com/sveltejs/kit/pull/7318)) +- Improve error message when prefetching fails ([#7314](https://github.com/sveltejs/kit/pull/7314)) + +## 1.0.0-next.520 + +### Patch Changes + +- fix: ensure serialized headers check is always applied ([#7221](https://github.com/sveltejs/kit/pull/7221)) + +## 1.0.0-next.519 + +### Patch Changes + +- breaking: throw error when routes conflict ([#7051](https://github.com/sveltejs/kit/pull/7051)) +- feat: implement optional route params ([#7051](https://github.com/sveltejs/kit/pull/7051)) + +## 1.0.0-next.518 + +### Patch Changes + +- Enable removal of non-browser code from client builds ([#7296](https://github.com/sveltejs/kit/pull/7296)) +- feat: more info about prerendering errors, add strict option to adapter-static ([#7264](https://github.com/sveltejs/kit/pull/7264)) + +## 1.0.0-next.517 + +### Patch Changes + +- fix: more informative serialization error messages ([#7303](https://github.com/sveltejs/kit/pull/7303)) +- fix: add `$types` to includes for better DX ([#7301](https://github.com/sveltejs/kit/pull/7301)) + +## 1.0.0-next.516 + +### Patch Changes + +- fix: better navigation protocol check ([#7067](https://github.com/sveltejs/kit/pull/7067)) +- fix: forward cookie headers on etag response ([#7256](https://github.com/sveltejs/kit/pull/7256)) +- Properly resolve absolute paths to relative on server build ([#7252](https://github.com/sveltejs/kit/pull/7252)) + +## 1.0.0-next.515 + +### Patch Changes + +- Account for relative path to routes in `config.kit.files.routes` ([#7223](https://github.com/sveltejs/kit/pull/7223)) +- Use config.kit.paths.base prefix for static assets ([#4448](https://github.com/sveltejs/kit/pull/4448)) + +## 1.0.0-next.514 + +### Patch Changes + +- add helpful error message for `throw invalid()` in form actions ([#7225](https://github.com/sveltejs/kit/pull/7225)) + +## 1.0.0-next.513 + +### Patch Changes + +- Transfer server data as devalue-encoded JSON ([#7177](https://github.com/sveltejs/kit/pull/7177)) +- fix: remove groups from segments for adapters ([#7222](https://github.com/sveltejs/kit/pull/7222)) + +## 1.0.0-next.512 + +### Patch Changes + +- Fix parsing content-type header for actions ([#7195](https://github.com/sveltejs/kit/pull/7195)) +- fix: reset form in use:enhance after successful submit ([#7207](https://github.com/sveltejs/kit/pull/7207)) +- fix: auto-update commented PageError ([#7189](https://github.com/sveltejs/kit/pull/7189)) + +## 1.0.0-next.511 + +### Patch Changes + +- perf: render head links before other content ([#7160](https://github.com/sveltejs/kit/pull/7160)) + +## 1.0.0-next.510 + +### Patch Changes + +- Add `fetch` to `RequestEvent` ([#7113](https://github.com/sveltejs/kit/pull/7113)) + +## 1.0.0-next.509 + +### Patch Changes + +- Apply define config to service worker ([#7140](https://github.com/sveltejs/kit/pull/7140)) +- chore: Skip removing HTTP/2 pseudo-headers, which is no longer necessary with undici ([#7142](https://github.com/sveltejs/kit/pull/7142)) +- bump devalue to version 4 ([#7147](https://github.com/sveltejs/kit/pull/7147)) + +## 1.0.0-next.508 + +### Patch Changes + +- chore: Upgrade undici so that we can use its multipart form data parsing instead of node-fetch's ([#7131](https://github.com/sveltejs/kit/pull/7131)) + +## 1.0.0-next.507 + +### Patch Changes + +- Allow TypedArray request bodies in `fetch` in `load` ([#7065](https://github.com/sveltejs/kit/pull/7065)) +- Use `FormData` polyfill from `undici` rather than `node-fetch` ([#7065](https://github.com/sveltejs/kit/pull/7065)) + +## 1.0.0-next.506 + +### Patch Changes + +- Default to insecure cookies when serving on http://localhost ([#7090](https://github.com/sveltejs/kit/pull/7090)) +- docs: explain ramifications of base path ([#7095](https://github.com/sveltejs/kit/pull/7095)) +- fix: decode routeIds in headers for prerendering ([#7097](https://github.com/sveltejs/kit/pull/7097)) +- feat: provide `update` to `use:enhance` callback ([#7083](https://github.com/sveltejs/kit/pull/7083)) + +## 1.0.0-next.505 + +### Patch Changes + +- fix: handle form action returning nothing; handle page.(server).js without load functions ([#7050](https://github.com/sveltejs/kit/pull/7050)) +- fix: add `RequestEvent` to `$types` when `+layout.server.js` present ([#7063](https://github.com/sveltejs/kit/pull/7063)) + +## 1.0.0-next.504 + +### Patch Changes + +- Add the submitter value with name to formData for use:enhance ([#7012](https://github.com/sveltejs/kit/pull/7012)) + +## 1.0.0-next.503 + +### Patch Changes + +- Added form property to \$page store ([#6986](https://github.com/sveltejs/kit/pull/6986)) +- Throw an error if prerenderable routes are not prerendered ([#6974](https://github.com/sveltejs/kit/pull/6974)) + +## 1.0.0-next.502 + +### Patch Changes + +- fix: prevent data types from becoming type `never`, notice moved/deleted files ([#7002](https://github.com/sveltejs/kit/pull/7002)) +- Allow ActionData to be undefined ([#6994](https://github.com/sveltejs/kit/pull/6994)) +- Respect `config.kit.env.dir` when running `vite preview` ([#7001](https://github.com/sveltejs/kit/pull/7001)) +- Only run postinstall script if package.json exists ([#6998](https://github.com/sveltejs/kit/pull/6998)) +- Use custom x-sveltekit-action header to route enhanced form submissions to +page.server.js over +server.js ([#6997](https://github.com/sveltejs/kit/pull/6997)) + +## 1.0.0-next.501 + +### Patch Changes + +- fix: unwrap promises for load function data on the client ([#6972](https://github.com/sveltejs/kit/pull/6972)) + +## 1.0.0-next.500 + +### Patch Changes + +- Allow prerendered pages to link to non-prerenderable endpoints ([#6977](https://github.com/sveltejs/kit/pull/6977)) +- fix: handle SPA root data loading error ([#6918](https://github.com/sveltejs/kit/pull/6918)) + +## 1.0.0-next.499 + +### Patch Changes + +- breaking: rename App.PageError to App.Error ([#6963](https://github.com/sveltejs/kit/pull/6963)) + +## 1.0.0-next.498 + +### Patch Changes + +- chdir before attempting postinstall ([#6969](https://github.com/sveltejs/kit/pull/6969)) + +## 1.0.0-next.497 + +### Patch Changes + +- Add origin header for non-GET and external requests made with server-side fetch ([#6901](https://github.com/sveltejs/kit/pull/6901)) + +## 1.0.0-next.496 + +### Patch Changes + +- fix: update page status when applying action ([#6942](https://github.com/sveltejs/kit/pull/6942)) +- fix: apply redirect/error logic for `use:enhance` ([#6828](https://github.com/sveltejs/kit/pull/6828)) + +## 1.0.0-next.495 + +### Patch Changes + +- Run `svelte-kit sync` in all workspace directories during postinstall ([#6949](https://github.com/sveltejs/kit/pull/6949)) + +## 1.0.0-next.494 + +### Patch Changes + +- Fix fetch type ([#6955](https://github.com/sveltejs/kit/pull/6955)) +- Add csp wasm-unsafe-eval keyword ([#6958](https://github.com/sveltejs/kit/pull/6958)) +- Register service worker with relative URL ([#6954](https://github.com/sveltejs/kit/pull/6954)) + +## 1.0.0-next.493 + +### Patch Changes + +- fix: allow missing routes folder ([#6944](https://github.com/sveltejs/kit/pull/6944)) +- Only forward set-cookie headers for internal fetches ([#6923](https://github.com/sveltejs/kit/pull/6923)) + +## 1.0.0-next.492 + +### Patch Changes + +- fix: add missing depends function to ServerLoadEvent type ([#6935](https://github.com/sveltejs/kit/pull/6935)) +- Redact error message if `getRequest` fails ([#6936](https://github.com/sveltejs/kit/pull/6936)) +- Add cookies.serialize method ([#6925](https://github.com/sveltejs/kit/pull/6925)) +- Always apply cookies, not just for matched routes ([#6925](https://github.com/sveltejs/kit/pull/6925)) +- fix: tighten up navigation and invalidation logic ([#6924](https://github.com/sveltejs/kit/pull/6924)) +- Respond with 413 if request body is too large ([#6936](https://github.com/sveltejs/kit/pull/6936)) + +## 1.0.0-next.491 + +### Patch Changes + +- fix: symlink routes ([#6796](https://github.com/sveltejs/kit/pull/6796)) + +## 1.0.0-next.490 + +### Patch Changes + +- fix `write_types` on windows using posixify() ([#6913](https://github.com/sveltejs/kit/pull/6913)) +- Prevent caching of `__data.js` files ([#6904](https://github.com/sveltejs/kit/pull/6904)) +- Make url property getters non-enumerable ([#6909](https://github.com/sveltejs/kit/pull/6909)) + +## 1.0.0-next.489 + +### Patch Changes + +- fix: tighten up handling and documentation around 404 ([#6897](https://github.com/sveltejs/kit/pull/6897)) + +## 1.0.0-next.488 + +### Patch Changes + +- Decode HTML entities in `href` attributes when crawling ([#6891](https://github.com/sveltejs/kit/pull/6891)) + +## 1.0.0-next.487 + +### Patch Changes + +- feat: allow +server.js files next to +page files ([#6773](https://github.com/sveltejs/kit/pull/6773)) + +## 1.0.0-next.486 + +### Patch Changes + +- fix: handle jsdoc without tags while generating proxy types ([#6884](https://github.com/sveltejs/kit/pull/6884)) + +## 1.0.0-next.485 + +### Patch Changes + +- fix to ActionData type generation ([#6869](https://github.com/sveltejs/kit/pull/6869)) +- The return type of cookies.get is string|undefined #6865 ([#6867](https://github.com/sveltejs/kit/pull/6867)) + +## 1.0.0-next.484 + +### Patch Changes + +- fix: forward cookies from fetch on redirect response ([#6833](https://github.com/sveltejs/kit/pull/6833)) +- adding missing `@types/cookie` dependency ([#6818](https://github.com/sveltejs/kit/pull/6818)) +- fix `write_types` on windows ([#6843](https://github.com/sveltejs/kit/pull/6843)) + +## 1.0.0-next.483 + +### Patch Changes + +- fix: various `cookies` fixes and improvements ([#6811](https://github.com/sveltejs/kit/pull/6811)) + +## 1.0.0-next.482 + +### Patch Changes + +- fix: ActionData type ([#6748](https://github.com/sveltejs/kit/pull/6748)) +- fix: reuse server data while not reusing client load ([#6778](https://github.com/sveltejs/kit/pull/6778)) +- fix: update current.url on hashchange ([#6802](https://github.com/sveltejs/kit/pull/6802)) +- Change illegal import message to reference public-facing code rather than client-side code ([#6646](https://github.com/sveltejs/kit/pull/6646)) +- fix: silence prop warnings ([#6798](https://github.com/sveltejs/kit/pull/6798)) +- chore: Refactor graph analysis for better unit tests ([#6727](https://github.com/sveltejs/kit/pull/6727)) +- fix: error when using `paths.base` and `import` assets ([#6769](https://github.com/sveltejs/kit/pull/6769)) + +## 1.0.0-next.481 + +### Patch Changes + +- fix: docs links in generated and published types ([#6741](https://github.com/sveltejs/kit/pull/6741)) + +## 1.0.0-next.480 + +### Patch Changes + +- breaking: make action passed to enhance function a URL instead of a string ([#6678](https://github.com/sveltejs/kit/pull/6678)) + +## 1.0.0-next.479 + +### Patch Changes + +- breaking: request creation cleanup ([#6681](https://github.com/sveltejs/kit/pull/6681)) +- breaking: limit adapter-node request size ([#6684](https://github.com/sveltejs/kit/pull/6684)) + +## 1.0.0-next.478 + +### Patch Changes + +- breaking: hooks file renames; error shape defined through handleError ([#6675](https://github.com/sveltejs/kit/pull/6675)) +- breaking: remove element property; enhance can only be used on form elements ([#6662](https://github.com/sveltejs/kit/pull/6662)) + +## 1.0.0-next.477 + +### Patch Changes + +- breaking: prevent import of `$lib/server` modules in client-facing code ([#6623](https://github.com/sveltejs/kit/pull/6623)) +- breaking: change sveltekit.message to sveltekit.error.message ([#6659](https://github.com/sveltejs/kit/pull/6659)) +- breaking: apply 304 logic after handle, so handle receives original response from resolve ([#6639](https://github.com/sveltejs/kit/pull/6639)) + +## 1.0.0-next.476 + +### Patch Changes + +- breaking: change use:enhance signature to support ` - + add {/if} diff --git a/packages/kit/test/apps/basics/src/routes/keepfocus/+page.svelte b/packages/kit/test/apps/basics/src/routes/keepfocus/+page.svelte index 94b7cd939cc2..4eac347e3217 100644 --- a/packages/kit/test/apps/basics/src/routes/keepfocus/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/keepfocus/+page.svelte @@ -1,12 +1,12 @@ { goto('?foo=' + e.currentTarget?.value, { keepFocus: true }); }} diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/+page.svelte index da9d1efb73e6..b9080af1f26c 100644 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/+page.svelte @@ -11,5 +11,5 @@ } -

Count is {data.count}

+

Count is {data.count}

diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/count/+server.js b/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/count/+server.js index 999b7fd7cd0a..49c2e014b003 100644 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/count/+server.js +++ b/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/count/+server.js @@ -1,8 +1,10 @@ import { json } from '@sveltejs/kit'; -import { count } from '../state.js'; -export function GET({ setHeaders }) { +export function GET({ setHeaders, cookies }) { setHeaders({ 'cache-control': 'public, max-age=4', age: '2' }); + + const count = +(cookies.get('cache-control-bust-count') ?? 0); + return json({ count }); } diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/increment/+server.js b/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/increment/+server.js index 1ddf1e429013..2e30bdd1d9a4 100644 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/increment/+server.js +++ b/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/increment/+server.js @@ -1,7 +1,11 @@ import { json } from '@sveltejs/kit'; -import { increment } from '../state.js'; -export function GET() { - increment(); +export function GET({ cookies }) { + cookies.set( + 'cache-control-bust-count', + +(cookies.get('cache-control-bust-count') ?? 0) + 1 + '', + { path: '/' } + ); + return json({}); } diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/state.js b/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/state.js deleted file mode 100644 index ba1431d4079a..000000000000 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/bust/state.js +++ /dev/null @@ -1,9 +0,0 @@ -export let count = 0; - -export function increment() { - return count++; -} - -export function reset() { - count = 0; -} diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/default/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/cache-control/default/+page.svelte index 3d51fd478570..ecd93c6ab44d 100644 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/default/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/cache-control/default/+page.svelte @@ -4,11 +4,14 @@ /** @type {import('./$types').PageData} */ export let data; + let ticker = 0; async function update() { + ticker += 1; await fetch('/load/cache-control/default/increment'); - invalidate('/load/cache-control/default/count'); + await invalidate('/load/cache-control/default/count'); + ticker += 1; } -

Count is {data.count}

- +

Count is {data.count}

+ diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/default/count/+server.js b/packages/kit/test/apps/basics/src/routes/load/cache-control/default/count/+server.js index 999b7fd7cd0a..8579f6fc1ca7 100644 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/default/count/+server.js +++ b/packages/kit/test/apps/basics/src/routes/load/cache-control/default/count/+server.js @@ -1,8 +1,10 @@ import { json } from '@sveltejs/kit'; -import { count } from '../state.js'; -export function GET({ setHeaders }) { +export function GET({ setHeaders, cookies }) { setHeaders({ 'cache-control': 'public, max-age=4', age: '2' }); + + const count = +(cookies.get('cache-control-default-count') ?? 0); + return json({ count }); } diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/default/increment/+server.js b/packages/kit/test/apps/basics/src/routes/load/cache-control/default/increment/+server.js index 1ddf1e429013..0cd89b430a60 100644 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/default/increment/+server.js +++ b/packages/kit/test/apps/basics/src/routes/load/cache-control/default/increment/+server.js @@ -1,7 +1,11 @@ import { json } from '@sveltejs/kit'; -import { increment } from '../state.js'; -export function GET() { - increment(); +export function GET({ cookies }) { + cookies.set( + 'cache-control-default-count', + +(cookies.get('cache-control-default-count') ?? 0) + 1 + '', + { path: '/' } + ); + return json({}); } diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/default/state.js b/packages/kit/test/apps/basics/src/routes/load/cache-control/default/state.js deleted file mode 100644 index ba1431d4079a..000000000000 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/default/state.js +++ /dev/null @@ -1,9 +0,0 @@ -export let count = 0; - -export function increment() { - return count++; -} - -export function reset() { - count = 0; -} diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/force/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/cache-control/force/+page.svelte index 1b03361eada3..f8b23481af7e 100644 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/force/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/cache-control/force/+page.svelte @@ -10,5 +10,5 @@ } -

Count is {data.count}

+

Count is {data.count}

diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/force/count/+server.js b/packages/kit/test/apps/basics/src/routes/load/cache-control/force/count/+server.js index 999b7fd7cd0a..b321b0650907 100644 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/force/count/+server.js +++ b/packages/kit/test/apps/basics/src/routes/load/cache-control/force/count/+server.js @@ -1,8 +1,10 @@ import { json } from '@sveltejs/kit'; -import { count } from '../state.js'; -export function GET({ setHeaders }) { +export function GET({ setHeaders, cookies }) { setHeaders({ 'cache-control': 'public, max-age=4', age: '2' }); + + const count = +(cookies.get('cache-control-force-count') ?? 0); + return json({ count }); } diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/force/increment/+server.js b/packages/kit/test/apps/basics/src/routes/load/cache-control/force/increment/+server.js index 1ddf1e429013..fee0dacb14f2 100644 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/force/increment/+server.js +++ b/packages/kit/test/apps/basics/src/routes/load/cache-control/force/increment/+server.js @@ -1,7 +1,11 @@ import { json } from '@sveltejs/kit'; -import { increment } from '../state.js'; -export function GET() { - increment(); +export function GET({ cookies }) { + cookies.set( + 'cache-control-force-count', + +(cookies.get('cache-control-force-count') ?? 0) + 1 + '', + { path: '/' } + ); + return json({}); } diff --git a/packages/kit/test/apps/basics/src/routes/load/cache-control/force/state.js b/packages/kit/test/apps/basics/src/routes/load/cache-control/force/state.js deleted file mode 100644 index ba1431d4079a..000000000000 --- a/packages/kit/test/apps/basics/src/routes/load/cache-control/force/state.js +++ /dev/null @@ -1,9 +0,0 @@ -export let count = 0; - -export function increment() { - return count++; -} - -export function reset() { - count = 0; -} diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/+page.server.js b/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/+page.server.js new file mode 100644 index 000000000000..6cf4493e9ad6 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/+page.server.js @@ -0,0 +1,31 @@ +export async function load({ fetch }) { + const aborted_controller = new AbortController(); + aborted_controller.abort(); + + let aborted_immediately = false; + try { + await fetch('/load/fetch-abort-signal/data', { signal: aborted_controller.signal }); + } catch (error) { + if (error.name === 'AbortError') { + aborted_immediately = true; + } + } + + let aborted_during_request = false; + try { + await fetch('/load/fetch-abort-signal/slow', { signal: AbortSignal.timeout(100) }); + } catch (error) { + if (error.name === 'AbortError') { + aborted_during_request = true; + } + } + + const successful_response = await fetch('/load/fetch-abort-signal/data'); + const successful_data = await successful_response.json(); + + return { + aborted_immediately, + aborted_during_request, + successful_data + }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/+page.svelte new file mode 100644 index 000000000000..1867db965604 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/+page.svelte @@ -0,0 +1,10 @@ + + +
+

AbortSignal Test Results

+

Aborted immediately: {data.aborted_immediately}

+

Aborted during request: {data.aborted_during_request}

+

Successful data: {JSON.stringify(data.successful_data)}

+
diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/data/+server.js b/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/data/+server.js new file mode 100644 index 000000000000..0c9615bc374e --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/data/+server.js @@ -0,0 +1,5 @@ +import { json } from '@sveltejs/kit'; + +export async function GET() { + return json({ message: 'success', timestamp: Date.now() }); +} diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/slow/+server.js b/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/slow/+server.js new file mode 100644 index 000000000000..633b106c0c0e --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-abort-signal/slow/+server.js @@ -0,0 +1,3 @@ +export function GET() { + return new Promise(() => {}); +} diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-arraybuffer-b64/+page.js b/packages/kit/test/apps/basics/src/routes/load/fetch-arraybuffer-b64/+page.js new file mode 100644 index 000000000000..831c029e4781 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-arraybuffer-b64/+page.js @@ -0,0 +1,13 @@ +export async function load({ fetch }) { + const res = await fetch('/load/fetch-arraybuffer-b64/data'); + + const l = await fetch('/load/fetch-arraybuffer-b64/data', { + body: Uint8Array.from(Array(256).fill(0), (_, i) => i), + method: 'POST' + }); + + return { + data: await res.arrayBuffer(), + data_long: await l.arrayBuffer() + }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-arraybuffer-b64/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/fetch-arraybuffer-b64/+page.svelte new file mode 100644 index 000000000000..bf3c9341bc8b --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-arraybuffer-b64/+page.svelte @@ -0,0 +1,30 @@ + + +{JSON.stringify(arr)} + +
+ +{ok} + + {JSON.stringify([...new Uint8Array(data.data_long)])} + diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-arraybuffer-b64/data/+server.js b/packages/kit/test/apps/basics/src/routes/load/fetch-arraybuffer-b64/data/+server.js new file mode 100644 index 000000000000..c866fb28c2fd --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-arraybuffer-b64/data/+server.js @@ -0,0 +1,7 @@ +export const GET = () => { + return new Response(new Uint8Array([1, 2, 3, 4])); +}; + +export const POST = async ({ request }) => { + return new Response(await request.arrayBuffer()); +}; diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-asset/+page.js b/packages/kit/test/apps/basics/src/routes/load/fetch-asset/+page.js new file mode 100644 index 000000000000..b9bc041e3021 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-asset/+page.js @@ -0,0 +1,9 @@ +// we need both queries to prevent Vite from inlining the asset as base64 string on build +// see https://github.com/vitejs/vite/issues/19562 +import asset from './example.json?url&no-inline'; + +export async function load({ fetch }) { + const res = await fetch(asset); + const data = await res.json(); + return data; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-asset/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/fetch-asset/+page.svelte new file mode 100644 index 000000000000..fddeb0d2e5b9 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-asset/+page.svelte @@ -0,0 +1,5 @@ + + +

{data.a}

diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-asset/example.json b/packages/kit/test/apps/basics/src/routes/load/fetch-asset/example.json new file mode 100644 index 000000000000..aa53c37972ab --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-asset/example.json @@ -0,0 +1,3 @@ +{ + "a": "1" +} diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/+page.svelte index 059f911b8567..95a7b61cf570 100644 --- a/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/+page.svelte @@ -1,4 +1,3 @@ load-data headers-diff - diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/headers-diff/+page.js b/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/headers-diff/+page.js index b64c9e0a9a68..2122574cd578 100644 --- a/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/headers-diff/+page.js +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/headers-diff/+page.js @@ -3,16 +3,16 @@ export async function load({ fetch, url }) { headers: { 'x-foo': 'a' } - }); + }).then((r) => r.json()); const r2 = await fetch(url.pathname, { headers: { 'x-foo': 'b' } - }); + }).then((r) => r.json()); return { - a: r1.json(), - b: r2.json() + a: r1, + b: r2 }; } diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/load-data/+server.js b/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/load-data/+server.js index 2fb805f66703..9f7526187dcb 100644 --- a/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/load-data/+server.js +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-cache-control/load-data/+server.js @@ -13,7 +13,7 @@ export async function POST({ request, setHeaders }) { } else if (lang === 'hu') { return json({ hi: 'szia' }); } - } catch (error) {} + } catch {} // default to english return json({ hi: 'hello' }); diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-request-empty-headers/+page.js b/packages/kit/test/apps/basics/src/routes/load/fetch-request-empty-headers/+page.js new file mode 100644 index 000000000000..895e97248da7 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-request-empty-headers/+page.js @@ -0,0 +1,6 @@ +/** @type {import('@sveltejs/kit').Load} */ +export async function load({ url, fetch }) { + const res = await fetch(new Request(url.origin + '/load/fetch-request.json')); + const { answer } = await res.json(); + return { answer }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/fetch-request-empty-headers/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/fetch-request-empty-headers/+page.svelte new file mode 100644 index 000000000000..c890e7840e38 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/fetch-request-empty-headers/+page.svelte @@ -0,0 +1,6 @@ + + +

the answer is {data.answer}

diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+layout.js b/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+layout.js new file mode 100644 index 000000000000..40882f29110a --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+layout.js @@ -0,0 +1,7 @@ +/** @type {import('./$types').LayoutLoad} */ +export function load({ depends }) { + depends('invalidate-depends-goto:layout'); + return { + layout: new Date().getTime() + }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+page.js b/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+page.js new file mode 100644 index 000000000000..3a5403c430cc --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+page.js @@ -0,0 +1,8 @@ +/** @type {import('./$types').PageLoad} */ +export function load({ data, depends }) { + depends('invalidate-depends-goto:shared'); + return { + shared: new Date().getTime(), + ...data + }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+page.server.js b/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+page.server.js new file mode 100644 index 000000000000..ee29abbe4b9c --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+page.server.js @@ -0,0 +1,7 @@ +/** @type {import('./$types').PageServerLoad} */ +export function load({ depends }) { + depends('invalidate-depends-goto:server'); + return { + server: new Date().getTime() + }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+page.svelte new file mode 100644 index 000000000000..6c799100c283 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/depends-goto/+page.svelte @@ -0,0 +1,49 @@ + + +

{data.layout}

+ + +

{data.server}

+ + +

{data.shared}

+ + +

neither

+ diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/depends/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/invalidation/depends/+page.svelte index e402d30d518c..b92e5839767e 100644 --- a/packages/kit/test/apps/basics/src/routes/load/invalidation/depends/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/depends/+page.svelte @@ -22,3 +22,12 @@ > invalidate server + +

neither

+ diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/invalidate-then-goto/+layout.server.js b/packages/kit/test/apps/basics/src/routes/load/invalidation/invalidate-then-goto/+layout.server.js new file mode 100644 index 000000000000..07aab9465aca --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/invalidate-then-goto/+layout.server.js @@ -0,0 +1,7 @@ +/** @type {import('./$types').LayoutServerLoad} */ +export function load({ depends }) { + depends('invalidate-depends:goto'); + return { + layoutDate: new Date().getTime() + }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/invalidate-then-goto/+page.server.js b/packages/kit/test/apps/basics/src/routes/load/invalidation/invalidate-then-goto/+page.server.js new file mode 100644 index 000000000000..ec11392c4c35 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/invalidate-then-goto/+page.server.js @@ -0,0 +1,7 @@ +/** @type {import('./$types').PageServerLoad} */ +export function load({ url }) { + url.searchParams.get('x'); + return { + pageDate: new Date().getTime() + }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/invalidate-then-goto/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/invalidation/invalidate-then-goto/+page.svelte new file mode 100644 index 000000000000..887e7b8d5a57 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/invalidate-then-goto/+page.svelte @@ -0,0 +1,23 @@ + + +

{data.layoutDate}

+

{data.pageDate}

+ + diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/multiple/+layout.js b/packages/kit/test/apps/basics/src/routes/load/invalidation/multiple/+layout.js index 612afdb02405..e2c7823abfd1 100644 --- a/packages/kit/test/apps/basics/src/routes/load/invalidation/multiple/+layout.js +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/multiple/+layout.js @@ -8,7 +8,7 @@ export function load({ depends }) { if (get(redirect_state) === 'running') { redirect_state.set('done'); - throw redirect(307, '/load/invalidation/multiple/redirect'); + redirect(307, '/load/invalidation/multiple/redirect'); } return new Promise((resolve) => diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/multiple/+layout.svelte b/packages/kit/test/apps/basics/src/routes/load/invalidation/multiple/+layout.svelte index f9cc3bd4be3f..f319c136ee8c 100644 --- a/packages/kit/test/apps/basics/src/routes/load/invalidation/multiple/+layout.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/multiple/+layout.svelte @@ -1,6 +1,6 @@ + +count: {data.count} + +Change tracked parameter +Change untracked parameter diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/search-params/universal/+page.js b/packages/kit/test/apps/basics/src/routes/load/invalidation/search-params/universal/+page.js new file mode 100644 index 000000000000..8d4b3444d839 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/search-params/universal/+page.js @@ -0,0 +1,8 @@ +let count = 0; + +export function load({ url }) { + url.searchParams.get('a'); + return { + count: count++ + }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/invalidation/search-params/universal/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/invalidation/search-params/universal/+page.svelte new file mode 100644 index 000000000000..4ec557e316f1 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/invalidation/search-params/universal/+page.svelte @@ -0,0 +1,8 @@ + + +count: {data.count} + +Change tracked parameter +Change untracked parameter diff --git a/packages/kit/test/apps/basics/src/routes/load/mutated-url/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/mutated-url/+page.svelte index 12877cdc0391..13f81454866e 100644 --- a/packages/kit/test/apps/basics/src/routes/load/mutated-url/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/mutated-url/+page.svelte @@ -1,13 +1,13 @@ diff --git a/packages/kit/test/apps/basics/src/routes/load/parent/server/+layout.svelte b/packages/kit/test/apps/basics/src/routes/load/parent/server/+layout.svelte index 13e0e91ed627..4fa864ce7aa9 100644 --- a/packages/kit/test/apps/basics/src/routes/load/parent/server/+layout.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/parent/server/+layout.svelte @@ -1 +1 @@ - + diff --git a/packages/kit/test/apps/basics/src/routes/load/parent/server/[x]/[y]/[z]/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/parent/server/[x]/[y]/[z]/+page.svelte index 0b85507c19d8..77b85dba4636 100644 --- a/packages/kit/test/apps/basics/src/routes/load/parent/server/[x]/[y]/[z]/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/parent/server/[x]/[y]/[z]/+page.svelte @@ -1,6 +1,6 @@ -

message: {$page.data.message}

-
{JSON.stringify($page.data)}
+

message: {page.data.message}

+
{JSON.stringify(page.data)}
diff --git a/packages/kit/test/apps/basics/src/routes/load/parent/shared/+layout.svelte b/packages/kit/test/apps/basics/src/routes/load/parent/shared/+layout.svelte index 13e0e91ed627..4fa864ce7aa9 100644 --- a/packages/kit/test/apps/basics/src/routes/load/parent/shared/+layout.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/parent/shared/+layout.svelte @@ -1 +1 @@ - + diff --git a/packages/kit/test/apps/basics/src/routes/load/parent/shared/[x]/[y]/[z]/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/parent/shared/[x]/[y]/[z]/+page.svelte index 0b85507c19d8..77b85dba4636 100644 --- a/packages/kit/test/apps/basics/src/routes/load/parent/shared/[x]/[y]/[z]/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/parent/shared/[x]/[y]/[z]/+page.svelte @@ -1,6 +1,6 @@ -

message: {$page.data.message}

-
{JSON.stringify($page.data)}
+

message: {page.data.message}

+
{JSON.stringify(page.data)}
diff --git a/packages/kit/test/apps/basics/src/routes/load/server-data-reuse/no-load/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/server-data-reuse/no-load/+page.svelte index 592b0da7cee6..31d2403f2c31 100644 --- a/packages/kit/test/apps/basics/src/routes/load/server-data-reuse/no-load/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/server-data-reuse/no-load/+page.svelte @@ -1,5 +1,5 @@

Page without load

diff --git a/packages/kit/test/apps/basics/src/routes/load/server-log-search-param/+page.server.js b/packages/kit/test/apps/basics/src/routes/load/server-log-search-param/+page.server.js new file mode 100644 index 000000000000..d5733a0bde6f --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/server-log-search-param/+page.server.js @@ -0,0 +1,3 @@ +export function load({ url }) { + console.log(url.searchParams); +} diff --git a/packages/kit/test/apps/basics/src/routes/load/server-log-search-param/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/server-log-search-param/+page.svelte new file mode 100644 index 000000000000..48aa4cb69f99 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/server-log-search-param/+page.svelte @@ -0,0 +1 @@ +

hello world

diff --git a/packages/kit/test/apps/basics/src/routes/load/url-query-param/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/url-query-param/+page.svelte index 23f312e3b800..605042da7c66 100644 --- a/packages/kit/test/apps/basics/src/routes/load/url-query-param/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/url-query-param/+page.svelte @@ -1,10 +1,10 @@ -

Hello {$page.data.currentClientState ?? ''}

+

Hello {page.data.currentClientState ?? ''}

-

{$page.data.textFromTheServer}

+

{page.data.textFromTheServer}

ABC DEF diff --git a/packages/kit/test/apps/basics/src/routes/load/window-fetch/outside-load/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/window-fetch/outside-load/+page.svelte index dda0ecac5d6e..4485797cb3fc 100644 --- a/packages/kit/test/apps/basics/src/routes/load/window-fetch/outside-load/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/load/window-fetch/outside-load/+page.svelte @@ -1,11 +1,11 @@ diff --git a/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load-ii/+page.server.js b/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load-ii/+page.server.js new file mode 100644 index 000000000000..2c62de9478c9 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load-ii/+page.server.js @@ -0,0 +1,3 @@ +export async function load() { + return { msg: 'server load data' }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load-ii/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load-ii/+page.svelte new file mode 100644 index 000000000000..5bd930e96a4f --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load-ii/+page.svelte @@ -0,0 +1,10 @@ + + +

+ This page makes a fetch request to the server to get the data from the server load function when + users navigate to it. +

+ +

{data.msg}

diff --git a/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load/+page.server.js b/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load/+page.server.js new file mode 100644 index 000000000000..2c62de9478c9 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load/+page.server.js @@ -0,0 +1,3 @@ +export async function load() { + return { msg: 'server load data' }; +} diff --git a/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load/+page.svelte b/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load/+page.svelte new file mode 100644 index 000000000000..69c974f193a8 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/load/window-fetch/patching-server-load/+page.svelte @@ -0,0 +1,18 @@ + + +

+ The sole purpose of this page is to apply a `window.fetch` patch before navigating to the next + page. Click the link below to navigate to the next page with a server load function. +

+ +Go To Page with Server Load diff --git a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate-properly-removed/+layout.svelte b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate-properly-removed/+layout.svelte new file mode 100644 index 000000000000..948f89135625 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate-properly-removed/+layout.svelte @@ -0,0 +1,10 @@ + + +{@render children()} diff --git a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate-properly-removed/a/+page.svelte b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate-properly-removed/a/+page.svelte new file mode 100644 index 000000000000..ddc82eb1ccfd --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate-properly-removed/a/+page.svelte @@ -0,0 +1,20 @@ + + +

/A

+/a +/b diff --git a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate-properly-removed/b/+page.svelte b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate-properly-removed/b/+page.svelte new file mode 100644 index 000000000000..c7a682b6a763 --- /dev/null +++ b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate-properly-removed/b/+page.svelte @@ -0,0 +1,7 @@ +

/B

+
+ was called: + false +
+/a +/b diff --git a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate/a/+page.svelte b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate/a/+page.svelte index 7e9eeeaa4b09..f7b17c56d18a 100644 --- a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate/a/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/after-navigate/a/+page.svelte @@ -13,5 +13,5 @@ }); -

{from?.url.pathname} -> {to?.url.pathname}

+

{`${from?.url.pathname} -> ${to?.url.pathname}`}

/b diff --git a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/before-navigate/prevent-navigation/+page.svelte b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/before-navigate/prevent-navigation/+page.svelte index 6d6a56cc5020..adc5b6404c20 100644 --- a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/before-navigate/prevent-navigation/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/before-navigate/prevent-navigation/+page.svelte @@ -20,5 +20,6 @@ self _blank external + external -
{times_triggered} {unload} {navigation_type}
+
{times_triggered} {unload} {`${navigation_type}`}
diff --git a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/before-navigate/redirect/+page.js b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/before-navigate/redirect/+page.js index 80f189a06a13..0662014015a7 100644 --- a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/before-navigate/redirect/+page.js +++ b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/before-navigate/redirect/+page.js @@ -1,5 +1,5 @@ import { redirect } from '@sveltejs/kit'; export function load() { - throw redirect(307, '/navigation-lifecycle/before-navigate/prevent-navigation'); + redirect(307, '/navigation-lifecycle/before-navigate/prevent-navigation'); } diff --git a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/on-navigate/[x]/+page.svelte b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/on-navigate/[x]/+page.svelte index 35e8ebb73349..64128aa9fde5 100644 --- a/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/on-navigate/[x]/+page.svelte +++ b/packages/kit/test/apps/basics/src/routes/navigation-lifecycle/on-navigate/[x]/+page.svelte @@ -10,12 +10,20 @@ /** @type {Omit} */ let type; + let called_return = false; + onNavigate((navigation) => { from = navigation.from; to = navigation.to; type = navigation.type; }); + + onNavigate(() => { + return () => { + called_return = true; + }; + }); -

{from?.url.pathname} -> {to?.url.pathname} ({type ?? '...'})

+

{`${from?.url.pathname} -> ${to?.url.pathname}`} ({type ?? '...'}) {called_return}

/b diff --git a/packages/kit/test/apps/basics/src/routes/nested-layout/+layout.svelte b/packages/kit/test/apps/basics/src/routes/nested-layout/+layout.svelte index fa9967201073..a32fdaf35dfa 100644 --- a/packages/kit/test/apps/basics/src/routes/nested-layout/+layout.svelte +++ b/packages/kit/test/apps/basics/src/routes/nested-layout/+layout.svelte @@ -1,2 +1,2 @@ - +

This is a nested layout component

diff --git a/packages/kit/test/apps/basics/src/routes/nested-layout/error/+page.js b/packages/kit/test/apps/basics/src/routes/nested-layout/error/+page.js index 9b17193d01e2..ca2552691b9f 100644 --- a/packages/kit/test/apps/basics/src/routes/nested-layout/error/+page.js +++ b/packages/kit/test/apps/basics/src/routes/nested-layout/error/+page.js @@ -1,5 +1,5 @@ import { error } from '@sveltejs/kit'; export function load() { - throw error(500, 'Error'); + error(500, 'Error'); } diff --git a/packages/kit/test/apps/basics/src/routes/nested-layout/foo/+layout.svelte b/packages/kit/test/apps/basics/src/routes/nested-layout/foo/+layout.svelte index badf55425927..0a6727ef00fc 100644 --- a/packages/kit/test/apps/basics/src/routes/nested-layout/foo/+layout.svelte +++ b/packages/kit/test/apps/basics/src/routes/nested-layout/foo/+layout.svelte @@ -1,2 +1,2 @@ - +

Nested layout foo

diff --git a/packages/kit/test/apps/basics/src/routes/nested-layout/foo/bar/+error.svelte b/packages/kit/test/apps/basics/src/routes/nested-layout/foo/bar/+error.svelte index 5301c04c4566..1ccf6772e8a1 100644 --- a/packages/kit/test/apps/basics/src/routes/nested-layout/foo/bar/+error.svelte +++ b/packages/kit/test/apps/basics/src/routes/nested-layout/foo/bar/+error.svelte @@ -1,10 +1,10 @@

Nested error page

-

status: {$page.status}

-

error.message: {$page.error.message}

+

status: {page.status}

+

error.message: {page.error.message}

diff --git a/packages/kit/test/apps/options-2/src/routes/deeply/nested/page/+page.svelte b/packages/kit/test/apps/options-2/src/routes/deeply/nested/page/+page.svelte index d6232afc0cc9..ee77d1c9d5b5 100644 --- a/packages/kit/test/apps/options-2/src/routes/deeply/nested/page/+page.svelte +++ b/packages/kit/test/apps/options-2/src/routes/deeply/nested/page/+page.svelte @@ -6,3 +6,9 @@

base: {base}

assets: {assets}

+ + diff --git a/packages/kit/test/apps/options-2/src/routes/deserialize/+page.svelte b/packages/kit/test/apps/options-2/src/routes/deserialize/+page.svelte new file mode 100644 index 000000000000..a35e3cf30df1 --- /dev/null +++ b/packages/kit/test/apps/options-2/src/routes/deserialize/+page.svelte @@ -0,0 +1,5 @@ + + +

{data.data.text}

diff --git a/packages/kit/test/apps/options-2/src/routes/deserialize/+page.ts b/packages/kit/test/apps/options-2/src/routes/deserialize/+page.ts new file mode 100644 index 000000000000..b3e20666383e --- /dev/null +++ b/packages/kit/test/apps/options-2/src/routes/deserialize/+page.ts @@ -0,0 +1,15 @@ +import { deserialize } from '$app/forms'; + +export const ssr = false; + +export function load() { + const result = deserialize( + JSON.stringify({ + type: 'success', + status: 200, + data: '[{"text":1},"Hello world!"]' + }) + ); + + return result; +} diff --git a/packages/kit/test/apps/options-2/src/routes/hello/+page.svelte b/packages/kit/test/apps/options-2/src/routes/hello/+page.svelte index a994afef288b..8f60c2df52bc 100644 --- a/packages/kit/test/apps/options-2/src/routes/hello/+page.svelte +++ b/packages/kit/test/apps/options-2/src/routes/hello/+page.svelte @@ -1 +1,7 @@

Prerendered

+ + diff --git a/packages/kit/test/apps/options-2/src/routes/trailing-slash-server/+page.svelte b/packages/kit/test/apps/options-2/src/routes/trailing-slash-server/+page.svelte new file mode 100644 index 000000000000..71d69f88341a --- /dev/null +++ b/packages/kit/test/apps/options-2/src/routes/trailing-slash-server/+page.svelte @@ -0,0 +1,5 @@ + + +{base}/trailing-slash-server/prerender diff --git a/packages/kit/test/apps/options-2/src/routes/trailing-slash-server/prerender/+page.server.js b/packages/kit/test/apps/options-2/src/routes/trailing-slash-server/prerender/+page.server.js new file mode 100644 index 000000000000..69e0d18ba8ad --- /dev/null +++ b/packages/kit/test/apps/options-2/src/routes/trailing-slash-server/prerender/+page.server.js @@ -0,0 +1,2 @@ +export const trailingSlash = 'always'; +export const prerender = true; diff --git a/packages/kit/test/apps/options-2/src/routes/trailing-slash-server/prerender/+page.svelte b/packages/kit/test/apps/options-2/src/routes/trailing-slash-server/prerender/+page.svelte new file mode 100644 index 000000000000..79966403d499 --- /dev/null +++ b/packages/kit/test/apps/options-2/src/routes/trailing-slash-server/prerender/+page.svelte @@ -0,0 +1,5 @@ + + +

{page.url.pathname}

diff --git a/packages/kit/test/apps/options-2/src/service-worker.js b/packages/kit/test/apps/options-2/src/service-worker.js index 3a85c001dc92..5d2346ffc333 100644 --- a/packages/kit/test/apps/options-2/src/service-worker.js +++ b/packages/kit/test/apps/options-2/src/service-worker.js @@ -1,7 +1,12 @@ import { base, build, version } from '$service-worker'; +import src from './image.jpg?url'; +//@ts-ignore self.base = base; +//@ts-ignore self.build = build; +//@ts-ignore +self.image_src = src; const name = `cache-${version}`; diff --git a/packages/kit/test/apps/options-2/svelte.config.js b/packages/kit/test/apps/options-2/svelte.config.js index ca9cb32020f8..dd4414575a39 100644 --- a/packages/kit/test/apps/options-2/svelte.config.js +++ b/packages/kit/test/apps/options-2/svelte.config.js @@ -10,6 +10,9 @@ const config = { }, env: { dir: '../../env' + }, + output: { + bundleStrategy: 'single' } } }; diff --git a/packages/kit/test/apps/options-2/test/test.js b/packages/kit/test/apps/options-2/test/test.js index 213ecb9d0ed7..b7fb132aa510 100644 --- a/packages/kit/test/apps/options-2/test/test.js +++ b/packages/kit/test/apps/options-2/test/test.js @@ -1,3 +1,6 @@ +import path from 'node:path'; +import process from 'node:process'; +import { fileURLToPath } from 'node:url'; import { expect } from '@playwright/test'; import { test } from '../../../utils.js'; @@ -37,12 +40,55 @@ test.describe('paths', () => { expect(await page.textContent('[data-testid="base"]')).toBe(`base: ${base}`); expect(await page.textContent('[data-testid="assets"]')).toBe(`assets: ${base}`); }); + + test('serves /basepath with trailing slash always', async ({ page }) => { + await page.goto('/basepath'); + expect(new URL(page.url()).pathname).toBe('/basepath/'); + }); + + test('respects trailing slash option when navigating from /basepath', async ({ + page, + clicknav + }) => { + await page.goto('/basepath'); + expect(new URL(page.url()).pathname).toBe('/basepath/'); + await clicknav('[data-testid="link"]'); + expect(new URL(page.url()).pathname).toBe('/basepath/hello'); + }); +}); + +test.describe('trailing slash', () => { + if (!process.env.DEV) { + test('trailing slash server prerendered without server load', async ({ + page, + clicknav, + javaScriptEnabled + }) => { + if (!javaScriptEnabled) return; + + await page.goto('/basepath/trailing-slash-server'); + + await clicknav('a[href="/basepath/trailing-slash-server/prerender"]'); + expect(await page.textContent('h2')).toBe('/basepath/trailing-slash-server/prerender/'); + }); + } }); test.describe('Service worker', () => { - if (process.env.DEV) return; + if (process.env.DEV) { + test('import proxy /basepath/service-worker.js', async ({ request }) => { + const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const response = await request.get('/basepath/service-worker.js'); + const content = await response.text(); + expect(content).toEqual( + `import '${path.join('/basepath', '/@fs', __dirname, '../src/service-worker.js')}';` + ); + }); - test('build /basepath/service-worker.js', async ({ request }) => { + return; + } + + test('build /basepath/service-worker.js', async ({ baseURL, request }) => { const response = await request.get('/basepath/service-worker.js'); const content = await response.text(); @@ -54,12 +100,16 @@ test.describe('Service worker', () => { build: null }; + const pathname = '/basepath/service-worker.js'; + fn(self, { - pathname: '/basepath/service-worker.js' + href: baseURL + pathname, + pathname }); expect(self.base).toBe('/basepath'); - expect(self.build[0]).toMatch(/\/basepath\/_app\/immutable\/entry\/start\.[\w-]+\.js/); + expect(self.build?.[0]).toMatch(/\/basepath\/_app\/immutable\/bundle\.[\w-]+\.js/); + expect(self.image_src).toMatch(/\/basepath\/_app\/immutable\/assets\/image\.[\w-]+\.jpg/); }); test('does not register /basepath/service-worker.js', async ({ page }) => { @@ -67,3 +117,28 @@ test.describe('Service worker', () => { expect(await page.content()).not.toMatch(/navigator\.serviceWorker/); }); }); + +test.describe("bundleStrategy: 'single'", () => { + test.skip(({ javaScriptEnabled }) => !javaScriptEnabled || !!process.env.DEV); + + test('loads a single js file and a single css file', async ({ page }) => { + /** @type {string[]} */ + const requests = []; + page.on('request', (r) => requests.push(new URL(r.url()).pathname)); + + await page.goto('/basepath'); + + await Promise.all([ + page.waitForTimeout(100), // wait for preloading to start + page.waitForLoadState('networkidle') // wait for preloading to finish + ]); + + expect(requests.filter((req) => req.endsWith('.js')).length).toBe(1); + expect(requests.filter((req) => req.endsWith('.css')).length).toBe(1); + }); + + test('app.decoders is accessed only after app has been initialised', async ({ page }) => { + await page.goto('/basepath/deserialize'); + await expect(page.locator('p')).toHaveText('Hello world!'); + }); +}); diff --git a/packages/kit/test/apps/options-2/tsconfig.json b/packages/kit/test/apps/options-2/tsconfig.json index 858415b26691..b1096bf168cd 100644 --- a/packages/kit/test/apps/options-2/tsconfig.json +++ b/packages/kit/test/apps/options-2/tsconfig.json @@ -2,13 +2,7 @@ "compilerOptions": { "allowJs": true, "checkJs": true, - "noEmit": true, - "paths": { - "@sveltejs/kit": ["../../../types"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"], - "types": ["../../../types/internal"] - } + "noEmit": true }, "extends": "./.svelte-kit/tsconfig.json" } diff --git a/packages/kit/test/apps/options/package.json b/packages/kit/test/apps/options/package.json index 829ff8053b0b..df1618f6b07f 100644 --- a/packages/kit/test/apps/options/package.json +++ b/packages/kit/test/apps/options/package.json @@ -6,18 +6,23 @@ "dev": "vite dev -c vite.custom.config.js", "build": "vite build -c vite.custom.config.js --mode custom", "preview": "vite preview -c vite.custom.config.js", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check", "test": "pnpm test:dev && pnpm test:build", "test:dev": "cross-env DEV=true playwright test", - "test:build": "playwright test" + "test:build": "playwright test", + "test:server-side-route-resolution:dev": "node -e \"fs.rmSync('test/errors.json', { force: true })\" && cross-env DEV=true ROUTER_RESOLUTION=server playwright test", + "test:server-side-route-resolution:build": "node -e \"fs.rmSync('test/errors.json', { force: true })\" && cross-env ROUTER_RESOLUTION=server playwright test" }, "devDependencies": { + "@fontsource/libre-barcode-128-text": "^5.1.0", "@sveltejs/kit": "workspace:^", - "cross-env": "^7.0.3", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "cross-env": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/apps/options/playwright.config.js b/packages/kit/test/apps/options/playwright.config.js index 33d36b651014..9f039939abd5 100644 --- a/packages/kit/test/apps/options/playwright.config.js +++ b/packages/kit/test/apps/options/playwright.config.js @@ -1 +1,12 @@ -export { config as default } from '../../utils.js'; +import process from 'node:process'; +import { config } from '../../utils.js'; + +export default { + ...config, + webServer: { + ...config.webServer, + command: process.env.DEV + ? `cross-env ROUTER_RESOLUTION=${process.env.ROUTER_RESOLUTION ?? 'client'} pnpm dev` + : `cross-env ROUTER_RESOLUTION=${process.env.ROUTER_RESOLUTION ?? 'client'} pnpm build && pnpm preview` + } +}; diff --git a/packages/kit/test/apps/options/source/components/Message.svelte b/packages/kit/test/apps/options/source/components/Message.svelte index 03aaba87354c..089df14bf907 100644 --- a/packages/kit/test/apps/options/source/components/Message.svelte +++ b/packages/kit/test/apps/options/source/components/Message.svelte @@ -2,4 +2,4 @@ import { browser, dev } from '$app/environment'; -

Hello from the {browser ? 'client' : 'server'} in {dev ? 'dev' : 'prod'} mode!

\ No newline at end of file +

Hello from the {browser ? 'client' : 'server'} in {dev ? 'dev' : 'prod'} mode!

diff --git a/packages/kit/test/apps/options/source/components/SharedCSS.svelte b/packages/kit/test/apps/options/source/components/SharedCSS.svelte new file mode 100644 index 000000000000..deda4b46551e --- /dev/null +++ b/packages/kit/test/apps/options/source/components/SharedCSS.svelte @@ -0,0 +1,9 @@ +

+ This component is imported in multiple pages and therefore its CSS lands in a separate CSS chunk +

+ + diff --git a/packages/kit/test/apps/options/source/hooks.server.js b/packages/kit/test/apps/options/source/hooks.server.js index 0ca3568e9c0c..5b5b3ea6d0da 100644 --- a/packages/kit/test/apps/options/source/hooks.server.js +++ b/packages/kit/test/apps/options/source/hooks.server.js @@ -1,3 +1,10 @@ +import { env } from '$env/dynamic/private'; + +// this verifies that dynamic env vars can be read during analysis phase +// (it would fail if this app contained prerendered routes) +// eslint-disable-next-line @typescript-eslint/no-unused-vars +const FOO = env.FOO; + /** @type {import('@sveltejs/kit').Handle} */ export function handle({ event, resolve }) { return resolve(event, { diff --git a/packages/kit/test/apps/options/source/pages/+layout.svelte b/packages/kit/test/apps/options/source/pages/+layout.svelte index 5e1f1fed86c2..65d3d04b2070 100644 --- a/packages/kit/test/apps/options/source/pages/+layout.svelte +++ b/packages/kit/test/apps/options/source/pages/+layout.svelte @@ -1,7 +1,20 @@ diff --git a/packages/kit/test/apps/options/source/pages/+page.svelte b/packages/kit/test/apps/options/source/pages/+page.svelte index e1d2caf93066..28eb4f7959b8 100644 --- a/packages/kit/test/apps/options/source/pages/+page.svelte +++ b/packages/kit/test/apps/options/source/pages/+page.svelte @@ -3,4 +3,4 @@

We're on index.svelte

- \ No newline at end of file + diff --git a/packages/kit/test/apps/options/source/pages/base/[slug]/+page.svelte b/packages/kit/test/apps/options/source/pages/base/[slug]/+page.svelte index 6896271e3ccd..142d392764e2 100644 --- a/packages/kit/test/apps/options/source/pages/base/[slug]/+page.svelte +++ b/packages/kit/test/apps/options/source/pages/base/[slug]/+page.svelte @@ -1,10 +1,10 @@ -

{$page.params.slug}

+

{page.params.slug}

/path-base/base/two diff --git a/packages/kit/test/apps/options/source/pages/csp-with-stream/+page.server.js b/packages/kit/test/apps/options/source/pages/csp-with-stream/+page.server.js new file mode 100644 index 000000000000..968df8f5d440 --- /dev/null +++ b/packages/kit/test/apps/options/source/pages/csp-with-stream/+page.server.js @@ -0,0 +1,5 @@ +export function load() { + return { + lazy: new Promise((resolve) => setTimeout(() => resolve(), 1000)).then(() => 'Moo Deng!') + }; +} diff --git a/packages/kit/test/apps/options/source/pages/csp-with-stream/+page.svelte b/packages/kit/test/apps/options/source/pages/csp-with-stream/+page.svelte new file mode 100644 index 000000000000..ebf0bb40e051 --- /dev/null +++ b/packages/kit/test/apps/options/source/pages/csp-with-stream/+page.svelte @@ -0,0 +1,9 @@ + + +{#await data.lazy} + Loading... +{:then value} +

{value}

+{/await} diff --git a/packages/kit/test/apps/options/source/pages/csp/+page.svelte b/packages/kit/test/apps/options/source/pages/csp/+page.svelte index 8b0c1ae6ba35..2b1c4fd69b0a 100644 --- a/packages/kit/test/apps/options/source/pages/csp/+page.svelte +++ b/packages/kit/test/apps/options/source/pages/csp/+page.svelte @@ -1,7 +1,7 @@ - + diff --git a/packages/kit/test/apps/options/source/pages/custom-extensions/[slug]/+page.svelte.md b/packages/kit/test/apps/options/source/pages/custom-extensions/[slug]/+page.svelte.md index 4ebc388ae09f..0d9d575b978b 100644 --- a/packages/kit/test/apps/options/source/pages/custom-extensions/[slug]/+page.svelte.md +++ b/packages/kit/test/apps/options/source/pages/custom-extensions/[slug]/+page.svelte.md @@ -1,3 +1,3 @@ - + -

{$page.params.slug.toUpperCase()}

+

{page.params.slug.toUpperCase()}

diff --git a/packages/kit/test/apps/options/source/pages/inline-assets/+page.server.js b/packages/kit/test/apps/options/source/pages/inline-assets/+page.server.js new file mode 100644 index 000000000000..661546f24436 --- /dev/null +++ b/packages/kit/test/apps/options/source/pages/inline-assets/+page.server.js @@ -0,0 +1,4 @@ +// test that the server-client stylesheet map is constructed correctly when +// a page is imported. Importing a page causes Vite to associate the css with +// a separate chunk instead of the page component itself +import.meta.glob('./import-meta/+page.svelte', { eager: true }); diff --git a/packages/kit/test/apps/options/source/pages/inline-assets/+page.svelte b/packages/kit/test/apps/options/source/pages/inline-assets/+page.svelte new file mode 100644 index 000000000000..c0a95f45f3c1 --- /dev/null +++ b/packages/kit/test/apps/options/source/pages/inline-assets/+page.svelte @@ -0,0 +1,16 @@ + + +

+ Test that the fontsource is referenced correctly, while the shared CSS in SharedCSS doesn't cause + problems +

+ + + diff --git a/packages/kit/test/apps/options/source/pages/inline-assets/dynamic-import/+page.js b/packages/kit/test/apps/options/source/pages/inline-assets/dynamic-import/+page.js new file mode 100644 index 000000000000..6b6f8e04547c --- /dev/null +++ b/packages/kit/test/apps/options/source/pages/inline-assets/dynamic-import/+page.js @@ -0,0 +1,5 @@ +export async function load() { + return { + Thing: (await import('./Thing.svelte')).default + }; +} diff --git a/packages/kit/test/apps/options/source/pages/inline-assets/dynamic-import/+page.svelte b/packages/kit/test/apps/options/source/pages/inline-assets/dynamic-import/+page.svelte new file mode 100644 index 000000000000..d2a75179b0b2 --- /dev/null +++ b/packages/kit/test/apps/options/source/pages/inline-assets/dynamic-import/+page.svelte @@ -0,0 +1,5 @@ + + + diff --git a/packages/kit/test/apps/options/source/pages/inline-assets/dynamic-import/Thing.svelte b/packages/kit/test/apps/options/source/pages/inline-assets/dynamic-import/Thing.svelte new file mode 100644 index 000000000000..747598bcede0 --- /dev/null +++ b/packages/kit/test/apps/options/source/pages/inline-assets/dynamic-import/Thing.svelte @@ -0,0 +1,8 @@ +

I'm dynamically imported

+ + diff --git a/packages/kit/test/apps/options/source/pages/inline-assets/import-meta/+page.svelte b/packages/kit/test/apps/options/source/pages/inline-assets/import-meta/+page.svelte new file mode 100644 index 000000000000..fb14331c1393 --- /dev/null +++ b/packages/kit/test/apps/options/source/pages/inline-assets/import-meta/+page.svelte @@ -0,0 +1,7 @@ +
this page is being imported so its css is associated with a separate chunk
+ + diff --git a/packages/kit/test/apps/options/source/pages/resolve-route/+page.svelte b/packages/kit/test/apps/options/source/pages/resolve-route/+page.svelte new file mode 100644 index 000000000000..012be59f5a26 --- /dev/null +++ b/packages/kit/test/apps/options/source/pages/resolve-route/+page.svelte @@ -0,0 +1,7 @@ + + + +click me diff --git a/packages/kit/test/apps/options/source/pages/resolve-route/[foo]/+page.svelte b/packages/kit/test/apps/options/source/pages/resolve-route/[foo]/+page.svelte new file mode 100644 index 000000000000..cfa4977e5705 --- /dev/null +++ b/packages/kit/test/apps/options/source/pages/resolve-route/[foo]/+page.svelte @@ -0,0 +1,5 @@ + + +

{page.params.foo}

diff --git a/packages/kit/test/apps/options/source/pages/server-fetch-invalidate/+page.server.js b/packages/kit/test/apps/options/source/pages/server-fetch-invalidate/+page.server.js deleted file mode 100644 index fc6a5abe8eac..000000000000 --- a/packages/kit/test/apps/options/source/pages/server-fetch-invalidate/+page.server.js +++ /dev/null @@ -1,6 +0,0 @@ -// TODO 2.0: Delete -/** @type {import('./$types').PageServerLoad} */ -export async function load({ fetch }) { - const res = await fetch('/path-base/server-fetch-invalidate/count.json'); - return res.json(); -} diff --git a/packages/kit/test/apps/options/source/pages/server-fetch-invalidate/+page.svelte b/packages/kit/test/apps/options/source/pages/server-fetch-invalidate/+page.svelte deleted file mode 100644 index 3cadb6924412..000000000000 --- a/packages/kit/test/apps/options/source/pages/server-fetch-invalidate/+page.svelte +++ /dev/null @@ -1,6 +0,0 @@ - - -

{data.count}

diff --git a/packages/kit/test/apps/options/source/pages/server-fetch-invalidate/count.json/+server.js b/packages/kit/test/apps/options/source/pages/server-fetch-invalidate/count.json/+server.js deleted file mode 100644 index 443894c3dcf5..000000000000 --- a/packages/kit/test/apps/options/source/pages/server-fetch-invalidate/count.json/+server.js +++ /dev/null @@ -1,10 +0,0 @@ -// TODO 2.0: Delete -import { json } from '@sveltejs/kit'; - -let count = 0; - -/** @type {import('./$types').RequestHandler} */ -export function GET({ url }) { - if (url.searchParams.has('reset')) count = 0; - return json({ count: count++ }); -} diff --git a/packages/kit/test/apps/options/source/pages/slash/+page.svelte b/packages/kit/test/apps/options/source/pages/slash/+page.svelte index 7c66a2ad551b..4b73899f4db6 100644 --- a/packages/kit/test/apps/options/source/pages/slash/+page.svelte +++ b/packages/kit/test/apps/options/source/pages/slash/+page.svelte @@ -1,8 +1,8 @@ -

{$page.url.pathname}

+

{page.url.pathname}

/slash/child diff --git a/packages/kit/test/apps/options/source/pages/slash/child/+page.svelte b/packages/kit/test/apps/options/source/pages/slash/child/+page.svelte index fe890859233d..79966403d499 100644 --- a/packages/kit/test/apps/options/source/pages/slash/child/+page.svelte +++ b/packages/kit/test/apps/options/source/pages/slash/child/+page.svelte @@ -1,5 +1,5 @@ -

{$page.url.pathname}

+

{page.url.pathname}

diff --git a/packages/kit/test/apps/options/source/template.html b/packages/kit/test/apps/options/source/template.html index 4347ea201852..e86d6f228bba 100644 --- a/packages/kit/test/apps/options/source/template.html +++ b/packages/kit/test/apps/options/source/template.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/apps/options/svelte.config.js b/packages/kit/test/apps/options/svelte.config.js index 465f142e0066..3c10a2826669 100644 --- a/packages/kit/test/apps/options/svelte.config.js +++ b/packages/kit/test/apps/options/svelte.config.js @@ -1,3 +1,5 @@ +import process from 'node:process'; + /** @type {import('@sveltejs/kit').Config} */ const config = { extensions: ['.jesuslivesineveryone', '.whokilledthemuffinman', '.svelte.md', '.svelte'], @@ -9,9 +11,6 @@ const config = { 'require-trusted-types-for': ['script'] } }, - dangerZone: { - trackServerFetches: true - }, files: { assets: 'public', lib: 'source/components', @@ -38,6 +37,9 @@ const config = { dir: './env-dir', publicPrefix: 'GO_AWAY_', privatePrefix: 'TOP_SECRET_SHH' + }, + router: { + resolution: /** @type {'client' | 'server'} */ (process.env.ROUTER_RESOLUTION) || 'client' } } }; diff --git a/packages/kit/test/apps/options/test/test.js b/packages/kit/test/apps/options/test/test.js index 577345850f71..82a30b34f159 100644 --- a/packages/kit/test/apps/options/test/test.js +++ b/packages/kit/test/apps/options/test/test.js @@ -1,4 +1,5 @@ import * as http from 'node:http'; +import process from 'node:process'; import { expect } from '@playwright/test'; import { test } from '../../../utils.js'; @@ -92,6 +93,13 @@ test.describe('base path', () => { await clicknav('[href="/path-base/base/two"]'); expect(await page.textContent('h2')).toBe('two'); }); + + test('resolveRoute accounts for base path', async ({ baseURL, page, clicknav }) => { + await page.goto('/path-base/resolve-route'); + await clicknav('[data-id=target]'); + expect(page.url()).toBe(`${baseURL}/path-base/resolve-route/resolved/`); + expect(await page.textContent('h2')).toBe('resolved'); + }); }); test.describe('assets path', () => { @@ -99,7 +107,7 @@ test.describe('assets path', () => { await page.goto('/path-base/'); const href = await page.locator('link[rel="icon"]').getAttribute('href'); - const response = await request.get(href); + const response = await request.get(href ?? ''); expect(response.status()).toBe(200); }); }); @@ -122,9 +130,18 @@ test.describe('CSP', () => { expect(await page.evaluate('window.pwned')).toBe(undefined); }); + test('ensure CSP header in stream response', async ({ page, javaScriptEnabled }) => { + if (!javaScriptEnabled) return; + const response = await page.goto('/path-base/csp-with-stream'); + expect(response?.headers()['content-security-policy']).toMatch( + /require-trusted-types-for 'script'/ + ); + expect(await page.textContent('h2')).toBe('Moo Deng!'); + }); + test("quotes 'script'", async ({ page }) => { const response = await page.goto('/path-base'); - expect(response.headers()['content-security-policy']).toMatch( + expect(response?.headers()['content-security-policy']).toMatch( /require-trusted-types-for 'script'/ ); }); @@ -232,7 +249,7 @@ test.describe('trailingSlash', () => { // also wait for network processing to complete, see // https://playwright.dev/docs/network#network-events - await app.preloadData('/path-base/preloading/preloaded'); + await app.preloadCode('/path-base/preloading/preloaded'); // svelte request made is environment dependent if (process.env.DEV) { @@ -241,6 +258,9 @@ test.describe('trailingSlash', () => { expect(requests.filter((req) => req.endsWith('.mjs')).length).toBeGreaterThan(0); } + requests = []; + await app.preloadData('/path-base/preloading/preloaded'); + expect(requests.includes('/path-base/preloading/preloaded/__data.json')).toBe(true); requests = []; @@ -283,6 +303,35 @@ if (!process.env.DEV) { expect(await page.content()).not.toMatch('navigator.serviceWorker'); }); }); + + test.describe('inlineStyleThreshold', () => { + test('loads assets', async ({ page }) => { + let fontLoaded = false; + page.on('response', (response) => { + if (response.url().endsWith('.woff2') || response.url().endsWith('.woff')) { + fontLoaded = response.ok(); + } + }); + await page.goto('/path-base/inline-assets'); + expect(fontLoaded).toBeTruthy(); + }); + + test('includes components dynamically imported in universal load', async ({ + page, + get_computed_style + }) => { + let loaded_css = false; + page.on('response', (response) => { + if (response.url().endsWith('.css')) { + loaded_css = true; + } + }); + await page.goto('/path-base/inline-assets/dynamic-import'); + await expect(page.locator('p')).toHaveText("I'm dynamically imported"); + expect(loaded_css).toBe(false); + expect(await get_computed_style('p', 'color')).toEqual('rgb(0, 0, 255)'); + }); + }); } test.describe('Vite options', () => { @@ -302,22 +351,3 @@ test.describe('Routing', () => { await expect(page.locator('h2')).toHaveText('target: 0'); }); }); - -test.describe('load', () => { - // TODO 2.0: Remove this test - test('fetch in server load can be invalidated when `dangerZone.trackServerFetches` is set', async ({ - page, - app, - request, - javaScriptEnabled - }) => { - test.skip(!javaScriptEnabled, 'JavaScript is disabled'); - await request.get('/path-base/server-fetch-invalidate/count.json?reset'); - await page.goto('/path-base/server-fetch-invalidate'); - const selector = '[data-testid="count"]'; - - expect(await page.textContent(selector)).toBe('1'); - await app.invalidate('/path-base/server-fetch-invalidate/count.json'); - expect(await page.textContent(selector)).toBe('2'); - }); -}); diff --git a/packages/kit/test/apps/options/tsconfig.json b/packages/kit/test/apps/options/tsconfig.json index bb03022c127a..77500cd3c88f 100644 --- a/packages/kit/test/apps/options/tsconfig.json +++ b/packages/kit/test/apps/options/tsconfig.json @@ -2,13 +2,7 @@ "compilerOptions": { "allowJs": true, "checkJs": true, - "noEmit": true, - "paths": { - "@sveltejs/kit": ["../../../types"], - "$lib": ["./source/components"], - "$lib/*": ["./source/components/*"], - "types": ["../../../types/internal"] - } + "noEmit": true }, "extends": "./.custom-out-dir/tsconfig.json" } diff --git a/packages/kit/test/apps/prerendered-app-error-pages/.gitignore b/packages/kit/test/apps/prerendered-app-error-pages/.gitignore new file mode 100644 index 000000000000..fad4d3e1518d --- /dev/null +++ b/packages/kit/test/apps/prerendered-app-error-pages/.gitignore @@ -0,0 +1,3 @@ +/test/errors.json +!/.env +/src/routes/routing/symlink-from \ No newline at end of file diff --git a/packages/kit/test/apps/prerendered-app-error-pages/README.md b/packages/kit/test/apps/prerendered-app-error-pages/README.md new file mode 100644 index 000000000000..89bb2b9c5308 --- /dev/null +++ b/packages/kit/test/apps/prerendered-app-error-pages/README.md @@ -0,0 +1 @@ +Please do not edit this app unless you're absolutely sure it's not going to affect the tests. diff --git a/packages/create-svelte/shared/+typescript/tsconfig.json b/packages/kit/test/apps/prerendered-app-error-pages/jsconfig.json similarity index 69% rename from packages/create-svelte/shared/+typescript/tsconfig.json rename to packages/kit/test/apps/prerendered-app-error-pages/jsconfig.json index 6ae0c8c44d08..0b2d8865f4ef 100644 --- a/packages/create-svelte/shared/+typescript/tsconfig.json +++ b/packages/kit/test/apps/prerendered-app-error-pages/jsconfig.json @@ -8,9 +8,11 @@ "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, - "strict": true + "strict": true, + "moduleResolution": "bundler" } - // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias + // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files // // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes // from the referenced tsconfig.json - TypeScript does not merge them in diff --git a/packages/kit/test/apps/prerendered-app-error-pages/package.json b/packages/kit/test/apps/prerendered-app-error-pages/package.json new file mode 100644 index 000000000000..832d0316979e --- /dev/null +++ b/packages/kit/test/apps/prerendered-app-error-pages/package.json @@ -0,0 +1,26 @@ +{ + "name": "test-prerendered-app-error-pages", + "private": true, + "version": "0.0.1", + "type": "module", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "prepare": "svelte-kit sync || echo ''", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", + "test": "pnpm test:dev && pnpm test:build", + "test:dev": "cross-env DEV=true playwright test", + "test:build": "playwright test" + }, + "devDependencies": { + "@sveltejs/kit": "workspace:^", + "@sveltejs/vite-plugin-svelte": "catalog:", + "cross-env": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" + } +} diff --git a/packages/kit/test/apps/prerendered-app-error-pages/playwright.config.js b/packages/kit/test/apps/prerendered-app-error-pages/playwright.config.js new file mode 100644 index 000000000000..33d36b651014 --- /dev/null +++ b/packages/kit/test/apps/prerendered-app-error-pages/playwright.config.js @@ -0,0 +1 @@ +export { config as default } from '../../utils.js'; diff --git a/packages/create-svelte/templates/default/src/app.d.ts b/packages/kit/test/apps/prerendered-app-error-pages/src/app.d.ts similarity index 71% rename from packages/create-svelte/templates/default/src/app.d.ts rename to packages/kit/test/apps/prerendered-app-error-pages/src/app.d.ts index f59b884c51ed..da08e6da592d 100644 --- a/packages/create-svelte/templates/default/src/app.d.ts +++ b/packages/kit/test/apps/prerendered-app-error-pages/src/app.d.ts @@ -1,10 +1,11 @@ -// See https://kit.svelte.dev/docs/types#app +// See https://svelte.dev/docs/kit/types#app.d.ts // for information about these interfaces declare global { namespace App { // interface Error {} // interface Locals {} // interface PageData {} + // interface PageState {} // interface Platform {} } } diff --git a/packages/create-svelte/templates/default/src/app.html b/packages/kit/test/apps/prerendered-app-error-pages/src/app.html similarity index 95% rename from packages/create-svelte/templates/default/src/app.html rename to packages/kit/test/apps/prerendered-app-error-pages/src/app.html index 6769ed5e89c5..77a5ff52c923 100644 --- a/packages/create-svelte/templates/default/src/app.html +++ b/packages/kit/test/apps/prerendered-app-error-pages/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/apps/prerendered-app-error-pages/src/routes/+error.svelte b/packages/kit/test/apps/prerendered-app-error-pages/src/routes/+error.svelte new file mode 100644 index 000000000000..5b44aeb7a686 --- /dev/null +++ b/packages/kit/test/apps/prerendered-app-error-pages/src/routes/+error.svelte @@ -0,0 +1 @@ +

This is your custom error page.

diff --git a/packages/kit/test/apps/prerendered-app-error-pages/src/routes/+layout.ts b/packages/kit/test/apps/prerendered-app-error-pages/src/routes/+layout.ts new file mode 100644 index 000000000000..189f71e2e1b3 --- /dev/null +++ b/packages/kit/test/apps/prerendered-app-error-pages/src/routes/+layout.ts @@ -0,0 +1 @@ +export const prerender = true; diff --git a/packages/kit/test/apps/prerendered-app-error-pages/src/routes/+page.svelte b/packages/kit/test/apps/prerendered-app-error-pages/src/routes/+page.svelte new file mode 100644 index 000000000000..e7b3bd731833 --- /dev/null +++ b/packages/kit/test/apps/prerendered-app-error-pages/src/routes/+page.svelte @@ -0,0 +1,4 @@ +

+ This app exists to assert that an app with only prerendered routes successfully renders custom + error pages. +

diff --git a/packages/create-svelte/templates/skeletonlib/static/favicon.png b/packages/kit/test/apps/prerendered-app-error-pages/static/favicon.png similarity index 100% rename from packages/create-svelte/templates/skeletonlib/static/favicon.png rename to packages/kit/test/apps/prerendered-app-error-pages/static/favicon.png diff --git a/packages/kit/test/apps/prerendered-app-error-pages/svelte.config.js b/packages/kit/test/apps/prerendered-app-error-pages/svelte.config.js new file mode 100644 index 000000000000..821c14379ec8 --- /dev/null +++ b/packages/kit/test/apps/prerendered-app-error-pages/svelte.config.js @@ -0,0 +1,6 @@ +/** @type {import('@sveltejs/kit').Config} */ +const config = { + kit: {} +}; + +export default config; diff --git a/packages/kit/test/apps/prerendered-app-error-pages/test/test.js b/packages/kit/test/apps/prerendered-app-error-pages/test/test.js new file mode 100644 index 000000000000..c1328e6aa556 --- /dev/null +++ b/packages/kit/test/apps/prerendered-app-error-pages/test/test.js @@ -0,0 +1,9 @@ +import { expect } from '@playwright/test'; +import { test } from '../../../utils.js'; + +test.describe.configure({ mode: 'parallel' }); + +test('renders error page on nonexistent route', async ({ page }) => { + await page.goto('/nonexistent', { wait_for_started: false }); + expect(await page.textContent('p')).toBe('This is your custom error page.'); +}); diff --git a/packages/create-svelte/templates/default/vite.config.js b/packages/kit/test/apps/prerendered-app-error-pages/vite.config.js similarity index 82% rename from packages/create-svelte/templates/default/vite.config.js rename to packages/kit/test/apps/prerendered-app-error-pages/vite.config.js index 3dc75a73b8e8..438fa14111b7 100644 --- a/packages/create-svelte/templates/default/vite.config.js +++ b/packages/kit/test/apps/prerendered-app-error-pages/vite.config.js @@ -1,13 +1,12 @@ -import path from 'node:path'; import { sveltekit } from '@sveltejs/kit/vite'; +import path from 'node:path'; import { defineConfig } from 'vite'; export default defineConfig({ plugins: [sveltekit()], - server: { fs: { - allow: [path.resolve('../../../kit')] + allow: [path.resolve('../../../src')] } } }); diff --git a/packages/kit/test/apps/read-file-test/[file].txt b/packages/kit/test/apps/read-file-test/[file].txt new file mode 100644 index 000000000000..7417d9e87b0b --- /dev/null +++ b/packages/kit/test/apps/read-file-test/[file].txt @@ -0,0 +1 @@ +Imported with url glob from the read-file test in basics. Placed here outside the app folder to force a /@fs prefix 😎 diff --git a/packages/kit/test/apps/writes/package.json b/packages/kit/test/apps/writes/package.json index 7734357a1e6b..0019074f72f7 100644 --- a/packages/kit/test/apps/writes/package.json +++ b/packages/kit/test/apps/writes/package.json @@ -6,6 +6,7 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check", "test": "pnpm test:dev && pnpm test:build", "test:dev": "cross-env DEV=true playwright test", @@ -13,11 +14,12 @@ }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "cross-env": "^7.0.3", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "cross-env": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/apps/writes/src/app.html b/packages/kit/test/apps/writes/src/app.html index 419c2fe0b79d..79d946ed86a3 100644 --- a/packages/kit/test/apps/writes/src/app.html +++ b/packages/kit/test/apps/writes/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/apps/writes/src/routes/new-route/zzzz1662642734866/+page.svelte b/packages/kit/test/apps/writes/src/routes/new-route/zzzz1662642734866/+page.svelte deleted file mode 100644 index 61fea9a32007..000000000000 --- a/packages/kit/test/apps/writes/src/routes/new-route/zzzz1662642734866/+page.svelte +++ /dev/null @@ -1 +0,0 @@ -

Hello new route

\ No newline at end of file diff --git a/packages/kit/test/apps/writes/src/routes/universal/+page.js b/packages/kit/test/apps/writes/src/routes/universal/+page.js new file mode 100644 index 000000000000..34f05382928b --- /dev/null +++ b/packages/kit/test/apps/writes/src/routes/universal/+page.js @@ -0,0 +1,3 @@ +document.body.style.backgroundColor = 'red'; + +export const ssr = false; diff --git a/packages/kit/test/apps/writes/src/routes/universal/+page.svelte b/packages/kit/test/apps/writes/src/routes/universal/+page.svelte new file mode 100644 index 000000000000..48aa4cb69f99 --- /dev/null +++ b/packages/kit/test/apps/writes/src/routes/universal/+page.svelte @@ -0,0 +1 @@ +

hello world

diff --git a/packages/kit/test/apps/writes/src/routes/universal/parent-changed/+layout.js b/packages/kit/test/apps/writes/src/routes/universal/parent-changed/+layout.js new file mode 100644 index 000000000000..a3d15781a772 --- /dev/null +++ b/packages/kit/test/apps/writes/src/routes/universal/parent-changed/+layout.js @@ -0,0 +1 @@ +export const ssr = false; diff --git a/packages/kit/test/apps/writes/src/routes/universal/parent-changed/+page.js b/packages/kit/test/apps/writes/src/routes/universal/parent-changed/+page.js new file mode 100644 index 000000000000..b01f93ba591a --- /dev/null +++ b/packages/kit/test/apps/writes/src/routes/universal/parent-changed/+page.js @@ -0,0 +1 @@ +document.body.style.backgroundColor = 'red'; diff --git a/packages/kit/test/apps/writes/src/routes/universal/parent-changed/+page.svelte b/packages/kit/test/apps/writes/src/routes/universal/parent-changed/+page.svelte new file mode 100644 index 000000000000..48aa4cb69f99 --- /dev/null +++ b/packages/kit/test/apps/writes/src/routes/universal/parent-changed/+page.svelte @@ -0,0 +1 @@ +

hello world

diff --git a/packages/kit/test/apps/writes/test/test.js b/packages/kit/test/apps/writes/test/test.js index 397cf0f10d85..e513c647f37d 100644 --- a/packages/kit/test/apps/writes/test/test.js +++ b/packages/kit/test/apps/writes/test/test.js @@ -1,5 +1,6 @@ import fs from 'node:fs'; import path from 'node:path'; +import process from 'node:process'; import { expect } from '@playwright/test'; import { fileURLToPath } from 'node:url'; import { test } from '../../../utils.js'; @@ -52,4 +53,63 @@ test.describe('Filesystem updates', () => { fs.writeFileSync(file, contents.replace(/PLACEHOLDER:\d+/, 'PLACEHOLDER:0')); } }); + + test('Universal node is updated when page options change', async ({ + page, + javaScriptEnabled, + get_computed_style + }) => { + test.skip(!process.env.DEV || !javaScriptEnabled); + + const file = fileURLToPath(new URL('../src/routes/universal/+page.js', import.meta.url)); + const contents = fs.readFileSync(file, 'utf-8'); + + try { + fs.writeFileSync(file, contents.replace(/export const ssr = false;\n/, '')); + await page.goto('/universal', { wait_for_started: false }); + expect(await get_computed_style('body', 'background-color')).not.toBe('rgb(255, 0, 0)'); + await expect(page.locator('h1')).toHaveText('Internal Error'); + } finally { + fs.writeFileSync(file, contents); + } + + await page.waitForTimeout(500); // this is the rare time we actually need waitForTimeout; we have no visibility into whether the module graph has been invalidated + // a reload is required because Vite HMR doesn't trigger if the page has never loaded successfully + await page.reload(); + expect(await get_computed_style('body', 'background-color')).toBe('rgb(255, 0, 0)'); + + try { + fs.writeFileSync(file, contents.replace(/export const ssr = .*;/, 'export const ssr = !1;')); + await page.waitForTimeout(500); // this is the rare time we actually need waitForTimeout; we have no visibility into whether the module graph has been invalidated + expect(await get_computed_style('body', 'background-color')).not.toBe('rgb(255, 0, 0)'); + await expect(page.locator('h1')).toHaveText('Internal Error'); + } finally { + fs.writeFileSync(file, contents.replace(/\\nexport const ssr = false;\\n/, '')); + } + }); + + test('Universal node is updated when parent page options change', async ({ + page, + javaScriptEnabled, + get_computed_style + }) => { + test.skip(!process.env.DEV || !javaScriptEnabled); + + const file = fileURLToPath( + new URL('../src/routes/universal/parent-changed/+layout.js', import.meta.url) + ); + const contents = fs.readFileSync(file, 'utf-8'); + + try { + await page.goto('/universal/parent-changed'); + expect(await get_computed_style('body', 'background-color')).toBe('rgb(255, 0, 0)'); + + fs.writeFileSync(file, contents.replace(/export const ssr = false;/, '')); + await page.waitForTimeout(500); // this is the rare time we actually need waitForTimeout; we have no visibility into whether the module graph has been invalidated + expect(await get_computed_style('body', 'background-color')).not.toBe('rgb(255, 0, 0)'); + await expect(page.locator('h1')).toHaveText('Internal Error'); + } finally { + fs.writeFileSync(file, contents); + } + }); }); diff --git a/packages/kit/test/apps/writes/tsconfig.json b/packages/kit/test/apps/writes/tsconfig.json index a1e1e2da2142..1d665886266b 100644 --- a/packages/kit/test/apps/writes/tsconfig.json +++ b/packages/kit/test/apps/writes/tsconfig.json @@ -4,12 +4,6 @@ "checkJs": true, "esModuleInterop": true, "noEmit": true, - "paths": { - "@sveltejs/kit": ["../../../types"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"], - "types": ["../../../types/internal"] - }, "resolveJsonModule": true }, "extends": "./.svelte-kit/tsconfig.json" diff --git a/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/package.json b/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/package.json index ca443111f8ee..ed6be529c597 100644 --- a/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/package.json +++ b/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/package.json @@ -6,15 +6,17 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check" }, "devDependencies": { "@sveltejs/adapter-auto": "workspace:^", "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/src/app.html b/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/src/app.html +++ b/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/tsconfig.json b/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/tsconfig.json index 95d9c037df6c..b1096bf168cd 100644 --- a/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/tsconfig.json +++ b/packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch/tsconfig.json @@ -2,14 +2,7 @@ "compilerOptions": { "allowJs": true, "checkJs": true, - "noEmit": true, - "module": "esnext", - "moduleResolution": "node", - "paths": { - "@sveltejs/kit": ["../../../../types"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"] - } + "noEmit": true }, "extends": "./.svelte-kit/tsconfig.json" } diff --git a/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json b/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json index ca443111f8ee..ed6be529c597 100644 --- a/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json +++ b/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/package.json @@ -6,15 +6,17 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check" }, "devDependencies": { "@sveltejs/adapter-auto": "workspace:^", "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/src/app.html b/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/src/app.html +++ b/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/tsconfig.json b/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/tsconfig.json index 95d9c037df6c..b1096bf168cd 100644 --- a/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/tsconfig.json +++ b/packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment/tsconfig.json @@ -2,14 +2,7 @@ "compilerOptions": { "allowJs": true, "checkJs": true, - "noEmit": true, - "module": "esnext", - "moduleResolution": "node", - "paths": { - "@sveltejs/kit": ["../../../../types"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"] - } + "noEmit": true }, "extends": "./.svelte-kit/tsconfig.json" } diff --git a/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json b/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json index 64e6938a7688..06ed1b3c0e2c 100644 --- a/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json +++ b/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/package.json @@ -6,15 +6,17 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check" }, "devDependencies": { "@sveltejs/adapter-auto": "workspace:^", "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/src/app.html b/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/src/app.html +++ b/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/tsconfig.json b/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/tsconfig.json index 95d9c037df6c..b1096bf168cd 100644 --- a/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/tsconfig.json +++ b/packages/kit/test/build-errors/apps/prerenderable-not-prerendered/tsconfig.json @@ -2,14 +2,7 @@ "compilerOptions": { "allowJs": true, "checkJs": true, - "noEmit": true, - "module": "esnext", - "moduleResolution": "node", - "paths": { - "@sveltejs/kit": ["../../../../types"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"] - } + "noEmit": true }, "extends": "./.svelte-kit/tsconfig.json" } diff --git a/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json b/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json index 0555ba65c743..342c59c5d5d3 100644 --- a/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json +++ b/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/package.json @@ -6,15 +6,17 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check", "check:watch": "svelte-check --watch" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/src/app.html b/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/src/app.html +++ b/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/tsconfig.json b/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/tsconfig.json index c7b5481da90e..dd43aaadc9cc 100644 --- a/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/tsconfig.json +++ b/packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import/tsconfig.json @@ -6,12 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "noEmit": true, - "paths": { - "types": ["../../../../types/internal"] - } + "noEmit": true } } diff --git a/packages/kit/test/build-errors/apps/private-dynamic-env/package.json b/packages/kit/test/build-errors/apps/private-dynamic-env/package.json index 7abec353c7f5..a79cd6f0e8f0 100644 --- a/packages/kit/test/build-errors/apps/private-dynamic-env/package.json +++ b/packages/kit/test/build-errors/apps/private-dynamic-env/package.json @@ -6,15 +6,17 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check", "check:watch": "svelte-check --watch" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/private-dynamic-env/src/app.html b/packages/kit/test/build-errors/apps/private-dynamic-env/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/private-dynamic-env/src/app.html +++ b/packages/kit/test/build-errors/apps/private-dynamic-env/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/private-dynamic-env/tsconfig.json b/packages/kit/test/build-errors/apps/private-dynamic-env/tsconfig.json index c7b5481da90e..dd43aaadc9cc 100644 --- a/packages/kit/test/build-errors/apps/private-dynamic-env/tsconfig.json +++ b/packages/kit/test/build-errors/apps/private-dynamic-env/tsconfig.json @@ -6,12 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "noEmit": true, - "paths": { - "types": ["../../../../types/internal"] - } + "noEmit": true } } diff --git a/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json b/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json index 87f24bd14e48..418081bb7baf 100644 --- a/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json +++ b/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/package.json @@ -6,15 +6,17 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check", "check:watch": "svelte-check --watch" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/src/app.html b/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/src/app.html +++ b/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/tsconfig.json b/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/tsconfig.json index c7b5481da90e..dd43aaadc9cc 100644 --- a/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/tsconfig.json +++ b/packages/kit/test/build-errors/apps/private-static-env-dynamic-import/tsconfig.json @@ -6,12 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "noEmit": true, - "paths": { - "types": ["../../../../types/internal"] - } + "noEmit": true } } diff --git a/packages/kit/test/build-errors/apps/private-static-env/package.json b/packages/kit/test/build-errors/apps/private-static-env/package.json index 902c36033938..41f544cc045d 100644 --- a/packages/kit/test/build-errors/apps/private-static-env/package.json +++ b/packages/kit/test/build-errors/apps/private-static-env/package.json @@ -6,16 +6,18 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check", "check:watch": "svelte-check --watch" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "cross-env": "^7.0.3", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "cross-env": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/private-static-env/src/app.html b/packages/kit/test/build-errors/apps/private-static-env/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/private-static-env/src/app.html +++ b/packages/kit/test/build-errors/apps/private-static-env/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/private-static-env/tsconfig.json b/packages/kit/test/build-errors/apps/private-static-env/tsconfig.json index c7b5481da90e..dd43aaadc9cc 100644 --- a/packages/kit/test/build-errors/apps/private-static-env/tsconfig.json +++ b/packages/kit/test/build-errors/apps/private-static-env/tsconfig.json @@ -6,12 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "noEmit": true, - "paths": { - "types": ["../../../../types/internal"] - } + "noEmit": true } } diff --git a/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json b/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json index b04150f3ea0d..2f3ca7eeb7e6 100644 --- a/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json +++ b/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/package.json @@ -6,15 +6,17 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check", "check:watch": "svelte-check --watch" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/src/app.html b/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/src/app.html +++ b/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/tsconfig.json b/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/tsconfig.json index 3688e97000b5..dd43aaadc9cc 100644 --- a/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/tsconfig.json +++ b/packages/kit/test/build-errors/apps/server-only-folder-dynamic-import/tsconfig.json @@ -6,14 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "noEmit": true, - "paths": { - "types": ["../../../../types/internal"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"] - } + "noEmit": true } } diff --git a/packages/kit/test/build-errors/apps/server-only-folder/package.json b/packages/kit/test/build-errors/apps/server-only-folder/package.json index 3c619379378d..05b132fdcb4f 100644 --- a/packages/kit/test/build-errors/apps/server-only-folder/package.json +++ b/packages/kit/test/build-errors/apps/server-only-folder/package.json @@ -6,15 +6,17 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check", "check:watch": "svelte-check --watch" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/server-only-folder/src/app.html b/packages/kit/test/build-errors/apps/server-only-folder/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/server-only-folder/src/app.html +++ b/packages/kit/test/build-errors/apps/server-only-folder/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/server-only-folder/tsconfig.json b/packages/kit/test/build-errors/apps/server-only-folder/tsconfig.json index 3688e97000b5..dd43aaadc9cc 100644 --- a/packages/kit/test/build-errors/apps/server-only-folder/tsconfig.json +++ b/packages/kit/test/build-errors/apps/server-only-folder/tsconfig.json @@ -6,14 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "noEmit": true, - "paths": { - "types": ["../../../../types/internal"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"] - } + "noEmit": true } } diff --git a/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json b/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json index c72e444292ed..3145860fd587 100644 --- a/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json +++ b/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/package.json @@ -6,15 +6,17 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check", "check:watch": "svelte-check --watch" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/src/app.html b/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/src/app.html +++ b/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/tsconfig.json b/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/tsconfig.json index 3688e97000b5..dd43aaadc9cc 100644 --- a/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/tsconfig.json +++ b/packages/kit/test/build-errors/apps/server-only-module-dynamic-import/tsconfig.json @@ -6,14 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "noEmit": true, - "paths": { - "types": ["../../../../types/internal"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"] - } + "noEmit": true } } diff --git a/packages/kit/test/build-errors/apps/server-only-module/package.json b/packages/kit/test/build-errors/apps/server-only-module/package.json index 3867042f313f..c32deabc2d57 100644 --- a/packages/kit/test/build-errors/apps/server-only-module/package.json +++ b/packages/kit/test/build-errors/apps/server-only-module/package.json @@ -6,15 +6,17 @@ "dev": "vite dev", "build": "vite build", "preview": "vite preview", + "prepare": "svelte-kit sync", "check": "svelte-kit sync && tsc && svelte-check", "check:watch": "svelte-check --watch" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/server-only-module/src/app.html b/packages/kit/test/build-errors/apps/server-only-module/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/server-only-module/src/app.html +++ b/packages/kit/test/build-errors/apps/server-only-module/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/server-only-module/tsconfig.json b/packages/kit/test/build-errors/apps/server-only-module/tsconfig.json index 3688e97000b5..dd43aaadc9cc 100644 --- a/packages/kit/test/build-errors/apps/server-only-module/tsconfig.json +++ b/packages/kit/test/build-errors/apps/server-only-module/tsconfig.json @@ -6,14 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "noEmit": true, - "paths": { - "types": ["../../../../types/internal"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"] - } + "noEmit": true } } diff --git a/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/.env b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/.env new file mode 100644 index 000000000000..dbbba5a4b5c8 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/.env @@ -0,0 +1 @@ +PUBLIC_SHOULD_EXPLODE=boom \ No newline at end of file diff --git a/packages/create-svelte/templates/skeleton/.gitignore b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/.gitignore similarity index 55% rename from packages/create-svelte/templates/skeleton/.gitignore rename to packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/.gitignore index 6635cf554275..f7382cf7da25 100644 --- a/packages/create-svelte/templates/skeleton/.gitignore +++ b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/.gitignore @@ -3,8 +3,6 @@ node_modules /build /.svelte-kit /package -.env +!.env .env.* !.env.example -vite.config.js.timestamp-* -vite.config.ts.timestamp-* diff --git a/packages/create-svelte/templates/default/.npmrc b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/.npmrc similarity index 100% rename from packages/create-svelte/templates/default/.npmrc rename to packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/.npmrc diff --git a/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/package.json b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/package.json new file mode 100644 index 000000000000..bf04f3497cf4 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/package.json @@ -0,0 +1,22 @@ +{ + "name": "service-worker-dynamic-public-env", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "prepare": "svelte-kit sync", + "check": "svelte-kit sync && tsc && svelte-check", + "check:watch": "svelte-check --watch" + }, + "devDependencies": { + "@sveltejs/kit": "workspace:^", + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" + }, + "type": "module" +} diff --git a/packages/create-svelte/templates/skeletonlib/src/app.html b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/src/app.html similarity index 81% rename from packages/create-svelte/templates/skeletonlib/src/app.html rename to packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/src/app.html index d2fc6b061c6a..866ddd01e176 100644 --- a/packages/create-svelte/templates/skeletonlib/src/app.html +++ b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/src/app.html @@ -1,4 +1,4 @@ - + @@ -6,7 +6,7 @@ %sveltekit.head% - +
%sveltekit.body%
diff --git a/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/src/routes/+page.svelte b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/src/routes/+page.svelte new file mode 100644 index 000000000000..cae41f739e76 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/src/routes/+page.svelte @@ -0,0 +1 @@ +

Bonjour

diff --git a/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/src/service-worker.js b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/src/service-worker.js new file mode 100644 index 000000000000..ac71ffc2a4b8 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/src/service-worker.js @@ -0,0 +1,3 @@ +import { env } from '$env/dynamic/public'; + +console.log('Logging dynamic public env', env.PUBLIC_SHOULD_EXPLODE); diff --git a/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/static/favicon.png b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/static/favicon.png new file mode 100644 index 000000000000..825b9e65af7c Binary files /dev/null and b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/static/favicon.png differ diff --git a/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/svelte.config.js b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/svelte.config.js new file mode 100644 index 000000000000..bded48544036 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/svelte.config.js @@ -0,0 +1,4 @@ +/** @type {import('@sveltejs/kit').Config} */ +const config = {}; + +export default config; diff --git a/packages/create-svelte/shared/+skeletonlib+typescript/tsconfig.json b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/tsconfig.json similarity index 81% rename from packages/create-svelte/shared/+skeletonlib+typescript/tsconfig.json rename to packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/tsconfig.json index f56aae6ff5c8..dd43aaadc9cc 100644 --- a/packages/create-svelte/shared/+skeletonlib+typescript/tsconfig.json +++ b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/tsconfig.json @@ -6,9 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "moduleResolution": "NodeNext" + "noEmit": true } } diff --git a/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/vite.config.js b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/vite.config.js new file mode 100644 index 000000000000..713f67a63de9 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-dynamic-public-env/vite.config.js @@ -0,0 +1,14 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import path from 'node:path'; + +/** @type {import('vite').UserConfig} */ +const config = { + plugins: [sveltekit()], + server: { + fs: { + allow: [path.resolve('../../../../src')] + } + } +}; + +export default config; diff --git a/packages/kit/test/build-errors/apps/service-worker-private-env/.env b/packages/kit/test/build-errors/apps/service-worker-private-env/.env new file mode 100644 index 000000000000..752bad1e78a0 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-private-env/.env @@ -0,0 +1 @@ +SHOULD_EXPLODE=boom \ No newline at end of file diff --git a/packages/create-svelte/templates/skeletonlib/.gitignore b/packages/kit/test/build-errors/apps/service-worker-private-env/.gitignore similarity index 52% rename from packages/create-svelte/templates/skeletonlib/.gitignore rename to packages/kit/test/build-errors/apps/service-worker-private-env/.gitignore index ac7211b4033c..f7382cf7da25 100644 --- a/packages/create-svelte/templates/skeletonlib/.gitignore +++ b/packages/kit/test/build-errors/apps/service-worker-private-env/.gitignore @@ -1,11 +1,8 @@ .DS_Store node_modules /build -/dist /.svelte-kit /package -.env +!.env .env.* !.env.example -vite.config.js.timestamp-* -vite.config.ts.timestamp-* diff --git a/packages/create-svelte/templates/skeleton/.npmrc b/packages/kit/test/build-errors/apps/service-worker-private-env/.npmrc similarity index 100% rename from packages/create-svelte/templates/skeleton/.npmrc rename to packages/kit/test/build-errors/apps/service-worker-private-env/.npmrc diff --git a/packages/kit/test/build-errors/apps/service-worker-private-env/package.json b/packages/kit/test/build-errors/apps/service-worker-private-env/package.json new file mode 100644 index 000000000000..faa6b326b6f2 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-private-env/package.json @@ -0,0 +1,22 @@ +{ + "name": "service-worker-private-env", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview", + "prepare": "svelte-kit sync", + "check": "svelte-kit sync && tsc && svelte-check", + "check:watch": "svelte-check --watch" + }, + "devDependencies": { + "@sveltejs/kit": "workspace:^", + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" + }, + "type": "module" +} diff --git a/packages/create-svelte/templates/skeleton/src/app.html b/packages/kit/test/build-errors/apps/service-worker-private-env/src/app.html similarity index 66% rename from packages/create-svelte/templates/skeleton/src/app.html rename to packages/kit/test/build-errors/apps/service-worker-private-env/src/app.html index 6769ed5e89c5..866ddd01e176 100644 --- a/packages/create-svelte/templates/skeleton/src/app.html +++ b/packages/kit/test/build-errors/apps/service-worker-private-env/src/app.html @@ -1,4 +1,4 @@ - + @@ -6,7 +6,7 @@ %sveltekit.head% - -
%sveltekit.body%
+ +
%sveltekit.body%
diff --git a/packages/kit/test/build-errors/apps/service-worker-private-env/src/routes/+page.svelte b/packages/kit/test/build-errors/apps/service-worker-private-env/src/routes/+page.svelte new file mode 100644 index 000000000000..cae41f739e76 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-private-env/src/routes/+page.svelte @@ -0,0 +1 @@ +

Bonjour

diff --git a/packages/kit/test/build-errors/apps/service-worker-private-env/src/service-worker.js b/packages/kit/test/build-errors/apps/service-worker-private-env/src/service-worker.js new file mode 100644 index 000000000000..39570b27e4b6 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-private-env/src/service-worker.js @@ -0,0 +1,3 @@ +import { env } from '$env/dynamic/private'; + +console.log('Logging private env', env); diff --git a/packages/kit/test/build-errors/apps/service-worker-private-env/static/favicon.png b/packages/kit/test/build-errors/apps/service-worker-private-env/static/favicon.png new file mode 100644 index 000000000000..825b9e65af7c Binary files /dev/null and b/packages/kit/test/build-errors/apps/service-worker-private-env/static/favicon.png differ diff --git a/packages/kit/test/build-errors/apps/service-worker-private-env/svelte.config.js b/packages/kit/test/build-errors/apps/service-worker-private-env/svelte.config.js new file mode 100644 index 000000000000..bded48544036 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-private-env/svelte.config.js @@ -0,0 +1,4 @@ +/** @type {import('@sveltejs/kit').Config} */ +const config = {}; + +export default config; diff --git a/packages/create-svelte/shared/+skeletonlib+checkjs/jsconfig.json b/packages/kit/test/build-errors/apps/service-worker-private-env/tsconfig.json similarity index 81% rename from packages/create-svelte/shared/+skeletonlib+checkjs/jsconfig.json rename to packages/kit/test/build-errors/apps/service-worker-private-env/tsconfig.json index f56aae6ff5c8..dd43aaadc9cc 100644 --- a/packages/create-svelte/shared/+skeletonlib+checkjs/jsconfig.json +++ b/packages/kit/test/build-errors/apps/service-worker-private-env/tsconfig.json @@ -6,9 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "moduleResolution": "NodeNext" + "noEmit": true } } diff --git a/packages/kit/test/build-errors/apps/service-worker-private-env/vite.config.js b/packages/kit/test/build-errors/apps/service-worker-private-env/vite.config.js new file mode 100644 index 000000000000..713f67a63de9 --- /dev/null +++ b/packages/kit/test/build-errors/apps/service-worker-private-env/vite.config.js @@ -0,0 +1,14 @@ +import { sveltekit } from '@sveltejs/kit/vite'; +import path from 'node:path'; + +/** @type {import('vite').UserConfig} */ +const config = { + plugins: [sveltekit()], + server: { + fs: { + allow: [path.resolve('../../../../src')] + } + } +}; + +export default config; diff --git a/packages/kit/test/build-errors/apps/syntax-error/package.json b/packages/kit/test/build-errors/apps/syntax-error/package.json index 8c0fa0496bcc..5cf0642202e6 100644 --- a/packages/kit/test/build-errors/apps/syntax-error/package.json +++ b/packages/kit/test/build-errors/apps/syntax-error/package.json @@ -5,14 +5,16 @@ "scripts": { "dev": "vite dev", "build": "vite build", - "preview": "vite preview" + "preview": "vite preview", + "prepare": "svelte-kit sync" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/build-errors/apps/syntax-error/src/app.html b/packages/kit/test/build-errors/apps/syntax-error/src/app.html index 2f8367462108..866ddd01e176 100644 --- a/packages/kit/test/build-errors/apps/syntax-error/src/app.html +++ b/packages/kit/test/build-errors/apps/syntax-error/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/build-errors/apps/syntax-error/tsconfig.json b/packages/kit/test/build-errors/apps/syntax-error/tsconfig.json index 3688e97000b5..dd43aaadc9cc 100644 --- a/packages/kit/test/build-errors/apps/syntax-error/tsconfig.json +++ b/packages/kit/test/build-errors/apps/syntax-error/tsconfig.json @@ -6,14 +6,8 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, - "skipLibCheck": true, "sourceMap": true, "strict": true, - "noEmit": true, - "paths": { - "types": ["../../../../types/internal"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"] - } + "noEmit": true } } diff --git a/packages/kit/test/build-errors/env.spec.js b/packages/kit/test/build-errors/env.spec.js index 4c213918dae7..64d21150f85a 100644 --- a/packages/kit/test/build-errors/env.spec.js +++ b/packages/kit/test/build-errors/env.spec.js @@ -1,51 +1,78 @@ import { assert, test } from 'vitest'; import { execSync } from 'node:child_process'; import path from 'node:path'; +import process from 'node:process'; -test('$env/dynamic/private is not statically importable from the client', () => { +const timeout = 60_000; + +test('$env/dynamic/private is not statically importable from the client', { timeout }, () => { assert.throws( () => execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/private-dynamic-env'), stdio: 'pipe', - timeout: 60000 + timeout }), /.*Cannot import \$env\/dynamic\/private into client-side code:.*/gs ); }); -test('$env/dynamic/private is not dynamically importable from the client', () => { +test('$env/dynamic/private is not dynamically importable from the client', { timeout }, () => { assert.throws( () => execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/private-dynamic-env-dynamic-import'), stdio: 'pipe', - timeout: 60000 + timeout }), /.*Cannot import \$env\/dynamic\/private into client-side code:.*/gs ); }); -test('$env/static/private is not statically importable from the client', () => { +test('$env/static/private is not statically importable from the client', { timeout }, () => { assert.throws( () => execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/private-static-env'), stdio: 'pipe', - timeout: 60000 + timeout }), /.*Cannot import \$env\/static\/private into client-side code:.*/gs ); }); -test('$env/static/private is not dynamically importable from the client', () => { +test('$env/static/private is not dynamically importable from the client', { timeout }, () => { assert.throws( () => execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/private-static-env-dynamic-import'), stdio: 'pipe', - timeout: 60000 + timeout }), /.*Cannot import \$env\/static\/private into client-side code:.*/gs ); }); + +test('$env/dynamic/private is not importable from the service worker', { timeout }, () => { + assert.throws( + () => + execSync('pnpm build', { + cwd: path.join(process.cwd(), 'apps/service-worker-private-env'), + stdio: 'pipe', + timeout: 60000 + }), + /.*Cannot import \$env\/dynamic\/private into service-worker code.*/gs + ); +}); + +test('$env/dynamic/public is not importable from the service worker', { timeout }, () => { + assert.throws( + () => + execSync('pnpm build', { + cwd: path.join(process.cwd(), 'apps/service-worker-dynamic-public-env'), + stdio: 'pipe', + timeout + }), + /.*Cannot import \$env\/dynamic\/public into service-worker code.*/gs + ); +}); diff --git a/packages/kit/test/build-errors/package.json b/packages/kit/test/build-errors/package.json index fe646c995463..94b3f3590ba9 100644 --- a/packages/kit/test/build-errors/package.json +++ b/packages/kit/test/build-errors/package.json @@ -8,6 +8,6 @@ }, "type": "module", "devDependencies": { - "vitest": "^0.34.5" + "vitest": "catalog:" } } diff --git a/packages/kit/test/build-errors/prerender.spec.js b/packages/kit/test/build-errors/prerender.spec.js index 848de79f8492..0bda6a070781 100644 --- a/packages/kit/test/build-errors/prerender.spec.js +++ b/packages/kit/test/build-errors/prerender.spec.js @@ -2,27 +2,30 @@ import { assert, test } from 'vitest'; import { execSync } from 'node:child_process'; import path from 'node:path'; import { EOL } from 'node:os'; +import process from 'node:process'; -test('prerenderable routes must be prerendered', () => { +const timeout = 60_000; + +test('prerenderable routes must be prerendered', { timeout }, () => { assert.throws( () => execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/prerenderable-not-prerendered'), stdio: 'pipe', - timeout: 60000 + timeout }), /The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app:\r?\n {2}- \/\[x\]/gs ); }); -test('entry generators should match their own route', () => { +test('entry generators should match their own route', { timeout }, () => { assert.throws( () => execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/prerender-entry-generator-mismatch'), stdio: 'pipe', - timeout: 60000 + timeout }), - `Error: The entries export from /[slug]/[notSpecific] generated entry /whatever/specific, which was matched by /[slug]/specific - see the \`handleEntryGeneratorMismatch\` option in https://kit.svelte.dev/docs/configuration#prerender for more info.${EOL}To suppress or handle this error, implement \`handleEntryGeneratorMismatch\` in https://kit.svelte.dev/docs/configuration#prerender` + `Error: The entries export from /[slug]/[notSpecific] generated entry /whatever/specific, which was matched by /[slug]/specific - see the \`handleEntryGeneratorMismatch\` option in https://svelte.dev/docs/kit/configuration#prerender for more info.${EOL}To suppress or handle this error, implement \`handleEntryGeneratorMismatch\` in https://svelte.dev/docs/kit/configuration#prerender` ); }); diff --git a/packages/kit/test/build-errors/server-only.spec.js b/packages/kit/test/build-errors/server-only.spec.js index 0c92a185a984..3275bb50e46c 100644 --- a/packages/kit/test/build-errors/server-only.spec.js +++ b/packages/kit/test/build-errors/server-only.spec.js @@ -1,69 +1,76 @@ import { assert, test } from 'vitest'; import { execSync } from 'node:child_process'; import path from 'node:path'; +import process from 'node:process'; -test('$lib/*.server.* is not statically importable from the client', () => { +const timeout = 60_000; + +test('$lib/*.server.* is not statically importable from the client', { timeout }, () => { try { execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/server-only-module'), stdio: 'pipe', - timeout: 60000 + timeout }); } catch (err) { + const message = /** @type {Error} */ (err).message; assert.ok( - err.message.includes('Cannot import $lib/test.server.js into client-side code'), - `received unexpected exception message ${err.message}` + message.includes('Cannot import $lib/test.server.js into client-side code'), + `received unexpected exception message ${message}` ); return; } throw new Error(); }); -test('$lib/*.server.* is not dynamically importable from the client', () => { +test('$lib/*.server.* is not dynamically importable from the client', { timeout }, () => { try { execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/server-only-module-dynamic-import'), stdio: 'pipe', - timeout: 60000 + timeout }); } catch (err) { + const message = /** @type {Error} */ (err).message; assert.ok( - err.message.includes('Cannot import $lib/test.server.js into client-side code'), - `received unexpected exception message ${err.message}` + message.includes('Cannot import $lib/test.server.js into client-side code'), + `received unexpected exception message ${message}` ); return; } throw new Error(); }); -test('$lib/server/* is not statically importable from the client', () => { +test('$lib/server/* is not statically importable from the client', { timeout }, () => { try { execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/server-only-folder'), stdio: 'pipe', - timeout: 60000 + timeout }); } catch (err) { + const message = /** @type {Error} */ (err).message; assert.ok( - err.message.includes('Cannot import $lib/server/something/private.js into client-side code'), - `received unexpected exception message ${err.message}` + message.includes('Cannot import $lib/server/something/private.js into client-side code'), + `received unexpected exception message ${message}` ); return; } throw new Error(); }); -test('$lib/server/* is not dynamically importable from the client', () => { +test('$lib/server/* is not dynamically importable from the client', { timeout }, () => { try { execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/server-only-folder-dynamic-import'), stdio: 'pipe', - timeout: 60000 + timeout }); } catch (err) { + const message = /** @type {Error} */ (err).message; assert.ok( - err.message.includes('Cannot import $lib/server/something/private.js into client-side code'), - `received unexpected exception message ${err.message}` + message.includes('Cannot import $lib/server/something/private.js into client-side code'), + `received unexpected exception message ${message}` ); return; } diff --git a/packages/kit/test/build-errors/syntax-error.spec.js b/packages/kit/test/build-errors/syntax-error.spec.js index dd481bf2bb2e..9abc21f59ba2 100644 --- a/packages/kit/test/build-errors/syntax-error.spec.js +++ b/packages/kit/test/build-errors/syntax-error.spec.js @@ -1,18 +1,22 @@ import { assert, test } from 'vitest'; import { execSync } from 'node:child_process'; import path from 'node:path'; +import process from 'node:process'; -test('$lib/*.server.* is not statically importable from the client', () => { +const timeout = 60_000; + +test('$lib/*.server.* is not statically importable from the client', { timeout }, () => { try { execSync('pnpm build', { cwd: path.join(process.cwd(), 'apps/syntax-error'), stdio: 'pipe', - timeout: 60000 + timeout }); } catch (err) { + const message = /** @type {Error} */ (err).message; assert.ok( - err.message.includes('Unexpected end of input'), - `received unexpected exception message ${err.message}` + message.includes('Unexpected end of input'), + `received unexpected exception message ${message}` ); return; } diff --git a/packages/migrate/tsconfig.json b/packages/kit/test/build-errors/tsconfig.json similarity index 78% rename from packages/migrate/tsconfig.json rename to packages/kit/test/build-errors/tsconfig.json index 1bd4194a49b1..e502a4f0c0d3 100644 --- a/packages/migrate/tsconfig.json +++ b/packages/kit/test/build-errors/tsconfig.json @@ -9,5 +9,5 @@ "moduleResolution": "node", "allowSyntheticDefaultImports": true }, - "include": ["./migrations/**/*", "./utils.js", "./bin.js"] + "include": ["./*"] } diff --git a/packages/kit/test/github-flaky-warning-reporter.js b/packages/kit/test/github-flaky-warning-reporter.js index 59eb5e5a4261..9e268fcd84c7 100644 --- a/packages/kit/test/github-flaky-warning-reporter.js +++ b/packages/kit/test/github-flaky-warning-reporter.js @@ -1,3 +1,5 @@ +import { appendFileSync } from 'node:fs'; + /** * @class * @implements {import('@playwright/test/reporter').Reporter} @@ -24,12 +26,17 @@ export default class GithubFlakyWarningReporter { } onEnd() { - this._flaky.forEach(({ file, line, title, message }) => { - console.log(`::warning file=${file},line=${line},title=${title}::${message}`); - }); + const output = this._flaky + .map( + ({ file, line, title, message }) => + `::warning file=${file},line=${line},title=${title}::${message}\n` + ) + .join(''); + + appendFileSync(new URL('../../../_tmp_flaky_test_output.txt', import.meta.url), output); } printsToStdio() { - return true; + return false; } } diff --git a/packages/kit/test/mocks/path.js b/packages/kit/test/mocks/path.js new file mode 100644 index 000000000000..5919601b2122 --- /dev/null +++ b/packages/kit/test/mocks/path.js @@ -0,0 +1,3 @@ +export const base = ''; +export const assets = ''; +export const app_dir = '_app'; diff --git a/packages/kit/test/prerendering/basics/.gitignore b/packages/kit/test/prerendering/basics/.gitignore index 1e18f275e97c..2cdfa4f71258 100644 --- a/packages/kit/test/prerendering/basics/.gitignore +++ b/packages/kit/test/prerendering/basics/.gitignore @@ -1 +1,3 @@ -!.env \ No newline at end of file +!.env + +missing_ids diff --git a/packages/kit/test/prerendering/basics/globalSetup.js b/packages/kit/test/prerendering/basics/globalSetup.js new file mode 100644 index 000000000000..3175a7093312 --- /dev/null +++ b/packages/kit/test/prerendering/basics/globalSetup.js @@ -0,0 +1,5 @@ +import { execSync } from 'node:child_process'; + +export default function setup() { + execSync('svelte-kit sync && pnpm run build'); +} diff --git a/packages/kit/test/prerendering/basics/package.json b/packages/kit/test/prerendering/basics/package.json index 80cb01b1e8e7..d820648777c6 100644 --- a/packages/kit/test/prerendering/basics/package.json +++ b/packages/kit/test/prerendering/basics/package.json @@ -4,19 +4,20 @@ "version": "0.0.2-next.0", "scripts": { "dev": "vite dev", - "build": "vite build", + "build": "rm -rf ./missing_ids && mkdir ./missing_ids && vite build", "preview": "vite preview", "check": "svelte-kit sync && tsc && svelte-check", - "test": "svelte-kit sync && pnpm build && vitest run", + "test": "vitest run", "test:cross-platform": "pnpm test" }, "devDependencies": { "@sveltejs/kit": "workspace:^", - "svelte": "^4.0.5", - "svelte-check": "^3.4.4", - "typescript": "^4.9.4", - "vite": "^4.4.9", - "vitest": "^0.34.5" + "@sveltejs/vite-plugin-svelte": "catalog:", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.4", + "vite": "catalog:", + "vitest": "catalog:" }, "type": "module" } diff --git a/packages/kit/test/prerendering/basics/src/app.html b/packages/kit/test/prerendering/basics/src/app.html index 3b96b1bd319c..f1612538ff44 100644 --- a/packages/kit/test/prerendering/basics/src/app.html +++ b/packages/kit/test/prerendering/basics/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/packages/kit/test/prerendering/basics/src/routes/encoding/[path]/+page.svelte b/packages/kit/test/prerendering/basics/src/routes/encoding/[path]/+page.svelte index 214b67acfc80..7e168dd2a3fe 100644 --- a/packages/kit/test/prerendering/basics/src/routes/encoding/[path]/+page.svelte +++ b/packages/kit/test/prerendering/basics/src/routes/encoding/[path]/+page.svelte @@ -1,5 +1,5 @@ -

{$page.params.path} / {$page.url.pathname}

+

{page.params.path} / {page.url.pathname}

diff --git a/packages/kit/test/prerendering/basics/src/routes/encoding/redirect/+page.js b/packages/kit/test/prerendering/basics/src/routes/encoding/redirect/+page.js index d40db8a08882..69eaf737efb8 100644 --- a/packages/kit/test/prerendering/basics/src/routes/encoding/redirect/+page.js +++ b/packages/kit/test/prerendering/basics/src/routes/encoding/redirect/+page.js @@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit'; /** @type {import('@sveltejs/kit').Load} */ export function load() { - throw redirect(307, '/encoding/redirected%20path%20with%20encoded%20spaces'); + redirect(307, '/encoding/redirected%20path%20with%20encoded%20spaces'); } diff --git a/packages/kit/test/prerendering/basics/src/routes/env/+page.server.js b/packages/kit/test/prerendering/basics/src/routes/env/+page.server.js index 617a8542fd21..d0f085387247 100644 --- a/packages/kit/test/prerendering/basics/src/routes/env/+page.server.js +++ b/packages/kit/test/prerendering/basics/src/routes/env/+page.server.js @@ -1,9 +1,7 @@ import { PRIVATE_STATIC } from '$env/static/private'; -import { env } from '$env/dynamic/private'; export function load() { return { - PRIVATE_STATIC, - PRIVATE_DYNAMIC: env.PRIVATE_DYNAMIC + PRIVATE_STATIC }; } diff --git a/packages/kit/test/prerendering/basics/src/routes/env/+page.svelte b/packages/kit/test/prerendering/basics/src/routes/env/+page.svelte index 4ee2f424da67..bb13de1f8f55 100644 --- a/packages/kit/test/prerendering/basics/src/routes/env/+page.svelte +++ b/packages/kit/test/prerendering/basics/src/routes/env/+page.svelte @@ -1,13 +1,9 @@

PRIVATE_STATIC: {data.PRIVATE_STATIC}

-

PRIVATE_DYNAMIC: {data.PRIVATE_DYNAMIC}

-

PUBLIC_STATIC: {PUBLIC_STATIC}

-

PUBLIC_DYNAMIC: {env.PUBLIC_DYNAMIC}

diff --git a/packages/kit/test/prerendering/basics/src/routes/missing-id/+page.svelte b/packages/kit/test/prerendering/basics/src/routes/missing-id/+page.svelte new file mode 100644 index 000000000000..83671c4420d3 --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/missing-id/+page.svelte @@ -0,0 +1,2 @@ +Bad link +Bad link diff --git a/packages/kit/test/prerendering/basics/src/routes/optional-params/[[optional]]/+page.svelte b/packages/kit/test/prerendering/basics/src/routes/optional-params/[[optional]]/+page.svelte new file mode 100644 index 000000000000..3438d28471db --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/optional-params/[[optional]]/+page.svelte @@ -0,0 +1 @@ +Path with Value diff --git a/packages/kit/test/prerendering/basics/src/routes/origin/+page.svelte b/packages/kit/test/prerendering/basics/src/routes/origin/+page.svelte index eb8ba6ef08b9..2883da5a2b16 100644 --- a/packages/kit/test/prerendering/basics/src/routes/origin/+page.svelte +++ b/packages/kit/test/prerendering/basics/src/routes/origin/+page.svelte @@ -1,9 +1,9 @@

{data.message}

-

{$page.url.origin}

+

{page.url.origin}

diff --git a/packages/kit/test/prerendering/basics/src/routes/page.html/+page.server.js b/packages/kit/test/prerendering/basics/src/routes/page.html/+page.server.js new file mode 100644 index 000000000000..f10d94d2ba04 --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/page.html/+page.server.js @@ -0,0 +1,5 @@ +export function load() { + return { + message: 'hello' + }; +} diff --git a/packages/kit/test/prerendering/basics/src/routes/page.html/+page.svelte b/packages/kit/test/prerendering/basics/src/routes/page.html/+page.svelte new file mode 100644 index 000000000000..439e64448c2b --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/page.html/+page.svelte @@ -0,0 +1,5 @@ + + +

{data.message}

diff --git a/packages/kit/test/prerendering/basics/src/routes/prerender-origin/+page.svelte b/packages/kit/test/prerendering/basics/src/routes/prerender-origin/+page.svelte new file mode 100644 index 000000000000..3efb366b452a --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/prerender-origin/+page.svelte @@ -0,0 +1,6 @@ + + +Please crawl this diff --git a/packages/kit/test/prerendering/basics/src/routes/prerender-origin/[dynamic]/+page.svelte b/packages/kit/test/prerendering/basics/src/routes/prerender-origin/[dynamic]/+page.svelte new file mode 100644 index 000000000000..f335a4f3cb07 --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/prerender-origin/[dynamic]/+page.svelte @@ -0,0 +1,4 @@ +

+ This page will only be discovered if full hrefs that start with config.prerender.origin are + crawled +

diff --git a/packages/kit/test/prerendering/basics/src/routes/redirect-encoded/+page.js b/packages/kit/test/prerendering/basics/src/routes/redirect-encoded/+page.js index 9dfac2b31492..0b5f120e8035 100644 --- a/packages/kit/test/prerendering/basics/src/routes/redirect-encoded/+page.js +++ b/packages/kit/test/prerendering/basics/src/routes/redirect-encoded/+page.js @@ -2,8 +2,5 @@ import { redirect } from '@sveltejs/kit'; /** @type {import('@sveltejs/kit').Load} */ export function load() { - throw redirect( - 301, - `https://example.com/redirected?returnTo=${encodeURIComponent('/foo?bar=baz')}` - ); + redirect(301, `https://example.com/redirected?returnTo=${encodeURIComponent('/foo?bar=baz')}`); } diff --git a/packages/kit/test/prerendering/basics/src/routes/redirect-malicious/+page.js b/packages/kit/test/prerendering/basics/src/routes/redirect-malicious/+page.js index 6fd54b56dfda..2f8cbe6b9caa 100644 --- a/packages/kit/test/prerendering/basics/src/routes/redirect-malicious/+page.js +++ b/packages/kit/test/prerendering/basics/src/routes/redirect-malicious/+page.js @@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit'; /** @type {import('@sveltejs/kit').Load} */ export function load() { - throw redirect(301, 'https://example.com/alert("pwned")'); + redirect(301, 'https://example.com/alert("pwned")'); } diff --git a/packages/kit/test/prerendering/basics/src/routes/redirect-relative/+page.js b/packages/kit/test/prerendering/basics/src/routes/redirect-relative/+page.js index dc685417407a..458b93125f2a 100644 --- a/packages/kit/test/prerendering/basics/src/routes/redirect-relative/+page.js +++ b/packages/kit/test/prerendering/basics/src/routes/redirect-relative/+page.js @@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit'; /** @type {import('@sveltejs/kit').Load} */ export function load() { - throw redirect(301, '/env'); + redirect(301, '/env'); } diff --git a/packages/kit/test/prerendering/basics/src/routes/redirect-server/+page.server.js b/packages/kit/test/prerendering/basics/src/routes/redirect-server/+page.server.js index 0ed002001e08..c61c65b8d644 100644 --- a/packages/kit/test/prerendering/basics/src/routes/redirect-server/+page.server.js +++ b/packages/kit/test/prerendering/basics/src/routes/redirect-server/+page.server.js @@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit'; /** @type {import('@sveltejs/kit').Load} */ export function load() { - throw redirect(301, 'https://example.com/redirected'); + redirect(301, 'https://example.com/redirected'); } diff --git a/packages/kit/test/prerendering/basics/src/routes/redirect/+page.js b/packages/kit/test/prerendering/basics/src/routes/redirect/+page.js index 0ed002001e08..c61c65b8d644 100644 --- a/packages/kit/test/prerendering/basics/src/routes/redirect/+page.js +++ b/packages/kit/test/prerendering/basics/src/routes/redirect/+page.js @@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit'; /** @type {import('@sveltejs/kit').Load} */ export function load() { - throw redirect(301, 'https://example.com/redirected'); + redirect(301, 'https://example.com/redirected'); } diff --git a/packages/kit/test/prerendering/basics/src/routes/shadowed-get/ssr-off/+page.server.js b/packages/kit/test/prerendering/basics/src/routes/shadowed-get/ssr-off/+page.server.js new file mode 100644 index 000000000000..ac41ba4b7e77 --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/shadowed-get/ssr-off/+page.server.js @@ -0,0 +1,7 @@ +export const ssr = false; + +export function load() { + return { + answer: 42 + }; +} diff --git a/packages/kit/test/prerendering/basics/src/routes/shadowed-get/ssr-off/+page.svelte b/packages/kit/test/prerendering/basics/src/routes/shadowed-get/ssr-off/+page.svelte new file mode 100644 index 000000000000..a475b1237f27 --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/shadowed-get/ssr-off/+page.svelte @@ -0,0 +1,6 @@ + + +

The answer is {data.answer}

diff --git a/packages/kit/test/prerendering/basics/src/routes/spa-shell/+page.js b/packages/kit/test/prerendering/basics/src/routes/spa-shell/+page.js new file mode 100644 index 000000000000..55a527fff567 --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/spa-shell/+page.js @@ -0,0 +1,10 @@ +import { redirect } from '@sveltejs/kit'; + +export const prerender = true; + +export const ssr = false; + +/** @type {import('@sveltejs/kit').Load} */ +export function load() { + redirect(301, 'https://example.com/redirected'); +} diff --git a/packages/kit/test/prerendering/basics/src/routes/spa-shell/+page.server.js b/packages/kit/test/prerendering/basics/src/routes/spa-shell/+page.server.js new file mode 100644 index 000000000000..7dbe1c850533 --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/spa-shell/+page.server.js @@ -0,0 +1 @@ +// spa shell should still prererender when +page.server.js exists but it has no load function diff --git a/packages/kit/test/prerendering/basics/src/routes/spa-shell/+page.svelte b/packages/kit/test/prerendering/basics/src/routes/spa-shell/+page.svelte new file mode 100644 index 000000000000..c1c9cf988847 --- /dev/null +++ b/packages/kit/test/prerendering/basics/src/routes/spa-shell/+page.svelte @@ -0,0 +1 @@ +

this won't be prerendered

diff --git a/packages/kit/test/prerendering/basics/src/service-worker.js b/packages/kit/test/prerendering/basics/src/service-worker.js index ae0028371d35..8ccabc616961 100644 --- a/packages/kit/test/prerendering/basics/src/service-worker.js +++ b/packages/kit/test/prerendering/basics/src/service-worker.js @@ -1,3 +1,4 @@ +import process from 'node:process'; import { prerendered } from '$service-worker'; console.log(prerendered); diff --git a/packages/kit/test/prerendering/basics/svelte.config.js b/packages/kit/test/prerendering/basics/svelte.config.js index 7b3f0440fd79..da247d1b0ab9 100644 --- a/packages/kit/test/prerendering/basics/svelte.config.js +++ b/packages/kit/test/prerendering/basics/svelte.config.js @@ -1,4 +1,5 @@ import adapter from '../../../../adapter-static/index.js'; +import { writeFileSync } from 'node:fs'; /** @type {import('@sveltejs/kit').Config} */ const config = { @@ -7,7 +8,10 @@ const config = { prerender: { handleHttpError: 'warn', - origin: 'http://example.com' + origin: 'http://prerender.origin', + handleMissingId: ({ id }) => { + writeFileSync('./missing_ids/index.jsonl', JSON.stringify(id) + ',', 'utf-8'); + } } } }; diff --git a/packages/kit/test/prerendering/basics/test/tests.spec.js b/packages/kit/test/prerendering/basics/test/tests.spec.js index 993f4f022dfd..7c6988a20f63 100644 --- a/packages/kit/test/prerendering/basics/test/tests.spec.js +++ b/packages/kit/test/prerendering/basics/test/tests.spec.js @@ -1,11 +1,27 @@ -import * as fs from 'node:fs'; +import fs from 'node:fs'; import { fileURLToPath } from 'node:url'; import { assert, expect, test } from 'vitest'; import { replace_hydration_attrs } from '../../test-utils'; const build = fileURLToPath(new URL('../build', import.meta.url)); -/** @param {string} file */ +/** + * @overload + * @param {string} file + * @param {BufferEncoding} [encoding] + * @returns {string} + */ +/** + * @overload + * @param {string} file + * @param {null} encoding + * @returns {Buffer} + */ +/** + * @param {string} file + * @param {BufferEncoding | null} [encoding] + * @returns {string | Buffer} + */ const read = (file, encoding = 'utf-8') => fs.readFileSync(`${build}/${file}`, encoding); test('prerenders /', () => { @@ -60,6 +76,14 @@ test('renders a relative redirect', () => { ); }); +test('renders a shell when SSR is turned off and there is no server data', () => { + const content = read('spa-shell.html'); + assert.match( + content, + /\n([\s]*?)([\s]*?)([\s]*?)([\s\S]*?)<\/head>\n([\s]*?)([\s]*?) -

{$page.params.slug}

\ No newline at end of file +

{page.params.slug}

diff --git a/packages/kit/test/prerendering/paths-base/src/routes/redirect/+page.js b/packages/kit/test/prerendering/paths-base/src/routes/redirect/+page.js index 84d4247b57a2..d27f8e81c372 100644 --- a/packages/kit/test/prerendering/paths-base/src/routes/redirect/+page.js +++ b/packages/kit/test/prerendering/paths-base/src/routes/redirect/+page.js @@ -2,5 +2,5 @@ import { redirect } from '@sveltejs/kit'; import { base } from '$app/paths'; export function load() { - throw redirect(301, `${base}/dynamic/foo`); + redirect(301, `${base}/dynamic/foo`); } diff --git a/packages/kit/test/prerendering/paths-base/tsconfig.json b/packages/kit/test/prerendering/paths-base/tsconfig.json index df547741d5bb..b1096bf168cd 100644 --- a/packages/kit/test/prerendering/paths-base/tsconfig.json +++ b/packages/kit/test/prerendering/paths-base/tsconfig.json @@ -2,15 +2,7 @@ "compilerOptions": { "allowJs": true, "checkJs": true, - "noEmit": true, - "module": "esnext", - "moduleResolution": "node", - "paths": { - "@sveltejs/kit": ["../../../types"], - "$lib": ["./src/lib"], - "$lib/*": ["./src/lib/*"], - "types": ["../../../types/internal"] - } + "noEmit": true }, "extends": "./.svelte-kit/tsconfig.json" } diff --git a/packages/kit/test/prerendering/paths-base/vite.config.js b/packages/kit/test/prerendering/paths-base/vite.config.js index 4b90a7655ee5..2857b2592d11 100644 --- a/packages/kit/test/prerendering/paths-base/vite.config.js +++ b/packages/kit/test/prerendering/paths-base/vite.config.js @@ -4,7 +4,9 @@ import { sveltekit } from '@sveltejs/kit/vite'; /** @type {import('vite').UserConfig} */ const config = { build: { - minify: false + minify: false, + // disable inlining to test asset base path + assetsInlineLimit: 0 }, clearScreen: false, diff --git a/packages/kit/test/tsconfig.json b/packages/kit/test/tsconfig.json index 4aa5d15ca67c..4e6297280a0e 100644 --- a/packages/kit/test/tsconfig.json +++ b/packages/kit/test/tsconfig.json @@ -7,11 +7,7 @@ "target": "esnext", "module": "esnext", "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "paths": { - "@sveltejs/kit": ["../types/index"], - // internal use only - "types": ["../types/internal"] - } - } + "allowSyntheticDefaultImports": true + }, + "include": ["./*", "./mocks/**/*", "./prerendering/*"] } diff --git a/packages/kit/test/types/actions.test.ts b/packages/kit/test/types/actions.test.ts index 8ca089d18c28..db824f8da883 100644 --- a/packages/kit/test/types/actions.test.ts +++ b/packages/kit/test/types/actions.test.ts @@ -1,9 +1,10 @@ -import Kit from '@sveltejs/kit'; +import * as Kit from '@sveltejs/kit'; // Test: Action types inferred correctly and transformed into a union type Actions = { foo: () => Promise; bar: () => Promise<{ success: boolean } | Kit.ActionFailure<{ message: string }>>; + baz: () => Kit.ActionFailure<{ foo: string }> | { status: number; data: string }; }; let form: Kit.AwaitedActions = null as any; @@ -23,3 +24,17 @@ form2.message = ''; form2.success = true; // @ts-expect-error - cannot both be present at the same time form2 = { message: '', success: true }; + +// Test: ActionFailure is correctly infered to be different from the normal return type even if they have the same shape +type Actions3 = { + bar: () => Kit.ActionFailure<{ foo: string }> | { status: number; data: { bar: string } }; +}; +let form3: Kit.AwaitedActions = null as any; +form3.foo = ''; +form3.status = 200; +// @ts-expect-error - cannot both be present at the same time +form3 = { foo: '', status: 200 }; + +const foo: any = null; +// @ts-expect-error ActionFailure is not a class and so you can't do instanceof +foo instanceof Kit.ActionFailure; diff --git a/packages/kit/test/types/load.test.ts b/packages/kit/test/types/load.test.ts index 321d70931bdd..10cc108af530 100644 --- a/packages/kit/test/types/load.test.ts +++ b/packages/kit/test/types/load.test.ts @@ -1,20 +1,12 @@ -import Kit, { Deferred } from '@sveltejs/kit'; +import * as Kit from '@sveltejs/kit'; // Test: Return types inferred correctly and transformed into a union -type LoadReturn1 = { success: true } | { message: Promise }; +type LoadReturn1 = + | { success: true; message?: undefined } + | { success?: undefined; message: string }; -let result1: Kit.AwaitedProperties = null as any; +let result1: Kit.LoadProperties = null as any; result1.message = ''; result1.success = true; // @ts-expect-error - cannot both be present at the same time result1 = { message: '', success: true }; - -// Test: Return types keep promise for Deferred -type LoadReturn2 = { success: true } | Deferred<{ message: Promise; eager: true }>; - -let result2: Kit.AwaitedProperties = null as any; -result2.message = Promise.resolve(''); -result2.eager = true; -result2.success = true; -// @ts-expect-error - cannot both be present at the same time -result2 = { message: '', success: true }; diff --git a/packages/kit/test/utils.d.ts b/packages/kit/test/utils.d.ts index 6ba3c0b8d89f..de03974f5baa 100644 --- a/packages/kit/test/utils.d.ts +++ b/packages/kit/test/utils.d.ts @@ -4,10 +4,12 @@ import { PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, - TestType + TestType, + Page } from '@playwright/test'; -import { IncomingMessage, ServerResponse } from 'http'; -import { Plugin } from 'vite'; +import { IncomingMessage, ServerResponse } from 'node:http'; +import '../types/index'; +import { AfterNavigate, BeforeNavigate } from '@sveltejs/kit'; export const test: TestType< PlaywrightTestArgs & @@ -15,12 +17,13 @@ export const test: TestType< app: { goto(url: string, opts?: { replaceState?: boolean }): Promise; invalidate(url: string): Promise; - beforeNavigate(url: URL): void | boolean; - afterNavigate(url: URL): void; - preloadCode(...urls: string[]): Promise; + beforeNavigate(fn: (navigation: BeforeNavigate) => void | boolean): void; + afterNavigate(fn: (navigation: AfterNavigate) => void): void; + preloadCode(pathname: string): Promise; preloadData(url: string): Promise; }; - clicknav(selector: string, options?: { timeout?: number }): Promise; + clicknav(selector: string, options?: Parameters[0]): Promise; + scroll_to(x: number, y: number): Promise; in_view(selector: string): Promise; get_computed_style(selector: string, prop: string): Promise; /** @@ -30,16 +33,15 @@ export const test: TestType< start_server( handler: (req: IncomingMessage, res: ServerResponse) => void ): Promise<{ port: number }>; - page: PlaywrightTestArgs['page'] & { + page: Page & { goto: ( url: string, - opts?: Parameters[1] & { wait_for_started?: boolean } - ) => ReturnType; + opts?: Parameters[1] & { wait_for_started?: boolean } + ) => ReturnType; }; + baseURL: string; }, PlaywrightWorkerArgs & PlaywrightWorkerOptions >; export const config: PlaywrightTestConfig; - -export const plugin: () => Plugin; diff --git a/packages/kit/test/utils.js b/packages/kit/test/utils.js index d87a68de29d5..e7c84a51069c 100644 --- a/packages/kit/test/utils.js +++ b/packages/kit/test/utils.js @@ -1,54 +1,26 @@ import fs from 'node:fs'; -import path from 'node:path'; import http from 'node:http'; -import { test as base, devices } from '@playwright/test'; +import path from 'node:path'; +import process from 'node:process'; import { fileURLToPath } from 'node:url'; +import { test as base, devices } from '@playwright/test'; +/** @type {import('./utils.js')['test']} */ export const test = base.extend({ - app: async ({ page }, use) => { + app: ({ page }, use) => { // these are assumed to have been put in the global scope by the layout - use({ - /** - * @param {string} url - * @param {{ replaceState?: boolean }} opts - * @returns {Promise} - */ - goto: (url, opts) => - page.evaluate( - (/** @type {{ url: string, opts: { replaceState?: boolean } }} */ { url, opts }) => - goto(url, opts), - { url, opts } - ), - - /** - * @param {string} url - * @returns {Promise} - */ - invalidate: (url) => page.evaluate((/** @type {string} */ url) => invalidate(url), url), - - /** - * @param {(url: URL) => void | boolean | Promise} fn - * @returns {Promise} - */ - beforeNavigate: (fn) => - page.evaluate((/** @type {(url: URL) => any} */ fn) => beforeNavigate(fn), fn), - - /** - * @returns {Promise} - */ + void use({ + goto: (url, opts) => page.evaluate(({ url, opts }) => goto(url, opts), { url, opts }), + + invalidate: (url) => page.evaluate((url) => invalidate(url), url), + + beforeNavigate: (fn) => page.evaluate((fn) => beforeNavigate(fn), fn), + afterNavigate: () => page.evaluate(() => afterNavigate(() => {})), - /** - * @param {string[]} urls - * @returns {Promise} - */ - preloadCode: (...urls) => page.evaluate((urls) => preloadCode(...urls), urls), - - /** - * @param {string} url - * @returns {Promise} - */ - preloadData: (url) => page.evaluate((/** @type {string} */ url) => preloadData(url), url) + preloadCode: (pathname) => page.evaluate((pathname) => preloadCode(pathname), pathname), + + preloadData: (url) => page.evaluate((url) => preloadData(url), url) }); }, @@ -66,18 +38,48 @@ export const test = base.extend({ } } - use(clicknav); + await use(clicknav); + }, + + scroll_to: async ({ page }, use) => { + /** + * @param {number} x + * @param {number} y + */ + async function scroll_to(x, y) { + // The browser will do this for us, but we need to do it pre-emptively + // so that we can check the scroll location. + // Otherwise, we'd be checking a decimal number against an integer. + x = Math.trunc(x); + y = Math.trunc(y); + const watcher = page.waitForFunction( + /** @param {{ x: number, y: number }} opt */ (opt) => + // check if the scroll position reached the desired or maximum position + window.scrollX === + Math.min(opt.x, document.documentElement.offsetWidth - window.innerWidth) && + window.scrollY === + Math.min(opt.y, document.documentElement.offsetHeight - window.innerHeight), + { x, y } + ); + await page.evaluate( + /** @param {{ x: number, y: number }} opt */ (opt) => window.scrollTo(opt.x, opt.y), + { x, y } + ); + await watcher; + } + + await use(scroll_to); }, in_view: async ({ page }, use) => { /** @param {string} selector */ async function in_view(selector) { const box = await page.locator(selector).boundingBox(); - const view = await page.viewportSize(); - return box && view && box.y < view.height && box.y + box.height > 0; + const view = page.viewportSize(); + return !!box && !!view && box.y < view.height && box.y + box.height > 0; } - use(in_view); + await use(in_view); }, get_computed_style: async ({ page }, use) => { @@ -85,7 +87,7 @@ export const test = base.extend({ * @param {string} selector * @param {string} prop */ - async function get_computed_style(selector, prop) { + function get_computed_style(selector, prop) { return page.$eval( selector, (node, prop) => window.getComputedStyle(node).getPropertyValue(prop), @@ -98,28 +100,39 @@ export const test = base.extend({ page: async ({ page, javaScriptEnabled }, use) => { // automatically wait for kit started event after navigation functions if js is enabled - const page_navigation_functions = ['goto', 'goBack', 'reload']; + const page_navigation_functions = /** @type {const} */ (['goto', 'goBack', 'reload']); page_navigation_functions.forEach((fn) => { - // @ts-expect-error - const page_fn = page[fn]; - if (!page_fn) { + const original_page_fn = page[fn]; + if (!original_page_fn) { throw new Error(`function does not exist on page: ${fn}`); } + // @ts-expect-error - page[fn] = async function (...args) { - const res = await page_fn.call(page, ...args); - if (javaScriptEnabled && args[1]?.wait_for_started !== false) { - await page.waitForSelector('body.started', { timeout: 15000 }); + async function modified_fn(...args) { + try { + // @ts-ignore + const res = await original_page_fn.apply(page, args); + if (javaScriptEnabled && args[1]?.wait_for_started !== false) { + await page.waitForSelector('body.started', { timeout: 15000 }); + } + return res; + } catch (e) { + // Exclude this function from the stack trace so that it points to the failing test + // instead of this file. + // @ts-expect-error + Error.captureStackTrace(e, modified_fn); + throw e; } - return res; - }; + } + + page[fn] = modified_fn; }); await use(page); }, - // eslint-disable-next-line no-empty-pattern - read_errors: ({}, use) => { + // eslint-disable-next-line no-empty-pattern -- Playwright doesn't let us use `_` as a parameter name. It must be a destructured object + read_errors: async ({}, use) => { /** @param {string} path */ function read_errors(path) { const errors = @@ -128,10 +141,10 @@ export const test = base.extend({ return errors[path]; } - use(read_errors); + await use(read_errors); }, - // eslint-disable-next-line no-empty-pattern + // eslint-disable-next-line no-empty-pattern -- Playwright doesn't let us use `_` as a parameter name. It must be a destructured object start_server: async ({}, use) => { /** * @type {http.Server} @@ -236,13 +249,13 @@ if (!test_browser_device) { ); } -/** @type {import('@playwright/test').PlaywrightTestConfig} */ +/** @type {import('./utils.js')['config']} */ export const config = { forbidOnly: !!process.env.CI, // generous timeouts on CI timeout: process.env.CI ? 45000 : 15000, webServer: { - command: process.env.DEV ? 'pnpm dev' : 'pnpm build && pnpm preview', + command: process.env.DEV ? 'pnpm dev --force' : 'pnpm build && pnpm preview', port: process.env.DEV ? 5173 : 4173 }, retries: process.env.CI ? 2 : 0, @@ -270,7 +283,7 @@ export const config = { ? [ ['dot'], [path.resolve(fileURLToPath(import.meta.url), '../github-flaky-warning-reporter.js')] - ] + ] : 'list', testDir: 'test', testMatch: /(.+\.)?(test|spec)\.[jt]s/ diff --git a/packages/kit/tsconfig.json b/packages/kit/tsconfig.json index a8546e14e52c..154c2a7fbfa9 100644 --- a/packages/kit/tsconfig.json +++ b/packages/kit/tsconfig.json @@ -4,25 +4,19 @@ "checkJs": true, "noEmit": true, "strict": true, - "target": "es2020", - "module": "es2022", - "moduleResolution": "node", + "target": "es2022", + "module": "node16", + "moduleResolution": "node16", "allowSyntheticDefaultImports": true, "paths": { "@sveltejs/kit": ["./src/exports/public.d.ts"], "@sveltejs/kit/node": ["./src/exports/node/index.js"], // internal use only - "types": ["./src/types/internal"] + "types": ["./src/types/internal.d.ts"] }, "noUnusedLocals": true, "noUnusedParameters": true }, - "include": [ - "postinstall.js", - "scripts/**/*", - "src/**/*", - "src/types/**/*", - "../../sites/kit.svelte.dev/scripts/extract-types.js" - ], + "include": ["*.js", "scripts/**/*", "src/**/*"], "exclude": ["./**/write_types/test/**"] } diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts new file mode 100644 index 000000000000..74d438a6f5cc --- /dev/null +++ b/packages/kit/types/index.d.ts @@ -0,0 +1,2612 @@ +/// +/// + +declare module '@sveltejs/kit' { + import type { CompileOptions } from 'svelte/compiler'; + import type { PluginOptions } from '@sveltejs/vite-plugin-svelte'; + /** + * [Adapters](https://svelte.dev/docs/kit/adapters) are responsible for taking the production build and turning it into something that can be deployed to a platform of your choosing. + */ + export interface Adapter { + /** + * The name of the adapter, using for logging. Will typically correspond to the package name. + */ + name: string; + /** + * This function is called after SvelteKit has built your app. + * @param builder An object provided by SvelteKit that contains methods for adapting the app + */ + adapt: (builder: Builder) => MaybePromise; + /** + * Checks called during dev and build to determine whether specific features will work in production with this adapter. + */ + supports?: { + /** + * Test support for `read` from `$app/server`. + * @param details.config The merged route config + */ + read?: (details: { config: any; route: { id: string } }) => boolean; + }; + /** + * Creates an `Emulator`, which allows the adapter to influence the environment + * during dev, build and prerendering. + */ + emulate?: () => MaybePromise; + } + + export type LoadProperties | void> = input extends void + ? undefined // needs to be undefined, because void will break intellisense + : input extends Record + ? input + : unknown; + + export type AwaitedActions any>> = OptionalUnion< + { + [Key in keyof T]: UnpackValidationError>>; + }[keyof T] + >; + + // Takes a union type and returns a union type where each type also has all properties + // of all possible types (typed as undefined), making accessing them more ergonomic + type OptionalUnion< + U extends Record, // not unknown, else interfaces don't satisfy this constraint + A extends keyof U = U extends U ? keyof U : never + > = U extends unknown ? { [P in Exclude]?: never } & U : never; + + const uniqueSymbol: unique symbol; + + export interface ActionFailure | undefined = undefined> { + status: number; + data: T; + [uniqueSymbol]: true; // necessary or else UnpackValidationError could wrongly unpack objects with the same shape as ActionFailure + } + + type UnpackValidationError = + T extends ActionFailure + ? X + : T extends void + ? undefined // needs to be undefined, because void will corrupt union type + : T; + + /** + * This object is passed to the `adapt` function of adapters. + * It contains various methods and properties that are useful for adapting the app. + */ + export interface Builder { + /** Print messages to the console. `log.info` and `log.minor` are silent unless Vite's `logLevel` is `info`. */ + log: Logger; + /** Remove `dir` and all its contents. */ + rimraf: (dir: string) => void; + /** Create `dir` and any required parent directories. */ + mkdirp: (dir: string) => void; + + /** The fully resolved `svelte.config.js`. */ + config: ValidatedConfig; + /** Information about prerendered pages and assets, if any. */ + prerendered: Prerendered; + /** An array of all routes (including prerendered) */ + routes: RouteDefinition[]; + + // TODO 3.0 remove this method + /** + * Create separate functions that map to one or more routes of your app. + * @param fn A function that groups a set of routes into an entry point + * @deprecated Use `builder.routes` instead + */ + createEntries: (fn: (route: RouteDefinition) => AdapterEntry) => Promise; + + /** + * Find all the assets imported by server files belonging to `routes` + */ + findServerAssets: (routes: RouteDefinition[]) => string[]; + + /** + * Generate a fallback page for a static webserver to use when no route is matched. Useful for single-page apps. + */ + generateFallback: (dest: string) => Promise; + + /** + * Generate a module exposing build-time environment variables as `$env/dynamic/public`. + */ + generateEnvModule: () => void; + + /** + * Generate a server-side manifest to initialise the SvelteKit [server](https://svelte.dev/docs/kit/@sveltejs-kit#Server) with. + * @param opts a relative path to the base directory of the app and optionally in which format (esm or cjs) the manifest should be generated + */ + generateManifest: (opts: { relativePath: string; routes?: RouteDefinition[] }) => string; + + /** + * Resolve a path to the `name` directory inside `outDir`, e.g. `/path/to/.svelte-kit/my-adapter`. + * @param name path to the file, relative to the build directory + */ + getBuildDirectory: (name: string) => string; + /** Get the fully resolved path to the directory containing client-side assets, including the contents of your `static` directory. */ + getClientDirectory: () => string; + /** Get the fully resolved path to the directory containing server-side code. */ + getServerDirectory: () => string; + /** Get the application path including any configured `base` path, e.g. `my-base-path/_app`. */ + getAppPath: () => string; + + /** + * Write client assets to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writeClient: (dest: string) => string[]; + /** + * Write prerendered files to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writePrerendered: (dest: string) => string[]; + /** + * Write server-side code to `dest`. + * @param dest the destination folder + * @returns an array of files written to `dest` + */ + writeServer: (dest: string) => string[]; + /** + * Copy a file or directory. + * @param from the source file or directory + * @param to the destination file or directory + * @param opts.filter a function to determine whether a file or directory should be copied + * @param opts.replace a map of strings to replace + * @returns an array of files that were copied + */ + copy: ( + from: string, + to: string, + opts?: { + filter?(basename: string): boolean; + replace?: Record; + } + ) => string[]; + + /** + * Compress files in `directory` with gzip and brotli, where appropriate. Generates `.gz` and `.br` files alongside the originals. + * @param directory The directory containing the files to be compressed + */ + compress: (directory: string) => Promise; + } + + export interface Config { + /** + * Options passed to [`svelte.compile`](https://svelte.dev/docs/svelte/svelte-compiler#CompileOptions). + * @default {} + */ + compilerOptions?: CompileOptions; + /** + * List of file extensions that should be treated as Svelte files. + * @default [".svelte"] + */ + extensions?: string[]; + /** SvelteKit options */ + kit?: KitConfig; + /** Preprocessor options, if any. Preprocessing can alternatively also be done through Vite's preprocessor capabilities. */ + preprocess?: any; + /** `vite-plugin-svelte` plugin options. */ + vitePlugin?: PluginOptions; + /** Any additional options required by tooling that integrates with Svelte. */ + [key: string]: any; + } + + export interface Cookies { + /** + * Gets a cookie that was previously set with `cookies.set`, or from the request headers. + * @param name the name of the cookie + * @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options) + */ + get: (name: string, opts?: import('cookie').CookieParseOptions) => string | undefined; + + /** + * Gets all cookies that were previously set with `cookies.set`, or from the request headers. + * @param opts the options, passed directly to `cookie.parse`. See documentation [here](https://github.com/jshttp/cookie#cookieparsestr-options) + */ + getAll: (opts?: import('cookie').CookieParseOptions) => Array<{ name: string; value: string }>; + + /** + * Sets a cookie. This will add a `set-cookie` header to the response, but also make the cookie available via `cookies.get` or `cookies.getAll` during the current request. + * + * The `httpOnly` and `secure` options are `true` by default (except on http://localhost, where `secure` is `false`), and must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP. The `sameSite` option defaults to `lax`. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * @param name the name of the cookie + * @param value the cookie value + * @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + set: ( + name: string, + value: string, + opts: import('cookie').CookieSerializeOptions & { path: string } + ) => void; + + /** + * Deletes a cookie by setting its value to an empty string and setting the expiry date in the past. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * @param name the name of the cookie + * @param opts the options, passed directly to `cookie.serialize`. The `path` must match the path of the cookie you want to delete. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + delete: (name: string, opts: import('cookie').CookieSerializeOptions & { path: string }) => void; + + /** + * Serialize a cookie name-value pair into a `Set-Cookie` header string, but don't apply it to the response. + * + * The `httpOnly` and `secure` options are `true` by default (except on http://localhost, where `secure` is `false`), and must be explicitly disabled if you want cookies to be readable by client-side JavaScript and/or transmitted over HTTP. The `sameSite` option defaults to `lax`. + * + * You must specify a `path` for the cookie. In most cases you should explicitly set `path: '/'` to make the cookie available throughout your app. You can use relative paths, or set `path: ''` to make the cookie only available on the current path and its children + * + * @param name the name of the cookie + * @param value the cookie value + * @param opts the options, passed directly to `cookie.serialize`. See documentation [here](https://github.com/jshttp/cookie#cookieserializename-value-options) + */ + serialize: ( + name: string, + value: string, + opts: import('cookie').CookieSerializeOptions & { path: string } + ) => string; + } + + /** + * A collection of functions that influence the environment during dev, build and prerendering + */ + export interface Emulator { + /** + * A function that is called with the current route `config` and `prerender` option + * and returns an `App.Platform` object + */ + platform?(details: { config: any; prerender: PrerenderOption }): MaybePromise; + } + + export interface KitConfig { + /** + * Your [adapter](https://svelte.dev/docs/kit/adapters) is run when executing `vite build`. It determines how the output is converted for different platforms. + * @default undefined + */ + adapter?: Adapter; + /** + * An object containing zero or more aliases used to replace values in `import` statements. These aliases are automatically passed to Vite and TypeScript. + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * alias: { + * // this will match a file + * 'my-file': 'path/to/my-file.js', + * + * // this will match a directory and its contents + * // (`my-directory/x` resolves to `path/to/my-directory/x`) + * 'my-directory': 'path/to/my-directory', + * + * // an alias ending /* will only match + * // the contents of a directory, not the directory itself + * 'my-directory/*': 'path/to/my-directory/*' + * } + * } + * }; + * ``` + * + * > [!NOTE] The built-in `$lib` alias is controlled by `config.kit.files.lib` as it is used for packaging. + * + * > [!NOTE] You will need to run `npm run dev` to have SvelteKit automatically generate the required alias configuration in `jsconfig.json` or `tsconfig.json`. + * @default {} + */ + alias?: Record; + /** + * The directory where SvelteKit keeps its stuff, including static assets (such as JS and CSS) and internally-used routes. + * + * If `paths.assets` is specified, there will be two app directories — `${paths.assets}/${appDir}` and `${paths.base}/${appDir}`. + * @default "_app" + */ + appDir?: string; + /** + * [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) configuration. CSP helps to protect your users against cross-site scripting (XSS) attacks, by limiting the places resources can be loaded from. For example, a configuration like this... + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * csp: { + * directives: { + * 'script-src': ['self'] + * }, + * // must be specified with either the `report-uri` or `report-to` directives, or both + * reportOnly: { + * 'script-src': ['self'], + * 'report-uri': ['/'] + * } + * } + * } + * }; + * + * export default config; + * ``` + * + * ...would prevent scripts loading from external sites. SvelteKit will augment the specified directives with nonces or hashes (depending on `mode`) for any inline styles and scripts it generates. + * + * To add a nonce for scripts and links manually included in `src/app.html`, you may use the placeholder `%sveltekit.nonce%` (for example ` + * + * + * + * + * + * ``` + * @default 'split' + * @since 2.13.0 + */ + bundleStrategy?: 'split' | 'single' | 'inline'; + }; + paths?: { + /** + * An absolute path that your app's files are served from. This is useful if your files are served from a storage bucket of some kind. + * @default "" + */ + assets?: '' | `http://${string}` | `https://${string}`; + /** + * A root-relative path that must start, but not end with `/` (e.g. `/base-path`), unless it is the empty string. This specifies where your app is served from and allows the app to live on a non-root path. Note that you need to prepend all your root-relative links with the base value or they will point to the root of your domain, not your `base` (this is how the browser works). You can use [`base` from `$app/paths`](https://svelte.dev/docs/kit/$app-paths#base) for that: `Link`. If you find yourself writing this often, it may make sense to extract this into a reusable component. + * @default "" + */ + base?: '' | `/${string}`; + /** + * Whether to use relative asset paths. + * + * If `true`, `base` and `assets` imported from `$app/paths` will be replaced with relative asset paths during server-side rendering, resulting in more portable HTML. + * If `false`, `%sveltekit.assets%` and references to build artifacts will always be root-relative paths, unless `paths.assets` is an external URL + * + * [Single-page app](https://svelte.dev/docs/kit/single-page-apps) fallback pages will always use absolute paths, regardless of this setting. + * + * If your app uses a `` element, you should set this to `false`, otherwise asset URLs will incorrectly be resolved against the `` URL rather than the current page. + * + * In 1.0, `undefined` was a valid value, which was set by default. In that case, if `paths.assets` was not external, SvelteKit would replace `%sveltekit.assets%` with a relative path and use relative paths to reference build artifacts, but `base` and `assets` imported from `$app/paths` would be as specified in your config. + * + * @default true + * @since 1.9.0 + */ + relative?: boolean; + }; + /** + * See [Prerendering](https://svelte.dev/docs/kit/page-options#prerender). + */ + prerender?: { + /** + * How many pages can be prerendered simultaneously. JS is single-threaded, but in cases where prerendering performance is network-bound (for example loading content from a remote CMS) this can speed things up by processing other tasks while waiting on the network response. + * @default 1 + */ + concurrency?: number; + /** + * Whether SvelteKit should find pages to prerender by following links from `entries`. + * @default true + */ + crawl?: boolean; + /** + * An array of pages to prerender, or start crawling from (if `crawl: true`). The `*` string includes all routes containing no required `[parameters]` with optional parameters included as being empty (since SvelteKit doesn't know what value any parameters should have). + * @default ["*"] + */ + entries?: Array<'*' | `/${string}`>; + /** + * How to respond to HTTP errors encountered while prerendering the app. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `status`, `path`, `referrer`, `referenceType` and `message` properties. If you `throw` from this function, the build will fail + * + * ```js + * /// file: svelte.config.js + * /// type: import('@sveltejs/kit').Config + * const config = { + * kit: { + * prerender: { + * handleHttpError: ({ path, referrer, message }) => { + * // ignore deliberate link to shiny 404 page + * if (path === '/not-found' && referrer === '/blog/how-we-built-our-404-page') { + * return; + * } + * + * // otherwise fail the build + * throw new Error(message); + * } + * } + * } + * }; + * ``` + * + * @default "fail" + * @since 1.15.7 + */ + handleHttpError?: PrerenderHttpErrorHandlerValue; + /** + * How to respond when hash links from one prerendered page to another don't correspond to an `id` on the destination page. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `path`, `id`, `referrers` and `message` properties. If you `throw` from this function, the build will fail + * + * @default "fail" + * @since 1.15.7 + */ + handleMissingId?: PrerenderMissingIdHandlerValue; + /** + * How to respond when an entry generated by the `entries` export doesn't match the route it was generated from. + * + * - `'fail'` — fail the build + * - `'ignore'` - silently ignore the failure and continue + * - `'warn'` — continue, but print a warning + * - `(details) => void` — a custom error handler that takes a `details` object with `generatedFromId`, `entry`, `matchedId` and `message` properties. If you `throw` from this function, the build will fail + * + * @default "fail" + * @since 1.16.0 + */ + handleEntryGeneratorMismatch?: PrerenderEntryGeneratorMismatchHandlerValue; + /** + * The value of `url.origin` during prerendering; useful if it is included in rendered content. + * @default "http://sveltekit-prerender" + */ + origin?: string; + }; + router?: { + /** + * What type of client-side router to use. + * - `'pathname'` is the default and means the current URL pathname determines the route + * - `'hash'` means the route is determined by `location.hash`. In this case, SSR and prerendering are disabled. This is only recommended if `pathname` is not an option, for example because you don't control the webserver where your app is deployed. + * It comes with some caveats: you can't use server-side rendering (or indeed any server logic), and you have to make sure that the links in your app all start with #/, or they won't work. Beyond that, everything works exactly like a normal SvelteKit app. + * + * @default "pathname" + * @since 2.14.0 + */ + type?: 'pathname' | 'hash'; + /** + * How to determine which route to load when navigating to a new page. + * + * By default, SvelteKit will serve a route manifest to the browser. + * When navigating, this manifest is used (along with the `reroute` hook, if it exists) to determine which components to load and which `load` functions to run. + * Because everything happens on the client, this decision can be made immediately. The drawback is that the manifest needs to be + * loaded and parsed before the first navigation can happen, which may have an impact if your app contains many routes. + * + * Alternatively, SvelteKit can determine the route on the server. This means that for every navigation to a path that has not yet been visited, the server will be asked to determine the route. + * This has several advantages: + * - The client does not need to load the routing manifest upfront, which can lead to faster initial page loads + * - The list of routes is hidden from public view + * - The server has an opportunity to intercept each navigation (for example through a middleware), enabling (for example) A/B testing opaque to SvelteKit + + * The drawback is that for unvisited paths, resolution will take slightly longer (though this is mitigated by [preloading](https://svelte.dev/docs/kit/link-options#data-sveltekit-preload-data)). + * + * > [!NOTE] When using server-side route resolution and prerendering, the resolution is prerendered along with the route itself. + * + * @default "client" + * @since 2.17.0 + */ + resolution?: 'client' | 'server'; + }; + serviceWorker?: { + /** + * Whether to automatically register the service worker, if it exists. + * @default true + */ + register?: boolean; + /** + * Determine which files in your `static` directory will be available in `$service-worker.files`. + * @default (filename) => !/\.DS_Store/.test(filename) + */ + files?(filepath: string): boolean; + }; + typescript?: { + /** + * A function that allows you to edit the generated `tsconfig.json`. You can mutate the config (recommended) or return a new one. + * This is useful for extending a shared `tsconfig.json` in a monorepo root, for example. + * @default (config) => config + * @since 1.3.0 + */ + config?: (config: Record) => Record | void; + }; + /** + * Client-side navigation can be buggy if you deploy a new version of your app while people are using it. If the code for the new page is already loaded, it may have stale content; if it isn't, the app's route manifest may point to a JavaScript file that no longer exists. + * SvelteKit helps you solve this problem through version management. + * If SvelteKit encounters an error while loading the page and detects that a new version has been deployed (using the `name` specified here, which defaults to a timestamp of the build) it will fall back to traditional full-page navigation. + * Not all navigations will result in an error though, for example if the JavaScript for the next page is already loaded. If you still want to force a full-page navigation in these cases, use techniques such as setting the `pollInterval` and then using `beforeNavigate`: + * ```html + * /// file: +layout.svelte + * + * ``` + * + * If you set `pollInterval` to a non-zero value, SvelteKit will poll for new versions in the background and set the value of [`updated.current`](https://svelte.dev/docs/kit/$app-state#updated) `true` when it detects one. + */ + version?: { + /** + * The current app version string. If specified, this must be deterministic (e.g. a commit ref rather than `Math.random()` or `Date.now().toString()`), otherwise defaults to a timestamp of the build. + * + * For example, to use the current commit hash, you could do use `git rev-parse HEAD`: + * + * ```js + * /// file: svelte.config.js + * import * as child_process from 'node:child_process'; + * + * export default { + * kit: { + * version: { + * name: child_process.execSync('git rev-parse HEAD').toString().trim() + * } + * } + * }; + * ``` + */ + name?: string; + /** + * The interval in milliseconds to poll for version changes. If this is `0`, no polling occurs. + * @default 0 + */ + pollInterval?: number; + }; + } + + /** + * The [`handle`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) hook runs every time the SvelteKit server receives a [request](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Request) and + * determines the [response](https://svelte.dev/docs/kit/web-standards#Fetch-APIs-Response). + * It receives an `event` object representing the request and a function called `resolve`, which renders the route and generates a `Response`. + * This allows you to modify response headers or bodies, or bypass SvelteKit entirely (for implementing routes programmatically, for example). + */ + export type Handle = (input: { + event: RequestEvent; + resolve: (event: RequestEvent, opts?: ResolveOptions) => MaybePromise; + }) => MaybePromise; + + /** + * The server-side [`handleError`](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while responding to a request. + * + * If an unexpected error is thrown during loading or rendering, this function will be called with the error and the event. + * Make sure that this function _never_ throws an error. + */ + export type HandleServerError = (input: { + error: unknown; + event: RequestEvent; + status: number; + message: string; + }) => MaybePromise; + + /** + * The client-side [`handleError`](https://svelte.dev/docs/kit/hooks#Shared-hooks-handleError) hook runs when an unexpected error is thrown while navigating. + * + * If an unexpected error is thrown during loading or the following render, this function will be called with the error and the event. + * Make sure that this function _never_ throws an error. + */ + export type HandleClientError = (input: { + error: unknown; + event: NavigationEvent; + status: number; + message: string; + }) => MaybePromise; + + /** + * The [`handleFetch`](https://svelte.dev/docs/kit/hooks#Server-hooks-handleFetch) hook allows you to modify (or replace) the result of an [`event.fetch`](https://svelte.dev/docs/kit/load#Making-fetch-requests) call that runs on the server (or during prerendering) inside an endpoint, `load`, `action`, `handle`, `handleError` or `reroute`. + */ + export type HandleFetch = (input: { + event: RequestEvent; + request: Request; + fetch: typeof fetch; + }) => MaybePromise; + + /** + * The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked before the server responds to its first request + * @since 2.10.0 + */ + export type ServerInit = () => MaybePromise; + + /** + * The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked once the app starts in the browser + * @since 2.10.0 + */ + export type ClientInit = () => MaybePromise; + + /** + * The [`reroute`](https://svelte.dev/docs/kit/hooks#Universal-hooks-reroute) hook allows you to modify the URL before it is used to determine which route to render. + * @since 2.3.0 + */ + export type Reroute = (event: { url: URL; fetch: typeof fetch }) => MaybePromise; + + /** + * The [`transport`](https://svelte.dev/docs/kit/hooks#Universal-hooks-transport) hook allows you to transport custom types across the server/client boundary. + * + * Each transporter has a pair of `encode` and `decode` functions. On the server, `encode` determines whether a value is an instance of the custom type and, if so, returns a non-falsy encoding of the value which can be an object or an array (or `false` otherwise). + * + * In the browser, `decode` turns the encoding back into an instance of the custom type. + * + * ```ts + * import type { Transport } from '@sveltejs/kit'; + * + * declare class MyCustomType { + * data: any + * } + * + * // hooks.js + * export const transport: Transport = { + * MyCustomType: { + * encode: (value) => value instanceof MyCustomType && [value.data], + * decode: ([data]) => new MyCustomType(data) + * } + * }; + * ``` + * @since 2.11.0 + */ + export type Transport = Record; + + /** + * A member of the [`transport`](https://svelte.dev/docs/kit/hooks#Universal-hooks-transport) hook. + */ + export interface Transporter< + T = any, + U = Exclude + > { + encode: (value: T) => false | U; + decode: (data: U) => T; + } + + /** + * The generic form of `PageLoad` and `LayoutLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `Load` directly. + */ + export type Load< + Params extends Partial> = Partial>, + InputData extends Record | null = Record | null, + ParentData extends Record = Record, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null + > = (event: LoadEvent) => MaybePromise; + + /** + * The generic form of `PageLoadEvent` and `LayoutLoadEvent`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `LoadEvent` directly. + */ + export interface LoadEvent< + Params extends Partial> = Partial>, + Data extends Record | null = Record | null, + ParentData extends Record = Record, + RouteId extends string | null = string | null + > extends NavigationEvent { + /** + * `fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features: + * + * - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request. + * - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context). + * - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call. + * - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) + * - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request. + * + * You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies) + */ + fetch: typeof fetch; + /** + * Contains the data returned by the route's server `load` function (in `+layout.server.js` or `+page.server.js`), if any. + */ + data: Data; + /** + * If you need to set headers for the response, you can do so using the this method. This is useful if you want the page to be cached, for example: + * + * ```js + * /// file: src/routes/blog/+page.js + * export async function load({ fetch, setHeaders }) { + * const url = `https://cms.example.com/articles.json`; + * const response = await fetch(url); + * + * setHeaders({ + * age: response.headers.get('age'), + * 'cache-control': response.headers.get('cache-control') + * }); + * + * return response.json(); + * } + * ``` + * + * Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once. + * + * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API in a server-only `load` function instead. + * + * `setHeaders` has no effect when a `load` function runs in the browser. + */ + setHeaders: (headers: Record) => void; + /** + * `await parent()` returns data from parent `+layout.js` `load` functions. + * Implicitly, a missing `+layout.js` is treated as a `({ data }) => data` function, meaning that it will return and forward data from parent `+layout.server.js` files. + * + * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data. + */ + parent: () => Promise; + /** + * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun. + * + * Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`. + * + * URLs can be absolute or relative to the page being loaded, and must be [encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). + * + * Custom identifiers have to be prefixed with one or more lowercase letters followed by a colon to conform to the [URI specification](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * The following example shows how to use `depends` to register a dependency on a custom identifier, which is `invalidate`d after a button click, making the `load` function rerun. + * + * ```js + * /// file: src/routes/+page.js + * let count = 0; + * export async function load({ depends }) { + * depends('increase:count'); + * + * return { count: count++ }; + * } + * ``` + * + * ```html + * /// file: src/routes/+page.svelte + * + * + *

{data.count}

+ * + * ``` + */ + depends: (...deps: Array<`${string}:${string}`>) => void; + /** + * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example: + * + * ```js + * /// file: src/routes/+page.server.js + * export async function load({ untrack, url }) { + * // Untrack url.pathname so that path changes don't trigger a rerun + * if (untrack(() => url.pathname === '/')) { + * return { message: 'Welcome!' }; + * } + * } + * ``` + */ + untrack: (fn: () => T) => T; + } + + export interface NavigationEvent< + Params extends Partial> = Partial>, + RouteId extends string | null = string | null + > { + /** + * The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object + */ + params: Params; + /** + * Info about the current route + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * The URL of the current page + */ + url: URL; + } + + /** + * Information about the target of a specific navigation. + */ + export interface NavigationTarget { + /** + * Parameters of the target page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + * Is `null` if the target is not part of the SvelteKit app (could not be resolved to a route). + */ + params: Record | null; + /** + * Info about the target route + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: string | null; + }; + /** + * The URL that is navigated to + */ + url: URL; + } + + /** + * - `enter`: The app has hydrated/started + * - `form`: The user submitted a `` with a GET method + * - `leave`: The user is leaving the app by closing the tab or using the back/forward buttons to go to a different document + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + export type NavigationType = 'enter' | 'form' | 'leave' | 'link' | 'goto' | 'popstate'; + + export interface Navigation { + /** + * Where navigation was triggered from + */ + from: NavigationTarget | null; + /** + * Where navigation is going to/has gone to + */ + to: NavigationTarget | null; + /** + * The type of navigation: + * - `form`: The user submitted a `` + * - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: Exclude; + /** + * Whether or not the navigation will result in the page being unloaded (i.e. not a client-side navigation) + */ + willUnload: boolean; + /** + * In case of a history back/forward navigation, the number of steps to go back/forward + */ + delta?: number; + /** + * A promise that resolves once the navigation is complete, and rejects if the navigation + * fails or is aborted. In the case of a `willUnload` navigation, the promise will never resolve + */ + complete: Promise; + } + + /** + * The argument passed to [`beforeNavigate`](https://svelte.dev/docs/kit/$app-navigation#beforeNavigate) callbacks. + */ + export interface BeforeNavigate extends Navigation { + /** + * Call this to prevent the navigation from starting. + */ + cancel: () => void; + } + + /** + * The argument passed to [`onNavigate`](https://svelte.dev/docs/kit/$app-navigation#onNavigate) callbacks. + */ + export interface OnNavigate extends Navigation { + /** + * The type of navigation: + * - `form`: The user submitted a `` + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: Exclude; + /** + * Since `onNavigate` callbacks are called immediately before a client-side navigation, they will never be called with a navigation that unloads the page. + */ + willUnload: false; + } + + /** + * The argument passed to [`afterNavigate`](https://svelte.dev/docs/kit/$app-navigation#afterNavigate) callbacks. + */ + export interface AfterNavigate extends Omit { + /** + * The type of navigation: + * - `enter`: The app has hydrated/started + * - `form`: The user submitted a `` + * - `link`: Navigation was triggered by a link click + * - `goto`: Navigation was triggered by a `goto(...)` call or a redirect + * - `popstate`: Navigation was triggered by back/forward navigation + */ + type: Exclude; + /** + * Since `afterNavigate` callbacks are called after a navigation completes, they will never be called with a navigation that unloads the page. + */ + willUnload: false; + } + + /** + * The shape of the [`page`](https://svelte.dev/docs/kit/$app-state#page) reactive object and the [`$page`](https://svelte.dev/docs/kit/$app-stores) store. + */ + export interface Page< + Params extends Record = Record, + RouteId extends string | null = string | null + > { + /** + * The URL of the current page. + */ + url: URL; + /** + * The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + */ + params: Params; + /** + * Info about the current route. + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * HTTP status code of the current page. + */ + status: number; + /** + * The error object of the current page, if any. Filled from the `handleError` hooks. + */ + error: App.Error | null; + /** + * The merged result of all data from all `load` functions on the current page. You can type a common denominator through `App.PageData`. + */ + data: App.PageData & Record; + /** + * The page state, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`. + */ + state: App.PageState; + /** + * Filled only after a form submission. See [form actions](https://svelte.dev/docs/kit/form-actions) for more info. + */ + form: any; + } + + /** + * The shape of a param matcher. See [matching](https://svelte.dev/docs/kit/advanced-routing#Matching) for more info. + */ + export type ParamMatcher = (param: string) => boolean; + + export interface RequestEvent< + Params extends Partial> = Partial>, + RouteId extends string | null = string | null + > { + /** + * Get or set cookies related to the current request + */ + cookies: Cookies; + /** + * `fetch` is equivalent to the [native `fetch` web API](https://developer.mozilla.org/en-US/docs/Web/API/fetch), with a few additional features: + * + * - It can be used to make credentialed requests on the server, as it inherits the `cookie` and `authorization` headers for the page request. + * - It can make relative requests on the server (ordinarily, `fetch` requires a URL with an origin when used in a server context). + * - Internal requests (e.g. for `+server.js` routes) go directly to the handler function when running on the server, without the overhead of an HTTP call. + * - During server-side rendering, the response will be captured and inlined into the rendered HTML by hooking into the `text` and `json` methods of the `Response` object. Note that headers will _not_ be serialized, unless explicitly included via [`filterSerializedResponseHeaders`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) + * - During hydration, the response will be read from the HTML, guaranteeing consistency and preventing an additional network request. + * + * You can learn more about making credentialed requests with cookies [here](https://svelte.dev/docs/kit/load#Cookies). + */ + fetch: typeof fetch; + /** + * The client's IP address, set by the adapter. + */ + getClientAddress: () => string; + /** + * Contains custom data that was added to the request within the [`server handle hook`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle). + */ + locals: App.Locals; + /** + * The parameters of the current route - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object. + */ + params: Params; + /** + * Additional data made available through the adapter. + */ + platform: Readonly | undefined; + /** + * The original request object. + */ + request: Request; + /** + * Info about the current route. + */ + route: { + /** + * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is `null` when no route is matched. + */ + id: RouteId; + }; + /** + * If you need to set headers for the response, you can do so using the this method. This is useful if you want the page to be cached, for example: + * + * ```js + * /// file: src/routes/blog/+page.js + * export async function load({ fetch, setHeaders }) { + * const url = `https://cms.example.com/articles.json`; + * const response = await fetch(url); + * + * setHeaders({ + * age: response.headers.get('age'), + * 'cache-control': response.headers.get('cache-control') + * }); + * + * return response.json(); + * } + * ``` + * + * Setting the same header multiple times (even in separate `load` functions) is an error — you can only set a given header once. + * + * You cannot add a `set-cookie` header with `setHeaders` — use the [`cookies`](https://svelte.dev/docs/kit/@sveltejs-kit#Cookies) API instead. + */ + setHeaders: (headers: Record) => void; + /** + * The requested URL. + */ + url: URL; + /** + * `true` if the request comes from the client asking for `+page/layout.server.js` data. The `url` property will be stripped of the internal information + * related to the data request in this case. Use this property instead if the distinction is important to you. + */ + isDataRequest: boolean; + /** + * `true` for `+server.js` calls coming from SvelteKit without the overhead of actually making an HTTP request. This happens when you make same-origin `fetch` requests on the server. + */ + isSubRequest: boolean; + } + + /** + * A `(event: RequestEvent) => Response` function exported from a `+server.js` file that corresponds to an HTTP verb (`GET`, `PUT`, `PATCH`, etc) and handles requests with that method. + * + * It receives `Params` as the first generic argument, which you can skip by using [generated types](https://svelte.dev/docs/kit/types#Generated-types) instead. + */ + export type RequestHandler< + Params extends Partial> = Partial>, + RouteId extends string | null = string | null + > = (event: RequestEvent) => MaybePromise; + + export interface ResolveOptions { + /** + * Applies custom transforms to HTML. If `done` is true, it's the final chunk. Chunks are not guaranteed to be well-formed HTML + * (they could include an element's opening tag but not its closing tag, for example) + * but they will always be split at sensible boundaries such as `%sveltekit.head%` or layout/page components. + * @param input the html chunk and the info if this is the last chunk + */ + transformPageChunk?: (input: { html: string; done: boolean }) => MaybePromise; + /** + * Determines which headers should be included in serialized responses when a `load` function loads a resource with `fetch`. + * By default, none will be included. + * @param name header name + * @param value header value + */ + filterSerializedResponseHeaders?: (name: string, value: string) => boolean; + /** + * Determines what should be added to the `` tag to preload it. + * By default, `js` and `css` files will be preloaded. + * @param input the type of the file and its path + */ + preload?: (input: { type: 'font' | 'css' | 'js' | 'asset'; path: string }) => boolean; + } + + export interface RouteDefinition { + id: string; + api: { + methods: Array; + }; + page: { + methods: Array>; + }; + pattern: RegExp; + prerender: PrerenderOption; + segments: RouteSegment[]; + methods: Array; + config: Config; + } + + export class Server { + constructor(manifest: SSRManifest); + init(options: ServerInitOptions): Promise; + respond(request: Request, options: RequestOptions): Promise; + } + + export interface ServerInitOptions { + /** A map of environment variables. */ + env: Record; + /** A function that turns an asset filename into a `ReadableStream`. Required for the `read` export from `$app/server` to work. */ + read?: (file: string) => ReadableStream; + } + + export interface SSRManifest { + appDir: string; + appPath: string; + /** Static files from `kit.config.files.assets` and the service worker (if any). */ + assets: Set; + mimeTypes: Record; + + /** private fields */ + _: { + client: NonNullable; + nodes: SSRNodeLoader[]; + routes: SSRRoute[]; + prerendered_routes: Set; + matchers: () => Promise>; + /** A `[file]: size` map of all assets imported by server code. */ + server_assets: Record; + }; + } + + /** + * The generic form of `PageServerLoad` and `LayoutServerLoad`. You should import those from `./$types` (see [generated types](https://svelte.dev/docs/kit/types#Generated-types)) + * rather than using `ServerLoad` directly. + */ + export type ServerLoad< + Params extends Partial> = Partial>, + ParentData extends Record = Record, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null + > = (event: ServerLoadEvent) => MaybePromise; + + export interface ServerLoadEvent< + Params extends Partial> = Partial>, + ParentData extends Record = Record, + RouteId extends string | null = string | null + > extends RequestEvent { + /** + * `await parent()` returns data from parent `+layout.server.js` `load` functions. + * + * Be careful not to introduce accidental waterfalls when using `await parent()`. If for example you only want to merge parent data into the returned output, call it _after_ fetching your other data. + */ + parent: () => Promise; + /** + * This function declares that the `load` function has a _dependency_ on one or more URLs or custom identifiers, which can subsequently be used with [`invalidate()`](https://svelte.dev/docs/kit/$app-navigation#invalidate) to cause `load` to rerun. + * + * Most of the time you won't need this, as `fetch` calls `depends` on your behalf — it's only necessary if you're using a custom API client that bypasses `fetch`. + * + * URLs can be absolute or relative to the page being loaded, and must be [encoded](https://developer.mozilla.org/en-US/docs/Glossary/percent-encoding). + * + * Custom identifiers have to be prefixed with one or more lowercase letters followed by a colon to conform to the [URI specification](https://www.rfc-editor.org/rfc/rfc3986.html). + * + * The following example shows how to use `depends` to register a dependency on a custom identifier, which is `invalidate`d after a button click, making the `load` function rerun. + * + * ```js + * /// file: src/routes/+page.js + * let count = 0; + * export async function load({ depends }) { + * depends('increase:count'); + * + * return { count: count++ }; + * } + * ``` + * + * ```html + * /// file: src/routes/+page.svelte + * + * + *

{data.count}

+ * + * ``` + */ + depends: (...deps: string[]) => void; + /** + * Use this function to opt out of dependency tracking for everything that is synchronously called within the callback. Example: + * + * ```js + * /// file: src/routes/+page.js + * export async function load({ untrack, url }) { + * // Untrack url.pathname so that path changes don't trigger a rerun + * if (untrack(() => url.pathname === '/')) { + * return { message: 'Welcome!' }; + * } + * } + * ``` + */ + untrack: (fn: () => T) => T; + } + + /** + * Shape of a form action method that is part of `export const actions = {...}` in `+page.server.js`. + * See [form actions](https://svelte.dev/docs/kit/form-actions) for more information. + */ + export type Action< + Params extends Partial> = Partial>, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null + > = (event: RequestEvent) => MaybePromise; + + /** + * Shape of the `export const actions = {...}` object in `+page.server.js`. + * See [form actions](https://svelte.dev/docs/kit/form-actions) for more information. + */ + export type Actions< + Params extends Partial> = Partial>, + OutputData extends Record | void = Record | void, + RouteId extends string | null = string | null + > = Record>; + + /** + * When calling a form action via fetch, the response will be one of these shapes. + * ```svelte + * { + * return ({ result }) => { + * // result is of type ActionResult + * }; + * }} + * ``` + */ + export type ActionResult< + Success extends Record | undefined = Record, + Failure extends Record | undefined = Record + > = + | { type: 'success'; status: number; data?: Success } + | { type: 'failure'; status: number; data?: Failure } + | { type: 'redirect'; status: number; location: string } + | { type: 'error'; status?: number; error: any }; + + /** + * The object returned by the [`error`](https://svelte.dev/docs/kit/@sveltejs-kit#error) function. + */ + export interface HttpError { + /** The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses), in the range 400-599. */ + status: number; + /** The content of the error. */ + body: App.Error; + } + + /** + * The object returned by the [`redirect`](https://svelte.dev/docs/kit/@sveltejs-kit#redirect) function. + */ + export interface Redirect { + /** The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages), in the range 300-308. */ + status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308; + /** The location to redirect to. */ + location: string; + } + + export type SubmitFunction< + Success extends Record | undefined = Record, + Failure extends Record | undefined = Record + > = (input: { + action: URL; + formData: FormData; + formElement: HTMLFormElement; + controller: AbortController; + submitter: HTMLElement | null; + cancel: () => void; + }) => MaybePromise< + | void + | ((opts: { + formData: FormData; + formElement: HTMLFormElement; + action: URL; + result: ActionResult; + /** + * Call this to get the default behavior of a form submission response. + * @param options Set `reset: false` if you don't want the `` values to be reset after a successful submission. + * @param invalidateAll Set `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission. + */ + update: (options?: { reset?: boolean; invalidateAll?: boolean }) => Promise; + }) => MaybePromise) + >; + + /** + * The type of `export const snapshot` exported from a page or layout component. + */ + export interface Snapshot { + capture: () => T; + restore: (snapshot: T) => void; + } + interface AdapterEntry { + /** + * A string that uniquely identifies an HTTP service (e.g. serverless function) and is used for deduplication. + * For example, `/foo/a-[b]` and `/foo/[c]` are different routes, but would both + * be represented in a Netlify _redirects file as `/foo/:param`, so they share an ID + */ + id: string; + + /** + * A function that compares the candidate route with the current route to determine + * if it should be grouped with the current route. + * + * Use cases: + * - Fallback pages: `/foo/[c]` is a fallback for `/foo/a-[b]`, and `/[...catchall]` is a fallback for all routes + * - Grouping routes that share a common `config`: `/foo` should be deployed to the edge, `/bar` and `/baz` should be deployed to a serverless function + */ + filter(route: RouteDefinition): boolean; + + /** + * A function that is invoked once the entry has been created. This is where you + * should write the function to the filesystem and generate redirect manifests. + */ + complete(entry: { generateManifest(opts: { relativePath: string }): string }): MaybePromise; + } + + // Based on https://github.com/josh-hemphill/csp-typed-directives/blob/latest/src/csp.types.ts + // + // MIT License + // + // Copyright (c) 2021-present, Joshua Hemphill + // Copyright (c) 2021, Tecnico Corporation + // + // Permission is hereby granted, free of charge, to any person obtaining a copy + // of this software and associated documentation files (the "Software"), to deal + // in the Software without restriction, including without limitation the rights + // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + // copies of the Software, and to permit persons to whom the Software is + // furnished to do so, subject to the following conditions: + // + // The above copyright notice and this permission notice shall be included in all + // copies or substantial portions of the Software. + // + // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + // SOFTWARE. + + namespace Csp { + type ActionSource = 'strict-dynamic' | 'report-sample'; + type BaseSource = + | 'self' + | 'unsafe-eval' + | 'unsafe-hashes' + | 'unsafe-inline' + | 'wasm-unsafe-eval' + | 'none'; + type CryptoSource = `${'nonce' | 'sha256' | 'sha384' | 'sha512'}-${string}`; + type FrameSource = HostSource | SchemeSource | 'self' | 'none'; + type HostNameScheme = `${string}.${string}` | 'localhost'; + type HostSource = `${HostProtocolSchemes}${HostNameScheme}${PortScheme}`; + type HostProtocolSchemes = `${string}://` | ''; + type HttpDelineator = '/' | '?' | '#' | '\\'; + type PortScheme = `:${number}` | '' | ':*'; + type SchemeSource = 'http:' | 'https:' | 'data:' | 'mediastream:' | 'blob:' | 'filesystem:'; + type Source = HostSource | SchemeSource | CryptoSource | BaseSource; + type Sources = Source[]; + } + + interface CspDirectives { + 'child-src'?: Csp.Sources; + 'default-src'?: Array; + 'frame-src'?: Csp.Sources; + 'worker-src'?: Csp.Sources; + 'connect-src'?: Csp.Sources; + 'font-src'?: Csp.Sources; + 'img-src'?: Csp.Sources; + 'manifest-src'?: Csp.Sources; + 'media-src'?: Csp.Sources; + 'object-src'?: Csp.Sources; + 'prefetch-src'?: Csp.Sources; + 'script-src'?: Array; + 'script-src-elem'?: Csp.Sources; + 'script-src-attr'?: Csp.Sources; + 'style-src'?: Array; + 'style-src-elem'?: Csp.Sources; + 'style-src-attr'?: Csp.Sources; + 'base-uri'?: Array; + sandbox?: Array< + | 'allow-downloads-without-user-activation' + | 'allow-forms' + | 'allow-modals' + | 'allow-orientation-lock' + | 'allow-pointer-lock' + | 'allow-popups' + | 'allow-popups-to-escape-sandbox' + | 'allow-presentation' + | 'allow-same-origin' + | 'allow-scripts' + | 'allow-storage-access-by-user-activation' + | 'allow-top-navigation' + | 'allow-top-navigation-by-user-activation' + >; + 'form-action'?: Array; + 'frame-ancestors'?: Array; + 'navigate-to'?: Array; + 'report-uri'?: string[]; + 'report-to'?: string[]; + + 'require-trusted-types-for'?: Array<'script'>; + 'trusted-types'?: Array<'none' | 'allow-duplicates' | '*' | string>; + 'upgrade-insecure-requests'?: boolean; + + /** @deprecated */ + 'require-sri-for'?: Array<'script' | 'style' | 'script style'>; + + /** @deprecated */ + 'block-all-mixed-content'?: boolean; + + /** @deprecated */ + 'plugin-types'?: Array<`${string}/${string}` | 'none'>; + + /** @deprecated */ + referrer?: Array< + | 'no-referrer' + | 'no-referrer-when-downgrade' + | 'origin' + | 'origin-when-cross-origin' + | 'same-origin' + | 'strict-origin' + | 'strict-origin-when-cross-origin' + | 'unsafe-url' + | 'none' + >; + } + + type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS'; + + interface Logger { + (msg: string): void; + success(msg: string): void; + error(msg: string): void; + warn(msg: string): void; + minor(msg: string): void; + info(msg: string): void; + } + + type MaybePromise = T | Promise; + + interface Prerendered { + /** + * A map of `path` to `{ file }` objects, where a path like `/foo` corresponds to `foo.html` and a path like `/bar/` corresponds to `bar/index.html`. + */ + pages: Map< + string, + { + /** The location of the .html file relative to the output directory */ + file: string; + } + >; + /** + * A map of `path` to `{ type }` objects. + */ + assets: Map< + string, + { + /** The MIME type of the asset */ + type: string; + } + >; + /** + * A map of redirects encountered during prerendering. + */ + redirects: Map< + string, + { + status: number; + location: string; + } + >; + /** An array of prerendered paths (without trailing slashes, regardless of the trailingSlash config) */ + paths: string[]; + } + + interface PrerenderHttpErrorHandler { + (details: { + status: number; + path: string; + referrer: string | null; + referenceType: 'linked' | 'fetched'; + message: string; + }): void; + } + + interface PrerenderMissingIdHandler { + (details: { path: string; id: string; referrers: string[]; message: string }): void; + } + + interface PrerenderEntryGeneratorMismatchHandler { + (details: { generatedFromId: string; entry: string; matchedId: string; message: string }): void; + } + + type PrerenderHttpErrorHandlerValue = 'fail' | 'warn' | 'ignore' | PrerenderHttpErrorHandler; + type PrerenderMissingIdHandlerValue = 'fail' | 'warn' | 'ignore' | PrerenderMissingIdHandler; + type PrerenderEntryGeneratorMismatchHandlerValue = + | 'fail' + | 'warn' + | 'ignore' + | PrerenderEntryGeneratorMismatchHandler; + + export type PrerenderOption = boolean | 'auto'; + + interface RequestOptions { + getClientAddress(): string; + platform?: App.Platform; + } + + interface RouteSegment { + content: string; + dynamic: boolean; + rest: boolean; + } + + type TrailingSlash = 'never' | 'always' | 'ignore'; + interface Asset { + file: string; + size: number; + type: string | null; + } + + interface BuildData { + app_dir: string; + app_path: string; + manifest_data: ManifestData; + out_dir: string; + service_worker: string | null; + client: { + /** Path to the client entry point. */ + start: string; + /** Path to the generated `app.js` file that contains the client manifest. Only set in case of `bundleStrategy === 'split'`. */ + app?: string; + /** JS files that the client entry point relies on. */ + imports: string[]; + /** + * JS files that represent the entry points of the layouts/pages. + * An entry is undefined if the layout/page has no component or universal file (i.e. only has a `.server.js` file). + * Only set in case of `router.resolution === 'server'`. + */ + nodes?: Array; + /** + * CSS files referenced in the entry points of the layouts/pages. + * An entry is undefined if the layout/page has no component or universal file (i.e. only has a `.server.js` file) or if has no CSS. + * Only set in case of `router.resolution === 'server'`. + */ + css?: Array; + /** + * Contains the client route manifest in a form suitable for the server which is used for server side route resolution. + * Notably, it contains all routes, regardless of whether they are prerendered or not (those are missing in the optimized server route manifest). + * Only set in case of `router.resolution === 'server'`. + */ + routes?: SSRClientRoute[]; + stylesheets: string[]; + fonts: string[]; + uses_env_dynamic_public: boolean; + /** Only set in case of `bundleStrategy === 'inline'`. */ + inline?: { + script: string; + style: string | undefined; + }; + } | null; + server_manifest: import('vite').Manifest; + } + + interface ManifestData { + /** Static files from `kit.config.files.assets`. */ + assets: Asset[]; + hooks: { + client: string | null; + server: string | null; + universal: string | null; + }; + nodes: PageNode[]; + routes: RouteData[]; + matchers: Record; + } + + interface PageNode { + depth: number; + /** The `+page/layout.svelte`. */ + component?: string; // TODO supply default component if it's missing (bit of an edge case) + /** The `+page/layout.js/.ts`. */ + universal?: string; + /** The `+page/layout.server.js/ts`. */ + server?: string; + parent_id?: string; + parent?: PageNode; + /** Filled with the pages that reference this layout (if this is a layout). */ + child_pages?: PageNode[]; + } + + type RecursiveRequired = { + // Recursive implementation of TypeScript's Required utility type. + // Will recursively continue until it reaches a primitive or Function + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type + [K in keyof T]-?: Extract extends never // If it does not have a Function type + ? RecursiveRequired // recursively continue through. + : T[K]; // Use the exact type for everything else + }; + + interface RouteParam { + name: string; + matcher: string; + optional: boolean; + rest: boolean; + chained: boolean; + } + + /** + * Represents a route segment in the app. It can either be an intermediate node + * with only layout/error pages, or a leaf, at which point either `page` and `leaf` + * or `endpoint` is set. + */ + interface RouteData { + id: string; + parent: RouteData | null; + + segment: string; + pattern: RegExp; + params: RouteParam[]; + + layout: PageNode | null; + error: PageNode | null; + leaf: PageNode | null; + + page: { + layouts: Array; + errors: Array; + leaf: number; + } | null; + + endpoint: { + file: string; + } | null; + } + + interface SSRComponent { + default: { + render( + props: Record, + opts: { context: Map } + ): { + html: string; + head: string; + css: { + code: string; + map: any; // TODO + }; + }; + }; + } + + type SSRComponentLoader = () => Promise; + + interface UniversalNode { + load?: Load; + prerender?: PrerenderOption; + ssr?: boolean; + csr?: boolean; + trailingSlash?: TrailingSlash; + config?: any; + entries?: PrerenderEntryGenerator; + } + + interface ServerNode { + load?: ServerLoad; + prerender?: PrerenderOption; + ssr?: boolean; + csr?: boolean; + trailingSlash?: TrailingSlash; + actions?: Actions; + config?: any; + entries?: PrerenderEntryGenerator; + } + + interface SSRNode { + /** index into the `nodes` array in the generated `client/app.js`. */ + index: number; + /** external JS files that are loaded on the client. `imports[0]` is the entry point (e.g. `client/nodes/0.js`) */ + imports: string[]; + /** external CSS files that are loaded on the client */ + stylesheets: string[]; + /** external font files that are loaded on the client */ + fonts: string[]; + + universal_id?: string; + server_id?: string; + + /** inlined styles */ + inline_styles?(): MaybePromise>; + /** Svelte component */ + component?: SSRComponentLoader; + /** +page.js or +layout.js */ + universal?: UniversalNode; + /** +page.server.js, +layout.server.js, or +server.js */ + server?: ServerNode; + } + + type SSRNodeLoader = () => Promise; + + interface PageNodeIndexes { + errors: Array; + layouts: Array; + leaf: number; + } + + type PrerenderEntryGenerator = () => MaybePromise>>; + + type SSREndpoint = Partial> & { + prerender?: PrerenderOption; + trailingSlash?: TrailingSlash; + config?: any; + entries?: PrerenderEntryGenerator; + fallback?: RequestHandler; + }; + + interface SSRRoute { + id: string; + pattern: RegExp; + params: RouteParam[]; + page: PageNodeIndexes | null; + endpoint: (() => Promise) | null; + endpoint_id?: string; + } + + interface SSRClientRoute { + id: string; + pattern: RegExp; + params: RouteParam[]; + errors: Array; + layouts: Array<[has_server_load: boolean, node_id: number] | undefined>; + leaf: [has_server_load: boolean, node_id: number]; + } + + type ValidatedConfig = Config & { + kit: ValidatedKitConfig; + extensions: string[]; + }; + + type ValidatedKitConfig = Omit, 'adapter'> & { + adapter?: Adapter; + }; + /** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ + export function error(status: number, body: App.Error): never; + /** + * Throws an error with a HTTP status code and an optional message. + * When called during request handling, this will cause SvelteKit to + * return an error response without invoking `handleError`. + * Make sure you're not catching the thrown error, which would prevent SvelteKit from handling it. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param body An object that conforms to the App.Error type. If a string is passed, it will be used as the message property. + * @throws {HttpError} This error instructs SvelteKit to initiate HTTP error handling. + * @throws {Error} If the provided status is invalid (not between 400 and 599). + */ + export function error(status: number, body?: { + message: string; + } extends App.Error ? App.Error | string | undefined : never): never; + /** + * Checks whether this is an error thrown by {@link error}. + * @param status The status to filter for. + * */ + export function isHttpError(e: unknown, status?: T | undefined): e is (HttpError_1 & { + status: T extends undefined ? never : T; + }); + /** + * Redirect a request. When called during request handling, SvelteKit will return a redirect response. + * Make sure you're not catching the thrown redirect, which would prevent SvelteKit from handling it. + * + * Most common status codes: + * * `303 See Other`: redirect as a GET request (often used after a form POST request) + * * `307 Temporary Redirect`: redirect will keep the request method + * * `308 Permanent Redirect`: redirect will keep the request method, SEO will be transferred to the new page + * + * [See all redirect status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages) + * + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages). Must be in the range 300-308. + * @param location The location to redirect to. + * @throws {Redirect} This error instructs SvelteKit to redirect to the specified location. + * @throws {Error} If the provided status is invalid. + * */ + export function redirect(status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | ({} & number), location: string | URL): never; + /** + * Checks whether this is a redirect thrown by {@link redirect}. + * @param e The object to check. + * */ + export function isRedirect(e: unknown): e is Redirect_1; + /** + * Create a JSON `Response` object from the supplied data. + * @param data The value that will be serialized as JSON. + * @param init Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically. + */ + export function json(data: any, init?: ResponseInit | undefined): Response; + /** + * Create a `Response` object from the supplied body. + * @param body The value that will be used as-is. + * @param init Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically. + */ + export function text(body: string, init?: ResponseInit | undefined): Response; + /** + * Create an `ActionFailure` object. Call when form submission fails. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * */ + export function fail(status: number): ActionFailure; + /** + * Create an `ActionFailure` object. Call when form submission fails. + * @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599. + * @param data Data associated with the failure (e.g. validation errors) + * */ + export function fail | undefined = undefined>(status: number, data: T): ActionFailure; + /** + * Checks whether this is an action failure thrown by {@link fail}. + * @param e The object to check. + * */ + export function isActionFailure(e: unknown): e is ActionFailure; + /** + * Strips possible SvelteKit-internal suffixes and trailing slashes from the URL pathname. + * Returns the normalized URL as well as a method for adding the potential suffix back + * based on a new pathname (possibly including search) or URL. + * ```js + * import { normalizeUrl } from '@sveltejs/kit'; + * + * const { url, denormalize } = normalizeUrl('/blog/post/__data.json'); + * console.log(url.pathname); // /blog/post + * console.log(denormalize('/blog/post/a')); // /blog/post/a/__data.json + * ``` + * @since 2.18.0 + */ + export function normalizeUrl(url: URL | string): { + url: URL; + wasNormalized: boolean; + denormalize: (url?: string | URL) => URL; + }; + export type LessThan = TNumber extends TArray["length"] ? TArray[number] : LessThan; + export type NumericRange = Exclude, LessThan>; + export const VERSION: string; + class HttpError_1 { + + constructor(status: number, body: { + message: string; + } extends App.Error ? (App.Error | string | undefined) : App.Error); + status: number; + body: App.Error; + toString(): string; + } + class Redirect_1 { + + constructor(status: 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308, location: string); + status: 301 | 302 | 303 | 307 | 308 | 300 | 304 | 305 | 306; + location: string; + } + + export {}; +} + +declare module '@sveltejs/kit/hooks' { + /** + * A helper function for sequencing multiple `handle` calls in a middleware-like manner. + * The behavior for the `handle` options is as follows: + * - `transformPageChunk` is applied in reverse order and merged + * - `preload` is applied in forward order, the first option "wins" and no `preload` options after it are called + * - `filterSerializedResponseHeaders` behaves the same as `preload` + * + * ```js + * /// file: src/hooks.server.js + * import { sequence } from '@sveltejs/kit/hooks'; + * + * /// type: import('@sveltejs/kit').Handle + * async function first({ event, resolve }) { + * console.log('first pre-processing'); + * const result = await resolve(event, { + * transformPageChunk: ({ html }) => { + * // transforms are applied in reverse order + * console.log('first transform'); + * return html; + * }, + * preload: () => { + * // this one wins as it's the first defined in the chain + * console.log('first preload'); + * return true; + * } + * }); + * console.log('first post-processing'); + * return result; + * } + * + * /// type: import('@sveltejs/kit').Handle + * async function second({ event, resolve }) { + * console.log('second pre-processing'); + * const result = await resolve(event, { + * transformPageChunk: ({ html }) => { + * console.log('second transform'); + * return html; + * }, + * preload: () => { + * console.log('second preload'); + * return true; + * }, + * filterSerializedResponseHeaders: () => { + * // this one wins as it's the first defined in the chain + * console.log('second filterSerializedResponseHeaders'); + * return true; + * } + * }); + * console.log('second post-processing'); + * return result; + * } + * + * export const handle = sequence(first, second); + * ``` + * + * The example above would print: + * + * ``` + * first pre-processing + * first preload + * second pre-processing + * second filterSerializedResponseHeaders + * second transform + * first transform + * second post-processing + * first post-processing + * ``` + * + * @param handlers The chain of `handle` functions + * */ + export function sequence(...handlers: import("@sveltejs/kit").Handle[]): import("@sveltejs/kit").Handle; + + export {}; +} + +declare module '@sveltejs/kit/node' { + export function getRequest({ request, base, bodySizeLimit }: { + request: import("http").IncomingMessage; + base: string; + bodySizeLimit?: number; + }): Promise; + + export function setResponse(res: import("http").ServerResponse, response: Response): Promise; + /** + * Converts a file on disk to a readable stream + * @since 2.4.0 + */ + export function createReadableStream(file: string): ReadableStream; + + export {}; +} + +declare module '@sveltejs/kit/node/polyfills' { + /** + * Make various web APIs available as globals: + * - `crypto` + * - `File` + */ + export function installPolyfills(): void; + + export {}; +} + +declare module '@sveltejs/kit/vite' { + /** + * Returns the SvelteKit Vite plugins. + * */ + export function sveltekit(): Promise; + + export {}; +} + +declare module '$app/environment' { + /** + * `true` if the app is running in the browser. + */ + export const browser: boolean; + + /** + * Whether the dev server is running. This is not guaranteed to correspond to `NODE_ENV` or `MODE`. + */ + export const dev: boolean; + + /** + * SvelteKit analyses your app during the `build` step by running it. During this process, `building` is `true`. This also applies during prerendering. + */ + export const building: boolean; + + /** + * The value of `config.kit.version.name`. + */ + export const version: string; + + export {}; +} + +declare module '$app/forms' { + /** + * Use this function to deserialize the response from a form submission. + * Usage: + * + * ```js + * import { deserialize } from '$app/forms'; + * + * async function handleSubmit(event) { + * const response = await fetch('/form?/action', { + * method: 'POST', + * body: new FormData(event.target) + * }); + * + * const result = deserialize(await response.text()); + * // ... + * } + * ``` + * */ + export function deserialize | undefined, Failure extends Record | undefined>(result: string): import("@sveltejs/kit").ActionResult; + /** + * This action enhances a `` element that otherwise would work without JavaScript. + * + * The `submit` function is called upon submission with the given FormData and the `action` that should be triggered. + * If `cancel` is called, the form will not be submitted. + * You can use the abort `controller` to cancel the submission in case another one starts. + * If a function is returned, that function is called with the response from the server. + * If nothing is returned, the fallback will be used. + * + * If this function or its return value isn't set, it + * - falls back to updating the `form` prop with the returned data if the action is on the same page as the form + * - updates `page.status` + * - resets the `` element and invalidates all data in case of successful submission with no redirect response + * - redirects in case of a redirect response + * - redirects to the nearest error page in case of an unexpected error + * + * If you provide a custom function with a callback and want to use the default behavior, invoke `update` in your callback. + * It accepts an options object + * - `reset: false` if you don't want the `` values to be reset after a successful submission + * - `invalidateAll: false` if you don't want the action to call `invalidateAll` after submission + * @param form_element The form element + * @param submit Submit callback + */ + export function enhance | undefined, Failure extends Record | undefined>(form_element: HTMLFormElement, submit?: import("@sveltejs/kit").SubmitFunction): { + destroy(): void; + }; + /** + * This action updates the `form` property of the current page with the given data and updates `page.status`. + * In case of an error, it redirects to the nearest error page. + * */ + export function applyAction | undefined, Failure extends Record | undefined>(result: import("@sveltejs/kit").ActionResult): Promise; + + export {}; +} + +declare module '$app/navigation' { + /** + * A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a URL. + * + * `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * */ + export function afterNavigate(callback: (navigation: import("@sveltejs/kit").AfterNavigate) => void): void; + /** + * A navigation interceptor that triggers before we navigate to a URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls. + * + * Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response. + * + * When a navigation isn't to a SvelteKit-owned route (and therefore controlled by SvelteKit's client-side router), `navigation.to.route.id` will be `null`. + * + * If the navigation will (if not cancelled) cause the document to unload — in other words `'leave'` navigations and `'link'` navigations where `navigation.to.route === null` — `navigation.willUnload` is `true`. + * + * `beforeNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * */ + export function beforeNavigate(callback: (navigation: import("@sveltejs/kit").BeforeNavigate) => void): void; + /** + * A lifecycle function that runs the supplied `callback` immediately before we navigate to a new URL except during full-page navigations. + * + * If you return a `Promise`, SvelteKit will wait for it to resolve before completing the navigation. This allows you to — for example — use `document.startViewTransition`. Avoid promises that are slow to resolve, since navigation will appear stalled to the user. + * + * If a function (or a `Promise` that resolves to a function) is returned from the callback, it will be called once the DOM has updated. + * + * `onNavigate` must be called during a component initialization. It remains active as long as the component is mounted. + * */ + export function onNavigate(callback: (navigation: import("@sveltejs/kit").OnNavigate) => MaybePromise<(() => void) | void>): void; + /** + * If called when the page is being updated following a navigation (in `onMount` or `afterNavigate` or an action, for example), this disables SvelteKit's built-in scroll handling. + * This is generally discouraged, since it breaks user expectations. + * */ + export function disableScrollHandling(): void; + /** + * Allows you to navigate programmatically to a given route, with options such as keeping the current element focused. + * Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`. + * + * For external URLs, use `window.location = url` instead of calling `goto(url)`. + * + * @param url Where to navigate to. Note that if you've set [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths) and the URL is root-relative, you need to prepend the base path if you want to navigate within the app. + * @param {Object} opts Options related to the navigation + * */ + export function goto(url: string | URL, opts?: { + replaceState?: boolean | undefined; + noScroll?: boolean | undefined; + keepFocus?: boolean | undefined; + invalidateAll?: boolean | undefined; + invalidate?: (string | URL | ((url: URL) => boolean))[] | undefined; + state?: App.PageState | undefined; + } | undefined): Promise; + /** + * Causes any `load` functions belonging to the currently active page to re-run if they depend on the `url` in question, via `fetch` or `depends`. Returns a `Promise` that resolves when the page is subsequently updated. + * + * If the argument is given as a `string` or `URL`, it must resolve to the same URL that was passed to `fetch` or `depends` (including query parameters). + * To create a custom identifier, use a string beginning with `[a-z]+:` (e.g. `custom:state`) — this is a valid URL. + * + * The `function` argument can be used define a custom predicate. It receives the full `URL` and causes `load` to rerun if `true` is returned. + * This can be useful if you want to invalidate based on a pattern instead of a exact match. + * + * ```ts + * // Example: Match '/path' regardless of the query parameters + * import { invalidate } from '$app/navigation'; + * + * invalidate((url) => url.pathname === '/path'); + * ``` + * @param resource The invalidated URL + * */ + export function invalidate(resource: string | URL | ((url: URL) => boolean)): Promise; + /** + * Causes all `load` functions belonging to the currently active page to re-run. Returns a `Promise` that resolves when the page is subsequently updated. + * */ + export function invalidateAll(): Promise; + /** + * Programmatically preloads the given page, which means + * 1. ensuring that the code for the page is loaded, and + * 2. calling the page's load function with the appropriate options. + * + * This is the same behaviour that SvelteKit triggers when the user taps or mouses over an `` element with `data-sveltekit-preload-data`. + * If the next navigation is to `href`, the values returned from load will be used, making navigation instantaneous. + * Returns a Promise that resolves with the result of running the new route's `load` functions once the preload is complete. + * + * @param href Page to preload + * */ + export function preloadData(href: string): Promise<{ + type: "loaded"; + status: number; + data: Record; + } | { + type: "redirect"; + location: string; + }>; + /** + * Programmatically imports the code for routes that haven't yet been fetched. + * Typically, you might call this to speed up subsequent navigation. + * + * You can specify routes by any matching pathname such as `/about` (to match `src/routes/about/+page.svelte`) or `/blog/*` (to match `src/routes/blog/[slug]/+page.svelte`). + * + * Unlike `preloadData`, this won't call `load` functions. + * Returns a Promise that resolves when the modules have been imported. + * + * */ + export function preloadCode(pathname: string): Promise; + /** + * Programmatically create a new history entry with the given `page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing). + * + * */ + export function pushState(url: string | URL, state: App.PageState): void; + /** + * Programmatically replace the current history entry with the given `page.state`. To use the current URL, you can pass `''` as the first argument. Used for [shallow routing](https://svelte.dev/docs/kit/shallow-routing). + * + * */ + export function replaceState(url: string | URL, state: App.PageState): void; + type MaybePromise = T | Promise; + + export {}; +} + +declare module '$app/paths' { + /** + * A string that matches [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths). + * + * Example usage: `Link` + */ + export let base: '' | `/${string}`; + + /** + * An absolute path that matches [`config.kit.paths.assets`](https://svelte.dev/docs/kit/configuration#paths). + * + * > [!NOTE] If a value for `config.kit.paths.assets` is specified, it will be replaced with `'/_svelte_kit_assets'` during `vite dev` or `vite preview`, since the assets don't yet live at their eventual URL. + */ + export let assets: '' | `https://${string}` | `http://${string}` | '/_svelte_kit_assets'; + + /** + * Populate a route ID with params to resolve a pathname. + * @example + * ```js + * import { resolveRoute } from '$app/paths'; + * + * resolveRoute( + * `/blog/[slug]/[...somethingElse]`, + * { + * slug: 'hello-world', + * somethingElse: 'something/else' + * } + * ); // `/blog/hello-world/something/else` + * ``` + */ + export function resolveRoute(id: string, params: Record): string; + + export {}; +} + +declare module '$app/server' { + import type { RequestEvent } from '@sveltejs/kit'; + /** + * Read the contents of an imported asset from the filesystem + * @example + * ```js + * import { read } from '$app/server'; + * import somefile from './somefile.txt'; + * + * const asset = read(somefile); + * const text = await asset.text(); + * ``` + * @since 2.4.0 + */ + export function read(asset: string): Response; + /** + * Returns the current `RequestEvent`. Can be used inside server hooks, server `load` functions, actions, and endpoints (and functions called by them). + * + * In environments without [`AsyncLocalStorage`](https://nodejs.org/api/async_context.html#class-asynclocalstorage), this must be called synchronously (i.e. not after an `await`). + * @since 2.20.0 + */ + export function getRequestEvent(): RequestEvent>, string | null>; + + export {}; +} + +declare module '$app/state' { + /** + * A read-only reactive object with information about the current page, serving several use cases: + * - retrieving the combined `data` of all pages/layouts anywhere in your component tree (also see [loading data](https://svelte.dev/docs/kit/load)) + * - retrieving the current value of the `form` prop anywhere in your component tree (also see [form actions](https://svelte.dev/docs/kit/form-actions)) + * - retrieving the page state that was set through `goto`, `pushState` or `replaceState` (also see [goto](https://svelte.dev/docs/kit/$app-navigation#goto) and [shallow routing](https://svelte.dev/docs/kit/shallow-routing)) + * - retrieving metadata such as the URL you're on, the current route and its parameters, and whether or not there was an error + * + * ```svelte + * + * + * + *

Currently at {page.url.pathname}

+ * + * {#if page.error} + * Problem detected + * {:else} + * All systems operational + * {/if} + * ``` + * + * Changes to `page` are available exclusively with runes. (The legacy reactivity syntax will not reflect any changes) + * + * ```svelte + * + * + * ``` + * + * On the server, values can only be read during rendering (in other words _not_ in e.g. `load` functions). In the browser, the values can be read at any time. + * + * */ + export const page: import("@sveltejs/kit").Page; + /** + * A read-only object representing an in-progress navigation, with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties. + * Values are `null` when no navigation is occurring, or during server rendering. + * */ + export const navigating: import("@sveltejs/kit").Navigation | { + from: null; + to: null; + type: null; + willUnload: null; + delta: null; + complete: null; + }; + /** + * A read-only reactive value that's initially `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update `current` to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling. + * */ + export const updated: { + get current(): boolean; + check(): Promise; + }; + + export {}; +} + +declare module '$app/stores' { + export function getStores(): { + + page: typeof page; + + navigating: typeof navigating; + + updated: typeof updated; + }; + /** + * A readable store whose value contains page data. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `page` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * */ + export const page: import("svelte/store").Readable; + /** + * A readable store. + * When navigating starts, its value is a `Navigation` object with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties. + * When navigating finishes, its value reverts to `null`. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `navigating` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * */ + export const navigating: import("svelte/store").Readable; + /** + * A readable store whose initial value is `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update the store value to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling. + * + * On the server, this store can only be subscribed to during component initialization. In the browser, it can be subscribed to at any time. + * + * @deprecated Use `updated` from `$app/state` instead (requires Svelte 5, [see docs for more info](https://svelte.dev/docs/kit/migrating-to-sveltekit-2#SvelteKit-2.12:-$app-stores-deprecated)) + * */ + export const updated: import("svelte/store").Readable & { + check(): Promise; + }; + + export {}; +}/** + * It's possible to tell SvelteKit how to type objects inside your app by declaring the `App` namespace. By default, a new project will have a file called `src/app.d.ts` containing the following: + * + * ```ts + * declare global { + * namespace App { + * // interface Error {} + * // interface Locals {} + * // interface PageData {} + * // interface PageState {} + * // interface Platform {} + * } + * } + * + * export {}; + * ``` + * + * The `export {}` line exists because without it, the file would be treated as an _ambient module_ which prevents you from adding `import` declarations. + * If you need to add ambient `declare module` declarations, do so in a separate file like `src/ambient.d.ts`. + * + * By populating these interfaces, you will gain type safety when using `event.locals`, `event.platform`, and `data` from `load` functions. + */ +declare namespace App { + /** + * Defines the common shape of expected and unexpected errors. Expected errors are thrown using the `error` function. Unexpected errors are handled by the `handleError` hooks which should return this shape. + */ + export interface Error { + message: string; + } + + /** + * The interface that defines `event.locals`, which can be accessed in server [hooks](https://svelte.dev/docs/kit/hooks) (`handle`, and `handleError`), server-only `load` functions, and `+server.js` files. + */ + export interface Locals {} + + /** + * Defines the common shape of the [page.data state](https://svelte.dev/docs/kit/$app-state#page) and [$page.data store](https://svelte.dev/docs/kit/$app-stores#page) - that is, the data that is shared between all pages. + * The `Load` and `ServerLoad` functions in `./$types` will be narrowed accordingly. + * Use optional properties for data that is only present on specific pages. Do not add an index signature (`[key: string]: any`). + */ + export interface PageData {} + + /** + * The shape of the `page.state` object, which can be manipulated using the [`pushState`](https://svelte.dev/docs/kit/$app-navigation#pushState) and [`replaceState`](https://svelte.dev/docs/kit/$app-navigation#replaceState) functions from `$app/navigation`. + */ + export interface PageState {} + + /** + * If your adapter provides [platform-specific context](https://svelte.dev/docs/kit/adapters#Platform-specific-context) via `event.platform`, you can specify it here. + */ + export interface Platform {} +} + +/** + * This module is only available to [service workers](https://svelte.dev/docs/kit/service-workers). + */ +declare module '$service-worker' { + /** + * The `base` path of the deployment. Typically this is equivalent to `config.kit.paths.base`, but it is calculated from `location.pathname` meaning that it will continue to work correctly if the site is deployed to a subdirectory. + * Note that there is a `base` but no `assets`, since service workers cannot be used if `config.kit.paths.assets` is specified. + */ + export const base: string; + /** + * An array of URL strings representing the files generated by Vite, suitable for caching with `cache.addAll(build)`. + * During development, this is an empty array. + */ + export const build: string[]; + /** + * An array of URL strings representing the files in your static directory, or whatever directory is specified by `config.kit.files.assets`. You can customize which files are included from `static` directory using [`config.kit.serviceWorker.files`](https://svelte.dev/docs/kit/configuration) + */ + export const files: string[]; + /** + * An array of pathnames corresponding to prerendered pages and endpoints. + * During development, this is an empty array. + */ + export const prerendered: string[]; + /** + * See [`config.kit.version`](https://svelte.dev/docs/kit/configuration#version). It's useful for generating unique cache names inside your service worker, so that a later deployment of your app can invalidate old caches. + */ + export const version: string; +} + +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/migrate/CHANGELOG.md b/packages/migrate/CHANGELOG.md deleted file mode 100644 index 10794e4c768e..000000000000 --- a/packages/migrate/CHANGELOG.md +++ /dev/null @@ -1,172 +0,0 @@ -# svelte-migrate - -## 1.2.7 - -### Patch Changes - -- chore(deps): update dependency ts-morph to v20 ([#10766](https://github.com/sveltejs/kit/pull/10766)) - -## 1.2.6 - -### Patch Changes - -- fix: do not downgrade versions ([#10352](https://github.com/sveltejs/kit/pull/10352)) - -## 1.2.5 - -### Patch Changes - -- fix: note old eslint plugin deprecation ([#10319](https://github.com/sveltejs/kit/pull/10319)) - -## 1.2.4 - -### Patch Changes - -- fix: ensure glob finds all files in folders ([#10230](https://github.com/sveltejs/kit/pull/10230)) - -## 1.2.3 - -### Patch Changes - -- fix: handle missing fields in migrate script ([#10221](https://github.com/sveltejs/kit/pull/10221)) - -## 1.2.2 - -### Patch Changes - -- fix: finalize svelte-4 migration ([#10195](https://github.com/sveltejs/kit/pull/10195)) - -- fix: changed `index` to `index.d.ts` in `typesVersions` ([#10180](https://github.com/sveltejs/kit/pull/10180)) - -## 1.2.1 - -### Patch Changes - -- docs: update readme ([#10066](https://github.com/sveltejs/kit/pull/10066)) - -## 1.2.0 - -### Minor Changes - -- feat: add Svelte 4 migration ([#9729](https://github.com/sveltejs/kit/pull/9729)) - -## 1.1.3 - -### Patch Changes - -- fix: include index in typesVersions because it's always matched ([#9147](https://github.com/sveltejs/kit/pull/9147)) - -## 1.1.2 - -### Patch Changes - -- fix: update existing exports with prepended outdir ([#9133](https://github.com/sveltejs/kit/pull/9133)) - -- fix: use typesVersions to wire up deep imports ([#9133](https://github.com/sveltejs/kit/pull/9133)) - -## 1.1.1 - -### Patch Changes - -- fix: include utils in migrate's published files ([#9085](https://github.com/sveltejs/kit/pull/9085)) - -## 1.1.0 - -### Minor Changes - -- feat: add `@sveltejs/package` migration (v1->v2) ([#8922](https://github.com/sveltejs/kit/pull/8922)) - -## 1.0.1 - -### Patch Changes - -- fix: correctly check for old load props ([#8537](https://github.com/sveltejs/kit/pull/8537)) - -## 1.0.0 - -### Major Changes - -First major release, see below for the history of changes that lead up to this. -Starting from now all releases follow semver and changes will be listed as Major/Minor/Patch - -## 1.0.0-next.13 - -### Patch Changes - -- fix: more robust uppercase migration ([#7033](https://github.com/sveltejs/kit/pull/7033)) - -## 1.0.0-next.12 - -### Patch Changes - -- feat: do uppercase http verbs migration on the fly ([#6371](https://github.com/sveltejs/kit/pull/6371)) - -## 1.0.0-next.11 - -### Patch Changes - -- fix: git mv files correctly when they contain \$ characters ([#6129](https://github.com/sveltejs/kit/pull/6129)) - -## 1.0.0-next.10 - -### Patch Changes - -- Revert change to suggest props destructuring ([#6099](https://github.com/sveltejs/kit/pull/6099)) - -## 1.0.0-next.9 - -### Patch Changes - -- Handle Error without message, handle status 200, handle missing body ([#6096](https://github.com/sveltejs/kit/pull/6096)) - -## 1.0.0-next.8 - -### Patch Changes - -- Suggest props destructuring if possible ([#6069](https://github.com/sveltejs/kit/pull/6069)) -- Fix typo in migration task ([#6070](https://github.com/sveltejs/kit/pull/6070)) - -## 1.0.0-next.7 - -### Patch Changes - -- Migrate type comments on arrow functions ([#5933](https://github.com/sveltejs/kit/pull/5933)) -- Use LayoutLoad inside +layout.js files ([#5931](https://github.com/sveltejs/kit/pull/5931)) - -## 1.0.0-next.6 - -### Patch Changes - -- Create `.ts` files from `${whitespace}`; - } - - if (/lang(?:uage)?=(['"])(ts|typescript)\1/.test(attrs)) { - ext = '.ts'; - } - - module = dedent(contents.replace(/^\n/, '')); - - const declared = find_declarations(contents); - const delete_var = (/** @type {string } */ key) => { - const declaration = declared?.get(key); - if (declaration && !declaration.import) { - declared?.delete(key); - } - }; - delete_var('load'); - delete_var('router'); - delete_var('hydrate'); - delete_var('prerender'); - const delete_kit_type = (/** @type {string } */ key) => { - const declaration = declared?.get(key); - if ( - declaration && - declaration.import?.type_only && - declaration.import.from === '@sveltejs/kit' && - !new RegExp(`\\W${key}\\W`).test(except_str(content, match)) - ) { - declared?.delete(key); - } - }; - delete_kit_type('Load'); - delete_kit_type('LoadEvent'); - delete_kit_type('LoadOutput'); - - if (!declared || declared.size > 0) { - const body = `\n${indent}${error( - 'Check code was safely removed', - TASKS.PAGE_MODULE_CTX - )}\n${comment(contents, indent)}`; - - return `${body}${whitespace}`; - } - - // nothing was declared here, we can safely remove the script - return ''; - } - - if (!is_error && /export let [\w]+[^"`'\w\s]/.test(contents)) { - contents = `\n${indent}${error('Add data prop', TASKS.PAGE_DATA_PROP)}\n${contents}`; - // Possible TODO: migrate props to data.prop, or suggest $: ({propX, propY, ...} = data); - } - - return `${contents}${whitespace}`; - } - ); - - return { module, main, ext }; -} - -/** @param {string} content */ -function find_declarations(content) { - const file = parse(content); - if (!file) return; - - /** @type {Map} */ - const declared = new Map(); - /** - * @param {string} name - * @param {{from: string, type_only: boolean}} [import_def] - */ - function add(name, import_def) { - declared.set(name, { name, import: import_def }); - } - - for (const statement of file.ast.statements) { - if (ts.isImportDeclaration(statement) && statement.importClause) { - const type_only = statement.importClause.isTypeOnly; - const from = ts.isStringLiteral(statement.moduleSpecifier) - ? statement.moduleSpecifier.text - : ''; - - if (statement.importClause.name) { - add(statement.importClause.name.text, { from, type_only }); - } - - const bindings = statement.importClause.namedBindings; - - if (bindings) { - if (ts.isNamespaceImport(bindings)) { - add(bindings.name.text, { from, type_only }); - } else { - for (const binding of bindings.elements) { - add(binding.name.text, { from, type_only: type_only || binding.isTypeOnly }); - } - } - } - } else if (ts.isVariableStatement(statement)) { - for (const declaration of statement.declarationList.declarations) { - if (ts.isIdentifier(declaration.name)) { - add(declaration.name.text); - } else { - return; // bail out if it's not a simple variable - } - } - } else if (ts.isFunctionDeclaration(statement) || ts.isClassDeclaration(statement)) { - if (statement.name && ts.isIdentifier(statement.name)) { - add(statement.name.text); - } - } else if (ts.isExportDeclaration(statement) && !statement.exportClause) { - return; // export * from '..' -> bail - } - } - - return declared; -} diff --git a/packages/migrate/migrations/routes/migrate_scripts/index.spec.js b/packages/migrate/migrations/routes/migrate_scripts/index.spec.js deleted file mode 100644 index 38f9ebcf612a..000000000000 --- a/packages/migrate/migrations/routes/migrate_scripts/index.spec.js +++ /dev/null @@ -1,14 +0,0 @@ -import { assert, test } from 'vitest'; -import { read_samples } from '../utils.js'; -import { migrate_scripts } from './index.js'; - -for (const sample of read_samples(import.meta.url)) { - test(sample.description, () => { - const actual = migrate_scripts( - sample.before, - sample.description.includes('error'), - sample.description.includes('moved') - ); - assert.equal(actual.main, sample.after); - }); -} diff --git a/packages/migrate/migrations/routes/migrate_scripts/samples.md b/packages/migrate/migrations/routes/migrate_scripts/samples.md deleted file mode 100644 index 6f57fb1f4c6d..000000000000 --- a/packages/migrate/migrations/routes/migrate_scripts/samples.md +++ /dev/null @@ -1,247 +0,0 @@ -## No module context, no page exports - -```svelte before - - - - -

{sry}

-``` - -```svelte after - - - - -

{sry}

-``` - -## Module context that can be removed - -```svelte before - - - -``` - -```svelte after - -``` - -## Module context with moved imports - -```svelte before - - - - -{sry} -``` - -```svelte after - - - - -{sry} -``` - -## Module context with type imports only - -```svelte before - -``` - -```svelte after -``` - -## Module context with type imports only but used in instance script - -```svelte before - - - -``` - -```svelte after - - - -``` - -## Module context with export * from '..' - -```svelte before - -``` - -```svelte after - -``` - -## Module context with named imports - -```svelte before - - - -``` - -```svelte after - - - -``` - -## Module context with named imports that have same name as a load option - -```svelte before - - - -``` - -```svelte after - - - -``` diff --git a/packages/migrate/migrations/routes/migrate_server/index.js b/packages/migrate/migrations/routes/migrate_server/index.js deleted file mode 100644 index eeaa902ee965..000000000000 --- a/packages/migrate/migrations/routes/migrate_server/index.js +++ /dev/null @@ -1,190 +0,0 @@ -import ts from 'typescript'; -import { - automigration, - uppercase_migration, - error, - get_function_node, - get_object_nodes, - is_new, - is_string_like, - manual_return_migration, - parse, - rewrite_returns, - unwrap -} from '../utils.js'; -import * as TASKS from '../tasks.js'; -import { dedent, guess_indent, indent_at_line } from '../../../utils.js'; - -const give_up = `${error('Update +server.js', TASKS.STANDALONE_ENDPOINT)}\n\n`; - -/** - * @param {string} content - * @returns {string} - */ -export function migrate_server(content) { - const file = parse(content); - if (!file) return give_up + content; - - const indent = guess_indent(content); - - const methods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'].filter((name) => - file.exports.map.has(name) - ); - - // If user didn't do the uppercase verbs migration yet, do it here on the fly. - const uppercased = uppercase_migration(methods, file); - if (!uppercased) { - return give_up + content; - } else if (uppercased !== content) { - return migrate_server(uppercased); - } - - const unmigrated = new Set(methods); - - /** @type {Map} */ - const imports = new Map(); - - for (const statement of file.ast.statements) { - for (const method of methods) { - const fn = get_function_node(statement, /** @type{string} */ (file.exports.map.get(method))); - if (fn?.body) { - rewrite_returns(fn.body, (expr, node) => { - // leave `() => new Response(...)` alone - if (is_new(expr, 'Response')) return; - - const value = unwrap(expr); - const nodes = ts.isObjectLiteralExpression(value) && get_object_nodes(value); - - if (nodes) { - const body_is_object_literal = nodes.body && ts.isObjectLiteralExpression(nodes.body); - - if (body_is_object_literal || (nodes.body && ts.isIdentifier(nodes.body))) { - let result; - - let name = 'json'; - let i = 1; - while (content.includes(name)) name = `json$${i++}`; - - imports.set('json', name); - - const body = dedent(nodes.body.getText()); - - if (nodes.headers || (nodes.status && nodes.status.getText() !== '200')) { - const start = indent_at_line(content, expr.pos); - const properties = []; - - if (nodes.status && nodes.status.getText() !== '200') { - properties.push(`status: ${nodes.status.getText()}`); - } - - if (nodes.headers) { - properties.push(`headers: ${nodes.headers.getText()}`); - } - - const ws = `\n${start}`; - const init = `{${ws}${indent}${properties.join(`,${ws}${indent}`)}${ws}}`; - - result = `${name}(${body}, ${init})`; - } else { - result = `${name}(${body})`; - } - - if (body_is_object_literal) { - automigration(expr, file.code, result); - } else { - manual_return_migration( - node || fn, - file.code, - TASKS.STANDALONE_ENDPOINT, - `return ${result};` - ); - } - - return; - } - - let safe_headers = !nodes.headers || !ts.isObjectLiteralExpression(nodes.headers); - if (nodes.headers && ts.isObjectLiteralExpression(nodes.headers)) { - // if `headers` is an object literal, and it either doesn't contain - // `set-cookie` or `set-cookie` is a string, then the headers - // are safe to use in a `Response` - const set_cookie_value = nodes.headers.properties.find((prop) => { - return ( - ts.isPropertyAssignment(prop) && - ts.isStringLiteral(prop.name) && - /set-cookie/i.test(prop.name.text) - ); - }); - - if (!set_cookie_value || is_string_like(set_cookie_value)) { - safe_headers = true; - } - } - - const safe_body = - !nodes.body || - is_string_like(nodes.body) || - (ts.isCallExpression(nodes.body) && - nodes.body.expression.getText() === 'JSON.stringify'); - - if (safe_headers) { - const status = nodes.status ? nodes.status.getText() : '200'; - const headers = nodes.headers?.getText(); - const body = dedent(nodes.body?.getText() || 'undefined'); - - const multiline = /\n/.test(headers); - - const init = [ - status !== '200' && `status: ${status}`, - headers && `headers: ${headers}` - ].filter(Boolean); - - const indent = indent_at_line(content, expr.getStart()); - const end_whitespace = multiline ? `\n${indent}` : ' '; - const join_whitespace = multiline ? end_whitespace + guess_indent(content) : ' '; - - const response = - init.length > 0 - ? `new Response(${body}, {${join_whitespace}${init.join( - `,${join_whitespace}` - )}${end_whitespace}})` - : `new Response(${body})`; - - if (safe_body) { - automigration(expr, file.code, response); - } else { - manual_return_migration( - node || fn, - file.code, - TASKS.STANDALONE_ENDPOINT, - `return ${response};` - ); - } - - return; - } - } - - manual_return_migration(node || fn, file.code, TASKS.STANDALONE_ENDPOINT); - }); - - unmigrated.delete(method); - } - } - } - - if (imports.size) { - const has_imports = file.ast.statements.some((statement) => ts.isImportDeclaration(statement)); - const specifiers = Array.from(imports).map(([name, local]) => - name === local ? name : `${name} as ${local}` - ); - const declaration = `import { ${specifiers.join(', ')} } from '@sveltejs/kit';`; - file.code.prependLeft(0, declaration + (has_imports ? '\n' : '\n\n')); - } - - if (unmigrated.size) { - return give_up + file.code.toString(); - } - - return file.code.toString(); -} diff --git a/packages/migrate/migrations/routes/migrate_server/index.spec.js b/packages/migrate/migrations/routes/migrate_server/index.spec.js deleted file mode 100644 index 188ba33b6ae0..000000000000 --- a/packages/migrate/migrations/routes/migrate_server/index.spec.js +++ /dev/null @@ -1,10 +0,0 @@ -import { assert, test } from 'vitest'; -import { read_samples } from '../utils.js'; -import { migrate_server } from './index.js'; - -for (const sample of read_samples(import.meta.url)) { - test(sample.description, () => { - const actual = migrate_server(sample.before); - assert.equal(actual, sample.after); - }); -} diff --git a/packages/migrate/migrations/routes/migrate_server/samples.md b/packages/migrate/migrations/routes/migrate_server/samples.md deleted file mode 100644 index 3bc08662552f..000000000000 --- a/packages/migrate/migrations/routes/migrate_server/samples.md +++ /dev/null @@ -1,212 +0,0 @@ -## A GET function that returns a JSON object - -```js before -export function GET() { - return { - body: { - a: 1 - } - }; -} -``` - -```js after -import { json } from '@sveltejs/kit'; - -export function GET() { - return json({ - a: 1 - }); -} -``` - -## A GET function that returns a JSON object and already specifies a 'json' identifier - -```js before -export function GET() { - const json = 'shadow'; - - return { - body: { - a: 1 - } - }; -} -``` - -```js after -import { json as json$1 } from '@sveltejs/kit'; - -export function GET() { - const json = 'shadow'; - - return json$1({ - a: 1 - }); -} -``` - -## A GET function that returns a JSON object with custom headers - -```js before -export function GET() { - return { - headers: { - 'x-foo': '123' - }, - body: { - a: 1 - } - }; -} -``` - -```js after -import { json } from '@sveltejs/kit'; - -export function GET() { - return json({ - a: 1 - }, { - headers: { - 'x-foo': '123' - } - }); -} -``` - -## A GET arrow function that returns a JSON object - -```js before -export const GET = () => ({ - body: { - a: 1 - } -}); -``` - -```js after -import { json } from '@sveltejs/kit'; - -export const GET = () => json({ - a: 1 -}); -``` - -## GET returns we can't migrate - -```js before -export function GET() { - if (a) { - return { - body - }; - } else if (b) { - return { - body: new ReadableStream(), - headers: { - 'content-type': 'octasomething' - } - } - } else if (c) { - return { - body: 'string', - headers: { - 'x-foo': 'bar' - } - } - } -} -``` - -```js after -import { json } from '@sveltejs/kit'; - -export function GET() { - if (a) { - throw new Error("@migration task: Migrate this return statement (https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292701)"); - // Suggestion (check for correctness before using): - // return json(body); - return { - body - }; - } else if (b) { - throw new Error("@migration task: Migrate this return statement (https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292701)"); - // Suggestion (check for correctness before using): - // return new Response(new ReadableStream(), { - // headers: { - // 'content-type': 'octasomething' - // } - // }); - return { - body: new ReadableStream(), - headers: { - 'content-type': 'octasomething' - } - } - } else if (c) { - return new Response('string', { - headers: { - 'x-foo': 'bar' - } - }) - } -} -``` - -## A function that returns a Response - -```js before -export const GET = () => new Response('text'); -``` - -```js after -export const GET = () => new Response('text'); -``` - -## A function that returns an unknown value - -```js before -export const GET = () => createResponse('text'); -``` - -```js after -throw new Error("@migration task: Migrate this return statement (https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292701)"); -export const GET = () => createResponse('text'); -``` - -## A function that returns nothing - -```js before -export function GET() { - return; -} -``` - -```js after -export function GET() { - return; -} -``` - -## A GET function that returns a JSON object - -```js before -export function get() { - return { - body: { - a: 1 - } - }; -} -``` - -```js after -import { json } from '@sveltejs/kit'; - -export function GET() { - return json({ - a: 1 - }); -} -``` diff --git a/packages/migrate/migrations/routes/tasks.js b/packages/migrate/migrations/routes/tasks.js deleted file mode 100644 index 775623232882..000000000000 --- a/packages/migrate/migrations/routes/tasks.js +++ /dev/null @@ -1,5 +0,0 @@ -export const STANDALONE_ENDPOINT = '3292701'; -export const PAGE_ENDPOINT = '3292699'; -export const PAGE_LOAD = '3292693'; -export const PAGE_MODULE_CTX = '3292722'; -export const PAGE_DATA_PROP = '3292707'; diff --git a/packages/migrate/migrations/routes/utils.js b/packages/migrate/migrations/routes/utils.js deleted file mode 100644 index ca6c375a9518..000000000000 --- a/packages/migrate/migrations/routes/utils.js +++ /dev/null @@ -1,404 +0,0 @@ -import fs from 'node:fs'; -import ts from 'typescript'; -import MagicString from 'magic-string'; -import { comment, indent_at_line } from '../../utils.js'; - -/** - * @param {string} description - * @param {string} [comment_id] - */ -export function task(description, comment_id) { - return ( - `@migration task: ${description}` + - (comment_id - ? ` (https://github.com/sveltejs/kit/discussions/5774#discussioncomment-${comment_id})` - : '') - ); -} - -/** - * @param {string} description - * @param {string} comment_id - */ -export function error(description, comment_id) { - return `throw new Error(${JSON.stringify(task(description, comment_id))});`; -} - -/** @param {string} content */ -export function adjust_imports(content) { - try { - const ast = ts.createSourceFile( - 'filename.ts', - content, - ts.ScriptTarget.Latest, - true, - ts.ScriptKind.TS - ); - - const code = new MagicString(content); - - /** @param {number} pos */ - function adjust(pos) { - // TypeScript AST is a clusterfuck, we need to step forward to find - // where the node _actually_ starts - while (content[pos] !== '.') pos += 1; - - // replace ../ with ../../ and ./ with ../ - code.prependLeft(pos, content[pos + 1] === '.' ? '../' : '.'); - } - - /** @param {ts.Node} node */ - function walk(node) { - if (ts.isImportDeclaration(node)) { - const text = /** @type {ts.StringLiteral} */ (node.moduleSpecifier).text; - if (text[0] === '.') adjust(node.moduleSpecifier.pos); - } - - if (ts.isCallExpression(node) && node.expression.getText() === 'import') { - const arg = node.arguments[0]; - - if (ts.isStringLiteral(arg)) { - if (arg.text[0] === '.') adjust(arg.pos); - } else if (ts.isTemplateLiteral(arg) && !ts.isNoSubstitutionTemplateLiteral(arg)) { - if (arg.head.text[0] === '.') adjust(arg.head.pos); - } - } - - node.forEachChild(walk); - } - - ast.forEachChild(walk); - - return code.toString(); - } catch { - // this is enough of an edge case that it's probably fine to - // just leave the code as we found it - return content; - } -} - -/** - * - * @param {ts.Node} node - * @param {MagicString} str - * @param {string} comment_nr - * @param {string} [suggestion] - */ -export function manual_return_migration(node, str, comment_nr, suggestion) { - manual_migration(node, str, 'Migrate this return statement', comment_nr, suggestion); -} - -/** - * @param {ts.Node} node - * @param {MagicString} str - * @param {string} message - * @param {string} comment_nr - * @param {string} [suggestion] - */ -export function manual_migration(node, str, message, comment_nr, suggestion) { - // handle case where this is called on a (arrow) function - if (ts.isFunctionExpression(node) || ts.isArrowFunction(node)) { - node = node.parent.parent.parent; - } - - const indent = indent_at_line(str.original, node.getStart()); - - let appended = ''; - - if (suggestion) { - appended = `\n${indent}// Suggestion (check for correctness before using):\n${indent}// ${comment( - suggestion, - indent - )}`; - } - - str.prependLeft(node.getStart(), error(message, comment_nr) + appended + `\n${indent}`); -} - -/** - * - * @param {ts.Node} node - * @param {MagicString} str - * @param {string} migration - */ -export function automigration(node, str, migration) { - str.overwrite(node.getStart(), node.getEnd(), migration); -} - -/** - * @param {ts.ObjectLiteralExpression} node - */ -export function get_object_nodes(node) { - /** @type {Record} */ - const obj = {}; - - for (const property of node.properties) { - if (ts.isPropertyAssignment(property) && ts.isIdentifier(property.name)) { - obj[property.name.text] = property.initializer; - } else if (ts.isShorthandPropertyAssignment(property)) { - obj[property.name.text] = property.name; - } else { - return null; // object contains funky stuff like computed properties/accessors — bail - } - } - - return obj; -} - -/** - * @param {ts.Node} node - */ -export function is_string_like(node) { - return ( - ts.isStringLiteral(node) || - ts.isTemplateExpression(node) || - ts.isNoSubstitutionTemplateLiteral(node) - ); -} - -/** @param {ts.SourceFile} node */ -export function get_exports(node) { - /** @type {Map} */ - const map = new Map(); - - let complex = false; - - for (const statement of node.statements) { - if ( - ts.isExportDeclaration(statement) && - statement.exportClause && - ts.isNamedExports(statement.exportClause) - ) { - // export { x }, export { x as y } - for (const specifier of statement.exportClause.elements) { - map.set(specifier.name.text, specifier.propertyName?.text || specifier.name.text); - } - } else if ( - ts.isFunctionDeclaration(statement) && - statement.name && - ts.getModifiers(statement)?.[0]?.kind === ts.SyntaxKind.ExportKeyword - ) { - // export function x ... - map.set(statement.name.text, statement.name.text); - } else if ( - ts.isVariableStatement(statement) && - ts.getModifiers(statement)?.[0]?.kind === ts.SyntaxKind.ExportKeyword - ) { - // export const x = ..., y = ... - for (const declaration of statement.declarationList.declarations) { - if (ts.isIdentifier(declaration.name)) { - map.set(declaration.name.text, declaration.name.text); - } else { - // might need to bail out on encountering this edge case, - // because this stuff can get pretty intense - complex = true; - } - } - } - } - - return { map, complex }; -} - -/** - * @param {ts.Node} statement - * @param {string[]} names - * @returns {ts.FunctionDeclaration | ts.FunctionExpression | ts.ArrowFunction | undefined} - */ -export function get_function_node(statement, ...names) { - if ( - ts.isFunctionDeclaration(statement) && - statement.name && - names.includes(statement.name.text) - ) { - // export function x ... - return statement; - } - - if (ts.isVariableStatement(statement)) { - for (const declaration of statement.declarationList.declarations) { - if ( - ts.isIdentifier(declaration.name) && - names.includes(declaration.name.text) && - declaration.initializer && - (ts.isArrowFunction(declaration.initializer) || - ts.isFunctionExpression(declaration.initializer)) - ) { - // export const x = ... - return declaration.initializer; - } - } - } -} - -/** - * Utility for rewriting return statements. - * If `node` is `undefined`, it means it's a concise arrow function body (`() => ({}))`. - * Lone `return;` statements are left untouched. - * @param {ts.Block | ts.ConciseBody} block - * @param {(expression: ts.Expression, node: ts.ReturnStatement | undefined) => void} callback - */ -export function rewrite_returns(block, callback) { - if (ts.isBlock(block)) { - /** @param {ts.Node} node */ - function walk(node) { - if ( - ts.isArrowFunction(node) || - ts.isFunctionExpression(node) || - ts.isFunctionDeclaration(node) - ) { - // don't cross this boundary - return; - } - - if (ts.isReturnStatement(node) && node.expression) { - callback(node.expression, node); - return; - } - - node.forEachChild(walk); - } - - block.forEachChild(walk); - } else { - callback(block, undefined); - } -} - -/** @param {ts.Node} node */ -export function unwrap(node) { - if (ts.isParenthesizedExpression(node)) { - return node.expression; - } - - return node; -} - -/** - * @param {ts.Node} node - * @param {string} name - * @returns {node is ts.isNewExpression} - */ -export function is_new(node, name) { - return ( - ts.isNewExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === name - ); -} - -/** @param {string} content */ -export function parse(content) { - try { - const ast = ts.createSourceFile( - 'filename.ts', - content, - ts.ScriptTarget.Latest, - true, - ts.ScriptKind.TS - ); - - const code = new MagicString(content); - - return { - ast, - code, - exports: get_exports(ast) - }; - } catch { - return null; - } -} - -/** @param {string} test_file */ -export function read_samples(test_file) { - const markdown = fs.readFileSync(new URL('./samples.md', test_file), 'utf8'); - const samples = markdown - .split(/^##/gm) - .slice(1) - .map((block) => { - const description = block.split('\n')[0]; - const before = /```(js|ts|svelte) before\n([^]*?)\n```/.exec(block); - const after = /```(js|ts|svelte) after\n([^]*?)\n```/.exec(block); - - const match = /> file: (.+)/.exec(block); - - return { - description, - before: before ? before[2] : '', - after: after ? after[2] : '', - filename: match?.[1], - solo: block.includes('> solo') - }; - }); - - if (samples.some((sample) => sample.solo)) { - return samples.filter((sample) => sample.solo); - } - - return samples; -} - -/** - * @param {ts.Node} node - * @param {MagicString} code - * @param {string} old_type - * @param {string} new_type - */ -export function rewrite_type(node, code, old_type, new_type) { - // @ts-ignore - const jsDoc = node.jsDoc || node.parent?.parent?.parent?.jsDoc; - if (jsDoc) { - // @ts-ignore - for (const comment of jsDoc) { - const str = comment.getText(); - const index = str.indexOf(old_type); - - if (index !== -1) { - code.overwrite(comment.pos + index, comment.pos + index + old_type.length, new_type); - } - } - } - - // @ts-ignore - const type = node.type || node.parent.type; // handle both fn and var declarations - - if (type?.typeName?.escapedText.startsWith(old_type)) { - const start = type.getStart(); - code.overwrite(start, start + old_type.length, new_type); - } -} - -/** - * Does the HTTP verbs uppercase migration if it didn't happen yet. If a string - * is returned, the migration was done or wasn't needed. If undefined is returned, - * the migration is needed but couldn't be done. - * - * @param {string[]} methods - * @param {NonNullable>} file - */ -export function uppercase_migration(methods, file) { - const old_methods = new Set( - ['get', 'post', 'put', 'patch', 'del'].filter((name) => file.exports.map.has(name)) - ); - - if (old_methods.size && !methods.length) { - for (const statement of file.ast.statements) { - for (const method of old_methods) { - const fn = get_function_node( - statement, - /** @type{string} */ (file.exports.map.get(method)) - ); - if (!fn?.name) { - continue; - } - file.code.overwrite( - fn.name.getStart(), - fn.name.getEnd(), - method === 'del' ? 'DELETE' : method.toUpperCase() - ); - old_methods.delete(method); - } - } - } - - return old_methods.size ? undefined : file.code.toString(); -} diff --git a/packages/migrate/migrations/svelte-4/index.js b/packages/migrate/migrations/svelte-4/index.js deleted file mode 100644 index 49cd16f7d0e3..000000000000 --- a/packages/migrate/migrations/svelte-4/index.js +++ /dev/null @@ -1,109 +0,0 @@ -import colors from 'kleur'; -import fs from 'node:fs'; -import prompts from 'prompts'; -import glob from 'tiny-glob/sync.js'; -import { bail, check_git } from '../../utils.js'; -import { update_js_file, update_pkg_json, update_svelte_file } from './migrate.js'; - -export async function migrate() { - if (!fs.existsSync('package.json')) { - bail('Please re-run this script in a directory with a package.json'); - } - - console.log( - colors - .bold() - .yellow( - '\nThis will update files in the current directory\n' + - "If you're inside a monorepo, don't run this in the root directory, rather run it in all projects independently.\n" - ) - ); - - const use_git = check_git(); - - const response = await prompts({ - type: 'confirm', - name: 'value', - message: 'Continue?', - initial: false - }); - - if (!response.value) { - process.exit(1); - } - - const folders = await prompts({ - type: 'multiselect', - name: 'value', - message: 'Which folders should be migrated?', - choices: fs - .readdirSync('.') - .filter( - (dir) => fs.statSync(dir).isDirectory() && dir !== 'node_modules' && !dir.startsWith('.') - ) - .map((dir) => ({ title: dir, value: dir, selected: true })) - }); - - if (!folders.value?.length) { - process.exit(1); - } - - const migrate_transition = await prompts({ - type: 'confirm', - name: 'value', - message: - 'Add the `|global` modifier to currently global transitions for backwards compatibility? More info at https://svelte.dev/docs/v4-migration-guide#transitions-are-local-by-default', - initial: true - }); - - update_pkg_json(); - - // const { default: config } = fs.existsSync('svelte.config.js') - // ? await import(pathToFileURL(path.resolve('svelte.config.js')).href) - // : { default: {} }; - - /** @type {string[]} */ - const svelte_extensions = /* config.extensions ?? - disabled because it would break .svx */ [ - '.svelte' - ]; - const extensions = [...svelte_extensions, '.ts', '.js']; - // For some reason {folders.value.join(',')} as part of the glob doesn't work and returns less files - const files = folders.value.flatMap( - /** @param {string} folder */ (folder) => - glob(`${folder}/**`, { filesOnly: true, dot: true }) - .map((file) => file.replace(/\\/g, '/')) - .filter((file) => !file.includes('/node_modules/')) - ); - - for (const file of files) { - if (extensions.some((ext) => file.endsWith(ext))) { - if (svelte_extensions.some((ext) => file.endsWith(ext))) { - update_svelte_file(file, migrate_transition.value); - } else { - update_js_file(file); - } - } - } - - console.log(colors.bold().green('✔ Your project has been migrated')); - - console.log('\nRecommended next steps:\n'); - - const cyan = colors.bold().cyan; - - const tasks = [ - use_git && cyan('git commit -m "migration to Svelte 4"'), - 'Review the migration guide at https://svelte.dev/docs/v4-migration-guide', - 'Read the updated docs at https://svelte.dev/docs' - ].filter(Boolean); - - tasks.forEach((task, i) => { - console.log(` ${i + 1}: ${task}`); - }); - - console.log(''); - - if (use_git) { - console.log(`Run ${cyan('git diff')} to review changes.\n`); - } -} diff --git a/packages/migrate/migrations/svelte-4/migrate.js b/packages/migrate/migrations/svelte-4/migrate.js deleted file mode 100644 index e30660918ee7..000000000000 --- a/packages/migrate/migrations/svelte-4/migrate.js +++ /dev/null @@ -1,428 +0,0 @@ -import fs from 'node:fs'; -import { Project, ts, Node } from 'ts-morph'; -import semver from 'semver'; - -export function update_pkg_json() { - fs.writeFileSync( - 'package.json', - update_pkg_json_content(fs.readFileSync('package.json', 'utf8')) - ); -} - -/** - * @param {string} content - */ -export function update_pkg_json_content(content) { - const indent = content.split('\n')[1].match(/^\s+/)?.[0] || ' '; - const pkg = JSON.parse(content); - - /** - * @param {string} name - * @param {string} version - * @param {string} [additional] - */ - function update_pkg(name, version, additional = '') { - if (pkg.dependencies?.[name]) { - const existing_range = pkg.dependencies[name]; - - if (semver.validRange(existing_range) && !semver.subset(existing_range, version)) { - log_migration(`Updated ${name} to ${version} ${additional}`); - pkg.dependencies[name] = version; - } - } - - if (pkg.devDependencies?.[name]) { - const existing_range = pkg.devDependencies[name]; - - if (semver.validRange(existing_range) && !semver.subset(existing_range, version)) { - log_migration(`Updated ${name} to ${version} ${additional}`); - pkg.devDependencies[name] = version; - } - } - } - - update_pkg('svelte', '^4.0.0'); - update_pkg('svelte-check', '^3.4.3'); - update_pkg('svelte-preprocess', '^5.0.3'); - update_pkg('@sveltejs/kit', '^1.20.4'); - update_pkg('@sveltejs/vite-plugin-svelte', '^2.4.1'); - update_pkg( - 'svelte-loader', - '^3.1.8', - ' (if you are still on webpack 4, you need to update to webpack 5)' - ); - update_pkg('rollup-plugin-svelte', '^7.1.5'); - update_pkg('prettier-plugin-svelte', '^2.10.1'); - update_pkg('eslint-plugin-svelte', '^2.30.0'); - update_pkg( - 'eslint-plugin-svelte3', - '^4.0.0', - ' (this package is deprecated, use eslint-plugin-svelte instead. More info: https://svelte.dev/docs/v4-migration-guide#new-eslint-package)' - ); - update_pkg( - 'typescript', - '^5.0.0', - ' (this might introduce new type errors due to breaking changes within TypeScript)' - ); - - return JSON.stringify(pkg, null, indent); -} - -/** - * @param {string} file_path - * @param {boolean} migrate_transition - */ -export function update_svelte_file(file_path, migrate_transition) { - try { - const content = fs.readFileSync(file_path, 'utf-8'); - const updated = content.replace( - /([^]+?)<\/script>(\n*)/g, - (_match, attrs, contents, whitespace) => { - return `${transform_code( - contents, - (attrs.includes('lang=') || attrs.includes('type=')) && - (attrs.includes('ts') || attrs.includes('typescript')) - )}${whitespace}`; - } - ); - fs.writeFileSync(file_path, transform_svelte_code(updated, migrate_transition), 'utf-8'); - } catch (e) { - console.error(`Error updating ${file_path}:`, e); - } -} - -/** @param {string} file_path */ -export function update_js_file(file_path) { - try { - const content = fs.readFileSync(file_path, 'utf-8'); - const updated = transform_code(content, file_path.endsWith('.ts')); - fs.writeFileSync(file_path, updated, 'utf-8'); - } catch (e) { - console.error(`Error updating ${file_path}:`, e); - } -} - -/** - * @param {string} code - * @param {boolean} is_ts - */ -export function transform_code(code, is_ts) { - const project = new Project({ useInMemoryFileSystem: true }); - const source = project.createSourceFile('svelte.ts', code); - update_imports(source, is_ts); - update_typeof_svelte_component(source, is_ts); - update_action_types(source, is_ts); - update_action_return_types(source, is_ts); - return source.getFullText(); -} - -/** - * @param {string} code - * @param {boolean} migrate_transition - */ -export function transform_svelte_code(code, migrate_transition) { - code = update_svelte_options(code); - return update_transitions(code, migrate_transition); -} - -/** - * -> - * @param {string} code - */ -function update_svelte_options(code) { - return code.replace(//, (match) => { - log_migration( - 'Replaced `svelte:options` `tag` attribute with `customElement` attribute: https://svelte.dev/docs/v4-migration-guide#custom-elements-with-svelte' - ); - return match.replace('tag=', 'customElement='); - }); -} - -/** - * transition/in/out:x -> transition/in/out:x|global - * transition/in/out|local:x -> transition/in/out:x - * @param {string} code - * @param {boolean} migrate_transition - */ -function update_transitions(code, migrate_transition) { - if (migrate_transition) { - const replaced = code.replace(/(\s)(transition:|in:|out:)(\w+)(?=[\s>=])/g, '$1$2$3|global'); - if (replaced !== code) { - log_migration( - 'Added `|global` to `transition`, `in`, and `out` directives (transitions are local by default now): https://svelte.dev/docs/v4-migration-guide#transitions-are-local-by-default' - ); - } - code = replaced; - } - const replaced = code.replace(/(\s)(transition:|in:|out:)(\w+)(\|local)(?=[\s>=])/g, '$1$2$3'); - if (replaced !== code) { - log_migration( - 'Removed `|local` from `transition`, `in`, and `out` directives (transitions are local by default now): https://svelte.dev/docs/v4-migration-guide#transitions-are-local-by-default' - ); - } - return replaced; -} - -/** - * Action -> Action - * @param {import('ts-morph').SourceFile} source - * @param {boolean} is_ts - */ -function update_action_types(source, is_ts) { - const logger = log_on_ts_modification( - source, - 'Updated `Action` interface usages: https://svelte.dev/docs/v4-migration-guide#stricter-types-for-svelte-functions' - ); - - const imports = get_imports(source, 'svelte/action', 'Action'); - for (const namedImport of imports) { - const identifiers = find_identifiers(source, namedImport.getAliasNode()?.getText() ?? 'Action'); - for (const id of identifiers) { - const parent = id.getParent(); - if (Node.isTypeReference(parent)) { - const type_args = parent.getTypeArguments(); - if (type_args.length === 1) { - parent.addTypeArgument('any'); - } else if (type_args.length === 0) { - parent.addTypeArgument('HTMLElement'); - parent.addTypeArgument('any'); - } - } - } - } - - if (!is_ts) { - replaceInJsDoc(source, (text) => { - return text.replace( - /import\((['"])svelte\/action['"]\).Action(<\w+>)?(?=[^<\w]|$)/g, - (_, quote, type) => - `import(${quote}svelte/action${quote}).Action<${ - type ? type.slice(1, -1) + '' : 'HTMLElement' - }, any>` - ); - }); - } - - logger(); -} - -/** - * ActionReturn -> ActionReturn - * @param {import('ts-morph').SourceFile} source - * @param {boolean} is_ts - */ -function update_action_return_types(source, is_ts) { - const logger = log_on_ts_modification( - source, - 'Updated `ActionReturn` interface usages: https://svelte.dev/docs/v4-migration-guide#stricter-types-for-svelte-functions' - ); - - const imports = get_imports(source, 'svelte/action', 'ActionReturn'); - for (const namedImport of imports) { - const identifiers = find_identifiers( - source, - namedImport.getAliasNode()?.getText() ?? 'ActionReturn' - ); - for (const id of identifiers) { - const parent = id.getParent(); - if (Node.isTypeReference(parent)) { - const type_args = parent.getTypeArguments(); - if (type_args.length === 0) { - parent.addTypeArgument('any'); - } - } - } - } - - if (!is_ts) { - replaceInJsDoc(source, (text) => { - return text.replace( - /import\((['"])svelte\/action['"]\).ActionReturn(?=[^<\w]|$)/g, - 'import($1svelte/action$1).ActionReturn' - ); - }); - } - - logger(); -} - -/** - * SvelteComponentTyped -> SvelteComponent - * @param {import('ts-morph').SourceFile} source - * @param {boolean} is_ts - */ -function update_imports(source, is_ts) { - const logger = log_on_ts_modification( - source, - 'Replaced `SvelteComponentTyped` imports with `SvelteComponent` imports: https://svelte.dev/docs/v4-migration-guide#stricter-types-for-svelte-functions' - ); - - const identifiers = find_identifiers(source, 'SvelteComponent'); - const can_rename = identifiers.every((id) => { - const parent = id.getParent(); - return ( - (Node.isImportSpecifier(parent) && - !parent.getAliasNode() && - parent.getParent().getParent().getParent().getModuleSpecifier().getText() === 'svelte') || - !is_declaration(parent) - ); - }); - - const imports = get_imports(source, 'svelte', 'SvelteComponentTyped'); - for (const namedImport of imports) { - if (can_rename) { - namedImport.renameAlias('SvelteComponent'); - if ( - namedImport - .getParent() - .getElements() - .some((e) => !e.getAliasNode() && e.getNameNode().getText() === 'SvelteComponent') - ) { - namedImport.remove(); - } else { - namedImport.setName('SvelteComponent'); - namedImport.removeAlias(); - } - } else { - namedImport.renameAlias('SvelteComponentTyped'); - namedImport.setName('SvelteComponent'); - } - } - - if (!is_ts) { - replaceInJsDoc(source, (text) => { - return text.replace( - /import\((['"])svelte['"]\)\.SvelteComponentTyped(?=\W|$)/g, - 'import($1svelte$1).SvelteComponent' - ); - }); - } - - logger(); -} - -/** - * typeof SvelteComponent -> typeof SvelteComponent - * @param {import('ts-morph').SourceFile} source - * @param {boolean} is_ts - */ -function update_typeof_svelte_component(source, is_ts) { - const logger = log_on_ts_modification( - source, - 'Adjusted `typeof SvelteComponent` to `typeof SvelteComponent`: https://svelte.dev/docs/v4-migration-guide#stricter-types-for-svelte-functions' - ); - - const imports = get_imports(source, 'svelte', 'SvelteComponent'); - - for (const type of imports) { - if (type) { - const name = type.getAliasNode() ?? type.getNameNode(); - name.findReferencesAsNodes().forEach((ref) => { - const parent = ref.getParent(); - if (parent && Node.isTypeQuery(parent)) { - const id = parent.getFirstChildByKind(ts.SyntaxKind.Identifier); - if (id?.getText() === name.getText()) { - const typeArguments = parent.getTypeArguments(); - if (typeArguments.length === 0) { - parent.addTypeArgument('any'); - } - } - } - }); - } - } - - if (!is_ts) { - replaceInJsDoc(source, (text) => { - return text.replace( - /typeof import\((['"])svelte['"]\)\.SvelteComponent(?=[^<\w]|$)/g, - 'typeof import($1svelte$1).SvelteComponent' - ); - }); - } - - logger(); -} - -/** - * @param {import('ts-morph').SourceFile} source - * @param {string} from - * @param {string} name - */ -function get_imports(source, from, name) { - return source - .getImportDeclarations() - .filter((i) => i.getModuleSpecifierValue() === from) - .flatMap((i) => i.getNamedImports()) - .filter((i) => i.getName() === name); -} - -/** - * @param {import('ts-morph').SourceFile} source - * @param {string} name - */ -function find_identifiers(source, name) { - return source.getDescendantsOfKind(ts.SyntaxKind.Identifier).filter((i) => i.getText() === name); -} - -/** - * Does not include imports - * @param {Node} node - */ -function is_declaration(node) { - return ( - Node.isVariableDeclaration(node) || - Node.isFunctionDeclaration(node) || - Node.isClassDeclaration(node) || - Node.isTypeAliasDeclaration(node) || - Node.isInterfaceDeclaration(node) - ); -} - -/** - * @param {import('ts-morph').SourceFile} source - * @param {(text: string) => string | undefined} replacer - */ -function replaceInJsDoc(source, replacer) { - source.forEachChild((node) => { - if (Node.isJSDocable(node)) { - const tags = node.getJsDocs().flatMap((jsdoc) => jsdoc.getTags()); - tags.forEach((t) => - t.forEachChild((c) => { - if (Node.isJSDocTypeExpression(c)) { - const text = c.getText().slice(1, -1); - const replacement = replacer(text); - if (replacement && replacement !== text) { - c.replaceWithText(`{${replacement}}`); - } - } - }) - ); - } - }); -} - -const logged_migrations = new Set(); - -/** - * @param {import('ts-morph').SourceFile} source - * @param {string} text - */ -function log_on_ts_modification(source, text) { - let logged = false; - const log = () => { - if (!logged) { - logged = true; - log_migration(text); - } - }; - source.onModified(log); - return () => source.onModified(log, false); -} - -/** @param {string} text */ -function log_migration(text) { - if (logged_migrations.has(text)) return; - console.log(text); - logged_migrations.add(text); -} diff --git a/packages/migrate/migrations/svelte-4/migrate.spec.js b/packages/migrate/migrations/svelte-4/migrate.spec.js deleted file mode 100644 index d3c66b5dc46b..000000000000 --- a/packages/migrate/migrations/svelte-4/migrate.spec.js +++ /dev/null @@ -1,383 +0,0 @@ -import { assert, test } from 'vitest'; -import { transform_code, transform_svelte_code, update_pkg_json_content } from './migrate.js'; - -test('Updates SvelteComponentTyped #1', () => { - const result = transform_code( - `import { SvelteComponentTyped } from 'svelte'; - -export class Foo extends SvelteComponentTyped<{}> {} - -const bar: SvelteComponentTyped = null;`, - true - ); - assert.equal( - result, - `import { SvelteComponent } from 'svelte'; - -export class Foo extends SvelteComponent<{}> {} - -const bar: SvelteComponent = null;` - ); -}); - -test('Updates SvelteComponentTyped #2', () => { - const result = transform_code( - `import { SvelteComponentTyped, SvelteComponent } from 'svelte'; - -export class Foo extends SvelteComponentTyped<{}> {} - -const bar: SvelteComponentTyped = null; -const baz: SvelteComponent = null;`, - true - ); - assert.equal( - result, - `import { SvelteComponent } from 'svelte'; - -export class Foo extends SvelteComponent<{}> {} - -const bar: SvelteComponent = null; -const baz: SvelteComponent = null;` - ); -}); - -test('Updates SvelteComponentTyped #3', () => { - const result = transform_code( - `import { SvelteComponentTyped } from 'svelte'; - -interface SvelteComponent {} - -export class Foo extends SvelteComponentTyped<{}> {} - -const bar: SvelteComponentTyped = null; -const baz: SvelteComponent = null;`, - true - ); - assert.equal( - result, - `import { SvelteComponent as SvelteComponentTyped } from 'svelte'; - -interface SvelteComponent {} - -export class Foo extends SvelteComponentTyped<{}> {} - -const bar: SvelteComponentTyped = null; -const baz: SvelteComponent = null;` - ); -}); - -test('Updates SvelteComponentTyped (jsdoc)', () => { - const result = transform_code( - ` - /** @type {import('svelte').SvelteComponentTyped} */ - const bar = null; - /** @type {import('svelte').SvelteComponentTyped} */ - const baz = null; - `, - false - ); - assert.equal( - result, - ` - /** @type {import('svelte').SvelteComponent} */ - const bar = null; - /** @type {import('svelte').SvelteComponent} */ - const baz = null; - ` - ); -}); - -test('Updates typeof SvelteComponent', () => { - const result = transform_code( - `import { SvelteComponent } from 'svelte'; - import { SvelteComponent as C } from 'svelte'; - - const a: typeof SvelteComponent = null; - function b(c: typeof SvelteComponent) {} - const c: typeof SvelteComponent = null; - const d: typeof C = null; - `, - true - ); - assert.equal( - result, - `import { SvelteComponent } from 'svelte'; - import { SvelteComponent as C } from 'svelte'; - - const a: typeof SvelteComponent = null; - function b(c: typeof SvelteComponent) {} - const c: typeof SvelteComponent = null; - const d: typeof C = null; - ` - ); -}); - -test('Updates typeof SvelteComponent (jsdoc)', () => { - const result = transform_code( - ` - /** @type {typeof import('svelte').SvelteComponent} */ - const a = null; - /** @type {typeof import('svelte').SvelteComponent} */ - const c = null; - /** @type {typeof C} */ - const d: typeof C = null; - `, - false - ); - assert.equal( - result, - ` - /** @type {typeof import('svelte').SvelteComponent} */ - const a = null; - /** @type {typeof import('svelte').SvelteComponent} */ - const c = null; - /** @type {typeof C} */ - const d: typeof C = null; - ` - ); -}); - -test('Updates Action and ActionReturn', () => { - const result = transform_code( - `import type { Action, ActionReturn } from 'svelte/action'; - - const a: Action = () => {}; - const b: Action = () => {}; - const c: Action = () => {}; - const d: Action = () => {}; - const e: ActionReturn = () => {}; - const f: ActionReturn = () => {}; - const g: ActionReturn = () => {}; - `, - true - ); - assert.equal( - result, - - `import type { Action, ActionReturn } from 'svelte/action'; - - const a: Action = () => {}; - const b: Action = () => {}; - const c: Action = () => {}; - const d: Action = () => {}; - const e: ActionReturn = () => {}; - const f: ActionReturn = () => {}; - const g: ActionReturn = () => {}; - ` - ); -}); - -test('Updates Action and ActionReturn (jsdoc)', () => { - const result = transform_code( - ` - /** @type {import('svelte/action').Action} */ - const a = () => {}; - /** @type {import('svelte/action').Action} */ - const b = () => {}; - /** @type {import('svelte/action').Action} */ - const c = () => {}; - /** @type {import('svelte/action').Action} */ - const d = () => {}; - /** @type {import('svelte/action').ActionReturn} */ - const e = () => {}; - /** @type {import('svelte/action').ActionReturn} */ - const f = () => {}; - /** @type {import('svelte/action').ActionReturn} */ - const g = () => {}; - `, - false - ); - assert.equal( - result, - - ` - /** @type {import('svelte/action').Action} */ - const a = () => {}; - /** @type {import('svelte/action').Action} */ - const b = () => {}; - /** @type {import('svelte/action').Action} */ - const c = () => {}; - /** @type {import('svelte/action').Action} */ - const d = () => {}; - /** @type {import('svelte/action').ActionReturn} */ - const e = () => {}; - /** @type {import('svelte/action').ActionReturn} */ - const f = () => {}; - /** @type {import('svelte/action').ActionReturn} */ - const g = () => {}; - ` - ); -}); - -test('Updates svelte:options #1', () => { - const result = transform_svelte_code( - ` - -
hi
`, - true - ); - assert.equal( - result, - ` - -
hi
` - ); -}); - -test('Updates svelte:options #2', () => { - const result = transform_svelte_code( - ` - - - -
hi
`, - true - ); - assert.equal( - result, - ` - - - -
hi
` - ); -}); - -test('Updates transitions', () => { - const result = transform_svelte_code( - `
-
-
-
-
-
-
-
-
-
-
-
- -
-
- `, - true - ); - assert.equal( - result, - `
-
-
-
-
-
-
-
-
-
-
-
- -
-
- ` - ); -}); - -test('Updates transitions #2', () => { - const result = transform_svelte_code( - `
-
-
-
-
-
-
-
-
-
-
-
- -
-
- `, - false - ); - assert.equal( - result, - `
-
-
-
-
-
-
-
-
-
-
-
- -
-
- ` - ); -}); - -test('Update package.json', () => { - const result = update_pkg_json_content(`{ - "name": "svelte-app", - "version": "1.0.0", - "devDependencies": { - "svelte": "^3.0.0", - "svelte-check": "^1.0.0", - "svelte-preprocess": "^5.0.0" - }, - "dependencies": { - "@sveltejs/kit": "^1.0.0" - } -}`); - assert.equal( - result, - `{ - "name": "svelte-app", - "version": "1.0.0", - "devDependencies": { - "svelte": "^4.0.0", - "svelte-check": "^3.4.3", - "svelte-preprocess": "^5.0.3" - }, - "dependencies": { - "@sveltejs/kit": "^1.20.4" - } -}` - ); -}); - - -test('Does not downgrade versions', () => { - const result = update_pkg_json_content(`{ - "devDependencies": { - "svelte": "^4.0.5", - "typescript": "github:idk" - } -}`); - assert.equal( - result, - `{ - "devDependencies": { - "svelte": "^4.0.5", - "typescript": "github:idk" - } -}` - ); -}); diff --git a/packages/migrate/package.json b/packages/migrate/package.json deleted file mode 100644 index 836ae1935da5..000000000000 --- a/packages/migrate/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "svelte-migrate", - "version": "1.2.7", - "description": "A CLI for migrating Svelte(Kit) codebases", - "repository": { - "type": "git", - "url": "https://github.com/sveltejs/kit", - "directory": "packages/migrate" - }, - "license": "MIT", - "homepage": "https://kit.svelte.dev", - "publishConfig": { - "access": "public" - }, - "type": "module", - "bin": { - "svelte-migrate": "./bin.js" - }, - "files": [ - "bin.js", - "migrations", - "utils.js", - "!migrations/**/*.spec.js", - "!migrations/**/samples.md" - ], - "dependencies": { - "kleur": "^4.1.5", - "magic-string": "^0.30.0", - "prompts": "^2.4.2", - "semver": "^7.5.3", - "tiny-glob": "^0.2.9", - "ts-morph": "^20.0.0", - "typescript": "^5.0.4" - }, - "devDependencies": { - "@types/node": "^16.18.6", - "@types/prompts": "^2.4.1", - "@types/semver": "^7.5.0", - "prettier": "^2.8.0", - "vitest": "^0.34.5" - }, - "scripts": { - "test": "vitest run", - "check": "tsc" - } -} diff --git a/packages/migrate/utils.js b/packages/migrate/utils.js deleted file mode 100644 index b7e4c775899d..000000000000 --- a/packages/migrate/utils.js +++ /dev/null @@ -1,200 +0,0 @@ -import fs from 'node:fs'; -import path from 'node:path'; -import colors from 'kleur'; -import ts from 'typescript'; -import MagicString from 'magic-string'; -import { execFileSync, execSync } from 'node:child_process'; - -/** @param {string} message */ -export function bail(message) { - console.error(colors.bold().red(message)); - process.exit(1); -} - -/** @param {string} file */ -export function relative(file) { - return path.relative('.', file); -} -/** - * - * @param {string} file - * @param {string} renamed - * @param {string} content - * @param {boolean} use_git - */ -export function move_file(file, renamed, content, use_git) { - if (use_git) { - execFileSync('git', ['mv', file, renamed]); - } else { - fs.unlinkSync(file); - } - - fs.writeFileSync(renamed, content); -} - -/** - * @param {string} contents - * @param {string} indent - */ -export function comment(contents, indent) { - return contents.replace(new RegExp(`^${indent}`, 'gm'), `${indent}// `); -} - -/** @param {string} content */ -export function dedent(content) { - const indent = guess_indent(content); - if (!indent) return content; - - /** @type {string[]} */ - const substitutions = []; - - try { - const ast = ts.createSourceFile( - 'filename.ts', - content, - ts.ScriptTarget.Latest, - true, - ts.ScriptKind.TS - ); - - const code = new MagicString(content); - - /** @param {ts.Node} node */ - function walk(node) { - if (ts.isTemplateLiteral(node)) { - let pos = node.pos; - while (/\s/.test(content[pos])) pos += 1; - - code.overwrite(pos, node.end, `____SUBSTITUTION_${substitutions.length}____`); - substitutions.push(node.getText()); - } - - node.forEachChild(walk); - } - - ast.forEachChild(walk); - - return code - .toString() - .replace(new RegExp(`^${indent}`, 'gm'), '') - .replace(/____SUBSTITUTION_(\d+)____/g, (match, index) => substitutions[index]); - } catch { - // as above — ignore this edge case - return content; - } -} - -/** @param {string} content */ -export function guess_indent(content) { - const lines = content.split('\n'); - - const tabbed = lines.filter((line) => /^\t+/.test(line)); - const spaced = lines.filter((line) => /^ {2,}/.test(line)); - - if (tabbed.length === 0 && spaced.length === 0) { - return null; - } - - // More lines tabbed than spaced? Assume tabs, and - // default to tabs in the case of a tie (or nothing - // to go on) - if (tabbed.length >= spaced.length) { - return '\t'; - } - - // Otherwise, we need to guess the multiple - const min = spaced.reduce((previous, current) => { - const count = /^ +/.exec(current)?.[0].length ?? 0; - return Math.min(count, previous); - }, Infinity); - - return ' '.repeat(min); -} - -/** - * @param {string} content - * @param {number} offset - */ -export function indent_at_line(content, offset) { - const substr = content.substring(content.lastIndexOf('\n', offset) + 1, offset); - return /\s*/.exec(substr)?.[0] ?? ''; -} - -/** - * @param {string} content - * @param {string} except - */ -export function except_str(content, except) { - const start = content.indexOf(except); - const end = start + except.length; - return content.substring(0, start) + content.substring(end); -} - -/** - * @returns {boolean} True if git is installed - */ -export function check_git() { - let use_git = false; - - let dir = process.cwd(); - do { - if (fs.existsSync(path.join(dir, '.git'))) { - use_git = true; - break; - } - } while (dir !== (dir = path.dirname(dir))); - - if (use_git) { - try { - const status = execSync('git status --porcelain', { stdio: 'pipe' }).toString(); - - if (status) { - const message = - 'Your git working directory is dirty — we recommend committing your changes before running this migration.\n'; - console.log(colors.bold().red(message)); - } - } catch { - // would be weird to have a .git folder if git is not installed, - // but always expect the unexpected - const message = - 'Could not detect a git installation. If this is unexpected, please raise an issue: https://github.com/sveltejs/kit.\n'; - console.log(colors.bold().red(message)); - use_git = false; - } - } - - return use_git; -} - -/** - * Get a list of all files in a directory - * @param {string} cwd - the directory to walk - * @param {boolean} [dirs] - whether to include directories in the result - */ -export function walk(cwd, dirs = false) { - /** @type {string[]} */ - const all_files = []; - - /** @param {string} dir */ - function walk_dir(dir) { - const files = fs.readdirSync(path.join(cwd, dir)); - - for (const file of files) { - const joined = path.join(dir, file); - const stats = fs.statSync(path.join(cwd, joined)); - if (stats.isDirectory()) { - if (dirs) all_files.push(joined); - walk_dir(joined); - } else { - all_files.push(joined); - } - } - } - - return walk_dir(''), all_files; -} - -/** @param {string} str */ -export function posixify(str) { - return str.replace(/\\/g, '/'); -} diff --git a/packages/package/.gitignore b/packages/package/.gitignore index 6fccaba6d050..d670fa10a834 100644 --- a/packages/package/.gitignore +++ b/packages/package/.gitignore @@ -1,12 +1,14 @@ .DS_Store -/node_modules -/dist -/test/**/build -!/src/core/adapt/fixtures/*/.svelte-kit -!/test/node_modules +/node_modules/ +/test/**/build/ +!/src/core/adapt/fixtures/*/.svelte-kit/ +!/test/node_modules/ /test/apps/basics/test/errors.json -.custom-out-dir +.custom-out-dir/ +/test/watch/src/lib/* +!/test/watch/src/lib/index.js # these are already ignored by the top level .gitignore # repeating them here as a faux prettier ignore -.svelte-kit +.svelte-kit/ +dist/ diff --git a/packages/package/CHANGELOG.md b/packages/package/CHANGELOG.md index b6f966a62469..162865aa9a7f 100644 --- a/packages/package/CHANGELOG.md +++ b/packages/package/CHANGELOG.md @@ -1,5 +1,119 @@ # @sveltejs/package +## 2.3.12 +### Patch Changes + + +- fix: handle non-semver-style dependency versions ([#13925](https://github.com/sveltejs/kit/pull/13925)) + +## 2.3.11 +### Patch Changes + + +- fix: handle missing package.json gracefully ([#13691](https://github.com/sveltejs/kit/pull/13691)) + +## 2.3.10 +### Patch Changes + + +- chore: update to chokidar 4.0.3 ([#13381](https://github.com/sveltejs/kit/pull/13381)) + +## 2.3.9 +### Patch Changes + + +- chore: bump `svelte2tsx` dependency for more up-to-date `d.ts` output ([#8843](https://github.com/sveltejs/kit/pull/8843)) + + +- fix: adjust declaration map paths ([#8843](https://github.com/sveltejs/kit/pull/8843)) + +## 2.3.8 +### Patch Changes + + +- fix: resolve aliases more robustly ([#13351](https://github.com/sveltejs/kit/pull/13351)) + +## 2.3.7 +### Patch Changes + + +- docs: update URLs for new svelte.dev site ([#12857](https://github.com/sveltejs/kit/pull/12857)) + +## 2.3.6 +### Patch Changes + + +- docs: demonstrate sv migrate over prior commands ([#12840](https://github.com/sveltejs/kit/pull/12840)) + +## 2.3.5 +### Patch Changes + + +- fix: use input tsconfig when calling emitDts ([#12612](https://github.com/sveltejs/kit/pull/12612)) + + +- chore(deps): update dependency chokidar to v4 ([#12671](https://github.com/sveltejs/kit/pull/12671)) + +## 2.3.4 +### Patch Changes + + +- chore: configure provenance in a simpler manner ([#12570](https://github.com/sveltejs/kit/pull/12570)) + +## 2.3.3 +### Patch Changes + + +- chore: package provenance ([#12567](https://github.com/sveltejs/kit/pull/12567)) + +## 2.3.2 + +### Patch Changes + +- chore: add keywords for discovery in npm search ([#12330](https://github.com/sveltejs/kit/pull/12330)) + +## 2.3.1 + +### Patch Changes + +- fix: don't strip `lang="ts"` tag in Svelte 5 ([#12080](https://github.com/sveltejs/kit/pull/12080)) + +## 2.3.0 + +### Minor Changes + +- feat: add option to specify the tsconfig/jsconfig ([#11698](https://github.com/sveltejs/kit/pull/11698)) + +## 2.2.7 + +### Patch Changes + +- chore: update chokidar to 3.6.0 ([#11811](https://github.com/sveltejs/kit/pull/11811)) + +## 2.2.6 + +### Patch Changes + +- chore: bump svelte2tsx dependency to support generating types for `.svelte.js/ts` files ([#11619](https://github.com/sveltejs/kit/pull/11619)) + +## 2.2.5 + +### Patch Changes + +- fix: improve warning when encountering import.meta.env ([#11440](https://github.com/sveltejs/kit/pull/11440)) + +## 2.2.4 + +### Patch Changes + +- chore: update primary branch from master to main ([`47779436c5f6c4d50011d0ef8b2709a07c0fec5d`](https://github.com/sveltejs/kit/commit/47779436c5f6c4d50011d0ef8b2709a07c0fec5d)) + +## 2.2.3 + +### Patch Changes + +- fix: overwrite nodenext option when transpiling ([#11092](https://github.com/sveltejs/kit/pull/11092)) + ## 2.2.2 ### Patch Changes diff --git a/packages/package/README.md b/packages/package/README.md index f43876cd1bfa..df0a8935c7e3 100644 --- a/packages/package/README.md +++ b/packages/package/README.md @@ -1,18 +1,18 @@ # The fastest way to build Svelte packages -Create Svelte packages, build and push them to npm. This is part of the [SvelteKit](https://kit.svelte.dev) framework and CLI. +[Build Svelte packages](https://svelte.dev/docs/kit/packaging) in correctly packaged format. -The quickest way to get started is via the [create-svelte](https://github.com/sveltejs/kit/tree/master/packages/create-svelte) package: +The quickest way to get started is via the [sv](https://npmjs.com/package/sv) package: ```bash -npm create svelte@latest my-app +npx sv create my-app cd my-app npm install npm run dev ``` -See the [documentation](https://kit.svelte.dev/docs/packaging) to learn more. +See the [documentation](https://svelte.dev/docs/kit/packaging) to learn more. ## Changelog -[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/master/packages/package/CHANGELOG.md). +[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/package/CHANGELOG.md). diff --git a/packages/package/package.json b/packages/package/package.json index d50adf87b986..2e9eb6bc3aae 100644 --- a/packages/package/package.json +++ b/packages/package/package.json @@ -1,54 +1,60 @@ { "name": "@sveltejs/package", - "version": "2.2.2", + "version": "2.3.12", "description": "The fastest way to build Svelte packages", "repository": { "type": "git", "url": "https://github.com/sveltejs/kit", "directory": "packages/package" }, + "keywords": [ + "build", + "bundle", + "component", + "library", + "packaging", + "svelte", + "tool" + ], "license": "MIT", - "homepage": "https://kit.svelte.dev", + "homepage": "https://svelte.dev", "type": "module", "dependencies": { - "chokidar": "^3.5.3", + "chokidar": "^4.0.3", "kleur": "^4.1.5", "sade": "^1.8.1", - "semver": "^7.5.3", - "svelte2tsx": "~0.6.19" + "semver": "^7.5.4", + "svelte2tsx": "~0.7.33" }, "devDependencies": { - "@types/node": "^16.18.6", - "@types/semver": "^7.5.0", - "svelte": "^4.0.5", - "svelte-preprocess": "^5.0.4", - "typescript": "^4.9.4", + "@sveltejs/vite-plugin-svelte": "catalog:", + "@types/node": "^18.19.48", + "@types/semver": "^7.5.6", + "prettier": "^3.1.1", + "svelte": "^5.23.1", + "svelte-preprocess": "^6.0.0", + "typescript": "^5.3.3", "uvu": "^0.5.6" }, "peerDependencies": { - "svelte": "^3.44.0 || ^4.0.0" + "svelte": "^3.44.0 || ^4.0.0 || ^5.0.0-next.1" }, "bin": { "svelte-package": "svelte-package.js" }, "files": [ - "src", - "types" + "src" ], "scripts": { - "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore", + "lint": "prettier --check .", "check": "tsc", "check:all": "tsc && pnpm -r --filter=\"./**\" check", "format": "pnpm lint --write", "test": "uvu test \"^index.js$\"" }, "exports": { - "./package.json": "./package.json", - ".": { - "types": "./types/index.d.ts" - } + "./package.json": "./package.json" }, - "types": "types/index.d.ts", "engines": { "node": "^16.14 || >=18" } diff --git a/packages/package/src/cli.js b/packages/package/src/cli.js index 6c0239c6d455..6deffa3c20a6 100644 --- a/packages/package/src/cli.js +++ b/packages/package/src/cli.js @@ -1,4 +1,5 @@ import fs from 'node:fs'; +import process from 'node:process'; import colors from 'kleur'; import sade from 'sade'; import { load_config } from './config.js'; @@ -24,6 +25,10 @@ prog .option('-o, --output', 'Output directory', 'dist') .option('-t, --types', 'Emit type declarations', true) .option('-w, --watch', 'Rerun when files change', false) + .option( + '--tsconfig', + 'A path to a tsconfig or jsconfig file. When not provided, searches for the next upper tsconfig/jsconfig in the workspace path.' + ) .action(async (args) => { try { const config = await load_config(); @@ -37,11 +42,12 @@ prog const packaging = await import('./index.js'); - /** @type {import('./types').Options} */ + /** @type {import('./types.js').Options} */ const options = { cwd: process.cwd(), input: args.input ?? config.kit?.files?.lib ?? 'src/lib', output: args.output, + tsconfig: args.tsconfig, types: args.types, config }; diff --git a/packages/package/src/config.js b/packages/package/src/config.js index 4483c303948d..acdb7435fb7f 100644 --- a/packages/package/src/config.js +++ b/packages/package/src/config.js @@ -1,11 +1,12 @@ import path from 'node:path'; +import process from 'node:process'; import fs from 'node:fs'; import url from 'node:url'; /** * Loads and validates svelte.config.js * @param {{ cwd?: string }} options - * @returns {Promise} + * @returns {Promise} */ export async function load_config({ cwd = process.cwd() } = {}) { const config_file = path.join(cwd, 'svelte.config.js'); @@ -28,7 +29,7 @@ export async function load_config({ cwd = process.cwd() } = {}) { /** * @param {string} cwd - * @returns Record + * @returns {Record} */ export function load_pkg_json(cwd = process.cwd()) { const pkg_json_file = path.join(cwd, 'package.json'); diff --git a/packages/package/src/index.js b/packages/package/src/index.js index 8e0165513323..1f25fb3b0eab 100644 --- a/packages/package/src/index.js +++ b/packages/package/src/index.js @@ -9,7 +9,7 @@ import { emit_dts, transpile_ts } from './typescript.js'; import { create_validator } from './validate.js'; /** - * @param {import('./types').Options} options + * @param {import('./types.js').Options} options */ export async function build(options) { const { analyse_code, validate } = create_validator(options); @@ -18,11 +18,11 @@ export async function build(options) { } /** - * @param {import('./types').Options} options + * @param {import('./types.js').Options} options * @param {(name: string, code: string) => void} analyse_code */ async function do_build(options, analyse_code) { - const { input, output, temp, extensions, alias } = normalize_options(options); + const { input, output, temp, extensions, alias, tsconfig } = normalize_options(options); if (!fs.existsSync(input)) { throw new Error(`${path.relative('.', input)} does not exist`); @@ -34,11 +34,11 @@ async function do_build(options, analyse_code) { const files = scan(input, extensions); if (options.types) { - await emit_dts(input, temp, options.cwd, alias, files); + await emit_dts(input, temp, output, options.cwd, alias, files, tsconfig); } for (const file of files) { - await process_file(input, temp, file, options.config.preprocess, alias, analyse_code); + await process_file(input, temp, file, options.config.preprocess, alias, tsconfig, analyse_code); } rimraf(output); @@ -53,7 +53,7 @@ async function do_build(options, analyse_code) { } /** - * @param {import('./types').Options} options + * @param {import('./types.js').Options} options */ export async function watch(options) { const { analyse_code, validate } = create_validator(options); @@ -62,13 +62,13 @@ export async function watch(options) { validate(); - const { input, output, extensions, alias } = normalize_options(options); + const { input, output, extensions, alias, tsconfig } = normalize_options(options); const message = `\nWatching ${path.relative(options.cwd, input)} for changes...\n`; console.log(message); - /** @type {Array<{ file: import('./types').File, type: string }>} */ + /** @type {Array<{ file: import('./types.js').File, type: string }>} */ const pending = []; /** @type {Array<(value?: any) => void>} */ @@ -78,9 +78,10 @@ export async function watch(options) { let timeout; const watcher = chokidar.watch(input, { ignoreInitial: true }); + /** @type {Promise} */ const ready = new Promise((resolve) => watcher.on('ready', resolve)); - watcher.on('all', async (type, filepath) => { + watcher.on('all', (type, filepath) => { const file = analyze(path.relative(input, filepath), extensions); pending.push({ file, type }); @@ -119,7 +120,15 @@ export async function watch(options) { if (type === 'add' || type === 'change') { console.log(`Processing ${file.name}`); try { - await process_file(input, output, file, options.config.preprocess, alias, analyse_code); + await process_file( + input, + output, + file, + options.config.preprocess, + alias, + tsconfig, + analyse_code + ); } catch (e) { errored = true; console.error(e); @@ -129,7 +138,7 @@ export async function watch(options) { if (!errored && options.types) { try { - await emit_dts(input, output, options.cwd, alias, files); + await emit_dts(input, output, output, options.cwd, alias, files, tsconfig); console.log('Updated .d.ts files'); } catch (e) { errored = true; @@ -159,7 +168,7 @@ export async function watch(options) { } /** - * @param {import('./types').Options} options + * @param {import('./types.js').Options} options */ function normalize_options(options) { const input = path.resolve(options.cwd, options.input); @@ -170,6 +179,7 @@ function normalize_options(options) { '__package__' ); const extensions = options.config.extensions ?? ['.svelte']; + const tsconfig = options.tsconfig ? path.resolve(options.cwd, options.tsconfig) : undefined; const alias = { $lib: path.resolve(options.cwd, options.config.kit?.files?.lib ?? 'src/lib'), @@ -181,19 +191,21 @@ function normalize_options(options) { output, temp, extensions, - alias + alias, + tsconfig }; } /** * @param {string} input * @param {string} output - * @param {import('./types').File} file + * @param {import('./types.js').File} file * @param {import('svelte/types/compiler/preprocess').PreprocessorGroup | undefined} preprocessor * @param {Record} aliases + * @param {string | undefined} tsconfig * @param {(name: string, code: string) => void} analyse_code */ -async function process_file(input, output, file, preprocessor, aliases, analyse_code) { +async function process_file(input, output, file, preprocessor, aliases, tsconfig, analyse_code) { const filename = path.join(input, file.name); const dest = path.join(output, file.dest); @@ -208,7 +220,7 @@ async function process_file(input, output, file, preprocessor, aliases, analyse_ } if (file.name.endsWith('.ts') && !file.name.endsWith('.d.ts')) { - contents = await transpile_ts(filename, contents); + contents = await transpile_ts(tsconfig, filename, contents); } contents = resolve_aliases(input, file.name, contents, aliases); diff --git a/packages/package/src/types.d.ts b/packages/package/src/types.d.ts index 6724137d8d1d..f575d4627cee 100644 --- a/packages/package/src/types.d.ts +++ b/packages/package/src/types.d.ts @@ -5,6 +5,7 @@ export interface Options { input: string; output: string; types: boolean; + tsconfig?: string; config: { extensions?: string[]; kit?: { diff --git a/packages/package/src/typescript.js b/packages/package/src/typescript.js index ff43e5be035e..81c0f348e635 100644 --- a/packages/package/src/typescript.js +++ b/packages/package/src/typescript.js @@ -14,11 +14,13 @@ import { load_pkg_json } from './config.js'; * * @param {string} input * @param {string} output + * @param {string} final_output * @param {string} cwd * @param {Record} alias - * @param {import('./types').File[]} files + * @param {import('./types.js').File[]} files + * @param {string | undefined} tsconfig */ -export async function emit_dts(input, output, cwd, alias, files) { +export async function emit_dts(input, output, final_output, cwd, alias, files, tsconfig) { const tmp = `${output}/__package_types_tmp__`; rimraf(tmp); mkdirp(tmp); @@ -26,13 +28,20 @@ export async function emit_dts(input, output, cwd, alias, files) { const require = createRequire(import.meta.url); const pkg = load_pkg_json(cwd); const svelte_dep = pkg.peerDependencies?.svelte || pkg.dependencies?.svelte || '3.0'; - const no_svelte_3 = !semver.intersects(svelte_dep, '^3.0.0'); + let no_svelte_3; + try { + no_svelte_3 = !semver.intersects(svelte_dep, '^3.0.0'); + } catch { + // Not all version specs are valid semver, e.g. "latest" or "next" or catalog references + no_svelte_3 = true; + } await emitDts({ libRoot: input, svelteShimsPath: no_svelte_3 ? require.resolve('svelte2tsx/svelte-shims-v4.d.ts') : require.resolve('svelte2tsx/svelte-shims.d.ts'), - declarationDir: path.relative(cwd, tmp) + declarationDir: path.relative(cwd, tmp), + tsconfig }); const handwritten = new Set(); @@ -52,8 +61,28 @@ export async function emit_dts(input, output, cwd, alias, files) { console.warn(`Using $lib/${normalized} instead of generated .d.ts file`); } - const source = fs.readFileSync(path.join(tmp, normalized), 'utf8'); - write(path.join(output, normalized), resolve_aliases(input, normalized, source, alias)); + let source = fs.readFileSync(path.join(tmp, normalized), 'utf8'); + if (file.endsWith('.d.ts.map')) { + // Because we put the .d.ts files in a temporary directory, the relative path needs to be adjusted + const parsed = JSON.parse(source); + if (parsed.sources) { + parsed.sources = /** @type {string[]} */ (parsed.sources).map((source) => + posixify( + path.join( + path.relative( + path.dirname(path.join(final_output, normalized)), + path.dirname(path.join(input, normalized)) + ), + path.basename(source) + ) + ) + ); + source = JSON.stringify(parsed); + } + } else { + source = resolve_aliases(input, normalized, source, alias); + } + write(path.join(output, normalized), source); } rimraf(tmp); @@ -62,13 +91,21 @@ export async function emit_dts(input, output, cwd, alias, files) { /** * TS -> JS * + * @param {string | undefined} tsconfig * @param {string} filename * @param {string} source */ -export async function transpile_ts(filename, source) { +export async function transpile_ts(tsconfig, filename, source) { const ts = await try_load_ts(); + const options = load_tsconfig(tsconfig, filename, ts); + // transpileModule treats NodeNext as CommonJS because it doesn't read the package.json. Therefore we need to override it. + // Also see https://github.com/microsoft/TypeScript/issues/53022 (the filename workaround doesn't work). return ts.transpileModule(source, { - compilerOptions: load_tsconfig(filename, ts), + compilerOptions: { + ...options, + module: ts.ModuleKind.ESNext, + moduleResolution: ts.ModuleResolutionKind.NodeNext + }, fileName: filename }).outputText; } @@ -76,7 +113,7 @@ export async function transpile_ts(filename, source) { async function try_load_ts() { try { return (await import('typescript')).default; - } catch (e) { + } catch { throw new Error( 'You need to install TypeScript if you want to transpile TypeScript files and/or generate type definitions' ); @@ -84,28 +121,37 @@ async function try_load_ts() { } /** + * @param {string | undefined} tsconfig * @param {string} filename * @param {import('typescript')} ts */ -function load_tsconfig(filename, ts) { +function load_tsconfig(tsconfig, filename, ts) { let config_filename; - // ts.findConfigFile is broken (it will favour a distant tsconfig - // over a near jsconfig, and then only when you call it twice) - // so we implement it ourselves - let dir = filename; - while (dir !== (dir = path.dirname(dir))) { - const tsconfig = path.join(dir, 'tsconfig.json'); - const jsconfig = path.join(dir, 'jsconfig.json'); - + if (tsconfig) { if (fs.existsSync(tsconfig)) { config_filename = tsconfig; - break; + } else { + throw new Error('Failed to locate provided tsconfig or jsconfig'); } - - if (fs.existsSync(jsconfig)) { - config_filename = jsconfig; - break; + } else { + // ts.findConfigFile is broken (it will favour a distant tsconfig + // over a near jsconfig, and then only when you call it twice) + // so we implement it ourselves + let dir = filename; + while (dir !== (dir = path.dirname(dir))) { + const tsconfig = path.join(dir, 'tsconfig.json'); + const jsconfig = path.join(dir, 'jsconfig.json'); + + if (fs.existsSync(tsconfig)) { + config_filename = tsconfig; + break; + } + + if (fs.existsSync(jsconfig)) { + config_filename = jsconfig; + break; + } } } diff --git a/packages/package/src/utils.js b/packages/package/src/utils.js index 26605fbbdee7..7262a32ba9b5 100644 --- a/packages/package/src/utils.js +++ b/packages/package/src/utils.js @@ -1,7 +1,10 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; +import { VERSION } from 'svelte/compiler'; import { posixify, mkdirp, walk } from './filesystem.js'; +const is_svelte_5_plus = Number(VERSION.split('.')[0]) >= 5; + /** * Resolves aliases * @@ -14,10 +17,9 @@ import { posixify, mkdirp, walk } from './filesystem.js'; export function resolve_aliases(input, file, content, aliases) { /** * @param {string} match - * @param {string} _ * @param {string} import_path */ - const replace_import_path = (match, _, import_path) => { + const replace_import_path = (match, import_path) => { for (const [alias, value] of Object.entries(aliases)) { if (!import_path.startsWith(alias)) continue; @@ -30,8 +32,26 @@ export function resolve_aliases(input, file, content, aliases) { return match; }; - content = content.replace(/from\s+('|")([^"';,]+?)\1/g, replace_import_path); - content = content.replace(/import\s*\(\s*('|")([^"';,]+?)\1\s*\)/g, replace_import_path); + // import/export ... from ... + content = content.replace( + /\b(import|export)\s+([\w*\s{},]*)\s+from\s+(['"])([^'";]+)\3/g, + (_, keyword, specifier, quote, import_path) => + replace_import_path( + `${keyword} ${specifier} from ${quote}${import_path}${quote}`, + import_path + ) + ); + + // import(...) + content = content.replace(/\bimport\s*\(\s*(['"])([^'";]+)\1\s*\)/g, (_, quote, import_path) => + replace_import_path(`import(${quote}${import_path}${quote})`, import_path) + ); + + // import '...' + content = content.replace(/\bimport\s+(['"])([^'";]+)\1/g, (_, quote, import_path) => + replace_import_path(`import ${quote}${import_path}${quote}`, import_path) + ); + return content; } @@ -45,8 +65,13 @@ export function strip_lang_tags(content) { return content .replace( /()|(]*?)\s(?:type|lang)=(["'])(.*?)\3/g, - // things like application/ld+json should be kept as-is. Preprocessed languages are "ts" etc - (match, s1, s2, _, s4) => (s4?.startsWith('application/') ? match : (s1 ?? '') + (s2 ?? '')) + // Things like application/ld+json should be kept as-is. Preprocessed languages are "ts" etc. + // Svelte 5 deals with TypeScript natively, and in the template, too, therefore keep it in. + // Not removing it would mean Svelte parses without its TS plugin and then runs into errors. + (match, comment, tag_open, _, type) => + type?.startsWith('application/') || (is_svelte_5_plus && type === 'ts') + ? match + : (comment ?? '') + (tag_open ?? '') ) .replace(/()|(]*?)\s(?:type|lang)=(["']).*?\3/g, '$1$2'); } @@ -63,7 +88,7 @@ export function write(file, contents) { /** * @param {string} input * @param {string[]} extensions - * @returns {import('./types').File[]} + * @returns {import('./types.js').File[]} */ export function scan(input, extensions) { return walk(input).map((file) => analyze(file, extensions)); @@ -72,7 +97,7 @@ export function scan(input, extensions) { /** * @param {string} file * @param {string[]} extensions - * @returns {import('./types').File} + * @returns {import('./types.js').File} */ export function analyze(file, extensions) { const name = posixify(file); @@ -84,10 +109,10 @@ export function analyze(file, extensions) { const dest = svelte_extension ? name.slice(0, -svelte_extension.length) + '.svelte' : name.endsWith('.d.ts') - ? name - : name.endsWith('.ts') - ? name.slice(0, -3) + '.js' - : name; + ? name + : name.endsWith('.ts') + ? name.slice(0, -3) + '.js' + : name; return { name, diff --git a/packages/package/src/validate.js b/packages/package/src/validate.js index c0276aef7d90..24fedf37c401 100644 --- a/packages/package/src/validate.js +++ b/packages/package/src/validate.js @@ -1,9 +1,8 @@ -import { readFileSync } from 'node:fs'; -import { join } from 'node:path'; import colors from 'kleur'; +import { load_pkg_json } from './config.js'; /** - * @param {import("./types").Options} options + * @param {import("./types.js").Options} options */ export function create_validator(options) { const { analyse_code, validate } = _create_validator(options); @@ -19,8 +18,14 @@ export function create_validator(options) { }, validate() { /** @type {Record} */ - const pkg = JSON.parse(readFileSync(join(options.cwd, 'package.json'), 'utf-8')); + const pkg = load_pkg_json(options.cwd); const warnings = validate(pkg); + if (Object.keys(pkg).length === 0) { + warnings.push( + 'No package.json found in the current directory. Please create one or run this command in a directory containing one.' + ); + } + // Just warnings, not errors, because // - would be annoying in watch mode (would have to restart the server) // - maybe there's a custom post-build script that fixes some of these @@ -38,7 +43,7 @@ export function create_validator(options) { }; } /** - * @param {import("./types").Options} options + * @param {import("./types.js").Options} options */ export function _create_validator(options) { /** @type {Set} */ @@ -80,15 +85,15 @@ export function _create_validator(options) { [...imports].filter((i) => i.startsWith('$app/')).length === 1 ) { warnings.push( - 'Avoid usage of `$app/environment` in your code, if you want to library to work for people not using SvelteKit (only regular Svelte, for example). ' + + 'Avoid usage of `$app/environment` in your code, if you want the library to work for people not using SvelteKit (only regular Svelte, for example). ' + 'Consider using packages like `esm-env` instead which provide cross-bundler-compatible environment variables.' ); } if (uses_import_meta) { warnings.push( - 'Avoid usage of `import.meta.env` in your code. It requires a bundler to work. ' + - 'Consider using packages like `esm-env` instead which provide cross-bundler-compatible environment variables.' + 'Avoid usage of `import.meta.env` in your code. It only works in apps bundled with Vite. ' + + 'Consider using packages like `esm-env` instead which works with all bundlers or without bundling.' ); } @@ -119,7 +124,7 @@ export function _create_validator(options) { warnings.push( 'You are using Svelte files, but did not declare a `svelte` condition in one of your `exports` in your `package.json`. ' + 'Add a `svelte` condition to your `exports` to ensure that your package is recognized as Svelte package by tooling. ' + - 'See https://kit.svelte.dev/docs/packaging#anatomy-of-a-package-json-exports for more info' + 'See https://svelte.dev/docs/kit/packaging#anatomy-of-a-package-json-exports for more info' ); } @@ -142,7 +147,7 @@ export function _create_validator(options) { } else { warnings.push( 'No `exports` field found in `package.json`, please provide one. ' + - 'See https://kit.svelte.dev/docs/packaging#anatomy-of-a-package-json-exports for more info' + 'See https://svelte.dev/docs/kit/packaging#anatomy-of-a-package-json-exports for more info' ); } diff --git a/packages/package/test/fixtures/javascript/expected/Test.svelte.d.ts b/packages/package/test/fixtures/javascript/expected/Test.svelte.d.ts index cd5d466f4bdb..4d8d06cf9ae1 100644 --- a/packages/package/test/fixtures/javascript/expected/Test.svelte.d.ts +++ b/packages/package/test/fixtures/javascript/expected/Test.svelte.d.ts @@ -1,40 +1,55 @@ -/** @typedef {typeof __propDef.props} TestProps */ -/** @typedef {typeof __propDef.events} TestEvents */ -/** @typedef {typeof __propDef.slots} TestSlots */ -export default class Test extends SvelteComponent< - { - astring?: string; - }, - { - event: CustomEvent; - } & { - [evt: string]: CustomEvent; - }, - { - default: { - astring: string; - }; - } -> { - get astring(): string; -} -export type TestProps = typeof __propDef.props; -export type TestEvents = typeof __propDef.events; -export type TestSlots = typeof __propDef.slots; -import { SvelteComponent } from 'svelte'; -declare const __propDef: { - props: { - astring?: string; - }; - events: { - event: CustomEvent; - } & { - [evt: string]: CustomEvent; - }; - slots: { - default: { - astring: string; - }; - }; +export default Test; +type Test = SvelteComponent<$$__sveltets_2_PropsWithChildren<{ + astring?: string; +}, { + default: { + astring: string; + }; +}>, { + event: CustomEvent; +} & { + [evt: string]: CustomEvent; +}, { + default: { + astring: string; + }; +}> & { + $$bindings?: string; +} & { + astring: string; }; -export {}; +declare const Test: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{ + astring?: string; +}, { + default: { + astring: string; + }; +}>, { + event: CustomEvent; +} & { + [evt: string]: CustomEvent; +}, { + default: { + astring: string; + }; +}, { + astring: string; +}, string>; +type $$__sveltets_2_PropsWithChildren = Props & (Slots extends { + default: any; +} ? Props extends Record ? any : { + children?: any; +} : {}); +interface $$__sveltets_2_IsomorphicComponent = any, Events extends Record = any, Slots extends Record = any, Exports = {}, Bindings = string> { + new (options: import("svelte").ComponentConstructorOptions): import("svelte").SvelteComponent & { + $$bindings?: Bindings; + } & Exports; + (internal: unknown, props: Props & { + $$events?: Events; + $$slots?: Slots; + }): Exports & { + $set?: any; + $on?: any; + }; + z_$$bindings?: Bindings; +} diff --git a/packages/package/test/fixtures/javascript/expected/Test2.svelte.d.ts b/packages/package/test/fixtures/javascript/expected/Test2.svelte.d.ts index 60864c221821..0774e4032afb 100644 --- a/packages/package/test/fixtures/javascript/expected/Test2.svelte.d.ts +++ b/packages/package/test/fixtures/javascript/expected/Test2.svelte.d.ts @@ -1,26 +1,26 @@ -/** @typedef {typeof __propDef.props} Test2Props */ -/** @typedef {typeof __propDef.events} Test2Events */ -/** @typedef {typeof __propDef.slots} Test2Slots */ -export default class Test2 extends SvelteComponent< - { - foo: boolean; - }, - { - [evt: string]: CustomEvent; - }, - {} -> {} -export type Test2Props = typeof __propDef.props; -export type Test2Events = typeof __propDef.events; -export type Test2Slots = typeof __propDef.slots; -import { SvelteComponent } from 'svelte'; -declare const __propDef: { - props: { - foo: import('./foo').Foo; - }; - events: { - [evt: string]: CustomEvent; - }; - slots: {}; +export default Test2; +type Test2 = SvelteComponent<{ + foo: boolean; +}, { + [evt: string]: CustomEvent; +}, {}> & { + $$bindings?: string; }; -export {}; +declare const Test2: $$__sveltets_2_IsomorphicComponent<{ + foo: import("./foo").Foo; +}, { + [evt: string]: CustomEvent; +}, {}, {}, string>; +interface $$__sveltets_2_IsomorphicComponent = any, Events extends Record = any, Slots extends Record = any, Exports = {}, Bindings = string> { + new (options: import("svelte").ComponentConstructorOptions): import("svelte").SvelteComponent & { + $$bindings?: Bindings; + } & Exports; + (internal: unknown, props: Props & { + $$events?: Events; + $$slots?: Slots; + }): Exports & { + $set?: any; + $on?: any; + }; + z_$$bindings?: Bindings; +} diff --git a/packages/package/test/fixtures/javascript/expected/internal/Test.svelte.d.ts b/packages/package/test/fixtures/javascript/expected/internal/Test.svelte.d.ts index 44bba6a64d5d..1c3abfd7fb6e 100644 --- a/packages/package/test/fixtures/javascript/expected/internal/Test.svelte.d.ts +++ b/packages/package/test/fixtures/javascript/expected/internal/Test.svelte.d.ts @@ -1,26 +1,26 @@ -/** @typedef {typeof __propDef.props} TestProps */ -/** @typedef {typeof __propDef.events} TestEvents */ -/** @typedef {typeof __propDef.slots} TestSlots */ -export default class Test extends SvelteComponent< - { - foo: boolean; - }, - { - [evt: string]: CustomEvent; - }, - {} -> {} -export type TestProps = typeof __propDef.props; -export type TestEvents = typeof __propDef.events; -export type TestSlots = typeof __propDef.slots; -import { SvelteComponent } from 'svelte'; -declare const __propDef: { - props: { - foo: import('./foo').Foo; - }; - events: { - [evt: string]: CustomEvent; - }; - slots: {}; +export default Test; +type Test = SvelteComponent<{ + foo: boolean; +}, { + [evt: string]: CustomEvent; +}, {}> & { + $$bindings?: string; }; -export {}; +declare const Test: $$__sveltets_2_IsomorphicComponent<{ + foo: import("./foo").Foo; +}, { + [evt: string]: CustomEvent; +}, {}, {}, string>; +interface $$__sveltets_2_IsomorphicComponent = any, Events extends Record = any, Slots extends Record = any, Exports = {}, Bindings = string> { + new (options: import("svelte").ComponentConstructorOptions): import("svelte").SvelteComponent & { + $$bindings?: Bindings; + } & Exports; + (internal: unknown, props: Props & { + $$events?: Events; + $$slots?: Slots; + }): Exports & { + $set?: any; + $on?: any; + }; + z_$$bindings?: Bindings; +} diff --git a/packages/package/test/fixtures/javascript/expected/internal/index.d.ts b/packages/package/test/fixtures/javascript/expected/internal/index.d.ts index e60ad9862f02..69325fd26bd1 100644 --- a/packages/package/test/fixtures/javascript/expected/internal/index.d.ts +++ b/packages/package/test/fixtures/javascript/expected/internal/index.d.ts @@ -1 +1,2 @@ export const foo: 'bar'; +export { x } from "./runes.svelte.js"; diff --git a/packages/package/test/fixtures/javascript/expected/internal/index.js b/packages/package/test/fixtures/javascript/expected/internal/index.js index c155820bf773..b7dfdd870f1b 100644 --- a/packages/package/test/fixtures/javascript/expected/internal/index.js +++ b/packages/package/test/fixtures/javascript/expected/internal/index.js @@ -1 +1,2 @@ export const foo = 'bar'; +export { x } from './runes.svelte.js'; diff --git a/packages/package/test/fixtures/javascript/expected/internal/runes.svelte.d.ts b/packages/package/test/fixtures/javascript/expected/internal/runes.svelte.d.ts new file mode 100644 index 000000000000..ce5b9032906e --- /dev/null +++ b/packages/package/test/fixtures/javascript/expected/internal/runes.svelte.d.ts @@ -0,0 +1 @@ +export const x: true; diff --git a/packages/package/test/fixtures/javascript/expected/internal/runes.svelte.js b/packages/package/test/fixtures/javascript/expected/internal/runes.svelte.js new file mode 100644 index 000000000000..30dc55a73230 --- /dev/null +++ b/packages/package/test/fixtures/javascript/expected/internal/runes.svelte.js @@ -0,0 +1 @@ +export const x = true; diff --git a/packages/package/test/fixtures/javascript/src/lib/internal/index.js b/packages/package/test/fixtures/javascript/src/lib/internal/index.js index c155820bf773..b7dfdd870f1b 100644 --- a/packages/package/test/fixtures/javascript/src/lib/internal/index.js +++ b/packages/package/test/fixtures/javascript/src/lib/internal/index.js @@ -1 +1,2 @@ export const foo = 'bar'; +export { x } from './runes.svelte.js'; diff --git a/packages/package/test/fixtures/javascript/src/lib/internal/runes.svelte.js b/packages/package/test/fixtures/javascript/src/lib/internal/runes.svelte.js new file mode 100644 index 000000000000..30dc55a73230 --- /dev/null +++ b/packages/package/test/fixtures/javascript/src/lib/internal/runes.svelte.js @@ -0,0 +1 @@ +export const x = true; diff --git a/packages/package/test/fixtures/resolve-alias/expected/Test.svelte b/packages/package/test/fixtures/resolve-alias/expected/Test.svelte index d6dbdc91b465..e1ffec195b89 100644 --- a/packages/package/test/fixtures/resolve-alias/expected/Test.svelte +++ b/packages/package/test/fixtures/resolve-alias/expected/Test.svelte @@ -1,6 +1,8 @@ - diff --git a/packages/package/test/fixtures/resolve-alias/expected/Test.svelte.d.ts b/packages/package/test/fixtures/resolve-alias/expected/Test.svelte.d.ts index 34bd39c48418..f2b4fd180e4a 100644 --- a/packages/package/test/fixtures/resolve-alias/expected/Test.svelte.d.ts +++ b/packages/package/test/fixtures/resolve-alias/expected/Test.svelte.d.ts @@ -1,15 +1,20 @@ -import { SvelteComponent } from 'svelte'; -declare const __propDef: { - props: { - bar?: import('./sub/foo').Foo; +interface $$__sveltets_2_IsomorphicComponent = any, Events extends Record = any, Slots extends Record = any, Exports = {}, Bindings = string> { + new (options: import('svelte').ComponentConstructorOptions): import('svelte').SvelteComponent & { + $$bindings?: Bindings; + } & Exports; + (internal: unknown, props: Props & { + $$events?: Events; + $$slots?: Slots; + }): Exports & { + $set?: any; + $on?: any; }; - events: { - [evt: string]: CustomEvent; - }; - slots: {}; -}; -export type TestProps = typeof __propDef.props; -export type TestEvents = typeof __propDef.events; -export type TestSlots = typeof __propDef.slots; -export default class Test extends SvelteComponent {} -export {}; + z_$$bindings?: Bindings; +} +declare const Test: $$__sveltets_2_IsomorphicComponent<{ + bar?: import("./sub/foo").Foo; +}, { + [evt: string]: CustomEvent; +}, {}, {}, string>; +type Test = InstanceType; +export default Test; diff --git a/packages/package/test/fixtures/resolve-alias/expected/not.d.ts b/packages/package/test/fixtures/resolve-alias/expected/not.d.ts new file mode 100644 index 000000000000..24bce3e70b9b --- /dev/null +++ b/packages/package/test/fixtures/resolve-alias/expected/not.d.ts @@ -0,0 +1 @@ +export declare const notImportFromLib: () => string; diff --git a/packages/package/test/fixtures/resolve-alias/expected/not.js b/packages/package/test/fixtures/resolve-alias/expected/not.js new file mode 100644 index 000000000000..ebb522bcef22 --- /dev/null +++ b/packages/package/test/fixtures/resolve-alias/expected/not.js @@ -0,0 +1 @@ +export const notImportFromLib = () => " from '$lib/Test.svelte'"; diff --git a/packages/package/test/fixtures/resolve-alias/expected/sub/bar.d.ts b/packages/package/test/fixtures/resolve-alias/expected/sub/bar.d.ts index 9f1a49e9dfd6..fac8707fc2ad 100644 --- a/packages/package/test/fixtures/resolve-alias/expected/sub/bar.d.ts +++ b/packages/package/test/fixtures/resolve-alias/expected/sub/bar.d.ts @@ -1,2 +1,3 @@ +export declare const dynamic: () => Promise; export declare const bar1: import('./foo').Foo; export declare const bar2: import('../baz').Baz; diff --git a/packages/package/test/fixtures/resolve-alias/expected/sub/bar.js b/packages/package/test/fixtures/resolve-alias/expected/sub/bar.js index 17941b746387..6c2ec176b703 100644 --- a/packages/package/test/fixtures/resolve-alias/expected/sub/bar.js +++ b/packages/package/test/fixtures/resolve-alias/expected/sub/bar.js @@ -1,4 +1,5 @@ import { baz } from '../baz'; import { foo } from './foo'; +export const dynamic = () => import('../Test.svelte'); export const bar1 = foo; export const bar2 = baz; diff --git a/packages/package/test/fixtures/resolve-alias/src/lib/Test.svelte b/packages/package/test/fixtures/resolve-alias/src/lib/Test.svelte index 77589dd2aaed..9e188abd7c03 100644 --- a/packages/package/test/fixtures/resolve-alias/src/lib/Test.svelte +++ b/packages/package/test/fixtures/resolve-alias/src/lib/Test.svelte @@ -1,8 +1,8 @@ diff --git a/packages/package/test/fixtures/resolve-alias/src/lib/not.ts b/packages/package/test/fixtures/resolve-alias/src/lib/not.ts new file mode 100644 index 000000000000..ebb522bcef22 --- /dev/null +++ b/packages/package/test/fixtures/resolve-alias/src/lib/not.ts @@ -0,0 +1 @@ +export const notImportFromLib = () => " from '$lib/Test.svelte'"; diff --git a/packages/package/test/fixtures/resolve-alias/src/lib/sub/bar.ts b/packages/package/test/fixtures/resolve-alias/src/lib/sub/bar.ts index 335e08c551d3..c1d073daa6d0 100644 --- a/packages/package/test/fixtures/resolve-alias/src/lib/sub/bar.ts +++ b/packages/package/test/fixtures/resolve-alias/src/lib/sub/bar.ts @@ -1,5 +1,6 @@ import { baz } from '$lib/baz'; import { foo } from '$lib/sub/foo'; +export const dynamic = () => import('$lib/Test.svelte'); export const bar1 = foo; export const bar2 = baz; diff --git a/packages/package/test/fixtures/resolve-alias/svelte.config.js b/packages/package/test/fixtures/resolve-alias/svelte.config.js index 2cb56fa23a8f..e903a3ec1088 100644 --- a/packages/package/test/fixtures/resolve-alias/svelte.config.js +++ b/packages/package/test/fixtures/resolve-alias/svelte.config.js @@ -1,4 +1,4 @@ -import { vitePreprocess } from '../../../../kit/src/exports/vite/index.js'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; import { fileURLToPath } from 'node:url'; import path from 'node:path'; diff --git a/packages/package/test/fixtures/resolve-alias/tsconfig.json b/packages/package/test/fixtures/resolve-alias/tsconfig.json index 70b71dd2fa3d..40a53050ee86 100644 --- a/packages/package/test/fixtures/resolve-alias/tsconfig.json +++ b/packages/package/test/fixtures/resolve-alias/tsconfig.json @@ -9,5 +9,5 @@ "$utils/*": ["./src/lib/utils/*"] } }, - "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"] + "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte", "src/**/*.ts"] } diff --git a/packages/package/test/fixtures/svelte-3-types/expected/Test.svelte b/packages/package/test/fixtures/svelte-3-types/expected/Test.svelte index 661b1b8276b0..7613c3ebf28b 100644 --- a/packages/package/test/fixtures/svelte-3-types/expected/Test.svelte +++ b/packages/package/test/fixtures/svelte-3-types/expected/Test.svelte @@ -1,4 +1,4 @@ - + +{foo} diff --git a/packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts b/packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts new file mode 100644 index 000000000000..a085b329fba8 --- /dev/null +++ b/packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts @@ -0,0 +1,7 @@ +type $$ComponentProps = { + foo: string; +}; +declare const Test: import("svelte").Component<$$ComponentProps, {}, "">; +type Test = ReturnType; +export default Test +//# sourceMappingURL=Test.svelte.d.ts.map \ No newline at end of file diff --git a/packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts.map b/packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts.map new file mode 100644 index 000000000000..fd94dc2b8f55 --- /dev/null +++ b/packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Test.svelte.d.ts","sourceRoot":"","sources":["../src/lib/Test.svelte.ts"],"names":[],"mappings":"AAGC,KAAK,gBAAgB,GAAI;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAS1C,QAAA,MAAM,IAAI,sDAAsC,CAAC;AACjD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"} \ No newline at end of file diff --git a/packages/package/test/fixtures/typescript-declaration-map/expected/index.d.ts b/packages/package/test/fixtures/typescript-declaration-map/expected/index.d.ts new file mode 100644 index 000000000000..3a13848c9369 --- /dev/null +++ b/packages/package/test/fixtures/typescript-declaration-map/expected/index.d.ts @@ -0,0 +1,2 @@ +export { default as Test } from './Test.svelte'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/package/test/fixtures/typescript-declaration-map/expected/index.d.ts.map b/packages/package/test/fixtures/typescript-declaration-map/expected/index.d.ts.map new file mode 100644 index 000000000000..d62430ee3b6c --- /dev/null +++ b/packages/package/test/fixtures/typescript-declaration-map/expected/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,eAAe,CAAC"} \ No newline at end of file diff --git a/packages/package/test/fixtures/typescript/expected/index.js b/packages/package/test/fixtures/typescript-declaration-map/expected/index.js similarity index 100% rename from packages/package/test/fixtures/typescript/expected/index.js rename to packages/package/test/fixtures/typescript-declaration-map/expected/index.js diff --git a/packages/package/test/fixtures/typescript-declaration-map/package.json b/packages/package/test/fixtures/typescript-declaration-map/package.json new file mode 100644 index 000000000000..0f71eb5defeb --- /dev/null +++ b/packages/package/test/fixtures/typescript-declaration-map/package.json @@ -0,0 +1,16 @@ +{ + "name": "typescript-declaration-map", + "private": true, + "version": "1.0.0", + "description": "standard typescript package with declarationMap:true", + "type": "module", + "peerDependencies": { + "svelte": "^5.0.0" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + } + } +} diff --git a/packages/package/test/fixtures/typescript-declaration-map/src/lib/Test.svelte b/packages/package/test/fixtures/typescript-declaration-map/src/lib/Test.svelte new file mode 100644 index 000000000000..50483b0ec942 --- /dev/null +++ b/packages/package/test/fixtures/typescript-declaration-map/src/lib/Test.svelte @@ -0,0 +1,5 @@ + + +{foo} diff --git a/packages/package/test/fixtures/typescript/src/lib/index.ts b/packages/package/test/fixtures/typescript-declaration-map/src/lib/index.ts similarity index 100% rename from packages/package/test/fixtures/typescript/src/lib/index.ts rename to packages/package/test/fixtures/typescript-declaration-map/src/lib/index.ts diff --git a/packages/package/test/fixtures/typescript-declaration-map/svelte.config.js b/packages/package/test/fixtures/typescript-declaration-map/svelte.config.js new file mode 100644 index 000000000000..6bd253bdf27d --- /dev/null +++ b/packages/package/test/fixtures/typescript-declaration-map/svelte.config.js @@ -0,0 +1,5 @@ +import preprocess from 'svelte-preprocess'; + +export default { + preprocess: preprocess() +}; diff --git a/packages/package/test/fixtures/typescript-declaration-map/tsconfig.json b/packages/package/test/fixtures/typescript-declaration-map/tsconfig.json new file mode 100644 index 000000000000..cd86fcfd945f --- /dev/null +++ b/packages/package/test/fixtures/typescript-declaration-map/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "declaration": true, + "declarationMap": true + } +} diff --git a/packages/package/test/fixtures/typescript-esnext/expected/Plain.svelte b/packages/package/test/fixtures/typescript-esnext/expected/Plain.svelte new file mode 100644 index 000000000000..f46e78994ae5 --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/expected/Plain.svelte @@ -0,0 +1,17 @@ + + + + + diff --git a/packages/package/test/fixtures/typescript-esnext/expected/Plain.svelte.d.ts b/packages/package/test/fixtures/typescript-esnext/expected/Plain.svelte.d.ts new file mode 100644 index 000000000000..e2632ad81c35 --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/expected/Plain.svelte.d.ts @@ -0,0 +1,26 @@ +export default Plain; +type Plain = SvelteComponent<{ + foo: boolean; +}, { + [evt: string]: CustomEvent; +}, {}> & { + $$bindings?: string; +}; +declare const Plain: $$__sveltets_2_IsomorphicComponent<{ + foo: import("./foo").Foo; +}, { + [evt: string]: CustomEvent; +}, {}, {}, string>; +interface $$__sveltets_2_IsomorphicComponent = any, Events extends Record = any, Slots extends Record = any, Exports = {}, Bindings = string> { + new (options: import("svelte").ComponentConstructorOptions): import("svelte").SvelteComponent & { + $$bindings?: Bindings; + } & Exports; + (internal: unknown, props: Props & { + $$events?: Events; + $$slots?: Slots; + }): Exports & { + $set?: any; + $on?: any; + }; + z_$$bindings?: Bindings; +} diff --git a/packages/package/test/fixtures/typescript/expected/Test.svelte b/packages/package/test/fixtures/typescript-esnext/expected/Test.svelte similarity index 90% rename from packages/package/test/fixtures/typescript/expected/Test.svelte rename to packages/package/test/fixtures/typescript-esnext/expected/Test.svelte index 661b1b8276b0..7613c3ebf28b 100644 --- a/packages/package/test/fixtures/typescript/expected/Test.svelte +++ b/packages/package/test/fixtures/typescript-esnext/expected/Test.svelte @@ -1,4 +1,4 @@ - diff --git a/packages/package/test/fixtures/typescript-esnext/expected/Test2.svelte.d.ts b/packages/package/test/fixtures/typescript-esnext/expected/Test2.svelte.d.ts new file mode 100644 index 000000000000..c8d660dcb43f --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/expected/Test2.svelte.d.ts @@ -0,0 +1,21 @@ +import type { Foo } from './foo'; +interface $$__sveltets_2_IsomorphicComponent = any, Events extends Record = any, Slots extends Record = any, Exports = {}, Bindings = string> { + new (options: import('svelte').ComponentConstructorOptions): import('svelte').SvelteComponent & { + $$bindings?: Bindings; + } & Exports; + (internal: unknown, props: Props & { + $$events?: Events; + $$slots?: Slots; + }): Exports & { + $set?: any; + $on?: any; + }; + z_$$bindings?: Bindings; +} +declare const Test2: $$__sveltets_2_IsomorphicComponent<{ + foo: Foo; +}, { + [evt: string]: CustomEvent; +}, {}, {}, string>; +type Test2 = InstanceType; +export default Test2; diff --git a/packages/package/test/fixtures/typescript/expected/foo.d.ts b/packages/package/test/fixtures/typescript-esnext/expected/foo.d.ts similarity index 100% rename from packages/package/test/fixtures/typescript/expected/foo.d.ts rename to packages/package/test/fixtures/typescript-esnext/expected/foo.d.ts diff --git a/packages/package/test/fixtures/typescript/expected/index.d.ts b/packages/package/test/fixtures/typescript-esnext/expected/index.d.ts similarity index 100% rename from packages/package/test/fixtures/typescript/expected/index.d.ts rename to packages/package/test/fixtures/typescript-esnext/expected/index.d.ts diff --git a/packages/package/test/fixtures/typescript-esnext/expected/index.js b/packages/package/test/fixtures/typescript-esnext/expected/index.js new file mode 100644 index 000000000000..4c44188c3648 --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/expected/index.js @@ -0,0 +1 @@ +export { default as Test } from './Test.svelte'; diff --git a/packages/package/test/fixtures/typescript-esnext/expected/runes.svelte.d.ts b/packages/package/test/fixtures/typescript-esnext/expected/runes.svelte.d.ts new file mode 100644 index 000000000000..2b17805f4351 --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/expected/runes.svelte.d.ts @@ -0,0 +1 @@ +export declare const x = true; diff --git a/packages/package/test/fixtures/typescript-esnext/expected/runes.svelte.js b/packages/package/test/fixtures/typescript-esnext/expected/runes.svelte.js new file mode 100644 index 000000000000..30dc55a73230 --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/expected/runes.svelte.js @@ -0,0 +1 @@ +export const x = true; diff --git a/packages/package/test/fixtures/typescript-esnext/expected/utils.d.ts b/packages/package/test/fixtures/typescript-esnext/expected/utils.d.ts new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/package/test/fixtures/typescript-esnext/expected/utils.js b/packages/package/test/fixtures/typescript-esnext/expected/utils.js new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/package/test/fixtures/typescript-esnext/package.json b/packages/package/test/fixtures/typescript-esnext/package.json new file mode 100644 index 000000000000..6dac2ac90c18 --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/package.json @@ -0,0 +1,16 @@ +{ + "name": "typescript", + "private": true, + "version": "1.0.0", + "description": "typescript package using esnext", + "type": "module", + "peerDependencies": { + "svelte": "^4.0.0" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + } + } +} diff --git a/packages/package/test/fixtures/typescript-esnext/src/lib/Plain.svelte b/packages/package/test/fixtures/typescript-esnext/src/lib/Plain.svelte new file mode 100644 index 000000000000..dea0160a9343 --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/src/lib/Plain.svelte @@ -0,0 +1,17 @@ + + + + + diff --git a/packages/package/test/fixtures/typescript/src/lib/Test.svelte b/packages/package/test/fixtures/typescript-esnext/src/lib/Test.svelte similarity index 100% rename from packages/package/test/fixtures/typescript/src/lib/Test.svelte rename to packages/package/test/fixtures/typescript-esnext/src/lib/Test.svelte diff --git a/packages/package/test/fixtures/typescript/src/lib/Test2.svelte b/packages/package/test/fixtures/typescript-esnext/src/lib/Test2.svelte similarity index 100% rename from packages/package/test/fixtures/typescript/src/lib/Test2.svelte rename to packages/package/test/fixtures/typescript-esnext/src/lib/Test2.svelte diff --git a/packages/package/test/fixtures/typescript/src/lib/foo.d.ts b/packages/package/test/fixtures/typescript-esnext/src/lib/foo.d.ts similarity index 100% rename from packages/package/test/fixtures/typescript/src/lib/foo.d.ts rename to packages/package/test/fixtures/typescript-esnext/src/lib/foo.d.ts diff --git a/packages/package/test/fixtures/typescript-esnext/src/lib/index.ts b/packages/package/test/fixtures/typescript-esnext/src/lib/index.ts new file mode 100644 index 000000000000..4c44188c3648 --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/src/lib/index.ts @@ -0,0 +1 @@ +export { default as Test } from './Test.svelte'; diff --git a/packages/package/test/fixtures/typescript-esnext/src/lib/runes.svelte.ts b/packages/package/test/fixtures/typescript-esnext/src/lib/runes.svelte.ts new file mode 100644 index 000000000000..30dc55a73230 --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/src/lib/runes.svelte.ts @@ -0,0 +1 @@ +export const x = true; diff --git a/packages/package/test/fixtures/typescript-esnext/src/lib/utils.ts b/packages/package/test/fixtures/typescript-esnext/src/lib/utils.ts new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/packages/package/test/fixtures/typescript-esnext/svelte.config.js b/packages/package/test/fixtures/typescript-esnext/svelte.config.js new file mode 100644 index 000000000000..6bd253bdf27d --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/svelte.config.js @@ -0,0 +1,5 @@ +import preprocess from 'svelte-preprocess'; + +export default { + preprocess: preprocess() +}; diff --git a/packages/package/test/fixtures/typescript-esnext/tsconfig.json b/packages/package/test/fixtures/typescript-esnext/tsconfig.json new file mode 100644 index 000000000000..44bbdb067a8e --- /dev/null +++ b/packages/package/test/fixtures/typescript-esnext/tsconfig.json @@ -0,0 +1,9 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "verbatimModuleSyntax": true, + "checkJs": true, + "noEmit": true + } +} diff --git a/packages/package/test/fixtures/typescript-nodenext/expected/Test.svelte b/packages/package/test/fixtures/typescript-nodenext/expected/Test.svelte new file mode 100644 index 000000000000..7613c3ebf28b --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/expected/Test.svelte @@ -0,0 +1,8 @@ + + + diff --git a/packages/package/test/fixtures/typescript-nodenext/expected/Test.svelte.d.ts b/packages/package/test/fixtures/typescript-nodenext/expected/Test.svelte.d.ts new file mode 100644 index 000000000000..f5601c7243ed --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/expected/Test.svelte.d.ts @@ -0,0 +1,37 @@ +interface $$__sveltets_2_IsomorphicComponent = any, Events extends Record = any, Slots extends Record = any, Exports = {}, Bindings = string> { + new (options: import('svelte').ComponentConstructorOptions): import('svelte').SvelteComponent & { + $$bindings?: Bindings; + } & Exports; + (internal: unknown, props: Props & { + $$events?: Events; + $$slots?: Slots; + }): Exports & { + $set?: any; + $on?: any; + }; + z_$$bindings?: Bindings; +} +type $$__sveltets_2_PropsWithChildren = Props & (Slots extends { + default: any; +} ? Props extends Record ? any : { + children?: any; +} : {}); +declare const Test: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{ + astring?: string; +}, { + default: { + astring: string; + }; +}>, { + event: CustomEvent; +} & { + [evt: string]: CustomEvent; +}, { + default: { + astring: string; + }; +}, { + astring: string; +}, string>; +type Test = InstanceType; +export default Test; diff --git a/packages/package/test/fixtures/typescript-nodenext/expected/index.d.ts b/packages/package/test/fixtures/typescript-nodenext/expected/index.d.ts new file mode 100644 index 000000000000..4c44188c3648 --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/expected/index.d.ts @@ -0,0 +1 @@ +export { default as Test } from './Test.svelte'; diff --git a/packages/package/test/fixtures/typescript-nodenext/expected/index.js b/packages/package/test/fixtures/typescript-nodenext/expected/index.js new file mode 100644 index 000000000000..4c44188c3648 --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/expected/index.js @@ -0,0 +1 @@ +export { default as Test } from './Test.svelte'; diff --git a/packages/package/test/fixtures/typescript-nodenext/expected/runes.svelte.d.ts b/packages/package/test/fixtures/typescript-nodenext/expected/runes.svelte.d.ts new file mode 100644 index 000000000000..2b17805f4351 --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/expected/runes.svelte.d.ts @@ -0,0 +1 @@ +export declare const x = true; diff --git a/packages/package/test/fixtures/typescript-nodenext/expected/runes.svelte.js b/packages/package/test/fixtures/typescript-nodenext/expected/runes.svelte.js new file mode 100644 index 000000000000..30dc55a73230 --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/expected/runes.svelte.js @@ -0,0 +1 @@ +export const x = true; diff --git a/packages/package/test/fixtures/typescript-nodenext/package.json b/packages/package/test/fixtures/typescript-nodenext/package.json new file mode 100644 index 000000000000..d55abe5867ee --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/package.json @@ -0,0 +1,16 @@ +{ + "name": "typescript-nodenext", + "private": true, + "version": "1.0.0", + "description": "typescript package using nodenext", + "type": "module", + "peerDependencies": { + "svelte": "^4.0.0" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + } + } +} diff --git a/packages/package/test/fixtures/typescript-nodenext/src/lib/Test.svelte b/packages/package/test/fixtures/typescript-nodenext/src/lib/Test.svelte new file mode 100644 index 000000000000..9ad736f2323d --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/src/lib/Test.svelte @@ -0,0 +1,9 @@ + + + diff --git a/packages/package/test/fixtures/typescript-nodenext/src/lib/index.ts b/packages/package/test/fixtures/typescript-nodenext/src/lib/index.ts new file mode 100644 index 000000000000..4c44188c3648 --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/src/lib/index.ts @@ -0,0 +1 @@ +export { default as Test } from './Test.svelte'; diff --git a/packages/package/test/fixtures/typescript-nodenext/src/lib/runes.svelte.ts b/packages/package/test/fixtures/typescript-nodenext/src/lib/runes.svelte.ts new file mode 100644 index 000000000000..30dc55a73230 --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/src/lib/runes.svelte.ts @@ -0,0 +1 @@ +export const x = true; diff --git a/packages/package/test/fixtures/typescript-nodenext/svelte.config.js b/packages/package/test/fixtures/typescript-nodenext/svelte.config.js new file mode 100644 index 000000000000..6998f839a272 --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/svelte.config.js @@ -0,0 +1,5 @@ +import preprocess from 'svelte-preprocess'; + +export default { + preprocess: preprocess({}) +}; diff --git a/packages/package/test/fixtures/typescript-nodenext/tsconfig.json b/packages/package/test/fixtures/typescript-nodenext/tsconfig.json new file mode 100644 index 000000000000..fb38035e3a30 --- /dev/null +++ b/packages/package/test/fixtures/typescript-nodenext/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "NodeNext", + "verbatimModuleSyntax": true, + "moduleResolution": "NodeNext", + "checkJs": true, + "noEmit": true + } +} diff --git a/packages/package/test/fixtures/typescript/expected/Plain.svelte b/packages/package/test/fixtures/typescript/expected/Plain.svelte deleted file mode 100644 index 29329add3320..000000000000 --- a/packages/package/test/fixtures/typescript/expected/Plain.svelte +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/packages/package/test/fixtures/typescript/expected/Plain.svelte.d.ts b/packages/package/test/fixtures/typescript/expected/Plain.svelte.d.ts deleted file mode 100644 index 442fe9a46b02..000000000000 --- a/packages/package/test/fixtures/typescript/expected/Plain.svelte.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** @typedef {typeof __propDef.props} PlainProps */ -/** @typedef {typeof __propDef.events} PlainEvents */ -/** @typedef {typeof __propDef.slots} PlainSlots */ -export default class Plain extends SvelteComponent< - { - foo: boolean; - }, - { - [evt: string]: CustomEvent; - }, - {} -> {} -export type PlainProps = typeof __propDef.props; -export type PlainEvents = typeof __propDef.events; -export type PlainSlots = typeof __propDef.slots; -import { SvelteComponent } from 'svelte'; -declare const __propDef: { - props: { - foo: import('./foo').Foo; - }; - events: { - [evt: string]: CustomEvent; - }; - slots: {}; -}; -export {}; diff --git a/packages/package/test/fixtures/typescript/expected/Test.svelte.d.ts b/packages/package/test/fixtures/typescript/expected/Test.svelte.d.ts deleted file mode 100644 index c390c41778f5..000000000000 --- a/packages/package/test/fixtures/typescript/expected/Test.svelte.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { SvelteComponent } from 'svelte'; -declare const __propDef: { - props: { - astring?: string; - }; - events: { - event: CustomEvent; - } & { - [evt: string]: CustomEvent; - }; - slots: { - default: { - astring: string; - }; - }; -}; -export type TestProps = typeof __propDef.props; -export type TestEvents = typeof __propDef.events; -export type TestSlots = typeof __propDef.slots; -export default class Test extends SvelteComponent { - get astring(): string; -} -export {}; diff --git a/packages/package/test/fixtures/typescript/expected/Test2.svelte.d.ts b/packages/package/test/fixtures/typescript/expected/Test2.svelte.d.ts deleted file mode 100644 index 96cf0520f7b6..000000000000 --- a/packages/package/test/fixtures/typescript/expected/Test2.svelte.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { SvelteComponent } from 'svelte'; -import type { Foo } from './foo'; -declare const __propDef: { - props: { - foo: Foo; - }; - events: { - [evt: string]: CustomEvent; - }; - slots: {}; -}; -export type Test2Props = typeof __propDef.props; -export type Test2Events = typeof __propDef.events; -export type Test2Slots = typeof __propDef.slots; -export default class Test2 extends SvelteComponent {} -export {}; diff --git a/packages/package/test/fixtures/typescript/src/lib/Plain.svelte b/packages/package/test/fixtures/typescript/src/lib/Plain.svelte deleted file mode 100644 index 29329add3320..000000000000 --- a/packages/package/test/fixtures/typescript/src/lib/Plain.svelte +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/packages/package/test/fixtures/typescript/tsconfig.json b/packages/package/test/fixtures/typescript/tsconfig.json deleted file mode 100644 index b7f8a03f204e..000000000000 --- a/packages/package/test/fixtures/typescript/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "module": "ESNext" - } -} diff --git a/packages/package/test/index.js b/packages/package/test/index.js index 2048bcf3a4e2..5bfd3f951296 100644 --- a/packages/package/test/index.js +++ b/packages/package/test/index.js @@ -1,4 +1,5 @@ import fs from 'node:fs'; +import process from 'node:process'; import { join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; @@ -16,7 +17,7 @@ const __dirname = join(__filename, '..'); /** * @param {string} path - * @param {Partial} [options] + * @param {Partial} [options] */ async function test_make_package(path, options) { const cwd = join(__dirname, 'fixtures', path); @@ -41,7 +42,7 @@ async function test_make_package(path, options) { assert.equal(actual_files, expected_files); - const extensions = ['.json', '.svelte', '.ts', 'js']; + const extensions = ['.json', '.svelte', '.ts', 'js', '.map']; for (const file of actual_files) { const pathname = join(output, file); if (fs.statSync(pathname).isDirectory()) continue; @@ -52,8 +53,8 @@ async function test_make_package(path, options) { const err_msg = `Expected equal file contents for ${file} in ${path}`; if (extensions.some((ext) => pathname.endsWith(ext))) { - const expected_content = format(file, expected.toString('utf-8')); - const actual_content = format(file, actual.toString('utf-8')); + const expected_content = await format(file, expected.toString('utf-8')); + const actual_content = await format(file, actual.toString('utf-8')); assert.fixture(actual_content, expected_content, err_msg); } else { assert.ok(expected.equals(actual), err_msg); @@ -66,14 +67,18 @@ async function test_make_package(path, options) { * @param {string} file * @param {string} content */ -function format(file, content) { +async function format(file, content) { + if (file.endsWith('.map')) { + return content; + } + if (file.endsWith('package.json')) { // For some reason these are ordered differently in different test environments const json = JSON.parse(content); json.exports = Object.entries(json.exports).sort(([ak], [bk]) => ak.localeCompare(bk)); content = JSON.stringify(json); } - return prettier.format(content, { + return await prettier.format(content, { parser: file.endsWith('.svelte') ? 'svelte' : file.endsWith('.json') ? 'json' : 'typescript', plugins: ['prettier-plugin-svelte'] }); @@ -117,14 +122,18 @@ for (const dir of fs.readdirSync(join(__dirname, 'errors'))) { }); } -test('create standard package with javascript', async () => { +test('create package with javascript', async () => { // should also preserve filename casing // should also correctly handle nested folders await test_make_package('javascript'); }); -test('create standard package with typescript', async () => { - await test_make_package('typescript'); +test('create package with typescript using esnext', async () => { + await test_make_package('typescript-esnext'); +}); + +test('create package with typescript using nodenext', async () => { + await test_make_package('typescript-nodenext'); }); test('create package and assets are not tampered', async () => { @@ -147,6 +156,14 @@ test('SvelteKit interop', async () => { await test_make_package('svelte-kit'); }); +test('create package with declaration map', async () => { + await test_make_package('typescript-declaration-map'); +}); + +test('create package with tsconfig specified', async () => { + await test_make_package('tsconfig-specified', { tsconfig: 'tsconfig.build.json' }); +}); + // chokidar doesn't fire events in github actions :shrug: if (!process.env.CI) { test('watches for changes', async () => { @@ -219,7 +236,7 @@ if (!process.env.CI) { await settled(); compare('post-error.svelte'); } finally { - watcher.close(); + await watcher.close(); remove('src/lib/Test.svelte'); remove('src/lib/a.js'); diff --git a/packages/package/test/watch/expected/Test.svelte b/packages/package/test/watch/expected/Test.svelte index 25e56889f227..8f19b8ec1674 100644 --- a/packages/package/test/watch/expected/Test.svelte +++ b/packages/package/test/watch/expected/Test.svelte @@ -1,2 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/packages/package/test/watch/expected/Test.svelte.d.ts b/packages/package/test/watch/expected/Test.svelte.d.ts index e7fa15f99434..f642196d7c16 100644 --- a/packages/package/test/watch/expected/Test.svelte.d.ts +++ b/packages/package/test/watch/expected/Test.svelte.d.ts @@ -1,16 +1,20 @@ -import { SvelteComponent } from "svelte"; -declare const __propDef: { - props: { - answer: number; +interface $$__sveltets_2_IsomorphicComponent = any, Events extends Record = any, Slots extends Record = any, Exports = {}, Bindings = string> { + new (options: import('svelte').ComponentConstructorOptions): import('svelte').SvelteComponent & { + $$bindings?: Bindings; + } & Exports; + (internal: unknown, props: Props & { + $$events?: Events; + $$slots?: Slots; + }): Exports & { + $set?: any; + $on?: any; }; - events: { - [evt: string]: CustomEvent; - }; - slots: {}; -}; -export type TestProps = typeof __propDef.props; -export type TestEvents = typeof __propDef.events; -export type TestSlots = typeof __propDef.slots; -export default class Test extends SvelteComponent { + z_$$bindings?: Bindings; } -export {}; +declare const Test: $$__sveltets_2_IsomorphicComponent<{ + answer: number; +}, { + [evt: string]: CustomEvent; +}, {}, {}, string>; +type Test = InstanceType; +export default Test; diff --git a/packages/package/test/watch/svelte.config.js b/packages/package/test/watch/svelte.config.js index 6bd253bdf27d..ff8b4c56321a 100644 --- a/packages/package/test/watch/svelte.config.js +++ b/packages/package/test/watch/svelte.config.js @@ -1,5 +1 @@ -import preprocess from 'svelte-preprocess'; - -export default { - preprocess: preprocess() -}; +export default {}; diff --git a/packages/package/tsconfig.json b/packages/package/tsconfig.json index 50f204450e75..91de4a2ebe3d 100644 --- a/packages/package/tsconfig.json +++ b/packages/package/tsconfig.json @@ -4,15 +4,10 @@ "checkJs": true, "noEmit": true, "strict": true, - "target": "es2020", - "module": "es2022", - "moduleResolution": "node", - "allowSyntheticDefaultImports": true, - "paths": { - // internal use only - "types": ["./types/index"] - } + "target": "es2022", + "module": "node16", + "moduleResolution": "node16", + "allowSyntheticDefaultImports": true }, - "include": ["src/**/*", "test/index.js", "types/**/*"], - "exclude": ["src/test/fixtures/**/*", "src/test/watch/**/*"] + "include": ["*.js", "src/**/*", "test/index.js"] } diff --git a/playgrounds/README.md b/playgrounds/README.md new file mode 100644 index 000000000000..0ec340421d2b --- /dev/null +++ b/playgrounds/README.md @@ -0,0 +1,3 @@ +You may use these playgrounds to experiment with your changes to SvelteKit. Make sure you don't check in any changes to this folder. + +Alternatively, clone the [kit-sandbox](https://github.com/sveltejs/kit-sandbox) repo next to the `kit` repo, and use `pnpm link` to link your dependencies. This way you can have multiple different sandbox projects in different branches, and you never need to worry about accidentally committing throwaway code. diff --git a/playgrounds/basic/.gitignore b/playgrounds/basic/.gitignore new file mode 100644 index 000000000000..259afce74402 --- /dev/null +++ b/playgrounds/basic/.gitignore @@ -0,0 +1,4 @@ +# these are already ignored by the top level .gitignore +# repeating them here as a faux .prettierignore +/.svelte-kit/ +/dist/ diff --git a/playgrounds/basic/README.md b/playgrounds/basic/README.md deleted file mode 100644 index adb570111453..000000000000 --- a/playgrounds/basic/README.md +++ /dev/null @@ -1,5 +0,0 @@ -You may use this package to experiment with your changes to SvelteKit. - -To prevent any changes you make in this directory from being accidentally committed, run `git update-index --skip-worktree ./**/*.*` in this directory. - -If you would actually like to make some changes to the files here for everyone then run `git update-index --no-skip-worktree ./**/*.*` before committing. diff --git a/playgrounds/basic/jsconfig.json b/playgrounds/basic/jsconfig.json deleted file mode 100644 index fe45e13fdd06..000000000000 --- a/playgrounds/basic/jsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true - } - // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files - // - // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes - // from the referenced tsconfig.json - TypeScript does not merge them in -} diff --git a/playgrounds/basic/package.json b/playgrounds/basic/package.json index ded519f8be57..285210f441cb 100644 --- a/playgrounds/basic/package.json +++ b/playgrounds/basic/package.json @@ -1,18 +1,51 @@ { - "name": "playground", + "name": "playground-basic", "version": "0.0.0", "private": true, "scripts": { "dev": "vite dev", - "build": "vite build", - "preview": "vite preview" + "build": "vite build && npm run package", + "preview": "vite preview", + "package": "svelte-kit sync && svelte-package && publint", + "prepare": "svelte-kit sync", + "prepublishOnly": "npm run package", + "check": "svelte-kit sync && svelte-check", + "check:watch": "svelte-kit sync && svelte-check --watch", + "format": "prettier --config ../../.prettierrc --write .", + "lint": "prettier --config ../../.prettierrc --check ." }, "devDependencies": { "@sveltejs/adapter-auto": "workspace:*", + "@sveltejs/adapter-cloudflare": "workspace:*", + "@sveltejs/adapter-netlify": "workspace:*", + "@sveltejs/adapter-node": "workspace:*", + "@sveltejs/adapter-static": "workspace:*", + "@sveltejs/adapter-vercel": "workspace:*", + "@sveltejs/amp": "workspace:*", + "@sveltejs/enhanced-img": "workspace:*", "@sveltejs/kit": "workspace:*", - "svelte": "^4.0.5", - "typescript": "^5.0.0", - "vite": "^4.4.9" + "@sveltejs/package": "workspace:*", + "@sveltejs/vite-plugin-svelte": "catalog:", + "prettier": "^3.3.2", + "prettier-plugin-svelte": "^3.2.6", + "publint": "^0.3.0", + "svelte": "^5.23.1", + "svelte-check": "^4.1.1", + "typescript": "^5.5.0", + "vite": "catalog:" }, - "type": "module" + "type": "module", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "svelte": "./dist/index.js" + } + }, + "files": [ + "dist", + "!dist/**/*.test.*", + "!dist/**/*.spec.*" + ], + "svelte": "./dist/index.js", + "types": "./dist/index.d.ts" } diff --git a/playgrounds/basic/src/app.d.ts b/playgrounds/basic/src/app.d.ts index f59b884c51ed..9746bdf0ef82 100644 --- a/playgrounds/basic/src/app.d.ts +++ b/playgrounds/basic/src/app.d.ts @@ -1,4 +1,4 @@ -// See https://kit.svelte.dev/docs/types#app +// See https://svelte.dev/docs/kit/types#app.d.ts // for information about these interfaces declare global { namespace App { diff --git a/playgrounds/basic/src/app.html b/playgrounds/basic/src/app.html index 6769ed5e89c5..77a5ff52c923 100644 --- a/playgrounds/basic/src/app.html +++ b/playgrounds/basic/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/playgrounds/basic/src/routes/+layout.svelte b/playgrounds/basic/src/routes/+layout.svelte new file mode 100644 index 000000000000..707b3afe5a1e --- /dev/null +++ b/playgrounds/basic/src/routes/+layout.svelte @@ -0,0 +1,18 @@ + + + + +{@render children()} diff --git a/playgrounds/basic/src/routes/+page.svelte b/playgrounds/basic/src/routes/+page.svelte index 5982b0ae37dd..b3872f2e7f2c 100644 --- a/playgrounds/basic/src/routes/+page.svelte +++ b/playgrounds/basic/src/routes/+page.svelte @@ -1,2 +1,15 @@ + +

Welcome to SvelteKit

-

Visit kit.svelte.dev to read the documentation

+ +2 + 2 = {data.sum} + +

Pages:

+ + diff --git a/playgrounds/basic/src/routes/+page.ts b/playgrounds/basic/src/routes/+page.ts new file mode 100644 index 000000000000..758f66e89fa6 --- /dev/null +++ b/playgrounds/basic/src/routes/+page.ts @@ -0,0 +1,6 @@ +import type { PageLoad } from './$types'; + +export const load: PageLoad = async ({ fetch }) => { + const response = await fetch('/', { method: 'POST', body: JSON.stringify({ a: 2, b: 2 }) }); + return { sum: await response.json() }; +}; diff --git a/playgrounds/basic/src/routes/+server.ts b/playgrounds/basic/src/routes/+server.ts new file mode 100644 index 000000000000..4d4494db055b --- /dev/null +++ b/playgrounds/basic/src/routes/+server.ts @@ -0,0 +1,7 @@ +import { json } from '@sveltejs/kit'; +import type { RequestHandler } from './$types'; + +export const POST: RequestHandler = async ({ request }) => { + const { a, b } = await request.json(); + return json(a + b); +}; diff --git a/playgrounds/basic/src/routes/[slug]/+page.svelte b/playgrounds/basic/src/routes/[slug]/+page.svelte new file mode 100644 index 000000000000..767f9b2b22b1 --- /dev/null +++ b/playgrounds/basic/src/routes/[slug]/+page.svelte @@ -0,0 +1,5 @@ + + +

{page.params.slug}

diff --git a/playgrounds/basic/src/routes/app-state/+page.svelte b/playgrounds/basic/src/routes/app-state/+page.svelte new file mode 100644 index 000000000000..836f013b6dfb --- /dev/null +++ b/playgrounds/basic/src/routes/app-state/+page.svelte @@ -0,0 +1,5 @@ + + +

{page.url.href}

diff --git a/playgrounds/basic/src/routes/images/+page.svelte b/playgrounds/basic/src/routes/images/+page.svelte new file mode 100644 index 000000000000..e77d826468e0 --- /dev/null +++ b/playgrounds/basic/src/routes/images/+page.svelte @@ -0,0 +1,17 @@ + +
+
+ +
+
+
+ + diff --git a/playgrounds/basic/src/routes/images/state-of-js-chart.png b/playgrounds/basic/src/routes/images/state-of-js-chart.png new file mode 100644 index 000000000000..d0e4b3e6d80a Binary files /dev/null and b/playgrounds/basic/src/routes/images/state-of-js-chart.png differ diff --git a/playgrounds/basic/src/routes/images/svelte-logo.svg b/playgrounds/basic/src/routes/images/svelte-logo.svg new file mode 100644 index 000000000000..d8b477bee13e --- /dev/null +++ b/playgrounds/basic/src/routes/images/svelte-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/playgrounds/basic/src/routes/request-event/+page.server.ts b/playgrounds/basic/src/routes/request-event/+page.server.ts new file mode 100644 index 000000000000..e81bd63fc51e --- /dev/null +++ b/playgrounds/basic/src/routes/request-event/+page.server.ts @@ -0,0 +1,11 @@ +import { getRequestEvent } from '$app/server'; + +export async function load() { + await Promise.resolve(); + + const event = getRequestEvent(); + + return { + pathname: event.url.pathname + }; +} diff --git a/playgrounds/basic/src/routes/request-event/+page.svelte b/playgrounds/basic/src/routes/request-event/+page.svelte new file mode 100644 index 000000000000..8e3cefb98577 --- /dev/null +++ b/playgrounds/basic/src/routes/request-event/+page.svelte @@ -0,0 +1,5 @@ + + +

{data.pathname}

diff --git a/packages/create-svelte/shared/+checkjs/jsconfig.json b/playgrounds/basic/tsconfig.json similarity index 78% rename from packages/create-svelte/shared/+checkjs/jsconfig.json rename to playgrounds/basic/tsconfig.json index fe45e13fdd06..1801420ff9f0 100644 --- a/packages/create-svelte/shared/+checkjs/jsconfig.json +++ b/playgrounds/basic/tsconfig.json @@ -10,7 +10,7 @@ "sourceMap": true, "strict": true } - // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias and https://kit.svelte.dev/docs/configuration#files + // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias and https://svelte.dev/docs/kit/configuration#files // // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes // from the referenced tsconfig.json - TypeScript does not merge them in diff --git a/playgrounds/basic/vite.config.js b/playgrounds/basic/vite.config.js index bbf8c7da43f0..e9e130ab87a3 100644 --- a/playgrounds/basic/vite.config.js +++ b/playgrounds/basic/vite.config.js @@ -1,6 +1,11 @@ +import { enhancedImages } from '@sveltejs/enhanced-img'; import { sveltekit } from '@sveltejs/kit/vite'; -import { defineConfig } from 'vite'; -export default defineConfig({ - plugins: [sveltekit()] -}); +export default { + plugins: [enhancedImages(), sveltekit()], + server: { + fs: { + allow: ['../../packages/kit'] + } + } +}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e651869c041d..79fbf1aab031 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,127 +1,146 @@ -lockfileVersion: '6.0' +lockfileVersion: '9.0' settings: autoInstallPeers: true excludeLinksFromLockfile: false +catalogs: + default: + '@playwright/test': + specifier: ^1.51.1 + version: 1.51.1 + '@sveltejs/vite-plugin-svelte': + specifier: ^6.0.0-next.0 + version: 6.0.0-next.0 + cross-env: + specifier: ^7.0.3 + version: 7.0.3 + vite: + specifier: ^6.3.5 + version: 6.3.5 + vitest: + specifier: ^3.2.3 + version: 3.2.3 + importers: .: devDependencies: '@changesets/cli': - specifier: ^2.26.0 - version: 2.26.0 - '@rollup/plugin-commonjs': - specifier: ^25.0.0 - version: 25.0.0(rollup@3.7.0) - '@rollup/plugin-json': - specifier: ^6.0.0 - version: 6.0.0(rollup@3.7.0) - '@rollup/plugin-node-resolve': - specifier: ^15.0.1 - version: 15.0.1(rollup@3.7.0) + specifier: ^2.29.5 + version: 2.29.5 + '@playwright/test': + specifier: 'catalog:' + version: 1.51.1 '@sveltejs/eslint-config': - specifier: ^6.0.4 - version: 6.0.4(@typescript-eslint/eslint-plugin@6.0.0)(@typescript-eslint/parser@6.8.0)(eslint-config-prettier@9.0.0)(eslint-plugin-svelte@2.31.0)(eslint-plugin-unicorn@48.0.0)(eslint@8.45.0)(typescript@4.9.4) + specifier: ^8.2.0 + version: 8.2.0(@stylistic/eslint-plugin-js@2.1.0(eslint@9.29.0))(eslint-config-prettier@9.1.0(eslint@9.29.0))(eslint-plugin-n@17.16.1(eslint@9.29.0)(typescript@5.8.3))(eslint-plugin-svelte@3.9.3(eslint@9.29.0)(svelte@5.23.1))(eslint@9.29.0)(typescript-eslint@8.35.0(eslint@9.29.0)(typescript@5.8.3))(typescript@5.8.3) '@svitejs/changesets-changelog-github-compact': - specifier: ^1.1.0 - version: 1.1.0 - '@typescript-eslint/eslint-plugin': - specifier: ^6.0.0 - version: 6.0.0(@typescript-eslint/parser@6.8.0)(eslint@8.45.0)(typescript@4.9.4) + specifier: ^1.2.0 + version: 1.2.0 eslint: - specifier: ^8.45.0 - version: 8.45.0 - eslint-config-prettier: - specifier: ^9.0.0 - version: 9.0.0(eslint@8.45.0) - eslint-plugin-svelte: - specifier: ^2.31.0 - version: 2.31.0(eslint@8.45.0)(svelte@4.1.2) - eslint-plugin-unicorn: - specifier: ^48.0.0 - version: 48.0.0(eslint@8.45.0) - playwright: - specifier: 1.30.0 - version: 1.30.0 + specifier: ^9.29.0 + version: 9.29.0 prettier: - specifier: ^2.8.0 - version: 2.8.0 - rollup: - specifier: ^3.7.0 - version: 3.7.0 - svelte: - specifier: ^4.0.5 - version: 4.1.2 - typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^3.6.0 + version: 3.6.0 + prettier-plugin-svelte: + specifier: ^3.4.0 + version: 3.4.0(prettier@3.6.0)(svelte@5.23.1) + typescript-eslint: + specifier: ^8.35.0 + version: 8.35.0(eslint@9.29.0)(typescript@5.8.3) packages/adapter-auto: - dependencies: - import-meta-resolve: - specifier: ^3.0.0 - version: 3.0.0 devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../kit + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) '@types/node': - specifier: ^16.18.6 - version: 16.18.6 + specifier: ^18.19.48 + version: 18.19.50 typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.3.3 + version: 5.6.3 + vitest: + specifier: 'catalog:' + version: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) packages/adapter-cloudflare: dependencies: '@cloudflare/workers-types': - specifier: ^4.20230404.0 - version: 4.20230404.0 - '@sveltejs/kit': - specifier: ^1.0.0 - version: link:../kit - esbuild: - specifier: ^0.18.11 - version: 0.18.11 + specifier: ^4.20250507.0 + version: 4.20250508.0 worktop: - specifier: 0.8.0-next.15 - version: 0.8.0-next.15 + specifier: 0.8.0-next.18 + version: 0.8.0-next.18 + wrangler: + specifier: ^4.0.0 + version: 4.14.4(@cloudflare/workers-types@4.20250508.0) devDependencies: + '@playwright/test': + specifier: 'catalog:' + version: 1.51.1 + '@sveltejs/kit': + specifier: workspace:^ + version: link:../kit '@types/node': - specifier: ^16.18.6 - version: 16.18.6 - '@types/ws': - specifier: ^8.5.3 - version: 8.5.3 + specifier: ^18.19.48 + version: 18.19.50 + esbuild: + specifier: ^0.25.4 + version: 0.25.5 typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.3.3 + version: 5.6.3 - packages/adapter-cloudflare-workers: - dependencies: - '@cloudflare/workers-types': - specifier: ^4.20230404.0 - version: 4.20230404.0 - '@iarna/toml': - specifier: ^2.2.5 - version: 2.2.5 + packages/adapter-cloudflare/test/apps/pages: + devDependencies: '@sveltejs/kit': - specifier: ^1.0.0 - version: link:../kit - esbuild: - specifier: ^0.18.11 - version: 0.18.11 + specifier: workspace:^ + version: link:../../../../kit + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + server-side-dep: + specifier: file:server-side-dep + version: file:packages/adapter-cloudflare/test/apps/pages/server-side-dep + svelte: + specifier: ^5.23.1 + version: 5.23.1 + vite: + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + wrangler: + specifier: ^4.14.3 + version: 4.14.4(@cloudflare/workers-types@4.20250508.0) + + packages/adapter-cloudflare/test/apps/workers: devDependencies: - '@cloudflare/kv-asset-handler': - specifier: ^0.3.0 - version: 0.3.0 - '@types/node': - specifier: ^16.18.6 - version: 16.18.6 - typescript: - specifier: ^4.9.4 - version: 4.9.4 + '@sveltejs/kit': + specifier: workspace:^ + version: link:../../../../kit + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + cross-env: + specifier: 'catalog:' + version: 7.0.3 + server-side-dep: + specifier: file:server-side-dep + version: file:packages/adapter-cloudflare/test/apps/workers/server-side-dep + svelte: + specifier: ^5.23.1 + version: 5.23.1 + vite: + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + wrangler: + specifier: ^4.14.3 + version: 4.14.4(@cloudflare/workers-types@4.20250508.0) packages/adapter-netlify: dependencies: @@ -129,121 +148,130 @@ importers: specifier: ^2.2.5 version: 2.2.5 esbuild: - specifier: ^0.18.11 - version: 0.18.11 + specifier: ^0.25.4 + version: 0.25.5 set-cookie-parser: specifier: ^2.6.0 version: 2.6.0 devDependencies: '@netlify/functions': - specifier: ^2.0.1 - version: 2.0.2 + specifier: ^4.0.0 + version: 4.1.4(rollup@4.40.1) '@rollup/plugin-commonjs': - specifier: ^25.0.0 - version: 25.0.0(rollup@3.7.0) + specifier: ^28.0.1 + version: 28.0.1(rollup@4.40.1) '@rollup/plugin-json': - specifier: ^6.0.0 - version: 6.0.0(rollup@3.7.0) + specifier: ^6.1.0 + version: 6.1.0(rollup@4.40.1) '@rollup/plugin-node-resolve': - specifier: ^15.0.1 - version: 15.0.1(rollup@3.7.0) + specifier: ^16.0.0 + version: 16.0.0(rollup@4.40.1) '@sveltejs/kit': specifier: workspace:^ version: link:../kit + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) '@types/node': - specifier: ^16.18.6 - version: 16.18.6 + specifier: ^18.19.48 + version: 18.19.50 '@types/set-cookie-parser': - specifier: ^2.4.2 - version: 2.4.2 + specifier: ^2.4.7 + version: 2.4.7 rollup: - specifier: ^3.7.0 - version: 3.7.0 + specifier: ^4.14.2 + version: 4.40.1 typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.3.3 + version: 5.6.3 vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) + specifier: 'catalog:' + version: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) packages/adapter-node: dependencies: '@rollup/plugin-commonjs': - specifier: ^25.0.0 - version: 25.0.0(rollup@3.7.0) + specifier: ^28.0.1 + version: 28.0.1(rollup@4.40.1) '@rollup/plugin-json': - specifier: ^6.0.0 - version: 6.0.0(rollup@3.7.0) + specifier: ^6.1.0 + version: 6.1.0(rollup@4.40.1) '@rollup/plugin-node-resolve': - specifier: ^15.0.1 - version: 15.0.1(rollup@3.7.0) + specifier: ^16.0.0 + version: 16.0.0(rollup@4.40.1) rollup: - specifier: ^3.7.0 - version: 3.7.0 + specifier: ^4.9.5 + version: 4.40.1 devDependencies: '@polka/url': - specifier: ^1.0.0-next.21 - version: 1.0.0-next.21 + specifier: ^1.0.0-next.28 + version: 1.0.0-next.28 '@sveltejs/kit': specifier: workspace:^ version: link:../kit + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) '@types/node': - specifier: ^16.18.6 - version: 16.18.6 - c8: - specifier: ^8.0.0 - version: 8.0.0 + specifier: ^18.19.48 + version: 18.19.50 polka: - specifier: ^1.0.0-next.22 - version: 1.0.0-next.22 + specifier: ^1.0.0-next.28 + version: 1.0.0-next.28 sirv: - specifier: ^2.0.3 - version: 2.0.3 + specifier: ^3.0.0 + version: 3.0.0 typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.3.3 + version: 5.6.3 vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) + specifier: 'catalog:' + version: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) packages/adapter-static: devDependencies: '@playwright/test': - specifier: 1.30.0 - version: 1.30.0 + specifier: 'catalog:' + version: 1.51.1 '@sveltejs/kit': specifier: workspace:^ version: link:../kit + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) '@types/node': - specifier: ^16.18.6 - version: 16.18.6 + specifier: ^18.19.48 + version: 18.19.50 sirv: - specifier: ^2.0.3 - version: 2.0.3 + specifier: ^3.0.0 + version: 3.0.0 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.3.3 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/adapter-static/test/apps/prerendered: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../../../kit + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) sirv-cli: - specifier: ^2.0.2 - version: 2.0.2 + specifier: ^3.0.0 + version: 3.0.0 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/adapter-static/test/apps/spa: devDependencies: @@ -253,141 +281,128 @@ importers: '@sveltejs/kit': specifier: workspace:^ version: link:../../../../kit + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) sirv-cli: - specifier: ^2.0.2 - version: 2.0.2 + specifier: ^3.0.0 + version: 3.0.0 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/adapter-vercel: dependencies: '@vercel/nft': - specifier: ^0.24.0 - version: 0.24.0 + specifier: ^0.29.2 + version: 0.29.4(rollup@4.40.1) esbuild: - specifier: ^0.18.11 - version: 0.18.11 + specifier: ^0.25.4 + version: 0.25.5 devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../kit + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) '@types/node': - specifier: ^16.18.6 - version: 16.18.6 + specifier: ^18.19.48 + version: 18.19.50 typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.3.3 + version: 5.6.3 vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) + specifier: 'catalog:' + version: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) packages/amp: dependencies: '@sveltejs/kit': - specifier: ^1.0.0 + specifier: ^1.0.0 || ^2.0.0 version: link:../kit - - packages/create-svelte: - dependencies: - '@clack/prompts': - specifier: ^0.7.0 - version: 0.7.0 - kleur: - specifier: ^4.1.5 - version: 4.1.5 devDependencies: - '@playwright/test': - specifier: 1.30.0 - version: 1.30.0 - '@types/gitignore-parser': - specifier: ^0.0.2 - version: 0.0.2 - '@types/prettier': - specifier: ^2.7.1 - version: 2.7.1 - gitignore-parser: - specifier: ^0.0.2 - version: 0.0.2 - prettier: - specifier: ^2.8.0 - version: 2.8.0 - prettier-plugin-svelte: - specifier: ^2.10.1 - version: 2.10.1(prettier@2.8.0)(svelte@4.1.2) - sucrase: - specifier: ^3.29.0 - version: 3.29.0 - svelte: - specifier: ^4.0.5 - version: 4.1.2 - tiny-glob: - specifier: ^0.2.9 - version: 0.2.9 - vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) + typescript: + specifier: ^5.3.3 + version: 5.6.3 + + packages/create-svelte: {} - packages/create-svelte/templates/default: + packages/enhanced-img: dependencies: - '@fontsource/fira-mono': - specifier: ^5.0.5 - version: 5.0.5 + magic-string: + specifier: ^0.30.5 + version: 0.30.17 + sharp: + specifier: ^0.34.1 + version: 0.34.1 + svelte-parse-markup: + specifier: ^0.1.5 + version: 0.1.5(svelte@5.23.1) + vite-imagetools: + specifier: ^7.1.0 + version: 7.1.0(rollup@4.40.1) + zimmerframe: + specifier: ^1.1.2 + version: 1.1.2 devDependencies: - '@neoconfetti/svelte': - specifier: ^1.0.0 - version: 1.0.0 - '@sveltejs/adapter-auto': - specifier: workspace:* - version: link:../../../adapter-auto - '@sveltejs/kit': - specifier: workspace:* - version: link:../../../kit + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + '@types/estree': + specifier: ^1.0.5 + version: 1.0.7 + '@types/node': + specifier: ^18.19.48 + version: 18.19.50 + rollup: + specifier: ^4.27.4 + version: 4.40.1 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 typescript: - specifier: ^5.0.0 - version: 5.0.4 + specifier: ^5.6.3 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) - - packages/create-svelte/templates/skeleton: - devDependencies: - '@sveltejs/adapter-auto': - specifier: workspace:* - version: link:../../../adapter-auto + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + vitest: + specifier: 'catalog:' + version: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit: dependencies: - '@sveltejs/vite-plugin-svelte': - specifier: ^2.4.1 - version: 2.4.1(svelte@4.1.2)(vite@4.4.9) + '@sveltejs/acorn-typescript': + specifier: ^1.0.5 + version: 1.0.5(acorn@8.14.1) '@types/cookie': - specifier: ^0.5.1 - version: 0.5.1 + specifier: ^0.6.0 + version: 0.6.0 + acorn: + specifier: ^8.14.1 + version: 8.14.1 cookie: - specifier: ^0.5.0 - version: 0.5.0 + specifier: ^0.6.0 + version: 0.6.0 devalue: - specifier: ^4.3.1 - version: 4.3.1 + specifier: ^5.1.0 + version: 5.1.0 esm-env: - specifier: ^1.0.0 - version: 1.0.0 + specifier: ^1.2.2 + version: 1.2.2 kleur: specifier: ^4.1.5 version: 4.1.5 magic-string: - specifier: ^0.30.0 - version: 0.30.2 + specifier: ^0.30.5 + version: 0.30.17 mrmime: - specifier: ^1.0.1 - version: 1.0.1 + specifier: ^2.0.0 + version: 2.0.0 sade: specifier: ^1.8.1 version: 1.8.1 @@ -395,54 +410,48 @@ importers: specifier: ^2.6.0 version: 2.6.0 sirv: - specifier: ^2.0.2 - version: 2.0.3 - tiny-glob: - specifier: ^0.2.9 - version: 0.2.9 - undici: - specifier: ~5.26.2 - version: 5.26.3 + specifier: ^3.0.0 + version: 3.0.0 + vitefu: + specifier: ^1.0.6 + version: 1.0.6(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) devDependencies: '@playwright/test': - specifier: 1.30.0 - version: 1.30.0 + specifier: 'catalog:' + version: 1.51.1 + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) '@types/connect': - specifier: ^3.4.35 - version: 3.4.35 + specifier: ^3.4.38 + version: 3.4.38 '@types/node': - specifier: ^16.18.6 - version: 16.18.6 - '@types/sade': - specifier: ^1.7.4 - version: 1.7.4 + specifier: ^18.19.48 + version: 18.19.50 '@types/set-cookie-parser': - specifier: ^2.4.2 - version: 2.4.2 + specifier: ^2.4.7 + version: 2.4.7 dts-buddy: - specifier: ^0.2.4 - version: 0.2.4 - marked: - specifier: ^9.0.0 - version: 9.0.0 + specifier: ^0.6.1 + version: 0.6.1(typescript@5.6.3) rollup: - specifier: ^3.7.0 - version: 3.7.0 + specifier: ^4.14.2 + version: 4.40.1 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-preprocess: - specifier: ^5.0.4 - version: 5.0.4(postcss@8.4.31)(svelte@4.1.2)(typescript@4.9.4) + specifier: ^6.0.0 + version: 6.0.0(postcss-load-config@3.1.4(postcss@8.5.6))(postcss@8.5.6)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.3.3 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) + specifier: 'catalog:' + version: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/apps/amp: devDependencies: @@ -452,108 +461,213 @@ importers: '@sveltejs/kit': specifier: workspace:^ version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) cross-env: - specifier: ^7.0.3 + specifier: 'catalog:' version: 7.0.3 dropcss: specifier: ^1.0.16 version: 1.0.16 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/apps/basics: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) cross-env: - specifier: ^7.0.3 + specifier: 'catalog:' version: 7.0.3 + redirect-pkg: + specifier: file:./_test_dependencies/redirect-pkg + version: file:packages/kit/test/apps/basics/_test_dependencies/redirect-pkg(@sveltejs/kit@packages+kit) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + + packages/kit/test/apps/basics/_test_dependencies/redirect-pkg: + dependencies: + '@sveltejs/kit': + specifier: workspace:* + version: link:../../../../.. packages/kit/test/apps/dev-only: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) cross-env: - specifier: ^7.0.3 + specifier: 'catalog:' version: 7.0.3 + e2e-test-dep-error: + specifier: file:./_test_dependencies/cjs-only + version: e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only + e2e-test-dep-hooks: + specifier: file:./_test_dependencies/cjs-only + version: e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only + e2e-test-dep-hooks-client: + specifier: file:./_test_dependencies/cjs-only + version: e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only + e2e-test-dep-layout-server: + specifier: file:./_test_dependencies/cjs-only + version: e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only + e2e-test-dep-layout-svelte: + specifier: file:./_test_dependencies/cjs-only + version: e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only + e2e-test-dep-layout-universal: + specifier: file:./_test_dependencies/cjs-only + version: e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only + e2e-test-dep-page-server: + specifier: file:./_test_dependencies/cjs-only + version: e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only + e2e-test-dep-page-svelte: + specifier: file:./_test_dependencies/cjs-only + version: e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only + e2e-test-dep-page-universal: + specifier: file:./_test_dependencies/cjs-only + version: e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only + e2e-test-dep-server: + specifier: file:./_test_dependencies/cjs-only + version: e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/apps/embed: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + cross-env: + specifier: 'catalog:' + version: 7.0.3 + svelte: + specifier: ^5.23.1 + version: 5.23.1 + svelte-check: + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) + typescript: + specifier: ^5.5.4 + version: 5.6.3 + vite: + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + + packages/kit/test/apps/hash-based-routing: + devDependencies: + '@sveltejs/kit': + specifier: workspace:^ + version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + cross-env: + specifier: 'catalog:' + version: 7.0.3 + svelte: + specifier: ^5.23.1 + version: 5.23.1 + svelte-check: + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) + typescript: + specifier: ^5.5.4 + version: 5.6.3 + vite: + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + + packages/kit/test/apps/no-ssr: + devDependencies: + '@sveltejs/kit': + specifier: workspace:^ + version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) cross-env: - specifier: ^7.0.3 + specifier: 'catalog:' version: 7.0.3 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/apps/options: devDependencies: + '@fontsource/libre-barcode-128-text': + specifier: ^5.1.0 + version: 5.1.0 '@sveltejs/kit': specifier: workspace:^ version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) cross-env: - specifier: ^7.0.3 + specifier: 'catalog:' version: 7.0.3 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/apps/options-2: devDependencies: @@ -563,48 +677,78 @@ importers: '@sveltejs/kit': specifier: workspace:^ version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + cross-env: + specifier: 'catalog:' + version: 7.0.3 + svelte: + specifier: ^5.23.1 + version: 5.23.1 + svelte-check: + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) + typescript: + specifier: ^5.5.4 + version: 5.6.3 + vite: + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + + packages/kit/test/apps/prerendered-app-error-pages: + devDependencies: + '@sveltejs/kit': + specifier: workspace:^ + version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) cross-env: - specifier: ^7.0.3 + specifier: 'catalog:' version: 7.0.3 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/apps/writes: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) cross-env: - specifier: ^7.0.3 + specifier: 'catalog:' version: 7.0.3 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors: devDependencies: vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) + specifier: 'catalog:' + version: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/prerender-entry-generator-mismatch: devDependencies: @@ -614,18 +758,21 @@ importers: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/prerenderable-incorrect-fragment: devDependencies: @@ -635,18 +782,21 @@ importers: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/prerenderable-not-prerendered: devDependencies: @@ -656,292 +806,333 @@ importers: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/private-dynamic-env: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/private-dynamic-env-dynamic-import: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/private-static-env: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) cross-env: - specifier: ^7.0.3 + specifier: 'catalog:' version: 7.0.3 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/private-static-env-dynamic-import: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/server-only-folder: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/server-only-folder-dynamic-import: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/server-only-module: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/server-only-module-dynamic-import: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + svelte: + specifier: ^5.23.1 + version: 5.23.1 + svelte-check: + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) + typescript: + specifier: ^5.5.4 + version: 5.6.3 + vite: + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + + packages/kit/test/build-errors/apps/service-worker-dynamic-public-env: + devDependencies: + '@sveltejs/kit': + specifier: workspace:^ + version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + svelte: + specifier: ^5.23.1 + version: 5.23.1 + svelte-check: + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) + typescript: + specifier: ^5.5.4 + version: 5.6.3 + vite: + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + + packages/kit/test/build-errors/apps/service-worker-private-env: + devDependencies: + '@sveltejs/kit': + specifier: workspace:^ + version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/build-errors/apps/syntax-error: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/prerendering/basics: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) + specifier: 'catalog:' + version: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/prerendering/options: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) + specifier: 'catalog:' + version: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) packages/kit/test/prerendering/paths-base: devDependencies: '@sveltejs/kit': specifier: workspace:^ version: link:../../.. + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-check: - specifier: ^3.4.4 - version: 3.4.4(postcss@8.4.31)(svelte@4.1.2) + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.5.4 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) - vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) - - packages/migrate: - dependencies: - kleur: - specifier: ^4.1.5 - version: 4.1.5 - magic-string: - specifier: ^0.30.0 - version: 0.30.2 - prompts: - specifier: ^2.4.2 - version: 2.4.2 - semver: - specifier: ^7.5.3 - version: 7.5.3 - tiny-glob: - specifier: ^0.2.9 - version: 0.2.9 - ts-morph: - specifier: ^20.0.0 - version: 20.0.0 - typescript: - specifier: ^5.0.4 - version: 5.0.4 - devDependencies: - '@types/node': - specifier: ^16.18.6 - version: 16.18.6 - '@types/prompts': - specifier: ^2.4.1 - version: 2.4.1 - '@types/semver': - specifier: ^7.5.0 - version: 7.5.0 - prettier: - specifier: ^2.8.0 - version: 2.8.0 + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) + specifier: 'catalog:' + version: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) packages/package: dependencies: chokidar: - specifier: ^3.5.3 - version: 3.5.3 + specifier: ^4.0.3 + version: 4.0.3 kleur: specifier: ^4.1.5 version: 4.1.5 @@ -949,27 +1140,33 @@ importers: specifier: ^1.8.1 version: 1.8.1 semver: - specifier: ^7.5.3 - version: 7.5.3 + specifier: ^7.5.4 + version: 7.7.1 svelte2tsx: - specifier: ~0.6.19 - version: 0.6.19(svelte@4.1.2)(typescript@4.9.4) + specifier: ~0.7.33 + version: 0.7.33(svelte@5.23.1)(typescript@5.6.3) devDependencies: + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) '@types/node': - specifier: ^16.18.6 - version: 16.18.6 + specifier: ^18.19.48 + version: 18.19.50 '@types/semver': - specifier: ^7.5.0 - version: 7.5.0 + specifier: ^7.5.6 + version: 7.5.8 + prettier: + specifier: ^3.1.1 + version: 3.3.3 svelte: - specifier: ^4.0.5 - version: 4.1.2 + specifier: ^5.23.1 + version: 5.23.1 svelte-preprocess: - specifier: ^5.0.4 - version: 5.0.4(postcss@8.4.31)(svelte@4.1.2)(typescript@4.9.4) + specifier: ^6.0.0 + version: 6.0.0(postcss-load-config@3.1.4(postcss@8.5.6))(postcss@8.5.6)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^5.3.3 + version: 5.6.3 uvu: specifier: ^0.5.6 version: 0.5.6 @@ -979,5674 +1176,6836 @@ importers: '@sveltejs/adapter-auto': specifier: workspace:* version: link:../../packages/adapter-auto - '@sveltejs/kit': + '@sveltejs/adapter-cloudflare': specifier: workspace:* - version: link:../../packages/kit - svelte: - specifier: ^4.0.5 - version: 4.2.0 - typescript: - specifier: ^5.0.0 - version: 5.0.4 - vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) - - sites/kit.svelte.dev: - dependencies: - d3-geo: - specifier: ^3.1.0 - version: 3.1.0 - d3-geo-projection: - specifier: ^4.0.0 - version: 4.0.0 - topojson-client: - specifier: ^3.1.0 - version: 3.1.0 - devDependencies: + version: link:../../packages/adapter-cloudflare + '@sveltejs/adapter-netlify': + specifier: workspace:* + version: link:../../packages/adapter-netlify + '@sveltejs/adapter-node': + specifier: workspace:* + version: link:../../packages/adapter-node + '@sveltejs/adapter-static': + specifier: workspace:* + version: link:../../packages/adapter-static '@sveltejs/adapter-vercel': - specifier: workspace:^ + specifier: workspace:* version: link:../../packages/adapter-vercel '@sveltejs/amp': - specifier: workspace:^ + specifier: workspace:* version: link:../../packages/amp + '@sveltejs/enhanced-img': + specifier: workspace:* + version: link:../../packages/enhanced-img '@sveltejs/kit': - specifier: workspace:^ + specifier: workspace:* version: link:../../packages/kit - '@sveltejs/site-kit': - specifier: 6.0.0-next.52 - version: 6.0.0-next.52(@sveltejs/kit@packages+kit)(svelte@4.2.0) - '@types/d3-geo': - specifier: ^3.0.4 - version: 3.0.4 - '@types/node': - specifier: ^16.18.6 - version: 16.18.6 - browserslist: - specifier: ^4.21.10 - version: 4.21.10 - flexsearch: - specifier: ^0.7.31 - version: 0.7.31 - lightningcss: - specifier: ^1.21.8 - version: 1.21.8 - marked: - specifier: ^9.0.0 - version: 9.0.0 + '@sveltejs/package': + specifier: workspace:* + version: link:../../packages/package + '@sveltejs/vite-plugin-svelte': + specifier: 'catalog:' + version: 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) prettier: - specifier: ^3.0.3 - version: 3.0.3 - prism-svelte: - specifier: ^0.5.0 - version: 0.5.0 - prismjs: - specifier: ^1.29.0 - version: 1.29.0 - shiki-twoslash: - specifier: ^3.1.2 - version: 3.1.2(typescript@5.0.4) + specifier: ^3.3.2 + version: 3.3.3 + prettier-plugin-svelte: + specifier: ^3.2.6 + version: 3.2.7(prettier@3.3.3)(svelte@5.23.1) + publint: + specifier: ^0.3.0 + version: 0.3.0 svelte: - specifier: ^4.2.0 - version: 4.2.0 - tiny-glob: - specifier: ^0.2.9 - version: 0.2.9 + specifier: ^5.23.1 + version: 5.23.1 + svelte-check: + specifier: ^4.1.1 + version: 4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3) typescript: - specifier: 5.0.4 - version: 5.0.4 + specifier: ^5.5.0 + version: 5.6.3 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) - vite-imagetools: - specifier: ^6.0.0 - version: 6.0.0(rollup@3.7.0) - vitest: - specifier: ^0.34.5 - version: 0.34.5(lightningcss@1.21.8)(playwright@1.30.0) + specifier: 'catalog:' + version: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) packages: - /@aashutoshrathi/word-wrap@1.2.6: + '@aashutoshrathi/word-wrap@1.2.6': resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} - dev: true - /@ampproject/remapping@2.2.1: - resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.19 - /@babel/code-frame@7.22.10: - resolution: {integrity: sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==} + '@babel/code-frame@7.27.1': + resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.22.10 - chalk: 2.4.2 - dev: true - /@babel/helper-validator-identifier@7.22.5: - resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} + '@babel/helper-string-parser@7.27.1': + resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} - dev: true - /@babel/highlight@7.22.10: - resolution: {integrity: sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==} + '@babel/helper-validator-identifier@7.27.1': + resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==} engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.5 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - /@babel/runtime@7.22.10: - resolution: {integrity: sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==} + '@babel/parser@7.27.5': + resolution: {integrity: sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/runtime@7.26.10': + resolution: {integrity: sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw==} engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.14.0 - dev: true - /@bcoe/v8-coverage@0.2.3: - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - dev: true + '@babel/types@7.27.6': + resolution: {integrity: sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==} + engines: {node: '>=6.9.0'} - /@changesets/apply-release-plan@6.1.4: - resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} - dependencies: - '@babel/runtime': 7.22.10 - '@changesets/config': 2.3.1 - '@changesets/get-version-range-type': 0.3.2 - '@changesets/git': 2.0.0 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - detect-indent: 6.1.0 - fs-extra: 7.0.1 - lodash.startcase: 4.4.0 - outdent: 0.5.0 - prettier: 2.8.0 - resolve-from: 5.0.0 - semver: 7.5.4 - dev: true + '@changesets/apply-release-plan@7.0.12': + resolution: {integrity: sha512-EaET7As5CeuhTzvXTQCRZeBUcisoYPDDcXvgTE/2jmmypKp0RC7LxKj/yzqeh/1qFTZI7oDGFcL1PHRuQuketQ==} - /@changesets/assemble-release-plan@5.2.4: - resolution: {integrity: sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==} - dependencies: - '@babel/runtime': 7.22.10 - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - semver: 7.5.4 - dev: true + '@changesets/assemble-release-plan@6.0.9': + resolution: {integrity: sha512-tPgeeqCHIwNo8sypKlS3gOPmsS3wP0zHt67JDuL20P4QcXiw/O4Hl7oXiuLnP9yg+rXLQ2sScdV1Kkzde61iSQ==} - /@changesets/changelog-git@0.1.14: - resolution: {integrity: sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA==} - dependencies: - '@changesets/types': 5.2.1 - dev: true + '@changesets/changelog-git@0.2.1': + resolution: {integrity: sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==} - /@changesets/cli@2.26.0: - resolution: {integrity: sha512-0cbTiDms+ICTVtEwAFLNW0jBNex9f5+fFv3I771nBvdnV/mOjd1QJ4+f8KtVSOrwD9SJkk9xbDkWFb0oXd8d1Q==} + '@changesets/cli@2.29.5': + resolution: {integrity: sha512-0j0cPq3fgxt2dPdFsg4XvO+6L66RC0pZybT9F4dG5TBrLA3jA/1pNkdTXH9IBBVHkgsKrNKenI3n1mPyPlIydg==} hasBin: true - dependencies: - '@babel/runtime': 7.22.10 - '@changesets/apply-release-plan': 6.1.4 - '@changesets/assemble-release-plan': 5.2.4 - '@changesets/changelog-git': 0.1.14 - '@changesets/config': 2.3.1 - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 - '@changesets/get-release-plan': 3.0.17 - '@changesets/git': 2.0.0 - '@changesets/logger': 0.0.5 - '@changesets/pre': 1.0.14 - '@changesets/read': 0.5.9 - '@changesets/types': 5.2.1 - '@changesets/write': 0.2.3 - '@manypkg/get-packages': 1.1.3 - '@types/is-ci': 3.0.0 - '@types/semver': 6.2.3 - ansi-colors: 4.1.3 - chalk: 2.4.2 - enquirer: 2.4.1 - external-editor: 3.1.0 - fs-extra: 7.0.1 - human-id: 1.0.2 - is-ci: 3.0.1 - meow: 6.1.1 - outdent: 0.5.0 - p-limit: 2.3.0 - preferred-pm: 3.0.3 - resolve-from: 5.0.0 - semver: 5.7.2 - spawndamnit: 2.0.0 - term-size: 2.2.1 - tty-table: 4.2.1 - dev: true - /@changesets/config@2.3.1: - resolution: {integrity: sha512-PQXaJl82CfIXddUOppj4zWu+987GCw2M+eQcOepxN5s+kvnsZOwjEJO3DH9eVy+OP6Pg/KFEWdsECFEYTtbg6w==} - dependencies: - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 - '@changesets/logger': 0.0.5 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - micromatch: 4.0.5 - dev: true + '@changesets/config@3.1.1': + resolution: {integrity: sha512-bd+3Ap2TKXxljCggI0mKPfzCQKeV/TU4yO2h2C6vAihIo8tzseAn2e7klSuiyYYXvgu53zMN1OeYMIQkaQoWnA==} - /@changesets/errors@0.1.4: - resolution: {integrity: sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q==} - dependencies: - extendable-error: 0.1.7 - dev: true + '@changesets/errors@0.2.0': + resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} - /@changesets/get-dependents-graph@1.3.6: - resolution: {integrity: sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q==} - dependencies: - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - chalk: 2.4.2 - fs-extra: 7.0.1 - semver: 7.5.4 - dev: true + '@changesets/get-dependents-graph@2.1.3': + resolution: {integrity: sha512-gphr+v0mv2I3Oxt19VdWRRUxq3sseyUpX9DaHpTUmLj92Y10AGy+XOtV+kbM6L/fDcpx7/ISDFK6T8A/P3lOdQ==} - /@changesets/get-github-info@0.5.2: - resolution: {integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==} - dependencies: - dataloader: 1.4.0 - node-fetch: 2.6.12 - transitivePeerDependencies: - - encoding - dev: true + '@changesets/get-github-info@0.6.0': + resolution: {integrity: sha512-v/TSnFVXI8vzX9/w3DU2Ol+UlTZcu3m0kXTjTT4KlAdwSvwutcByYwyYn9hwerPWfPkT2JfpoX0KgvCEi8Q/SA==} - /@changesets/get-release-plan@3.0.17: - resolution: {integrity: sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw==} - dependencies: - '@babel/runtime': 7.22.10 - '@changesets/assemble-release-plan': 5.2.4 - '@changesets/config': 2.3.1 - '@changesets/pre': 1.0.14 - '@changesets/read': 0.5.9 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - dev: true + '@changesets/get-release-plan@4.0.13': + resolution: {integrity: sha512-DWG1pus72FcNeXkM12tx+xtExyH/c9I1z+2aXlObH3i9YA7+WZEVaiHzHl03thpvAgWTRaH64MpfHxozfF7Dvg==} - /@changesets/get-version-range-type@0.3.2: - resolution: {integrity: sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg==} - dev: true + '@changesets/get-version-range-type@0.4.0': + resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - /@changesets/git@2.0.0: - resolution: {integrity: sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==} - dependencies: - '@babel/runtime': 7.22.10 - '@changesets/errors': 0.1.4 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - is-subdir: 1.2.0 - micromatch: 4.0.5 - spawndamnit: 2.0.0 - dev: true + '@changesets/git@3.0.4': + resolution: {integrity: sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==} - /@changesets/logger@0.0.5: - resolution: {integrity: sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw==} - dependencies: - chalk: 2.4.2 - dev: true + '@changesets/logger@0.1.1': + resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} - /@changesets/parse@0.3.16: - resolution: {integrity: sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg==} - dependencies: - '@changesets/types': 5.2.1 - js-yaml: 3.14.1 - dev: true + '@changesets/parse@0.4.1': + resolution: {integrity: sha512-iwksMs5Bf/wUItfcg+OXrEpravm5rEd9Bf4oyIPL4kVTmJQ7PNDSd6MDYkpSJR1pn7tz/k8Zf2DhTCqX08Ou+Q==} - /@changesets/pre@1.0.14: - resolution: {integrity: sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==} - dependencies: - '@babel/runtime': 7.22.10 - '@changesets/errors': 0.1.4 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - dev: true + '@changesets/pre@2.0.2': + resolution: {integrity: sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==} - /@changesets/read@0.5.9: - resolution: {integrity: sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==} - dependencies: - '@babel/runtime': 7.22.10 - '@changesets/git': 2.0.0 - '@changesets/logger': 0.0.5 - '@changesets/parse': 0.3.16 - '@changesets/types': 5.2.1 - chalk: 2.4.2 - fs-extra: 7.0.1 - p-filter: 2.1.0 - dev: true + '@changesets/read@0.6.5': + resolution: {integrity: sha512-UPzNGhsSjHD3Veb0xO/MwvasGe8eMyNrR/sT9gR8Q3DhOQZirgKhhXv/8hVsI0QpPjR004Z9iFxoJU6in3uGMg==} + + '@changesets/should-skip-package@0.1.2': + resolution: {integrity: sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==} - /@changesets/types@4.1.0: + '@changesets/types@4.1.0': resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} - dev: true - /@changesets/types@5.2.1: - resolution: {integrity: sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg==} - dev: true + '@changesets/types@6.1.0': + resolution: {integrity: sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==} - /@changesets/write@0.2.3: - resolution: {integrity: sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==} - dependencies: - '@babel/runtime': 7.22.10 - '@changesets/types': 5.2.1 - fs-extra: 7.0.1 - human-id: 1.0.2 - prettier: 2.8.0 - dev: true + '@changesets/write@0.4.0': + resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} - /@clack/core@0.3.3: - resolution: {integrity: sha512-5ZGyb75BUBjlll6eOa1m/IZBxwk91dooBWhPSL67sWcLS0zt9SnswRL0l26TVdBhb0wnWORRxUn//uH6n4z7+A==} - dependencies: - picocolors: 1.0.0 - sisteransi: 1.0.5 - dev: false + '@cloudflare/kv-asset-handler@0.4.0': + resolution: {integrity: sha512-+tv3z+SPp+gqTIcImN9o0hqE9xyfQjI1XD9pL6NuKjua9B1y7mNYv0S9cP+QEbA4ppVgGZEmKOvHX5G5Ei1CVA==} + engines: {node: '>=18.0.0'} - /@clack/prompts@0.7.0: - resolution: {integrity: sha512-0MhX9/B4iL6Re04jPrttDm+BsP8y6mS7byuv0BvXgdXhbV5PdlsHt55dvNsuBCPZ7xq1oTAOOuotR9NFbQyMSA==} - dependencies: - '@clack/core': 0.3.3 - picocolors: 1.0.0 - sisteransi: 1.0.5 - dev: false - bundledDependencies: - - is-unicode-supported + '@cloudflare/unenv-preset@2.3.1': + resolution: {integrity: sha512-Xq57Qd+ADpt6hibcVBO0uLG9zzRgyRhfCUgBT9s+g3+3Ivg5zDyVgLFy40ES1VdNcu8rPNSivm9A+kGP5IVaPg==} + peerDependencies: + unenv: 2.0.0-rc.15 + workerd: ^1.20250320.0 + peerDependenciesMeta: + workerd: + optional: true - /@cloudflare/kv-asset-handler@0.3.0: - resolution: {integrity: sha512-9CB/MKf/wdvbfkUdfrj+OkEwZ5b7rws0eogJ4293h+7b6KX5toPwym+VQKmILafNB9YiehqY0DlNrDcDhdWHSQ==} - dependencies: - mime: 3.0.0 - dev: true + '@cloudflare/workerd-darwin-64@1.20250507.0': + resolution: {integrity: sha512-xC+8hmQuOUUNCVT9DWpLMfxhR4Xs4kI8v7Bkybh4pzGC85moH6fMfCBNaP0YQCNAA/BR56aL/AwfvMVGskTK/A==} + engines: {node: '>=16'} + cpu: [x64] + os: [darwin] + + '@cloudflare/workerd-darwin-arm64@1.20250507.0': + resolution: {integrity: sha512-Oynff5H8yM4trfUFaKdkOvPV3jac8mg7QC19ILZluCVgLx/JGEVLEJ7do1Na9rLqV8CK4gmUXPrUMX7uerhQgg==} + engines: {node: '>=16'} + cpu: [arm64] + os: [darwin] + + '@cloudflare/workerd-linux-64@1.20250507.0': + resolution: {integrity: sha512-/HAA+Zg/R7Q/Smyl835FUFKjotZN1UzN9j/BHBd0xKmKov97QkXAX8gsyGnyKqRReIOinp8x/8+UebTICR7VJw==} + engines: {node: '>=16'} + cpu: [x64] + os: [linux] - /@cloudflare/workers-types@4.20230404.0: - resolution: {integrity: sha512-fG3oaJX1icfsGV74nhx1+AC6opvZsGqnpx6FvrcVqQaBmCNkjKNqDRFrpasXWFiOIvysBXHKQAzsAJkBZgnM+A==} - dev: false + '@cloudflare/workerd-linux-arm64@1.20250507.0': + resolution: {integrity: sha512-NMPibSdOYeycU0IrKkgOESFJQy7dEpHvuatZxQxlT+mIQK0INzI3irp2kKxhF99s25kPC4p+xg9bU3ugTrs3VQ==} + engines: {node: '>=16'} + cpu: [arm64] + os: [linux] + + '@cloudflare/workerd-windows-64@1.20250507.0': + resolution: {integrity: sha512-c91fhNP8ufycdIDqjVyKTqeb4ewkbAYXFQbLreMVgh4LLQQPDDEte8wCdmaFy5bIL0M9d85PpdCq51RCzq/FaQ==} + engines: {node: '>=16'} + cpu: [x64] + os: [win32] + + '@cloudflare/workers-types@4.20250508.0': + resolution: {integrity: sha512-Gr7NLsHy5BFXbWVMMO+1mf/DwxT30tNw5LGhC86S+CXErM2a2eJ0HJHqgAs0Y8Lt/XEUSrH9QrUFDvJWNhE4Rg==} - /@esbuild/android-arm64@0.18.11: - resolution: {integrity: sha512-snieiq75Z1z5LJX9cduSAjUr7vEI1OdlzFPMw0HH5YI7qQHDd3qs+WZoMrWYDsfRJSq36lIA6mfZBkvL46KoIw==} + '@colors/colors@1.6.0': + resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==} + engines: {node: '>=0.1.90'} + + '@cspotcode/source-map-support@0.8.1': + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} + + '@dabh/diagnostics@2.0.3': + resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==} + + '@dependents/detective-less@5.0.1': + resolution: {integrity: sha512-Y6+WUMsTFWE5jb20IFP4YGa5IrGY/+a/FbOSjDF/wz9gepU2hwCYSXRHP/vPwBvwcY3SVMASt4yXxbXNXigmZQ==} + engines: {node: '>=18'} + + '@emnapi/runtime@1.4.3': + resolution: {integrity: sha512-pBPWdu6MLKROBX05wSNKcNb++m5Er+KQ9QkB+WVM+pW2Kx9hoSrVTnu3BdkI5eBLZoKu/J6mW/B6i6bJB2ytXQ==} + + '@envelop/instrumentation@1.0.0': + resolution: {integrity: sha512-cxgkB66RQB95H3X27jlnxCRNTmPuSTgmBAq6/4n2Dtv4hsk4yz8FadA1ggmd0uZzvKqWD6CR+WFgTjhDqg7eyw==} + engines: {node: '>=18.0.0'} + + '@esbuild/aix-ppc64@0.25.4': + resolution: {integrity: sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/aix-ppc64@0.25.5': + resolution: {integrity: sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.25.4': + resolution: {integrity: sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==} + engines: {node: '>=18'} cpu: [arm64] os: [android] - requiresBuild: true - dev: false - optional: true - /@esbuild/android-arm64@0.18.20: - resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} - engines: {node: '>=12'} + '@esbuild/android-arm64@0.25.5': + resolution: {integrity: sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==} + engines: {node: '>=18'} cpu: [arm64] os: [android] - requiresBuild: true - optional: true - /@esbuild/android-arm@0.18.11: - resolution: {integrity: sha512-q4qlUf5ucwbUJZXF5tEQ8LF7y0Nk4P58hOsGk3ucY0oCwgQqAnqXVbUuahCddVHfrxmpyewRpiTHwVHIETYu7Q==} - engines: {node: '>=12'} + '@esbuild/android-arm@0.25.4': + resolution: {integrity: sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==} + engines: {node: '>=18'} cpu: [arm] os: [android] - requiresBuild: true - dev: false - optional: true - /@esbuild/android-arm@0.18.20: - resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} - engines: {node: '>=12'} + '@esbuild/android-arm@0.25.5': + resolution: {integrity: sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==} + engines: {node: '>=18'} cpu: [arm] os: [android] - requiresBuild: true - optional: true - /@esbuild/android-x64@0.18.11: - resolution: {integrity: sha512-iPuoxQEV34+hTF6FT7om+Qwziv1U519lEOvekXO9zaMMlT9+XneAhKL32DW3H7okrCOBQ44BMihE8dclbZtTuw==} - engines: {node: '>=12'} + '@esbuild/android-x64@0.25.4': + resolution: {integrity: sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==} + engines: {node: '>=18'} cpu: [x64] os: [android] - requiresBuild: true - dev: false - optional: true - /@esbuild/android-x64@0.18.20: - resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} - engines: {node: '>=12'} + '@esbuild/android-x64@0.25.5': + resolution: {integrity: sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==} + engines: {node: '>=18'} cpu: [x64] os: [android] - requiresBuild: true - optional: true - /@esbuild/darwin-arm64@0.18.11: - resolution: {integrity: sha512-Gm0QkI3k402OpfMKyQEEMG0RuW2LQsSmI6OeO4El2ojJMoF5NLYb3qMIjvbG/lbMeLOGiW6ooU8xqc+S0fgz2w==} - engines: {node: '>=12'} + '@esbuild/darwin-arm64@0.25.4': + resolution: {integrity: sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==} + engines: {node: '>=18'} cpu: [arm64] os: [darwin] - requiresBuild: true - dev: false - optional: true - /@esbuild/darwin-arm64@0.18.20: - resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} - engines: {node: '>=12'} + '@esbuild/darwin-arm64@0.25.5': + resolution: {integrity: sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==} + engines: {node: '>=18'} cpu: [arm64] os: [darwin] - requiresBuild: true - optional: true - /@esbuild/darwin-x64@0.18.11: - resolution: {integrity: sha512-N15Vzy0YNHu6cfyDOjiyfJlRJCB/ngKOAvoBf1qybG3eOq0SL2Lutzz9N7DYUbb7Q23XtHPn6lMDF6uWbGv9Fw==} - engines: {node: '>=12'} + '@esbuild/darwin-x64@0.25.4': + resolution: {integrity: sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==} + engines: {node: '>=18'} cpu: [x64] os: [darwin] - requiresBuild: true - dev: false - optional: true - /@esbuild/darwin-x64@0.18.20: - resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} - engines: {node: '>=12'} + '@esbuild/darwin-x64@0.25.5': + resolution: {integrity: sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==} + engines: {node: '>=18'} cpu: [x64] os: [darwin] - requiresBuild: true - optional: true - /@esbuild/freebsd-arm64@0.18.11: - resolution: {integrity: sha512-atEyuq6a3omEY5qAh5jIORWk8MzFnCpSTUruBgeyN9jZq1K/QI9uke0ATi3MHu4L8c59CnIi4+1jDKMuqmR71A==} - engines: {node: '>=12'} + '@esbuild/freebsd-arm64@0.25.4': + resolution: {integrity: sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==} + engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - requiresBuild: true - dev: false - optional: true - /@esbuild/freebsd-arm64@0.18.20: - resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} - engines: {node: '>=12'} + '@esbuild/freebsd-arm64@0.25.5': + resolution: {integrity: sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==} + engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - requiresBuild: true - optional: true - /@esbuild/freebsd-x64@0.18.11: - resolution: {integrity: sha512-XtuPrEfBj/YYYnAAB7KcorzzpGTvOr/dTtXPGesRfmflqhA4LMF0Gh/n5+a9JBzPuJ+CGk17CA++Hmr1F/gI0Q==} - engines: {node: '>=12'} + '@esbuild/freebsd-x64@0.25.4': + resolution: {integrity: sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==} + engines: {node: '>=18'} cpu: [x64] os: [freebsd] - requiresBuild: true - dev: false - optional: true - /@esbuild/freebsd-x64@0.18.20: - resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} - engines: {node: '>=12'} + '@esbuild/freebsd-x64@0.25.5': + resolution: {integrity: sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==} + engines: {node: '>=18'} cpu: [x64] os: [freebsd] - requiresBuild: true - optional: true - /@esbuild/linux-arm64@0.18.11: - resolution: {integrity: sha512-c6Vh2WS9VFKxKZ2TvJdA7gdy0n6eSy+yunBvv4aqNCEhSWVor1TU43wNRp2YLO9Vng2G+W94aRz+ILDSwAiYog==} - engines: {node: '>=12'} + '@esbuild/linux-arm64@0.25.4': + resolution: {integrity: sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==} + engines: {node: '>=18'} cpu: [arm64] os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-arm64@0.18.20: - resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} - engines: {node: '>=12'} + '@esbuild/linux-arm64@0.25.5': + resolution: {integrity: sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==} + engines: {node: '>=18'} cpu: [arm64] os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-arm@0.18.11: - resolution: {integrity: sha512-Idipz+Taso/toi2ETugShXjQ3S59b6m62KmLHkJlSq/cBejixmIydqrtM2XTvNCywFl3VC7SreSf6NV0i6sRyg==} - engines: {node: '>=12'} + '@esbuild/linux-arm@0.25.4': + resolution: {integrity: sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==} + engines: {node: '>=18'} cpu: [arm] os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-arm@0.18.20: - resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} - engines: {node: '>=12'} + '@esbuild/linux-arm@0.25.5': + resolution: {integrity: sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==} + engines: {node: '>=18'} cpu: [arm] os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-ia32@0.18.11: - resolution: {integrity: sha512-S3hkIF6KUqRh9n1Q0dSyYcWmcVa9Cg+mSoZEfFuzoYXXsk6196qndrM+ZiHNwpZKi3XOXpShZZ+9dfN5ykqjjw==} - engines: {node: '>=12'} + '@esbuild/linux-ia32@0.25.4': + resolution: {integrity: sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==} + engines: {node: '>=18'} cpu: [ia32] os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-ia32@0.18.20: - resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} - engines: {node: '>=12'} + '@esbuild/linux-ia32@0.25.5': + resolution: {integrity: sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==} + engines: {node: '>=18'} cpu: [ia32] os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-loong64@0.18.11: - resolution: {integrity: sha512-MRESANOoObQINBA+RMZW+Z0TJWpibtE7cPFnahzyQHDCA9X9LOmGh68MVimZlM9J8n5Ia8lU773te6O3ILW8kw==} - engines: {node: '>=12'} + '@esbuild/linux-loong64@0.25.4': + resolution: {integrity: sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==} + engines: {node: '>=18'} cpu: [loong64] os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-loong64@0.18.20: - resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} - engines: {node: '>=12'} + '@esbuild/linux-loong64@0.25.5': + resolution: {integrity: sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==} + engines: {node: '>=18'} cpu: [loong64] os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-mips64el@0.18.11: - resolution: {integrity: sha512-qVyPIZrXNMOLYegtD1u8EBccCrBVshxMrn5MkuFc3mEVsw7CCQHaqZ4jm9hbn4gWY95XFnb7i4SsT3eflxZsUg==} - engines: {node: '>=12'} + '@esbuild/linux-mips64el@0.25.4': + resolution: {integrity: sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==} + engines: {node: '>=18'} cpu: [mips64el] os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-mips64el@0.18.20: - resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} - engines: {node: '>=12'} + '@esbuild/linux-mips64el@0.25.5': + resolution: {integrity: sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==} + engines: {node: '>=18'} cpu: [mips64el] os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-ppc64@0.18.11: - resolution: {integrity: sha512-T3yd8vJXfPirZaUOoA9D2ZjxZX4Gr3QuC3GztBJA6PklLotc/7sXTOuuRkhE9W/5JvJP/K9b99ayPNAD+R+4qQ==} - engines: {node: '>=12'} + '@esbuild/linux-ppc64@0.25.4': + resolution: {integrity: sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==} + engines: {node: '>=18'} cpu: [ppc64] os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-ppc64@0.18.20: - resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} - engines: {node: '>=12'} + '@esbuild/linux-ppc64@0.25.5': + resolution: {integrity: sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==} + engines: {node: '>=18'} cpu: [ppc64] os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-riscv64@0.18.11: - resolution: {integrity: sha512-evUoRPWiwuFk++snjH9e2cAjF5VVSTj+Dnf+rkO/Q20tRqv+644279TZlPK8nUGunjPAtQRCj1jQkDAvL6rm2w==} - engines: {node: '>=12'} + '@esbuild/linux-riscv64@0.25.4': + resolution: {integrity: sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==} + engines: {node: '>=18'} cpu: [riscv64] os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-riscv64@0.18.20: - resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} - engines: {node: '>=12'} + '@esbuild/linux-riscv64@0.25.5': + resolution: {integrity: sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==} + engines: {node: '>=18'} cpu: [riscv64] os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-s390x@0.18.11: - resolution: {integrity: sha512-/SlRJ15XR6i93gRWquRxYCfhTeC5PdqEapKoLbX63PLCmAkXZHY2uQm2l9bN0oPHBsOw2IswRZctMYS0MijFcg==} - engines: {node: '>=12'} + '@esbuild/linux-s390x@0.25.4': + resolution: {integrity: sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==} + engines: {node: '>=18'} cpu: [s390x] os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-s390x@0.18.20: - resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} - engines: {node: '>=12'} + '@esbuild/linux-s390x@0.25.5': + resolution: {integrity: sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==} + engines: {node: '>=18'} cpu: [s390x] os: [linux] - requiresBuild: true - optional: true - /@esbuild/linux-x64@0.18.11: - resolution: {integrity: sha512-xcncej+wF16WEmIwPtCHi0qmx1FweBqgsRtEL1mSHLFR6/mb3GEZfLQnx+pUDfRDEM4DQF8dpXIW7eDOZl1IbA==} - engines: {node: '>=12'} + '@esbuild/linux-x64@0.25.4': + resolution: {integrity: sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==} + engines: {node: '>=18'} cpu: [x64] os: [linux] - requiresBuild: true - dev: false - optional: true - /@esbuild/linux-x64@0.18.20: - resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} - engines: {node: '>=12'} + '@esbuild/linux-x64@0.25.5': + resolution: {integrity: sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==} + engines: {node: '>=18'} cpu: [x64] os: [linux] - requiresBuild: true - optional: true - /@esbuild/netbsd-x64@0.18.11: - resolution: {integrity: sha512-aSjMHj/F7BuS1CptSXNg6S3M4F3bLp5wfFPIJM+Km2NfIVfFKhdmfHF9frhiCLIGVzDziggqWll0B+9AUbud/Q==} - engines: {node: '>=12'} + '@esbuild/netbsd-arm64@0.25.4': + resolution: {integrity: sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-arm64@0.25.5': + resolution: {integrity: sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.4': + resolution: {integrity: sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==} + engines: {node: '>=18'} cpu: [x64] os: [netbsd] - requiresBuild: true - dev: false - optional: true - /@esbuild/netbsd-x64@0.18.20: - resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} - engines: {node: '>=12'} + '@esbuild/netbsd-x64@0.25.5': + resolution: {integrity: sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==} + engines: {node: '>=18'} cpu: [x64] os: [netbsd] - requiresBuild: true - optional: true - /@esbuild/openbsd-x64@0.18.11: - resolution: {integrity: sha512-tNBq+6XIBZtht0xJGv7IBB5XaSyvYPCm1PxJ33zLQONdZoLVM0bgGqUrXnJyiEguD9LU4AHiu+GCXy/Hm9LsdQ==} - engines: {node: '>=12'} + '@esbuild/openbsd-arm64@0.25.4': + resolution: {integrity: sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-arm64@0.25.5': + resolution: {integrity: sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.25.4': + resolution: {integrity: sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==} + engines: {node: '>=18'} cpu: [x64] os: [openbsd] - requiresBuild: true - dev: false - optional: true - /@esbuild/openbsd-x64@0.18.20: - resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} - engines: {node: '>=12'} + '@esbuild/openbsd-x64@0.25.5': + resolution: {integrity: sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==} + engines: {node: '>=18'} cpu: [x64] os: [openbsd] - requiresBuild: true - optional: true - /@esbuild/sunos-x64@0.18.11: - resolution: {integrity: sha512-kxfbDOrH4dHuAAOhr7D7EqaYf+W45LsAOOhAet99EyuxxQmjbk8M9N4ezHcEiCYPaiW8Dj3K26Z2V17Gt6p3ng==} - engines: {node: '>=12'} + '@esbuild/sunos-x64@0.25.4': + resolution: {integrity: sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==} + engines: {node: '>=18'} cpu: [x64] os: [sunos] - requiresBuild: true - dev: false - optional: true - /@esbuild/sunos-x64@0.18.20: - resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} - engines: {node: '>=12'} + '@esbuild/sunos-x64@0.25.5': + resolution: {integrity: sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==} + engines: {node: '>=18'} cpu: [x64] os: [sunos] - requiresBuild: true - optional: true - /@esbuild/win32-arm64@0.18.11: - resolution: {integrity: sha512-Sh0dDRyk1Xi348idbal7lZyfSkjhJsdFeuC13zqdipsvMetlGiFQNdO+Yfp6f6B4FbyQm7qsk16yaZk25LChzg==} - engines: {node: '>=12'} + '@esbuild/win32-arm64@0.25.4': + resolution: {integrity: sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==} + engines: {node: '>=18'} cpu: [arm64] os: [win32] - requiresBuild: true - dev: false - optional: true - /@esbuild/win32-arm64@0.18.20: - resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} - engines: {node: '>=12'} + '@esbuild/win32-arm64@0.25.5': + resolution: {integrity: sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==} + engines: {node: '>=18'} cpu: [arm64] os: [win32] - requiresBuild: true - optional: true - /@esbuild/win32-ia32@0.18.11: - resolution: {integrity: sha512-o9JUIKF1j0rqJTFbIoF4bXj6rvrTZYOrfRcGyL0Vm5uJ/j5CkBD/51tpdxe9lXEDouhRgdr/BYzUrDOvrWwJpg==} - engines: {node: '>=12'} + '@esbuild/win32-ia32@0.25.4': + resolution: {integrity: sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==} + engines: {node: '>=18'} cpu: [ia32] os: [win32] - requiresBuild: true - dev: false - optional: true - /@esbuild/win32-ia32@0.18.20: - resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} - engines: {node: '>=12'} + '@esbuild/win32-ia32@0.25.5': + resolution: {integrity: sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==} + engines: {node: '>=18'} cpu: [ia32] os: [win32] - requiresBuild: true - optional: true - /@esbuild/win32-x64@0.18.11: - resolution: {integrity: sha512-rQI4cjLHd2hGsM1LqgDI7oOCYbQ6IBOVsX9ejuRMSze0GqXUG2ekwiKkiBU1pRGSeCqFFHxTrcEydB2Hyoz9CA==} - engines: {node: '>=12'} + '@esbuild/win32-x64@0.25.4': + resolution: {integrity: sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==} + engines: {node: '>=18'} cpu: [x64] os: [win32] - requiresBuild: true - dev: false - optional: true - /@esbuild/win32-x64@0.18.20: - resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} - engines: {node: '>=12'} + '@esbuild/win32-x64@0.25.5': + resolution: {integrity: sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==} + engines: {node: '>=18'} cpu: [x64] os: [win32] - requiresBuild: true - optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.45.0): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + '@eslint-community/eslint-utils@4.7.0': + resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - dependencies: - eslint: 8.45.0 - eslint-visitor-keys: 3.4.2 - dev: true - /@eslint-community/regexpp@4.6.2: - resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: true - /@eslint/eslintrc@2.1.1: - resolution: {integrity: sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - ajv: 6.12.6 - debug: 4.3.4 - espree: 9.6.1 - globals: 13.20.0 - ignore: 5.2.4 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - dev: true + '@eslint/config-array@0.20.1': + resolution: {integrity: sha512-OL0RJzC/CBzli0DrrR31qzj6d6i6Mm3HByuhflhl4LOBiWxN+3i6/t/ZQQNii4tjksXi8r2CRW1wMpWA2ULUEw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@eslint/js@8.44.0: - resolution: {integrity: sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true + '@eslint/config-helpers@0.2.3': + resolution: {integrity: sha512-u180qk2Um1le4yf0ruXH3PYFeEZeYC3p/4wCTKrr2U1CmGdzGi3KtY0nuPDH48UJxlKCC5RDzbcbh4X0XlqgHg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@fastify/busboy@2.0.0: - resolution: {integrity: sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==} - engines: {node: '>=14'} - dev: false + '@eslint/core@0.14.0': + resolution: {integrity: sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@fontsource/fira-mono@5.0.5: - resolution: {integrity: sha512-R5HaONNjI8zzZgjATOrtDhhl58U19OslqNOanPpiHqXV8XWKmFqRF1hIekrWemLfpSTK1WO3wyNcFMZMwkKhlA==} - dev: false + '@eslint/core@0.15.0': + resolution: {integrity: sha512-b7ePw78tEWWkpgZCDYkbqDOP8dmM6qe+AOC6iuJqlq1R/0ahMAeH3qynpnqKFGkMltrp44ohV4ubGyvLX28tzw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@humanwhocodes/config-array@0.11.10: - resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} - engines: {node: '>=10.10.0'} - dependencies: - '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - dev: true + '@eslint/eslintrc@3.3.1': + resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@humanwhocodes/module-importer@1.0.1: - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - dev: true + '@eslint/js@9.29.0': + resolution: {integrity: sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@humanwhocodes/object-schema@1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} - dev: true + '@eslint/object-schema@2.1.6': + resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@iarna/toml@2.2.5: - resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} - dev: false + '@eslint/plugin-kit@0.3.2': + resolution: {integrity: sha512-4SaFZCNfJqvk/kenHpI8xvN42DMaoycy4PzKc5otHxRswww1kAt82OlBuwRVLofCACCTZEcla2Ydxv8scMXaTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@istanbuljs/schema@0.1.3: - resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} - engines: {node: '>=8'} - dev: true + '@fastify/busboy@2.1.1': + resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==} + engines: {node: '>=14'} - /@jest/schemas@29.6.3: - resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@sinclair/typebox': 0.27.8 - dev: true + '@fastify/busboy@3.1.1': + resolution: {integrity: sha512-5DGmA8FTdB2XbDeEwc/5ZXBl6UbBAyBOOLlPuBnZ/N1SwdH9Ii+cOX3tBROlDgcTXxjOYnLMVoKk9+FXAw0CJw==} - /@jridgewell/gen-mapping@0.3.3: - resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.19 + '@fontsource/libre-barcode-128-text@5.1.0': + resolution: {integrity: sha512-MC7foQFRT0NDcsqBWQua2T3gs/fh/uTowTxfoPqGQWjqroiMxRZhQh7jerjnpcI+Xi3yR5bwCo6W2uwCza1FRw==} - /@jridgewell/resolve-uri@3.1.1: - resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} - engines: {node: '>=6.0.0'} + '@humanfs/core@0.19.1': + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} + engines: {node: '>=18.18.0'} - /@jridgewell/set-array@1.1.2: - resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} - engines: {node: '>=6.0.0'} + '@humanfs/node@0.16.6': + resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} + engines: {node: '>=18.18.0'} - /@jridgewell/source-map@0.3.5: - resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==} - dependencies: - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.19 - dev: true + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} - /@jridgewell/sourcemap-codec@1.4.15: - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + engines: {node: '>=18.18'} - /@jridgewell/trace-mapping@0.3.19: - resolution: {integrity: sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==} - dependencies: - '@jridgewell/resolve-uri': 3.1.1 - '@jridgewell/sourcemap-codec': 1.4.15 + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} - /@manypkg/find-root@1.1.0: - resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} - dependencies: - '@babel/runtime': 7.22.10 - '@types/node': 12.20.55 - find-up: 4.1.0 - fs-extra: 8.1.0 - dev: true + '@iarna/toml@2.2.5': + resolution: {integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==} - /@manypkg/get-packages@1.1.3: - resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} - dependencies: - '@babel/runtime': 7.22.10 - '@changesets/types': 4.1.0 - '@manypkg/find-root': 1.1.0 - fs-extra: 8.1.0 - globby: 11.1.0 - read-yaml-file: 1.1.0 - dev: true + '@img/sharp-darwin-arm64@0.33.5': + resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [darwin] - /@mapbox/node-pre-gyp@1.0.11: - resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} - hasBin: true - dependencies: - detect-libc: 2.0.2 - https-proxy-agent: 5.0.1 - make-dir: 3.1.0 - node-fetch: 2.6.12 - nopt: 5.0.0 - npmlog: 5.0.1 - rimraf: 3.0.2 - semver: 7.5.4 - tar: 6.1.15 - transitivePeerDependencies: - - encoding - - supports-color - dev: false + '@img/sharp-darwin-arm64@0.34.1': + resolution: {integrity: sha512-pn44xgBtgpEbZsu+lWf2KNb6OAf70X68k+yk69Ic2Xz11zHR/w24/U49XT7AeRwJ0Px+mhALhU5LPci1Aymk7A==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [darwin] - /@neoconfetti/svelte@1.0.0: - resolution: {integrity: sha512-SmksyaJAdSlMa9cTidVSIqYo1qti+WTsviNDwgjNVm+KQ3DRP2Df9umDIzC4vCcpEYY+chQe0i2IKnLw03AT8Q==} - dev: true + '@img/sharp-darwin-x64@0.33.5': + resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [darwin] - /@netlify/functions@2.0.2: - resolution: {integrity: sha512-goWRtaIPUK/q47qLYtfGGj7HgJIRaT0snw7zZ0yeoNTfQfCRwQwvRrMAsXkCsCtq2N2Oo81L26SpkMxEQMk9hg==} - engines: {node: '>=14.0.0'} - dependencies: - '@netlify/serverless-functions-api': 1.7.3 - is-promise: 4.0.0 - dev: true + '@img/sharp-darwin-x64@0.34.1': + resolution: {integrity: sha512-VfuYgG2r8BpYiOUN+BfYeFo69nP/MIwAtSJ7/Zpxc5QF3KS22z8Pvg3FkrSFJBPNQ7mmcUcYQFBmEQp7eu1F8Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [darwin] - /@netlify/node-cookies@0.1.0: - resolution: {integrity: sha512-OAs1xG+FfLX0LoRASpqzVntVV/RpYkgpI0VrUnw2u0Q1qiZUzcPffxRK8HF3gc4GjuhG5ahOEMJ9bswBiZPq0g==} - engines: {node: ^14.16.0 || >=16.0.0} - dev: true + '@img/sharp-libvips-darwin-arm64@1.0.4': + resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} + cpu: [arm64] + os: [darwin] - /@netlify/serverless-functions-api@1.7.3: - resolution: {integrity: sha512-n6/7cJlSWvvbBlUOEAbkGyEld80S6KbG/ldQI9OhLfe1lTatgKmrTNIgqVNpaWpUdTgP2OHWFjmFBzkxxBWs5w==} - engines: {node: ^14.18.0 || >=16.0.0} - dependencies: - '@netlify/node-cookies': 0.1.0 - urlpattern-polyfill: 8.0.2 - dev: true + '@img/sharp-libvips-darwin-arm64@1.1.0': + resolution: {integrity: sha512-HZ/JUmPwrJSoM4DIQPv/BfNh9yrOA8tlBbqbLz4JZ5uew2+o22Ik+tHQJcih7QJuSa0zo5coHTfD5J8inqj9DA==} + cpu: [arm64] + os: [darwin] - /@nodelib/fs.scandir@2.1.5: - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 + '@img/sharp-libvips-darwin-x64@1.0.4': + resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} + cpu: [x64] + os: [darwin] - /@nodelib/fs.stat@2.0.5: - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} + '@img/sharp-libvips-darwin-x64@1.1.0': + resolution: {integrity: sha512-Xzc2ToEmHN+hfvsl9wja0RlnXEgpKNmftriQp6XzY/RaSfwD9th+MSh0WQKzUreLKKINb3afirxW7A0fz2YWuQ==} + cpu: [x64] + os: [darwin] - /@nodelib/fs.walk@1.2.8: - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.15.0 + '@img/sharp-libvips-linux-arm64@1.0.4': + resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} + cpu: [arm64] + os: [linux] - /@playwright/test@1.30.0: - resolution: {integrity: sha512-SVxkQw1xvn/Wk/EvBnqWIq6NLo1AppwbYOjNLmyU0R1RoQ3rLEBtmjTnElcnz8VEtn11fptj1ECxK0tgURhajw==} - engines: {node: '>=14'} - hasBin: true - dependencies: - '@types/node': 16.18.6 - playwright-core: 1.30.0 - dev: true + '@img/sharp-libvips-linux-arm64@1.1.0': + resolution: {integrity: sha512-IVfGJa7gjChDET1dK9SekxFFdflarnUB8PwW8aGwEoF3oAsSDuNUTYS+SKDOyOJxQyDC1aPFMuRYLoDInyV9Ew==} + cpu: [arm64] + os: [linux] - /@polka/url@1.0.0-next.21: - resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} + '@img/sharp-libvips-linux-arm@1.0.5': + resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} + cpu: [arm] + os: [linux] - /@rollup/plugin-commonjs@25.0.0(rollup@3.7.0): - resolution: {integrity: sha512-hoho2Kay9TZrLu0bnDsTTCaj4Npa+THk9snajP/XDNb9a9mmjTjh52EQM9sKl3HD1LsnihX7js+eA2sd2uKAhw==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.68.0||^3.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.7.0) - commondir: 1.0.1 - estree-walker: 2.0.2 - glob: 8.1.0 - is-reference: 1.2.1 - magic-string: 0.27.0 - rollup: 3.7.0 + '@img/sharp-libvips-linux-arm@1.1.0': + resolution: {integrity: sha512-s8BAd0lwUIvYCJyRdFqvsj+BJIpDBSxs6ivrOPm/R7piTs5UIwY5OjXrP2bqXC9/moGsyRa37eYWYCOGVXxVrA==} + cpu: [arm] + os: [linux] - /@rollup/plugin-json@6.0.0(rollup@3.7.0): - resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} - engines: {node: '>=14.0.0'} + '@img/sharp-libvips-linux-ppc64@1.1.0': + resolution: {integrity: sha512-tiXxFZFbhnkWE2LA8oQj7KYR+bWBkiV2nilRldT7bqoEZ4HiDOcePr9wVDAZPi/Id5fT1oY9iGnDq20cwUz8lQ==} + cpu: [ppc64] + os: [linux] + + '@img/sharp-libvips-linux-s390x@1.0.4': + resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} + cpu: [s390x] + os: [linux] + + '@img/sharp-libvips-linux-s390x@1.1.0': + resolution: {integrity: sha512-xukSwvhguw7COyzvmjydRb3x/09+21HykyapcZchiCUkTThEQEOMtBj9UhkaBRLuBrgLFzQ2wbxdeCCJW/jgJA==} + cpu: [s390x] + os: [linux] + + '@img/sharp-libvips-linux-x64@1.0.4': + resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linux-x64@1.1.0': + resolution: {integrity: sha512-yRj2+reB8iMg9W5sULM3S74jVS7zqSzHG3Ol/twnAAkAhnGQnpjj6e4ayUz7V+FpKypwgs82xbRdYtchTTUB+Q==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-arm64@1.1.0': + resolution: {integrity: sha512-jYZdG+whg0MDK+q2COKbYidaqW/WTz0cc1E+tMAusiDygrM4ypmSCjOJPmFTvHHJ8j/6cAGyeDWZOsK06tP33w==} + cpu: [arm64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-x64@1.0.4': + resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} + cpu: [x64] + os: [linux] + + '@img/sharp-libvips-linuxmusl-x64@1.1.0': + resolution: {integrity: sha512-wK7SBdwrAiycjXdkPnGCPLjYb9lD4l6Ze2gSdAGVZrEL05AOUJESWU2lhlC+Ffn5/G+VKuSm6zzbQSzFX/P65A==} + cpu: [x64] + os: [linux] + + '@img/sharp-linux-arm64@0.33.5': + resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linux-arm64@0.34.1': + resolution: {integrity: sha512-kX2c+vbvaXC6vly1RDf/IWNXxrlxLNpBVWkdpRq5Ka7OOKj6nr66etKy2IENf6FtOgklkg9ZdGpEu9kwdlcwOQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linux-arm@0.33.5': + resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm] + os: [linux] + + '@img/sharp-linux-arm@0.34.1': + resolution: {integrity: sha512-anKiszvACti2sGy9CirTlNyk7BjjZPiML1jt2ZkTdcvpLU1YH6CXwRAZCA2UmRXnhiIftXQ7+Oh62Ji25W72jA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm] + os: [linux] + + '@img/sharp-linux-s390x@0.33.5': + resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [s390x] + os: [linux] + + '@img/sharp-linux-s390x@0.34.1': + resolution: {integrity: sha512-7s0KX2tI9mZI2buRipKIw2X1ufdTeaRgwmRabt5bi9chYfhur+/C1OXg3TKg/eag1W+6CCWLVmSauV1owmRPxA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [s390x] + os: [linux] + + '@img/sharp-linux-x64@0.33.5': + resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-linux-x64@0.34.1': + resolution: {integrity: sha512-wExv7SH9nmoBW3Wr2gvQopX1k8q2g5V5Iag8Zk6AVENsjwd+3adjwxtp3Dcu2QhOXr8W9NusBU6XcQUohBZ5MA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-linuxmusl-arm64@0.33.5': + resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linuxmusl-arm64@0.34.1': + resolution: {integrity: sha512-DfvyxzHxw4WGdPiTF0SOHnm11Xv4aQexvqhRDAoD00MzHekAj9a/jADXeXYCDFH/DzYruwHbXU7uz+H+nWmSOQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + + '@img/sharp-linuxmusl-x64@0.33.5': + resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-linuxmusl-x64@0.34.1': + resolution: {integrity: sha512-pax/kTR407vNb9qaSIiWVnQplPcGU8LRIJpDT5o8PdAx5aAA7AS3X9PS8Isw1/WfqgQorPotjrZL3Pqh6C5EBg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + + '@img/sharp-wasm32@0.33.5': + resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [wasm32] + + '@img/sharp-wasm32@0.34.1': + resolution: {integrity: sha512-YDybQnYrLQfEpzGOQe7OKcyLUCML4YOXl428gOOzBgN6Gw0rv8dpsJ7PqTHxBnXnwXr8S1mYFSLSa727tpz0xg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [wasm32] + + '@img/sharp-win32-ia32@0.33.5': + resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-ia32@0.34.1': + resolution: {integrity: sha512-WKf/NAZITnonBf3U1LfdjoMgNO5JYRSlhovhRhMxXVdvWYveM4kM3L8m35onYIdh75cOMCo1BexgVQcCDzyoWw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-x64@0.33.5': + resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [win32] + + '@img/sharp-win32-x64@0.34.1': + resolution: {integrity: sha512-hw1iIAHpNE8q3uMIRCgGOeDoz9KtFNarFLQclLxr/LK1VBkj8nby18RjFvr6aP7USRYAjTZW6yisnBWMX571Tw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [win32] + + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@isaacs/fs-minipass@4.0.1': + resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} + engines: {node: '>=18.0.0'} + + '@jridgewell/gen-mapping@0.3.5': + resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} + engines: {node: '>=6.0.0'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + + '@jridgewell/source-map@0.3.6': + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + + '@jridgewell/trace-mapping@0.3.9': + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + + '@manypkg/find-root@1.1.0': + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + + '@manypkg/get-packages@1.1.3': + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + + '@mapbox/node-pre-gyp@2.0.0': + resolution: {integrity: sha512-llMXd39jtP0HpQLVI37Bf1m2ADlEb35GYSh1SDSLsBhR+5iCxiNGlT31yqbNtVHygHAtMy6dWFERpU2JgufhPg==} + engines: {node: '>=18'} + hasBin: true + + '@netlify/binary-info@1.0.0': + resolution: {integrity: sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw==} + + '@netlify/blobs@9.1.6': + resolution: {integrity: sha512-RR3t5fv7CkGVJiylOTLf/YaHPyrcWmhHW3zX3EK/9UQsnTi8jPxP7B2nyjgRjAx5S4YTzJQP+FmbQlGKdogALQ==} + engines: {node: ^14.16.0 || >=16.0.0} + + '@netlify/dev-utils@3.2.0': + resolution: {integrity: sha512-5QPVts2j7RHMNVPVB7E28TC564TarS2JDTfMzKGzCrAY35bvOcfJ60Hhp8DOVjI13+BJgN37srUJP4OBDIXCfg==} + engines: {node: ^18.14.0 || >=20} + + '@netlify/functions@4.1.4': + resolution: {integrity: sha512-NIBaH8+rZTj2ONv6GDEQ+sCTeGZoRJjfw6lMkU7xtLwD1LLF8V2YMbmfJrWtS1eUwV11aK41XT+wn+htdhGbNg==} + engines: {node: '>=18.0.0'} + + '@netlify/runtime-utils@2.1.0': + resolution: {integrity: sha512-z1h+wjB7IVYUsFZsuIYyNxiw5WWuylseY+eXaUDHBxNeLTlqziy+lz03QkR67CUR4Y790xGIhaHV00aOR2KAtw==} + engines: {node: ^18.14.0 || >=20} + + '@netlify/serverless-functions-api@2.1.1': + resolution: {integrity: sha512-MNYfEmZC6F7ZExOrB/Hrfkif7JW2Cbid9y5poTFEJ6rcAhCLQB8lo0SGlQrFXgKvXowXB14IjpOubaQu2zsyfg==} + engines: {node: '>=18.0.0'} + + '@netlify/zip-it-and-ship-it@12.1.4': + resolution: {integrity: sha512-/wM1c0iyym/7SlowbgqTuu/+tJS8CDDs4vLhSizKntFl3VOeDVX0kr9qriH9wA2hYstwGSuHsEgEAnKdMcDBOg==} + engines: {node: '>=18.14.0'} + hasBin: true + + '@nodelib/fs.scandir@2.1.5': + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + + '@nodelib/fs.stat@2.0.5': + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + + '@nodelib/fs.walk@1.2.8': + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@playwright/test@1.51.1': + resolution: {integrity: sha512-nM+kEaTSAoVlXmMPH10017vn3FSiFqr/bh4fKg9vmAdMfd9SDqRZNvPSiAHADc/itWak+qPvMPZQOPwCBW7k7Q==} + engines: {node: '>=18'} + hasBin: true + + '@polka/url@1.0.0-next.28': + resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + + '@publint/pack@0.1.0': + resolution: {integrity: sha512-NvV5jPAQIMCoHvaJ0ZhfouBJ2woFYYf+o6B7dCHGh/tLKSPVoxhjffi35xPuMHgOv65aTOKUzML5XwQF9EkDAA==} + engines: {node: '>=18'} + + '@rollup/plugin-commonjs@28.0.1': + resolution: {integrity: sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==} + engines: {node: '>=16.0.0 || 14 >= 14.17'} peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 + rollup: ^2.68.0||^3.0.0||^4.0.0 peerDependenciesMeta: rollup: optional: true - dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.7.0) - rollup: 3.7.0 - /@rollup/plugin-node-resolve@15.0.1(rollup@3.7.0): - resolution: {integrity: sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg==} + '@rollup/plugin-json@6.1.0': + resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^2.78.0||^3.0.0 + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 peerDependenciesMeta: rollup: optional: true - dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.7.0) - '@types/resolve': 1.20.2 - deepmerge: 4.3.1 - is-builtin-module: 3.2.1 - is-module: 1.0.0 - resolve: 1.22.4 - rollup: 3.7.0 - - /@rollup/pluginutils@4.2.1: - resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} - engines: {node: '>= 8.0.0'} - dependencies: - estree-walker: 2.0.2 - picomatch: 2.3.1 - dev: false - /@rollup/pluginutils@5.0.2(rollup@3.7.0): - resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} + '@rollup/plugin-node-resolve@16.0.0': + resolution: {integrity: sha512-0FPvAeVUT/zdWoO0jnb/V5BlBsUSNfkIOtFHzMO4H9MOklrmQFY6FduVHKucNb/aTFxvnGhj4MNj/T1oNdDfNg==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 + rollup: ^2.78.0||^3.0.0||^4.0.0 peerDependenciesMeta: rollup: optional: true - dependencies: - '@types/estree': 1.0.1 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 3.7.0 - /@rollup/pluginutils@5.0.4(rollup@3.7.0): - resolution: {integrity: sha512-0KJnIoRI8A+a1dqOYLxH8vBf8bphDmty5QvIm2hqm7oFCFYKCAZWWd2hXgMibaPsNDhI0AtpYfQZJG47pt/k4g==} + '@rollup/pluginutils@5.1.3': + resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0 + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 peerDependenciesMeta: rollup: optional: true - dependencies: - '@types/estree': 1.0.1 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 3.7.0 - dev: true - /@sinclair/typebox@0.27.8: - resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - dev: true + '@rollup/rollup-android-arm-eabi@4.40.1': + resolution: {integrity: sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.40.1': + resolution: {integrity: sha512-PPkxTOisoNC6TpnDKatjKkjRMsdaWIhyuMkA4UsBXT9WEZY4uHezBTjs6Vl4PbqQQeu6oION1w2voYZv9yquCw==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.40.1': + resolution: {integrity: sha512-VWXGISWFY18v/0JyNUy4A46KCFCb9NVsH+1100XP31lud+TzlezBbz24CYzbnA4x6w4hx+NYCXDfnvDVO6lcAA==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.40.1': + resolution: {integrity: sha512-nIwkXafAI1/QCS7pxSpv/ZtFW6TXcNUEHAIA9EIyw5OzxJZQ1YDrX+CL6JAIQgZ33CInl1R6mHet9Y/UZTg2Bw==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.40.1': + resolution: {integrity: sha512-BdrLJ2mHTrIYdaS2I99mriyJfGGenSaP+UwGi1kB9BLOCu9SR8ZpbkmmalKIALnRw24kM7qCN0IOm6L0S44iWw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.40.1': + resolution: {integrity: sha512-VXeo/puqvCG8JBPNZXZf5Dqq7BzElNJzHRRw3vjBE27WujdzuOPecDPc/+1DcdcTptNBep3861jNq0mYkT8Z6Q==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.40.1': + resolution: {integrity: sha512-ehSKrewwsESPt1TgSE/na9nIhWCosfGSFqv7vwEtjyAqZcvbGIg4JAcV7ZEh2tfj/IlfBeZjgOXm35iOOjadcg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.40.1': + resolution: {integrity: sha512-m39iO/aaurh5FVIu/F4/Zsl8xppd76S4qoID8E+dSRQvTyZTOI2gVk3T4oqzfq1PtcvOfAVlwLMK3KRQMaR8lg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.40.1': + resolution: {integrity: sha512-Y+GHnGaku4aVLSgrT0uWe2o2Rq8te9hi+MwqGF9r9ORgXhmHK5Q71N757u0F8yU1OIwUIFy6YiJtKjtyktk5hg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.40.1': + resolution: {integrity: sha512-jEwjn3jCA+tQGswK3aEWcD09/7M5wGwc6+flhva7dsQNRZZTe30vkalgIzV4tjkopsTS9Jd7Y1Bsj6a4lzz8gQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loongarch64-gnu@4.40.1': + resolution: {integrity: sha512-ySyWikVhNzv+BV/IDCsrraOAZ3UaC8SZB67FZlqVwXwnFhPihOso9rPOxzZbjp81suB1O2Topw+6Ug3JNegejQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.40.1': + resolution: {integrity: sha512-BvvA64QxZlh7WZWqDPPdt0GH4bznuL6uOO1pmgPnnv86rpUpc8ZxgZwcEgXvo02GRIZX1hQ0j0pAnhwkhwPqWg==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.40.1': + resolution: {integrity: sha512-EQSP+8+1VuSulm9RKSMKitTav89fKbHymTf25n5+Yr6gAPZxYWpj3DzAsQqoaHAk9YX2lwEyAf9S4W8F4l3VBQ==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-musl@4.40.1': + resolution: {integrity: sha512-n/vQ4xRZXKuIpqukkMXZt9RWdl+2zgGNx7Uda8NtmLJ06NL8jiHxUawbwC+hdSq1rrw/9CghCpEONor+l1e2gA==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.40.1': + resolution: {integrity: sha512-h8d28xzYb98fMQKUz0w2fMc1XuGzLLjdyxVIbhbil4ELfk5/orZlSTpF/xdI9C8K0I8lCkq+1En2RJsawZekkg==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.40.1': + resolution: {integrity: sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.40.1': + resolution: {integrity: sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.40.1': + resolution: {integrity: sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg==} + cpu: [arm64] + os: [win32] - /@sveltejs/eslint-config@6.0.4(@typescript-eslint/eslint-plugin@6.0.0)(@typescript-eslint/parser@6.8.0)(eslint-config-prettier@9.0.0)(eslint-plugin-svelte@2.31.0)(eslint-plugin-unicorn@48.0.0)(eslint@8.45.0)(typescript@4.9.4): - resolution: {integrity: sha512-U9pwmDs+DbmsnCgTfu6Bacdwqn0DuI1IQNSiQqTgzVyYfaaj+zy9ZoQCiJfxFBGXHkklyXuRHp0KMx346N0lcQ==} + '@rollup/rollup-win32-ia32-msvc@4.40.1': + resolution: {integrity: sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.40.1': + resolution: {integrity: sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA==} + cpu: [x64] + os: [win32] + + '@stylistic/eslint-plugin-js@2.1.0': + resolution: {integrity: sha512-gdXUjGNSsnY6nPyqxu6lmDTtVrwCOjun4x8PUn0x04d5ucLI74N3MT1Q0UhdcOR9No3bo5PGDyBgXK+KmD787A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/eslint-plugin': '>= 5' - '@typescript-eslint/parser': '>= 5' - eslint: '>= 8' - eslint-config-prettier: '>= 8' - eslint-plugin-svelte: '>= 2' - eslint-plugin-unicorn: '>= 47' - typescript: '>= 4' - dependencies: - '@typescript-eslint/eslint-plugin': 6.0.0(@typescript-eslint/parser@6.8.0)(eslint@8.45.0)(typescript@4.9.4) - '@typescript-eslint/parser': 6.8.0(eslint@8.45.0)(typescript@4.9.4) - eslint: 8.45.0 - eslint-config-prettier: 9.0.0(eslint@8.45.0) - eslint-plugin-svelte: 2.31.0(eslint@8.45.0)(svelte@4.1.2) - eslint-plugin-unicorn: 48.0.0(eslint@8.45.0) - typescript: 4.9.4 - dev: true - - /@sveltejs/site-kit@6.0.0-next.52(@sveltejs/kit@packages+kit)(svelte@4.2.0): - resolution: {integrity: sha512-r/VoVllvrr9So9LcYT7XRXDK38Q6Fx062gosuTkDztENBw+qGp3hMq1vg9qSomJastmavRzze1cjJnQFgacWMw==} + eslint: '>=8.40.0' + + '@sveltejs/acorn-typescript@1.0.5': + resolution: {integrity: sha512-IwQk4yfwLdibDlrXVE04jTZYlLnwsTT2PIOQQGNLWfjavGifnk1JD1LcZjZaBTRcxZu2FfPfNLOE04DSu9lqtQ==} peerDependencies: - '@sveltejs/kit': ^1.20.0 - svelte: ^4.0.0 - dependencies: - '@sveltejs/kit': link:packages/kit - esm-env: 1.0.0 - svelte: 4.2.0 - svelte-local-storage-store: 0.6.0(svelte@4.2.0) - dev: true - - /@sveltejs/vite-plugin-svelte-inspector@1.0.3(@sveltejs/vite-plugin-svelte@2.4.1)(svelte@4.1.2)(vite@4.4.9): - resolution: {integrity: sha512-Khdl5jmmPN6SUsVuqSXatKpQTMIifoQPDanaxC84m9JxIibWvSABJyHpyys0Z+1yYrxY5TTEQm+6elh0XCMaOA==} - engines: {node: ^14.18.0 || >= 16} + acorn: ^8.9.0 + + '@sveltejs/eslint-config@8.2.0': + resolution: {integrity: sha512-5ab8AXjLoY+H0dsYTGB+9L8AnOvOzd9NZkECj40VAk6Uh9u7+5d8jVk+YYW6NGsEQ+HwHBUi19yij+q+5Pm+aQ==} peerDependencies: - '@sveltejs/vite-plugin-svelte': ^2.2.0 - svelte: ^3.54.0 || ^4.0.0 - vite: ^4.0.0 - dependencies: - '@sveltejs/vite-plugin-svelte': 2.4.1(svelte@4.1.2)(vite@4.4.9) - debug: 4.3.4 - svelte: 4.1.2 - vite: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) - transitivePeerDependencies: - - supports-color - dev: false + '@stylistic/eslint-plugin-js': '>= 1' + eslint: '>= 9' + eslint-config-prettier: '>= 9' + eslint-plugin-n: '>= 17' + eslint-plugin-svelte: '>= 3' + typescript: '>= 5' + typescript-eslint: '>= 8' + + '@sveltejs/vite-plugin-svelte-inspector@5.0.0-next.0': + resolution: {integrity: sha512-G++kR34xZSd3cT6VVOB781Pa2KOS756/ZKK7urSyXmrhK/D/mPiUvjZwWKNVTDOXkwrvVt/Y3cLecbR6Qm66Kw==} + engines: {node: ^20.19 || ^22.12 || >=24} + peerDependencies: + '@sveltejs/vite-plugin-svelte': ^6.0.0-next.0 + svelte: ^5.0.0 + vite: ^6.3.0 || ^7.0.0-beta.0 - /@sveltejs/vite-plugin-svelte@2.4.1(svelte@4.1.2)(vite@4.4.9): - resolution: {integrity: sha512-bNNKvoRY89ptY7udeBSCmTdCVwkjmMcZ0j/z9J5MuedT8jPjq0zrknAo/jF1sToAza4NVaAgR9AkZoD9oJJmnA==} - engines: {node: ^14.18.0 || >= 16} + '@sveltejs/vite-plugin-svelte@6.0.0-next.0': + resolution: {integrity: sha512-IMz7Q2bfMKmOg3LCbtvKoHlDeEhYQ2A7wqXYSC9cvQY+thCpxBwXHdVdWXYBre7GX3pCsmHDdsQFoySLsgq/hg==} + engines: {node: ^20.19 || ^22.12 || >=24} peerDependencies: - svelte: ^3.54.0 || ^4.0.0-next.0 - vite: ^4.0.0 - dependencies: - '@sveltejs/vite-plugin-svelte-inspector': 1.0.3(@sveltejs/vite-plugin-svelte@2.4.1)(svelte@4.1.2)(vite@4.4.9) - debug: 4.3.4 - deepmerge: 4.3.1 - kleur: 4.1.5 - magic-string: 0.30.2 - svelte: 4.1.2 - svelte-hmr: 0.15.3(svelte@4.1.2) - vite: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) - vitefu: 0.2.4(vite@4.4.9) - transitivePeerDependencies: - - supports-color - dev: false + svelte: ^5.0.0 + vite: ^6.3.0 || ^7.0.0-beta.0 - /@svitejs/changesets-changelog-github-compact@1.1.0: - resolution: {integrity: sha512-qhUGGDHcpbY2zpjW3SwqchuW8J/5EzlPFud7xNntHKA7f3a/mx5+g+ruJKFHSAiVZYo30PALt+AyhmPUNKH/Og==} + '@svitejs/changesets-changelog-github-compact@1.2.0': + resolution: {integrity: sha512-08eKiDAjj4zLug1taXSIJ0kGL5cawjVCyJkBb6EWSg5fEPX6L+Wtr0CH2If4j5KYylz85iaZiFlUItvgJvll5g==} engines: {node: ^14.13.1 || ^16.0.0 || >=18} - dependencies: - '@changesets/get-github-info': 0.5.2 - dotenv: 16.3.1 - transitivePeerDependencies: - - encoding - dev: true - - /@ts-morph/common@0.21.0: - resolution: {integrity: sha512-ES110Mmne5Vi4ypUKrtVQfXFDtCsDXiUiGxF6ILVlE90dDD4fdpC1LSjydl/ml7xJWKSDZwUYD2zkOePMSrPBA==} - dependencies: - fast-glob: 3.3.1 - minimatch: 7.4.6 - mkdirp: 2.1.6 - path-browserify: 1.0.1 - dev: false - /@types/chai-subset@1.3.3: - resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} - dependencies: - '@types/chai': 4.3.6 - dev: true + '@types/chai@5.2.2': + resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} - /@types/chai@4.3.6: - resolution: {integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==} - dev: true + '@types/connect@3.4.38': + resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} - /@types/connect@3.4.35: - resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} - dependencies: - '@types/node': 16.18.6 - dev: true + '@types/cookie@0.6.0': + resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} - /@types/cookie@0.5.1: - resolution: {integrity: sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g==} - dev: false + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} - /@types/d3-geo@3.0.4: - resolution: {integrity: sha512-kmUK8rVVIBPKJ1/v36bk2aSgwRj2N/ZkjDT+FkMT5pgedZoPlyhaG62J+9EgNIgUXE6IIL0b7bkLxCzhE6U4VQ==} - dependencies: - '@types/geojson': 7946.0.10 - dev: true + '@types/eslint@8.56.12': + resolution: {integrity: sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==} - /@types/estree@1.0.1: - resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==} + '@types/estree@1.0.7': + resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} - /@types/geojson@7946.0.10: - resolution: {integrity: sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA==} - dev: true + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - /@types/gitignore-parser@0.0.2: - resolution: {integrity: sha512-T1yLXu5BQ5Wet3gYfXBA+Nj1fTZp1ijl8EMMKPdAOy3WDVDJGXNmHTF7LMXS+FVYG+919bdil0LwLjPtX8w8Tg==} - dev: true + '@types/node@12.20.55': + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - /@types/is-ci@3.0.0: - resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==} - dependencies: - ci-info: 3.8.0 - dev: true + '@types/node@18.19.50': + resolution: {integrity: sha512-xonK+NRrMBRtkL1hVCc3G+uXtjh1Al4opBLjqVmipe5ZAaBYWW6cNAiBVZ1BvmkBhep698rP3UM3aRAdSALuhg==} - /@types/istanbul-lib-coverage@2.0.4: - resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} - dev: true + '@types/normalize-package-data@2.4.4': + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - /@types/json-schema@7.0.12: - resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} - dev: true + '@types/resolve@1.20.2': + resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} - /@types/minimist@1.2.2: - resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} - dev: true + '@types/semver@7.5.8': + resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} - /@types/mri@1.1.1: - resolution: {integrity: sha512-nJOuiTlsvmClSr3+a/trTSx4DTuY/VURsWGKSf/eeavh0LRMqdsK60ti0TlwM5iHiGOK3/Ibkxsbr7i9rzGreA==} - dev: true + '@types/set-cookie-parser@2.4.7': + resolution: {integrity: sha512-+ge/loa0oTozxip6zmhRIk8Z/boU51wl9Q6QdLZcokIGMzY5lFXYy/x7Htj2HTC6/KZP1hUbZ1ekx8DYXICvWg==} - /@types/node@12.20.55: - resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - dev: true + '@types/triple-beam@1.3.5': + resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==} - /@types/node@16.18.6: - resolution: {integrity: sha512-vmYJF0REqDyyU0gviezF/KHq/fYaUbFhkcNbQCuPGFQj6VTbXuHZoxs/Y7mutWe73C8AC6l9fFu8mSYiBAqkGA==} + '@types/yauzl@2.10.3': + resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - /@types/normalize-package-data@2.4.1: - resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} - dev: true + '@typescript-eslint/eslint-plugin@8.35.0': + resolution: {integrity: sha512-ijItUYaiWuce0N1SoSMrEd0b6b6lYkYt99pqCPfybd+HKVXtEvYhICfLdwp42MhiI5mp0oq7PKEL+g1cNiz/Eg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.35.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' - /@types/prettier@2.7.1: - resolution: {integrity: sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==} - dev: true + '@typescript-eslint/parser@8.35.0': + resolution: {integrity: sha512-6sMvZePQrnZH2/cJkwRpkT7DxoAWh+g6+GFRK6bV3YQo7ogi3SX5rgF6099r5Q53Ma5qeT7LGmOmuIutF4t3lA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' - /@types/prompts@2.4.1: - resolution: {integrity: sha512-1Mqzhzi9W5KlooNE4o0JwSXGUDeQXKldbGn9NO4tpxwZbHXYd+WcKpCksG2lbhH7U9I9LigfsdVsP2QAY0lNPA==} - dependencies: - '@types/node': 16.18.6 - dev: true + '@typescript-eslint/project-service@8.35.0': + resolution: {integrity: sha512-41xatqRwWZuhUMF/aZm2fcUsOFKNcG28xqRSS6ZVr9BVJtGExosLAm5A1OxTjRMagx8nJqva+P5zNIGt8RIgbQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' - /@types/pug@2.0.6: - resolution: {integrity: sha512-SnHmG9wN1UVmagJOnyo/qkk0Z7gejYxOYYmaAwr5u2yFYfsupN3sg10kyzN8Hep/2zbHxCnsumxOoRIRMBwKCg==} - dev: true + '@typescript-eslint/scope-manager@8.35.0': + resolution: {integrity: sha512-+AgL5+mcoLxl1vGjwNfiWq5fLDZM1TmTPYs2UkyHfFhgERxBbqHlNjRzhThJqz+ktBqTChRYY6zwbMwy0591AA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@types/resolve@1.20.2: - resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + '@typescript-eslint/tsconfig-utils@8.35.0': + resolution: {integrity: sha512-04k/7247kZzFraweuEirmvUj+W3bJLI9fX6fbo1Qm2YykuBvEhRTPl8tcxlYO8kZZW+HIXfkZNoasVb8EV4jpA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' - /@types/sade@1.7.4: - resolution: {integrity: sha512-6ys13kmtlY0aIOz4KtMdeBD9BHs6vSE3aRcj4vAZqXjypT2el8WZt6799CMjElVgh1cbOH/t3vrpQ4IpwytcPA==} - dependencies: - '@types/mri': 1.1.1 - dev: true + '@typescript-eslint/type-utils@8.35.0': + resolution: {integrity: sha512-ceNNttjfmSEoM9PW87bWLDEIaLAyR+E6BoYJQ5PfaDau37UGca9Nyq3lBk8Bw2ad0AKvYabz6wxc7DMTO2jnNA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' - /@types/semver@6.2.3: - resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} - dev: true + '@typescript-eslint/types@8.31.1': + resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@types/semver@7.5.0: - resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} - dev: true + '@typescript-eslint/types@8.35.0': + resolution: {integrity: sha512-0mYH3emanku0vHw2aRLNGqe7EXh9WHEhi7kZzscrMDf6IIRUQ5Jk4wp1QrledE/36KtdZrVfKnE32eZCf/vaVQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@types/set-cookie-parser@2.4.2: - resolution: {integrity: sha512-fBZgytwhYAUkj/jC/FAV4RQ5EerRup1YQsXQCh8rZfiHkc4UahC192oH0smGwsXol3cL3A5oETuAHeQHmhXM4w==} - dependencies: - '@types/node': 16.18.6 - dev: true + '@typescript-eslint/typescript-estree@8.31.1': + resolution: {integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' - /@types/ws@8.5.3: - resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} - dependencies: - '@types/node': 16.18.6 - dev: true + '@typescript-eslint/typescript-estree@8.35.0': + resolution: {integrity: sha512-F+BhnaBemgu1Qf8oHrxyw14wq6vbL8xwWKKMwTMwYIRmFFY/1n/9T/jpbobZL8vp7QyEUcC6xGrnAO4ua8Kp7w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' - /@typescript-eslint/eslint-plugin@6.0.0(@typescript-eslint/parser@6.8.0)(eslint@8.45.0)(typescript@4.9.4): - resolution: {integrity: sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==} - engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/utils@8.35.0': + resolution: {integrity: sha512-nqoMu7WWM7ki5tPgLVsmPM8CkqtoPUG6xXGeefM5t4x3XumOEKMoUZPdi+7F+/EotukN4R9OWdmDxN80fqoZeg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha - eslint: ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 6.8.0(eslint@8.45.0)(typescript@4.9.4) - '@typescript-eslint/scope-manager': 6.0.0 - '@typescript-eslint/type-utils': 6.0.0(eslint@8.45.0)(typescript@4.9.4) - '@typescript-eslint/utils': 6.0.0(eslint@8.45.0)(typescript@4.9.4) - '@typescript-eslint/visitor-keys': 6.0.0 - debug: 4.3.4 - eslint: 8.45.0 - grapheme-splitter: 1.0.4 - graphemer: 1.4.0 - ignore: 5.2.4 - natural-compare: 1.4.0 - natural-compare-lite: 1.4.0 - semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@4.9.4) - typescript: 4.9.4 - transitivePeerDependencies: - - supports-color - dev: true + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/visitor-keys@8.31.1': + resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/visitor-keys@8.35.0': + resolution: {integrity: sha512-zTh2+1Y8ZpmeQaQVIc/ZZxsx8UzgKJyNg1PTvjzC7WMhPSVS8bfDX34k1SrwOf016qd5RU3az2UxUNue3IfQ5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - /@typescript-eslint/parser@6.8.0(eslint@8.45.0)(typescript@4.9.4): - resolution: {integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==} - engines: {node: ^16.0.0 || >=18.0.0} + '@vercel/nft@0.29.4': + resolution: {integrity: sha512-6lLqMNX3TuycBPABycx7A9F1bHQR7kiQln6abjFbPrf5C/05qHM9M5E4PeTE59c7z8g6vHnx1Ioihb2AQl7BTA==} + engines: {node: '>=18'} + hasBin: true + + '@vitest/expect@3.2.3': + resolution: {integrity: sha512-W2RH2TPWVHA1o7UmaFKISPvdicFJH+mjykctJFoAkUw+SPTJTGjUNdKscFBrqM7IPnCVu6zihtKYa7TkZS1dkQ==} + + '@vitest/mocker@3.2.3': + resolution: {integrity: sha512-cP6fIun+Zx8he4rbWvi+Oya6goKQDZK+Yq4hhlggwQBbrlOQ4qtZ+G4nxB6ZnzI9lyIb+JnvyiJnPC2AGbKSPA==} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - typescript: '*' + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 peerDependenciesMeta: - typescript: + msw: optional: true + vite: + optional: true + + '@vitest/pretty-format@3.2.3': + resolution: {integrity: sha512-yFglXGkr9hW/yEXngO+IKMhP0jxyFw2/qys/CK4fFUZnSltD+MU7dVYGrH8rvPcK/O6feXQA+EU33gjaBBbAng==} + + '@vitest/runner@3.2.3': + resolution: {integrity: sha512-83HWYisT3IpMaU9LN+VN+/nLHVBCSIUKJzGxC5RWUOsK1h3USg7ojL+UXQR3b4o4UBIWCYdD2fxuzM7PQQ1u8w==} + + '@vitest/snapshot@3.2.3': + resolution: {integrity: sha512-9gIVWx2+tysDqUmmM1L0hwadyumqssOL1r8KJipwLx5JVYyxvVRfxvMq7DaWbZZsCqZnu/dZedaZQh4iYTtneA==} + + '@vitest/spy@3.2.3': + resolution: {integrity: sha512-JHu9Wl+7bf6FEejTCREy+DmgWe+rQKbK+y32C/k5f4TBIAlijhJbRBIRIOCEpVevgRsCQR2iHRUH2/qKVM/plw==} + + '@vitest/utils@3.2.3': + resolution: {integrity: sha512-4zFBCU5Pf+4Z6v+rwnZ1HU1yzOKKvDkMXZrymE2PBlbjKJRlrOxbvpfPSvJTGRIwGoahaOGvp+kbCoxifhzJ1Q==} + + '@vue/compiler-core@3.5.16': + resolution: {integrity: sha512-AOQS2eaQOaaZQoL1u+2rCJIKDruNXVBZSiUD3chnUrsoX5ZTQMaCvXlWNIfxBJuU15r1o7+mpo5223KVtIhAgQ==} + + '@vue/compiler-dom@3.5.16': + resolution: {integrity: sha512-SSJIhBr/teipXiXjmWOVWLnxjNGo65Oj/8wTEQz0nqwQeP75jWZ0n4sF24Zxoht1cuJoWopwj0J0exYwCJ0dCQ==} + + '@vue/compiler-sfc@3.5.16': + resolution: {integrity: sha512-rQR6VSFNpiinDy/DVUE0vHoIDUF++6p910cgcZoaAUm3POxgNOOdS/xgoll3rNdKYTYPnnbARDCZOyZ+QSe6Pw==} + + '@vue/compiler-ssr@3.5.16': + resolution: {integrity: sha512-d2V7kfxbdsjrDSGlJE7my1ZzCXViEcqN6w14DOsDrUCHEA6vbnVCpRFfrc4ryCP/lCKzX2eS1YtnLE/BuC9f/A==} + + '@vue/shared@3.5.16': + resolution: {integrity: sha512-c/0fWy3Jw6Z8L9FmTyYfkpM5zklnqqa9+a6dz3DvONRKW2NEbh46BP0FHuLFSWi2TnQEtp91Z6zOWNrU6QiyPg==} + + '@whatwg-node/disposablestack@0.0.6': + resolution: {integrity: sha512-LOtTn+JgJvX8WfBVJtF08TGrdjuFzGJc4mkP8EdDI8ADbvO7kiexYep1o8dwnt0okb0jYclCDXF13xU7Ge4zSw==} + engines: {node: '>=18.0.0'} + + '@whatwg-node/fetch@0.10.8': + resolution: {integrity: sha512-Rw9z3ctmeEj8QIB9MavkNJqekiu9usBCSMZa+uuAvM0lF3v70oQVCXNppMIqaV6OTZbdaHF1M2HLow58DEw+wg==} + engines: {node: '>=18.0.0'} + + '@whatwg-node/node-fetch@0.7.21': + resolution: {integrity: sha512-QC16IdsEyIW7kZd77aodrMO7zAoDyyqRCTLg+qG4wqtP4JV9AA+p7/lgqMdD29XyiYdVvIdFrfI9yh7B1QvRvw==} + engines: {node: '>=18.0.0'} + + '@whatwg-node/promise-helpers@1.3.2': + resolution: {integrity: sha512-Nst5JdK47VIl9UcGwtv2Rcgyn5lWtZ0/mhRQ4G8NN2isxpq2TO30iqHzmwoJycjWuyUfg3GFXqP/gFHXeV57IA==} + engines: {node: '>=16.0.0'} + + '@whatwg-node/server@0.10.10': + resolution: {integrity: sha512-GwpdMgUmwIp0jGjP535YtViP/nnmETAyHpGPWPZKdX++Qht/tSLbGXgFUMSsQvEACmZAR1lAPNu2CnYL1HpBgg==} + engines: {node: '>=18.0.0'} + + abbrev@2.0.0: + resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + + acorn-import-attributes@1.9.5: + resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} + peerDependencies: + acorn: ^8 + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn-walk@8.3.2: + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + engines: {node: '>=0.4.0'} + + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + + acorn@8.14.1: + resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==} + engines: {node: '>=0.4.0'} + hasBin: true + + acorn@8.15.0: + resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} + engines: {node: '>=0.4.0'} + hasBin: true + + agent-base@7.1.3: + resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + engines: {node: '>= 14'} + + ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + + ansis@4.1.0: + resolution: {integrity: sha512-BGcItUBWSMRgOCe+SVZJ+S7yTRG0eGt9cXAHev72yuGcY23hnLA7Bky5L/xLyPINoSN95geovfBkqoTlNZYa7w==} + engines: {node: '>=14'} + + archiver-utils@5.0.2: + resolution: {integrity: sha512-wuLJMmIBQYCsGZgYLTy5FIB2pF6Lfb6cXMSF8Qywwk3t20zWnAi7zLcQFdKQmIB8wyZpY5ER38x08GbwtR2cLA==} + engines: {node: '>= 14'} + + archiver@7.0.1: + resolution: {integrity: sha512-ZcbTaIqJOfCc03QwD468Unz/5Ir8ATtvAHsK+FdXbDIbGfihqh9mrvdcYunQzqn4HrvWWaFyaxJhGZagaJJpPQ==} + engines: {node: '>= 14'} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + aria-query@5.3.2: + resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + engines: {node: '>= 0.4'} + + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + as-table@1.0.55: + resolution: {integrity: sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + ast-module-types@6.0.1: + resolution: {integrity: sha512-WHw67kLXYbZuHTmcdbIrVArCq5wxo6NEuj3hiYAWr8mwJeC+C2mMCIBIWCiDoCye/OF/xelc+teJ1ERoWmnEIA==} + engines: {node: '>=18'} + + async-sema@3.1.1: + resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==} + + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + + axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} + + b4a@1.6.7: + resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + bare-events@2.5.4: + resolution: {integrity: sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + + bindings@1.5.0: + resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} + + blake3-wasm@2.1.5: + resolution: {integrity: sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==} + + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} + + buffer-crc32@0.2.13: + resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + + buffer-crc32@1.0.0: + resolution: {integrity: sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w==} + engines: {node: '>=8.0.0'} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + + builtin-modules@3.3.0: + resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} + engines: {node: '>=6'} + + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + + callsite@1.0.0: + resolution: {integrity: sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + chai@5.2.0: + resolution: {integrity: sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==} + engines: {node: '>=12'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + + chownr@3.0.0: + resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} + engines: {node: '>=18'} + + ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} + engines: {node: '>=8'} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + color-string@1.9.1: + resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + + color@3.2.1: + resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} + + color@4.2.3: + resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} + engines: {node: '>=12.5.0'} + + colorspace@1.1.4: + resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==} + + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + engines: {node: '>=18'} + + common-path-prefix@3.0.0: + resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==} + + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + + compress-commons@6.0.2: + resolution: {integrity: sha512-6FqVXeETqWPoGcfzrXb37E50NP0LXT8kAMu5ooZayhWWdgEY4lBEEcbQNXtkuKQsGduxiIcI4gOTsxTmuq/bSg==} + engines: {node: '>= 14'} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + + console-clear@1.1.1: + resolution: {integrity: sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==} + engines: {node: '>=4'} + + cookie@0.6.0: + resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} + engines: {node: '>= 0.6'} + + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + + copy-file@11.0.0: + resolution: {integrity: sha512-mFsNh/DIANLqFt5VHZoGirdg7bK5+oTWlhnGu6tgRhzBlnEKWaPX2xrFaLltii/6rmhqFMJqffUgknuRdpYlHw==} + engines: {node: '>=18'} + + core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + + crc-32@1.2.2: + resolution: {integrity: sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==} + engines: {node: '>=0.8'} + hasBin: true + + crc32-stream@6.0.0: + resolution: {integrity: sha512-piICUB6ei4IlTv1+653yq5+KoqfBYmj9bw6LqXoOneTMDXk5nM1qt12mFW1caG3LlJXEKW1Bp0WggEmIfQB34g==} + engines: {node: '>= 14'} + + cron-parser@4.9.0: + resolution: {integrity: sha512-p0SaNjrHOnQeR8/VnfGbmg9te2kfyYSQ7Sc/j/6DtPL3JQvKxmjO9TSjNFpujqV3vEYYBvNNvXSxzyksBWAx1Q==} + engines: {node: '>=12.0.0'} + + cross-env@7.0.3: + resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} + engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} + hasBin: true + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + + data-uri-to-buffer@2.0.2: + resolution: {integrity: sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==} + + dataloader@1.4.0: + resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} + + debug@4.4.1: + resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decache@4.6.2: + resolution: {integrity: sha512-2LPqkLeu8XWHU8qNCS3kcF6sCcb5zIzvWaAHYSvPfwhdd7mHuah29NssMzrTYyHN4F5oFy2ko9OBYxegtU0FEw==} + + dedent-js@1.0.1: + resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} + + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + + detect-libc@2.0.3: + resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} + engines: {node: '>=8'} + + detective-amd@6.0.1: + resolution: {integrity: sha512-TtyZ3OhwUoEEIhTFoc1C9IyJIud3y+xYkSRjmvCt65+ycQuc3VcBrPRTMWoO/AnuCyOB8T5gky+xf7Igxtjd3g==} + engines: {node: '>=18'} + hasBin: true + + detective-cjs@6.0.1: + resolution: {integrity: sha512-tLTQsWvd2WMcmn/60T2inEJNhJoi7a//PQ7DwRKEj1yEeiQs4mrONgsUtEJKnZmrGWBBmE0kJ1vqOG/NAxwaJw==} + engines: {node: '>=18'} + + detective-es6@5.0.1: + resolution: {integrity: sha512-XusTPuewnSUdoxRSx8OOI6xIA/uld/wMQwYsouvFN2LAg7HgP06NF1lHRV3x6BZxyL2Kkoih4ewcq8hcbGtwew==} + engines: {node: '>=18'} + + detective-postcss@7.0.1: + resolution: {integrity: sha512-bEOVpHU9picRZux5XnwGsmCN4+8oZo7vSW0O0/Enq/TO5R2pIAP2279NsszpJR7ocnQt4WXU0+nnh/0JuK4KHQ==} + engines: {node: ^14.0.0 || >=16.0.0} + peerDependencies: + postcss: ^8.4.47 + + detective-sass@6.0.1: + resolution: {integrity: sha512-jSGPO8QDy7K7pztUmGC6aiHkexBQT4GIH+mBAL9ZyBmnUIOFbkfZnO8wPRRJFP/QP83irObgsZHCoDHZ173tRw==} + engines: {node: '>=18'} + + detective-scss@5.0.1: + resolution: {integrity: sha512-MAyPYRgS6DCiS6n6AoSBJXLGVOydsr9huwXORUlJ37K3YLyiN0vYHpzs3AdJOgHobBfispokoqrEon9rbmKacg==} + engines: {node: '>=18'} + + detective-stylus@5.0.1: + resolution: {integrity: sha512-Dgn0bUqdGbE3oZJ+WCKf8Dmu7VWLcmRJGc6RCzBgG31DLIyai9WAoEhYRgIHpt/BCRMrnXLbGWGPQuBUrnF0TA==} + engines: {node: '>=18'} + + detective-typescript@14.0.0: + resolution: {integrity: sha512-pgN43/80MmWVSEi5LUuiVvO/0a9ss5V7fwVfrJ4QzAQRd3cwqU1SfWGXJFcNKUqoD5cS+uIovhw5t/0rSeC5Mw==} + engines: {node: '>=18'} + peerDependencies: + typescript: ^5.4.4 + + detective-vue2@2.2.0: + resolution: {integrity: sha512-sVg/t6O2z1zna8a/UIV6xL5KUa2cMTQbdTIIvqNM0NIPswp52fe43Nwmbahzj3ww4D844u/vC2PYfiGLvD3zFA==} + engines: {node: '>=18'} + peerDependencies: + typescript: ^5.4.4 + + devalue@5.1.0: + resolution: {integrity: sha512-N1MxQrdI1KmHTVfiGzEi6J2rEtrGZU1f2CELFpqjqlBwl/KgQDjPpszqySb4W3+w3YWwjt2++OExkh2r6O2VPA==} + + diff@5.2.0: + resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} + engines: {node: '>=0.3.1'} + + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + dot-prop@9.0.0: + resolution: {integrity: sha512-1gxPBJpI/pcjQhKgIU91II6Wkay+dLcN3M6rf2uwP8hRur3HtQXjVrdAK3sjC0piaEuxzMwjXChcETiJl47lAQ==} + engines: {node: '>=18'} + + dotenv@16.4.5: + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + engines: {node: '>=12'} + + dropcss@1.0.16: + resolution: {integrity: sha512-QgA6BUh2SoBYE/dSuMmeGhNdoGtGewt3Rn66xKyXoGNyjrKRXf163wuM+xeQ83p87l/3ALoB6Il1dgKyGS5pEw==} + + dts-buddy@0.6.1: + resolution: {integrity: sha512-orWBhQBo542LCSm1KS0isZ+uyB/yRVoSwcgRY+mmWZrXcbf8HrDiqUk9x1qUbiQbqdK41NSCIAHLb26eXz0z3w==} + hasBin: true + peerDependencies: + typescript: '>=5.0.4 <5.9' + + e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only: + resolution: {directory: packages/kit/test/apps/dev-only/_test_dependencies/cjs-only, type: directory} + + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + + enabled@2.0.0: + resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} + + end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + + enhanced-resolve@5.18.1: + resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==} + engines: {node: '>=10.13.0'} + + enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + env-paths@3.0.0: + resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + + esbuild@0.25.4: + resolution: {integrity: sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==} + engines: {node: '>=18'} + hasBin: true + + esbuild@0.25.5: + resolution: {integrity: sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true + + eslint-compat-utils@0.5.1: + resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} + engines: {node: '>=12'} + peerDependencies: + eslint: '>=6.0.0' + + eslint-config-prettier@9.1.0: + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + + eslint-plugin-es-x@7.8.0: + resolution: {integrity: sha512-7Ds8+wAAoV3T+LAKeu39Y5BzXCrGKrcISfgKEqTS4BDN8SFEDQd0S43jiQ8vIa3wUKD07qitZdfzlenSi8/0qQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '>=8' + + eslint-plugin-n@17.16.1: + resolution: {integrity: sha512-/7FVAwjUrix9P5lycnsYRIQRwFo/DZROD+ZXWLpE+/EZWLyuLvyFaRdAPYJSz+nlAdZIZp+LAzlBerQSVYUNFg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.23.0' + + eslint-plugin-svelte@3.9.3: + resolution: {integrity: sha512-PlcyK80sqAZ43IITeZkgl3zPFWJytx/Joup9iKGqIOsXM2m3pWfPbWuXPr5PN3loXFEypqTY/JyZwNqlSpSvRw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.1 || ^9.0.0 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + svelte: + optional: true + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.29.0: + resolution: {integrity: sha512-GsGizj2Y1rCWDu6XoEekL3RLilp0voSePurjZIkxL3wlm5o5EC9VpgaP7lrCvjnkuLvzFBQWB3vWB3K5KQTveQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + esm-env@1.2.2: + resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} + + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + esquery@1.5.0: + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + engines: {node: '>=0.10'} + + esrap@1.4.5: + resolution: {integrity: sha512-CjNMjkBWWZeHn+VX+gS8YvFwJ5+NDhg8aWZBSFJPR8qQduDNjbJodA2WcwCm7uQa5Rjqj+nZvVmceg1RbHFB9g==} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + + events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + + exit-hook@2.2.1: + resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==} + engines: {node: '>=6'} + + expect-type@1.2.1: + resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} + engines: {node: '>=12.0.0'} + + exsolve@1.0.4: + resolution: {integrity: sha512-xsZH6PXaER4XoV+NiT7JHp1bJodJVT+cxeSH1G0f0tlT0lJqYuHUP3bUx2HtfTDvOagMINYp8rsqusxud3RXhw==} + + extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + + external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + + extract-zip@2.0.1: + resolution: {integrity: sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==} + engines: {node: '>= 10.17.0'} + hasBin: true + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-fifo@1.3.2: + resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} + + fast-glob@3.3.3: + resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} + engines: {node: '>=8.6.0'} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + + fd-slicer@1.1.0: + resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + + fdir@6.4.6: + resolution: {integrity: sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fecha@4.2.3: + resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} + + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + file-uri-to-path@1.0.0: + resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} + + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + + filter-obj@6.1.0: + resolution: {integrity: sha512-xdMtCAODmPloU9qtmPcdBV9Kd27NtMse+4ayThxqIHUES5Z2S6bGpap5PpdmNM56ub7y3i1eyr+vJJIIgWGKmA==} + engines: {node: '>=18'} + + find-up-simple@1.0.1: + resolution: {integrity: sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==} + engines: {node: '>=18'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + find-up@7.0.0: + resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} + engines: {node: '>=18'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + + fn.name@1.1.0: + resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==} + + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + + fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-amd-module-type@6.0.1: + resolution: {integrity: sha512-MtjsmYiCXcYDDrGqtNbeIYdAl85n+5mSv2r3FbzER/YV3ZILw4HNNIw34HuV5pyl0jzs6GFYU1VHVEefhgcNHQ==} + engines: {node: '>=18'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-port@5.1.1: + resolution: {integrity: sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==} + engines: {node: '>=8'} + + get-source@2.0.12: + resolution: {integrity: sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==} + + get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + + get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + + get-tsconfig@4.10.0: + resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} + + glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob-to-regexp@0.4.1: + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} + + glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + globals@15.15.0: + resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} + engines: {node: '>=18'} + + globals@16.2.0: + resolution: {integrity: sha512-O+7l9tPdHCU320IigZZPj5zmRCFG9xHmx9cU8FqU2Rp+JN714seHV+2S9+JslCpY4gJwU2vOGox0wzgae/MCEg==} + engines: {node: '>=18'} + + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + + gonzales-pe@4.3.0: + resolution: {integrity: sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==} + engines: {node: '>=0.6.0'} + hasBin: true + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + + hosted-git-info@7.0.2: + resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} + engines: {node: ^16.14.0 || >=18.0.0} + + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + + human-id@4.1.1: + resolution: {integrity: sha512-3gKm/gCSUipeLsRYZbbdA1BD83lBoWUkZ7G9VFrhWPAU76KwYo5KR8V28bpoPm/ygy0x5/GCbpRQdY7VLYCoIg==} + hasBin: true + + human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + + iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + ignore@7.0.5: + resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} + engines: {node: '>= 4'} + + image-size@2.0.2: + resolution: {integrity: sha512-IRqXKlaXwgSMAMtpNzZa1ZAe8m+Sa1770Dhk8VkSsP9LS+iHD62Zd8FQKs8fbPiagBE7BzoFX23cxFnwshpV6w==} + engines: {node: '>=16.x'} + hasBin: true + + imagetools-core@7.1.0: + resolution: {integrity: sha512-8Aa4NecBBGmTkaAUjcuRYgTPKHCsBEWYmCnvKCL6/bxedehtVVFyZPdXe8DD0Nevd6UWBq85ifUaJ8498lgqNQ==} + engines: {node: '>=18.0.0'} + + import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + index-to-position@1.1.0: + resolution: {integrity: sha512-XPdx9Dq4t9Qk1mTMbWONJqU7boCoumEH7fRET37HX5+khDUl3J2W6PdALxhILYlIYx2amlwYcRPp28p0tSiojg==} + engines: {node: '>=18'} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + is-arrayish@0.3.2: + resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + + is-builtin-module@3.2.1: + resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} + engines: {node: '>=6'} + + is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-module@1.0.0: + resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + + is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + + is-path-inside@4.0.0: + resolution: {integrity: sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==} + engines: {node: '>=12'} + + is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + + is-reference@1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + + is-reference@3.0.3: + resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} + + is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + + is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + is-stream@4.0.1: + resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} + engines: {node: '>=18'} + + is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + + is-url-superb@4.0.0: + resolution: {integrity: sha512-GI+WjezhPPcbM+tqE9LnmsY5qqjwHzTvjJ36wxYX5ujNXefSUJ/T17r5bqDV8yLhcgB59KTPNOc9O9cmHTPWsA==} + engines: {node: '>=10'} + + is-url@1.2.4: + resolution: {integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==} + + is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + + isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + jpeg-js@0.4.4: + resolution: {integrity: sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==} + + js-image-generator@1.0.4: + resolution: {integrity: sha512-ckb7kyVojGAnArouVR+5lBIuwU1fcrn7E/YYSd0FK7oIngAkMmRvHASLro9Zt5SQdWToaI66NybG+OGxPw/HlQ==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + + js-yaml@3.14.1: + resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + hasBin: true + + js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + + junk@4.0.1: + resolution: {integrity: sha512-Qush0uP+G8ZScpGMZvHUiRfI0YBWuB3gVBYlI0v0vvOJt5FLicco+IkP0a50LqTTQhmts/m6tP5SWE+USyIvcQ==} + engines: {node: '>=12.20'} + + jwt-decode@4.0.0: + resolution: {integrity: sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==} + engines: {node: '>=18'} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + kleur@4.1.5: + resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} + engines: {node: '>=6'} + + known-css-properties@0.37.0: + resolution: {integrity: sha512-JCDrsP4Z1Sb9JwG0aJ8Eo2r7k4Ou5MwmThS/6lcIe1ICyb7UBJKGRIUUdqc2ASdE/42lgz6zFUnzAIhtXnBVrQ==} + + kuler@2.0.0: + resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} + + lambda-local@2.2.0: + resolution: {integrity: sha512-bPcgpIXbHnVGfI/omZIlgucDqlf4LrsunwoKue5JdZeGybt8L6KyJz2Zu19ffuZwIwLj2NAI2ZyaqNT6/cetcg==} + engines: {node: '>=8'} + hasBin: true + + lazystream@1.0.1: + resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} + engines: {node: '>= 0.6.3'} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lightningcss-darwin-arm64@1.30.1: + resolution: {integrity: sha512-c8JK7hyE65X1MHMN+Viq9n11RRC7hgin3HhYKhrMyaXflk5GVplZ60IxyoVtzILeKr+xAJwg6zK6sjTBJ0FKYQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.30.1: + resolution: {integrity: sha512-k1EvjakfumAQoTfcXUcHQZhSpLlkAuEkdMBsI/ivWw9hL+7FtilQc0Cy3hrx0AAQrVtQAbMI7YjCgYgvn37PzA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.30.1: + resolution: {integrity: sha512-kmW6UGCGg2PcyUE59K5r0kWfKPAVy4SltVeut+umLCFoJ53RdCUWxcRDzO1eTaxf/7Q2H7LTquFHPL5R+Gjyig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.30.1: + resolution: {integrity: sha512-MjxUShl1v8pit+6D/zSPq9S9dQ2NPFSQwGvxBCYaBYLPlCWuPh9/t1MRS8iUaR8i+a6w7aps+B4N0S1TYP/R+Q==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.30.1: + resolution: {integrity: sha512-gB72maP8rmrKsnKYy8XUuXi/4OctJiuQjcuqWNlJQ6jZiWqtPvqFziskH3hnajfvKB27ynbVCucKSm2rkQp4Bw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-arm64-musl@1.30.1: + resolution: {integrity: sha512-jmUQVx4331m6LIX+0wUhBbmMX7TCfjF5FoOH6SD1CttzuYlGNVpA7QnrmLxrsub43ClTINfGSYyHe2HWeLl5CQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + + lightningcss-linux-x64-gnu@1.30.1: + resolution: {integrity: sha512-piWx3z4wN8J8z3+O5kO74+yr6ze/dKmPnI7vLqfSqI8bccaTGY5xiSGVIJBDd5K5BHlvVLpUB3S2YCfelyJ1bw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-linux-x64-musl@1.30.1: + resolution: {integrity: sha512-rRomAK7eIkL+tHY0YPxbc5Dra2gXlI63HL+v1Pdi1a3sC+tJTcFrHX+E86sulgAXeI7rSzDYhPSeHHjqFhqfeQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + + lightningcss-win32-arm64-msvc@1.30.1: + resolution: {integrity: sha512-mSL4rqPi4iXq5YVqzSsJgMVFENoa4nGTT/GjO2c0Yl9OuQfPsIfncvLrEW6RbbB24WtZ3xP/2CCmI3tNkNV4oA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.30.1: + resolution: {integrity: sha512-PVqXh48wh4T53F/1CCu8PIPCxLzWyCnn/9T5W1Jpmdy5h9Cwd+0YQS6/LwhHXSafuc61/xg9Lv5OrCby6a++jg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.30.1: + resolution: {integrity: sha512-xi6IyHML+c9+Q3W0S4fCQJOym42pyurFiJUHEcEyHS0CeKzia4yZDEsLlqOFykxOdHpNy0NmvVO31vcSqAxJCg==} + engines: {node: '>= 12.0.0'} + + lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + + local-access@1.1.0: + resolution: {integrity: sha512-XfegD5pyTAfb+GY6chk283Ox5z8WexG56OvM06RWLpAc/UHozO8X6xAxEkIitZOtsSMM1Yr3DkHgW5W+onLhCw==} + engines: {node: '>=6'} + + locate-character@3.0.0: + resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + locate-path@7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + lodash.debounce@4.0.8: + resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + logform@2.7.0: + resolution: {integrity: sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==} + engines: {node: '>= 12.0.0'} + + loupe@3.1.3: + resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==} + + lower-case@2.0.2: + resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + + luxon@3.6.1: + resolution: {integrity: sha512-tJLxrKJhO2ukZ5z0gyjY1zPh3Rh88Ej9P7jNrZiHMUXHae1yvI2imgOZtL1TO8TW6biMMKfTtAOoEJANgtWBMQ==} + engines: {node: '>=12'} + + magic-string@0.30.17: + resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + + merge-options@3.0.4: + resolution: {integrity: sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==} + engines: {node: '>=10'} + + merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + + merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime@3.0.0: + resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} + engines: {node: '>=10.0.0'} + hasBin: true + + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + + miniflare@4.20250507.0: + resolution: {integrity: sha512-EgbQRt/Hnr8HCmW2J/4LRNE3yOzJTdNd98XJ8gnGXFKcimXxUFPiWP3k1df+ZPCtEHp6cXxi8+jP7v9vuIbIsg==} + engines: {node: '>=18.0.0'} + hasBin: true + + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + + minizlib@3.0.2: + resolution: {integrity: sha512-oG62iEk+CYt5Xj2YqI5Xi9xWUeZhDI8jjQmC5oThVH5JGCTgIjr7ciJDzC7MBzYd//WvR1OTmP5Q38Q8ShQtVA==} + engines: {node: '>= 18'} + + mkdirp@3.0.1: + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} + engines: {node: '>=10'} + hasBin: true + + module-definition@6.0.1: + resolution: {integrity: sha512-FeVc50FTfVVQnolk/WQT8MX+2WVcDnTGiq6Wo+/+lJ2ET1bRVi3HG3YlJUfqagNMc/kUlFSoR96AJkxGpKz13g==} + engines: {node: '>=18'} + hasBin: true + + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + + mrmime@2.0.0: + resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} + engines: {node: '>=10'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + mustache@4.2.0: + resolution: {integrity: sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==} + hasBin: true + + nanoid@3.3.11: + resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + no-case@3.0.4: + resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + node-gyp-build@4.8.0: + resolution: {integrity: sha512-u6fs2AEUljNho3EYTJNBfImO5QTo/J/1Etd+NVdCj7qWKUSN/bSLkZwhDv7I+w/MSC6qJ4cknepkAYykDdK8og==} + hasBin: true + + node-source-walk@7.0.1: + resolution: {integrity: sha512-3VW/8JpPqPvnJvseXowjZcirPisssnBuDikk6JIZ8jQzF7KJQX52iPFX4RYYxLycYH7IbMRSPUOga/esVjy5Yg==} + engines: {node: '>=18'} + + nopt@8.0.0: + resolution: {integrity: sha512-1L/fTJ4UmV/lUxT2Uf006pfZKTvAgCF+chz+0OgBHO8u2Z67pE7AaAUUj7CJy0lXqHmymUvGFt6NE9R3HER0yw==} + engines: {node: ^18.17.0 || >=20.5.0} + hasBin: true + + normalize-package-data@6.0.2: + resolution: {integrity: sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==} + engines: {node: ^16.14.0 || >=18.0.0} + + normalize-path@2.1.1: + resolution: {integrity: sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==} + engines: {node: '>=0.10.0'} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + ohash@2.0.11: + resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + one-time@1.0.0: + resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==} + + onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + + optionator@0.9.3: + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + engines: {node: '>= 0.8.0'} + + os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + + outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + + p-event@6.0.1: + resolution: {integrity: sha512-Q6Bekk5wpzW5qIyUP4gdMEujObYstZl6DMMOSenwBvV0BlE5LkDwkjs5yHbZmdCEq2o4RJx4tE1vwxFVf2FG1w==} + engines: {node: '>=16.17'} + + p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + + p-map@7.0.3: + resolution: {integrity: sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==} + engines: {node: '>=18'} + + p-timeout@6.1.4: + resolution: {integrity: sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==} + engines: {node: '>=14.16'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + package-manager-detector@0.2.8: + resolution: {integrity: sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parse-gitignore@2.0.0: + resolution: {integrity: sha512-RmVuCHWsfu0QPNW+mraxh/xjQVw/lhUCUru8Zni3Ctq3AoMhpDTq0OVdKS6iesd6Kqb7viCV3isAL43dciOSog==} + engines: {node: '>=14'} + + parse-json@8.3.0: + resolution: {integrity: sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==} + engines: {node: '>=18'} + + pascal-case@3.1.2: + resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-exists@5.0.0: + resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + + path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + + path-to-regexp@6.3.0: + resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==} + + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + + pend@1.2.0: + resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + + playwright-core@1.51.1: + resolution: {integrity: sha512-/crRMj8+j/Nq5s8QcvegseuyeZPxpQCZb6HNk3Sos3BlZyAknRjoyJPFWkpNn8v0+P3WiwqFF8P+zQo4eqiNuw==} + engines: {node: '>=18'} + hasBin: true + + playwright@1.51.1: + resolution: {integrity: sha512-kkx+MB2KQRkyxjYPc3a0wLZZoDczmppyGJIvQ43l+aZihkaVvmu/21kiyaHeHjiFxjxNNFnUncKmcGIyOojsaw==} + engines: {node: '>=18'} + hasBin: true + + polka@1.0.0-next.28: + resolution: {integrity: sha512-ryc8D/B5E/YnlWHkNMnRvNntPc4GwU1/+iDBjiXVz1SUjDRqlxYX5Ic0IaDLA/cQ+g7/x+jUzEjv2K16u1J+wA==} + engines: {node: '>=8'} + + postcss-load-config@3.1.4: + resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} + engines: {node: '>= 10'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + + postcss-safe-parser@7.0.1: + resolution: {integrity: sha512-0AioNCJZ2DPYz5ABT6bddIqlhgwhpHZ/l65YAYo0BCIn0xiDpsnTHz0gnoTGk0OXZW0JRs+cDwL8u/teRdz+8A==} + engines: {node: '>=18.0'} + peerDependencies: + postcss: ^8.4.31 + + postcss-scss@4.0.9: + resolution: {integrity: sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.4.29 + + postcss-selector-parser@7.1.0: + resolution: {integrity: sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==} + engines: {node: '>=4'} + + postcss-values-parser@6.0.2: + resolution: {integrity: sha512-YLJpK0N1brcNJrs9WatuJFtHaV9q5aAOj+S4DI5S7jgHlRfm0PIbDCAFRYMQD5SHq7Fy6xsDhyutgS0QOAs0qw==} + engines: {node: '>=10'} + peerDependencies: + postcss: ^8.2.9 + + postcss@8.5.6: + resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} + engines: {node: ^10 || ^12 || >=14} + + precinct@12.2.0: + resolution: {integrity: sha512-NFBMuwIfaJ4SocE9YXPU/n4AcNSoFMVFjP72nvl3cx69j/ke61/hPOWFREVxLkFhhEGnA8ZuVfTqJBa+PK3b5w==} + engines: {node: '>=18'} + hasBin: true + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier-plugin-svelte@3.2.7: + resolution: {integrity: sha512-/Dswx/ea0lV34If1eDcG3nulQ63YNr5KPDfMsjbdtpSWOxKKJ7nAc2qlVuYwEvCr4raIuredNoR7K4JCkmTGaQ==} + peerDependencies: + prettier: ^3.0.0 + svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 + + prettier-plugin-svelte@3.4.0: + resolution: {integrity: sha512-pn1ra/0mPObzqoIQn/vUTR3ZZI6UuZ0sHqMK5x2jMLGrs53h0sXhkVuDcrlssHwIMk7FYrMjHBPoUSyyEEDlBQ==} + peerDependencies: + prettier: ^3.0.0 + svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 + + prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} + hasBin: true + + prettier@3.6.0: + resolution: {integrity: sha512-ujSB9uXHJKzM/2GBuE0hBOUgC77CN3Bnpqa+g80bkv3T3A93wL/xlzDATHhnhkzifz/UE2SNOvmbTz5hSkDlHw==} + engines: {node: '>=14'} + hasBin: true + + printable-characters@1.0.42: + resolution: {integrity: sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==} + + process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + + process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + + publint@0.3.0: + resolution: {integrity: sha512-B7efom03c86OGqN1Jp2mDduiamb5apEuolvlbUeHaa14geCzJKz35oPIiKoXPMvM3tGABEZ1oLfY6xJNvOh69g==} + engines: {node: '>=18'} + hasBin: true + + pump@3.0.2: + resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + + quote-unquote@1.0.0: + resolution: {integrity: sha512-twwRO/ilhlG/FIgYeKGFqyHhoEhqgnKVkcmqMKi2r524gz3ZbDTcyFt38E9xjJI2vT+KbRNHVbnJ/e0I25Azwg==} + + read-package-up@11.0.0: + resolution: {integrity: sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ==} + engines: {node: '>=18'} + + read-pkg@9.0.1: + resolution: {integrity: sha512-9viLL4/n1BJUCT1NXVTdS1jtm80yDEgR5T4yCelII49Mbj0v1rZdKqj7zCiYdbB0CuCgdrvHcNogAKTFPBocFA==} + engines: {node: '>=18'} + + read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} + + readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + + readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + + readable-stream@4.7.0: + resolution: {integrity: sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + readdir-glob@1.1.3: + resolution: {integrity: sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==} + + readdirp@4.0.1: + resolution: {integrity: sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==} + engines: {node: '>= 14.16.0'} + + redirect-pkg@file:packages/kit/test/apps/basics/_test_dependencies/redirect-pkg: + resolution: {directory: packages/kit/test/apps/basics/_test_dependencies/redirect-pkg, type: directory} + peerDependencies: + '@sveltejs/kit': workspace:* + + regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + + regexparam@3.0.0: + resolution: {integrity: sha512-RSYAtP31mvYLkAHrOlh25pCNQ5hWnT106VukGaaFfuJrZFkGRX5GhUAdPqpSDXxOhA2c4akmRuplv1mRqnBn6Q==} + engines: {node: '>=8'} + + remove-trailing-separator@1.1.0: + resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-package-name@2.0.1: + resolution: {integrity: sha512-uuoJ1hU/k6M0779t3VMVIYpb2VMJk05cehCaABFhXaibcbvfgR8wKiozLjVFSzJPmQMRqIcO0HMyTFqfV09V6Q==} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + + resolve@2.0.0-next.5: + resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} + hasBin: true + + reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + + rollup@4.40.1: + resolution: {integrity: sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + + sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safe-stable-stringify@2.5.0: + resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} + engines: {node: '>=10'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + semiver@1.1.0: + resolution: {integrity: sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg==} + engines: {node: '>=6'} + + semver@7.7.1: + resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} + engines: {node: '>=10'} + hasBin: true + + server-side-dep@file:packages/adapter-cloudflare/test/apps/pages/server-side-dep: + resolution: {directory: packages/adapter-cloudflare/test/apps/pages/server-side-dep, type: directory} + + server-side-dep@file:packages/adapter-cloudflare/test/apps/workers/server-side-dep: + resolution: {directory: packages/adapter-cloudflare/test/apps/workers/server-side-dep, type: directory} + + set-cookie-parser@2.6.0: + resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} + + sharp@0.33.5: + resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + + sharp@0.34.1: + resolution: {integrity: sha512-1j0w61+eVxu7DawFJtnfYcvSv6qPFvfTaqzTQ2BLknVhHTwGS8sc63ZBF4rzkWMBVKybo4S5OBtDdZahh2A1xg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + simple-swizzle@0.2.2: + resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + + sirv-cli@3.0.0: + resolution: {integrity: sha512-p88yHl8DmTOUJroRiW2o9ezJc/YRLxphBydX2NGQc3naKBA09B3EM4Q/yaN8FYF0e50fRSZP7dyatr72b1u5Jw==} + engines: {node: '>=18'} + hasBin: true + + sirv@3.0.0: + resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} + engines: {node: '>=18'} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + spawndamnit@3.0.1: + resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} + + spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + + spdx-exceptions@2.5.0: + resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} + + spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + + spdx-license-ids@3.0.21: + resolution: {integrity: sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + + stack-trace@0.0.10: + resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + stacktracey@2.1.8: + resolution: {integrity: sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==} + + std-env@3.9.0: + resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} + + stoppable@1.1.0: + resolution: {integrity: sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==} + engines: {node: '>=4', npm: '>=6'} + + streamx@2.22.1: + resolution: {integrity: sha512-znKXEBxfatz2GBNK02kRnCXjV+AA4kjZIUxeWSr3UGirZMJfTE9uiwKHobnbgxWyL/JWro8tTq+vOqAK1/qbSA==} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + + string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + + strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + strip-literal@3.0.0: + resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + + svelte-check@4.1.1: + resolution: {integrity: sha512-NfaX+6Qtc8W/CyVGS/F7/XdiSSyXz+WGYA9ZWV3z8tso14V2vzjfXviKaTFEzB7g8TqfgO2FOzP6XT4ApSTUTw==} + engines: {node: '>= 18.0.0'} + hasBin: true + peerDependencies: + svelte: ^4.0.0 || ^5.0.0-next.0 + typescript: '>=5.0.0' + + svelte-eslint-parser@1.2.0: + resolution: {integrity: sha512-mbPtajIeuiyU80BEyGvwAktBeTX7KCr5/0l+uRGLq1dafwRNrjfM5kHGJScEBlPG3ipu6dJqfW/k0/fujvIEVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + svelte: + optional: true + + svelte-parse-markup@0.1.5: + resolution: {integrity: sha512-T6mqZrySltPCDwfKXWQ6zehipVLk4GWfH1zCMGgRtLlOIFPuw58ZxVYxVvotMJgJaurKi1i14viB2GIRKXeJTQ==} + peerDependencies: + svelte: ^3.0.0 || ^4.0.0 || ^5.0.0-next.1 + + svelte-preprocess@6.0.0: + resolution: {integrity: sha512-sbyHnWBwIphuaJWC7hnJd6ZoW/VN0va3jVb/8dDfeT2+0hVmo1DCx+zBK0/JfUKQmzg/FOEtcsGKRnbt8pRRkw==} + engines: {node: '>= 18.0.0'} + peerDependencies: + '@babel/core': ^7.10.2 + coffeescript: ^2.5.1 + less: ^3.11.3 || ^4.0.0 + postcss: ^7 || ^8 + postcss-load-config: '>=3' + pug: ^3.0.0 + sass: ^1.26.8 + stylus: '>=0.55' + sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0 + svelte: ^4.0.0 || ^5.0.0-next.100 || ^5.0.0 + typescript: ^5.0.0 + peerDependenciesMeta: + '@babel/core': + optional: true + coffeescript: + optional: true + less: + optional: true + postcss: + optional: true + postcss-load-config: + optional: true + pug: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + typescript: + optional: true + + svelte2tsx@0.7.33: + resolution: {integrity: sha512-geogGkzfciwteiKvlbaDBnKOitWuh6e1n2f5KLBBXEfZgui9gy5yRlOBYtNEkdwciO4MC9fTM/EyltsiQrOPNQ==} + peerDependencies: + svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 + typescript: ^4.9.4 || ^5.0.0 + + svelte@5.23.1: + resolution: {integrity: sha512-DUu3e5tQDO+PtKffjqJ548YfeKtw2Rqc9/+nlP26DZ0AopWTJNylkNnTOP/wcgIt1JSnovyISxEZ/lDR1OhbOw==} + engines: {node: '>=18'} + + tapable@2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} + + tar-stream@3.1.7: + resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} + + tar@7.4.3: + resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} + engines: {node: '>=18'} + + term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + + text-decoder@1.2.3: + resolution: {integrity: sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==} + + text-hex@1.0.0: + resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinydate@1.3.0: + resolution: {integrity: sha512-7cR8rLy2QhYHpsBDBVYnnWXm8uRTr38RoZakFSW7Bs7PzfMPNZthuMLkwqZv7MTu8lhQ91cOFYS5a7iFj2oR3w==} + engines: {node: '>=4'} + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinyglobby@0.2.14: + resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} + engines: {node: '>=12.0.0'} + + tinypool@1.1.0: + resolution: {integrity: sha512-7CotroY9a8DKsKprEy/a14aCCm8jYVmR7aFy4fpkZM8sdpNJbKkixuNjgM50yCmip2ezc8z4N7k3oe2+rfRJCQ==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@2.0.0: + resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} + engines: {node: '>=14.0.0'} + + tinyspy@4.0.3: + resolution: {integrity: sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==} + engines: {node: '>=14.0.0'} + + tmp-promise@3.0.3: + resolution: {integrity: sha512-RwM7MoPojPxsOBYnyd2hy0bxtIlVrihNs9pj5SUvY8Zz1sQcQG2tG1hSr8PDxfgEB8RNKDhqbIlroIarSNDNsQ==} + + tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + + tmp@0.2.3: + resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} + engines: {node: '>=14.14'} + + to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + + toml@3.0.0: + resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} + + totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + triple-beam@1.4.1: + resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==} + engines: {node: '>= 14.0.0'} + + trouter@4.0.0: + resolution: {integrity: sha512-bwwr76BThfiVwAFZqks5cJ+VoKNM3/2Yg1ZwJslkdmAUQ6S0UNoCoGYFDxdw+u1skfexggdmD2p35kW5Td4Cug==} + engines: {node: '>=6'} + + ts-api-utils@1.3.0: + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + + ts-api-utils@2.1.0: + resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + ts-declaration-location@1.0.7: + resolution: {integrity: sha512-EDyGAwH1gO0Ausm9gV6T2nUvBgXT5kGoCMJPllOaooZ+4VvJiKBdZE7wK18N1deEowhcUptS+5GXZK8U/fvpwA==} + peerDependencies: + typescript: '>=4.0.0' + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-fest@4.41.0: + resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} + engines: {node: '>=16'} + + typescript-eslint@8.35.0: + resolution: {integrity: sha512-uEnz70b7kBz6eg/j0Czy6K5NivaYopgxRjsnAJ2Fx5oTLo3wefTHIbL7AkQr1+7tJCRVpTs/wiM8JR/11Loq9A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + + typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@5.8.3: + resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + engines: {node: '>=14.17'} + hasBin: true + + ufo@1.6.1: + resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} + + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + + undici@5.29.0: + resolution: {integrity: sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==} + engines: {node: '>=14.0'} + + unenv@2.0.0-rc.15: + resolution: {integrity: sha512-J/rEIZU8w6FOfLNz/hNKsnY+fFHWnu9MH4yRbSZF3xbbGHovcetXPs7sD+9p8L6CeNC//I9bhRYAOsBt2u7/OA==} + + unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + + unixify@1.0.0: + resolution: {integrity: sha512-6bc58dPYhCMHHuwxldQxO3RRNZ4eCogZ/st++0+fcC1nr0jiGUtAdBJ2qzmLQWSxbtz42pWt4QQMiZ9HvZf5cg==} + engines: {node: '>=0.10.0'} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + urlpattern-polyfill@10.1.0: + resolution: {integrity: sha512-IGjKp/o0NL3Bso1PymYURCJxMPNAf/ILOpendP9f5B6e1rTJgdgiOvgfoT8VxCAdY+Wisb9uhGaJJf3yZ2V9nw==} + + urlpattern-polyfill@8.0.2: + resolution: {integrity: sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + uuid@11.1.0: + resolution: {integrity: sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==} + hasBin: true + + uvu@0.5.6: + resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} + engines: {node: '>=8'} + hasBin: true + + validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + + vite-imagetools@7.1.0: + resolution: {integrity: sha512-Mqh1uUY2DEMuBOogFz5Rd7cAs70VP6wsdQh2IShrJ+qGk5f7yQa4pN8w0YMLlGIKYW1JfM8oXrznUwVkhG+qxg==} + engines: {node: '>=18.0.0'} + + vite-node@3.2.3: + resolution: {integrity: sha512-gc8aAifGuDIpZHrPjuHyP4dpQmYXqWw7D1GmDnWeNWP654UEXzVfQ5IHPSK5HaHkwB/+p1atpYpSdw/2kOv8iQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + + vite@6.3.5: + resolution: {integrity: sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: '>=1.21.0' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitefu@1.0.6: + resolution: {integrity: sha512-+Rex1GlappUyNN6UfwbVZne/9cYC4+R2XDk9xkNXBKMw6HQagdX9PgZ8V2v1WUSK1wfBLp7qbI1+XSNIlB1xmA==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 + peerDependenciesMeta: + vite: + optional: true + + vitest@3.2.3: + resolution: {integrity: sha512-E6U2ZFXe3N/t4f5BwUaVCKRLHqUpk1CBWeMh78UT4VaTPH/2dyvH6ALl29JTovEPu9dVKr/K/J4PkXgrMbw4Ww==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/debug': ^4.1.12 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@vitest/browser': 3.2.3 + '@vitest/ui': 3.2.3 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/debug': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + winston-transport@4.9.0: + resolution: {integrity: sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==} + engines: {node: '>= 12.0.0'} + + winston@3.17.0: + resolution: {integrity: sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==} + engines: {node: '>= 12.0.0'} + + workerd@1.20250507.0: + resolution: {integrity: sha512-OXaGjEh5THT9iblwWIyPrYBoaPe/d4zN03Go7/w8CmS8sma7//O9hjbk43sboWkc89taGPmU0/LNyZUUiUlHeQ==} + engines: {node: '>=16'} + hasBin: true + + worktop@0.8.0-next.18: + resolution: {integrity: sha512-+TvsA6VAVoMC3XDKR5MoC/qlLqDixEfOBysDEKnPIPou/NvoPWCAuXHXMsswwlvmEuvX56lQjvELLyLuzTKvRw==} + engines: {node: '>=12'} + + wrangler@4.14.4: + resolution: {integrity: sha512-HIdOdiMIcJV5ymw80RKsr3Uzen/p1kRX4jnCEmR2XVeoEhV2Qw6GABxS5WMTlSES2/vEX0Y+ezUAdsprcUhJ5g==} + engines: {node: '>=18.0.0'} + hasBin: true + peerDependencies: + '@cloudflare/workers-types': ^4.20250507.0 + peerDependenciesMeta: + '@cloudflare/workers-types': + optional: true + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + write-file-atomic@5.0.1: + resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@5.0.0: + resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} + engines: {node: '>=18'} + + yaml@1.10.2: + resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} + engines: {node: '>= 6'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + + yauzl@2.10.0: + resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + yocto-queue@1.2.1: + resolution: {integrity: sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==} + engines: {node: '>=12.20'} + + youch@3.3.4: + resolution: {integrity: sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==} + + zimmerframe@1.1.2: + resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==} + + zip-stream@6.0.1: + resolution: {integrity: sha512-zK7YHHz4ZXpW89AHXUPbQVGKI7uvkd3hzusTdotCg1UxyaVtg0zFJSTfW/Dq5f7OBBVnq6cZIaC8Ti4hb6dtCA==} + engines: {node: '>= 14'} + + zod@3.22.3: + resolution: {integrity: sha512-EjIevzuJRiRPbVH4mGc8nApb/lVLKVpmUhAaR5R5doKGfAnGJ6Gr3CViAVjP+4FWSxCsybeWQdcgCtbX+7oZug==} + + zod@3.25.56: + resolution: {integrity: sha512-rd6eEF3BTNvQnR2e2wwolfTmUTnp70aUTqr0oaGbHifzC3BKJsoV+Gat8vxUMR1hwOKBs6El+qWehrHbCpW6SQ==} + +snapshots: + + '@aashutoshrathi/word-wrap@1.2.6': {} + + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 + + '@babel/code-frame@7.27.1': + dependencies: + '@babel/helper-validator-identifier': 7.27.1 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/helper-string-parser@7.27.1': {} + + '@babel/helper-validator-identifier@7.27.1': {} + + '@babel/parser@7.27.5': + dependencies: + '@babel/types': 7.27.6 + + '@babel/runtime@7.26.10': + dependencies: + regenerator-runtime: 0.14.1 + + '@babel/types@7.27.6': + dependencies: + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.27.1 + + '@changesets/apply-release-plan@7.0.12': + dependencies: + '@changesets/config': 3.1.1 + '@changesets/get-version-range-type': 0.4.0 + '@changesets/git': 3.0.4 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + detect-indent: 6.1.0 + fs-extra: 7.0.1 + lodash.startcase: 4.4.0 + outdent: 0.5.0 + prettier: 2.8.8 + resolve-from: 5.0.0 + semver: 7.7.1 + + '@changesets/assemble-release-plan@6.0.9': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + semver: 7.7.1 + + '@changesets/changelog-git@0.2.1': + dependencies: + '@changesets/types': 6.1.0 + + '@changesets/cli@2.29.5': + dependencies: + '@changesets/apply-release-plan': 7.0.12 + '@changesets/assemble-release-plan': 6.0.9 + '@changesets/changelog-git': 0.2.1 + '@changesets/config': 3.1.1 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/get-release-plan': 4.0.13 + '@changesets/git': 3.0.4 + '@changesets/logger': 0.1.1 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.5 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@changesets/write': 0.4.0 + '@manypkg/get-packages': 1.1.3 + ansi-colors: 4.1.3 + ci-info: 3.9.0 + enquirer: 2.4.1 + external-editor: 3.1.0 + fs-extra: 7.0.1 + mri: 1.2.0 + p-limit: 2.3.0 + package-manager-detector: 0.2.8 + picocolors: 1.1.1 + resolve-from: 5.0.0 + semver: 7.7.1 + spawndamnit: 3.0.1 + term-size: 2.2.1 + + '@changesets/config@3.1.1': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.3 + '@changesets/logger': 0.1.1 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.8 + + '@changesets/errors@0.2.0': + dependencies: + extendable-error: 0.1.7 + + '@changesets/get-dependents-graph@2.1.3': dependencies: - '@typescript-eslint/scope-manager': 6.8.0 - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/typescript-estree': 6.8.0(typescript@4.9.4) - '@typescript-eslint/visitor-keys': 6.8.0 - debug: 4.3.4 - eslint: 8.45.0 - typescript: 4.9.4 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + picocolors: 1.1.1 + semver: 7.7.1 + + '@changesets/get-github-info@0.6.0': + dependencies: + dataloader: 1.4.0 + node-fetch: 2.7.0 transitivePeerDependencies: - - supports-color - dev: true + - encoding + + '@changesets/get-release-plan@4.0.13': + dependencies: + '@changesets/assemble-release-plan': 6.0.9 + '@changesets/config': 3.1.1 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.5 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/get-version-range-type@0.4.0': {} + + '@changesets/git@3.0.4': + dependencies: + '@changesets/errors': 0.2.0 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + micromatch: 4.0.8 + spawndamnit: 3.0.1 + + '@changesets/logger@0.1.1': + dependencies: + picocolors: 1.1.1 + + '@changesets/parse@0.4.1': + dependencies: + '@changesets/types': 6.1.0 + js-yaml: 3.14.1 + + '@changesets/pre@2.0.2': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + + '@changesets/read@0.6.5': + dependencies: + '@changesets/git': 3.0.4 + '@changesets/logger': 0.1.1 + '@changesets/parse': 0.4.1 + '@changesets/types': 6.1.0 + fs-extra: 7.0.1 + p-filter: 2.1.0 + picocolors: 1.1.1 + + '@changesets/should-skip-package@0.1.2': + dependencies: + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/types@4.1.0': {} + + '@changesets/types@6.1.0': {} + + '@changesets/write@0.4.0': + dependencies: + '@changesets/types': 6.1.0 + fs-extra: 7.0.1 + human-id: 4.1.1 + prettier: 2.8.8 + + '@cloudflare/kv-asset-handler@0.4.0': + dependencies: + mime: 3.0.0 + + '@cloudflare/unenv-preset@2.3.1(unenv@2.0.0-rc.15)(workerd@1.20250507.0)': + dependencies: + unenv: 2.0.0-rc.15 + optionalDependencies: + workerd: 1.20250507.0 + + '@cloudflare/workerd-darwin-64@1.20250507.0': + optional: true + + '@cloudflare/workerd-darwin-arm64@1.20250507.0': + optional: true + + '@cloudflare/workerd-linux-64@1.20250507.0': + optional: true + + '@cloudflare/workerd-linux-arm64@1.20250507.0': + optional: true + + '@cloudflare/workerd-windows-64@1.20250507.0': + optional: true + + '@cloudflare/workers-types@4.20250508.0': {} + + '@colors/colors@1.6.0': {} + + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@dabh/diagnostics@2.0.3': + dependencies: + colorspace: 1.1.4 + enabled: 2.0.0 + kuler: 2.0.0 + + '@dependents/detective-less@5.0.1': + dependencies: + gonzales-pe: 4.3.0 + node-source-walk: 7.0.1 + + '@emnapi/runtime@1.4.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@envelop/instrumentation@1.0.0': + dependencies: + '@whatwg-node/promise-helpers': 1.3.2 + tslib: 2.8.1 + + '@esbuild/aix-ppc64@0.25.4': + optional: true + + '@esbuild/aix-ppc64@0.25.5': + optional: true + + '@esbuild/android-arm64@0.25.4': + optional: true + + '@esbuild/android-arm64@0.25.5': + optional: true + + '@esbuild/android-arm@0.25.4': + optional: true + + '@esbuild/android-arm@0.25.5': + optional: true + + '@esbuild/android-x64@0.25.4': + optional: true + + '@esbuild/android-x64@0.25.5': + optional: true + + '@esbuild/darwin-arm64@0.25.4': + optional: true + + '@esbuild/darwin-arm64@0.25.5': + optional: true + + '@esbuild/darwin-x64@0.25.4': + optional: true + + '@esbuild/darwin-x64@0.25.5': + optional: true + + '@esbuild/freebsd-arm64@0.25.4': + optional: true + + '@esbuild/freebsd-arm64@0.25.5': + optional: true + + '@esbuild/freebsd-x64@0.25.4': + optional: true + + '@esbuild/freebsd-x64@0.25.5': + optional: true + + '@esbuild/linux-arm64@0.25.4': + optional: true + + '@esbuild/linux-arm64@0.25.5': + optional: true + + '@esbuild/linux-arm@0.25.4': + optional: true + + '@esbuild/linux-arm@0.25.5': + optional: true + + '@esbuild/linux-ia32@0.25.4': + optional: true + + '@esbuild/linux-ia32@0.25.5': + optional: true + + '@esbuild/linux-loong64@0.25.4': + optional: true + + '@esbuild/linux-loong64@0.25.5': + optional: true + + '@esbuild/linux-mips64el@0.25.4': + optional: true + + '@esbuild/linux-mips64el@0.25.5': + optional: true + + '@esbuild/linux-ppc64@0.25.4': + optional: true + + '@esbuild/linux-ppc64@0.25.5': + optional: true + + '@esbuild/linux-riscv64@0.25.4': + optional: true + + '@esbuild/linux-riscv64@0.25.5': + optional: true + + '@esbuild/linux-s390x@0.25.4': + optional: true + + '@esbuild/linux-s390x@0.25.5': + optional: true + + '@esbuild/linux-x64@0.25.4': + optional: true + + '@esbuild/linux-x64@0.25.5': + optional: true + + '@esbuild/netbsd-arm64@0.25.4': + optional: true + + '@esbuild/netbsd-arm64@0.25.5': + optional: true + + '@esbuild/netbsd-x64@0.25.4': + optional: true + + '@esbuild/netbsd-x64@0.25.5': + optional: true + + '@esbuild/openbsd-arm64@0.25.4': + optional: true + + '@esbuild/openbsd-arm64@0.25.5': + optional: true - /@typescript-eslint/scope-manager@6.0.0: - resolution: {integrity: sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 6.0.0 - '@typescript-eslint/visitor-keys': 6.0.0 - dev: true + '@esbuild/openbsd-x64@0.25.4': + optional: true - /@typescript-eslint/scope-manager@6.8.0: - resolution: {integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/visitor-keys': 6.8.0 - dev: true + '@esbuild/openbsd-x64@0.25.5': + optional: true - /@typescript-eslint/type-utils@6.0.0(eslint@8.45.0)(typescript@4.9.4): - resolution: {integrity: sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 6.0.0(typescript@4.9.4) - '@typescript-eslint/utils': 6.0.0(eslint@8.45.0)(typescript@4.9.4) - debug: 4.3.4 - eslint: 8.45.0 - ts-api-utils: 1.0.1(typescript@4.9.4) - typescript: 4.9.4 - transitivePeerDependencies: - - supports-color - dev: true + '@esbuild/sunos-x64@0.25.4': + optional: true - /@typescript-eslint/types@6.0.0: - resolution: {integrity: sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==} - engines: {node: ^16.0.0 || >=18.0.0} - dev: true + '@esbuild/sunos-x64@0.25.5': + optional: true - /@typescript-eslint/types@6.8.0: - resolution: {integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==} - engines: {node: ^16.0.0 || >=18.0.0} - dev: true + '@esbuild/win32-arm64@0.25.4': + optional: true - /@typescript-eslint/typescript-estree@6.0.0(typescript@4.9.4): - resolution: {integrity: sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 6.0.0 - '@typescript-eslint/visitor-keys': 6.0.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@4.9.4) - typescript: 4.9.4 - transitivePeerDependencies: - - supports-color - dev: true + '@esbuild/win32-arm64@0.25.5': + optional: true - /@typescript-eslint/typescript-estree@6.8.0(typescript@4.9.4): - resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/visitor-keys': 6.8.0 - debug: 4.3.4 - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.4 - ts-api-utils: 1.0.3(typescript@4.9.4) - typescript: 4.9.4 - transitivePeerDependencies: - - supports-color - dev: true + '@esbuild/win32-ia32@0.25.4': + optional: true - /@typescript-eslint/utils@6.0.0(eslint@8.45.0)(typescript@4.9.4): - resolution: {integrity: sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 6.0.0 - '@typescript-eslint/types': 6.0.0 - '@typescript-eslint/typescript-estree': 6.0.0(typescript@4.9.4) - eslint: 8.45.0 - eslint-scope: 5.1.1 - semver: 7.5.4 - transitivePeerDependencies: - - supports-color - - typescript - dev: true + '@esbuild/win32-ia32@0.25.5': + optional: true - /@typescript-eslint/visitor-keys@6.0.0: - resolution: {integrity: sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 6.0.0 - eslint-visitor-keys: 3.4.2 - dev: true + '@esbuild/win32-x64@0.25.4': + optional: true + + '@esbuild/win32-x64@0.25.5': + optional: true - /@typescript-eslint/visitor-keys@6.8.0: - resolution: {integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==} - engines: {node: ^16.0.0 || >=18.0.0} + '@eslint-community/eslint-utils@4.7.0(eslint@9.29.0)': dependencies: - '@typescript-eslint/types': 6.8.0 + eslint: 9.29.0 eslint-visitor-keys: 3.4.3 - dev: true - /@typescript/twoslash@3.1.0: - resolution: {integrity: sha512-kTwMUQ8xtAZaC4wb2XuLkPqFVBj2dNBueMQ89NWEuw87k2nLBbuafeG5cob/QEr6YduxIdTVUjix0MtC7mPlmg==} + '@eslint-community/regexpp@4.12.1': {} + + '@eslint/config-array@0.20.1': dependencies: - '@typescript/vfs': 1.3.5 - debug: 4.3.4 - lz-string: 1.5.0 + '@eslint/object-schema': 2.1.6 + debug: 4.4.1 + minimatch: 3.1.2 transitivePeerDependencies: - supports-color - dev: true - /@typescript/vfs@1.3.4: - resolution: {integrity: sha512-RbyJiaAGQPIcAGWFa3jAXSuAexU4BFiDRF1g3hy7LmRqfNpYlTQWGXjcrOaVZjJ8YkkpuwG0FcsYvtWQpd9igQ==} + '@eslint/config-helpers@0.2.3': {} + + '@eslint/core@0.14.0': dependencies: - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: true + '@types/json-schema': 7.0.15 - /@typescript/vfs@1.3.5: - resolution: {integrity: sha512-pI8Saqjupf9MfLw7w2+og+fmb0fZS0J6vsKXXrp4/PDXEFvntgzXmChCXC/KefZZS0YGS6AT8e0hGAJcTsdJlg==} + '@eslint/core@0.15.0': dependencies: - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: true + '@types/json-schema': 7.0.15 - /@vercel/nft@0.24.0: - resolution: {integrity: sha512-6TaZleggfN0zsT8QVyOGStYAfKgvfinhpj8jEcdN6Hx6BSWpfkipoM7IVmQd4rCnEgPUFx9zLU2Di6iA0nstUA==} - engines: {node: '>=16'} - hasBin: true + '@eslint/eslintrc@3.3.1': dependencies: - '@mapbox/node-pre-gyp': 1.0.11 - '@rollup/pluginutils': 4.2.1 - acorn: 8.10.0 - async-sema: 3.1.1 - bindings: 1.5.0 - estree-walker: 2.0.2 - glob: 7.2.3 - graceful-fs: 4.2.11 - micromatch: 4.0.5 - node-gyp-build: 4.6.0 - resolve-from: 5.0.0 + ajv: 6.12.6 + debug: 4.4.1 + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 transitivePeerDependencies: - - encoding - supports-color - dev: false - /@vitest/expect@0.34.5: - resolution: {integrity: sha512-/3RBIV9XEH+nRpRMqDJBufKIOQaYUH2X6bt0rKSCW0MfKhXFLYsR5ivHifeajRSTsln0FwJbitxLKHSQz/Xwkw==} - dependencies: - '@vitest/spy': 0.34.5 - '@vitest/utils': 0.34.5 - chai: 4.3.8 - dev: true + '@eslint/js@9.29.0': {} - /@vitest/runner@0.34.5: - resolution: {integrity: sha512-RDEE3ViVvl7jFSCbnBRyYuu23XxmvRTSZWW6W4M7eC5dOsK75d5LIf6uhE5Fqf809DQ1+9ICZZNxhIolWHU4og==} - dependencies: - '@vitest/utils': 0.34.5 - p-limit: 4.0.0 - pathe: 1.1.1 - dev: true + '@eslint/object-schema@2.1.6': {} - /@vitest/snapshot@0.34.5: - resolution: {integrity: sha512-+ikwSbhu6z2yOdtKmk/aeoDZ9QPm2g/ZO5rXT58RR9Vmu/kB2MamyDSx77dctqdZfP3Diqv4mbc/yw2kPT8rmA==} + '@eslint/plugin-kit@0.3.2': dependencies: - magic-string: 0.30.3 - pathe: 1.1.1 - pretty-format: 29.7.0 - dev: true + '@eslint/core': 0.15.0 + levn: 0.4.1 - /@vitest/spy@0.34.5: - resolution: {integrity: sha512-epsicsfhvBjRjCMOC/3k00mP/TBGQy8/P0DxOFiWyLt55gnZ99dqCfCiAsKO17BWVjn4eZRIjKvcqNmSz8gvmg==} - dependencies: - tinyspy: 2.1.1 - dev: true + '@fastify/busboy@2.1.1': {} - /@vitest/utils@0.34.5: - resolution: {integrity: sha512-ur6CmmYQoeHMwmGb0v+qwkwN3yopZuZyf4xt1DBBSGBed8Hf9Gmbm/5dEWqgpLPdRx6Av6jcWXrjcKfkTzg/pw==} - dependencies: - diff-sequences: 29.6.3 - loupe: 2.3.6 - pretty-format: 29.7.0 - dev: true + '@fastify/busboy@3.1.1': {} - /abbrev@1.1.1: - resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - dev: false + '@fontsource/libre-barcode-128-text@5.1.0': {} - /acorn-jsx@5.3.2(acorn@8.10.0): - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + '@humanfs/core@0.19.1': {} + + '@humanfs/node@0.16.6': dependencies: - acorn: 8.10.0 - dev: true + '@humanfs/core': 0.19.1 + '@humanwhocodes/retry': 0.3.0 - /acorn-walk@8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - dev: true + '@humanwhocodes/module-importer@1.0.1': {} - /acorn@8.10.0: - resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} - engines: {node: '>=0.4.0'} - hasBin: true + '@humanwhocodes/retry@0.3.0': {} - /agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - dependencies: - debug: 4.3.4 - transitivePeerDependencies: - - supports-color - dev: false + '@humanwhocodes/retry@0.4.3': {} - /ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - dev: true + '@iarna/toml@2.2.5': {} - /ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - dev: true + '@img/sharp-darwin-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.0.4 + optional: true - /ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} + '@img/sharp-darwin-arm64@0.34.1': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.1.0 + optional: true - /ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - dependencies: - color-convert: 1.9.3 - dev: true + '@img/sharp-darwin-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.0.4 + optional: true - /ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - dev: true + '@img/sharp-darwin-x64@0.34.1': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.1.0 + optional: true - /ansi-styles@5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} - engines: {node: '>=10'} - dev: true + '@img/sharp-libvips-darwin-arm64@1.0.4': + optional: true - /any-promise@1.3.0: - resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} - dev: true + '@img/sharp-libvips-darwin-arm64@1.1.0': + optional: true - /anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 + '@img/sharp-libvips-darwin-x64@1.0.4': + optional: true - /aproba@2.0.0: - resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} - dev: false + '@img/sharp-libvips-darwin-x64@1.1.0': + optional: true - /are-we-there-yet@2.0.0: - resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} - engines: {node: '>=10'} - dependencies: - delegates: 1.0.0 - readable-stream: 3.6.2 - dev: false + '@img/sharp-libvips-linux-arm64@1.0.4': + optional: true - /argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - dependencies: - sprintf-js: 1.0.3 - dev: true + '@img/sharp-libvips-linux-arm64@1.1.0': + optional: true - /argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true + '@img/sharp-libvips-linux-arm@1.0.5': + optional: true - /aria-query@5.3.0: - resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} - dependencies: - dequal: 2.0.3 + '@img/sharp-libvips-linux-arm@1.1.0': + optional: true - /array-buffer-byte-length@1.0.0: - resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} - dependencies: - call-bind: 1.0.2 - is-array-buffer: 3.0.2 - dev: true + '@img/sharp-libvips-linux-ppc64@1.1.0': + optional: true - /array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - dev: true + '@img/sharp-libvips-linux-s390x@1.0.4': + optional: true - /array.prototype.flat@1.3.1: - resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 - es-shim-unscopables: 1.0.0 - dev: true + '@img/sharp-libvips-linux-s390x@1.1.0': + optional: true - /arraybuffer.prototype.slice@1.0.1: - resolution: {integrity: sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==} - engines: {node: '>= 0.4'} - dependencies: - array-buffer-byte-length: 1.0.0 - call-bind: 1.0.2 - define-properties: 1.2.0 - get-intrinsic: 1.2.1 - is-array-buffer: 3.0.2 - is-shared-array-buffer: 1.0.2 - dev: true + '@img/sharp-libvips-linux-x64@1.0.4': + optional: true - /arrify@1.0.1: - resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} - engines: {node: '>=0.10.0'} - dev: true + '@img/sharp-libvips-linux-x64@1.1.0': + optional: true - /assertion-error@1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} - dev: true + '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + optional: true - /async-sema@3.1.1: - resolution: {integrity: sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==} - dev: false + '@img/sharp-libvips-linuxmusl-arm64@1.1.0': + optional: true - /available-typed-arrays@1.0.5: - resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} - engines: {node: '>= 0.4'} - dev: true + '@img/sharp-libvips-linuxmusl-x64@1.0.4': + optional: true - /axobject-query@3.2.1: - resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} - dependencies: - dequal: 2.0.3 + '@img/sharp-libvips-linuxmusl-x64@1.1.0': + optional: true - /b4a@1.6.4: - resolution: {integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==} - dev: true + '@img/sharp-linux-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.0.4 + optional: true - /balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + '@img/sharp-linux-arm64@0.34.1': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.1.0 + optional: true - /base64-js@1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - dev: true + '@img/sharp-linux-arm@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.0.5 + optional: true - /better-path-resolve@1.0.0: - resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} - engines: {node: '>=4'} - dependencies: - is-windows: 1.0.2 - dev: true + '@img/sharp-linux-arm@0.34.1': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.1.0 + optional: true - /binary-extensions@2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} + '@img/sharp-linux-s390x@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.0.4 + optional: true - /bindings@1.5.0: - resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - dependencies: - file-uri-to-path: 1.0.0 - dev: false + '@img/sharp-linux-s390x@0.34.1': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.1.0 + optional: true - /bl@4.1.0: - resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - dependencies: - buffer: 5.7.1 - inherits: 2.0.4 - readable-stream: 3.6.2 - dev: true + '@img/sharp-linux-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.0.4 + optional: true - /brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 + '@img/sharp-linux-x64@0.34.1': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.1.0 + optional: true - /brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - dependencies: - balanced-match: 1.0.2 + '@img/sharp-linuxmusl-arm64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + optional: true - /braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 + '@img/sharp-linuxmusl-arm64@0.34.1': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.1.0 + optional: true + + '@img/sharp-linuxmusl-x64@0.33.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + optional: true - /breakword@1.0.6: - resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} + '@img/sharp-linuxmusl-x64@0.34.1': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.1.0 + optional: true + + '@img/sharp-wasm32@0.33.5': dependencies: - wcwidth: 1.0.1 - dev: true + '@emnapi/runtime': 1.4.3 + optional: true - /browserslist@4.21.10: - resolution: {integrity: sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true + '@img/sharp-wasm32@0.34.1': dependencies: - caniuse-lite: 1.0.30001519 - electron-to-chromium: 1.4.488 - node-releases: 2.0.13 - update-browserslist-db: 1.0.11(browserslist@4.21.10) - dev: true + '@emnapi/runtime': 1.4.3 + optional: true - /buffer-crc32@0.2.13: - resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} - dev: true + '@img/sharp-win32-ia32@0.33.5': + optional: true - /buffer@5.7.1: - resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - dev: true + '@img/sharp-win32-ia32@0.34.1': + optional: true - /builtin-modules@3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} - engines: {node: '>=6'} + '@img/sharp-win32-x64@0.33.5': + optional: true - /c8@8.0.0: - resolution: {integrity: sha512-XHA5vSfCLglAc0Xt8eLBZMv19lgiBSjnb1FLAQgnwkuhJYEonpilhEB4Ea3jPAbm0FhD6VVJrc0z73jPe7JyGQ==} - engines: {node: '>=12'} - hasBin: true - dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@istanbuljs/schema': 0.1.3 - find-up: 5.0.0 - foreground-child: 2.0.0 - istanbul-lib-coverage: 3.2.0 - istanbul-lib-report: 3.0.1 - istanbul-reports: 3.1.6 - rimraf: 3.0.2 - test-exclude: 6.0.0 - v8-to-istanbul: 9.1.0 - yargs: 16.2.0 - yargs-parser: 20.2.9 - dev: true - - /cac@6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} - dev: true + '@img/sharp-win32-x64@0.34.1': + optional: true - /call-bind@1.0.2: - resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + '@isaacs/cliui@8.0.2': dependencies: - function-bind: 1.1.1 - get-intrinsic: 1.2.1 - dev: true + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 - /callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - dev: true + '@isaacs/fs-minipass@4.0.1': + dependencies: + minipass: 7.1.2 - /camelcase-keys@6.2.2: - resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} - engines: {node: '>=8'} + '@jridgewell/gen-mapping@0.3.5': dependencies: - camelcase: 5.3.1 - map-obj: 4.3.0 - quick-lru: 4.0.1 - dev: true + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 - /camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - dev: true + '@jridgewell/resolve-uri@3.1.2': {} - /caniuse-lite@1.0.30001519: - resolution: {integrity: sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==} - dev: true + '@jridgewell/set-array@1.2.1': {} - /chai@4.3.8: - resolution: {integrity: sha512-vX4YvVVtxlfSZ2VecZgFUTU5qPCYsobVI2O9FmwEXBhDigYGQA6jRXCycIs1yJnnWbZ6/+a2zNIF5DfVCcJBFQ==} - engines: {node: '>=4'} + '@jridgewell/source-map@0.3.6': dependencies: - assertion-error: 1.1.0 - check-error: 1.0.2 - deep-eql: 4.1.3 - get-func-name: 2.0.0 - loupe: 2.3.6 - pathval: 1.1.1 - type-detect: 4.0.8 - dev: true - - /chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - dev: true + '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/trace-mapping': 0.3.25 - /chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} + '@jridgewell/sourcemap-codec@1.5.0': {} + + '@jridgewell/trace-mapping@0.3.25': dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 - /chardet@0.7.0: - resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - dev: true + '@jridgewell/trace-mapping@0.3.9': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 - /check-error@1.0.2: - resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} - dev: true + '@manypkg/find-root@1.1.0': + dependencies: + '@babel/runtime': 7.26.10 + '@types/node': 12.20.55 + find-up: 4.1.0 + fs-extra: 8.1.0 - /chokidar@3.5.3: - resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} - engines: {node: '>= 8.10.0'} + '@manypkg/get-packages@1.1.3': dependencies: - anymatch: 3.1.3 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 + '@babel/runtime': 7.26.10 + '@changesets/types': 4.1.0 + '@manypkg/find-root': 1.1.0 + fs-extra: 8.1.0 + globby: 11.1.0 + read-yaml-file: 1.1.0 - /chownr@1.1.4: - resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} - dev: true + '@mapbox/node-pre-gyp@2.0.0': + dependencies: + consola: 3.2.3 + detect-libc: 2.0.3 + https-proxy-agent: 7.0.6 + node-fetch: 2.7.0 + nopt: 8.0.0 + semver: 7.7.1 + tar: 7.4.3 + transitivePeerDependencies: + - encoding + - supports-color - /chownr@2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} - dev: false + '@netlify/binary-info@1.0.0': {} + + '@netlify/blobs@9.1.6': + dependencies: + '@netlify/dev-utils': 3.2.0 + '@netlify/runtime-utils': 2.1.0 + + '@netlify/dev-utils@3.2.0': + dependencies: + '@whatwg-node/server': 0.10.10 + ansis: 4.1.0 + chokidar: 4.0.3 + decache: 4.6.2 + dot-prop: 9.0.0 + env-paths: 3.0.0 + find-up: 7.0.0 + image-size: 2.0.2 + js-image-generator: 1.0.4 + lodash.debounce: 4.0.8 + parse-gitignore: 2.0.0 + uuid: 11.1.0 + write-file-atomic: 5.0.1 + + '@netlify/functions@4.1.4(rollup@4.40.1)': + dependencies: + '@netlify/blobs': 9.1.6 + '@netlify/dev-utils': 3.2.0 + '@netlify/serverless-functions-api': 2.1.1 + '@netlify/zip-it-and-ship-it': 12.1.4(rollup@4.40.1) + cron-parser: 4.9.0 + decache: 4.6.2 + extract-zip: 2.0.1 + is-stream: 4.0.1 + jwt-decode: 4.0.0 + lambda-local: 2.2.0 + read-package-up: 11.0.0 + source-map-support: 0.5.21 + transitivePeerDependencies: + - encoding + - rollup + - supports-color - /ci-info@3.8.0: - resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} - engines: {node: '>=8'} - dev: true + '@netlify/runtime-utils@2.1.0': {} + + '@netlify/serverless-functions-api@2.1.1': {} + + '@netlify/zip-it-and-ship-it@12.1.4(rollup@4.40.1)': + dependencies: + '@babel/parser': 7.27.5 + '@babel/types': 7.27.6 + '@netlify/binary-info': 1.0.0 + '@netlify/serverless-functions-api': 2.1.1 + '@vercel/nft': 0.29.4(rollup@4.40.1) + archiver: 7.0.1 + common-path-prefix: 3.0.0 + copy-file: 11.0.0 + es-module-lexer: 1.7.0 + esbuild: 0.25.5 + execa: 8.0.1 + fast-glob: 3.3.3 + filter-obj: 6.1.0 + find-up: 7.0.0 + is-builtin-module: 3.2.1 + is-path-inside: 4.0.0 + junk: 4.0.1 + locate-path: 7.2.0 + merge-options: 3.0.4 + minimatch: 9.0.5 + normalize-path: 3.0.0 + p-map: 7.0.3 + path-exists: 5.0.0 + precinct: 12.2.0 + require-package-name: 2.0.1 + resolve: 2.0.0-next.5 + semver: 7.7.1 + tmp-promise: 3.0.3 + toml: 3.0.0 + unixify: 1.0.0 + urlpattern-polyfill: 8.0.2 + yargs: 17.7.2 + zod: 3.25.56 + transitivePeerDependencies: + - encoding + - rollup + - supports-color - /clean-regexp@1.0.0: - resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} - engines: {node: '>=4'} + '@nodelib/fs.scandir@2.1.5': dependencies: - escape-string-regexp: 1.0.5 - dev: true + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 - /cliui@6.0.0: - resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 6.2.0 - dev: true + '@nodelib/fs.stat@2.0.5': {} - /cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + '@nodelib/fs.walk@1.2.8': dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.1 - /cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} + '@pkgjs/parseargs@0.11.0': + optional: true + + '@playwright/test@1.51.1': dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true + playwright: 1.51.1 - /clone@1.0.4: - resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} - engines: {node: '>=0.8'} - dev: true + '@polka/url@1.0.0-next.28': {} - /code-block-writer@12.0.0: - resolution: {integrity: sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==} - dev: false + '@publint/pack@0.1.0': {} - /code-red@1.0.3: - resolution: {integrity: sha512-kVwJELqiILQyG5aeuyKFbdsI1fmQy1Cmf7dQ8eGmVuJoaRVdwey7WaMknr2ZFeVSYSKT0rExsa8EGw0aoI/1QQ==} + '@rollup/plugin-commonjs@28.0.1(rollup@4.40.1)': dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - '@types/estree': 1.0.1 - acorn: 8.10.0 - estree-walker: 3.0.3 - periscopic: 3.1.0 + '@rollup/pluginutils': 5.1.3(rollup@4.40.1) + commondir: 1.0.1 + estree-walker: 2.0.2 + fdir: 6.4.6(picomatch@4.0.2) + is-reference: 1.2.1 + magic-string: 0.30.17 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.40.1 - /code-red@1.0.4: - resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} + '@rollup/plugin-json@6.1.0(rollup@4.40.1)': dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - '@types/estree': 1.0.1 - acorn: 8.10.0 - estree-walker: 3.0.3 - periscopic: 3.1.0 - dev: true + '@rollup/pluginutils': 5.1.3(rollup@4.40.1) + optionalDependencies: + rollup: 4.40.1 - /color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + '@rollup/plugin-node-resolve@16.0.0(rollup@4.40.1)': dependencies: - color-name: 1.1.3 - dev: true + '@rollup/pluginutils': 5.1.3(rollup@4.40.1) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-module: 1.0.0 + resolve: 1.22.8 + optionalDependencies: + rollup: 4.40.1 - /color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} + '@rollup/pluginutils@5.1.3(rollup@4.40.1)': dependencies: - color-name: 1.1.4 - dev: true - - /color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - dev: true - - /color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - dev: true + '@types/estree': 1.0.7 + estree-walker: 2.0.2 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.40.1 - /color-string@1.9.1: - resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} - dependencies: - color-name: 1.1.4 - simple-swizzle: 0.2.2 - dev: true + '@rollup/rollup-android-arm-eabi@4.40.1': + optional: true - /color-support@1.1.3: - resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} - hasBin: true - dev: false + '@rollup/rollup-android-arm64@4.40.1': + optional: true - /color@4.2.3: - resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} - engines: {node: '>=12.5.0'} - dependencies: - color-convert: 2.0.1 - color-string: 1.9.1 - dev: true + '@rollup/rollup-darwin-arm64@4.40.1': + optional: true - /commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: false + '@rollup/rollup-darwin-x64@4.40.1': + optional: true - /commander@4.1.1: - resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} - engines: {node: '>= 6'} - dev: true + '@rollup/rollup-freebsd-arm64@4.40.1': + optional: true - /commander@7.2.0: - resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==} - engines: {node: '>= 10'} - dev: false + '@rollup/rollup-freebsd-x64@4.40.1': + optional: true - /commondir@1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + '@rollup/rollup-linux-arm-gnueabihf@4.40.1': + optional: true - /concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + '@rollup/rollup-linux-arm-musleabihf@4.40.1': + optional: true - /console-clear@1.1.1: - resolution: {integrity: sha512-pMD+MVR538ipqkG5JXeOEbKWS5um1H4LUUccUQG68qpeqBYbzYy79Gh55jkd2TtPdRfUaLWdv6LPP//5Zt0aPQ==} - engines: {node: '>=4'} - dev: true + '@rollup/rollup-linux-arm64-gnu@4.40.1': + optional: true - /console-control-strings@1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} - dev: false + '@rollup/rollup-linux-arm64-musl@4.40.1': + optional: true - /convert-source-map@1.9.0: - resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - dev: true + '@rollup/rollup-linux-loongarch64-gnu@4.40.1': + optional: true - /cookie@0.5.0: - resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} - engines: {node: '>= 0.6'} - dev: false + '@rollup/rollup-linux-powerpc64le-gnu@4.40.1': + optional: true - /cross-env@7.0.3: - resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} - engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} - hasBin: true - dependencies: - cross-spawn: 7.0.3 - dev: true + '@rollup/rollup-linux-riscv64-gnu@4.40.1': + optional: true - /cross-spawn@5.1.0: - resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 - dev: true + '@rollup/rollup-linux-riscv64-musl@4.40.1': + optional: true - /cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - dev: true + '@rollup/rollup-linux-s390x-gnu@4.40.1': + optional: true - /css-tree@2.3.1: - resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==} - engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} - dependencies: - mdn-data: 2.0.30 - source-map-js: 1.0.2 + '@rollup/rollup-linux-x64-gnu@4.40.1': + optional: true - /cssesc@3.0.0: - resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} - engines: {node: '>=4'} - hasBin: true - dev: true + '@rollup/rollup-linux-x64-musl@4.40.1': + optional: true - /csv-generate@3.4.3: - resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} - dev: true + '@rollup/rollup-win32-arm64-msvc@4.40.1': + optional: true - /csv-parse@4.16.3: - resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} - dev: true + '@rollup/rollup-win32-ia32-msvc@4.40.1': + optional: true - /csv-stringify@5.6.5: - resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} - dev: true + '@rollup/rollup-win32-x64-msvc@4.40.1': + optional: true - /csv@5.5.3: - resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} - engines: {node: '>= 0.1.90'} + '@stylistic/eslint-plugin-js@2.1.0(eslint@9.29.0)': dependencies: - csv-generate: 3.4.3 - csv-parse: 4.16.3 - csv-stringify: 5.6.5 - stream-transform: 2.1.3 - dev: true + '@types/eslint': 8.56.12 + acorn: 8.15.0 + eslint: 9.29.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 - /d3-array@3.2.4: - resolution: {integrity: sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==} - engines: {node: '>=12'} + '@sveltejs/acorn-typescript@1.0.5(acorn@8.14.1)': dependencies: - internmap: 2.0.3 - dev: false + acorn: 8.14.1 - /d3-geo-projection@4.0.0: - resolution: {integrity: sha512-p0bK60CEzph1iqmnxut7d/1kyTmm3UWtPlwdkM31AU+LW+BXazd5zJdoCn7VFxNCHXRngPHRnsNn5uGjLRGndg==} - engines: {node: '>=12'} - hasBin: true + '@sveltejs/eslint-config@8.2.0(@stylistic/eslint-plugin-js@2.1.0(eslint@9.29.0))(eslint-config-prettier@9.1.0(eslint@9.29.0))(eslint-plugin-n@17.16.1(eslint@9.29.0)(typescript@5.8.3))(eslint-plugin-svelte@3.9.3(eslint@9.29.0)(svelte@5.23.1))(eslint@9.29.0)(typescript-eslint@8.35.0(eslint@9.29.0)(typescript@5.8.3))(typescript@5.8.3)': dependencies: - commander: 7.2.0 - d3-array: 3.2.4 - d3-geo: 3.1.0 - dev: false + '@stylistic/eslint-plugin-js': 2.1.0(eslint@9.29.0) + eslint: 9.29.0 + eslint-config-prettier: 9.1.0(eslint@9.29.0) + eslint-plugin-n: 17.16.1(eslint@9.29.0)(typescript@5.8.3) + eslint-plugin-svelte: 3.9.3(eslint@9.29.0)(svelte@5.23.1) + globals: 15.15.0 + typescript: 5.8.3 + typescript-eslint: 8.35.0(eslint@9.29.0)(typescript@5.8.3) - /d3-geo@3.1.0: - resolution: {integrity: sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA==} - engines: {node: '>=12'} + '@sveltejs/vite-plugin-svelte-inspector@5.0.0-next.0(@sveltejs/vite-plugin-svelte@6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)))(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1))': dependencies: - d3-array: 3.2.4 - dev: false - - /dataloader@1.4.0: - resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} - dev: true + '@sveltejs/vite-plugin-svelte': 6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + debug: 4.4.1 + svelte: 5.23.1 + vite: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + transitivePeerDependencies: + - supports-color - /debug@4.3.4: - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + '@sveltejs/vite-plugin-svelte@6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1))': dependencies: - ms: 2.1.2 + '@sveltejs/vite-plugin-svelte-inspector': 5.0.0-next.0(@sveltejs/vite-plugin-svelte@6.0.0-next.0(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)))(svelte@5.23.1)(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + debug: 4.4.1 + deepmerge: 4.3.1 + kleur: 4.1.5 + magic-string: 0.30.17 + svelte: 5.23.1 + vite: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + vitefu: 1.0.6(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + transitivePeerDependencies: + - supports-color - /decamelize-keys@1.1.1: - resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} - engines: {node: '>=0.10.0'} + '@svitejs/changesets-changelog-github-compact@1.2.0': dependencies: - decamelize: 1.2.0 - map-obj: 1.0.1 - dev: true - - /decamelize@1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} - dev: true + '@changesets/get-github-info': 0.6.0 + dotenv: 16.4.5 + transitivePeerDependencies: + - encoding - /decompress-response@6.0.0: - resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} - engines: {node: '>=10'} + '@types/chai@5.2.2': dependencies: - mimic-response: 3.1.0 - dev: true + '@types/deep-eql': 4.0.2 - /dedent-js@1.0.1: - resolution: {integrity: sha512-OUepMozQULMLUmhxS95Vudo0jb0UchLimi3+pQ2plj61Fcy8axbP9hbiD4Sz6DPqn6XG3kfmziVfQ1rSys5AJQ==} - dev: false - - /deep-eql@4.1.3: - resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} - engines: {node: '>=6'} + '@types/connect@3.4.38': dependencies: - type-detect: 4.0.8 - dev: true - - /deep-extend@0.6.0: - resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} - engines: {node: '>=4.0.0'} - dev: true + '@types/node': 18.19.50 - /deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - dev: true - - /deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} + '@types/cookie@0.6.0': {} - /defaults@1.0.4: - resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} - dependencies: - clone: 1.0.4 - dev: true + '@types/deep-eql@4.0.2': {} - /define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} - engines: {node: '>= 0.4'} + '@types/eslint@8.56.12': dependencies: - has-property-descriptors: 1.0.0 - object-keys: 1.1.1 - dev: true - - /delegates@1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - dev: false - - /dequal@2.0.3: - resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} - engines: {node: '>=6'} - - /detect-indent@6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - dev: true - - /detect-libc@1.0.3: - resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} - engines: {node: '>=0.10'} - hasBin: true + '@types/estree': 1.0.7 + '@types/json-schema': 7.0.15 - /detect-libc@2.0.2: - resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} - engines: {node: '>=8'} - - /devalue@4.3.1: - resolution: {integrity: sha512-Kc0TSP9IUU9eg55au5Q3YtqaYI2cgntVpunJV9Exbm9nvlBeTE5p2NqYHfpuXK6+VF2hF5PI+BPFPUti7e2N1g==} - dev: false + '@types/estree@1.0.7': {} - /diff-sequences@29.6.3: - resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true + '@types/json-schema@7.0.15': {} - /diff@5.1.0: - resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} - engines: {node: '>=0.3.1'} - dev: true + '@types/node@12.20.55': {} - /dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} + '@types/node@18.19.50': dependencies: - path-type: 4.0.0 - dev: true + undici-types: 5.26.5 - /doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dependencies: - esutils: 2.0.3 - dev: true + '@types/normalize-package-data@2.4.4': {} - /dotenv@16.3.1: - resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} - engines: {node: '>=12'} - dev: true + '@types/resolve@1.20.2': {} - /dropcss@1.0.16: - resolution: {integrity: sha512-QgA6BUh2SoBYE/dSuMmeGhNdoGtGewt3Rn66xKyXoGNyjrKRXf163wuM+xeQ83p87l/3ALoB6Il1dgKyGS5pEw==} - dev: true + '@types/semver@7.5.8': {} - /dts-buddy@0.2.4: - resolution: {integrity: sha512-41d7aGv2DXJYlzeKSKHf0GtpCC8OdpEHhz+aqjylKV5aP3fl4APzNmQ5hL5vSKZMaO/lrkrKWC+HQrxl+mcgUw==} - hasBin: true + '@types/set-cookie-parser@2.4.7': dependencies: - '@jridgewell/source-map': 0.3.5 - '@jridgewell/sourcemap-codec': 1.4.15 - globrex: 0.1.2 - kleur: 4.1.5 - locate-character: 3.0.0 - magic-string: 0.30.3 - sade: 1.8.1 - tiny-glob: 0.2.9 - ts-api-utils: 1.0.2(typescript@5.0.4) - typescript: 5.0.4 - dev: true - - /electron-to-chromium@1.4.488: - resolution: {integrity: sha512-Dv4sTjiW7t/UWGL+H8ZkgIjtUAVZDgb/PwGWvMsCT7jipzUV/u5skbLXPFKb6iV0tiddVi/bcS2/kUrczeWgIQ==} - dev: true + '@types/node': 18.19.50 - /emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + '@types/triple-beam@1.3.5': {} - /end-of-stream@1.4.4: - resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + '@types/yauzl@2.10.3': dependencies: - once: 1.4.0 - dev: true + '@types/node': 18.19.50 + optional: true - /enquirer@2.4.1: - resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} - engines: {node: '>=8.6'} + '@typescript-eslint/eslint-plugin@8.35.0(@typescript-eslint/parser@8.35.0(eslint@9.29.0)(typescript@5.8.3))(eslint@9.29.0)(typescript@5.8.3)': dependencies: - ansi-colors: 4.1.3 - strip-ansi: 6.0.1 - dev: true + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.35.0(eslint@9.29.0)(typescript@5.8.3) + '@typescript-eslint/scope-manager': 8.35.0 + '@typescript-eslint/type-utils': 8.35.0(eslint@9.29.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.35.0(eslint@9.29.0)(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.35.0 + eslint: 9.29.0 + graphemer: 1.4.0 + ignore: 7.0.5 + natural-compare: 1.4.0 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + '@typescript-eslint/parser@8.35.0(eslint@9.29.0)(typescript@5.8.3)': dependencies: - is-arrayish: 0.2.1 - dev: true + '@typescript-eslint/scope-manager': 8.35.0 + '@typescript-eslint/types': 8.35.0 + '@typescript-eslint/typescript-estree': 8.35.0(typescript@5.8.3) + '@typescript-eslint/visitor-keys': 8.35.0 + debug: 4.4.1 + eslint: 9.29.0 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color - /es-abstract@1.22.1: - resolution: {integrity: sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==} - engines: {node: '>= 0.4'} - dependencies: - array-buffer-byte-length: 1.0.0 - arraybuffer.prototype.slice: 1.0.1 - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.1 - get-symbol-description: 1.0.0 - globalthis: 1.0.3 - gopd: 1.0.1 - has: 1.0.3 - has-property-descriptors: 1.0.0 - has-proto: 1.0.1 - has-symbols: 1.0.3 - internal-slot: 1.0.5 - is-array-buffer: 3.0.2 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-typed-array: 1.1.12 - is-weakref: 1.0.2 - object-inspect: 1.12.3 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.5.0 - safe-array-concat: 1.0.0 - safe-regex-test: 1.0.0 - string.prototype.trim: 1.2.7 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 - typed-array-buffer: 1.0.0 - typed-array-byte-length: 1.0.0 - typed-array-byte-offset: 1.0.0 - typed-array-length: 1.0.4 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.11 - dev: true - - /es-set-tostringtag@2.0.1: - resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} - engines: {node: '>= 0.4'} + '@typescript-eslint/project-service@8.35.0(typescript@5.8.3)': dependencies: - get-intrinsic: 1.2.1 - has: 1.0.3 - has-tostringtag: 1.0.0 - dev: true + '@typescript-eslint/tsconfig-utils': 8.35.0(typescript@5.8.3) + '@typescript-eslint/types': 8.35.0 + debug: 4.4.1 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color - /es-shim-unscopables@1.0.0: - resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} + '@typescript-eslint/scope-manager@8.35.0': dependencies: - has: 1.0.3 - dev: true + '@typescript-eslint/types': 8.35.0 + '@typescript-eslint/visitor-keys': 8.35.0 - /es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} + '@typescript-eslint/tsconfig-utils@8.35.0(typescript@5.8.3)': dependencies: - is-callable: 1.2.7 - is-date-object: 1.0.5 - is-symbol: 1.0.4 - dev: true + typescript: 5.8.3 - /es6-promise@3.3.1: - resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} - dev: true + '@typescript-eslint/type-utils@8.35.0(eslint@9.29.0)(typescript@5.8.3)': + dependencies: + '@typescript-eslint/typescript-estree': 8.35.0(typescript@5.8.3) + '@typescript-eslint/utils': 8.35.0(eslint@9.29.0)(typescript@5.8.3) + debug: 4.4.1 + eslint: 9.29.0 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color - /esbuild@0.18.11: - resolution: {integrity: sha512-i8u6mQF0JKJUlGR3OdFLKldJQMMs8OqM9Cc3UCi9XXziJ9WERM5bfkHaEAy0YAvPRMgqSW55W7xYn84XtEFTtA==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.18.11 - '@esbuild/android-arm64': 0.18.11 - '@esbuild/android-x64': 0.18.11 - '@esbuild/darwin-arm64': 0.18.11 - '@esbuild/darwin-x64': 0.18.11 - '@esbuild/freebsd-arm64': 0.18.11 - '@esbuild/freebsd-x64': 0.18.11 - '@esbuild/linux-arm': 0.18.11 - '@esbuild/linux-arm64': 0.18.11 - '@esbuild/linux-ia32': 0.18.11 - '@esbuild/linux-loong64': 0.18.11 - '@esbuild/linux-mips64el': 0.18.11 - '@esbuild/linux-ppc64': 0.18.11 - '@esbuild/linux-riscv64': 0.18.11 - '@esbuild/linux-s390x': 0.18.11 - '@esbuild/linux-x64': 0.18.11 - '@esbuild/netbsd-x64': 0.18.11 - '@esbuild/openbsd-x64': 0.18.11 - '@esbuild/sunos-x64': 0.18.11 - '@esbuild/win32-arm64': 0.18.11 - '@esbuild/win32-ia32': 0.18.11 - '@esbuild/win32-x64': 0.18.11 - dev: false - - /esbuild@0.18.20: - resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} - engines: {node: '>=12'} - hasBin: true - requiresBuild: true - optionalDependencies: - '@esbuild/android-arm': 0.18.20 - '@esbuild/android-arm64': 0.18.20 - '@esbuild/android-x64': 0.18.20 - '@esbuild/darwin-arm64': 0.18.20 - '@esbuild/darwin-x64': 0.18.20 - '@esbuild/freebsd-arm64': 0.18.20 - '@esbuild/freebsd-x64': 0.18.20 - '@esbuild/linux-arm': 0.18.20 - '@esbuild/linux-arm64': 0.18.20 - '@esbuild/linux-ia32': 0.18.20 - '@esbuild/linux-loong64': 0.18.20 - '@esbuild/linux-mips64el': 0.18.20 - '@esbuild/linux-ppc64': 0.18.20 - '@esbuild/linux-riscv64': 0.18.20 - '@esbuild/linux-s390x': 0.18.20 - '@esbuild/linux-x64': 0.18.20 - '@esbuild/netbsd-x64': 0.18.20 - '@esbuild/openbsd-x64': 0.18.20 - '@esbuild/sunos-x64': 0.18.20 - '@esbuild/win32-arm64': 0.18.20 - '@esbuild/win32-ia32': 0.18.20 - '@esbuild/win32-x64': 0.18.20 - - /escalade@3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - dev: true + '@typescript-eslint/types@8.31.1': {} - /escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - dev: true + '@typescript-eslint/types@8.35.0': {} - /escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - dev: true + '@typescript-eslint/typescript-estree@8.31.1(typescript@5.8.3)': + dependencies: + '@typescript-eslint/types': 8.31.1 + '@typescript-eslint/visitor-keys': 8.31.1 + debug: 4.4.1 + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.1 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color - /eslint-config-prettier@9.0.0(eslint@8.45.0): - resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' + '@typescript-eslint/typescript-estree@8.35.0(typescript@5.8.3)': dependencies: - eslint: 8.45.0 - dev: true + '@typescript-eslint/project-service': 8.35.0(typescript@5.8.3) + '@typescript-eslint/tsconfig-utils': 8.35.0(typescript@5.8.3) + '@typescript-eslint/types': 8.35.0 + '@typescript-eslint/visitor-keys': 8.35.0 + debug: 4.4.1 + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.1 + ts-api-utils: 2.1.0(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color - /eslint-plugin-svelte@2.31.0(eslint@8.45.0)(svelte@4.1.2): - resolution: {integrity: sha512-Q70jPFRraTkc/giPSfY7yuatmJcb5fPelWNplevqd45gfaJDjc3qXRtWQ6m9U5tWVVYERU9dcdUod294vwD8Gw==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0-0 - svelte: ^3.37.0 || ^4.0.0-0 - peerDependenciesMeta: - svelte: - optional: true + '@typescript-eslint/utils@8.35.0(eslint@9.29.0)(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) - '@jridgewell/sourcemap-codec': 1.4.15 - debug: 4.3.4 - eslint: 8.45.0 - esutils: 2.0.3 - known-css-properties: 0.27.0 - postcss: 8.4.31 - postcss-load-config: 3.1.4(postcss@8.4.31) - postcss-safe-parser: 6.0.0(postcss@8.4.31) - postcss-selector-parser: 6.0.13 - svelte: 4.1.2 - svelte-eslint-parser: 0.31.0(svelte@4.1.2) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0) + '@typescript-eslint/scope-manager': 8.35.0 + '@typescript-eslint/types': 8.35.0 + '@typescript-eslint/typescript-estree': 8.35.0(typescript@5.8.3) + eslint: 9.29.0 + typescript: 5.8.3 transitivePeerDependencies: - supports-color - - ts-node - dev: true - /eslint-plugin-unicorn@48.0.0(eslint@8.45.0): - resolution: {integrity: sha512-8fk/v3p1ro34JSVDBEmtOq6EEQRpMR0iTir79q69KnXFZ6DJyPkT3RAi+ZoTqhQMdDSpGh8BGR68ne1sP5cnAA==} - engines: {node: '>=16'} - peerDependencies: - eslint: '>=8.44.0' + '@typescript-eslint/visitor-keys@8.31.1': dependencies: - '@babel/helper-validator-identifier': 7.22.5 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) - ci-info: 3.8.0 - clean-regexp: 1.0.0 - eslint: 8.45.0 - esquery: 1.5.0 - indent-string: 4.0.0 - is-builtin-module: 3.2.1 - jsesc: 3.0.2 - lodash: 4.17.21 - pluralize: 8.0.0 - read-pkg-up: 7.0.1 - regexp-tree: 0.1.27 - regjsparser: 0.10.0 - semver: 7.5.4 - strip-indent: 3.0.0 - dev: true + '@typescript-eslint/types': 8.31.1 + eslint-visitor-keys: 4.2.0 - /eslint-scope@5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} + '@typescript-eslint/visitor-keys@8.35.0': dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - dev: true + '@typescript-eslint/types': 8.35.0 + eslint-visitor-keys: 4.2.1 - /eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@vercel/nft@0.29.4(rollup@4.40.1)': dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - dev: true + '@mapbox/node-pre-gyp': 2.0.0 + '@rollup/pluginutils': 5.1.3(rollup@4.40.1) + acorn: 8.14.1 + acorn-import-attributes: 1.9.5(acorn@8.14.1) + async-sema: 3.1.1 + bindings: 1.5.0 + estree-walker: 2.0.2 + glob: 10.4.5 + graceful-fs: 4.2.11 + node-gyp-build: 4.8.0 + picomatch: 4.0.2 + resolve-from: 5.0.0 + transitivePeerDependencies: + - encoding + - rollup + - supports-color - /eslint-visitor-keys@3.4.2: - resolution: {integrity: sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true + '@vitest/expect@3.2.3': + dependencies: + '@types/chai': 5.2.2 + '@vitest/spy': 3.2.3 + '@vitest/utils': 3.2.3 + chai: 5.2.0 + tinyrainbow: 2.0.0 - /eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true + '@vitest/mocker@3.2.3(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1))': + dependencies: + '@vitest/spy': 3.2.3 + estree-walker: 3.0.3 + magic-string: 0.30.17 + optionalDependencies: + vite: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) - /eslint@8.45.0: - resolution: {integrity: sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true + '@vitest/pretty-format@3.2.3': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.45.0) - '@eslint-community/regexpp': 4.6.2 - '@eslint/eslintrc': 2.1.1 - '@eslint/js': 8.44.0 - '@humanwhocodes/config-array': 0.11.10 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.2 - espree: 9.6.1 - esquery: 1.5.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.20.0 - graphemer: 1.4.0 - ignore: 5.2.4 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.3 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - dev: true + tinyrainbow: 2.0.0 - /esm-env@1.0.0: - resolution: {integrity: sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==} + '@vitest/runner@3.2.3': + dependencies: + '@vitest/utils': 3.2.3 + pathe: 2.0.3 + strip-literal: 3.0.0 - /espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@vitest/snapshot@3.2.3': dependencies: - acorn: 8.10.0 - acorn-jsx: 5.3.2(acorn@8.10.0) - eslint-visitor-keys: 3.4.2 - dev: true + '@vitest/pretty-format': 3.2.3 + magic-string: 0.30.17 + pathe: 2.0.3 - /esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - dev: true + '@vitest/spy@3.2.3': + dependencies: + tinyspy: 4.0.3 - /esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} - engines: {node: '>=0.10'} + '@vitest/utils@3.2.3': dependencies: - estraverse: 5.3.0 - dev: true + '@vitest/pretty-format': 3.2.3 + loupe: 3.1.3 + tinyrainbow: 2.0.0 - /esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} + '@vue/compiler-core@3.5.16': dependencies: - estraverse: 5.3.0 - dev: true + '@babel/parser': 7.27.5 + '@vue/shared': 3.5.16 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.1 - /estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - dev: true + '@vue/compiler-dom@3.5.16': + dependencies: + '@vue/compiler-core': 3.5.16 + '@vue/shared': 3.5.16 - /estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - dev: true + '@vue/compiler-sfc@3.5.16': + dependencies: + '@babel/parser': 7.27.5 + '@vue/compiler-core': 3.5.16 + '@vue/compiler-dom': 3.5.16 + '@vue/compiler-ssr': 3.5.16 + '@vue/shared': 3.5.16 + estree-walker: 2.0.2 + magic-string: 0.30.17 + postcss: 8.5.6 + source-map-js: 1.2.1 - /estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + '@vue/compiler-ssr@3.5.16': + dependencies: + '@vue/compiler-dom': 3.5.16 + '@vue/shared': 3.5.16 - /estree-walker@3.0.3: - resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + '@vue/shared@3.5.16': {} + + '@whatwg-node/disposablestack@0.0.6': dependencies: - '@types/estree': 1.0.1 + '@whatwg-node/promise-helpers': 1.3.2 + tslib: 2.8.1 - /esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - dev: true + '@whatwg-node/fetch@0.10.8': + dependencies: + '@whatwg-node/node-fetch': 0.7.21 + urlpattern-polyfill: 10.1.0 - /expand-template@2.0.3: - resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} - engines: {node: '>=6'} - dev: true + '@whatwg-node/node-fetch@0.7.21': + dependencies: + '@fastify/busboy': 3.1.1 + '@whatwg-node/disposablestack': 0.0.6 + '@whatwg-node/promise-helpers': 1.3.2 + tslib: 2.8.1 - /extendable-error@0.1.7: - resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} - dev: true + '@whatwg-node/promise-helpers@1.3.2': + dependencies: + tslib: 2.8.1 - /external-editor@3.1.0: - resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} - engines: {node: '>=4'} + '@whatwg-node/server@0.10.10': dependencies: - chardet: 0.7.0 - iconv-lite: 0.4.24 - tmp: 0.0.33 - dev: true + '@envelop/instrumentation': 1.0.0 + '@whatwg-node/disposablestack': 0.0.6 + '@whatwg-node/fetch': 0.10.8 + '@whatwg-node/promise-helpers': 1.3.2 + tslib: 2.8.1 - /fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true + abbrev@2.0.0: {} - /fast-fifo@1.3.2: - resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} - dev: true + abort-controller@3.0.0: + dependencies: + event-target-shim: 5.0.1 - /fast-glob@3.3.1: - resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} - engines: {node: '>=8.6.0'} + acorn-import-attributes@1.9.5(acorn@8.14.1): dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 + acorn: 8.14.1 - /fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - dev: true + acorn-jsx@5.3.2(acorn@8.15.0): + dependencies: + acorn: 8.15.0 - /fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - dev: true + acorn-walk@8.3.2: {} - /fastq@1.15.0: - resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} - dependencies: - reusify: 1.0.4 + acorn@8.14.0: {} - /fenceparser@1.1.1: - resolution: {integrity: sha512-VdkTsK7GWLT0VWMK5S5WTAPn61wJ98WPFwJiRHumhg4ESNUO/tnkU8bzzzc62o6Uk1SVhuZFLnakmDA4SGV7wA==} - engines: {node: '>=12'} - dev: true + acorn@8.14.1: {} + + acorn@8.15.0: {} - /file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + agent-base@7.1.3: {} + + ajv@6.12.6: dependencies: - flat-cache: 3.0.4 - dev: true + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 - /file-uri-to-path@1.0.0: - resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - dev: false + ansi-colors@4.1.3: {} - /fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} + ansi-regex@5.0.1: {} + + ansi-regex@6.1.0: {} + + ansi-styles@4.3.0: dependencies: - to-regex-range: 5.0.1 + color-convert: 2.0.1 - /find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} + ansi-styles@6.2.1: {} + + ansis@4.1.0: {} + + archiver-utils@5.0.2: dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - dev: true + glob: 10.4.5 + graceful-fs: 4.2.11 + is-stream: 2.0.1 + lazystream: 1.0.1 + lodash: 4.17.21 + normalize-path: 3.0.0 + readable-stream: 4.7.0 - /find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} + archiver@7.0.1: dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - dev: true + archiver-utils: 5.0.2 + async: 3.2.6 + buffer-crc32: 1.0.0 + readable-stream: 4.7.0 + readdir-glob: 1.1.3 + tar-stream: 3.1.7 + zip-stream: 6.0.1 - /find-yarn-workspace-root2@1.2.16: - resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + argparse@1.0.10: dependencies: - micromatch: 4.0.5 - pkg-dir: 4.2.0 - dev: true + sprintf-js: 1.0.3 + + argparse@2.0.1: {} - /flat-cache@3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} - engines: {node: ^10.12.0 || >=12.0.0} + aria-query@5.3.2: {} + + array-union@2.1.0: {} + + as-table@1.0.55: dependencies: - flatted: 3.2.7 - rimraf: 3.0.2 - dev: true + printable-characters: 1.0.42 + + assertion-error@2.0.1: {} + + ast-module-types@6.0.1: {} - /flatted@3.2.7: - resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} - dev: true + async-sema@3.1.1: {} - /flexsearch@0.7.31: - resolution: {integrity: sha512-XGozTsMPYkm+6b5QL3Z9wQcJjNYxp0CYn3U1gO7dwD6PAqU1SVWZxI9CCg3z+ml3YfqdPnrBehaBrnH2AGKbNA==} - dev: true + async@3.2.6: {} - /for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + axobject-query@4.1.0: {} + + b4a@1.6.7: {} + + balanced-match@1.0.2: {} + + bare-events@2.5.4: + optional: true + + base64-js@1.5.1: {} + + better-path-resolve@1.0.0: dependencies: - is-callable: 1.2.7 - dev: true + is-windows: 1.0.2 - /foreground-child@2.0.0: - resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} - engines: {node: '>=8.0.0'} + bindings@1.5.0: dependencies: - cross-spawn: 7.0.3 - signal-exit: 3.0.7 - dev: true + file-uri-to-path: 1.0.0 - /fs-constants@1.0.0: - resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} - dev: true + blake3-wasm@2.1.5: {} - /fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} + brace-expansion@1.1.11: dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - dev: true + balanced-match: 1.0.2 + concat-map: 0.0.1 - /fs-extra@8.1.0: - resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} - engines: {node: '>=6 <7 || >=8'} + brace-expansion@2.0.1: dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - dev: true + balanced-match: 1.0.2 - /fs-minipass@2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} + braces@3.0.3: dependencies: - minipass: 3.3.6 - dev: false + fill-range: 7.1.1 - /fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + buffer-crc32@0.2.13: {} - /fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - optional: true + buffer-crc32@1.0.0: {} - /function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + buffer-from@1.1.2: {} - /function.prototype.name@1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} - engines: {node: '>= 0.4'} + buffer@6.0.3: dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 - functions-have-names: 1.2.3 - dev: true + base64-js: 1.5.1 + ieee754: 1.2.1 - /functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - dev: true + builtin-modules@3.3.0: {} - /gauge@3.0.2: - resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} - engines: {node: '>=10'} + cac@6.7.14: {} + + callsite@1.0.0: {} + + callsites@3.1.0: {} + + chai@5.2.0: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.3 + pathval: 2.0.0 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chardet@0.7.0: {} + + check-error@2.1.1: {} + + chokidar@4.0.3: + dependencies: + readdirp: 4.0.1 + + chownr@3.0.0: {} + + ci-info@3.9.0: {} + + cliui@8.0.1: dependencies: - aproba: 2.0.0 - color-support: 1.1.3 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 string-width: 4.2.3 strip-ansi: 6.0.1 - wide-align: 1.1.5 - dev: false + wrap-ansi: 7.0.0 - /get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - dev: true + clsx@2.1.1: {} - /get-func-name@2.0.0: - resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} - dev: true + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 - /get-intrinsic@1.2.1: - resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} + color-convert@2.0.1: dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-proto: 1.0.1 - has-symbols: 1.0.3 - dev: true + color-name: 1.1.4 - /get-port@3.2.0: - resolution: {integrity: sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==} - engines: {node: '>=4'} - dev: true + color-name@1.1.3: {} - /get-symbol-description@1.0.0: - resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} - engines: {node: '>= 0.4'} + color-name@1.1.4: {} + + color-string@1.9.1: dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - dev: true + color-name: 1.1.4 + simple-swizzle: 0.2.2 - /github-from-package@0.0.0: - resolution: {integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=} - dev: true + color@3.2.1: + dependencies: + color-convert: 1.9.3 + color-string: 1.9.1 - /gitignore-parser@0.0.2: - resolution: {integrity: sha512-X6mpqUv59uWLGD4n3hZ8Cu8KbF2PMWPSFYmxZjdkpm3yOU7hSUYnzTkZI1mcWqchphvqyuz3/BhgBR4E/JtkCg==} - engines: {node: '>=0.10.0'} - dev: true + color@4.2.3: + dependencies: + color-convert: 2.0.1 + color-string: 1.9.1 - /glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} + colorspace@1.1.4: dependencies: - is-glob: 4.0.3 + color: 3.2.1 + text-hex: 1.0.0 - /glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} + commander@10.0.1: {} + + commander@12.1.0: {} + + common-path-prefix@3.0.0: {} + + commondir@1.0.1: {} + + compress-commons@6.0.2: dependencies: - is-glob: 4.0.3 - dev: true + crc-32: 1.2.2 + crc32-stream: 6.0.0 + is-stream: 2.0.1 + normalize-path: 3.0.0 + readable-stream: 4.7.0 + + concat-map@0.0.1: {} + + consola@3.2.3: {} + + console-clear@1.1.1: {} + + cookie@0.6.0: {} + + cookie@0.7.2: {} - /glob@7.1.6: - resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} + copy-file@11.0.0: dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true + graceful-fs: 4.2.11 + p-event: 6.0.1 - /glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + core-util-is@1.0.3: {} + + crc-32@1.2.2: {} + + crc32-stream@6.0.0: dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 + crc-32: 1.2.2 + readable-stream: 4.7.0 - /glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} + cron-parser@4.9.0: dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 + luxon: 3.6.1 - /globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} - engines: {node: '>=8'} + cross-env@7.0.3: dependencies: - type-fest: 0.20.2 - dev: true + cross-spawn: 7.0.6 - /globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} - engines: {node: '>= 0.4'} + cross-spawn@7.0.6: dependencies: - define-properties: 1.2.0 - dev: true + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 - /globalyzer@0.1.0: - resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} + cssesc@3.0.0: {} - /globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.1 - ignore: 5.2.4 - merge2: 1.4.1 - slash: 3.0.0 - dev: true + data-uri-to-buffer@2.0.2: {} - /globrex@0.1.2: - resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} + dataloader@1.4.0: {} - /gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + debug@4.4.1: dependencies: - get-intrinsic: 1.2.1 - dev: true + ms: 2.1.3 - /graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + decache@4.6.2: + dependencies: + callsite: 1.0.0 - /grapheme-splitter@1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} - dev: true + dedent-js@1.0.1: {} - /graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - dev: true + deep-eql@5.0.2: {} - /hard-rejection@2.1.0: - resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} - engines: {node: '>=6'} - dev: true + deep-is@0.1.4: {} - /has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - dev: true + deepmerge@4.3.1: {} - /has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - dev: true + defu@6.1.4: {} - /has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - dev: true + dequal@2.0.3: {} - /has-property-descriptors@1.0.0: - resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + detect-indent@6.1.0: {} + + detect-libc@2.0.3: {} + + detective-amd@6.0.1: dependencies: - get-intrinsic: 1.2.1 - dev: true + ast-module-types: 6.0.1 + escodegen: 2.1.0 + get-amd-module-type: 6.0.1 + node-source-walk: 7.0.1 - /has-proto@1.0.1: - resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} - engines: {node: '>= 0.4'} - dev: true + detective-cjs@6.0.1: + dependencies: + ast-module-types: 6.0.1 + node-source-walk: 7.0.1 - /has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - dev: true + detective-es6@5.0.1: + dependencies: + node-source-walk: 7.0.1 - /has-tostringtag@1.0.0: - resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} - engines: {node: '>= 0.4'} + detective-postcss@7.0.1(postcss@8.5.6): dependencies: - has-symbols: 1.0.3 - dev: true + is-url: 1.2.4 + postcss: 8.5.6 + postcss-values-parser: 6.0.2(postcss@8.5.6) - /has-unicode@2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - dev: false + detective-sass@6.0.1: + dependencies: + gonzales-pe: 4.3.0 + node-source-walk: 7.0.1 - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} + detective-scss@5.0.1: dependencies: - function-bind: 1.1.1 + gonzales-pe: 4.3.0 + node-source-walk: 7.0.1 - /hosted-git-info@2.8.9: - resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - dev: true + detective-stylus@5.0.1: {} - /html-escaper@2.0.2: - resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - dev: true + detective-typescript@14.0.0(typescript@5.8.3): + dependencies: + '@typescript-eslint/typescript-estree': 8.31.1(typescript@5.8.3) + ast-module-types: 6.0.1 + node-source-walk: 7.0.1 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color - /https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} + detective-vue2@2.2.0(typescript@5.8.3): dependencies: - agent-base: 6.0.2 - debug: 4.3.4 + '@dependents/detective-less': 5.0.1 + '@vue/compiler-sfc': 3.5.16 + detective-es6: 5.0.1 + detective-sass: 6.0.1 + detective-scss: 5.0.1 + detective-stylus: 5.0.1 + detective-typescript: 14.0.0(typescript@5.8.3) + typescript: 5.8.3 transitivePeerDependencies: - supports-color - dev: false - /human-id@1.0.2: - resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} - dev: true + devalue@5.1.0: {} - /iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} + diff@5.2.0: {} + + dir-glob@3.0.1: dependencies: - safer-buffer: 2.1.2 - dev: true + path-type: 4.0.0 - /ieee754@1.2.1: - resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - dev: true + dot-prop@9.0.0: + dependencies: + type-fest: 4.41.0 - /ignore@5.2.4: - resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} - engines: {node: '>= 4'} - dev: true + dotenv@16.4.5: {} - /imagetools-core@5.0.0: - resolution: {integrity: sha512-BCtqtjFoFo0C423IaeoKxS2SYp3s7+Oilu9ToRG9q5OBmT/wx0kEeHEiW87Ly2er2jX2fChFDuckQGzb3gFwFQ==} - engines: {node: '>=12.0.0'} - dependencies: - sharp: 0.32.5 - dev: true + dropcss@1.0.16: {} - /import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} + dts-buddy@0.6.1(typescript@5.6.3): dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - dev: true + '@jridgewell/source-map': 0.3.6 + '@jridgewell/sourcemap-codec': 1.5.0 + kleur: 4.1.5 + locate-character: 3.0.0 + magic-string: 0.30.17 + sade: 1.8.1 + tinyglobby: 0.2.14 + ts-api-utils: 1.3.0(typescript@5.6.3) + typescript: 5.6.3 - /import-meta-resolve@3.0.0: - resolution: {integrity: sha512-4IwhLhNNA8yy445rPjD/lWh++7hMDOml2eHtd58eG7h+qK3EryMuuRbsHGPikCoAgIkkDnckKfWSk2iDla/ejg==} - dev: false + e2e-test-dep-cjs-only@file:packages/kit/test/apps/dev-only/_test_dependencies/cjs-only: {} - /imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - dev: true + eastasianwidth@0.2.0: {} - /indent-string@4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} - dev: true + emoji-regex@8.0.0: {} - /inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + emoji-regex@9.2.2: {} + + enabled@2.0.0: {} + + end-of-stream@1.4.4: dependencies: once: 1.4.0 - wrappy: 1.0.2 - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + enhanced-resolve@5.18.1: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + + enquirer@2.4.1: + dependencies: + ansi-colors: 4.1.3 + strip-ansi: 6.0.1 - /ini@1.3.8: - resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - dev: true + entities@4.5.0: {} - /internal-slot@1.0.5: - resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} - engines: {node: '>= 0.4'} + env-paths@3.0.0: {} + + es-module-lexer@1.7.0: {} + + esbuild@0.25.4: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.4 + '@esbuild/android-arm': 0.25.4 + '@esbuild/android-arm64': 0.25.4 + '@esbuild/android-x64': 0.25.4 + '@esbuild/darwin-arm64': 0.25.4 + '@esbuild/darwin-x64': 0.25.4 + '@esbuild/freebsd-arm64': 0.25.4 + '@esbuild/freebsd-x64': 0.25.4 + '@esbuild/linux-arm': 0.25.4 + '@esbuild/linux-arm64': 0.25.4 + '@esbuild/linux-ia32': 0.25.4 + '@esbuild/linux-loong64': 0.25.4 + '@esbuild/linux-mips64el': 0.25.4 + '@esbuild/linux-ppc64': 0.25.4 + '@esbuild/linux-riscv64': 0.25.4 + '@esbuild/linux-s390x': 0.25.4 + '@esbuild/linux-x64': 0.25.4 + '@esbuild/netbsd-arm64': 0.25.4 + '@esbuild/netbsd-x64': 0.25.4 + '@esbuild/openbsd-arm64': 0.25.4 + '@esbuild/openbsd-x64': 0.25.4 + '@esbuild/sunos-x64': 0.25.4 + '@esbuild/win32-arm64': 0.25.4 + '@esbuild/win32-ia32': 0.25.4 + '@esbuild/win32-x64': 0.25.4 + + esbuild@0.25.5: + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.5 + '@esbuild/android-arm': 0.25.5 + '@esbuild/android-arm64': 0.25.5 + '@esbuild/android-x64': 0.25.5 + '@esbuild/darwin-arm64': 0.25.5 + '@esbuild/darwin-x64': 0.25.5 + '@esbuild/freebsd-arm64': 0.25.5 + '@esbuild/freebsd-x64': 0.25.5 + '@esbuild/linux-arm': 0.25.5 + '@esbuild/linux-arm64': 0.25.5 + '@esbuild/linux-ia32': 0.25.5 + '@esbuild/linux-loong64': 0.25.5 + '@esbuild/linux-mips64el': 0.25.5 + '@esbuild/linux-ppc64': 0.25.5 + '@esbuild/linux-riscv64': 0.25.5 + '@esbuild/linux-s390x': 0.25.5 + '@esbuild/linux-x64': 0.25.5 + '@esbuild/netbsd-arm64': 0.25.5 + '@esbuild/netbsd-x64': 0.25.5 + '@esbuild/openbsd-arm64': 0.25.5 + '@esbuild/openbsd-x64': 0.25.5 + '@esbuild/sunos-x64': 0.25.5 + '@esbuild/win32-arm64': 0.25.5 + '@esbuild/win32-ia32': 0.25.5 + '@esbuild/win32-x64': 0.25.5 + + escalade@3.2.0: {} + + escape-string-regexp@4.0.0: {} + + escodegen@2.1.0: + dependencies: + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 + optionalDependencies: + source-map: 0.6.1 + + eslint-compat-utils@0.5.1(eslint@9.29.0): dependencies: - get-intrinsic: 1.2.1 - has: 1.0.3 - side-channel: 1.0.4 - dev: true + eslint: 9.29.0 + semver: 7.7.1 - /internmap@2.0.3: - resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} - engines: {node: '>=12'} - dev: false + eslint-config-prettier@9.1.0(eslint@9.29.0): + dependencies: + eslint: 9.29.0 + + eslint-plugin-es-x@7.8.0(eslint@9.29.0): + dependencies: + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0) + '@eslint-community/regexpp': 4.12.1 + eslint: 9.29.0 + eslint-compat-utils: 0.5.1(eslint@9.29.0) + + eslint-plugin-n@17.16.1(eslint@9.29.0)(typescript@5.8.3): + dependencies: + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0) + '@typescript-eslint/utils': 8.35.0(eslint@9.29.0)(typescript@5.8.3) + enhanced-resolve: 5.18.1 + eslint: 9.29.0 + eslint-plugin-es-x: 7.8.0(eslint@9.29.0) + get-tsconfig: 4.10.0 + globals: 15.15.0 + ignore: 5.3.2 + minimatch: 9.0.5 + semver: 7.7.1 + ts-declaration-location: 1.0.7(typescript@5.8.3) + transitivePeerDependencies: + - supports-color + - typescript + + eslint-plugin-svelte@3.9.3(eslint@9.29.0)(svelte@5.23.1): + dependencies: + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0) + '@jridgewell/sourcemap-codec': 1.5.0 + eslint: 9.29.0 + esutils: 2.0.3 + globals: 16.2.0 + known-css-properties: 0.37.0 + postcss: 8.5.6 + postcss-load-config: 3.1.4(postcss@8.5.6) + postcss-safe-parser: 7.0.1(postcss@8.5.6) + semver: 7.7.1 + svelte-eslint-parser: 1.2.0(svelte@5.23.1) + optionalDependencies: + svelte: 5.23.1 + transitivePeerDependencies: + - ts-node - /is-array-buffer@3.0.2: - resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} + eslint-scope@8.4.0: dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - is-typed-array: 1.1.12 - dev: true + esrecurse: 4.3.0 + estraverse: 5.3.0 - /is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: true + eslint-visitor-keys@3.4.3: {} - /is-arrayish@0.3.2: - resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} - dev: true + eslint-visitor-keys@4.2.0: {} - /is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - dependencies: - has-bigints: 1.0.2 - dev: true + eslint-visitor-keys@4.2.1: {} - /is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} + eslint@9.29.0: dependencies: - binary-extensions: 2.2.0 + '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0) + '@eslint-community/regexpp': 4.12.1 + '@eslint/config-array': 0.20.1 + '@eslint/config-helpers': 0.2.3 + '@eslint/core': 0.14.0 + '@eslint/eslintrc': 3.3.1 + '@eslint/js': 9.29.0 + '@eslint/plugin-kit': 0.3.2 + '@humanfs/node': 0.16.6 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.7 + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.1 + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.5.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.3 + transitivePeerDependencies: + - supports-color - /is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true + esm-env@1.2.2: {} - /is-builtin-module@3.2.1: - resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} - engines: {node: '>=6'} + espree@10.4.0: dependencies: - builtin-modules: 3.3.0 + acorn: 8.15.0 + acorn-jsx: 5.3.2(acorn@8.15.0) + eslint-visitor-keys: 4.2.1 - /is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} - dev: true + esprima@4.0.1: {} - /is-ci@3.0.1: - resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} - hasBin: true + esquery@1.5.0: dependencies: - ci-info: 3.8.0 - dev: true + estraverse: 5.3.0 - /is-core-module@2.13.0: - resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} + esrap@1.4.5: dependencies: - has: 1.0.3 + '@jridgewell/sourcemap-codec': 1.5.0 - /is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} - engines: {node: '>= 0.4'} + esrecurse@4.3.0: dependencies: - has-tostringtag: 1.0.0 - dev: true + estraverse: 5.3.0 - /is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} + estraverse@5.3.0: {} - /is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} + estree-walker@2.0.2: {} - /is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} + estree-walker@3.0.3: dependencies: - is-extglob: 2.1.1 + '@types/estree': 1.0.7 - /is-module@1.0.0: - resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} + esutils@2.0.3: {} - /is-negative-zero@2.0.2: - resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} - engines: {node: '>= 0.4'} - dev: true + event-target-shim@5.0.1: {} - /is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true + events@3.3.0: {} - /is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} + execa@8.0.1: + dependencies: + cross-spawn: 7.0.6 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 - /is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - dev: true + exit-hook@2.2.1: {} - /is-plain-obj@1.1.0: - resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} - engines: {node: '>=0.10.0'} - dev: true + expect-type@1.2.1: {} - /is-promise@4.0.0: - resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} - dev: true + exsolve@1.0.4: {} - /is-reference@1.2.1: - resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} - dependencies: - '@types/estree': 1.0.1 + extendable-error@0.1.7: {} - /is-reference@3.0.1: - resolution: {integrity: sha512-baJJdQLiYaJdvFbJqXrcGv3WU3QCzBlUcI5QhbesIm6/xPsvmO+2CDoi/GMOFBQEQm+PXkwOPrp9KK5ozZsp2w==} + external-editor@3.1.0: dependencies: - '@types/estree': 1.0.1 + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 - /is-reference@3.0.2: - resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} + extract-zip@2.0.1: dependencies: - '@types/estree': 1.0.1 - dev: true + debug: 4.4.1 + get-stream: 5.2.0 + yauzl: 2.10.0 + optionalDependencies: + '@types/yauzl': 2.10.3 + transitivePeerDependencies: + - supports-color - /is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true + fast-deep-equal@3.1.3: {} - /is-shared-array-buffer@1.0.2: - resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} - dependencies: - call-bind: 1.0.2 - dev: true + fast-fifo@1.3.2: {} - /is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} + fast-glob@3.3.3: dependencies: - has-tostringtag: 1.0.0 - dev: true + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.8 - /is-subdir@1.2.0: - resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} - engines: {node: '>=4'} - dependencies: - better-path-resolve: 1.0.0 - dev: true + fast-json-stable-stringify@2.1.0: {} - /is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.3 - dev: true + fast-levenshtein@2.0.6: {} - /is-typed-array@1.1.12: - resolution: {integrity: sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==} - engines: {node: '>= 0.4'} + fastq@1.17.1: dependencies: - which-typed-array: 1.1.11 - dev: true + reusify: 1.0.4 - /is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + fd-slicer@1.1.0: dependencies: - call-bind: 1.0.2 - dev: true + pend: 1.2.0 - /is-windows@1.0.2: - resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} - engines: {node: '>=0.10.0'} - dev: true + fdir@6.4.6(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 - /isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - dev: true + fecha@4.2.3: {} - /isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - dev: true + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 - /istanbul-lib-coverage@3.2.0: - resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} - engines: {node: '>=8'} - dev: true + file-uri-to-path@1.0.0: {} - /istanbul-lib-report@3.0.1: - resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} - engines: {node: '>=10'} + fill-range@7.1.1: dependencies: - istanbul-lib-coverage: 3.2.0 - make-dir: 4.0.0 - supports-color: 7.2.0 - dev: true + to-regex-range: 5.0.1 - /istanbul-reports@3.1.6: - resolution: {integrity: sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==} - engines: {node: '>=8'} - dependencies: - html-escaper: 2.0.2 - istanbul-lib-report: 3.0.1 - dev: true + filter-obj@6.1.0: {} - /js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - dev: true + find-up-simple@1.0.1: {} - /js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true + find-up@4.1.0: dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - dev: true + locate-path: 5.0.0 + path-exists: 4.0.0 - /js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true + find-up@5.0.0: dependencies: - argparse: 2.0.1 - dev: true - - /jsesc@0.5.0: - resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} - hasBin: true - dev: true + locate-path: 6.0.0 + path-exists: 4.0.0 - /jsesc@3.0.2: - resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} - engines: {node: '>=6'} - hasBin: true - dev: true + find-up@7.0.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + unicorn-magic: 0.1.0 - /json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: true + flat-cache@4.0.1: + dependencies: + flatted: 3.3.1 + keyv: 4.5.4 - /json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - dev: true + flatted@3.3.1: {} - /json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - dev: true + fn.name@1.1.0: {} - /jsonc-parser@3.2.0: - resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} - dev: true + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 - /jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - optionalDependencies: + fs-extra@7.0.1: + dependencies: graceful-fs: 4.2.11 - dev: true - - /kind-of@6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - dev: true - - /kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - dev: false - - /kleur@4.1.5: - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} - engines: {node: '>=6'} - - /known-css-properties@0.27.0: - resolution: {integrity: sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg==} - dev: true + jsonfile: 4.0.0 + universalify: 0.1.2 - /levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} + fs-extra@8.1.0: dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - dev: true - - /lightningcss-darwin-arm64@1.21.8: - resolution: {integrity: sha512-BOMoGfcgkk2f4ltzsJqmkjiqRtlZUK+UdwhR+P6VgIsnpQBV3G01mlL6GzYxYqxq+6/3/n/D+4oy2NeknmADZw==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - optional: true - - /lightningcss-darwin-x64@1.21.8: - resolution: {integrity: sha512-YhF64mcVDPKKufL4aNFBnVH7uvzE0bW3YUsPXdP4yUcT/8IXChypOZ/PE1pmt2RlbmsyVuuIIeZU4zTyZe5Amw==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [darwin] - requiresBuild: true - optional: true - - /lightningcss-freebsd-x64@1.21.8: - resolution: {integrity: sha512-CV6A/vTG2Ryd3YpChEgfWWv4TXCAETo9TcHSNx0IP0dnKcnDEiAko4PIKhCqZL11IGdN1ZLBCVPw+vw5ZYwzfA==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - optional: true + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 - /lightningcss-linux-arm-gnueabihf@1.21.8: - resolution: {integrity: sha512-9PMbqh8n/Xq0F4/j2NR/hHM2HRDiFXFSF0iOvV67pNWKJkHIO6mR8jBw/88Aro5Ye/ILsX5OuWsxIVJDFv0NXA==} - engines: {node: '>= 12.0.0'} - cpu: [arm] - os: [linux] - requiresBuild: true + fsevents@2.3.2: optional: true - /lightningcss-linux-arm64-gnu@1.21.8: - resolution: {integrity: sha512-JTM/TuMMllkzaXV7/eDjG4IJKLlCl+RfYZwtsVmC82gc0QX0O37csGAcY2OGleiuA4DnEo/Qea5WoFfZUNC6zg==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [linux] - requiresBuild: true + fsevents@2.3.3: optional: true - /lightningcss-linux-arm64-musl@1.21.8: - resolution: {integrity: sha512-01gWShXrgoIb8urzShpn1RWtZuaSyKSzF2hfO+flzlTPoACqcO3rgcu/3af4Cw54e8vKzL5hPRo4kROmgaOMLg==} - engines: {node: '>= 12.0.0'} - cpu: [arm64] - os: [linux] - requiresBuild: true - optional: true + function-bind@1.1.2: {} - /lightningcss-linux-x64-gnu@1.21.8: - resolution: {integrity: sha512-yVB5vYJjJb/Aku0V9QaGYIntvK/1TJOlNB9GmkNpXX5bSSP2pYW4lWW97jxFMHO908M0zjEt1qyOLMyqojHL+Q==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [linux] - requiresBuild: true - optional: true + get-amd-module-type@6.0.1: + dependencies: + ast-module-types: 6.0.1 + node-source-walk: 7.0.1 - /lightningcss-linux-x64-musl@1.21.8: - resolution: {integrity: sha512-TYi+KNtBVK0+FZvxTX/d5XJb+tw3Jq+2Rr9hW359wp1afsi1Vkg+uVGgbn+m2dipa5XwpCseQq81ylMlXuyfPw==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [linux] - requiresBuild: true - optional: true + get-caller-file@2.0.5: {} - /lightningcss-win32-x64-msvc@1.21.8: - resolution: {integrity: sha512-mww+kqbPx0/C44l2LEloECtRUuOFDjq9ftp+EHTPiCp2t+avy0sh8MaFwGsrKkj2XfZhaRhi4CPVKBoqF1Qlwg==} - engines: {node: '>= 12.0.0'} - cpu: [x64] - os: [win32] - requiresBuild: true - optional: true + get-port@5.1.1: {} - /lightningcss@1.21.8: - resolution: {integrity: sha512-jEqaL7m/ZckZJjlMAfycr1Kpz7f93k6n7KGF5SJjuPSm6DWI6h3ayLZmgRHgy1OfrwoCed6h4C/gHYPOd1OFMA==} - engines: {node: '>= 12.0.0'} + get-source@2.0.12: dependencies: - detect-libc: 1.0.3 - optionalDependencies: - lightningcss-darwin-arm64: 1.21.8 - lightningcss-darwin-x64: 1.21.8 - lightningcss-freebsd-x64: 1.21.8 - lightningcss-linux-arm-gnueabihf: 1.21.8 - lightningcss-linux-arm64-gnu: 1.21.8 - lightningcss-linux-arm64-musl: 1.21.8 - lightningcss-linux-x64-gnu: 1.21.8 - lightningcss-linux-x64-musl: 1.21.8 - lightningcss-win32-x64-msvc: 1.21.8 - - /lilconfig@2.1.0: - resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} - engines: {node: '>=10'} - dev: true - - /lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true + data-uri-to-buffer: 2.0.2 + source-map: 0.6.1 - /load-yaml-file@0.2.0: - resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} - engines: {node: '>=6'} + get-stream@5.2.0: dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.1 - pify: 4.0.1 - strip-bom: 3.0.0 - dev: true + pump: 3.0.2 - /local-access@1.1.0: - resolution: {integrity: sha512-XfegD5pyTAfb+GY6chk283Ox5z8WexG56OvM06RWLpAc/UHozO8X6xAxEkIitZOtsSMM1Yr3DkHgW5W+onLhCw==} - engines: {node: '>=6'} - dev: true + get-stream@8.0.1: {} - /local-pkg@0.4.3: - resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} - engines: {node: '>=14'} - dev: true + get-tsconfig@4.10.0: + dependencies: + resolve-pkg-maps: 1.0.0 - /locate-character@3.0.0: - resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + glob-parent@5.1.2: + dependencies: + is-glob: 4.0.3 - /locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} + glob-parent@6.0.2: dependencies: - p-locate: 4.1.0 - dev: true + is-glob: 4.0.3 - /locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} + glob-to-regexp@0.4.1: {} + + glob@10.4.5: dependencies: - p-locate: 5.0.0 - dev: true + foreground-child: 3.3.0 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 - /lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true + globals@14.0.0: {} - /lodash.startcase@4.4.0: - resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - dev: true + globals@15.15.0: {} - /lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - dev: true + globals@16.2.0: {} - /loupe@2.3.6: - resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} + globby@11.1.0: dependencies: - get-func-name: 2.0.0 - dev: true + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.3 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 - /lower-case@2.0.2: - resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + gonzales-pe@4.3.0: dependencies: - tslib: 2.6.1 - dev: false + minimist: 1.2.8 - /lru-cache@4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - dev: true + graceful-fs@4.2.11: {} - /lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - dependencies: - yallist: 4.0.0 + graphemer@1.4.0: {} - /lz-string@1.5.0: - resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} - hasBin: true - dev: true + has-flag@4.0.0: {} - /magic-string@0.27.0: - resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} - engines: {node: '>=12'} + hasown@2.0.2: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + function-bind: 1.1.2 - /magic-string@0.30.2: - resolution: {integrity: sha512-lNZdu7pewtq/ZvWUp9Wpf/x7WzMTsR26TWV03BRZrXFsv+BI6dy8RAiKgm1uM/kyR0rCfUcqvOlXKG66KhIGug==} - engines: {node: '>=12'} + hosted-git-info@7.0.2: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - dev: false + lru-cache: 10.4.3 - /magic-string@0.30.3: - resolution: {integrity: sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw==} - engines: {node: '>=12'} + https-proxy-agent@7.0.6: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + agent-base: 7.1.3 + debug: 4.4.1 + transitivePeerDependencies: + - supports-color - /make-dir@3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} - dependencies: - semver: 6.3.1 - dev: false + human-id@4.1.1: {} - /make-dir@4.0.0: - resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} - engines: {node: '>=10'} + human-signals@5.0.0: {} + + iconv-lite@0.4.24: dependencies: - semver: 7.5.4 - dev: true + safer-buffer: 2.1.2 - /map-obj@1.0.1: - resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} - engines: {node: '>=0.10.0'} - dev: true + ieee754@1.2.1: {} - /map-obj@4.3.0: - resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} - engines: {node: '>=8'} - dev: true + ignore@5.3.2: {} - /marked@9.0.0: - resolution: {integrity: sha512-37yoTpjU+TSXb9OBYY5n78z/CqXh76KiQj9xsKxEdztzU9fRLmbWO5YqKxgCVGKlNdexppnbKTkwB3RipVri8w==} - engines: {node: '>= 16'} - hasBin: true - dev: true + ignore@7.0.5: {} - /mdn-data@2.0.30: - resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + image-size@2.0.2: {} - /meow@6.1.1: - resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} - engines: {node: '>=8'} - dependencies: - '@types/minimist': 1.2.2 - camelcase-keys: 6.2.2 - decamelize-keys: 1.1.1 - hard-rejection: 2.1.0 - minimist-options: 4.1.0 - normalize-package-data: 2.5.0 - read-pkg-up: 7.0.1 - redent: 3.0.0 - trim-newlines: 3.0.1 - type-fest: 0.13.1 - yargs-parser: 18.1.3 - dev: true - - /merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} + imagetools-core@7.1.0: {} - /micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} + import-fresh@3.3.0: dependencies: - braces: 3.0.2 - picomatch: 2.3.1 - - /mime@3.0.0: - resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} - engines: {node: '>=10.0.0'} - hasBin: true - dev: true + parent-module: 1.0.1 + resolve-from: 4.0.0 - /mimic-response@3.1.0: - resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} - engines: {node: '>=10'} - dev: true + imurmurhash@0.1.4: {} - /min-indent@1.0.1: - resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} - engines: {node: '>=4'} - dev: true + index-to-position@1.1.0: {} - /minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 + inherits@2.0.4: {} - /minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} - dependencies: - brace-expansion: 2.0.1 + is-arrayish@0.3.2: {} - /minimatch@7.4.6: - resolution: {integrity: sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==} - engines: {node: '>=10'} + is-builtin-module@3.2.1: dependencies: - brace-expansion: 2.0.1 - dev: false + builtin-modules: 3.3.0 - /minimist-options@4.1.0: - resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} - engines: {node: '>= 6'} + is-core-module@2.13.1: dependencies: - arrify: 1.0.1 - is-plain-obj: 1.1.0 - kind-of: 6.0.3 - dev: true - - /minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - dev: true + hasown: 2.0.2 - /minipass@3.3.6: - resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} - engines: {node: '>=8'} - dependencies: - yallist: 4.0.0 - dev: false + is-extglob@2.1.1: {} - /minipass@5.0.0: - resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} - engines: {node: '>=8'} - dev: false + is-fullwidth-code-point@3.0.0: {} - /minizlib@2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} + is-glob@4.0.3: dependencies: - minipass: 3.3.6 - yallist: 4.0.0 - dev: false - - /mixme@0.5.9: - resolution: {integrity: sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw==} - engines: {node: '>= 8.0.0'} - dev: true + is-extglob: 2.1.1 - /mkdirp-classic@0.5.3: - resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} - dev: true + is-module@1.0.0: {} - /mkdirp@0.5.6: - resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} - hasBin: true - dependencies: - minimist: 1.2.8 - dev: true + is-number@7.0.0: {} - /mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - dev: false + is-path-inside@4.0.0: {} - /mkdirp@2.1.6: - resolution: {integrity: sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==} - engines: {node: '>=10'} - hasBin: true - dev: false + is-plain-obj@2.1.0: {} - /mlly@1.4.2: - resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} + is-reference@1.2.1: dependencies: - acorn: 8.10.0 - pathe: 1.1.1 - pkg-types: 1.0.3 - ufo: 1.3.0 - dev: true + '@types/estree': 1.0.7 - /mri@1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} + is-reference@3.0.3: + dependencies: + '@types/estree': 1.0.7 - /mrmime@1.0.1: - resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} - engines: {node: '>=10'} + is-stream@2.0.1: {} - /ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + is-stream@3.0.0: {} - /mz@2.7.0: - resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + is-stream@4.0.1: {} + + is-subdir@1.2.0: dependencies: - any-promise: 1.3.0 - object-assign: 4.1.1 - thenify-all: 1.6.0 - dev: true + better-path-resolve: 1.0.0 - /nanoid@3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true + is-url-superb@4.0.0: {} - /napi-build-utils@1.0.2: - resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} - dev: true + is-url@1.2.4: {} - /natural-compare-lite@1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} - dev: true + is-windows@1.0.2: {} - /natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - dev: true + isarray@1.0.0: {} - /no-case@3.0.4: - resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - dependencies: - lower-case: 2.0.2 - tslib: 2.6.1 - dev: false + isexe@2.0.0: {} - /node-abi@3.47.0: - resolution: {integrity: sha512-2s6B2CWZM//kPgwnuI0KrYwNjfdByE25zvAaEpq9IH4zcNsarH8Ihu/UuX6XMPEogDAxkuUFeZn60pXNHAqn3A==} - engines: {node: '>=10'} + jackspeak@3.4.3: dependencies: - semver: 7.5.4 - dev: true + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 - /node-addon-api@6.1.0: - resolution: {integrity: sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==} - dev: true + jpeg-js@0.4.4: {} - /node-fetch@2.6.12: - resolution: {integrity: sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true + js-image-generator@1.0.4: dependencies: - whatwg-url: 5.0.0 + jpeg-js: 0.4.4 - /node-gyp-build@4.6.0: - resolution: {integrity: sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==} - hasBin: true - dev: false + js-tokens@4.0.0: {} - /node-releases@2.0.13: - resolution: {integrity: sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==} - dev: true + js-tokens@9.0.1: {} - /nopt@5.0.0: - resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} - engines: {node: '>=6'} - hasBin: true + js-yaml@3.14.1: dependencies: - abbrev: 1.1.1 - dev: false + argparse: 1.0.10 + esprima: 4.0.1 - /normalize-package-data@2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + js-yaml@4.1.0: dependencies: - hosted-git-info: 2.8.9 - resolve: 1.22.4 - semver: 5.7.2 - validate-npm-package-license: 3.0.4 - dev: true + argparse: 2.0.1 - /normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + jsonfile@4.0.0: + optionalDependencies: + graceful-fs: 4.2.11 + + junk@4.0.1: {} - /npmlog@5.0.1: - resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} + jwt-decode@4.0.0: {} + + keyv@4.5.4: dependencies: - are-we-there-yet: 2.0.0 - console-control-strings: 1.1.0 - gauge: 3.0.2 - set-blocking: 2.0.0 - dev: false + json-buffer: 3.0.1 - /object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} + kleur@4.1.5: {} - /object-inspect@1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} - dev: true + known-css-properties@0.37.0: {} - /object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - dev: true + kuler@2.0.0: {} - /object.assign@4.1.4: - resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} - engines: {node: '>= 0.4'} + lambda-local@2.2.0: dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - has-symbols: 1.0.3 - object-keys: 1.1.1 - dev: true + commander: 10.0.1 + dotenv: 16.4.5 + winston: 3.17.0 - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + lazystream@1.0.1: dependencies: - wrappy: 1.0.2 + readable-stream: 2.3.8 - /optionator@0.9.3: - resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} - engines: {node: '>= 0.8.0'} + levn@0.4.1: dependencies: - '@aashutoshrathi/word-wrap': 1.2.6 - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 - dev: true - /os-tmpdir@1.0.2: - resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} - engines: {node: '>=0.10.0'} - dev: true + lightningcss-darwin-arm64@1.30.1: + optional: true - /outdent@0.5.0: - resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} - dev: true + lightningcss-darwin-x64@1.30.1: + optional: true - /p-filter@2.1.0: - resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} - engines: {node: '>=8'} - dependencies: - p-map: 2.1.0 - dev: true + lightningcss-freebsd-x64@1.30.1: + optional: true - /p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - dependencies: - p-try: 2.2.0 - dev: true + lightningcss-linux-arm-gnueabihf@1.30.1: + optional: true - /p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - dependencies: - yocto-queue: 0.1.0 - dev: true + lightningcss-linux-arm64-gnu@1.30.1: + optional: true - /p-limit@4.0.0: - resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - yocto-queue: 1.0.0 - dev: true + lightningcss-linux-arm64-musl@1.30.1: + optional: true - /p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - dependencies: - p-limit: 2.3.0 - dev: true + lightningcss-linux-x64-gnu@1.30.1: + optional: true - /p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - dependencies: - p-limit: 3.1.0 - dev: true + lightningcss-linux-x64-musl@1.30.1: + optional: true - /p-map@2.1.0: - resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} - engines: {node: '>=6'} - dev: true + lightningcss-win32-arm64-msvc@1.30.1: + optional: true - /p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - dev: true + lightningcss-win32-x64-msvc@1.30.1: + optional: true - /parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} + lightningcss@1.30.1: dependencies: - callsites: 3.1.0 - dev: true + detect-libc: 2.0.3 + optionalDependencies: + lightningcss-darwin-arm64: 1.30.1 + lightningcss-darwin-x64: 1.30.1 + lightningcss-freebsd-x64: 1.30.1 + lightningcss-linux-arm-gnueabihf: 1.30.1 + lightningcss-linux-arm64-gnu: 1.30.1 + lightningcss-linux-arm64-musl: 1.30.1 + lightningcss-linux-x64-gnu: 1.30.1 + lightningcss-linux-x64-musl: 1.30.1 + lightningcss-win32-arm64-msvc: 1.30.1 + lightningcss-win32-x64-msvc: 1.30.1 + optional: true - /parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - dependencies: - '@babel/code-frame': 7.22.10 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - dev: true + lilconfig@2.1.0: {} - /pascal-case@3.1.2: - resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} - dependencies: - no-case: 3.0.4 - tslib: 2.6.1 - dev: false + local-access@1.1.0: {} - /path-browserify@1.0.1: - resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} - dev: false + locate-character@3.0.0: {} - /path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - dev: true + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 - /path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 - /path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - dev: true + locate-path@7.2.0: + dependencies: + p-locate: 6.0.0 - /path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + lodash.debounce@4.0.8: {} - /path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - dev: true + lodash.merge@4.6.2: {} - /pathe@1.1.1: - resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} - dev: true + lodash.startcase@4.4.0: {} - /pathval@1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} - dev: true + lodash@4.17.21: {} - /periscopic@3.1.0: - resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} + logform@2.7.0: dependencies: - '@types/estree': 1.0.1 - estree-walker: 3.0.3 - is-reference: 3.0.1 + '@colors/colors': 1.6.0 + '@types/triple-beam': 1.3.5 + fecha: 4.2.3 + ms: 2.1.3 + safe-stable-stringify: 2.5.0 + triple-beam: 1.4.1 - /picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + loupe@3.1.3: {} - /picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} + lower-case@2.0.2: + dependencies: + tslib: 2.8.1 - /pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} - dev: true + lru-cache@10.4.3: {} - /pirates@4.0.6: - resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} - engines: {node: '>= 6'} - dev: true + luxon@3.6.1: {} - /pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} + magic-string@0.30.17: dependencies: - find-up: 4.1.0 - dev: true + '@jridgewell/sourcemap-codec': 1.5.0 - /pkg-types@1.0.3: - resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + merge-options@3.0.4: dependencies: - jsonc-parser: 3.2.0 - mlly: 1.4.2 - pathe: 1.1.1 - dev: true + is-plain-obj: 2.1.0 - /playwright-core@1.30.0: - resolution: {integrity: sha512-7AnRmTCf+GVYhHbLJsGUtskWTE33SwMZkybJ0v6rqR1boxq2x36U7p1vDRV7HO2IwTZgmycracLxPEJI49wu4g==} - engines: {node: '>=14'} - hasBin: true - dev: true + merge-stream@2.0.0: {} - /playwright@1.30.0: - resolution: {integrity: sha512-ENbW5o75HYB3YhnMTKJLTErIBExrSlX2ZZ1C/FzmHjUYIfxj/UnI+DWpQr992m+OQVSg0rCExAOlRwB+x+yyIg==} - engines: {node: '>=14'} - hasBin: true - requiresBuild: true + merge2@1.4.1: {} + + micromatch@4.0.8: dependencies: - playwright-core: 1.30.0 - dev: true + braces: 3.0.3 + picomatch: 2.3.1 - /pluralize@8.0.0: - resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} - engines: {node: '>=4'} - dev: true + mime@3.0.0: {} - /polka@1.0.0-next.22: - resolution: {integrity: sha512-a7tsZy5gFbJr0aUltZS97xCkbPglXuD67AMvTyZX7BTDBH384FWf0ZQF6rPvdutSxnO1vUlXM2zSLf5tCKk5RA==} - engines: {node: '>=8'} - dependencies: - '@polka/url': 1.0.0-next.21 - trouter: 3.2.1 - dev: true + mimic-fn@4.0.0: {} - /postcss-load-config@3.1.4(postcss@8.4.31): - resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} - engines: {node: '>= 10'} - peerDependencies: - postcss: '>=8.0.9' - ts-node: '>=9.0.0' - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - dependencies: - lilconfig: 2.1.0 - postcss: 8.4.31 - yaml: 1.10.2 - dev: true + min-indent@1.0.1: {} - /postcss-safe-parser@6.0.0(postcss@8.4.31): - resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==} - engines: {node: '>=12.0'} - peerDependencies: - postcss: ^8.3.3 + miniflare@4.20250507.0: dependencies: - postcss: 8.4.31 - dev: true + '@cspotcode/source-map-support': 0.8.1 + acorn: 8.14.0 + acorn-walk: 8.3.2 + exit-hook: 2.2.1 + glob-to-regexp: 0.4.1 + stoppable: 1.1.0 + undici: 5.29.0 + workerd: 1.20250507.0 + ws: 8.18.0 + youch: 3.3.4 + zod: 3.22.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate - /postcss-scss@4.0.6(postcss@8.4.31): - resolution: {integrity: sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==} - engines: {node: '>=12.0'} - peerDependencies: - postcss: ^8.4.19 + minimatch@3.1.2: dependencies: - postcss: 8.4.31 - dev: true + brace-expansion: 1.1.11 - /postcss-selector-parser@6.0.13: - resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==} - engines: {node: '>=4'} + minimatch@5.1.6: dependencies: - cssesc: 3.0.0 - util-deprecate: 1.0.2 - dev: true + brace-expansion: 2.0.1 - /postcss@8.4.31: - resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} - engines: {node: ^10 || ^12 || >=14} + minimatch@9.0.5: dependencies: - nanoid: 3.3.6 - picocolors: 1.0.0 - source-map-js: 1.0.2 + brace-expansion: 2.0.1 - /prebuild-install@7.1.1: - resolution: {integrity: sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==} - engines: {node: '>=10'} - hasBin: true - dependencies: - detect-libc: 2.0.2 - expand-template: 2.0.3 - github-from-package: 0.0.0 - minimist: 1.2.8 - mkdirp-classic: 0.5.3 - napi-build-utils: 1.0.2 - node-abi: 3.47.0 - pump: 3.0.0 - rc: 1.2.8 - simple-get: 4.0.1 - tar-fs: 2.1.1 - tunnel-agent: 0.6.0 - dev: true - - /preferred-pm@3.0.3: - resolution: {integrity: sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==} - engines: {node: '>=10'} + minimist@1.2.8: {} + + minipass@7.1.2: {} + + minizlib@3.0.2: dependencies: - find-up: 5.0.0 - find-yarn-workspace-root2: 1.2.16 - path-exists: 4.0.0 - which-pm: 2.0.0 - dev: true + minipass: 7.1.2 - /prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - dev: true + mkdirp@3.0.1: {} - /prettier-plugin-svelte@2.10.1(prettier@2.8.0)(svelte@4.1.2): - resolution: {integrity: sha512-Wlq7Z5v2ueCubWo0TZzKc9XHcm7TDxqcuzRuGd0gcENfzfT4JZ9yDlCbEgxWgiPmLHkBjfOtpAWkcT28MCDpUQ==} - peerDependencies: - prettier: ^1.16.4 || ^2.0.0 - svelte: ^3.2.0 || ^4.0.0-next.0 + module-definition@6.0.1: dependencies: - prettier: 2.8.0 - svelte: 4.1.2 - dev: true + ast-module-types: 6.0.1 + node-source-walk: 7.0.1 - /prettier@2.8.0: - resolution: {integrity: sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==} - engines: {node: '>=10.13.0'} - hasBin: true - dev: true + mri@1.2.0: {} - /prettier@3.0.3: - resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} - engines: {node: '>=14'} - hasBin: true - dev: true + mrmime@2.0.0: {} - /pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.6.3 - ansi-styles: 5.2.0 - react-is: 18.2.0 - dev: true + ms@2.1.3: {} - /prism-svelte@0.5.0: - resolution: {integrity: sha512-db91Bf3pRGKDPz1lAqLFSJXeW13mulUJxhycysFpfXV5MIK7RgWWK2E5aPAa71s8TCzQUXxF5JOV42/iOs6QkA==} - dev: true + mustache@4.2.0: {} - /prismjs@1.29.0: - resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} - engines: {node: '>=6'} - dev: true + nanoid@3.3.11: {} - /prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - dev: false + natural-compare@1.4.0: {} - /pseudomap@1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - dev: true + no-case@3.0.4: + dependencies: + lower-case: 2.0.2 + tslib: 2.8.1 - /pump@3.0.0: - resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + node-fetch@2.7.0: dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - dev: true + whatwg-url: 5.0.0 - /punycode@2.3.0: - resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} - engines: {node: '>=6'} - dev: true + node-gyp-build@4.8.0: {} - /queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + node-source-walk@7.0.1: + dependencies: + '@babel/parser': 7.27.5 - /queue-tick@1.0.1: - resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==} - dev: true + nopt@8.0.0: + dependencies: + abbrev: 2.0.0 - /quick-lru@4.0.1: - resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} - engines: {node: '>=8'} - dev: true + normalize-package-data@6.0.2: + dependencies: + hosted-git-info: 7.0.2 + semver: 7.7.1 + validate-npm-package-license: 3.0.4 - /rc@1.2.8: - resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} - hasBin: true + normalize-path@2.1.1: dependencies: - deep-extend: 0.6.0 - ini: 1.3.8 - minimist: 1.2.8 - strip-json-comments: 2.0.1 - dev: true + remove-trailing-separator: 1.1.0 - /react-is@18.2.0: - resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - dev: true + normalize-path@3.0.0: {} - /read-pkg-up@7.0.1: - resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} - engines: {node: '>=8'} + npm-run-path@5.3.0: dependencies: - find-up: 4.1.0 - read-pkg: 5.2.0 - type-fest: 0.8.1 - dev: true + path-key: 4.0.0 - /read-pkg@5.2.0: - resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} - engines: {node: '>=8'} - dependencies: - '@types/normalize-package-data': 2.4.1 - normalize-package-data: 2.5.0 - parse-json: 5.2.0 - type-fest: 0.6.0 - dev: true + ohash@2.0.11: {} - /read-yaml-file@1.1.0: - resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} - engines: {node: '>=6'} + once@1.4.0: dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.1 - pify: 4.0.1 - strip-bom: 3.0.0 - dev: true + wrappy: 1.0.2 - /readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} + one-time@1.0.0: dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 + fn.name: 1.1.0 - /readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} + onetime@6.0.0: dependencies: - picomatch: 2.3.1 + mimic-fn: 4.0.0 - /redent@3.0.0: - resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} - engines: {node: '>=8'} + optionator@0.9.3: dependencies: - indent-string: 4.0.0 - strip-indent: 3.0.0 - dev: true + '@aashutoshrathi/word-wrap': 1.2.6 + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 - /regenerator-runtime@0.14.0: - resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} - dev: true + os-tmpdir@1.0.2: {} - /regexp-tree@0.1.27: - resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} - hasBin: true - dev: true + outdent@0.5.0: {} - /regexp.prototype.flags@1.5.0: - resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} - engines: {node: '>= 0.4'} + p-event@6.0.1: dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - functions-have-names: 1.2.3 - dev: true - - /regexparam@1.3.0: - resolution: {integrity: sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g==} - engines: {node: '>=6'} - dev: true + p-timeout: 6.1.4 - /regexparam@2.0.1: - resolution: {integrity: sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw==} - engines: {node: '>=8'} - dev: false + p-filter@2.1.0: + dependencies: + p-map: 2.1.0 - /regjsparser@0.10.0: - resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} - hasBin: true + p-limit@2.3.0: dependencies: - jsesc: 0.5.0 - dev: true + p-try: 2.2.0 - /require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - dev: true + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 - /require-main-filename@2.0.0: - resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - dev: true + p-limit@4.0.0: + dependencies: + yocto-queue: 1.2.1 - /resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - dev: true + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 - /resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 - /resolve@1.22.4: - resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} - hasBin: true + p-locate@6.0.0: dependencies: - is-core-module: 2.13.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 + p-limit: 4.0.0 - /reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + p-map@2.1.0: {} - /rimraf@2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - hasBin: true - dependencies: - glob: 7.2.3 - dev: true + p-map@7.0.3: {} - /rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - dependencies: - glob: 7.2.3 + p-timeout@6.1.4: {} - /rollup@3.27.2: - resolution: {integrity: sha512-YGwmHf7h2oUHkVBT248x0yt6vZkYQ3/rvE5iQuVBh3WO8GcJ6BNeOkpoX1yMHIiBm18EMLjBPIoUDkhgnyxGOQ==} - engines: {node: '>=14.18.0', npm: '>=8.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.3 + p-try@2.2.0: {} - /rollup@3.7.0: - resolution: {integrity: sha512-FIJe0msW9P7L9BTfvaJyvn1U1BVCNTL3w8O+PKIrCyiMLg+rIUGb4MbcgVZ10Lnm1uWXOTOWRNARjfXC1+M12Q==} - engines: {node: '>=14.18.0', npm: '>=8.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.3 + package-json-from-dist@1.0.1: {} + + package-manager-detector@0.2.8: {} - /run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + parent-module@1.0.1: dependencies: - queue-microtask: 1.2.3 + callsites: 3.1.0 - /sade@1.8.1: - resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} - engines: {node: '>=6'} + parse-gitignore@2.0.0: {} + + parse-json@8.3.0: dependencies: - mri: 1.2.0 + '@babel/code-frame': 7.27.1 + index-to-position: 1.1.0 + type-fest: 4.41.0 - /safe-array-concat@1.0.0: - resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==} - engines: {node: '>=0.4'} + pascal-case@3.1.2: dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - has-symbols: 1.0.3 - isarray: 2.0.5 - dev: true + no-case: 3.0.4 + tslib: 2.8.1 - /safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + path-exists@4.0.0: {} - /safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - is-regex: 1.1.4 - dev: true + path-exists@5.0.0: {} - /safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - dev: true + path-key@3.1.1: {} + + path-key@4.0.0: {} - /sander@0.5.1: - resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==} + path-parse@1.0.7: {} + + path-scurry@1.11.1: dependencies: - es6-promise: 3.3.1 - graceful-fs: 4.2.11 - mkdirp: 0.5.6 - rimraf: 2.7.1 - dev: true + lru-cache: 10.4.3 + minipass: 7.1.2 - /semiver@1.1.0: - resolution: {integrity: sha512-QNI2ChmuioGC1/xjyYwyZYADILWyW6AmS1UH6gDj/SFUUUS4MBAWs/7mxnkRPc/F4iHezDP+O8t0dO8WHiEOdg==} - engines: {node: '>=6'} - dev: true + path-to-regexp@6.3.0: {} - /semver@5.7.2: - resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} - hasBin: true - dev: true + path-type@4.0.0: {} - /semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true - dev: false + pathe@2.0.3: {} - /semver@7.5.3: - resolution: {integrity: sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: false + pathval@2.0.0: {} - /semver@7.5.4: - resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 + pend@1.2.0: {} - /set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + picocolors@1.1.1: {} - /set-cookie-parser@2.6.0: - resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} - dev: false + picomatch@2.3.1: {} + + picomatch@4.0.2: {} + + pify@4.0.1: {} + + playwright-core@1.51.1: {} - /sharp@0.32.5: - resolution: {integrity: sha512-0dap3iysgDkNaPOaOL4X/0akdu0ma62GcdC2NBQ+93eqpePdDdr2/LM0sFdDSMmN7yS+odyZtPsb7tx/cYBKnQ==} - engines: {node: '>=14.15.0'} - requiresBuild: true + playwright@1.51.1: dependencies: - color: 4.2.3 - detect-libc: 2.0.2 - node-addon-api: 6.1.0 - prebuild-install: 7.1.1 - semver: 7.5.4 - simple-get: 4.0.1 - tar-fs: 3.0.4 - tunnel-agent: 0.6.0 - dev: true - - /shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} + playwright-core: 1.51.1 + optionalDependencies: + fsevents: 2.3.2 + + polka@1.0.0-next.28: dependencies: - shebang-regex: 1.0.0 - dev: true + '@polka/url': 1.0.0-next.28 + trouter: 4.0.0 - /shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} + postcss-load-config@3.1.4(postcss@8.5.6): dependencies: - shebang-regex: 3.0.0 - dev: true + lilconfig: 2.1.0 + yaml: 1.10.2 + optionalDependencies: + postcss: 8.5.6 - /shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - dev: true + postcss-safe-parser@7.0.1(postcss@8.5.6): + dependencies: + postcss: 8.5.6 - /shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - dev: true + postcss-scss@4.0.9(postcss@8.5.6): + dependencies: + postcss: 8.5.6 - /shiki-twoslash@3.1.2(typescript@5.0.4): - resolution: {integrity: sha512-JBcRIIizi+exIA/OUhYkV6jtyeZco0ykCkIRd5sgwIt1Pm4pz+maoaRZpm6SkhPwvif4fCA7xOtJOykhpIV64Q==} - peerDependencies: - typescript: '>3' + postcss-selector-parser@7.1.0: + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + + postcss-values-parser@6.0.2(postcss@8.5.6): dependencies: - '@typescript/twoslash': 3.1.0 - '@typescript/vfs': 1.3.4 - fenceparser: 1.1.1 - shiki: 0.10.1 - typescript: 5.0.4 + color-name: 1.1.4 + is-url-superb: 4.0.0 + postcss: 8.5.6 + quote-unquote: 1.0.0 + + postcss@8.5.6: + dependencies: + nanoid: 3.3.11 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + precinct@12.2.0: + dependencies: + '@dependents/detective-less': 5.0.1 + commander: 12.1.0 + detective-amd: 6.0.1 + detective-cjs: 6.0.1 + detective-es6: 5.0.1 + detective-postcss: 7.0.1(postcss@8.5.6) + detective-sass: 6.0.1 + detective-scss: 5.0.1 + detective-stylus: 5.0.1 + detective-typescript: 14.0.0(typescript@5.8.3) + detective-vue2: 2.2.0(typescript@5.8.3) + module-definition: 6.0.1 + node-source-walk: 7.0.1 + postcss: 8.5.6 + typescript: 5.8.3 transitivePeerDependencies: - supports-color - dev: true - /shiki@0.10.1: - resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} + prelude-ls@1.2.1: {} + + prettier-plugin-svelte@3.2.7(prettier@3.3.3)(svelte@5.23.1): dependencies: - jsonc-parser: 3.2.0 - vscode-oniguruma: 1.7.0 - vscode-textmate: 5.2.0 - dev: true + prettier: 3.3.3 + svelte: 5.23.1 - /side-channel@1.0.4: - resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + prettier-plugin-svelte@3.4.0(prettier@3.6.0)(svelte@5.23.1): dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - object-inspect: 1.12.3 - dev: true + prettier: 3.6.0 + svelte: 5.23.1 - /siginfo@2.0.0: - resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - dev: true + prettier@2.8.8: {} - /signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + prettier@3.3.3: {} - /simple-concat@1.0.1: - resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} - dev: true + prettier@3.6.0: {} - /simple-get@4.0.1: - resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} - dependencies: - decompress-response: 6.0.0 - once: 1.4.0 - simple-concat: 1.0.1 - dev: true + printable-characters@1.0.42: {} - /simple-swizzle@0.2.2: - resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} - dependencies: - is-arrayish: 0.3.2 - dev: true + process-nextick-args@2.0.1: {} - /sirv-cli@2.0.2: - resolution: {integrity: sha512-OtSJDwxsF1NWHc7ps3Sa0s+dPtP15iQNJzfKVz+MxkEo3z72mCD+yu30ct79rPr0CaV1HXSOBp+MIY5uIhHZ1A==} - engines: {node: '>= 10'} - hasBin: true + process@0.11.10: {} + + publint@0.3.0: dependencies: - console-clear: 1.1.1 - get-port: 3.2.0 - kleur: 4.1.5 - local-access: 1.1.0 + '@publint/pack': 0.1.0 + package-manager-detector: 0.2.8 + picocolors: 1.1.1 sade: 1.8.1 - semiver: 1.1.0 - sirv: 2.0.3 - tinydate: 1.3.0 - dev: true - /sirv@2.0.3: - resolution: {integrity: sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==} - engines: {node: '>= 10'} + pump@3.0.2: dependencies: - '@polka/url': 1.0.0-next.21 - mrmime: 1.0.1 - totalist: 3.0.1 + end-of-stream: 1.4.4 + once: 1.4.0 - /sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - dev: false + punycode@2.3.1: {} - /slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - dev: true + queue-microtask@1.2.3: {} - /smartwrap@2.0.2: - resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} - engines: {node: '>=6'} - hasBin: true + quote-unquote@1.0.0: {} + + read-package-up@11.0.0: dependencies: - array.prototype.flat: 1.3.1 - breakword: 1.0.6 - grapheme-splitter: 1.0.4 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - yargs: 15.4.1 - dev: true + find-up-simple: 1.0.1 + read-pkg: 9.0.1 + type-fest: 4.41.0 - /sorcery@0.11.0: - resolution: {integrity: sha512-J69LQ22xrQB1cIFJhPfgtLuI6BpWRiWu1Y3vSsIwK/eAScqJxd/+CJlUuHQRdX2C9NGFamq+KqNywGgaThwfHw==} - hasBin: true + read-pkg@9.0.1: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 - buffer-crc32: 0.2.13 - minimist: 1.2.8 - sander: 0.5.1 - dev: true + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 6.0.2 + parse-json: 8.3.0 + type-fest: 4.41.0 + unicorn-magic: 0.1.0 - /source-map-js@1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} - engines: {node: '>=0.10.0'} + read-yaml-file@1.1.0: + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 - /spawndamnit@2.0.0: - resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + readable-stream@2.3.8: dependencies: - cross-spawn: 5.1.0 - signal-exit: 3.0.7 - dev: true + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 - /spdx-correct@3.2.0: - resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + readable-stream@3.6.2: dependencies: - spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.13 - dev: true + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 - /spdx-exceptions@2.3.0: - resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} - dev: true + readable-stream@4.7.0: + dependencies: + abort-controller: 3.0.0 + buffer: 6.0.3 + events: 3.3.0 + process: 0.11.10 + string_decoder: 1.3.0 - /spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + readdir-glob@1.1.3: dependencies: - spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.13 - dev: true + minimatch: 5.1.6 - /spdx-license-ids@3.0.13: - resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} - dev: true + readdirp@4.0.1: {} - /sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: true + redirect-pkg@file:packages/kit/test/apps/basics/_test_dependencies/redirect-pkg(@sveltejs/kit@packages+kit): + dependencies: + '@sveltejs/kit': link:packages/kit - /stackback@0.0.2: - resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - dev: true + regenerator-runtime@0.14.1: {} - /std-env@3.3.3: - resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==} - dev: true + regexparam@3.0.0: {} - /stream-transform@2.1.3: - resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} - dependencies: - mixme: 0.5.9 - dev: true + remove-trailing-separator@1.1.0: {} - /streamx@2.15.1: - resolution: {integrity: sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==} - dependencies: - fast-fifo: 1.3.2 - queue-tick: 1.0.1 - dev: true + require-directory@2.1.1: {} - /string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 + require-package-name@2.0.1: {} - /string.prototype.trim@1.2.7: - resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} - engines: {node: '>= 0.4'} + resolve-from@4.0.0: {} + + resolve-from@5.0.0: {} + + resolve-pkg-maps@1.0.0: {} + + resolve@1.22.8: dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 - dev: true + is-core-module: 2.13.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 - /string.prototype.trimend@1.0.6: - resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} + resolve@2.0.0-next.5: dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 - dev: true + is-core-module: 2.13.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + + reusify@1.0.4: {} - /string.prototype.trimstart@1.0.6: - resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} + rollup@4.40.1: dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.22.1 - dev: true + '@types/estree': 1.0.7 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.40.1 + '@rollup/rollup-android-arm64': 4.40.1 + '@rollup/rollup-darwin-arm64': 4.40.1 + '@rollup/rollup-darwin-x64': 4.40.1 + '@rollup/rollup-freebsd-arm64': 4.40.1 + '@rollup/rollup-freebsd-x64': 4.40.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.40.1 + '@rollup/rollup-linux-arm-musleabihf': 4.40.1 + '@rollup/rollup-linux-arm64-gnu': 4.40.1 + '@rollup/rollup-linux-arm64-musl': 4.40.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.40.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.40.1 + '@rollup/rollup-linux-riscv64-gnu': 4.40.1 + '@rollup/rollup-linux-riscv64-musl': 4.40.1 + '@rollup/rollup-linux-s390x-gnu': 4.40.1 + '@rollup/rollup-linux-x64-gnu': 4.40.1 + '@rollup/rollup-linux-x64-musl': 4.40.1 + '@rollup/rollup-win32-arm64-msvc': 4.40.1 + '@rollup/rollup-win32-ia32-msvc': 4.40.1 + '@rollup/rollup-win32-x64-msvc': 4.40.1 + fsevents: 2.3.3 - /string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + run-parallel@1.2.0: dependencies: - safe-buffer: 5.2.1 + queue-microtask: 1.2.3 - /strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} + sade@1.8.1: dependencies: - ansi-regex: 5.0.1 + mri: 1.2.0 - /strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - dev: true + safe-buffer@5.1.2: {} - /strip-indent@3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} - dependencies: - min-indent: 1.0.1 - dev: true + safe-buffer@5.2.1: {} - /strip-json-comments@2.0.1: - resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} - engines: {node: '>=0.10.0'} - dev: true + safe-stable-stringify@2.5.0: {} - /strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - dev: true + safer-buffer@2.1.2: {} - /strip-literal@1.3.0: - resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} - dependencies: - acorn: 8.10.0 - dev: true + semiver@1.1.0: {} - /sucrase@3.29.0: - resolution: {integrity: sha512-bZPAuGA5SdFHuzqIhTAqt9fvNEo9rESqXIG3oiKdF8K4UmkQxC4KlNL3lVyAErXp+mPvUqZ5l13qx6TrDIGf3A==} - engines: {node: '>=8'} - hasBin: true - dependencies: - commander: 4.1.1 - glob: 7.1.6 - lines-and-columns: 1.2.4 - mz: 2.7.0 - pirates: 4.0.6 - ts-interface-checker: 0.1.13 - dev: true + semver@7.7.1: {} - /supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - dependencies: - has-flag: 3.0.0 - dev: true + server-side-dep@file:packages/adapter-cloudflare/test/apps/pages/server-side-dep: {} - /supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - dev: true + server-side-dep@file:packages/adapter-cloudflare/test/apps/workers/server-side-dep: {} - /supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} + set-cookie-parser@2.6.0: {} - /svelte-check@3.4.4(postcss@8.4.31)(svelte@4.1.2): - resolution: {integrity: sha512-Uys9+R65cj8TmP8f5UpS7B2xKpNLYNxEWJsA5ZoKcWq/uwvABFF7xS6iPQGLoa7hxz0DS6xU60YFpmq06E4JxA==} - hasBin: true - peerDependencies: - svelte: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 + sharp@0.33.5: dependencies: - '@jridgewell/trace-mapping': 0.3.19 - chokidar: 3.5.3 - fast-glob: 3.3.1 - import-fresh: 3.3.0 - picocolors: 1.0.0 - sade: 1.8.1 - svelte: 4.1.2 - svelte-preprocess: 5.0.4(postcss@8.4.31)(svelte@4.1.2)(typescript@5.2.2) - typescript: 5.2.2 - transitivePeerDependencies: - - '@babel/core' - - coffeescript - - less - - postcss - - postcss-load-config - - pug - - sass - - stylus - - sugarss - dev: true + color: 4.2.3 + detect-libc: 2.0.3 + semver: 7.7.1 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.33.5 + '@img/sharp-darwin-x64': 0.33.5 + '@img/sharp-libvips-darwin-arm64': 1.0.4 + '@img/sharp-libvips-darwin-x64': 1.0.4 + '@img/sharp-libvips-linux-arm': 1.0.5 + '@img/sharp-libvips-linux-arm64': 1.0.4 + '@img/sharp-libvips-linux-s390x': 1.0.4 + '@img/sharp-libvips-linux-x64': 1.0.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + '@img/sharp-linux-arm': 0.33.5 + '@img/sharp-linux-arm64': 0.33.5 + '@img/sharp-linux-s390x': 0.33.5 + '@img/sharp-linux-x64': 0.33.5 + '@img/sharp-linuxmusl-arm64': 0.33.5 + '@img/sharp-linuxmusl-x64': 0.33.5 + '@img/sharp-wasm32': 0.33.5 + '@img/sharp-win32-ia32': 0.33.5 + '@img/sharp-win32-x64': 0.33.5 + optional: true - /svelte-eslint-parser@0.31.0(svelte@4.1.2): - resolution: {integrity: sha512-/31RpBf/e3YjoFphjsyo3JRyN1r4UalGAGafXrZ6EJK4h4COOO0rbfBoen5byGsXnIJKsrlC1lkEd2Vzpq2IDg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - svelte: ^3.37.0 || ^4.0.0-0 - peerDependenciesMeta: - svelte: - optional: true + sharp@0.34.1: dependencies: - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.2 - espree: 9.6.1 - postcss: 8.4.31 - postcss-scss: 4.0.6(postcss@8.4.31) - svelte: 4.1.2 - dev: true - - /svelte-hmr@0.15.3(svelte@4.1.2): - resolution: {integrity: sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==} - engines: {node: ^12.20 || ^14.13.1 || >= 16} - peerDependencies: - svelte: ^3.19.0 || ^4.0.0 + color: 4.2.3 + detect-libc: 2.0.3 + semver: 7.7.1 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.34.1 + '@img/sharp-darwin-x64': 0.34.1 + '@img/sharp-libvips-darwin-arm64': 1.1.0 + '@img/sharp-libvips-darwin-x64': 1.1.0 + '@img/sharp-libvips-linux-arm': 1.1.0 + '@img/sharp-libvips-linux-arm64': 1.1.0 + '@img/sharp-libvips-linux-ppc64': 1.1.0 + '@img/sharp-libvips-linux-s390x': 1.1.0 + '@img/sharp-libvips-linux-x64': 1.1.0 + '@img/sharp-libvips-linuxmusl-arm64': 1.1.0 + '@img/sharp-libvips-linuxmusl-x64': 1.1.0 + '@img/sharp-linux-arm': 0.34.1 + '@img/sharp-linux-arm64': 0.34.1 + '@img/sharp-linux-s390x': 0.34.1 + '@img/sharp-linux-x64': 0.34.1 + '@img/sharp-linuxmusl-arm64': 0.34.1 + '@img/sharp-linuxmusl-x64': 0.34.1 + '@img/sharp-wasm32': 0.34.1 + '@img/sharp-win32-ia32': 0.34.1 + '@img/sharp-win32-x64': 0.34.1 + + shebang-command@2.0.0: dependencies: - svelte: 4.1.2 - dev: false + shebang-regex: 3.0.0 - /svelte-local-storage-store@0.6.0(svelte@4.2.0): - resolution: {integrity: sha512-UbCY/yT/YUadU5IX/gZkoRQnA+ebFZHKKQjlJvfWHnBj3CPe9sNn8ndxYz/xy4LUzGjuBLq8+wH5RYK54ba3wA==} - engines: {node: '>=0.14'} - peerDependencies: - svelte: ^3.48.0 || ^4.0.0 + shebang-regex@3.0.0: {} + + siginfo@2.0.0: {} + + signal-exit@4.1.0: {} + + simple-swizzle@0.2.2: dependencies: - svelte: 4.2.0 - dev: true + is-arrayish: 0.3.2 - /svelte-preprocess@5.0.4(postcss@8.4.31)(svelte@4.1.2)(typescript@4.9.4): - resolution: {integrity: sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==} - engines: {node: '>= 14.10.0'} - requiresBuild: true - peerDependencies: - '@babel/core': ^7.10.2 - coffeescript: ^2.5.1 - less: ^3.11.3 || ^4.0.0 - postcss: ^7 || ^8 - postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 - pug: ^3.0.0 - sass: ^1.26.8 - stylus: ^0.55.0 - sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0 - svelte: ^3.23.0 || ^4.0.0-next.0 || ^4.0.0 - typescript: '>=3.9.5 || ^4.0.0 || ^5.0.0' - peerDependenciesMeta: - '@babel/core': - optional: true - coffeescript: - optional: true - less: - optional: true - postcss: - optional: true - postcss-load-config: - optional: true - pug: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - typescript: - optional: true + sirv-cli@3.0.0: dependencies: - '@types/pug': 2.0.6 - detect-indent: 6.1.0 - magic-string: 0.27.0 - postcss: 8.4.31 - sorcery: 0.11.0 - strip-indent: 3.0.0 - svelte: 4.1.2 - typescript: 4.9.4 - dev: true - - /svelte-preprocess@5.0.4(postcss@8.4.31)(svelte@4.1.2)(typescript@5.2.2): - resolution: {integrity: sha512-ABia2QegosxOGsVlsSBJvoWeXy1wUKSfF7SWJdTjLAbx/Y3SrVevvvbFNQqrSJw89+lNSsM58SipmZJ5SRi5iw==} - engines: {node: '>= 14.10.0'} - requiresBuild: true - peerDependencies: - '@babel/core': ^7.10.2 - coffeescript: ^2.5.1 - less: ^3.11.3 || ^4.0.0 - postcss: ^7 || ^8 - postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 - pug: ^3.0.0 - sass: ^1.26.8 - stylus: ^0.55.0 - sugarss: ^2.0.0 || ^3.0.0 || ^4.0.0 - svelte: ^3.23.0 || ^4.0.0-next.0 || ^4.0.0 - typescript: '>=3.9.5 || ^4.0.0 || ^5.0.0' - peerDependenciesMeta: - '@babel/core': - optional: true - coffeescript: - optional: true - less: - optional: true - postcss: - optional: true - postcss-load-config: - optional: true - pug: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - typescript: - optional: true + console-clear: 1.1.1 + get-port: 5.1.1 + kleur: 4.1.5 + local-access: 1.1.0 + sade: 1.8.1 + semiver: 1.1.0 + sirv: 3.0.0 + tinydate: 1.3.0 + + sirv@3.0.0: dependencies: - '@types/pug': 2.0.6 - detect-indent: 6.1.0 - magic-string: 0.27.0 - postcss: 8.4.31 - sorcery: 0.11.0 - strip-indent: 3.0.0 - svelte: 4.1.2 - typescript: 5.2.2 - dev: true + '@polka/url': 1.0.0-next.28 + mrmime: 2.0.0 + totalist: 3.0.1 - /svelte2tsx@0.6.19(svelte@4.1.2)(typescript@4.9.4): - resolution: {integrity: sha512-h3b5OtcO8zyVL/RiB2zsDwCopeo/UH+887uyhgb2mjnewOFwiTxu+4IGuVwrrlyuh2onM2ktfUemNrNmQwXONQ==} - peerDependencies: - svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 - typescript: ^4.9.4 || ^5.0.0 + slash@3.0.0: {} + + source-map-js@1.2.1: {} + + source-map-support@0.5.21: dependencies: - dedent-js: 1.0.1 - pascal-case: 3.1.2 - svelte: 4.1.2 - typescript: 4.9.4 - dev: false + buffer-from: 1.1.2 + source-map: 0.6.1 - /svelte@4.1.2: - resolution: {integrity: sha512-/evA8U6CgOHe5ZD1C1W3va9iJG7mWflcCdghBORJaAhD2JzrVERJty/2gl0pIPrJYBGZwZycH6onYf+64XXF9g==} - engines: {node: '>=16'} + source-map@0.6.1: {} + + spawndamnit@3.0.1: dependencies: - '@ampproject/remapping': 2.2.1 - '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.19 - acorn: 8.10.0 - aria-query: 5.3.0 - axobject-query: 3.2.1 - code-red: 1.0.3 - css-tree: 2.3.1 - estree-walker: 3.0.3 - is-reference: 3.0.1 - locate-character: 3.0.0 - magic-string: 0.30.3 - periscopic: 3.1.0 + cross-spawn: 7.0.6 + signal-exit: 4.1.0 - /svelte@4.2.0: - resolution: {integrity: sha512-kVsdPjDbLrv74SmLSUzAsBGquMs4MPgWGkGLpH+PjOYnFOziAvENVzgJmyOCV2gntxE32aNm8/sqNKD6LbIpeQ==} - engines: {node: '>=16'} + spdx-correct@3.2.0: dependencies: - '@ampproject/remapping': 2.2.1 - '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.19 - acorn: 8.10.0 - aria-query: 5.3.0 - axobject-query: 3.2.1 - code-red: 1.0.4 - css-tree: 2.3.1 - estree-walker: 3.0.3 - is-reference: 3.0.2 - locate-character: 3.0.0 - magic-string: 0.30.3 - periscopic: 3.1.0 - dev: true + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.21 - /tar-fs@2.1.1: - resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} - dependencies: - chownr: 1.1.4 - mkdirp-classic: 0.5.3 - pump: 3.0.0 - tar-stream: 2.2.0 - dev: true + spdx-exceptions@2.5.0: {} - /tar-fs@3.0.4: - resolution: {integrity: sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==} + spdx-expression-parse@3.0.1: dependencies: - mkdirp-classic: 0.5.3 - pump: 3.0.0 - tar-stream: 3.1.6 - dev: true + spdx-exceptions: 2.5.0 + spdx-license-ids: 3.0.21 - /tar-stream@2.2.0: - resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} - engines: {node: '>=6'} + spdx-license-ids@3.0.21: {} + + sprintf-js@1.0.3: {} + + stack-trace@0.0.10: {} + + stackback@0.0.2: {} + + stacktracey@2.1.8: dependencies: - bl: 4.1.0 - end-of-stream: 1.4.4 - fs-constants: 1.0.0 - inherits: 2.0.4 - readable-stream: 3.6.2 - dev: true + as-table: 1.0.55 + get-source: 2.0.12 + + std-env@3.9.0: {} - /tar-stream@3.1.6: - resolution: {integrity: sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==} + stoppable@1.1.0: {} + + streamx@2.22.1: dependencies: - b4a: 1.6.4 fast-fifo: 1.3.2 - streamx: 2.15.1 - dev: true + text-decoder: 1.2.3 + optionalDependencies: + bare-events: 2.5.4 - /tar@6.1.15: - resolution: {integrity: sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==} - engines: {node: '>=10'} + string-width@4.2.3: dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 5.0.0 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - dev: false - - /term-size@2.2.1: - resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} - engines: {node: '>=8'} - dev: true + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 - /test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} + string-width@5.1.2: dependencies: - '@istanbuljs/schema': 0.1.3 - glob: 7.2.3 - minimatch: 3.1.2 - dev: true + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 - /text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - dev: true + string_decoder@1.1.1: + dependencies: + safe-buffer: 5.1.2 - /thenify-all@1.6.0: - resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} - engines: {node: '>=0.8'} + string_decoder@1.3.0: dependencies: - thenify: 3.3.1 - dev: true + safe-buffer: 5.2.1 - /thenify@3.3.1: - resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + strip-ansi@6.0.1: dependencies: - any-promise: 1.3.0 - dev: true + ansi-regex: 5.0.1 - /tiny-glob@0.2.9: - resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} + strip-ansi@7.1.0: dependencies: - globalyzer: 0.1.0 - globrex: 0.1.2 + ansi-regex: 6.1.0 - /tinybench@2.5.0: - resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} - dev: true + strip-bom@3.0.0: {} - /tinydate@1.3.0: - resolution: {integrity: sha512-7cR8rLy2QhYHpsBDBVYnnWXm8uRTr38RoZakFSW7Bs7PzfMPNZthuMLkwqZv7MTu8lhQ91cOFYS5a7iFj2oR3w==} - engines: {node: '>=4'} - dev: true + strip-final-newline@3.0.0: {} - /tinypool@0.7.0: - resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} - engines: {node: '>=14.0.0'} - dev: true + strip-indent@3.0.0: + dependencies: + min-indent: 1.0.1 - /tinyspy@2.1.1: - resolution: {integrity: sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w==} - engines: {node: '>=14.0.0'} - dev: true + strip-json-comments@3.1.1: {} - /tmp@0.0.33: - resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} - engines: {node: '>=0.6.0'} + strip-literal@3.0.0: dependencies: - os-tmpdir: 1.0.2 - dev: true + js-tokens: 9.0.1 - /to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} + supports-color@7.2.0: dependencies: - is-number: 7.0.0 + has-flag: 4.0.0 - /topojson-client@3.1.0: - resolution: {integrity: sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==} - hasBin: true + supports-preserve-symlinks-flag@1.0.0: {} + + svelte-check@4.1.1(picomatch@4.0.2)(svelte@5.23.1)(typescript@5.6.3): dependencies: - commander: 2.20.3 - dev: false + '@jridgewell/trace-mapping': 0.3.25 + chokidar: 4.0.3 + fdir: 6.4.6(picomatch@4.0.2) + picocolors: 1.1.1 + sade: 1.8.1 + svelte: 5.23.1 + typescript: 5.6.3 + transitivePeerDependencies: + - picomatch - /totalist@3.0.1: - resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} - engines: {node: '>=6'} + svelte-eslint-parser@1.2.0(svelte@5.23.1): + dependencies: + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + postcss: 8.5.6 + postcss-scss: 4.0.9(postcss@8.5.6) + postcss-selector-parser: 7.1.0 + optionalDependencies: + svelte: 5.23.1 - /tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + svelte-parse-markup@0.1.5(svelte@5.23.1): + dependencies: + svelte: 5.23.1 - /trim-newlines@3.0.1: - resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} - engines: {node: '>=8'} - dev: true + svelte-preprocess@6.0.0(postcss-load-config@3.1.4(postcss@8.5.6))(postcss@8.5.6)(svelte@5.23.1)(typescript@5.6.3): + dependencies: + detect-indent: 6.1.0 + strip-indent: 3.0.0 + svelte: 5.23.1 + optionalDependencies: + postcss: 8.5.6 + postcss-load-config: 3.1.4(postcss@8.5.6) + typescript: 5.6.3 - /trouter@3.2.1: - resolution: {integrity: sha512-oY3CmIiEYOe1YMEzh++I67lrNOUldtCeuLL0vRPydvQLHZpSJ03B5dgDFlpFsiriMq6e//NDjjopjUzXOztHow==} - engines: {node: '>=6'} + svelte2tsx@0.7.33(svelte@5.23.1)(typescript@5.6.3): dependencies: - regexparam: 1.3.0 - dev: true + dedent-js: 1.0.1 + pascal-case: 3.1.2 + svelte: 5.23.1 + typescript: 5.6.3 + + svelte@5.23.1: + dependencies: + '@ampproject/remapping': 2.3.0 + '@jridgewell/sourcemap-codec': 1.5.0 + '@sveltejs/acorn-typescript': 1.0.5(acorn@8.14.1) + '@types/estree': 1.0.7 + acorn: 8.14.1 + aria-query: 5.3.2 + axobject-query: 4.1.0 + clsx: 2.1.1 + esm-env: 1.2.2 + esrap: 1.4.5 + is-reference: 3.0.3 + locate-character: 3.0.0 + magic-string: 0.30.17 + zimmerframe: 1.1.2 - /ts-api-utils@1.0.1(typescript@4.9.4): - resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} - engines: {node: '>=16.13.0'} - peerDependencies: - typescript: '>=4.2.0' + tapable@2.2.1: {} + + tar-stream@3.1.7: dependencies: - typescript: 4.9.4 - dev: true + b4a: 1.6.7 + fast-fifo: 1.3.2 + streamx: 2.22.1 - /ts-api-utils@1.0.2(typescript@5.0.4): - resolution: {integrity: sha512-Cbu4nIqnEdd+THNEsBdkolnOXhg0I8XteoHaEKgvsxpsbWda4IsUut2c187HxywQCvveojow0Dgw/amxtSKVkQ==} - engines: {node: '>=16.13.0'} - peerDependencies: - typescript: '>=4.2.0' + tar@7.4.3: dependencies: - typescript: 5.0.4 - dev: true + '@isaacs/fs-minipass': 4.0.1 + chownr: 3.0.0 + minipass: 7.1.2 + minizlib: 3.0.2 + mkdirp: 3.0.1 + yallist: 5.0.0 - /ts-api-utils@1.0.3(typescript@4.9.4): - resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} - engines: {node: '>=16.13.0'} - peerDependencies: - typescript: '>=4.2.0' + term-size@2.2.1: {} + + text-decoder@1.2.3: dependencies: - typescript: 4.9.4 - dev: true + b4a: 1.6.7 + + text-hex@1.0.0: {} + + tinybench@2.9.0: {} - /ts-interface-checker@0.1.13: - resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - dev: true + tinydate@1.3.0: {} - /ts-morph@20.0.0: - resolution: {integrity: sha512-JVmEJy2Wow5n/84I3igthL9sudQ8qzjh/6i4tmYCm6IqYyKFlNbJZi7oBdjyqcWSWYRu3CtL0xbT6fS03ESZIg==} + tinyexec@0.3.2: {} + + tinyglobby@0.2.14: dependencies: - '@ts-morph/common': 0.21.0 - code-block-writer: 12.0.0 - dev: false + fdir: 6.4.6(picomatch@4.0.2) + picomatch: 4.0.2 - /tslib@2.6.1: - resolution: {integrity: sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==} - dev: false + tinypool@1.1.0: {} - /tty-table@4.2.1: - resolution: {integrity: sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g==} - engines: {node: '>=8.0.0'} - hasBin: true + tinyrainbow@2.0.0: {} + + tinyspy@4.0.3: {} + + tmp-promise@3.0.3: dependencies: - chalk: 4.1.2 - csv: 5.5.3 - kleur: 4.1.5 - smartwrap: 2.0.2 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - yargs: 17.7.2 - dev: true + tmp: 0.2.3 - /tunnel-agent@0.6.0: - resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + tmp@0.0.33: dependencies: - safe-buffer: 5.2.1 - dev: true + os-tmpdir: 1.0.2 - /type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} + tmp@0.2.3: {} + + to-regex-range@5.0.1: dependencies: - prelude-ls: 1.2.1 - dev: true + is-number: 7.0.0 - /type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - dev: true + toml@3.0.0: {} - /type-fest@0.13.1: - resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} - engines: {node: '>=10'} - dev: true + totalist@3.0.1: {} - /type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - dev: true + tr46@0.0.3: {} - /type-fest@0.6.0: - resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} - engines: {node: '>=8'} - dev: true + triple-beam@1.4.1: {} - /type-fest@0.8.1: - resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} - engines: {node: '>=8'} - dev: true + trouter@4.0.0: + dependencies: + regexparam: 3.0.0 - /typed-array-buffer@1.0.0: - resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} - engines: {node: '>= 0.4'} + ts-api-utils@1.3.0(typescript@5.6.3): dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - is-typed-array: 1.1.12 - dev: true + typescript: 5.6.3 - /typed-array-byte-length@1.0.0: - resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} - engines: {node: '>= 0.4'} + ts-api-utils@2.1.0(typescript@5.8.3): dependencies: - call-bind: 1.0.2 - for-each: 0.3.3 - has-proto: 1.0.1 - is-typed-array: 1.1.12 - dev: true + typescript: 5.8.3 - /typed-array-byte-offset@1.0.0: - resolution: {integrity: sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==} - engines: {node: '>= 0.4'} + ts-declaration-location@1.0.7(typescript@5.8.3): dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - has-proto: 1.0.1 - is-typed-array: 1.1.12 - dev: true + picomatch: 4.0.2 + typescript: 5.8.3 + + tslib@2.8.1: {} - /typed-array-length@1.0.4: - resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + type-check@0.4.0: dependencies: - call-bind: 1.0.2 - for-each: 0.3.3 - is-typed-array: 1.1.12 - dev: true + prelude-ls: 1.2.1 - /typescript@4.9.4: - resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} - engines: {node: '>=4.2.0'} - hasBin: true + type-fest@4.41.0: {} - /typescript@5.0.4: - resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} - engines: {node: '>=12.20'} - hasBin: true + typescript-eslint@8.35.0(eslint@9.29.0)(typescript@5.8.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.35.0(@typescript-eslint/parser@8.35.0(eslint@9.29.0)(typescript@5.8.3))(eslint@9.29.0)(typescript@5.8.3) + '@typescript-eslint/parser': 8.35.0(eslint@9.29.0)(typescript@5.8.3) + '@typescript-eslint/utils': 8.35.0(eslint@9.29.0)(typescript@5.8.3) + eslint: 9.29.0 + typescript: 5.8.3 + transitivePeerDependencies: + - supports-color - /typescript@5.2.2: - resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} - engines: {node: '>=14.17'} - hasBin: true - dev: true + typescript@5.6.3: {} + + typescript@5.8.3: {} - /ufo@1.3.0: - resolution: {integrity: sha512-bRn3CsoojyNStCZe0BG0Mt4Nr/4KF+rhFlnNXybgqt5pXHNFRlqinSoQaTrGyzE4X8aHplSb+TorH+COin9Yxw==} - dev: true + ufo@1.6.1: {} - /unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + undici-types@5.26.5: {} + + undici@5.29.0: dependencies: - call-bind: 1.0.2 - has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 - dev: true + '@fastify/busboy': 2.1.1 - /undici@5.26.3: - resolution: {integrity: sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==} - engines: {node: '>=14.0'} + unenv@2.0.0-rc.15: dependencies: - '@fastify/busboy': 2.0.0 - dev: false + defu: 6.1.4 + exsolve: 1.0.4 + ohash: 2.0.11 + pathe: 2.0.3 + ufo: 1.6.1 - /universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} - dev: true + unicorn-magic@0.1.0: {} - /update-browserslist-db@1.0.11(browserslist@4.21.10): - resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' + universalify@0.1.2: {} + + unixify@1.0.0: dependencies: - browserslist: 4.21.10 - escalade: 3.1.1 - picocolors: 1.0.0 - dev: true + normalize-path: 2.1.1 - /uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + uri-js@4.4.1: dependencies: - punycode: 2.3.0 - dev: true + punycode: 2.3.1 - /urlpattern-polyfill@8.0.2: - resolution: {integrity: sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==} - dev: true + urlpattern-polyfill@10.1.0: {} - /util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + urlpattern-polyfill@8.0.2: {} - /uvu@0.5.6: - resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} - engines: {node: '>=8'} - hasBin: true + util-deprecate@1.0.2: {} + + uuid@11.1.0: {} + + uvu@0.5.6: dependencies: dequal: 2.0.3 - diff: 5.1.0 + diff: 5.2.0 kleur: 4.1.5 sade: 1.8.1 - dev: true - - /v8-to-istanbul@9.1.0: - resolution: {integrity: sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==} - engines: {node: '>=10.12.0'} - dependencies: - '@jridgewell/trace-mapping': 0.3.19 - '@types/istanbul-lib-coverage': 2.0.4 - convert-source-map: 1.9.0 - dev: true - /validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + validate-npm-package-license@3.0.4: dependencies: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - dev: true - /vite-imagetools@6.0.0(rollup@3.7.0): - resolution: {integrity: sha512-t/k4LXN6+V+otKRM3EAsqG/iHS2Ja8S+biEJWBJk5IKeyQpJ2KZKR5hAn7n5UlNC7J5EzUpiBkUyUFKxGr90fw==} - engines: {node: '>=12.0.0'} + vite-imagetools@7.1.0(rollup@4.40.1): dependencies: - '@rollup/pluginutils': 5.0.4(rollup@3.7.0) - imagetools-core: 5.0.0 + '@rollup/pluginutils': 5.1.3(rollup@4.40.1) + imagetools-core: 7.1.0 + sharp: 0.34.1 transitivePeerDependencies: - rollup - dev: true - /vite-node@0.34.5(@types/node@16.18.6)(lightningcss@1.21.8): - resolution: {integrity: sha512-RNZ+DwbCvDoI5CbCSQSyRyzDTfFvFauvMs6Yq4ObJROKlIKuat1KgSX/Ako5rlDMfVCyMcpMRMTkJBxd6z8YRA==} - engines: {node: '>=v14.18.0'} - hasBin: true + vite-node@3.2.3(@types/node@18.19.50)(lightningcss@1.30.1): dependencies: cac: 6.7.14 - debug: 4.3.4 - mlly: 1.4.2 - pathe: 1.1.1 - picocolors: 1.0.0 - vite: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) + debug: 4.4.1 + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) transitivePeerDependencies: - '@types/node' + - jiti - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color - terser - dev: true + - tsx + - yaml - /vite@4.4.9(@types/node@16.18.6)(lightningcss@1.21.8): - resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true + vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1): dependencies: - '@types/node': 16.18.6 - esbuild: 0.18.20 - lightningcss: 1.21.8 - postcss: 8.4.31 - rollup: 3.27.2 + esbuild: 0.25.5 + fdir: 6.4.6(picomatch@4.0.2) + picomatch: 4.0.2 + postcss: 8.5.6 + rollup: 4.40.1 + tinyglobby: 0.2.14 optionalDependencies: + '@types/node': 18.19.50 fsevents: 2.3.3 + lightningcss: 1.30.1 - /vitefu@0.2.4(vite@4.4.9): - resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} - peerDependencies: - vite: ^3.0.0 || ^4.0.0 - peerDependenciesMeta: - vite: - optional: true - dependencies: - vite: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) - dev: false - - /vitest@0.34.5(lightningcss@1.21.8)(playwright@1.30.0): - resolution: {integrity: sha512-CPI68mmnr2DThSB3frSuE5RLm9wo5wU4fbDrDwWQQB1CWgq9jQVoQwnQSzYAjdoBOPoH2UtXpOgHVge/uScfZg==} - engines: {node: '>=v14.18.0'} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@vitest/browser': '*' - '@vitest/ui': '*' - happy-dom: '*' - jsdom: '*' - playwright: '*' - safaridriver: '*' - webdriverio: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - playwright: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true - dependencies: - '@types/chai': 4.3.6 - '@types/chai-subset': 1.3.3 - '@types/node': 16.18.6 - '@vitest/expect': 0.34.5 - '@vitest/runner': 0.34.5 - '@vitest/snapshot': 0.34.5 - '@vitest/spy': 0.34.5 - '@vitest/utils': 0.34.5 - acorn: 8.10.0 - acorn-walk: 8.2.0 - cac: 6.7.14 - chai: 4.3.8 - debug: 4.3.4 - local-pkg: 0.4.3 - magic-string: 0.30.3 - pathe: 1.1.1 - picocolors: 1.0.0 - playwright: 1.30.0 - std-env: 3.3.3 - strip-literal: 1.3.0 - tinybench: 2.5.0 - tinypool: 0.7.0 - vite: 4.4.9(@types/node@16.18.6)(lightningcss@1.21.8) - vite-node: 0.34.5(@types/node@16.18.6)(lightningcss@1.21.8) - why-is-node-running: 2.2.2 + vitefu@1.0.6(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)): + optionalDependencies: + vite: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + + vitest@3.2.3(@types/node@18.19.50)(lightningcss@1.30.1): + dependencies: + '@types/chai': 5.2.2 + '@vitest/expect': 3.2.3 + '@vitest/mocker': 3.2.3(vite@6.3.5(@types/node@18.19.50)(lightningcss@1.30.1)) + '@vitest/pretty-format': 3.2.3 + '@vitest/runner': 3.2.3 + '@vitest/snapshot': 3.2.3 + '@vitest/spy': 3.2.3 + '@vitest/utils': 3.2.3 + chai: 5.2.0 + debug: 4.4.1 + expect-type: 1.2.1 + magic-string: 0.30.17 + pathe: 2.0.3 + picomatch: 4.0.2 + std-env: 3.9.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.14 + tinypool: 1.1.0 + tinyrainbow: 2.0.0 + vite: 6.3.5(@types/node@18.19.50)(lightningcss@1.30.1) + vite-node: 3.2.3(@types/node@18.19.50)(lightningcss@1.30.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 18.19.50 transitivePeerDependencies: + - jiti - less - lightningcss + - msw - sass + - sass-embedded - stylus - sugarss - supports-color - terser - dev: true + - tsx + - yaml - /vscode-oniguruma@1.7.0: - resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} - dev: true + webidl-conversions@3.0.1: {} - /vscode-textmate@5.2.0: - resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} - dev: true - - /wcwidth@1.0.1: - resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} - dependencies: - defaults: 1.0.4 - dev: true - - /webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - - /whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + whatwg-url@5.0.0: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - /which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 - dev: true - - /which-module@2.0.1: - resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} - dev: true - - /which-pm@2.0.0: - resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} - engines: {node: '>=8.15'} - dependencies: - load-yaml-file: 0.2.0 - path-exists: 4.0.0 - dev: true - - /which-typed-array@1.1.11: - resolution: {integrity: sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 - dev: true - - /which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - dependencies: - isexe: 2.0.0 - dev: true - - /which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true + which@2.0.2: dependencies: isexe: 2.0.0 - dev: true - /why-is-node-running@2.2.2: - resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} - engines: {node: '>=8'} - hasBin: true + why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0 stackback: 0.0.2 - dev: true - /wide-align@1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} + winston-transport@4.9.0: dependencies: - string-width: 4.2.3 - dev: false + logform: 2.7.0 + readable-stream: 3.6.2 + triple-beam: 1.4.1 - /worktop@0.8.0-next.15: - resolution: {integrity: sha512-0ycNO52P6nVwsjr1y20zuf0nqJatAb8L7MODBfQIxbxndHV5O4s50oZZMHWhJG1RLpHwbK0Epq8aaQK4E2GlgQ==} - engines: {node: '>=12'} + winston@3.17.0: dependencies: - mrmime: 1.0.1 - regexparam: 2.0.1 - dev: false + '@colors/colors': 1.6.0 + '@dabh/diagnostics': 2.0.3 + async: 3.2.6 + is-stream: 2.0.1 + logform: 2.7.0 + one-time: 1.0.0 + readable-stream: 3.6.2 + safe-stable-stringify: 2.5.0 + stack-trace: 0.0.10 + triple-beam: 1.4.1 + winston-transport: 4.9.0 - /wrap-ansi@6.2.0: - resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} - engines: {node: '>=8'} - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true + workerd@1.20250507.0: + optionalDependencies: + '@cloudflare/workerd-darwin-64': 1.20250507.0 + '@cloudflare/workerd-darwin-arm64': 1.20250507.0 + '@cloudflare/workerd-linux-64': 1.20250507.0 + '@cloudflare/workerd-linux-arm64': 1.20250507.0 + '@cloudflare/workerd-windows-64': 1.20250507.0 + + worktop@0.8.0-next.18: + dependencies: + mrmime: 2.0.0 + regexparam: 3.0.0 + + wrangler@4.14.4(@cloudflare/workers-types@4.20250508.0): + dependencies: + '@cloudflare/kv-asset-handler': 0.4.0 + '@cloudflare/unenv-preset': 2.3.1(unenv@2.0.0-rc.15)(workerd@1.20250507.0) + blake3-wasm: 2.1.5 + esbuild: 0.25.4 + miniflare: 4.20250507.0 + path-to-regexp: 6.3.0 + unenv: 2.0.0-rc.15 + workerd: 1.20250507.0 + optionalDependencies: + '@cloudflare/workers-types': 4.20250508.0 + fsevents: 2.3.3 + sharp: 0.33.5 + transitivePeerDependencies: + - bufferutil + - utf-8-validate - /wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - dev: true - - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - /y18n@4.0.3: - resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} - dev: true + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 - /y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true + wrappy@1.0.2: {} - /yallist@2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - dev: true + write-file-atomic@5.0.1: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 4.1.0 - /yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + ws@8.18.0: {} - /yaml@1.10.2: - resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} - engines: {node: '>= 6'} - dev: true + y18n@5.0.8: {} - /yargs-parser@18.1.3: - resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} - engines: {node: '>=6'} - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 - dev: true + yallist@5.0.0: {} - /yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - dev: true + yaml@1.10.2: {} - /yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - dev: true + yargs-parser@21.1.1: {} - /yargs@15.4.1: - resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} - engines: {node: '>=8'} + yargs@17.7.2: dependencies: - cliui: 6.0.0 - decamelize: 1.2.0 - find-up: 4.1.0 + cliui: 8.0.1 + escalade: 3.2.0 get-caller-file: 2.0.5 require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 string-width: 4.2.3 - which-module: 2.0.1 - y18n: 4.0.3 - yargs-parser: 18.1.3 - dev: true + y18n: 5.0.8 + yargs-parser: 21.1.1 - /yargs@16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} + yauzl@2.10.0: dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - dev: true + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 - /yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} + yocto-queue@0.1.0: {} + + yocto-queue@1.2.1: {} + + youch@3.3.4: dependencies: - cliui: 8.0.1 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - dev: true + cookie: 0.7.2 + mustache: 4.2.0 + stacktracey: 2.1.8 - /yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - dev: true + zimmerframe@1.1.2: {} - /yocto-queue@1.0.0: - resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} - engines: {node: '>=12.20'} - dev: true + zip-stream@6.0.1: + dependencies: + archiver-utils: 5.0.2 + compress-commons: 6.0.2 + readable-stream: 4.7.0 + + zod@3.22.3: {} + + zod@3.25.56: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 061febda7d04..22100cc6619e 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,11 +1,19 @@ packages: - 'packages/*' - - 'sites/*' + - 'packages/adapter-cloudflare/test/apps/*' - 'packages/adapter-static/test/apps/*' - 'packages/kit/test/apps/*' + - 'packages/kit/test/apps/basics/_test_dependencies/redirect-pkg' - 'packages/kit/test/prerendering/*' - 'packages/kit/test/build-errors/**' - 'packages/kit/test/build-errors/apps/*' - 'packages/create-svelte/templates/*' - '!.test-tmp/**' - 'playgrounds/*' + +catalog: + '@playwright/test': '^1.51.1' + '@sveltejs/vite-plugin-svelte': '^6.0.0-next.0' + 'cross-env': '^7.0.3' + 'vitest': '^3.2.3' + 'vite': '^6.3.5' \ No newline at end of file diff --git a/renovate.json b/renovate.json index ca68a4d66245..1a900e46a67b 100644 --- a/renovate.json +++ b/renovate.json @@ -1,7 +1,6 @@ { "extends": [ - "github>whitesource/merge-confidence:beta", - "config:base", + "config:recommended", ":preserveSemverRanges", "group:allNonMajor", ":semanticCommitTypeAll(chore)" @@ -10,10 +9,8 @@ "enabled": false }, "ignoreDeps": [ - "@playwright/test", "@types/node", "esbuild", - "playwright", "rollup", "typescript" ], @@ -32,4 +29,4 @@ "enabled": false } ] -} \ No newline at end of file +} diff --git a/scripts/print-flaky-test-report.js b/scripts/print-flaky-test-report.js new file mode 100644 index 000000000000..d37e73ae978b --- /dev/null +++ b/scripts/print-flaky-test-report.js @@ -0,0 +1,15 @@ +// pnpm captures stdout and prefixes it with the package name which breaks the annotations +// so save it in a file and print it out at the end +// ideally we'd just use cat, but that doesn't work on Windows hence this script + +import { existsSync, createReadStream, unlinkSync } from 'node:fs'; +const filename = '_tmp_flaky_test_output.txt'; + +if (existsSync(filename)) { + createReadStream(filename) + .on('end', () => { + process.stdout.write('\n'); + unlinkSync(filename); + }) + .pipe(process.stdout); +} diff --git a/scripts/sync-all.js b/scripts/sync-all.js new file mode 100644 index 000000000000..d57b9fc2e4db --- /dev/null +++ b/scripts/sync-all.js @@ -0,0 +1,26 @@ +import fs from 'node:fs'; +import path from 'node:path'; +import { load_config } from '../packages/kit/src/core/config/index.js'; + +// This isn't strictly necessary, but it eliminates some annoying warnings in CI + +for (const directories of [ + 'packages/kit/test/apps', + 'packages/kit/test/build-errors/apps', + 'packages/kit/test/prerendering' +].map((dir) => path.resolve(dir))) { + for (const dir of fs.readdirSync(directories)) { + const cwd = path.join(directories, dir); + + if (!fs.existsSync('svelte.config.js')) { + continue; + } + + process.chdir(cwd); + + // we defer this import so that we don't try and resolve `svelte` from + // the root via `isSvelte5Plus`, which would blow up + const sync = await import('../packages/kit/src/core/sync/sync.js'); + await sync.all(await load_config({ cwd }), 'development'); + } +} diff --git a/sites/kit.svelte.dev/.gitignore b/sites/kit.svelte.dev/.gitignore deleted file mode 100644 index ee68d9012e07..000000000000 --- a/sites/kit.svelte.dev/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.DS_Store -.env -/.svelte-kit/ -/.snippets -/.vercel/ -/build/ -/functions/ -/src/lib/generated/type-info.js diff --git a/sites/kit.svelte.dev/.prettierignore b/sites/kit.svelte.dev/.prettierignore deleted file mode 100644 index 1a660d2ed75c..000000000000 --- a/sites/kit.svelte.dev/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -src/routes/edge.svg/land-110m.json diff --git a/sites/kit.svelte.dev/README.md b/sites/kit.svelte.dev/README.md deleted file mode 100644 index dcc5e5381231..000000000000 --- a/sites/kit.svelte.dev/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# kit.svelte.dev - -This is the SvelteKit website. The docs live [here](../../documentation). - -## Developing - -Once you've [set up the repo](../../CONTRIBUTING.md#preparing), `cd` into this directory and start the dev server: - -```bash -cd sites/kit.svelte.dev -pnpm run update -pnpm dev -``` diff --git a/sites/kit.svelte.dev/package.json b/sites/kit.svelte.dev/package.json deleted file mode 100644 index fa824f97bb25..000000000000 --- a/sites/kit.svelte.dev/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "kit.svelte.dev", - "private": true, - "version": "0.0.1", - "scripts": { - "lint": "prettier --check . --config ../../.prettierrc --ignore-path .gitignore --ignore-path .prettierignore", - "format": "prettier --write . --config ../../.prettierrc --ignore-path .gitignore --ignore-path .prettierignore", - "update": "node scripts/types", - "dev": "pnpm run update && vite dev", - "build": "pnpm run update && vite build", - "prebuild": "test \"$CI\" = true && npx pnpm install --store=node_modules/.pnpm-store || echo skipping pnpm install", - "preview": "vite preview", - "test": "vitest run" - }, - "devDependencies": { - "@sveltejs/adapter-vercel": "workspace:^", - "@sveltejs/amp": "workspace:^", - "@sveltejs/kit": "workspace:^", - "@sveltejs/site-kit": "6.0.0-next.52", - "@types/d3-geo": "^3.0.4", - "@types/node": "^16.18.6", - "browserslist": "^4.21.10", - "flexsearch": "^0.7.31", - "lightningcss": "^1.21.8", - "marked": "^9.0.0", - "prettier": "^3.0.3", - "prism-svelte": "^0.5.0", - "prismjs": "^1.29.0", - "shiki-twoslash": "^3.1.2", - "svelte": "^4.2.0", - "tiny-glob": "^0.2.9", - "typescript": "5.0.4", - "vite": "^4.4.9", - "vite-imagetools": "^6.0.0", - "vitest": "^0.34.5" - }, - "type": "module", - "dependencies": { - "d3-geo": "^3.1.0", - "d3-geo-projection": "^4.0.0", - "topojson-client": "^3.1.0" - } -} diff --git a/sites/kit.svelte.dev/scripts/tsconfig.json b/sites/kit.svelte.dev/scripts/tsconfig.json deleted file mode 100644 index d47321a09d38..000000000000 --- a/sites/kit.svelte.dev/scripts/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "module": "ESNext", - "target": "ESNext", - "moduleResolution": "Bundler", - "allowJs": true, - "outDir": "./dist", - "checkJs": true, - "strict": true - }, - "include": ["**/*.ts", "**/*.js"] -} diff --git a/sites/kit.svelte.dev/scripts/types/index.js b/sites/kit.svelte.dev/scripts/types/index.js deleted file mode 100644 index a415d67d12c4..000000000000 --- a/sites/kit.svelte.dev/scripts/types/index.js +++ /dev/null @@ -1,336 +0,0 @@ -import { readFile, readdir, writeFile } from 'node:fs/promises'; -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; -import { format } from 'prettier'; -import ts from 'typescript'; -import { mkdirp } from '../../../../packages/kit/src/utils/filesystem.js'; - -/** - * @typedef {{ - * name: string; - * comment: string; - * markdown?: string; - * snippet: string; - * deprecated: string | null; - * children: Extracted[] } - * } Extracted - */ - -/** @type {Array<{ name: string; comment: string; exports: Extracted[]; types: Extracted[]; exempt?: boolean; }>} */ -const modules = []; - -/** - * @param {string} code - * @param {ts.NodeArray} statements - */ -async function get_types(code, statements) { - /** @type {Extracted[]} */ - const exports = []; - - /** @type {Extracted[]} */ - const types = []; - - if (statements) { - for (const statement of statements) { - const modifiers = ts.canHaveModifiers(statement) ? ts.getModifiers(statement) : undefined; - - const export_modifier = modifiers?.find( - (modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword - ); - - if (!export_modifier) continue; - - if ( - ts.isClassDeclaration(statement) || - ts.isInterfaceDeclaration(statement) || - ts.isTypeAliasDeclaration(statement) || - ts.isModuleDeclaration(statement) || - ts.isVariableStatement(statement) || - ts.isFunctionDeclaration(statement) - ) { - const name_node = ts.isVariableStatement(statement) - ? statement.declarationList.declarations[0] - : statement; - - // @ts-ignore no idea why it's complaining here - const name = name_node.name?.escapedText; - - let start = statement.pos; - let comment = ''; - /** @type {string | null} */ - let deprecated_notice = null; - - // @ts-ignore i think typescript is bad at typescript - if (statement.jsDoc) { - // @ts-ignore - const jsDoc = statement.jsDoc[0]; - - comment = jsDoc.comment; - - if (jsDoc?.tags?.[0]?.tagName?.escapedText === 'deprecated') { - deprecated_notice = jsDoc.tags[0].comment; - } - - // @ts-ignore - start = jsDoc.end; - } - - const i = code.indexOf('export', start); - start = i + 6; - - /** @type {Extracted[]} */ - let children = []; - - let snippet_unformatted = code.slice(start, statement.end).trim(); - - if (ts.isInterfaceDeclaration(statement) || ts.isClassDeclaration(statement)) { - if (statement.members.length > 0) { - for (const member of statement.members) { - // @ts-ignore - children.push(munge_type_element(member)); - } - - children = children.filter(Boolean); - - // collapse `interface Foo {/* lots of stuff*/}` into `interface Foo {…}` - const first = statement.members.at(0); - const last = statement.members.at(-1); - - let body_start = first.pos - start; - while (snippet_unformatted[body_start] !== '{') body_start -= 1; - - let body_end = last.end - start; - while (snippet_unformatted[body_end] !== '}') body_end += 1; - - snippet_unformatted = - snippet_unformatted.slice(0, body_start + 1) + - '/*…*/' + - snippet_unformatted.slice(body_end); - } - } - - const snippet = ( - await format(snippet_unformatted, { - parser: 'typescript', - printWidth: 60, - useTabs: true, - singleQuote: true, - trailingComma: 'none' - }) - ) - .replace(/\s*(\/\*…\*\/)\s*/g, '/*…*/') - .trim(); - - const collection = - ts.isVariableStatement(statement) || ts.isFunctionDeclaration(statement) - ? exports - : types; - - collection.push({ - name, - comment, - snippet, - children, - deprecated: deprecated_notice - }); - } - } - - types.sort((a, b) => (a.name < b.name ? -1 : 1)); - exports.sort((a, b) => (a.name < b.name ? -1 : 1)); - } - - return { types, exports }; -} - -/** - * @param {ts.TypeElement} member - */ -function munge_type_element(member, depth = 1) { - // @ts-ignore - const doc = member.jsDoc?.[0]; - - if (/private api/i.test(doc?.comment)) return; - - /** @type {string[]} */ - const children = []; - - const name = member.name?.escapedText; - let snippet = member.getText(); - - for (let i = -1; i < depth; i += 1) { - snippet = snippet.replace(/^\t/gm, ''); - } - - if ( - ts.isPropertySignature(member) && - ts.isTypeLiteralNode(member.type) && - member.type.members.some((member) => member.jsDoc?.[0].comment) - ) { - let a = 0; - while (snippet[a] !== '{') a += 1; - - snippet = snippet.slice(0, a + 1) + '/*…*/}'; - - for (const child of member.type.members) { - children.push(munge_type_element(child, depth + 1)); - } - } - - /** @type {string[]} */ - const bullets = []; - - for (const tag of doc?.tags ?? []) { - const type = tag.tagName.escapedText; - - switch (tag.tagName.escapedText) { - case 'private': - bullets.push(`- private ${tag.comment}`); - break; - - case 'readonly': - bullets.push(`- readonly ${tag.comment}`); - break; - - case 'param': - bullets.push(`- \`${tag.name.getText()}\` ${tag.comment}`); - break; - - case 'default': - bullets.push(`- default \`${tag.comment}\``); - break; - - case 'returns': - bullets.push(`- returns ${tag.comment}`); - break; - - case 'deprecated': - bullets.push(`- deprecated ${tag.comment}`); - break; - - default: - console.log(`unhandled JSDoc tag: ${type}`); // TODO indicate deprecated stuff - } - } - - return { - name, - snippet, - comment: (doc?.comment ?? '') - .replace(/\/\/\/ type: (.+)/g, '/** @type {$1} */') - .replace(/^( )+/gm, (match, spaces) => { - return '\t'.repeat(match.length / 2); - }), - bullets, - children - }; -} - -/** - * Type declarations include fully qualified URLs so that they become links when - * you hover over names in an editor with TypeScript enabled. We need to remove - * the origin so that they become root-relative, so that they work in preview - * deployments and when developing locally - * @param {string} str - */ -function strip_origin(str) { - return str.replace(/https:\/\/kit\.svelte\.dev/g, ''); -} - -/** - * @param {string} file - */ -async function read_d_ts_file(file) { - const resolved = path.resolve('../../packages/kit', file); - - // We can't use JSDoc comments inside JSDoc, so we would get ts(7031) errors if - // we didn't ignore this error specifically for `/// file:` code examples - const str = await readFile(resolved, 'utf-8'); - - //! For some reason, typescript 5.1> is reading this @errors as a jsdoc tag, and splitting it into separate pieces - return str.replace(/(\s*\*\s*)```js([\s\S]+?)```/g, (match, prefix, code) => { - return `${prefix}\`\`\`js${prefix}// @errors: 7031${code}\`\`\``; - }); -} - -{ - const code = await read_d_ts_file('src/types/private.d.ts'); - const node = ts.createSourceFile('private.d.ts', code, ts.ScriptTarget.Latest, true); - - modules.push({ - name: 'Private types', - comment: '', - ...(await get_types(code, node.statements)) - }); -} - -const dir = fileURLToPath( - new URL('../../../../packages/kit/src/types/synthetic', import.meta.url).href -); -for (const file of await readdir(dir)) { - if (!file.endsWith('.md')) continue; - - const comment = strip_origin(await read_d_ts_file(`${dir}/${file}`)); - - modules.push({ - name: file.replace(/\+/g, '/').slice(0, -3), - comment, - exports: [], - types: [], - exempt: true - }); -} - -{ - const code = await read_d_ts_file('types/index.d.ts'); - const node = ts.createSourceFile('index.d.ts', code, ts.ScriptTarget.Latest, true); - - for (const statement of node.statements) { - if (ts.isModuleDeclaration(statement)) { - // @ts-ignore - const name = statement.name.text || statement.name.escapedText; - - // @ts-ignore - const comment = strip_origin(statement.jsDoc?.[0].comment ?? ''); - - modules.push({ - name, - comment, - // @ts-ignore - ...(await get_types(code, statement.body?.statements)) - }); - } - } -} - -// need to do some unfortunate finagling here, hopefully we can remove this one day -const app_paths = modules.find((module) => module.name === '$app/paths'); -const app_environment = modules.find((module) => module.name === '$app/environment'); -const __sveltekit_paths = modules.find((module) => module.name === '__sveltekit/paths'); -const __sveltekit_environment = modules.find((module) => module.name === '__sveltekit/environment'); - -app_paths?.exports.push( - __sveltekit_paths.exports.find((e) => e.name === 'assets'), - __sveltekit_paths.exports.find((e) => e.name === 'base') -); - -app_environment?.exports.push( - __sveltekit_environment.exports.find((e) => e.name === 'building'), - __sveltekit_environment.exports.find((e) => e.name === 'version') -); - -modules.sort((a, b) => (a.name < b.name ? -1 : 1)); - -mkdirp('src/lib/generated'); -writeFile( - 'src/lib/generated/type-info.js', - ` -/* This file is generated by running \`pnpm run update\` - in the sites/kit.svelte.dev directory — do not edit it */ -export const modules = /** @type {import('@sveltejs/site-kit/markdown').Modules} */ (${JSON.stringify( - modules.filter((m) => !m.name.startsWith('_')), - null, - ' ' - )}); -`.trim() -); diff --git a/sites/kit.svelte.dev/src/app.html b/sites/kit.svelte.dev/src/app.html deleted file mode 100644 index 1bd056070c0a..000000000000 --- a/sites/kit.svelte.dev/src/app.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - %sveltekit.head% - - - - -
%sveltekit.body%
- - diff --git a/sites/kit.svelte.dev/src/constants.js b/sites/kit.svelte.dev/src/constants.js deleted file mode 100644 index a50a135a6641..000000000000 --- a/sites/kit.svelte.dev/src/constants.js +++ /dev/null @@ -1,6 +0,0 @@ -export const CONTENT_BASE = '../../documentation'; - -/** All the paths are relative to the project root when being run on server or built */ -export const CONTENT_BASE_PATHS = { - DOCS: `${CONTENT_BASE}/docs` -}; diff --git a/sites/kit.svelte.dev/src/globals.d.ts b/sites/kit.svelte.dev/src/globals.d.ts deleted file mode 100644 index 7878fb0a3465..000000000000 --- a/sites/kit.svelte.dev/src/globals.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/// - -//#region Ensure Svelte file endings have a type for TypeScript -/** - * These declarations tell TypeScript that we allow import of Svelte files in TS files, e.g. - * ``` - import Component from './Component.svelte'; - ``` - */ -declare module '*.svelte' { - export { SvelteComponent as default } from 'svelte'; -} -//#endregion - -//#region Ensure image file endings have a type for TypeScript -/** - * These declarations tell TypeScript that we allow import of images, e.g. - * ``` - - - ``` - */ -declare module '*.gif' { - const value: string; - export = value; -} - -declare module '*.jpg' { - const value: string; - export = value; -} - -declare module '*.jpeg' { - const value: string; - export = value; -} - -declare module '*.png' { - const value: string; - export = value; -} - -declare module '*.svg' { - const value: string; - export = value; -} - -declare module '*.webp' { - const value: string; - export = value; -} -//#endregion diff --git a/sites/kit.svelte.dev/src/hooks.server.js b/sites/kit.svelte.dev/src/hooks.server.js deleted file mode 100644 index c7e8742e90e9..000000000000 --- a/sites/kit.svelte.dev/src/hooks.server.js +++ /dev/null @@ -1,22 +0,0 @@ -const redirects = { - '/docs/typescript': '/docs/types', - '/docs/amp': '/docs/seo#manual-setup-amp' -}; - -const preload_types = ['js', 'css', 'font']; - -/** @type {import('@sveltejs/kit').Handle} */ -export function handle({ event, resolve }) { - if (event.url.pathname in redirects) { - return new Response(undefined, { - status: 308, - headers: { - location: redirects[event.url.pathname] - } - }); - } - - return resolve(event, { - preload: ({ type }) => preload_types.includes(type) - }); -} diff --git a/sites/kit.svelte.dev/src/lib/Image.svelte b/sites/kit.svelte.dev/src/lib/Image.svelte deleted file mode 100644 index b28892ace9a7..000000000000 --- a/sites/kit.svelte.dev/src/lib/Image.svelte +++ /dev/null @@ -1,18 +0,0 @@ - - -{#if typeof src === 'string'} - -{:else} - - {#each Object.entries(src.sources) as [format, srcset]} - - {/each} - - -{/if} diff --git a/sites/kit.svelte.dev/src/lib/icons/left-small.svg b/sites/kit.svelte.dev/src/lib/icons/left-small.svg deleted file mode 100644 index ee413e35514e..000000000000 --- a/sites/kit.svelte.dev/src/lib/icons/left-small.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/sites/kit.svelte.dev/src/lib/icons/pause.svg b/sites/kit.svelte.dev/src/lib/icons/pause.svg deleted file mode 100644 index a01d92df27cf..000000000000 --- a/sites/kit.svelte.dev/src/lib/icons/pause.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/sites/kit.svelte.dev/src/lib/icons/play.svg b/sites/kit.svelte.dev/src/lib/icons/play.svg deleted file mode 100644 index d99c4ec90f44..000000000000 --- a/sites/kit.svelte.dev/src/lib/icons/play.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/sites/kit.svelte.dev/src/lib/icons/plus.svg b/sites/kit.svelte.dev/src/lib/icons/plus.svg deleted file mode 100644 index 4826bcaf2caf..000000000000 --- a/sites/kit.svelte.dev/src/lib/icons/plus.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/sites/kit.svelte.dev/src/lib/icons/search.svg b/sites/kit.svelte.dev/src/lib/icons/search.svg deleted file mode 100644 index b588f60bf2a1..000000000000 --- a/sites/kit.svelte.dev/src/lib/icons/search.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - \ No newline at end of file diff --git a/sites/kit.svelte.dev/src/lib/icons/up-small.svg b/sites/kit.svelte.dev/src/lib/icons/up-small.svg deleted file mode 100644 index f067962cf72b..000000000000 --- a/sites/kit.svelte.dev/src/lib/icons/up-small.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/sites/kit.svelte.dev/src/lib/server/docs/index.js b/sites/kit.svelte.dev/src/lib/server/docs/index.js deleted file mode 100644 index eac02fb567ce..000000000000 --- a/sites/kit.svelte.dev/src/lib/server/docs/index.js +++ /dev/null @@ -1,127 +0,0 @@ -import { base as app_base } from '$app/paths'; -import { modules } from '$lib/generated/type-info.js'; -import { - escape, - extractFrontmatter, - markedTransform, - normalizeSlugify, - removeMarkdown, - replaceExportTypePlaceholders -} from '@sveltejs/site-kit/markdown'; -import { readFile, readdir } from 'node:fs/promises'; -import { CONTENT_BASE_PATHS } from '../../../constants.js'; -import { render_content } from '../renderer'; - -/** - * @param {import('./types').DocsData} docs_data - * @param {string} slug - */ -export async function get_parsed_docs(docs_data, slug) { - for (const { pages } of docs_data) { - for (const page of pages) { - if (page.slug === slug) { - return { - ...page, - content: await render_content(page.file, page.content) - }; - } - } - } -} - -/** @return {Promise} */ -export async function get_docs_data(base = CONTENT_BASE_PATHS.DOCS) { - /** @type {import('./types').DocsData} */ - const docs_data = []; - - for (const category_dir of await readdir(base)) { - const match = /\d{2}-(.+)/.exec(category_dir); - if (!match) continue; - - const category_slug = match[1]; - - // Read the meta.json - const { title: category_title, draft = 'false' } = JSON.parse( - await readFile(`${base}/${category_dir}/meta.json`, 'utf-8') - ); - - if (draft === 'true') continue; - - /** @type {import('./types').Category} */ - const category = { - title: category_title, - slug: category_slug, - pages: [] - }; - - for (const page_md of (await readdir(`${base}/${category_dir}`)).filter( - (filename) => filename !== 'meta.json' - )) { - const match = /\d{2}-(.+)/.exec(page_md); - if (!match) continue; - - const page_slug = match[1].replace('.md', ''); - - const page_data = extractFrontmatter( - await readFile(`${base}/${category_dir}/${page_md}`, 'utf-8') - ); - - if (page_data.metadata.draft === 'true') continue; - - const page_title = page_data.metadata.title; - const page_content = page_data.body; - - category.pages.push({ - title: page_title, - slug: page_slug, - content: page_content, - category: category_title, - sections: await get_sections(page_content), - path: `${app_base}/docs/${page_slug}`, - file: `${category_dir}/${page_md}` - }); - } - - docs_data.push(category); - } - - return docs_data; -} - -/** @param {import('./types').DocsData} docs_data */ -export function get_docs_list(docs_data) { - return docs_data.map((category) => ({ - title: category.title, - pages: category.pages.map((page) => ({ - title: page.title, - path: page.path - })) - })); -} - -/** @param {string} markdown */ -async function get_sections(markdown) { - const headingRegex = /^##\s+(.*)$/gm; - /** @type {import('./types').Section[]} */ - const secondLevelHeadings = []; - let match; - - const placeholders_rendered = await replaceExportTypePlaceholders(markdown, modules); - - while ((match = headingRegex.exec(placeholders_rendered)) !== null) { - secondLevelHeadings.push({ - title: removeMarkdown( - escape(await markedTransform(match[1], { paragraph: (txt) => txt })) - .replace(/<\/?code>/g, '') - .replace(/'/g, "'") - .replace(/"/g, '"') - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/<(\/)?(em|b|strong|code)>/g, '') - ), - slug: normalizeSlugify(match[1]) - }); - } - - return secondLevelHeadings; -} diff --git a/sites/kit.svelte.dev/src/lib/server/docs/types.d.ts b/sites/kit.svelte.dev/src/lib/server/docs/types.d.ts deleted file mode 100644 index 6b984d72eb27..000000000000 --- a/sites/kit.svelte.dev/src/lib/server/docs/types.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export type DocsData = Category[]; - -export interface Section { - title: string; - slug: string; - /** Currently, we are only going with 2 level headings, so this will be undefined. In future, we may want to support 3 levels, in which case this will be a list of sections */ - sections?: Section[]; -} - -export type Category = { - title: string; - slug: string; - pages: Page[]; -}; - -export type Page = { - title: string; - slug: string; - file: string; - path: string; - category: string; - content: string; - sections: Section[]; -}; diff --git a/sites/kit.svelte.dev/src/lib/server/renderer.js b/sites/kit.svelte.dev/src/lib/server/renderer.js deleted file mode 100644 index 44bd5069beff..000000000000 --- a/sites/kit.svelte.dev/src/lib/server/renderer.js +++ /dev/null @@ -1,81 +0,0 @@ -import { modules } from '$lib/generated/type-info.js'; -import { renderContentMarkdown, slugify } from '@sveltejs/site-kit/markdown'; -import { parse_route_id } from '../../../../../packages/kit/src/utils/routing.js'; - -/** - * @param {string} filename - * @param {string} body - */ -export const render_content = (filename, body) => - renderContentMarkdown(filename, body, { - cacheCodeSnippets: true, - modules, - - resolveTypeLinks: (module_name, type_name) => { - if (module_name === '@sveltejs/kit') module_name = 'Public Types'; - - return { - page: `/docs/types`, - slug: `${slugify(module_name)}-${slugify(type_name)}` - }; - }, - - twoslashBanner: (filename, source, language, options) => { - const injected = []; - - if ( - source.includes('$app/') || - source.includes('$service-worker') || - source.includes('@sveltejs/kit/') - ) { - injected.push(`// @filename: ambient-kit.d.ts`, `/// `); - } - - if (source.includes('$env/')) { - // TODO we're hardcoding static env vars that are used in code examples - // in the types, which isn't... totally ideal, but will do for now - injected.push( - `declare module '$env/dynamic/private' { export const env: Record }`, - `declare module '$env/dynamic/public' { export const env: Record }`, - `declare module '$env/static/private' { export const API_KEY: string }`, - `declare module '$env/static/public' { export const PUBLIC_BASE_URL: string }` - ); - } - - if (source.includes('./$types') && !source.includes('@filename: $types.d.ts')) { - const params = parse_route_id(`${options.file}` || `+page.${language}`) - .params.map((param) => `${param.name}: string`) - .join(', '); - - injected.push( - `// @filename: $types.d.ts`, - `import type * as Kit from '@sveltejs/kit';`, - `export type PageLoad = Kit.Load<{${params}}>;`, - `export type PageServerLoad = Kit.ServerLoad<{${params}}>;`, - `export type LayoutLoad = Kit.Load<{${params}}>;`, - `export type LayoutServerLoad = Kit.ServerLoad<{${params}}>;`, - `export type RequestHandler = Kit.RequestHandler<{${params}}>;`, - `export type Action = Kit.Action<{${params}}>;`, - `export type Actions = Kit.Actions<{${params}}>;`, - `export type EntryGenerator = () => Promise> | Array<{${params}}>;` - ); - } - - // special case — we need to make allowances for code snippets coming - // from e.g. ambient.d.ts - if (filename.endsWith('30-modules.md')) { - injected.push('// @errors: 7006 7031'); - } - - if (filename.endsWith('10-configuration.md')) { - injected.push('// @errors: 2307'); - } - - // another special case - if (source.includes('$lib/types')) { - injected.push(`declare module '$lib/types' { export interface User {} }`); - } - - return injected.join('\n'); - } - }); diff --git a/sites/kit.svelte.dev/src/routes/+error.svelte b/sites/kit.svelte.dev/src/routes/+error.svelte deleted file mode 100644 index 0751ee710398..000000000000 --- a/sites/kit.svelte.dev/src/routes/+error.svelte +++ /dev/null @@ -1,65 +0,0 @@ - - - - {$page.status} - - -
- {#if $page.status === 404} -

Not found!

- {:else if online} -

Yikes!

- - {#if $page.error.message} -

{$page.status}: {$page.error.message}

- {/if} - -

Please try reloading the page.

- -

- If the error persists, please drop by Discord chatroom - and let us know, or raise an issue on - GitHub. Thanks! -

- {:else} -

It looks like you're offline

- -

Reload the page once you've found the internet.

- {/if} -
- - diff --git a/sites/kit.svelte.dev/src/routes/+layout.server.js b/sites/kit.svelte.dev/src/routes/+layout.server.js deleted file mode 100644 index 625e73326af7..000000000000 --- a/sites/kit.svelte.dev/src/routes/+layout.server.js +++ /dev/null @@ -1,23 +0,0 @@ -export const prerender = true; - -export const load = async ({ url, fetch }) => { - const nav_list = await fetch('/nav.json').then((r) => r.json()); - - return { - nav_title: get_nav_title(url), - nav_links: nav_list - }; -}; - -/** @param {URL} url */ -function get_nav_title(url) { - const list = new Map([[/^docs/, 'Docs']]); - - for (const [regex, title] of list) { - if (regex.test(url.pathname.replace(/^\/(.+)/, '$1'))) { - return title; - } - } - - return ''; -} diff --git a/sites/kit.svelte.dev/src/routes/+layout.svelte b/sites/kit.svelte.dev/src/routes/+layout.svelte deleted file mode 100644 index 7e2fb14c1c28..000000000000 --- a/sites/kit.svelte.dev/src/routes/+layout.svelte +++ /dev/null @@ -1,98 +0,0 @@ - - -
- - - - - -
- -{#if browser} - -{/if} - - diff --git a/sites/kit.svelte.dev/src/routes/+page.js b/sites/kit.svelte.dev/src/routes/+page.js deleted file mode 100644 index ad7a278713ef..000000000000 --- a/sites/kit.svelte.dev/src/routes/+page.js +++ /dev/null @@ -1,5 +0,0 @@ -export function load({ setHeaders }) { - setHeaders({ - 'cache-control': 'public, max-age=60' - }); -} diff --git a/sites/kit.svelte.dev/src/routes/+page.svelte b/sites/kit.svelte.dev/src/routes/+page.svelte deleted file mode 100644 index 4d2963c65641..000000000000 --- a/sites/kit.svelte.dev/src/routes/+page.svelte +++ /dev/null @@ -1,100 +0,0 @@ - - - - SvelteKit • Web development, streamlined - - - - - - - - - - - - {#if schema} - {@html schema} - {/if} - - -
-

SvelteKit

- - - - - - - - - - -
diff --git a/sites/kit.svelte.dev/src/routes/content.json/+server.js b/sites/kit.svelte.dev/src/routes/content.json/+server.js deleted file mode 100644 index af86cda12067..000000000000 --- a/sites/kit.svelte.dev/src/routes/content.json/+server.js +++ /dev/null @@ -1,10 +0,0 @@ -import { content } from './content.server.js'; -import { json } from '@sveltejs/kit'; - -export const prerender = true; - -export async function GET() { - return json({ - blocks: await content() - }); -} diff --git a/sites/kit.svelte.dev/src/routes/content.json/content.server.js b/sites/kit.svelte.dev/src/routes/content.json/content.server.js deleted file mode 100644 index b24e7ea2ae50..000000000000 --- a/sites/kit.svelte.dev/src/routes/content.json/content.server.js +++ /dev/null @@ -1,129 +0,0 @@ -import { modules } from '$lib/generated/type-info.js'; -import { - extractFrontmatter, - markedTransform, - replaceExportTypePlaceholders, - slugify -} from '@sveltejs/site-kit/markdown'; -import { readFile } from 'node:fs/promises'; -import path from 'node:path'; -import glob from 'tiny-glob'; - -const categories = [ - { - slug: 'docs', - label: null, - href: (parts) => - parts.length > 1 ? `/docs/${parts[0]}#${parts.slice(1).join('-')}` : `/docs/${parts[0]}` - } -]; - -export async function content() { - /** @type {import('@sveltejs/site-kit/search').Block[]} */ - const blocks = []; - - for (const category of categories) { - const breadcrumbs = category.label ? [category.label] : []; - - for (const file of await glob('**/*.md', { cwd: `../../documentation/${category.slug}` })) { - const basename = path.basename(file); - const match = /\d{2}-(.+)\.md/.exec(basename); - if (!match) continue; - - const slug = match[1]; - - const filepath = `../../documentation/${category.slug}/${file}`; - const markdown = await replaceExportTypePlaceholders( - await readFile(filepath, 'utf-8'), - modules - ); - - const { body, metadata } = extractFrontmatter(markdown); - - const sections = body.trim().split(/^## /m); - const intro = sections.shift().trim(); - const rank = +metadata.rank || undefined; - - blocks.push({ - breadcrumbs: [...breadcrumbs, metadata.title], - href: category.href([slug]), - content: await plaintext(intro), - rank - }); - - for (const section of sections) { - const lines = section.split('\n'); - const h3 = lines.shift(); - const content = lines.join('\n'); - - const subsections = content.trim().split('### '); - - const intro = subsections.shift().trim(); - - blocks.push({ - breadcrumbs: [...breadcrumbs, metadata.title, h3], - href: category.href([slug, slugify(h3)]), - content: await plaintext(intro), - rank - }); - - for (const subsection of subsections) { - const lines = subsection.split('\n'); - const h4 = lines.shift(); - - blocks.push({ - breadcrumbs: [...breadcrumbs, metadata.title, h3, h4], - href: category.href([slug, slugify(h3), slugify(h4)]), - content: await plaintext(lines.join('\n').trim()), - rank - }); - } - } - } - } - - return blocks; -} - -/** @param {string} markdown */ -async function plaintext(markdown) { - const block = (text) => `${text}\n`; - const inline = (text) => text; - - return ( - await markedTransform(markdown, { - code: (source) => - source - .split('// ---cut---\n') - .pop() - .replace(/^\/\/((\/ file:)|( @errors:))[\s\S]*/gm, ''), - blockquote: block, - html: () => '\n', - heading: (text) => `${text}\n`, - hr: () => '', - list: block, - listitem: block, - checkbox: block, - paragraph: (text) => `${text}\n\n`, - table: block, - tablerow: block, - tablecell: (text, opts) => { - return text + ' '; - }, - strong: inline, - em: inline, - codespan: inline, - br: () => '', - del: inline, - link: (href, title, text) => text, - image: (href, title, text) => text, - text: inline - }) - ) - .replace(/</g, '<') - .replace(/>/g, '>') - .replace(/&#(\d+);/g, (match, code) => { - return String.fromCharCode(code); - }) - .trim(); -} diff --git a/sites/kit.svelte.dev/src/routes/docs/+layout.server.js b/sites/kit.svelte.dev/src/routes/docs/+layout.server.js deleted file mode 100644 index 2e3ec09c82c9..000000000000 --- a/sites/kit.svelte.dev/src/routes/docs/+layout.server.js +++ /dev/null @@ -1,9 +0,0 @@ -import { get_docs_data, get_docs_list } from '$lib/server/docs/index.js'; - -export const prerender = true; - -export async function load() { - return { - sections: get_docs_list(await get_docs_data()) - }; -} diff --git a/sites/kit.svelte.dev/src/routes/docs/+layout.svelte b/sites/kit.svelte.dev/src/routes/docs/+layout.svelte deleted file mode 100644 index fd9e4e375c0a..000000000000 --- a/sites/kit.svelte.dev/src/routes/docs/+layout.svelte +++ /dev/null @@ -1,91 +0,0 @@ - - -
-
- {#if category} -

{category}

- {/if} - -
- -
- -
-
- - diff --git a/sites/kit.svelte.dev/src/routes/docs/+page.js b/sites/kit.svelte.dev/src/routes/docs/+page.js deleted file mode 100644 index ba2ed3ac9607..000000000000 --- a/sites/kit.svelte.dev/src/routes/docs/+page.js +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from '@sveltejs/kit'; - -export function load() { - throw redirect(307, `./docs/introduction`); -} diff --git a/sites/kit.svelte.dev/src/routes/docs/[slug]/+page.server.js b/sites/kit.svelte.dev/src/routes/docs/[slug]/+page.server.js deleted file mode 100644 index 2d06cbb987ee..000000000000 --- a/sites/kit.svelte.dev/src/routes/docs/[slug]/+page.server.js +++ /dev/null @@ -1,12 +0,0 @@ -import { get_docs_data, get_parsed_docs } from '$lib/server/docs/index.js'; -import { error } from '@sveltejs/kit'; - -export const prerender = true; - -export async function load({ params }) { - const processed_page = await get_parsed_docs(await get_docs_data(), params.slug); - - if (!processed_page) throw error(404); - - return { page: processed_page }; -} diff --git a/sites/kit.svelte.dev/src/routes/docs/[slug]/+page.svelte b/sites/kit.svelte.dev/src/routes/docs/[slug]/+page.svelte deleted file mode 100644 index 1be4f9d55175..000000000000 --- a/sites/kit.svelte.dev/src/routes/docs/[slug]/+page.svelte +++ /dev/null @@ -1,131 +0,0 @@ - - - - {data.page.title} • Docs • SvelteKit - - - - - - -
-

{data.page.title}

- - - Edit this page on GitHub - - - - -
- {@html data.page.content} -
- -
-
- previous - {#if prev} - {prev.title} - {/if} -
- -
- next - {#if next} - {next.title} - {/if} -
-
-
- - diff --git a/sites/kit.svelte.dev/src/routes/edge.svg/+server.js b/sites/kit.svelte.dev/src/routes/edge.svg/+server.js deleted file mode 100644 index 7cb4a3640d9c..000000000000 --- a/sites/kit.svelte.dev/src/routes/edge.svg/+server.js +++ /dev/null @@ -1,144 +0,0 @@ -import { geoPath } from 'd3-geo'; -import { geoSatellite } from 'd3-geo-projection'; -import * as topojson from 'topojson-client'; -import topology from './land-110m.json'; -import countries from './countries.json'; - -const land = topojson.feature(topology, topology.objects.land); - -const font_size = 36; - -/** - * distance of the satellite observer from the earth - * https://github.com/d3/d3-geo-projection#satellite_distance - */ -const distance = 8; - -const w = 1000; -const h = 1000; - -const rad_to_deg = 180 / Math.PI; - -const projection = geoSatellite() - .distance(distance) - .clipAngle(Math.acos(1 / distance) * rad_to_deg) - .translate([w / 2, h / 2]) - .scale(450) - .precision(0.5); - -let isDark = false; - -const path = geoPath(projection); - -/** - * @param {string | null} lat - * @param {string | null} lon - * @param {string} city - * @param {string} country - */ -function render(lat, lon, city, country) { - const coords = lat && lon ? [+lon, +lat] : [-74, 40.7]; - - // spin globe a little west of the user's location so that it isn't - // dead centre, and tilt them slightly towards the vertical center - projection.rotate([-coords[0] - 30, -coords[1] * (30 / 90), 0]); - - const dot = lon && lat ? projection([lon, lat]) : null; - - const MAX_LABEL_LENGTH = 27; - const DEFAULT_LABEL = 'Your location'; - - let label = [city, country].filter(Boolean).join(', ') || DEFAULT_LABEL; - if (label.length > MAX_LABEL_LENGTH) label = city ?? DEFAULT_LABEL; - if (label.length > MAX_LABEL_LENGTH) label = country ?? DEFAULT_LABEL; - if (label.length > MAX_LABEL_LENGTH) label = DEFAULT_LABEL; - - return ` - - - - - - - ${ - dot - ? ` - - - - - ${label.toUpperCase()} - ` - : '' - } - - `; -} - -export function GET({ request, url }) { - const h = request.headers; - - isDark = !!url.searchParams.has('dark'); - - const latitude = h.get('x-vercel-ip-latitude') ?? ''; - const longitude = h.get('x-vercel-ip-longitude') ?? ''; - const city = h.get('x-vercel-ip-city') ?? ''; - const country = countries[h.get('x-vercel-ip-country')]; - - const svg = render(latitude, longitude, decodeURIComponent(city), country).replace( - /\d\.\d+/g, - (match) => match.slice(0, 4) - ); - - return new Response(svg, { - headers: { - 'content-type': 'image/svg+xml', - 'cache-control': 'private, max-age=3600' - } - }); -} diff --git a/sites/kit.svelte.dev/src/routes/edge.svg/countries.json b/sites/kit.svelte.dev/src/routes/edge.svg/countries.json deleted file mode 100644 index bb92e51a95d5..000000000000 --- a/sites/kit.svelte.dev/src/routes/edge.svg/countries.json +++ /dev/null @@ -1,251 +0,0 @@ -{ - "AF": "Afghanistan", - "AL": "Albania", - "DZ": "Algeria", - "AS": "American Samoa", - "AD": "Andorra", - "AO": "Angola", - "AI": "Anguilla", - "AQ": "Antarctica", - "AG": "Antigua and Barbuda", - "AR": "Argentina", - "AM": "Armenia", - "AW": "Aruba", - "AU": "Australia", - "AT": "Austria", - "AZ": "Azerbaijan", - "BS": "Bahamas (the)", - "BH": "Bahrain", - "BD": "Bangladesh", - "BB": "Barbados", - "BY": "Belarus", - "BE": "Belgium", - "BZ": "Belize", - "BJ": "Benin", - "BM": "Bermuda", - "BT": "Bhutan", - "BO": "Bolivia", - "BQ": "Bonaire, Sint Eustatius and Saba", - "BA": "Bosnia and Herzegovina", - "BW": "Botswana", - "BV": "Bouvet Island", - "BR": "Brazil", - "IO": "British Indian Ocean Territory", - "BN": "Brunei Darussalam", - "BG": "Bulgaria", - "BF": "Burkina Faso", - "BI": "Burundi", - "CV": "Cabo Verde", - "KH": "Cambodia", - "CM": "Cameroon", - "CA": "Canada", - "KY": "Cayman Islands", - "CF": "Central African Republic", - "TD": "Chad", - "CL": "Chile", - "CN": "China", - "CX": "Christmas Island", - "CC": "Cocos (Keeling) Islands", - "CO": "Colombia", - "KM": "Comoros", - "CD": "Congo (Kinshasa)", - "CG": "Congo (Brazzaville)", - "CK": "Cook Islands", - "CR": "Costa Rica", - "HR": "Croatia", - "CU": "Cuba", - "CW": "Curaçao", - "CY": "Cyprus", - "CZ": "Czechia", - "CI": "Côte d'Ivoire", - "DK": "Denmark", - "DJ": "Djibouti", - "DM": "Dominica", - "DO": "Dominican Republic", - "EC": "Ecuador", - "EG": "Egypt", - "SV": "El Salvador", - "GQ": "Equatorial Guinea", - "ER": "Eritrea", - "EE": "Estonia", - "SZ": "Eswatini", - "ET": "Ethiopia", - "FK": "Falkland Islands", - "FO": "Faroe Islands", - "FJ": "Fiji", - "FI": "Finland", - "FR": "France", - "GF": "French Guiana", - "PF": "French Polynesia", - "TF": "French Southern Territories", - "GA": "Gabon", - "GM": "Gambia", - "GE": "Georgia", - "DE": "Germany", - "GH": "Ghana", - "GI": "Gibraltar", - "GR": "Greece", - "GL": "Greenland", - "GD": "Grenada", - "GP": "Guadeloupe", - "GU": "Guam", - "GT": "Guatemala", - "GG": "Guernsey", - "GN": "Guinea", - "GW": "Guinea-Bissau", - "GY": "Guyana", - "HT": "Haiti", - "HM": "Heard Island and McDonald Islands", - "VA": "Holy See", - "HN": "Honduras", - "HK": "Hong Kong", - "HU": "Hungary", - "IS": "Iceland", - "IN": "India", - "ID": "Indonesia", - "IR": "Iran", - "IQ": "Iraq", - "IE": "Ireland", - "IM": "Isle of Man", - "IL": "Israel", - "IT": "Italy", - "JM": "Jamaica", - "JP": "Japan", - "JE": "Jersey", - "JO": "Jordan", - "KZ": "Kazakhstan", - "KE": "Kenya", - "KI": "Kiribati", - "KP": "DPRK", - "KR": "Republic of Korea", - "KW": "Kuwait", - "KG": "Kyrgyzstan", - "LA": "Laos", - "LV": "Latvia", - "LB": "Lebanon", - "LS": "Lesotho", - "LR": "Liberia", - "LY": "Libya", - "LI": "Liechtenstein", - "LT": "Lithuania", - "LU": "Luxembourg", - "MO": "Macao", - "MG": "Madagascar", - "MW": "Malawi", - "MY": "Malaysia", - "MV": "Maldives", - "ML": "Mali", - "MT": "Malta", - "MH": "Marshall Islands", - "MQ": "Martinique", - "MR": "Mauritania", - "MU": "Mauritius", - "YT": "Mayotte", - "MX": "Mexico", - "FM": "Micronesia", - "MD": "Moldova", - "MC": "Monaco", - "MN": "Mongolia", - "ME": "Montenegro", - "MS": "Montserrat", - "MA": "Morocco", - "MZ": "Mozambique", - "MM": "Myanmar", - "NA": "Namibia", - "NR": "Nauru", - "NP": "Nepal", - "NL": "Netherlands", - "NC": "New Caledonia", - "NZ": "New Zealand", - "NI": "Nicaragua", - "NE": "Niger", - "NG": "Nigeria", - "NU": "Niue", - "NF": "Norfolk Island", - "MP": "Northern Mariana Islands", - "NO": "Norway", - "OM": "Oman", - "PK": "Pakistan", - "PW": "Palau", - "PS": "Palestine", - "PA": "Panama", - "PG": "Papua New Guinea", - "PY": "Paraguay", - "PE": "Peru", - "PH": "Philippines", - "PN": "Pitcairn", - "PL": "Poland", - "PT": "Portugal", - "PR": "Puerto Rico", - "QA": "Qatar", - "MK": "North Macedonia", - "RO": "Romania", - "RU": "Russian Federation", - "RW": "Rwanda", - "RE": "Réunion", - "BL": "Saint Barthélemy", - "SH": "Saint Helena, Ascension and Tristan da Cunha", - "KN": "Saint Kitts and Nevis", - "LC": "Saint Lucia", - "MF": "Saint Martin (French part)", - "PM": "Saint Pierre and Miquelon", - "VC": "Saint Vincent and the Grenadines", - "WS": "Samoa", - "SM": "San Marino", - "ST": "Sao Tome and Principe", - "SA": "Saudi Arabia", - "SN": "Senegal", - "RS": "Serbia", - "SC": "Seychelles", - "SL": "Sierra Leone", - "SG": "Singapore", - "SX": "Sint Maarten (Dutch part)", - "SK": "Slovakia", - "SI": "Slovenia", - "SB": "Solomon Islands", - "SO": "Somalia", - "ZA": "South Africa", - "GS": "South Georgia and the South Sandwich Islands", - "SS": "South Sudan", - "ES": "Spain", - "LK": "Sri Lanka", - "SD": "Sudan (the)", - "SR": "Suriname", - "SJ": "Svalbard and Jan Mayen", - "SE": "Sweden", - "CH": "Switzerland", - "SY": "Syrian Arab Republic", - "TW": "Taiwan", - "TJ": "Tajikistan", - "TZ": "Tanzania", - "TH": "Thailand", - "TL": "Timor-Leste", - "TG": "Togo", - "TK": "Tokelau", - "TO": "Tonga", - "TT": "Trinidad and Tobago", - "TN": "Tunisia", - "TR": "Turkey", - "TM": "Turkmenistan", - "TC": "Turks and Caicos Islands (the)", - "TV": "Tuvalu", - "UG": "Uganda", - "UA": "Ukraine", - "AE": "UAE", - "GB": "UK", - "UM": "United States Minor Outlying Islands", - "US": "USA", - "UY": "Uruguay", - "UZ": "Uzbekistan", - "VU": "Vanuatu", - "VE": "Venezuela", - "VN": "Vietnam", - "VG": "British Virgin Islands", - "VI": "US Virgin Islands", - "WF": "Wallis and Futuna", - "EH": "Western Sahara", - "YE": "Yemen", - "ZM": "Zambia", - "ZW": "Zimbabwe", - "AX": "Åland Islands" -} diff --git a/sites/kit.svelte.dev/src/routes/edge.svg/land-110m.json b/sites/kit.svelte.dev/src/routes/edge.svg/land-110m.json deleted file mode 100644 index fbd897cb1f1d..000000000000 --- a/sites/kit.svelte.dev/src/routes/edge.svg/land-110m.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"Topology","objects":{"land":{"type":"GeometryCollection","geometries":[{"type":"MultiPolygon","arcs":[[[0]],[[1]],[[2]],[[3]],[[4]],[[5]],[[6]],[[7]],[[8]],[[9]],[[10]],[[11]],[[12]],[[13]],[[14]],[[15]],[[16,18]],[[19]],[[20]],[[21]],[[22]],[[23]],[[24]],[[25]],[[26]],[[27]],[[28]],[[29]],[[30]],[[31]],[[32]],[[33]],[[34]],[[35]],[[36]],[[37]],[[38]],[[39]],[[40]],[[41]],[[42]],[[43]],[[44]],[[45]],[[46]],[[47]],[[48]],[[49]],[[50]],[[51]],[[52]],[[53]],[[54]],[[55]],[[56]],[[57]],[[58]],[[59]],[[60]],[[61]],[[62]],[[63]],[[64]],[[65]],[[66]],[[67]],[[68]],[[69]],[[70]],[[71]],[[72]],[[73]],[[74]],[[75]],[[76]],[[77]],[[78]],[[79]],[[80]],[[81]],[[82]],[[83]],[[84]],[[85]],[[86]],[[87]],[[88]],[[89]],[[90]],[[91]],[[92,115],[114]],[[94]],[[95]],[[96]],[[97]],[[98]],[[99]],[[100]],[[101]],[[102]],[[103]],[[104]],[[105]],[[106]],[[107]],[[108]],[[109]],[[110]],[[111]],[[112]],[[113]],[[116]],[[117]],[[118]],[[119]],[[120]],[[121]],[[122]],[[123]],[[124]],[[125]],[[126]],[[127]],[[128]],[[129]]]}]}},"arcs":[[[33452,3290],[-82,-301],[-81,-266],[-582,81],[-621,-35],[-348,197],[0,23],[-152,174],[625,-23],[599,-58],[207,243],[147,208],[288,-243]],[[5775,3611],[-533,-81],[-364,208],[-163,209],[-11,35],[-180,162],[169,220],[517,-93],[277,-185],[212,-209],[76,-266]],[[37457,4468],[342,-255],[120,-359],[33,-254],[11,-301],[-430,-186],[-452,-150],[-522,-139],[-582,-116],[-658,35],[-365,197],[49,243],[593,162],[239,197],[174,254],[126,220],[168,209],[180,243],[141,0],[414,127],[419,-127]],[[16330,7154],[359,-93],[332,104],[-158,-208],[-261,-151],[-386,47],[-278,208],[60,197],[332,-104]],[[15122,7165],[425,-231],[-164,23],[-359,58],[-381,162],[202,127],[277,-139]],[[22505,8080],[305,-81],[304,69],[163,-335],[-217,46],[-337,-23],[-343,23],[-376,-35],[-283,116],[-146,243],[174,104],[353,-81],[403,-46]],[[30985,8657],[33,-266],[-49,-231],[-76,-220],[-326,-81],[-311,-116],[-364,11],[136,232],[-327,-81],[-310,-81],[-212,174],[-16,243],[305,231],[190,70],[321,-23],[82,301],[16,219],[-6,475],[158,278],[256,93],[147,-220],[65,-220],[120,-267],[92,-254],[76,-267]],[[0,529],[16,-5],[245,344],[501,-185],[32,21],[78,49],[94,61],[81,52],[41,26],[41,-1],[29,-10],[402,-246],[352,246],[63,34],[816,104],[265,-138],[130,-71],[419,-196],[789,-151],[625,-185],[1072,-139],[800,162],[1181,-116],[669,-185],[734,174],[773,162],[60,278],[-1094,23],[-898,139],[-234,231],[-745,128],[49,266],[103,243],[104,220],[-55,243],[-462,162],[-212,209],[-430,185],[675,-35],[642,93],[402,-197],[495,173],[457,220],[223,197],[-98,243],[-359,162],[-408,174],[-571,35],[-500,81],[-539,58],[-180,220],[-359,185],[-217,208],[-87,672],[136,-58],[250,-185],[457,58],[441,81],[228,-255],[441,58],[370,127],[348,162],[315,197],[419,58],[-11,220],[-97,220],[81,208],[359,104],[163,-196],[425,115],[321,151],[397,12],[375,57],[376,139],[299,128],[337,127],[218,-35],[190,-46],[414,81],[370,-104],[381,11],[364,81],[375,-57],[414,-58],[386,23],[403,-12],[413,-11],[381,23],[283,174],[337,92],[349,-127],[331,104],[300,208],[179,-185],[98,-208],[180,-197],[288,174],[332,-220],[375,-70],[321,-162],[392,35],[354,104],[418,-23],[376,-81],[381,-104],[147,254],[-180,197],[-136,209],[-359,46],[-158,220],[-60,220],[-98,440],[213,-81],[364,-35],[359,35],[327,-93],[283,-174],[119,-208],[376,-35],[359,81],[381,116],[342,70],[283,-139],[370,46],[239,451],[224,-266],[321,-104],[348,58],[228,-232],[365,-23],[337,-69],[332,-128],[218,220],[108,209],[278,-232],[381,58],[283,-127],[190,-197],[370,58],[288,127],[283,151],[337,81],[392,69],[354,81],[272,127],[163,186],[65,254],[-32,244],[-87,231],[-98,232],[-87,231],[-71,209],[-16,231],[27,232],[130,220],[109,243],[44,231],[-55,255],[-32,232],[136,266],[152,173],[180,220],[190,186],[223,173],[109,255],[152,162],[174,151],[267,34],[174,186],[196,115],[228,70],[202,150],[157,186],[218,69],[163,-151],[-103,-196],[-283,-174],[-120,-127],[-206,92],[-229,-58],[-190,-139],[-202,-150],[-136,-174],[-38,-231],[17,-220],[130,-197],[-190,-139],[-261,-46],[-153,-197],[-163,-185],[-174,-255],[-44,-220],[98,-243],[147,-185],[229,-139],[212,-185],[114,-232],[60,-220],[82,-232],[130,-196],[82,-220],[38,-544],[81,-220],[22,-232],[87,-231],[-38,-313],[-152,-243],[-163,-197],[-370,-81],[-125,-208],[-169,-197],[-419,-220],[-370,-93],[-348,-127],[-376,-128],[-223,-243],[-446,-23],[-489,23],[-441,-46],[-468,0],[87,-232],[424,-104],[311,-162],[174,-208],[-310,-185],[-479,58],[-397,-151],[-17,-243],[-11,-232],[327,-196],[60,-220],[353,-220],[588,-93],[500,-162],[398,-185],[506,-186],[690,-92],[681,-162],[473,-174],[517,-197],[272,-278],[136,-220],[337,209],[457,173],[484,186],[577,150],[495,162],[691,12],[680,-81],[560,-139],[180,255],[386,173],[702,12],[550,127],[522,128],[577,81],[614,104],[430,150],[-196,209],[-119,208],[0,220],[-539,-23],[-571,-93],[-544,0],[-77,220],[39,440],[125,128],[397,138],[468,139],[337,174],[337,174],[251,231],[380,104],[376,81],[190,47],[430,23],[408,81],[343,116],[337,139],[305,139],[386,185],[245,197],[261,173],[82,232],[-294,139],[98,243],[185,185],[288,116],[305,139],[283,185],[217,232],[136,277],[202,163],[331,-35],[136,-197],[332,-23],[11,220],[142,231],[299,-58],[71,-220],[331,-34],[360,104],[348,69],[315,-34],[120,-243],[305,196],[283,105],[315,81],[310,81],[283,139],[310,92],[240,128],[168,208],[207,-151],[288,81],[202,-277],[157,-209],[316,116],[125,232],[283,162],[365,-35],[108,-220],[229,220],[299,69],[326,23],[294,-11],[310,-70],[300,-34],[130,-197],[180,-174],[304,104],[327,24],[315,0],[310,11],[278,81],[294,70],[245,162],[261,104],[283,58],[212,162],[152,324],[158,197],[288,-93],[109,-208],[239,-139],[289,46],[196,-208],[206,-151],[283,139],[98,255],[250,104],[289,197],[272,81],[326,116],[218,127],[228,139],[218,127],[261,-69],[250,208],[180,162],[261,-11],[229,139],[54,208],[234,162],[228,116],[278,93],[256,46],[244,-35],[262,-58],[223,-162],[27,-254],[245,-197],[168,-162],[332,-70],[185,-162],[229,-162],[266,-35],[223,116],[240,243],[261,-127],[272,-70],[261,-69],[272,-46],[277,0],[229,-614],[-11,-150],[-33,-267],[-266,-150],[-218,-220],[38,-232],[310,12],[-38,-232],[-141,-220],[-131,-243],[212,-185],[321,-58],[321,104],[153,232],[92,220],[153,185],[174,174],[70,208],[147,289],[174,58],[316,24],[277,69],[283,93],[136,231],[82,220],[190,220],[272,151],[234,115],[153,197],[157,104],[202,93],[277,-58],[250,58],[272,69],[305,-34],[201,162],[142,393],[103,-162],[131,-278],[234,-115],[266,-47],[267,70],[283,-46],[261,-12],[174,58],[234,-35],[212,-127],[250,81],[300,0],[255,81],[289,-81],[185,197],[141,196],[191,163],[348,439],[179,-81],[212,-162],[185,-208],[354,-359],[272,-12],[256,0],[299,70],[299,81],[229,162],[190,174],[310,23],[207,127],[218,-116],[141,-185],[196,-185],[305,23],[190,-150],[332,-151],[348,-58],[288,47],[218,185],[185,185],[250,46],[251,-81],[288,-58],[261,93],[250,0],[245,-58],[256,-58],[250,104],[299,93],[283,23],[316,0],[255,58],[251,46],[76,290],[11,243],[174,-162],[49,-266],[92,-244],[115,-196],[234,-105],[315,35],[365,12],[250,35],[364,0],[262,11],[364,-23],[310,-46],[196,-186],[-54,-220],[179,-173],[299,-139],[310,-151],[360,-104],[375,-92],[283,-93],[315,-12],[180,197],[245,-162],[212,-185],[245,-139],[337,-58],[321,-69],[136,-232],[316,-139],[212,-208],[310,-93],[321,12],[299,-35],[332,12],[332,-47],[310,-81],[288,-139],[289,-116],[195,-173],[-32,-232],[-147,-208],[-125,-266],[-98,-209],[-131,-243],[-364,-93],[-163,-208],[-360,-127],[-125,-232],[-190,-220],[-201,-185],[-115,-243],[-70,-220],[-28,-266],[6,-220],[158,-232],[60,-220],[130,-208],[517,-81],[109,-255],[-501,-93],[-424,-127],[-528,-23],[-234,-336],[-49,-278],[-119,-220],[-147,-220],[370,-196],[141,-244],[239,-219],[338,-197],[386,-186],[419,-185],[636,-185],[142,-289],[800,-128],[53,-45],[208,-175],[767,151],[636,-186],[-99520,-142]],[[31180,18764],[361,-355],[389,-147],[-125,-296],[-264,-29],[-141,208],[-92,-239],[-238,-183],[-301,67],[-202,177],[-291,86],[-350,330],[-283,317],[-383,662],[229,-124],[390,-395],[369,-212],[143,271],[90,405],[256,244],[198,-70],[106,-274],[139,-443]],[[33736,20389],[222,-266],[-83,-207],[-375,-177],[-125,207],[-236,-266],[-139,266],[333,354],[236,-148],[167,237]],[[69522,21210],[-427,-38],[-7,314],[41,244],[19,121],[179,-186],[263,-74],[9,-112],[-77,-269]],[[90387,26479],[269,-204],[151,81],[217,113],[166,-39],[20,-702],[-95,-203],[-29,-476],[-97,162],[-193,-412],[-57,32],[-171,19],[-171,505],[-38,390],[-160,515],[7,271],[181,-52]],[[98060,26404],[63,-244],[198,239],[80,-249],[0,-249],[-103,-274],[-182,-435],[-142,-238],[103,-284],[-214,-7],[-238,-223],[-75,-387],[-157,-597],[-219,-264],[-138,-169],[-256,13],[-180,194],[-302,42],[-46,217],[149,438],[349,583],[179,111],[200,225],[238,310],[167,306],[123,441],[106,149],[41,330],[195,273],[61,-251]],[[98502,29218],[202,-622],[5,403],[126,-161],[41,-447],[224,-192],[188,-48],[158,226],[141,-69],[-67,-524],[-85,-345],[-212,12],[-74,-179],[26,-254],[-41,-110],[-105,-319],[-138,-404],[-214,-236],[-48,155],[-116,85],[160,486],[-91,326],[-299,236],[8,214],[201,206],[47,455],[-13,382],[-113,396],[8,104],[-133,244],[-218,523],[-117,418],[104,46],[151,-328],[216,-153],[78,-526]],[[96421,37487],[-105,-142],[-153,160],[-199,266],[-179,313],[-184,416],[-38,201],[119,-9],[156,-201],[122,-200],[89,-166],[228,-366],[144,-272]],[[99547,40335],[96,-171],[-46,-308],[-172,-81],[-153,73],[-27,260],[107,203],[126,-74],[69,98]],[[0,40798],[99822,-145],[-177,-124],[-36,220],[139,121],[88,33],[-99836,184]],[[0,41087],[0,-289]],[[0,41087],[57,27],[-34,-284],[-23,-32]],[[96623,40851],[-92,-78],[-93,259],[10,158],[175,-339]],[[96418,41756],[45,-476],[-75,74],[-58,-32],[-39,163],[-6,453],[133,-182]],[[63904,42571],[45,-711],[72,-276],[-28,-284],[-49,-174],[-94,347],[-53,-175],[53,-438],[-24,-250],[-77,-137],[-18,-500],[-109,-689],[-137,-814],[-172,-1120],[-106,-821],[-125,-685],[-226,-140],[-243,-250],[-160,151],[-220,211],[-77,312],[-18,524],[-98,471],[-26,425],[50,426],[128,102],[1,197],[133,447],[25,377],[-65,280],[-52,372],[-23,544],[97,331],[38,375],[138,22],[155,121],[103,107],[122,7],[158,337],[229,364],[83,297],[-38,253],[118,-71],[153,410],[6,356],[92,264],[96,-254],[74,-251],[69,-390]],[[89877,42448],[100,-464],[179,223],[92,-250],[133,-231],[-29,-262],[60,-506],[42,-295],[70,-72],[75,-505],[-27,-307],[90,-400],[301,-309],[197,-281],[186,-257],[-37,-143],[159,-371],[108,-639],[111,130],[113,-256],[68,91],[48,-626],[197,-363],[129,-226],[217,-478],[78,-475],[7,-337],[-19,-365],[132,-502],[-16,-523],[-48,-274],[-75,-527],[6,-339],[-55,-423],[-123,-538],[-205,-290],[-102,-458],[-93,-292],[-82,-510],[-107,-294],[-70,-442],[-36,-407],[14,-187],[-159,-205],[-311,-22],[-257,-242],[-127,-229],[-168,-254],[-230,262],[-170,104],[43,308],[-152,-112],[-243,-428],[-240,160],[-158,94],[-159,42],[-269,171],[-179,364],[-52,449],[-64,298],[-137,240],[-267,71],[91,287],[-67,438],[-136,-408],[-247,-109],[146,327],[42,341],[107,289],[-22,438],[-226,-504],[-174,-202],[-106,-470],[-217,243],[9,313],[-174,429],[-147,221],[52,137],[-356,358],[-195,17],[-267,287],[-498,-56],[-359,-211],[-317,-197],[-265,39],[-294,-303],[-241,-137],[-53,-309],[-103,-240],[-236,-15],[-174,-52],[-246,107],[-199,-64],[-191,-27],[-165,-315],[-81,26],[-140,-167],[-133,-187],[-203,23],[-186,0],[-295,377],[-149,113],[6,338],[138,81],[47,134],[-10,212],[34,411],[-31,350],[-147,598],[-45,337],[12,336],[-111,385],[-7,174],[-123,235],[-35,463],[-158,467],[-39,252],[122,-255],[-93,548],[137,-171],[83,-229],[-5,303],[-138,465],[-26,186],[-65,177],[31,341],[56,146],[38,295],[-29,346],[114,425],[21,-450],[118,406],[225,198],[136,252],[212,217],[126,46],[77,-73],[219,220],[168,66],[42,129],[74,54],[153,-14],[292,173],[151,262],[71,316],[163,300],[13,236],[7,321],[194,502],[117,-510],[119,118],[-99,279],[87,287],[122,-128],[34,449],[152,291],[67,233],[140,101],[4,165],[122,-69],[5,148],[122,85],[134,80],[205,-271],[155,-350],[173,-4],[177,-56],[-59,325],[133,473],[126,155],[-44,147],[121,338],[168,208],[142,-70],[234,111],[-5,302],[-204,195],[148,86],[184,-147],[148,-242],[234,-151],[79,60],[172,-182],[162,169],[105,-51],[65,113],[127,-292],[-74,-316],[-105,-239],[-96,-20],[32,-236],[-81,-295],[-99,-291],[20,-166],[221,-327],[214,-189],[143,-204],[201,-350],[78,1],[145,-151],[43,-183],[265,-200],[183,202],[55,317],[56,262],[34,324],[85,470],[-39,286],[20,171],[-32,339],[37,445],[53,120],[-43,197],[67,313],[52,325],[7,168],[104,222],[78,-289],[19,-371],[70,-71],[11,-249],[101,-300],[21,-335],[-10,-214]],[[95032,44386],[78,-203],[-194,4],[-106,363],[166,-142],[56,-22]],[[83531,44530],[-117,-11],[-368,414],[259,116],[146,-180],[97,-180],[-17,-159]],[[94680,44747],[-108,-14],[-170,60],[-58,91],[17,235],[183,-93],[91,-124],[45,-155]],[[94910,44908],[-42,-109],[-206,512],[-57,353],[94,0],[100,-473],[111,-283]],[[84565,44589],[-238,-130],[-33,71],[25,201],[119,360],[275,235],[32,139],[239,133],[194,20],[87,74],[105,-74],[-102,-160],[-289,-258],[-233,-170],[-181,-441]],[[82749,45797],[100,-158],[172,48],[69,-251],[-321,-119],[-193,-79],[-149,5],[95,340],[153,5],[74,209]],[[84139,45797],[-41,-328],[-417,-168],[-370,73],[0,216],[220,123],[174,-177],[185,45],[249,216]],[[94409,45654],[12,-119],[-218,251],[-152,212],[-104,197],[41,60],[128,-142],[228,-272],[65,-187]],[[93760,46238],[-56,-33],[-121,134],[-114,243],[14,99],[166,-250],[111,-193]],[[80172,46575],[533,-59],[61,244],[515,-284],[101,-383],[417,-108],[341,-351],[-317,-225],[-306,238],[-251,-16],[-288,44],[-260,106],[-322,225],[-204,59],[-116,-74],[-506,243],[-48,254],[-255,44],[191,564],[337,-35],[224,-231],[115,-45],[38,-210]],[[87423,46908],[-143,-402],[-27,445],[49,212],[58,200],[63,-173],[0,-282]],[[93299,46550],[-78,-59],[-120,227],[-122,375],[-59,450],[38,57],[30,-175],[84,-134],[135,-375],[131,-200],[-39,-166]],[[92217,47343],[-146,-48],[-44,-166],[-152,-144],[-142,-138],[-148,1],[-228,171],[-158,165],[23,183],[249,-86],[152,46],[42,283],[40,15],[27,-314],[158,45],[78,202],[155,211],[-30,348],[166,11],[56,-97],[-5,-327],[-93,-361]],[[85346,48536],[-104,-196],[-192,108],[-54,254],[281,29],[69,-195]],[[86241,48752],[101,-452],[-234,244],[-232,49],[-157,-39],[-192,21],[65,325],[344,24],[305,-172]],[[92538,47921],[-87,-157],[-52,348],[-65,229],[-126,193],[-158,252],[-200,174],[77,143],[150,-166],[94,-130],[117,-142],[111,-248],[106,-189],[33,-307]],[[87261,49899],[78,-955],[287,-354],[232,627],[319,356],[247,1],[238,-206],[206,-212],[298,-113],[482,-407],[513,-338],[192,-302],[154,-297],[43,-349],[462,-365],[68,-313],[-256,-64],[62,-393],[248,-388],[180,-627],[159,20],[-11,-262],[215,-100],[-84,-111],[295,-249],[-30,-171],[-184,-41],[-69,153],[-238,66],[-281,89],[-216,377],[-158,325],[-144,517],[-362,259],[-235,-169],[-170,-195],[35,-436],[-218,-203],[-155,99],[-288,25],[-247,485],[-282,118],[-69,-168],[-352,-18],[118,481],[175,164],[-72,642],[-134,496],[-538,500],[-229,50],[-417,546],[-82,-287],[-107,-52],[-63,216],[-1,257],[-212,290],[299,213],[198,-11],[-23,156],[-407,1],[-110,352],[-248,109],[-117,293],[374,143],[142,192],[446,-242],[44,-220]],[[84788,51419],[-223,-587],[-209,-113],[-267,115],[-463,-29],[-243,-85],[-39,-447],[248,-526],[150,268],[518,201],[-22,-272],[-121,86],[-121,-347],[-245,-229],[263,-757],[-50,-203],[249,-682],[-2,-388],[-148,-173],[-109,207],[134,484],[-273,-229],[-69,164],[36,228],[-200,346],[21,576],[-186,-179],[24,-689],[11,-846],[-176,-85],[-119,173],[79,544],[-43,570],[-117,4],[-86,405],[115,387],[40,469],[139,891],[58,243],[237,439],[217,-174],[350,-82],[319,25],[275,429],[48,-132]],[[85746,51249],[-15,-517],[-143,58],[-42,-359],[114,-312],[-78,-71],[-112,374],[-82,755],[56,472],[92,215],[20,-322],[164,-52],[26,-241]],[[79393,47122],[-308,-12],[-234,494],[-356,482],[-119,358],[-210,481],[-138,443],[-212,827],[-244,493],[-81,508],[-103,461],[-250,372],[-145,506],[-209,330],[-290,652],[-24,300],[178,-24],[430,-114],[246,-577],[215,-401],[153,-246],[263,-635],[283,-9],[233,-405],[161,-495],[211,-270],[-111,-482],[159,-205],[100,-15],[47,-412],[97,-330],[204,-52],[135,-374],[-70,-735],[-11,-914]],[[82742,51659],[312,-546],[-329,-70],[-93,-403],[12,-535],[-267,-404],[-7,-589],[-107,-903],[-41,210],[-316,-266],[-110,361],[-198,34],[-139,189],[-330,-212],[-101,285],[-182,-32],[-229,68],[-43,793],[-138,164],[-134,505],[-38,517],[32,548],[165,392],[204,-202],[214,110],[56,500],[119,112],[333,128],[199,467],[137,374],[110,221],[236,323],[214,411],[140,462],[112,2],[143,-299],[13,-257],[183,-165],[231,-177],[-20,-232],[-186,-29],[50,-289],[-205,-201],[-158,-533],[204,-560],[-48,-272]],[[85104,55551],[28,-392],[16,-332],[-94,-540],[-102,602],[-130,-300],[89,-435],[-79,-277],[-327,343],[-78,428],[84,280],[-176,280],[-87,-245],[-131,23],[-205,-330],[-46,173],[109,498],[175,166],[151,223],[98,-268],[212,162],[45,264],[196,15],[-16,457],[225,-280],[23,-297],[20,-218]],[[72560,54241],[-242,-135],[-132,470],[-49,849],[126,959],[192,-328],[129,-416],[134,-616],[-42,-615],[-116,-168]],[[33073,56553],[-232,-65],[-50,53],[81,163],[-6,233],[160,77],[58,-21],[-11,-440]],[[84439,56653],[-100,-195],[-87,-373],[-87,-175],[-171,409],[57,158],[70,165],[30,367],[153,35],[-44,-398],[205,570],[-26,-563]],[[82917,56084],[-369,-561],[136,414],[200,364],[167,409],[146,587],[49,-482],[-183,-325],[-146,-406]],[[83856,57606],[166,-183],[177,1],[-5,-247],[-129,-251],[-176,-178],[-10,275],[20,301],[-43,282]],[[84861,57766],[78,-660],[-214,157],[5,-199],[68,-364],[-132,-133],[-11,416],[-84,31],[-43,357],[163,-47],[-4,224],[-169,451],[266,-13],[77,-220]],[[83757,58301],[-74,-510],[-119,295],[-142,450],[238,-22],[97,-213]],[[83700,61512],[171,-168],[85,153],[26,-150],[-46,-245],[95,-423],[-73,-491],[-164,-196],[-43,-476],[62,-471],[147,-65],[123,70],[347,-328],[-27,-321],[91,-142],[-29,-272],[-216,290],[-103,310],[-71,-217],[-177,354],[-253,-87],[-138,130],[14,244],[87,151],[-83,136],[-36,-213],[-137,340],[-41,257],[-11,566],[112,-195],[29,925],[90,535],[169,-1]],[[31780,61349],[-71,-149],[-209,4],[-163,-21],[-16,253],[40,86],[227,-3],[142,-52],[50,-118]],[[28638,61137],[-84,-99],[-156,95],[-159,215],[34,135],[116,41],[64,-20],[187,-53],[147,-142],[46,-161],[-195,-11]],[[29839,62320],[241,-93],[34,101],[217,-3],[165,-152],[73,15],[50,-209],[152,11],[-9,-176],[124,-21],[136,-217],[-103,-240],[-132,128],[-127,-25],[-92,28],[-50,-107],[-106,-37],[-43,144],[-92,-85],[-111,-405],[-71,94],[-14,170],[-185,100],[-131,-41],[-169,43],[-130,-110],[-149,184],[24,190],[256,-82],[210,-47],[100,131],[-127,256],[2,226],[-175,92],[62,163],[170,-26]],[[80649,61615],[-240,-284],[-228,183],[-8,509],[137,267],[304,166],[159,-14],[62,-226],[-122,-260],[-64,-341]],[[6794,61855],[-41,-99],[-69,84],[8,165],[-46,216],[14,65],[48,97],[-19,116],[16,55],[21,-11],[107,-100],[49,-51],[45,-79],[71,-207],[-7,-33],[-108,-126],[-89,-92]],[[6645,62777],[-94,-43],[-47,125],[-32,48],[-3,37],[27,50],[99,-56],[73,-90],[-23,-71]],[[6456,63091],[-9,-63],[-149,17],[21,72],[137,-26]],[[6207,63177],[-15,-34],[-19,8],[-97,21],[-35,133],[-11,24],[74,82],[23,-38],[80,-196]],[[5737,63567],[-33,-58],[-93,107],[14,43],[43,58],[64,-12],[5,-138]],[[27867,64030],[110,-216],[260,66],[98,-138],[235,-366],[173,-267],[92,8],[165,-120],[-20,-167],[205,-24],[210,-242],[-33,-138],[-185,-75],[-187,-29],[-191,46],[-398,-57],[186,329],[-113,154],[-179,39],[-96,171],[-66,336],[-157,-23],[-259,159],[-83,124],[-362,91],[-97,115],[104,148],[-273,30],[-199,-307],[-115,-8],[-40,-144],[-138,-65],[-118,56],[146,183],[60,213],[126,131],[142,116],[210,56],[67,65],[240,-42],[219,-7],[261,-201]],[[28462,64617],[-68,-29],[-70,340],[-104,171],[60,375],[84,-23],[97,-491],[1,-343]],[[83659,64045],[-119,-485],[-146,499],[-32,438],[163,581],[223,447],[127,-176],[-49,-357],[-167,-947]],[[28383,66284],[-303,-95],[-19,219],[130,47],[184,-18],[8,-153]],[[28611,66290],[-48,-420],[-51,75],[4,309],[-124,234],[-1,67],[220,-265]],[[87399,70756],[35,-203],[-156,-357],[-114,189],[-143,-137],[-73,-346],[-181,168],[2,281],[154,352],[158,-68],[114,248],[204,-127]],[[59604,71655],[-188,-251],[21,-111],[8,-48],[-285,-240],[-136,77],[-64,237],[132,22],[19,3],[40,143],[200,-8],[253,176]],[[56583,71675],[152,-199],[216,34],[207,-42],[-7,-103],[151,71],[-35,-175],[-400,-50],[3,98],[-339,115],[52,251]],[[54311,73167],[-100,-465],[41,-183],[-58,-303],[-213,222],[-141,64],[-387,300],[38,304],[325,-54],[284,64],[211,51]],[[52558,74927],[166,-419],[-39,-782],[-126,38],[-113,-197],[-105,156],[-11,713],[-64,338],[153,-30],[139,183]],[[89159,72524],[-104,-472],[48,-296],[-145,-416],[-355,-278],[-488,-36],[-396,-675],[-186,227],[-12,442],[-483,-130],[-329,-279],[-325,-11],[282,-435],[-186,-1004],[-179,-248],[-135,229],[69,533],[-176,172],[-113,405],[263,182],[145,371],[280,306],[203,403],[553,177],[297,-121],[291,1050],[185,-282],[408,591],[158,229],[174,723],[-47,664],[117,374],[295,108],[152,-819],[-9,-479],[-256,-595],[4,-610]],[[52655,75484],[-92,-456],[-126,120],[-64,398],[56,219],[179,226],[47,-507]],[[89974,76679],[195,-126],[197,250],[62,-663],[-412,-162],[-244,-587],[-436,404],[-152,-646],[-308,-9],[-39,587],[138,455],[296,33],[81,817],[83,460],[326,-615],[213,-198]],[[32315,78082],[202,-79],[257,16],[-137,-242],[-102,-38],[-353,250],[-69,198],[105,183],[97,-288]],[[32831,79592],[-135,-11],[-360,186],[-258,279],[96,49],[365,-148],[284,-247],[8,-108]],[[15692,79240],[-140,-82],[-456,269],[-84,209],[-248,207],[-50,168],[-286,107],[-107,321],[24,137],[291,-129],[171,-89],[261,-63],[94,-204],[138,-280],[277,-244],[115,-327]],[[34407,80527],[-184,-517],[181,199],[187,-126],[-98,-206],[247,-162],[128,144],[277,-182],[-86,-433],[194,101],[36,-313],[86,-367],[-117,-520],[-125,-22],[-183,111],[60,484],[-77,75],[-322,-513],[-166,21],[196,277],[-267,144],[-298,-35],[-539,18],[-43,175],[173,208],[-121,160],[234,356],[287,941],[172,336],[241,204],[129,-26],[-54,-160],[-148,-372]],[[13136,82508],[267,47],[-84,-671],[242,-475],[-111,1],[-167,270],[-103,272],[-140,184],[-51,260],[16,188],[131,-76]],[[89901,80562],[280,-1046],[-411,195],[-171,-854],[271,-605],[-8,-413],[-211,356],[-182,-457],[-51,496],[31,575],[-32,638],[64,446],[13,790],[-163,581],[24,808],[257,271],[-110,274],[123,83],[73,-391],[96,-569],[-7,-581],[114,-597]],[[48114,81456],[-493,-349],[-393,89],[225,617],[-145,601],[378,463],[210,276],[233,24],[298,-365],[-149,-406],[46,-422],[-210,-528]],[[53524,83435],[-166,-478],[-291,333],[-39,246],[408,195],[88,-296]],[[7498,84325],[-277,-225],[-142,152],[-43,277],[252,210],[148,90],[185,-40],[117,-183],[-240,-281]],[[49165,85222],[-297,-639],[283,81],[304,-3],[-72,-481],[-250,-530],[287,-38],[270,-759],[190,-95],[171,-673],[79,-233],[337,-113],[-34,-378],[-142,-173],[111,-305],[-250,-310],[-371,6],[-473,-163],[-130,116],[-183,-276],[-257,67],[-195,-226],[-148,118],[407,621],[249,127],[-436,99],[-79,235],[291,183],[-152,319],[52,387],[414,-54],[40,343],[-190,372],[-337,104],[-66,160],[101,264],[-92,163],[-149,-279],[-17,569],[-140,301],[101,611],[216,480],[222,-47],[335,49]],[[4006,85976],[-171,-92],[-182,110],[-168,161],[274,101],[220,-54],[27,-226]],[[27981,87304],[-108,-310],[-123,50],[-73,176],[13,41],[107,177],[114,-13],[70,-121]],[[27250,87631],[-325,-326],[-196,13],[-61,160],[207,273],[381,-6],[-6,-114]],[[2297,88264],[171,-113],[173,61],[225,-156],[276,-79],[-23,-64],[-211,-125],[-211,128],[-106,107],[-245,-34],[-66,52],[17,223]],[[26344,89371],[51,-259],[143,91],[161,-155],[304,-203],[318,-184],[25,-281],[204,46],[199,-196],[-247,-186],[-432,142],[-156,266],[-275,-314],[-396,-306],[-95,346],[-377,-57],[242,292],[35,465],[95,542],[201,-49]],[[45969,89843],[-64,-382],[314,-403],[-361,-451],[-801,-405],[-240,-107],[-365,87],[-775,187],[273,261],[-605,289],[492,114],[-12,174],[-583,137],[188,385],[421,87],[433,-400],[422,321],[349,-167],[453,315],[461,-42]],[[28926,90253],[-312,-30],[-69,289],[118,331],[255,82],[217,-163],[3,-253],[-32,-82],[-180,-174]],[[0,91325],[681,-451],[728,-588],[-24,-367],[187,-147],[-64,429],[754,-88],[544,-553],[-276,-257],[-455,-61],[-7,-578],[-111,-122],[-260,17],[-212,206],[-369,172],[-62,257],[-283,96],[-315,-76],[-151,207],[60,219],[-333,-140],[126,-278],[-158,-251]],[[0,88971],[0,2354]],[[23431,91410],[-173,-207],[-374,179],[-226,-65],[-380,266],[245,183],[194,256],[295,-168],[166,-106],[84,-112],[169,-226]],[[0,92833],[99999,-404],[-305,-30],[-49,187],[-99645,247]],[[0,92833],[36,24],[235,-1],[402,-169],[-24,-81],[-286,-141],[-363,-36],[0,404]],[[24848,91640],[-1,-604],[371,463],[332,-380],[-83,-438],[269,-399],[290,427],[202,510],[16,648],[394,-45],[411,-87],[373,-293],[17,-293],[-207,-315],[196,-316],[-36,-288],[-544,-413],[-386,-91],[-287,178],[-83,-297],[-268,-498],[-81,-258],[-322,-400],[-397,-39],[-220,-250],[-18,-384],[-323,-74],[-340,-479],[-301,-665],[-108,-466],[-15,-686],[408,-99],[125,-553],[130,-448],[388,117],[517,-256],[277,-225],[199,-279],[348,-162],[294,-249],[459,-34],[302,-58],[-45,-511],[86,-594],[201,-661],[414,-561],[214,192],[150,607],[-145,934],[-196,311],[445,276],[314,415],[154,411],[-22,395],[-189,502],[-338,445],[328,619],[-121,535],[-93,922],[194,137],[476,-161],[286,-57],[230,155],[258,-200],[342,-343],[85,-229],[495,-45],[-8,-496],[92,-747],[254,-92],[201,-348],[402,328],[266,652],[184,274],[216,-527],[362,-754],[307,-709],[-112,-371],[370,-333],[250,-338],[442,-152],[179,-189],[110,-500],[216,-78],[112,-223],[20,-664],[-202,-222],[-199,-207],[-458,-210],[-349,-486],[-470,-96],[-594,125],[-417,4],[-287,-41],[-233,-424],[-354,-262],[-401,-782],[-320,-545],[236,97],[446,776],[583,493],[416,59],[245,-290],[-262,-397],[88,-637],[91,-446],[361,-295],[459,86],[278,664],[19,-429],[180,-214],[-344,-387],[-615,-351],[-276,-239],[-310,-426],[-211,44],[-11,500],[483,488],[-445,-19],[-309,-72],[48,-194],[-296,-286],[-286,-204],[-293,-175],[-159,-386],[-35,-98],[-3,-313],[92,-313],[115,-15],[-29,216],[83,-131],[-22,-169],[-188,-96],[-133,12],[-205,-104],[-121,-29],[-162,-29],[-231,-171],[408,111],[82,-112],[-389,-177],[-177,-1],[8,72],[-84,-164],[82,-27],[-60,-424],[-203,-455],[-20,152],[-61,31],[-91,147],[57,-318],[66,-106],[8,-222],[-89,-230],[-157,-472],[-25,24],[86,402],[-142,226],[-33,490],[-53,-255],[59,-375],[-175,88],[183,-186],[12,-562],[79,-41],[29,-204],[39,-591],[-176,-439],[-288,-175],[-182,-346],[-139,-38],[-141,-217],[-39,-199],[-305,-383],[-157,-281],[-131,-351],[-43,-419],[50,-411],[92,-505],[124,-418],[1,-256],[132,-685],[-9,-398],[-12,-230],[-69,-361],[-83,-74],[-137,71],[-44,259],[-106,136],[-147,508],[-129,452],[-42,231],[57,393],[-77,325],[-217,494],[-108,91],[-281,-269],[-49,30],[-135,276],[-174,146],[-314,-75],[-247,66],[-212,-41],[-118,-83],[54,-166],[-5,-240],[59,-117],[-53,-77],[-103,87],[-104,-112],[-202,18],[-207,313],[-242,-74],[-202,137],[-173,-42],[-234,-138],[-253,-438],[-276,-255],[-152,-282],[-63,-266],[-3,-407],[14,-284],[52,-201],[1,-1],[-1,-1],[-107,-516],[-49,-426],[-20,-791],[-27,-289],[48,-322],[86,-288],[56,-458],[184,-440],[65,-337],[109,-291],[295,-157],[114,-247],[244,165],[212,60],[208,106],[175,101],[176,241],[67,345],[22,496],[48,173],[188,155],[294,137],[246,-21],[169,50],[66,-125],[-9,-285],[-149,-351],[-66,-360],[51,-103],[-42,-255],[-69,-461],[-71,152],[-58,-10],[1,-87],[53,-3],[-5,-160],[-45,-256],[24,-91],[-29,-212],[18,-56],[-32,-299],[-55,-156],[-50,-19],[-55,-205],[90,-107],[24,88],[82,-75],[29,-23],[61,104],[79,8],[26,-48],[43,29],[129,-53],[128,16],[90,65],[32,66],[89,-31],[66,-40],[73,14],[55,51],[127,-82],[44,-13],[85,-110],[80,-132],[101,-91],[73,-162],[-24,-57],[-14,-132],[29,-216],[-64,-202],[-30,-237],[-9,-261],[15,-152],[7,-266],[-43,-58],[-26,-253],[19,-156],[-56,-151],[12,-159],[43,-97],[70,-321],[108,-238],[130,-252],[100,-212],[-6,-125],[111,-27],[26,48],[77,-145],[136,42],[119,150],[168,119],[95,176],[153,-34],[-10,-58],[155,-21],[124,-102],[90,-177],[105,-164],[143,-18],[209,412],[114,63],[3,195],[51,500],[159,274],[175,11],[22,123],[218,-49],[218,298],[109,132],[134,285],[98,-36],[73,-156],[-54,-199],[-8,-139],[-163,-69],[91,-268],[-3,-309],[-123,-343],[105,-469],[120,38],[62,427],[-86,208],[-14,447],[346,241],[-38,278],[97,186],[100,-415],[195,-9],[180,-330],[11,-195],[249,-6],[297,61],[159,-264],[213,-73],[155,184],[4,149],[344,35],[333,9],[-236,-175],[95,-279],[222,-44],[210,-291],[45,-473],[144,13],[109,-139],[183,-217],[171,-385],[8,-304],[105,-14],[149,-289],[109,-205],[333,-119],[30,107],[225,43],[298,-159],[95,-65],[204,-140],[294,-499],[46,-242],[95,28],[69,-327],[155,-1033],[149,-97],[7,-408],[-208,-487],[86,-178],[491,-92],[10,-593],[211,388],[349,-212],[462,-361],[135,-346],[-45,-327],[323,182],[540,-313],[415,23],[411,-489],[355,-662],[214,-170],[237,-24],[101,-186],[94,-752],[46,-358],[-110,-977],[-142,-385],[-391,-822],[-177,-668],[-206,-513],[-69,-11],[-78,-435],[20,-1107],[-77,-910],[-30,-390],[-88,-233],[-49,-790],[-282,-771],[-47,-610],[-225,-256],[-65,-355],[-302,2],[-437,-227],[-195,-263],[-311,-173],[-327,-470],[-235,-586],[-41,-441],[46,-326],[-51,-597],[-63,-289],[-195,-325],[-308,-1040],[-244,-468],[-189,-277],[-127,-562],[-183,-337],[-121,-372],[-313,-328],[-205,118],[-151,-63],[-256,253],[-189,-19],[-169,327],[-19,-308],[353,-506],[-38,-408],[173,-257],[-14,-289],[-267,-757],[-412,-317],[-557,-123],[-305,59],[59,-352],[-57,-442],[51,-298],[-167,-208],[-284,-82],[-267,216],[-108,-155],[39,-587],[188,-178],[152,186],[82,-307],[-255,-183],[-223,-367],[-41,-595],[-66,-316],[-262,-2],[-218,-302],[-80,-443],[274,-433],[265,-119],[-96,-531],[-328,-333],[-180,-692],[-254,-234],[-113,-276],[89,-614],[185,-342],[-117,30],[-247,4],[-134,-145],[-250,-213],[-45,-552],[-118,-14],[-313,192],[-318,412],[-346,338],[-87,374],[79,346],[-140,393],[-36,1007],[119,568],[293,457],[-422,172],[265,522],[94,982],[309,-208],[145,1224],[-186,157],[-87,-738],[-175,83],[87,845],[95,1095],[127,404],[-79,576],[-23,666],[117,19],[170,954],[192,945],[118,881],[-64,885],[83,487],[-34,730],[163,721],[50,1143],[89,1227],[87,1321],[-20,967],[-58,832],[-279,340],[-24,242],[-551,593],[-498,646],[-214,365],[-115,488],[46,170],[-236,775],[-274,1090],[-262,1177],[-114,269],[-87,435],[-216,386],[-198,239],[90,264],[-134,563],[86,414],[221,373],[148,442],[-60,258],[-106,-275],[-166,259],[56,167],[-47,536],[97,89],[52,368],[105,381],[-20,241],[153,126],[190,236],[-37,183],[103,44],[-12,296],[65,214],[138,40],[117,371],[106,310],[-102,141],[52,343],[-62,540],[59,155],[-44,500],[-112,315],[-93,170],[-59,319],[68,158],[-70,40],[-52,195],[-138,165],[-122,-38],[-56,-205],[-112,-149],[-61,-20],[-27,-123],[132,-321],[-75,-76],[-40,-87],[-130,-30],[-48,353],[-36,-101],[-92,35],[-56,238],[-114,39],[-72,69],[-119,-1],[-8,-128],[-32,89],[-151,131],[-56,124],[32,103],[-11,130],[-77,142],[-109,116],[-95,76],[-19,173],[-73,105],[18,-172],[-55,-141],[-64,164],[-89,58],[-38,120],[2,179],[36,187],[-78,83],[64,114],[-96,186],[-130,238],[-61,200],[-117,185],[-140,267],[31,92],[46,-89],[21,41],[-48,185],[-84,52],[-31,-140],[-161,9],[-100,57],[-115,117],[-154,37],[-79,127],[-142,103],[-174,11],[-127,117],[-149,244],[-314,636],[-144,192],[-226,154],[-156,-43],[-223,-223],[-140,-58],[-196,156],[-208,112],[-260,271],[-208,83],[-314,275],[-233,282],[-70,158],[-155,35],[-284,187],[-116,270],[-299,335],[-139,373],[-66,288],[93,57],[-29,169],[64,153],[1,204],[-93,266],[-25,235],[-94,298],[-244,587],[-280,462],[-135,368],[-238,241],[-51,145],[42,365],[-142,137],[-164,288],[-69,412],[-149,48],[-162,311],[-130,288],[-12,184],[-149,446],[-99,452],[5,227],[-201,235],[-93,-26],[-159,163],[-44,-240],[46,-284],[27,-444],[95,-243],[206,-407],[46,-139],[42,-42],[37,-203],[49,8],[56,-381],[85,-150],[59,-210],[174,-300],[92,-550],[83,-259],[77,-277],[15,-311],[134,-20],[112,-268],[100,-264],[-6,-106],[-117,-217],[-49,3],[-74,359],[-182,337],[-200,286],[-142,150],[9,432],[-42,320],[-132,183],[-191,264],[-37,-76],[-70,154],[-171,143],[-164,343],[20,44],[115,-33],[103,221],[10,266],[-214,422],[-163,163],[-102,369],[-103,388],[-129,472],[-113,531],[-46,302],[-180,340],[-130,71],[-30,169],[-156,30],[-100,159],[-258,59],[-70,95],[-34,324],[-270,594],[-231,821],[10,137],[-123,195],[-215,495],[-38,482],[-148,323],[61,489],[-10,507],[-89,453],[109,557],[67,1072],[-50,792],[-88,506],[-80,274],[33,115],[402,-200],[148,-558],[68,156],[-44,485],[-94,484],[-38,1],[-537,581],[-199,255],[-503,245],[-155,523],[40,362],[-356,252],[-48,476],[-336,429],[-6,304],[-153,223],[-245,188],[-78,515],[-358,478],[-150,558],[-267,38],[-441,15],[-326,170],[-574,613],[-266,112],[-486,211],[-385,-50],[-546,271],[-330,252],[-309,-125],[58,-411],[-154,-38],[-321,-123],[-245,-199],[-307,-126],[-40,348],[125,580],[295,182],[-76,148],[-354,-329],[-190,-394],[-400,-420],[203,-287],[-262,-424],[-299,-247],[-278,-181],[-69,-261],[-434,-305],[-87,-278],[-325,-252],[-191,45],[-259,-165],[-282,-201],[-231,-197],[-477,-169],[-43,99],[304,276],[271,182],[296,324],[345,66],[137,243],[385,353],[62,119],[205,208],[48,448],[141,349],[-320,-179],[-90,102],[-150,-215],[-181,300],[-75,-212],[-104,294],[-278,-236],[-170,0],[-24,352],[50,217],[-179,210],[-361,-113],[-235,277],[-190,142],[-1,334],[-214,252],[108,340],[226,330],[99,303],[225,43],[191,-94],[224,285],[201,-51],[212,183],[-52,270],[-155,106],[205,228],[-170,-7],[-295,-128],[-85,-131],[-219,131],[-392,-67],[-407,142],[-117,238],[-351,343],[390,247],[620,289],[228,0],[-38,-295],[586,22],[-225,366],[-342,226],[-197,295],[-267,252],[-381,187],[155,309],[493,19],[350,270],[66,287],[284,281],[271,68],[526,262],[256,-40],[427,315],[421,-124],[201,-266],[123,114],[469,-35],[-16,-136],[425,-101],[283,59],[585,-186],[534,-56],[214,-77],[370,96],[421,-177],[302,-83],[518,-142],[438,-284],[289,-55],[244,247],[336,184],[413,-72],[416,259],[455,148],[191,-245],[207,138],[62,278],[192,-63],[470,-530],[369,401],[38,-448],[341,96],[105,173],[337,-34],[424,-248],[650,-217],[383,-100],[272,38],[375,-300],[-391,-293],[502,-127],[750,70],[236,103],[296,-354],[302,299],[-283,251],[179,202],[338,27],[223,59],[224,-141],[279,-321],[310,47],[491,-266],[431,94],[405,-14],[-32,367],[247,103],[431,-200],[-2,-559],[177,471],[223,-16],[126,594],[-298,364],[-324,239],[22,653],[329,429],[366,-95],[281,-261],[378,-666],[-247,-290],[517,-120]],[[18287,93781],[-139,-277],[618,179],[386,-298],[314,302],[254,-194],[227,-580],[140,244],[-197,606],[244,86],[276,-94],[311,-239],[175,-575],[86,-417],[466,-293],[502,-279],[-31,-260],[-456,-48],[178,-227],[-94,-217],[-503,93],[-478,160],[-322,-36],[-522,-201],[-824,-103],[-374,-41],[-151,279],[-379,161],[-246,-66],[-343,468],[185,62],[429,101],[392,-26],[362,103],[-537,138],[-594,-47],[-394,12],[-146,217],[644,237],[-428,-9],[-485,156],[233,443],[193,235],[744,359],[284,-114]],[[20972,93958],[-244,-390],[-434,413],[95,83],[372,24],[211,-130]],[[28794,93770],[25,-163],[-296,17],[-299,13],[-304,-80],[-80,36],[-306,313],[12,213],[133,39],[636,-63],[479,-325]],[[25955,93803],[219,-369],[256,477],[704,242],[477,-611],[-42,-387],[550,172],[263,235],[616,-299],[383,-282],[36,-258],[515,134],[290,-376],[670,-234],[242,-238],[263,-553],[-510,-275],[654,-386],[441,-130],[400,-543],[437,-39],[-87,-414],[-487,-687],[-342,253],[-437,568],[-359,-74],[-35,-338],[292,-344],[377,-272],[114,-157],[181,-584],[-96,-425],[-350,160],[-697,473],[393,-509],[289,-357],[45,-206],[-753,236],[-596,343],[-337,287],[97,167],[-414,304],[-405,286],[5,-171],[-803,-94],[-235,203],[183,435],[522,10],[571,76],[-92,211],[96,294],[360,576],[-77,261],[-107,203],[-425,286],[-563,201],[178,150],[-294,367],[-245,34],[-219,201],[-149,-175],[-503,-76],[-1011,132],[-588,174],[-450,89],[-231,207],[290,270],[-394,2],[-88,599],[213,528],[286,241],[717,158],[-204,-382]],[[22123,94208],[331,-124],[496,75],[72,-172],[-259,-283],[420,-254],[-50,-532],[-455,-229],[-268,50],[-192,225],[-690,456],[5,189],[567,-73],[-306,386],[329,286]],[[89889,93835],[-421,-4],[-569,66],[-49,31],[263,234],[348,54],[394,-226],[34,-155]],[[24112,93575],[-298,-442],[-317,22],[-173,519],[4,294],[145,251],[276,161],[579,-20],[530,-144],[-415,-526],[-331,-115]],[[16539,92764],[-731,-294],[-147,259],[-641,312],[93,193],[218,489],[241,388],[-272,362],[939,93],[397,-123],[709,-33],[270,-171],[298,-249],[-349,-149],[-681,-415],[-344,-414],[0,-248]],[[91869,94941],[-321,-234],[-444,53],[-516,233],[66,192],[518,-89],[697,-155]],[[23996,94879],[-151,-229],[-403,44],[-337,155],[148,266],[399,159],[243,-208],[101,-187]],[[90301,95224],[-219,-439],[-1023,16],[-461,-139],[-550,384],[149,406],[366,111],[734,-26],[1004,-313]],[[22639,95907],[212,-273],[9,-303],[-127,-440],[-458,-60],[-298,94],[5,345],[-455,-46],[-18,457],[299,-18],[419,201],[390,-34],[22,77]],[[19941,95601],[109,-210],[247,99],[291,-26],[49,-289],[-169,-281],[-940,-91],[-701,-256],[-423,-14],[-35,193],[577,261],[-1255,-70],[-389,106],[379,577],[262,165],[782,-199],[493,-350],[485,-45],[-397,565],[255,215],[286,-68],[94,-282]],[[65981,92363],[-164,-52],[-907,77],[-74,262],[-503,158],[-40,320],[284,126],[-10,323],[551,503],[-255,73],[665,518],[-75,268],[621,312],[917,380],[925,110],[475,220],[541,76],[193,-233],[-187,-184],[-984,-293],[-848,-282],[-863,-562],[-414,-577],[-435,-568],[56,-491],[531,-484]],[[23699,96131],[308,-190],[547,1],[240,-194],[-64,-222],[319,-134],[177,-140],[374,-26],[406,-50],[441,128],[566,51],[451,-42],[298,-223],[62,-244],[-174,-157],[-414,-127],[-355,72],[-797,-91],[-570,-11],[-449,73],[-738,190],[-96,325],[-34,293],[-279,258],[-574,72],[-322,183],[104,242],[573,-37]],[[17722,96454],[-38,-454],[-214,-205],[-259,-29],[-517,-252],[-444,-91],[-377,128],[472,442],[570,383],[426,-9],[381,87]],[[63641,74970],[141,-419],[130,-28],[85,-159],[-228,-47],[-49,-459],[-47,-207],[-102,-138],[7,-293],[88,-436],[263,-123],[193,-296],[395,-102],[434,156],[27,139],[-52,417],[40,618],[-216,200],[71,405],[-184,34],[61,498],[262,-145],[244,189],[-202,355],[-80,338],[-224,-151],[-28,-433],[-87,383],[-15,144],[68,246],[-53,206],[-322,202],[-125,530],[-154,150],[-9,192],[270,-56],[11,432],[236,96],[243,-88],[50,576],[-50,365],[-278,-28],[-236,144],[-321,-260],[-259,-124],[-127,-350],[-269,-97],[-276,-610],[252,-561],[-27,-398],[303,-696],[146,-311]],[[0,88971],[99997,-3],[-357,-260],[-360,44],[250,-315],[166,-487],[128,-159],[32,-244],[-71,-157],[-518,129],[-777,-445],[-247,-69],[-425,-415],[-403,-362],[-102,-269],[-397,409],[-724,-464],[-126,220],[-268,-254],[-371,81],[-90,-388],[-333,-572],[10,-239],[316,-132],[-37,-860],[-258,-22],[-119,-494],[116,-255],[-486,-301],[-96,-675],[-415,-144],[-83,-600],[-400,-551],[-103,407],[-119,862],[-155,1313],[134,819],[234,353],[15,276],[431,132],[496,744],[479,608],[499,471],[223,833],[-337,-50],[-167,-487],[-705,-648],[-227,726],[-717,-201],[-696,-990],[230,-362],[-620,-154],[-430,-61],[20,427],[-431,90],[-344,-291],[-850,102],[-913,-175],[-900,-1153],[-1065,-1394],[438,-74],[136,-370],[270,-132],[178,296],[305,-39],[401,-650],[9,-502],[-217,-591],[-23,-705],[-126,-945],[-418,-855],[-94,-409],[-377,-688],[-374,-682],[-179,-349],[-370,-346],[-175,-8],[-175,287],[-373,-432],[-43,-197],[-106,36],[-120,-201],[-83,-201],[10,-424],[-143,-130],[-50,-105],[-104,-174],[-185,-97],[-121,-159],[-9,-256],[-32,-65],[111,-96],[157,-259],[240,-697],[68,-383],[3,-681],[-105,-325],[-252,-113],[-222,-245],[-250,-51],[-31,322],[52,443],[-123,615],[206,99],[-190,506],[-135,113],[-34,-112],[-81,-49],[-10,112],[-72,54],[-75,94],[77,260],[65,69],[-25,108],[71,319],[-18,97],[-163,64],[-131,158],[-388,-171],[-204,-277],[-300,-161],[148,274],[-58,230],[220,397],[-147,310],[-242,-209],[-314,-411],[-171,-381],[-272,-29],[-142,-275],[147,-400],[227,-97],[9,-265],[220,-172],[311,421],[247,-230],[179,-15],[46,-310],[-394,-165],[-130,-319],[-270,-296],[-142,-414],[299,-324],[109,-582],[169,-541],[189,-454],[-5,-439],[-174,-161],[66,-315],[164,-184],[-43,-481],[-71,-468],[-155,-53],[-203,-640],[-225,-775],[-258,-705],[-382,-545],[-386,-498],[-313,-68],[-170,-262],[-96,192],[-157,-294],[-388,-296],[-294,-90],[-95,-624],[-154,-35],[-73,429],[66,228],[-373,190],[-131,-97],[-371,-505],[-231,-558],[-61,-410],[212,-623],[260,-772],[252,-365],[169,-475],[127,-1093],[-37,-1039],[-232,-389],[-318,-381],[-227,-492],[-346,-550],[-101,378],[78,401],[-206,335],[-233,87],[-112,307],[-141,611],[-249,271],[-238,-11],[41,464],[-245,-3],[-22,-650],[-150,-863],[-90,-522],[19,-428],[181,-18],[113,-539],[50,-512],[155,-338],[168,-69],[144,-306],[64,-56],[164,-356],[116,-396],[16,-398],[-29,-269],[27,-203],[20,-349],[98,-163],[109,-523],[-5,-199],[-197,-40],[-263,438],[-329,469],[-32,301],[-161,395],[-38,489],[-100,322],[30,431],[-61,250],[-110,227],[-47,292],[-148,334],[-135,280],[-45,-347],[-53,328],[30,369],[82,566],[-27,439],[86,452],[-94,350],[23,644],[-113,306],[-90,707],[-50,746],[-121,490],[-183,-297],[-315,-421],[-156,53],[-172,138],[96,732],[-58,554],[-218,681],[34,213],[-163,76],[-197,481],[-79,309],[-16,301],[-53,284],[-116,344],[-256,23],[25,-243],[-87,-329],[-118,120],[-41,-108],[-78,65],[-108,53],[-39,-216],[-189,7],[-343,-122],[16,-445],[-148,-349],[-400,-398],[-311,-695],[-209,-373],[-276,-386],[-1,-272],[-138,-146],[-250,-212],[-130,-31],[-84,-450],[58,-769],[15,-490],[-118,-561],[-1,-1004],[-144,-29],[-126,-450],[84,-195],[-253,-167],[-93,-402],[-112,-170],[-263,552],[-128,827],[-107,596],[-97,279],[-148,568],[-69,739],[-48,369],[-253,811],[-115,1145],[-83,756],[1,716],[-54,553],[-404,-353],[-196,70],[-362,716],[133,214],[-82,232],[-326,501],[-203,150],[-83,425],[-215,449],[-512,-111],[-451,-11],[-391,-83],[-523,179],[-302,136],[-314,76],[-118,725],[-133,105],[-214,-106],[-280,-286],[-339,196],[-281,454],[-267,168],[-186,561],[-205,788],[-149,-96],[-177,196],[-103,-231],[-165,29],[58,-261],[-25,-135],[89,-445],[109,-510],[137,-135],[47,-207],[190,-248],[16,-244],[-27,-197],[35,-199],[80,-165],[37,-194],[41,-145],[-18,430],[75,310],[76,64],[84,-186],[5,-345],[-61,-348],[53,-226],[49,29],[11,-162],[217,93],[230,-15],[168,-18],[190,400],[207,379],[176,364],[80,201],[35,-51],[-26,-244],[-37,-108],[38,-466],[125,-404],[155,-214],[204,-78],[164,-107],[125,-339],[75,-196],[100,-75],[-1,-132],[-101,-352],[-44,-166],[-117,-189],[-104,-404],[-126,31],[-58,-141],[-44,-300],[34,-395],[-26,-72],[-128,2],[-174,-221],[-27,-288],[-63,-125],[-173,5],[-109,-149],[1,-239],[-134,-164],[-153,56],[-186,-199],[-128,-33],[-201,-159],[-54,-263],[-6,-201],[-277,-249],[-444,-276],[-249,-417],[-122,-32],[-83,34],[-163,-245],[-177,-113],[-233,-31],[-70,-34],[-61,-156],[-73,-43],[-42,-150],[-138,13],[-89,-80],[-192,30],[-72,345],[8,323],[-46,174],[-54,437],[-80,243],[56,29],[-29,270],[34,114],[-12,257],[-36,253],[-84,177],[-22,236],[-143,212],[-148,495],[-79,482],[-192,406],[-124,97],[-184,563],[-32,411],[12,350],[-159,655],[-130,231],[-150,122],[-92,339],[15,133],[-77,307],[-81,131],[-108,440],[-170,476],[-141,406],[-139,-3],[44,325],[12,206],[34,236],[-9,86],[-78,-238],[-60,-446],[-75,-308],[-65,-103],[-93,191],[-125,263],[-198,847],[-29,-53],[115,-624],[171,-594],[210,-920],[102,-321],[90,-334],[249,-654],[-55,-103],[9,-384],[323,-530],[49,-121],[90,-580],[-61,-107],[40,-608],[102,-706],[106,-145],[152,-219],[161,-683],[77,-543],[152,-288],[379,-558],[154,-336],[151,-341],[87,-203],[136,-178],[66,-183],[-9,-245],[-158,-142],[119,-161],[91,-109],[54,-244],[125,-248],[138,-2],[262,151],[302,70],[245,184],[138,39],[99,108],[158,20],[89,12],[128,88],[147,59],[132,202],[105,2],[6,-163],[-25,-344],[1,-310],[-59,-214],[-78,-639],[-134,-659],[-172,-755],[-238,-866],[-237,-661],[-327,-806],[-278,-479],[-415,-586],[-259,-450],[-304,-715],[-64,-312],[-63,-140],[-195,-236],[-68,-246],[-104,-44],[-40,-416],[-89,-238],[-54,-393],[-112,-195],[-128,-728],[16,-335],[178,-216],[8,-153],[-76,-357],[16,-180],[-18,-282],[97,-370],[115,-583],[101,-129],[45,-265],[-11,-588],[34,-519],[11,-923],[49,-290],[-83,-422],[-108,-410],[-177,-366],[-254,-225],[-313,-287],[-313,-634],[-107,-108],[-194,-420],[-115,-136],[-23,-421],[132,-448],[54,-346],[4,-177],[49,29],[-8,-579],[-45,-274],[65,-102],[-41,-246],[-116,-210],[-229,-199],[-334,-320],[-122,-219],[24,-248],[71,-40],[-24,-311],[-70,-430],[-32,-491],[-72,-267],[-190,-298],[-54,-86],[-118,-300],[-77,-303],[-158,-424],[-314,-609],[-196,-355],[-209,-269],[-291,-229],[-141,-31],[-36,-164],[-169,88],[-138,-113],[-301,114],[-168,-72],[-115,31],[-286,-233],[-238,-94],[-171,-223],[-127,-14],[-117,210],[-94,11],[-120,264],[-13,-82],[-37,159],[2,346],[-90,396],[89,108],[-7,453],[-182,553],[-139,501],[-1,1],[-199,768],[-207,446],[-108,432],[-62,575],[-68,428],[-93,910],[-7,707],[-35,322],[-108,243],[-144,489],[-146,708],[-60,371],[-226,577],[-17,453],[-26,372],[38,519],[96,541],[15,254],[90,532],[66,243],[159,386],[90,263],[29,438],[-15,335],[-83,211],[-74,358],[-68,355],[15,122],[85,235],[-84,570],[-57,396],[-139,374],[26,115],[-39,183],[-74,444],[-228,626],[-285,596],[-184,488],[-169,610],[9,196],[61,189],[67,430],[56,438],[-52,90],[96,663],[40,467],[-108,390],[-127,100],[-56,265],[-71,85],[3,163],[-289,-213],[-105,32],[-107,-133],[-222,13],[-149,370],[-91,427],[-197,390],[-209,-8],[-245,1],[-229,-69],[-224,-126],[-436,-346],[-154,-203],[-250,-171],[-248,168],[-126,-7],[-194,116],[-178,-7],[-329,-103],[-193,-170],[-275,-217],[-54,15],[-73,-5],[-286,282],[-252,450],[-237,323],[-187,381],[-75,44],[-200,238],[-144,316],[-49,216],[-34,437],[-122,349],[-108,232],[-71,76],[-69,118],[-32,261],[-41,130],[-80,97],[-149,247],[-117,39],[-63,166],[1,90],[-84,125],[-18,127],[-46,453],[36,262],[-115,460],[-138,210],[122,112],[134,415],[66,304],[-24,318],[78,291],[34,557],[-30,583],[-34,294],[28,295],[-72,281],[-146,255],[12,249],[13,274],[106,161],[91,308],[-18,200],[96,417],[155,376],[93,95],[74,344],[6,315],[100,365],[185,216],[177,603],[144,235],[259,66],[219,403],[139,158],[232,493],[-70,735],[106,508],[37,312],[179,399],[278,270],[206,244],[186,612],[87,362],[205,-2],[167,-251],[264,41],[288,-131],[121,-6],[267,323],[300,102],[175,244],[268,180],[471,105],[459,48],[140,-87],[262,232],[297,5],[113,-137],[190,35],[302,239],[195,-71],[-9,-299],[236,217],[20,-113],[-139,-289],[-2,-274],[96,-147],[-36,-511],[-183,-297],[53,-322],[143,-10],[70,-281],[106,-92],[326,-204],[117,51],[232,-98],[368,-264],[130,-526],[250,-114],[391,-248],[296,-293],[136,153],[133,272],[-65,452],[87,288],[200,277],[192,80],[375,-121],[95,-264],[104,-2],[88,-101],[276,-69],[68,-196],[369,10],[268,-156],[275,-175],[129,-92],[214,188],[114,169],[245,49],[198,-75],[75,-293],[65,193],[222,-140],[217,-33],[137,149],[80,194],[-19,34],[74,276],[56,446],[40,149],[8,6],[99,482],[138,416],[5,21],[-26,452],[68,243],[-102,268],[105,222],[-169,-51],[-233,136],[-191,-340],[-421,-66],[-225,317],[-300,20],[-64,-245],[-192,-71],[-268,315],[-303,-10],[-165,587],[-203,328],[135,459],[-176,283],[308,565],[428,23],[117,449],[529,-78],[334,383],[324,167],[459,13],[485,-416],[399,-229],[323,91],[239,-53],[328,309],[42,252],[-70,403],[-160,218],[-154,68],[-102,181],[-354,499],[-317,223],[-240,347],[202,95],[231,494],[-156,234],[410,241],[-8,129],[-249,-95],[-222,-48],[-185,-191],[-260,-31],[-239,-220],[16,-368],[136,-142],[284,35],[-55,-210],[-304,-103],[-377,-342],[-154,121],[61,277],[-304,173],[50,113],[265,197],[-80,135],[-432,149],[-19,221],[-257,-73],[-103,-325],[-215,-437],[6,-152],[-135,-128],[-84,56],[-78,-713],[-144,-245],[-101,-422],[89,-337],[33,-228],[243,-190],[-51,-145],[-330,-33],[-118,-182],[-232,-319],[-87,275],[3,122],[-169,17],[-145,56],[-336,-154],[192,-332],[-141,-96],[-154,0],[-147,304],[-52,-130],[62,-353],[139,-277],[-105,-130],[155,-272],[137,-171],[4,-334],[-257,157],[82,-302],[-176,-62],[105,-521],[-184,-7],[-228,257],[-104,472],[-49,393],[-108,272],[-143,337],[-18,168],[-48,41],[-5,130],[-154,199],[-24,281],[23,403],[38,184],[-46,93],[-59,46],[-78,192],[-120,118],[-261,218],[-161,213],[-254,176],[-233,435],[56,44],[-127,248],[-5,200],[-179,93],[-85,-255],[-82,198],[6,205],[10,9],[62,54],[-221,86],[-226,-210],[15,-293],[-34,-168],[91,-301],[261,-298],[140,-488],[309,-476],[217,3],[68,-130],[-78,-118],[249,-213],[204,-179],[238,-308],[29,-111],[-52,-211],[-154,276],[-242,97],[-116,-382],[200,-219],[-33,-309],[-116,-35],[-148,-506],[-116,-46],[1,181],[57,317],[60,126],[-108,342],[-85,298],[-115,74],[-82,255],[-179,107],[-120,238],[-206,38],[-217,267],[-254,384],[-189,341],[-86,584],[-138,68],[-226,195],[-128,-80],[-161,-274],[-115,-43],[-252,-334],[-548,160],[-404,-192],[-32,-355],[15,-344],[-263,-393],[-356,-125],[-25,-199],[-171,-327],[-107,-481],[108,-338],[-160,-263],[-60,-384],[-210,-118],[-197,-455],[-352,-8],[-265,11],[-174,-209],[-106,-223],[-136,49],[-103,199],[-79,340],[-259,92],[-112,-153],[-146,83],[-143,-65],[42,462],[-26,363],[-124,55],[-67,224],[22,386],[111,215],[20,239],[58,355],[-6,250],[-56,212],[-12,200],[14,420],[-114,257],[393,426],[340,-107],[373,4],[296,-101],[230,31],[449,-19],[144,354],[53,1177],[-287,620],[-205,299],[-424,228],[-28,430],[360,129],[466,-152],[-88,669],[263,-254],[646,461],[84,484],[243,119],[222,117],[143,162],[244,870],[380,247],[231,-17],[54,125],[232,32],[52,-130],[188,291],[-63,222],[-13,335],[-113,328],[-8,604],[46,159],[80,178],[244,36],[98,163],[223,167],[-9,-304],[-82,-192],[33,-166],[151,-89],[-68,-223],[-83,64],[-200,-425],[76,-288],[4,-228],[281,-138],[-3,-210],[283,111],[156,162],[313,-233],[132,-189],[189,174],[434,273],[350,200],[277,-100],[21,-144],[268,-7],[63,260],[383,191],[-59,497],[10,445],[136,371],[262,202],[221,-442],[223,12],[53,453],[32,349],[-102,-75],[-176,210],[-24,340],[351,164],[350,86],[301,-97],[287,17],[316,327],[-291,280],[-504,-47],[-489,-216],[-452,-125],[-161,322],[-269,195],[62,581],[-135,534],[133,344],[252,371],[635,640],[185,124],[-28,250],[-387,279],[-478,-167],[-269,-413],[43,-361],[-441,-475],[-537,-509],[-202,-832],[198,-416],[265,-328],[-255,-666],[-289,-138],[-106,-992],[-157,-554],[-337,57],[-158,-468],[-321,-27],[-89,558],[-232,671],[-211,835],[-187,363],[-548,-684],[-370,-138],[-385,301],[-99,635],[-88,1364],[256,380],[733,496],[549,609],[508,824],[668,1141],[465,444],[763,741],[610,259],[457,-31],[423,489],[506,-26],[499,118],[869,-433],[-358,-158],[305,-371],[286,206],[456,-358],[761,-140],[1050,-668],[213,-281],[18,-393],[-308,-311],[-454,-157],[-1240,449],[-204,-75],[453,-433],[36,-878],[358,-180],[217,-153],[36,286],[-174,263],[183,215],[672,-368],[234,144],[-187,433],[647,578],[256,-34],[260,-206],[161,406],[-231,352],[136,353],[-204,367],[777,-190],[158,-331],[-351,-73],[2,-328],[218,-203],[429,128],[68,377],[581,282],[969,507],[209,-29],[-273,-359],[344,-61],[199,202],[521,16],[412,245],[317,-356],[315,391],[-291,343],[145,195],[820,-179],[385,-185],[1006,-675],[186,309],[-282,313],[-8,125],[-335,58],[92,280],[-149,461],[-8,189],[512,535],[182,537],[207,116],[735,-156],[58,-328],[-263,-479],[173,-189],[89,-413],[-63,-809],[307,-362],[-120,-395],[-544,-839],[318,-87],[110,213],[306,151],[74,293],[240,281],[-162,336],[130,390],[-304,49],[-67,328],[222,594],[-361,481],[497,398],[-64,421],[139,13],[145,-328],[-109,-570],[297,-108],[-127,426],[465,233],[577,31],[513,-337],[-247,492],[-28,630],[484,119],[668,-26],[602,77],[-226,309],[321,388],[319,16],[540,293],[734,79],[93,162],[729,55],[227,-133],[624,314],[510,-10],[77,255],[265,252],[656,242],[476,-191],[-378,-146],[629,-90],[75,-292],[254,143],[812,-7],[626,-289],[223,-221],[-69,-307],[-307,-175],[-730,-328],[-209,-175],[345,-83],[410,-149],[250,112],[142,-379],[122,153],[444,93],[892,-97],[67,-276],[1162,-88],[15,451],[590,-103],[443,3],[449,-312],[128,-378],[-165,-247],[349,-465],[437,-240],[268,620],[446,-266],[473,159],[538,-182],[204,166],[455,-83],[-201,549],[367,256],[2509,-384],[236,-351],[727,-451],[1122,112],[553,-98],[231,-244],[-33,-432],[342,-168],[372,121],[492,15],[525,-116],[526,66],[484,-526],[344,189],[-224,378],[123,263],[886,-166],[578,36],[799,-282],[-99610,-258]],[[23933,96380],[-126,-17],[-521,38],[-74,165],[559,-9],[195,-109],[-33,-68]],[[19392,96485],[-518,-170],[-411,191],[224,188],[406,60],[392,-92],[-93,-177]],[[56867,96577],[-620,-241],[-490,137],[191,152],[-167,189],[575,119],[110,-222],[401,-134]],[[19538,97019],[-339,-115],[-461,1],[5,84],[285,177],[149,-27],[361,-120]],[[23380,96697],[-411,-122],[-226,138],[-119,221],[-22,245],[360,-24],[162,-39],[332,-205],[-76,-214]],[[22205,96856],[108,-247],[-453,66],[-457,192],[-619,21],[268,176],[-335,142],[-21,227],[546,-81],[751,-215],[212,-281]],[[79187,96845],[-1566,-228],[507,776],[229,66],[208,-38],[704,-336],[-82,-240]],[[55069,97669],[915,-440],[-699,-233],[-155,-435],[-243,-111],[-132,-490],[-335,-23],[-598,361],[252,210],[-416,170],[-541,499],[-216,463],[757,212],[152,-207],[396,8],[105,202],[408,20],[350,-206]],[[57068,98086],[545,-207],[-412,-318],[-806,-70],[-819,98],[-50,163],[-398,11],[-304,271],[858,165],[403,-142],[281,177],[702,-148]],[[64204,98169],[-373,-78],[-250,-45],[-39,-97],[-324,-98],[-301,140],[158,185],[-618,18],[542,107],[422,8],[57,-160],[159,142],[262,97],[412,-129],[-107,-90]],[[77760,97184],[-606,-73],[-773,170],[-462,226],[-213,423],[-379,117],[722,404],[600,133],[540,-297],[640,-572],[-69,-531]],[[25828,97644],[334,-190],[-381,-176],[-513,-445],[-492,-42],[-575,76],[-299,240],[4,215],[220,157],[-508,-4],[-306,196],[-176,268],[193,262],[192,180],[285,42],[-122,135],[646,30],[355,-315],[468,-127],[455,-112],[220,-390]],[[30972,99681],[742,-47],[597,-75],[508,-161],[-12,-157],[-678,-257],[-672,-119],[-251,-133],[605,3],[-656,-358],[-452,-167],[-476,-483],[-573,-98],[-177,-120],[-841,-64],[383,-74],[-192,-105],[230,-292],[-264,-202],[-429,-167],[-132,-232],[-388,-176],[39,-134],[475,23],[6,-144],[-742,-355],[-726,163],[-816,-91],[-414,71],[-525,31],[-35,284],[514,133],[-137,427],[170,41],[742,-255],[-379,379],[-450,113],[225,229],[492,141],[79,206],[-392,231],[-118,304],[759,-26],[220,-64],[433,216],[-625,68],[-972,-38],[-491,201],[-232,239],[-324,173],[-61,202],[413,112],[324,19],[545,96],[409,220],[344,-30],[300,-166],[211,319],[367,95],[498,65],[849,24],[148,-63],[802,100],[601,-38],[602,-37]],[[42472,99925],[1737,-469],[-513,-227],[-1062,-26],[-1496,-58],[140,-105],[984,65],[836,-204],[540,181],[231,-212],[-305,-344],[707,220],[1348,229],[833,-114],[156,-253],[-1132,-420],[-157,-136],[-888,-102],[643,-28],[-324,-431],[-224,-383],[9,-658],[333,-386],[-434,-24],[-457,-187],[513,-313],[65,-502],[-297,-55],[360,-508],[-617,-42],[322,-241],[-91,-208],[-391,-91],[-388,-2],[348,-400],[4,-263],[-549,244],[-143,-158],[375,-148],[364,-361],[105,-476],[-495,-114],[-214,228],[-344,340],[95,-401],[-322,-311],[732,-25],[383,-32],[-745,-515],[-755,-466],[-813,-204],[-306,-2],[-288,-228],[-386,-624],[-597,-414],[-192,-24],[-370,-145],[-399,-138],[-238,-365],[-4,-415],[-141,-388],[-453,-472],[112,-462],[-125,-488],[-142,-577],[-391,-36],[-410,482],[-556,3],[-269,324],[-186,577],[-481,735],[-141,385],[-38,530],[-384,546],[100,435],[-186,208],[275,691],[418,220],[110,247],[58,461],[-318,-209],[-151,-88],[-249,-84],[-341,193],[-19,401],[109,314],[258,9],[567,-157],[-478,375],[-249,202],[-276,-83],[-232,147],[310,550],[-169,220],[-220,409],[-335,626],[-353,230],[3,247],[-745,346],[-590,43],[-743,-24],[-677,-44],[-323,188],[-482,372],[729,186],[559,31],[-1188,154],[-627,241],[39,229],[1051,285],[1018,284],[107,214],[-750,213],[243,235],[961,413],[404,63],[-115,265],[658,156],[854,93],[853,5],[303,-184],[737,325],[663,-221],[390,-46],[577,-192],[-660,318],[38,253],[932,353],[975,-27],[354,218],[982,57],[2219,-74]]],"bbox":[-180,-85.60903777459777,180,83.64513000000002],"transform":{"scale":[0.0036000360003600037,0.0016925586033320111],"translate":[-180,-85.60903777459777]}} diff --git a/sites/kit.svelte.dev/src/routes/faq/+page.js b/sites/kit.svelte.dev/src/routes/faq/+page.js deleted file mode 100644 index aa05ba684c44..000000000000 --- a/sites/kit.svelte.dev/src/routes/faq/+page.js +++ /dev/null @@ -1,5 +0,0 @@ -import { redirect } from '@sveltejs/kit'; - -export const load = ({}) => { - throw redirect(301, '/docs/faq'); -}; diff --git a/sites/kit.svelte.dev/src/routes/home/Deployment.svelte b/sites/kit.svelte.dev/src/routes/home/Deployment.svelte deleted file mode 100644 index ff6dec0ce38c..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/Deployment.svelte +++ /dev/null @@ -1,297 +0,0 @@ - - -
-
-

deploy anywhere

-
-

- Export static HTML files. Run your own Node server. Deploy code to the edge of the world. If - a platform runs JavaScript, it runs SvelteKit — in some cases with zero configuration. -

-

Want to try deploying somewhere else? Swap out your adapter with a single line of code.

-
-
- - -
- - diff --git a/sites/kit.svelte.dev/src/routes/home/Features.svelte b/sites/kit.svelte.dev/src/routes/home/Features.svelte deleted file mode 100644 index 0854a8bb0b11..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/Features.svelte +++ /dev/null @@ -1,120 +0,0 @@ - - -
-
-
-

features? we got 'em.

-

- Mix and match prerendered pages for maximum performance with dynamic - server-side rendering for maximum flexibility. Turn your app into a - client-rendered - PWA with a single line of code, for the whole thing or just one page. Use - accessible client-side routing with automatic - preloading for slick, instantaneous navigation that doesn't reload your - entire page (and your analytics, and all that other junk). Protect your users with automatic - CSRF protection - and easy-to-use - Content Security Policy configuration. Keep your secrets to yourself with - advanced environment variable handling. Handle errors gracefully and - securely. Load data - directly from your database - and connect your back end to your front end with type-safe data loading and - built-in form actions - that work with or without JavaScript. Co-exist with other client-side - routing frameworks on the same page. Add service workers for offline - support. Generate AMP-compliant - pages if you really have to. Build complex UIs with unusually powerful - filesystem-based routes. Nested layouts? Duh. Learn - web standards - that work across environments. Integrate with Tailwind - and Playwright and Vitest and Storybook - and, well, whatever you want. Build libraries as well as apps. - Deploy anywhere with adapters. -

- -

- SvelteKit is the framework that - grows with you, whatever you end up building. -

-
-
-
- - diff --git a/sites/kit.svelte.dev/src/routes/home/Hero.svelte b/sites/kit.svelte.dev/src/routes/home/Hero.svelte deleted file mode 100644 index 212f655223d2..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/Hero.svelte +++ /dev/null @@ -1,188 +0,0 @@ - - -
-
-
- - -
web development, streamlined
- read the docs -
- -
- SvelteKit illustration -
-
-
- - diff --git a/sites/kit.svelte.dev/src/routes/home/Intro.svelte b/sites/kit.svelte.dev/src/routes/home/Intro.svelte deleted file mode 100644 index d3a93005596c..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/Intro.svelte +++ /dev/null @@ -1,37 +0,0 @@ - - - -
-

fast

-

- Powered by Svelte and - Vite, speed is baked into - every crevice: fast setup, fast dev, fast builds, fast page loads, fast navigation. Did we - mention it's fast? -

-
- -
-

fun

-

- No more wasted days figuring out bundler configuration, routing, SSR, CSP, TypeScript, - deployment settings and all the other boring stuff. Code with joy. -

-
- -
-

flexible

-

- SPA? MPA? SSR? SSG? Check. SvelteKit gives you the tools to succeed whatever it is you're - building. And it runs wherever JavaScript does. -

-
-
- - diff --git a/sites/kit.svelte.dev/src/routes/home/Showcase.svelte b/sites/kit.svelte.dev/src/routes/home/Showcase.svelte deleted file mode 100644 index f13b2cdd9f7e..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/Showcase.svelte +++ /dev/null @@ -1,107 +0,0 @@ - - -
-

showcase

- -
- {#each showcase as { url, image }} - - - {url} - - {/each} -
-
- - diff --git a/sites/kit.svelte.dev/src/routes/home/Svelte.svelte b/sites/kit.svelte.dev/src/routes/home/Svelte.svelte deleted file mode 100644 index e896bfbd22ee..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/Svelte.svelte +++ /dev/null @@ -1,114 +0,0 @@ - - -
-

- /ˈsvɛlt/ adjective - attractively thin, graceful and stylish -

- -
- - -
-

- SvelteKit is built on Svelte, a UI framework that uses a compiler to let you write - breathtakingly concise components that do minimal work in the browser, using languages you - already know — HTML, CSS and JavaScript. It's a love letter to web development. -

- -

- But don't take our word for it. Developers consistently rank Svelte as the framework they're - - most - - - excited - - - about - - - - using. -

-
-
-
- - diff --git a/sites/kit.svelte.dev/src/routes/home/Video.svelte b/sites/kit.svelte.dev/src/routes/home/Video.svelte deleted file mode 100644 index 6426d2636424..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/Video.svelte +++ /dev/null @@ -1,261 +0,0 @@ - - -
- - - {#if d} -
- {/if} - -
- - - -
- - -
- - diff --git a/sites/kit.svelte.dev/src/routes/home/cc-off.svg b/sites/kit.svelte.dev/src/routes/home/cc-off.svg deleted file mode 100644 index c5d60a43dfc6..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/cc-off.svg +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/cc-on.svg b/sites/kit.svelte.dev/src/routes/home/cc-on.svg deleted file mode 100644 index e429173f5e96..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/cc-on.svg +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/common.css b/sites/kit.svelte.dev/src/routes/home/common.css deleted file mode 100644 index a059dd3df689..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/common.css +++ /dev/null @@ -1,54 +0,0 @@ -.hero-container:dir(rtl) { - max-width: 116rem; -} - -.home { - --background-1: radial-gradient(circle at top right, rgb(230, 233, 236), rgb(244, 245, 247)); - --background-2: var(--sk-theme-2); -} - -.home h2 { - font-size: var(--sk-text-xl); - line-height: 1.2; -} - -.home .grid { - display: grid; - gap: 1em; - margin: 0 0 4rem 0; -} - -.home .grid:last-child { - margin-bottom: 0; -} - -@media (min-width: 900px) { - .home h2 { - font-size: var(--sk-text-xxl); - } - - .home .grid { - grid-template-columns: repeat(var(--columns), 1fr); - gap: 7rem; - } -} - -/* In case JS disabled */ -@media screen and (prefers-color-scheme: dark) { - .home { - /* --background-1: radial-gradient(circle at top right, rgb(49, 49, 49), rgb(77, 77, 77)); */ - --background-1: #222; - --background-2: #444; - } - - body.light .home { - --background-1: radial-gradient(circle at top right, rgb(230, 233, 236), rgb(244, 245, 247)); - --background-2: var(--sk-theme-2); - } -} - -body.dark .home { - /* --background-1: radial-gradient(circle at top right, rgb(49, 49, 49), rgb(77, 77, 77)); */ - --background-1: #222; - --background-2: #444; -} diff --git a/sites/kit.svelte.dev/src/routes/home/logos/appengine.svg b/sites/kit.svelte.dev/src/routes/home/logos/appengine.svg deleted file mode 100644 index 4c2e34391ecc..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/logos/appengine.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/logos/azure.svg b/sites/kit.svelte.dev/src/routes/home/logos/azure.svg deleted file mode 100644 index 996038592311..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/logos/azure.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/logos/cloudflare.svg b/sites/kit.svelte.dev/src/routes/home/logos/cloudflare.svg deleted file mode 100644 index 53b4e416101f..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/logos/cloudflare.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/logos/deno.svg b/sites/kit.svelte.dev/src/routes/home/logos/deno.svg deleted file mode 100644 index 34293615e36f..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/logos/deno.svg +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/logos/firebase.svg b/sites/kit.svelte.dev/src/routes/home/logos/firebase.svg deleted file mode 100644 index 6aec5adc92c1..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/logos/firebase.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/logos/html5.svg b/sites/kit.svelte.dev/src/routes/home/logos/html5.svg deleted file mode 100644 index 72a4b1ef25c5..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/logos/html5.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/logos/lambda.svg b/sites/kit.svelte.dev/src/routes/home/logos/lambda.svg deleted file mode 100644 index 958c9657e2d3..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/logos/lambda.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/logos/netlify.svg b/sites/kit.svelte.dev/src/routes/home/logos/netlify.svg deleted file mode 100644 index 8d4e9d77e17d..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/logos/netlify.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/logos/node.svg b/sites/kit.svelte.dev/src/routes/home/logos/node.svg deleted file mode 100644 index 41d044ac6b3f..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/logos/node.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/sites/kit.svelte.dev/src/routes/home/logos/vercel.svg b/sites/kit.svelte.dev/src/routes/home/logos/vercel.svg deleted file mode 100644 index 72948d01a7d0..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/logos/vercel.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/sites/kit.svelte.dev/src/routes/home/showcase/asmeditor.png b/sites/kit.svelte.dev/src/routes/home/showcase/asmeditor.png deleted file mode 100644 index c6059ee483ab..000000000000 Binary files a/sites/kit.svelte.dev/src/routes/home/showcase/asmeditor.png and /dev/null differ diff --git a/sites/kit.svelte.dev/src/routes/home/showcase/dropzone.png b/sites/kit.svelte.dev/src/routes/home/showcase/dropzone.png deleted file mode 100644 index d5f1a7c94f2a..000000000000 Binary files a/sites/kit.svelte.dev/src/routes/home/showcase/dropzone.png and /dev/null differ diff --git a/sites/kit.svelte.dev/src/routes/home/showcase/monogram.png b/sites/kit.svelte.dev/src/routes/home/showcase/monogram.png deleted file mode 100644 index 9e76cc9c40ba..000000000000 Binary files a/sites/kit.svelte.dev/src/routes/home/showcase/monogram.png and /dev/null differ diff --git a/sites/kit.svelte.dev/src/routes/home/showcase/pausly.png b/sites/kit.svelte.dev/src/routes/home/showcase/pausly.png deleted file mode 100644 index 950a5b29fde1..000000000000 Binary files a/sites/kit.svelte.dev/src/routes/home/showcase/pausly.png and /dev/null differ diff --git a/sites/kit.svelte.dev/src/routes/home/showcase/pocketbase.png b/sites/kit.svelte.dev/src/routes/home/showcase/pocketbase.png deleted file mode 100644 index b58ae9a7dbdc..000000000000 Binary files a/sites/kit.svelte.dev/src/routes/home/showcase/pocketbase.png and /dev/null differ diff --git a/sites/kit.svelte.dev/src/routes/home/showcase/pronauns.png b/sites/kit.svelte.dev/src/routes/home/showcase/pronauns.png deleted file mode 100644 index 167c0e17618f..000000000000 Binary files a/sites/kit.svelte.dev/src/routes/home/showcase/pronauns.png and /dev/null differ diff --git a/sites/kit.svelte.dev/src/routes/home/showcase/pudding.png b/sites/kit.svelte.dev/src/routes/home/showcase/pudding.png deleted file mode 100644 index c0347e0848ee..000000000000 Binary files a/sites/kit.svelte.dev/src/routes/home/showcase/pudding.png and /dev/null differ diff --git a/sites/kit.svelte.dev/src/routes/home/showcase/raster.png b/sites/kit.svelte.dev/src/routes/home/showcase/raster.png deleted file mode 100644 index 1d762e51b401..000000000000 Binary files a/sites/kit.svelte.dev/src/routes/home/showcase/raster.png and /dev/null differ diff --git a/sites/kit.svelte.dev/src/routes/home/showcase/tradingstrategy.png b/sites/kit.svelte.dev/src/routes/home/showcase/tradingstrategy.png deleted file mode 100644 index ef50bc7b2d2d..000000000000 Binary files a/sites/kit.svelte.dev/src/routes/home/showcase/tradingstrategy.png and /dev/null differ diff --git a/sites/kit.svelte.dev/src/routes/home/subtitles.vtt b/sites/kit.svelte.dev/src/routes/home/subtitles.vtt deleted file mode 100644 index f75d36ec99d7..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/subtitles.vtt +++ /dev/null @@ -1,98 +0,0 @@ -WEBVTT - -00:00:00.000 --> 00:00:01.920 - [Scott Tolinski] I wanted to share it immediately. - -00:00:01.920 --> 00:00:04.240 - I wanted to build more things in it. - -00:00:04.240 --> 00:00:05.640 - [James Q Quick] I love it. - -00:00:05.640 --> 00:00:07.080 - [Fireship] It's the only JavaScript framework - -00:00:07.080 --> 00:00:08.640 - that's actually enjoyable to use. - -00:00:08.640 --> 00:00:10.540 - [Ben McCann] Svelte introduced a new ergonomics - -00:00:10.540 --> 00:00:13.160 - to building a website that's made it more fun - -00:00:13.160 --> 00:00:15.440 - and easier than it's been in a long time. - -00:00:15.440 --> 00:00:18.720 - And the way that it's done that is by introducing - -00:00:18.720 --> 00:00:22.360 - this concept of generating reactive code at compile time. - -00:00:22.360 --> 00:00:25.560 - [Scott Tolinski] What Svelte allows us to do is to write code - -00:00:25.560 --> 00:00:29.400 - that's not only small and simple, but plain and readable. - -00:00:29.400 --> 00:00:32.760 - [Amelia Wattenberger] You're mostly just looking at basic HTML, - -00:00:32.760 --> 00:00:34.760 - JavaScript, and CSS. - -00:00:34.760 --> 00:00:37.120 - [Aliza Aufrichtig] The thing I like most about using Svelte - -00:00:37.120 --> 00:00:39.200 - is how fast you can move. - -00:00:39.200 --> 00:00:42.400 - [Moritz Stefaner] And when I discovered Svelte, it came back to this, - -00:00:42.400 --> 00:00:44.800 - oh, here's a really simple way to do things. - -00:00:44.800 --> 00:00:47.480 - [Shawn Wang] You don't actually need all this machinery - -00:00:47.480 --> 00:00:49.120 - in order to do components right. - -00:00:49.120 --> 00:00:51.640 - I looked at my React experience so far — - -00:00:51.640 --> 00:00:55.120 - I could not be anywhere as productive as I could be in Svelte. - -00:00:55.120 --> 00:00:57.520 - And that's when it started really taking it seriously. - -00:00:57.520 --> 00:00:59.800 - [Amelia Wattenberger] There's quite a bit of usage these days - -00:00:59.800 --> 00:01:02.680 - and satisfaction is still, I think, the highest - -00:01:02.680 --> 00:01:05.920 - or one of the highest for any of the larger - -00:01:05.920 --> 00:01:08.120 - or more used JavaScript frameworks. - -00:01:08.120 --> 00:01:10.040 - [Guillermo Rauch] When you write your application, - -00:01:10.040 --> 00:01:13.160 - you're making it fast by construction. - -00:01:13.160 --> 00:01:14.880 - It's almost impossible to create a slow app - -00:01:14.880 --> 00:01:17.200 - and I think Svelte has an incredible advantage here. - -00:01:17.200 --> 00:01:18.360 - People love Svelte. - diff --git a/sites/kit.svelte.dev/src/routes/home/svelte-kit-logotype.svg.svelte b/sites/kit.svelte.dev/src/routes/home/svelte-kit-logotype.svg.svelte deleted file mode 100644 index 759357aaa3bf..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/svelte-kit-logotype.svg.svelte +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/sites/kit.svelte.dev/src/routes/home/svelte-kit-machine.webp b/sites/kit.svelte.dev/src/routes/home/svelte-kit-machine.webp deleted file mode 100644 index e8467a50df30..000000000000 Binary files a/sites/kit.svelte.dev/src/routes/home/svelte-kit-machine.webp and /dev/null differ diff --git a/sites/kit.svelte.dev/src/routes/home/sveltekit-logo.svg b/sites/kit.svelte.dev/src/routes/home/sveltekit-logo.svg deleted file mode 100644 index 0f798fc18f27..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/sveltekit-logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/sites/kit.svelte.dev/src/routes/home/volume-high.svg b/sites/kit.svelte.dev/src/routes/home/volume-high.svg deleted file mode 100644 index f0e1db86c1bd..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/volume-high.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/sites/kit.svelte.dev/src/routes/home/volume-off.svg b/sites/kit.svelte.dev/src/routes/home/volume-off.svg deleted file mode 100644 index 424d9124451b..000000000000 --- a/sites/kit.svelte.dev/src/routes/home/volume-off.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/sites/kit.svelte.dev/src/routes/nav.json/+server.js b/sites/kit.svelte.dev/src/routes/nav.json/+server.js deleted file mode 100644 index f4752b31a056..000000000000 --- a/sites/kit.svelte.dev/src/routes/nav.json/+server.js +++ /dev/null @@ -1,33 +0,0 @@ -import { get_docs_data, get_docs_list } from '$lib/server/docs/index.js'; -import { json } from '@sveltejs/kit'; - -export const prerender = true; - -export const GET = async () => { - return json(await get_nav_list()); -}; - -/** - * @returns {Promise} - */ -async function get_nav_list() { - const docs_list = get_docs_list(await get_docs_data()); - const processed_docs_list = docs_list.map(({ title, pages }) => ({ - title, - sections: pages.map(({ title, path }) => ({ title, path })) - })); - - return [ - { - title: 'Docs', - prefix: 'docs', - pathname: '/docs/introduction', - sections: [ - { - title: 'DOCS', - sections: processed_docs_list - } - ] - } - ]; -} diff --git a/sites/kit.svelte.dev/src/routes/schema.json b/sites/kit.svelte.dev/src/routes/schema.json deleted file mode 100644 index 9bc791fcd9d9..000000000000 --- a/sites/kit.svelte.dev/src/routes/schema.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "@context": "http://schema.org", - "@type": "SoftwareSourceCode", - "name": "SvelteKit", - "description": "SvelteKit is the official Svelte application framework.", - "url": "https://kit.svelte.dev/", - "codeRepository": "https://github.com/sveltejs/kit", - "dateCreated": "2020-10-15T16:00:00", - "programmingLanguage": ["JavaScript", "TypeScript"], - "image": "https://raw.githubusercontent.com/sveltejs/branding/master/svelte-logo.svg", - "sameAs": ["https://github.com/sveltejs/kit", "https://www.npmjs.com/package/@sveltejs/kit"], - "license": "https://github.com/sveltejs/kit/blob/master/LICENSE", - "releasedEvent": { - "@type": "PublicationEvent", - "startDate": "2022-12-14T17:00:00", - "url": [ - "https://svelte.dev/blog/announcing-sveltekit-1.0", - "https://www.youtube.com/watch?v=N4BRVkQVoMc" - ] - }, - "contributor": [ - { - "@type": "Person", - "name": "Rich Harris", - "url": "https://www.rich-harris.co.uk", - "image": "https://avatars.githubusercontent.com/u/1162160", - "sameAs": ["https://github.com/Rich-Harris", "https://twitter.com/Rich_Harris"] - }, - { - "@type": "Person", - "name": "Ben McCann", - "url": "https://www.benmccann.com", - "image": "https://avatars.githubusercontent.com/u/322311", - "sameAs": [ - "https://github.com/benmccann", - "https://twitter.com/benjaminmccann", - "https://about.me/benmccann", - "https://angel.co/ben-mccann", - "https://www.crunchbase.com/person/benjamin-mccann", - "https://www.linkedin.com/in/benmccann" - ] - }, - { - "@type": "Person", - "name": "Simon Holthausen", - "image": "https://avatars.githubusercontent.com/u/5968653", - "sameAs": ["https://github.com/dummdidumm", "https://twitter.com/dummdidumm_"] - }, - { - "@type": "Person", - "name": "Ignatius Bagus", - "url": "https://mauss.dev/", - "image": "https://avatars.githubusercontent.com/u/8156777", - "sameAs": [ - "https://twitter.com/alchemauss", - "https://github.com/ignatiusmb", - "https://gitlab.com/ignatiusmb", - "https://www.linkedin.com/in/ignatiusmb" - ] - }, - { - "@type": "Person", - "name": "Conduitry", - "url": "https://conduitry.dev/", - "image": "https://avatars.githubusercontent.com/u/16696352", - "sameAs": ["https://github.com/Conduitry"] - }, - { - "@type": "Person", - "name": "Dominik Göpel", - "url": "https://goepel.it/", - "image": "https://avatars.githubusercontent.com/u/611613", - "sameAs": ["https://github.com/dominikg", "https://m.webtoo.ls/@dominikg"] - }, - { - "@type": "Person", - "name": "Bjorn Lu", - "url": "https://bjornlu.com/", - "image": "https://avatars.githubusercontent.com/u/34116392", - "sameAs": [ - "https://github.com/bluwy", - "https://twitter.com/bluwyoo", - "https://m.webtoo.ls/@bluwy", - "https://www.linkedin.com/in/bjorn-lu-3302a31b5", - "https://www.reddit.com/user/IamLUG" - ] - } - ] -} diff --git a/sites/kit.svelte.dev/src/routes/search/+page.js b/sites/kit.svelte.dev/src/routes/search/+page.js deleted file mode 100644 index d43d0cd2a55d..000000000000 --- a/sites/kit.svelte.dev/src/routes/search/+page.js +++ /dev/null @@ -1 +0,0 @@ -export const prerender = false; diff --git a/sites/kit.svelte.dev/src/routes/search/+page.server.js b/sites/kit.svelte.dev/src/routes/search/+page.server.js deleted file mode 100644 index 10451707bfed..000000000000 --- a/sites/kit.svelte.dev/src/routes/search/+page.server.js +++ /dev/null @@ -1,20 +0,0 @@ -import { init, inited, search } from '@sveltejs/site-kit/search'; - -export async function load({ url, fetch }) { - if (!inited) { - const res = await fetch('/content.json'); - if (!res.ok) throw new Error("Couldn't fetch content"); - - const blocks = (await res.json()).blocks; - init(blocks); - } - - const query = url.searchParams.get('q'); - - const results = query ? search(query) : []; - - return { - query, - results - }; -} diff --git a/sites/kit.svelte.dev/src/routes/search/+page.svelte b/sites/kit.svelte.dev/src/routes/search/+page.svelte deleted file mode 100644 index 2102ef99d59c..000000000000 --- a/sites/kit.svelte.dev/src/routes/search/+page.svelte +++ /dev/null @@ -1,48 +0,0 @@ - - - - Search • SvelteKit - - -
-

Search

- - - - - -
- - diff --git a/sites/kit.svelte.dev/static/favicon.png b/sites/kit.svelte.dev/static/favicon.png deleted file mode 100644 index 21bc302b6882..000000000000 Binary files a/sites/kit.svelte.dev/static/favicon.png and /dev/null differ diff --git a/sites/kit.svelte.dev/static/images/svelte-android-chrome-192.png b/sites/kit.svelte.dev/static/images/svelte-android-chrome-192.png deleted file mode 100644 index e3ccf280875b..000000000000 Binary files a/sites/kit.svelte.dev/static/images/svelte-android-chrome-192.png and /dev/null differ diff --git a/sites/kit.svelte.dev/static/images/svelte-android-chrome-512.png b/sites/kit.svelte.dev/static/images/svelte-android-chrome-512.png deleted file mode 100644 index e673c91c7bcb..000000000000 Binary files a/sites/kit.svelte.dev/static/images/svelte-android-chrome-512.png and /dev/null differ diff --git a/sites/kit.svelte.dev/static/images/svelte-kit-horizontal.svg b/sites/kit.svelte.dev/static/images/svelte-kit-horizontal.svg deleted file mode 100644 index 9fe9b630d4fc..000000000000 --- a/sites/kit.svelte.dev/static/images/svelte-kit-horizontal.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/sites/kit.svelte.dev/static/images/twitter-thumbnail.jpg b/sites/kit.svelte.dev/static/images/twitter-thumbnail.jpg deleted file mode 100644 index 0ef1eded0df6..000000000000 Binary files a/sites/kit.svelte.dev/static/images/twitter-thumbnail.jpg and /dev/null differ diff --git a/sites/kit.svelte.dev/static/manifest.json b/sites/kit.svelte.dev/static/manifest.json deleted file mode 100644 index c46de73e8dd6..000000000000 --- a/sites/kit.svelte.dev/static/manifest.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "background_color": "#ffffff", - "theme_color": "#ff3e00", - "name": "SvelteKit", - "short_name": "SvelteKit", - "display": "minimal-ui", - "start_url": "/", - "icons": [ - { - "src": "images/svelte-android-chrome-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "images/svelte-android-chrome-512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} diff --git a/sites/kit.svelte.dev/static/robots.txt b/sites/kit.svelte.dev/static/robots.txt deleted file mode 100644 index e9e57dc4d41b..000000000000 --- a/sites/kit.svelte.dev/static/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/sites/kit.svelte.dev/svelte.config.js b/sites/kit.svelte.dev/svelte.config.js deleted file mode 100644 index 46575d85e0fd..000000000000 --- a/sites/kit.svelte.dev/svelte.config.js +++ /dev/null @@ -1,16 +0,0 @@ -import adapter from '@sveltejs/adapter-vercel'; - -/** @type {import('@sveltejs/kit').Config} */ -const config = { - kit: { - adapter: adapter({ - runtime: 'edge' - }), - - paths: { - relative: true - } - } -}; - -export default config; diff --git a/sites/kit.svelte.dev/tsconfig.json b/sites/kit.svelte.dev/tsconfig.json deleted file mode 100644 index db9370bd28e1..000000000000 --- a/sites/kit.svelte.dev/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "./.svelte-kit/tsconfig.json", - "compilerOptions": { - "allowJs": true, - "checkJs": true, - "allowSyntheticDefaultImports": true, - "moduleResolution": "bundler", - "outDir": "build" - } -} diff --git a/sites/kit.svelte.dev/vercel.json b/sites/kit.svelte.dev/vercel.json deleted file mode 100644 index c3c586fb80d1..000000000000 --- a/sites/kit.svelte.dev/vercel.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "http://openapi.vercel.sh/vercel.json", - "github": { - "silent": true - }, - "trailingSlash": false, - "installCommand": "pnpm install --frozen-lockfile --verbose && pnpm rebuild", - "buildCommand": "cd ../../packages/kit && pnpm prepublishOnly && cd ../../sites/kit.svelte.dev && pnpm build" -} diff --git a/sites/kit.svelte.dev/vite.config.js b/sites/kit.svelte.dev/vite.config.js deleted file mode 100644 index 53404d28e2ac..000000000000 --- a/sites/kit.svelte.dev/vite.config.js +++ /dev/null @@ -1,59 +0,0 @@ -import { sveltekit } from '@sveltejs/kit/vite'; -import browserslist from 'browserslist'; -import { browserslistToTargets } from 'lightningcss'; -import * as path from 'path'; -import { imagetools } from 'vite-imagetools'; - -const fallback = { - '.heic': 'jpg', - '.heif': 'jpg', - '.avif': 'png', - '.jpeg': 'jpg', - '.jpg': 'jpg', - '.png': 'png', - '.tiff': 'jpg', - '.webp': 'png', - '.gif': 'gif' -}; - -/** @type {import('vite').UserConfig} */ -const config = { - assetsInclude: ['**/*.vtt'], - - logLevel: 'info', - - css: { - transformer: 'lightningcss', - lightningcss: { - targets: browserslistToTargets(browserslist(['>0.2%', 'not dead'])) - } - }, - build: { - cssMinify: 'lightningcss' - }, - - plugins: [ - imagetools({ - defaultDirectives: (url) => { - const ext = path.extname(url.pathname); - return new URLSearchParams(`format=avif;webp;${fallback[ext]}&as=picture`); - } - }), - sveltekit() - ], - - ssr: { - noExternal: ['@sveltejs/site-kit'] - }, - optimizeDeps: { - exclude: ['@sveltejs/site-kit'] - }, - - server: { - fs: { - strict: false - } - } -}; - -export default config; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000000..8f262e2da415 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "checkJs": true, + "noEmit": true + }, + "include": ["eslint.config.js"] +}