diff --git a/smoke-test-apps/nextjs-12/__previewjs__/Wrapper.tsx b/smoke-test-apps/nextjs-12/__previewjs__/Wrapper.tsx
new file mode 100644
index 00000000000..933d8c730a8
--- /dev/null
+++ b/smoke-test-apps/nextjs-12/__previewjs__/Wrapper.tsx
@@ -0,0 +1 @@
+import "@previewjs/config-helper-nextjs";
diff --git a/smoke-test-apps/nextjs-12/package.json b/smoke-test-apps/nextjs-12/package.json
index f7885fb6965..64d6eaa0c83 100644
--- a/smoke-test-apps/nextjs-12/package.json
+++ b/smoke-test-apps/nextjs-12/package.json
@@ -13,6 +13,7 @@
},
"devDependencies": {
"@babel/core": "^7",
+ "@previewjs/config-helper-nextjs": "workspace:*",
"@types/react": "^17",
"typescript": "^4"
}
diff --git a/smoke-test-apps/nextjs-12/pages/index.tsx b/smoke-test-apps/nextjs-12/pages/index.tsx
index aa2b234bd47..76061a48c3e 100644
--- a/smoke-test-apps/nextjs-12/pages/index.tsx
+++ b/smoke-test-apps/nextjs-12/pages/index.tsx
@@ -2,9 +2,14 @@ import type { NextPage } from "next";
import Head from "next/head";
import Image from "next/image";
import Link from "next/link";
+import { useRouter } from "next/router";
import styles from "../styles/Home.module.css";
const App: NextPage = () => {
+ const router = useRouter();
+
+ console.log("Current path is", router.pathname);
+
return (
diff --git a/smoke-test-apps/nuxt2-app/package.json b/smoke-test-apps/nuxt2-app/package.json
index a3d5587bb42..bef0055b641 100644
--- a/smoke-test-apps/nuxt2-app/package.json
+++ b/smoke-test-apps/nuxt2-app/package.json
@@ -4,7 +4,6 @@
"private": true,
"scripts": {
"dev": "nuxt",
- "build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
},
diff --git a/smoke-test-apps/sveltekit-app/.svelte-kit/ambient.d.ts b/smoke-test-apps/sveltekit-app/.svelte-kit/ambient.d.ts
deleted file mode 100644
index de72a6698fc..00000000000
--- a/smoke-test-apps/sveltekit-app/.svelte-kit/ambient.d.ts
+++ /dev/null
@@ -1,250 +0,0 @@
-
-// this file is generated — do not edit it
-
-
-///
-
-/**
- * Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), this module cannot be imported into public-facing code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env).
- *
- * _Unlike_ [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination.
- *
- * ```ts
- * import { API_KEY } from '$env/static/private';
- * ```
- *
- * Note that all environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
- *
- * ```
- * MY_FEATURE_FLAG=""
- * ```
- *
- * You can override `.env` values from the command line like so:
- *
- * ```bash
- * MY_FEATURE_FLAG="enabled" npm run dev
- * ```
- */
-declare module '$env/static/private' {
- export const NVM_INC: string;
- export const LC_FIG_SET_PARENT: string;
- export const FIG_PID: string;
- export const MANPATH: string;
- export const TERM_PROGRAM: string;
- export const NODE: string;
- export const NVM_CD_FLAGS: string;
- export const INIT_CWD: string;
- export const npm_package_devDependencies_typescript: string;
- export const TERM: string;
- export const SHELL: string;
- export const npm_package_devDependencies_vite: string;
- export const FIGTERM_SESSION_ID: string;
- export const TMPDIR: string;
- export const HOMEBREW_REPOSITORY: string;
- export const TERM_PROGRAM_VERSION: string;
- export const npm_package_scripts_dev: string;
- export const npm_config_public_hoist_pattern: string;
- export const TERM_SESSION_ID: string;
- export const npm_package_private: string;
- export const npm_package_devDependencies__sveltejs_kit: string;
- export const npm_package_devDependencies_svelte_preprocess: string;
- export const npm_config_registry: string;
- export const ZSH: string;
- export const PNPM_HOME: string;
- export const USER: string;
- export const NVM_DIR: string;
- export const HOMEBREW_SHELLENV_PREFIX: string;
- export const npm_package_scripts_check_watch: string;
- export const COMMAND_MODE: string;
- export const FIG_TERM_TMUX: string;
- export const PNPM_SCRIPT_SRC_DIR: string;
- export const npm_config_recursive_install: string;
- export const npm_config_strict_peer_dependencies: string;
- export const SSH_AUTH_SOCK: string;
- export const __CF_USER_TEXT_ENCODING: string;
- export const npm_package_devDependencies_tslib: string;
- export const npm_execpath: string;
- export const PAGER: string;
- export const npm_package_devDependencies_svelte: string;
- export const TMUX: string;
- export const LSCOLORS: string;
- export const PATH: string;
- export const npm_package_scripts_postinstall: string;
- export const npm_config_engine_strict: string;
- export const __CFBundleIdentifier: string;
- export const npm_config_auto_install_peers: string;
- export const TTY: string;
- export const PWD: string;
- export const npm_package_scripts_preview: string;
- export const npm_lifecycle_event: string;
- export const LANG: string;
- export const npm_package_name: string;
- export const ITERM_PROFILE: string;
- export const NODE_PATH: string;
- export const npm_package_scripts_build: string;
- export const XPC_FLAGS: string;
- export const TMUX_PANE: string;
- export const npm_config_node_gyp: string;
- export const XPC_SERVICE_NAME: string;
- export const npm_package_version: string;
- export const npm_package_devDependencies__sveltejs_adapter_auto: string;
- export const npm_package_devDependencies_svelte_check: string;
- export const SHLVL: string;
- export const HOME: string;
- export const FIG_PARENT: string;
- export const COLORFGBG: string;
- export const npm_package_type: string;
- export const LC_TERMINAL_VERSION: string;
- export const HOMEBREW_PREFIX: string;
- export const ITERM_SESSION_ID: string;
- export const FIG_SET_PARENT: string;
- export const LOGNAME: string;
- export const LESS: string;
- export const npm_lifecycle_script: string;
- export const NVM_BIN: string;
- export const BUN_INSTALL: string;
- export const npm_config_user_agent: string;
- export const INFOPATH: string;
- export const HOMEBREW_CELLAR: string;
- export const LC_TERMINAL: string;
- export const FIG_INTEGRATION_VERSION: string;
- export const FIG_TERM_VERSION: string;
- export const npm_package_scripts_check: string;
- export const FIG_TERM: string;
- export const COLORTERM: string;
- export const npm_node_execpath: string;
-}
-
-/**
- * Similar to [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code.
- *
- * Values are replaced statically at build time.
- *
- * ```ts
- * import { PUBLIC_BASE_URL } from '$env/static/public';
- * ```
- */
-declare module '$env/static/public' {
-
-}
-
-/**
- * This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/master/packages/adapter-node) (or running [`vite preview`](https://kit.svelte.dev/docs/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env).
- *
- * This module cannot be imported into public-facing code.
- *
- * ```ts
- * import { env } from '$env/dynamic/private';
- * console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE);
- * ```
- *
- * > In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
- */
-declare module '$env/dynamic/private' {
- export const env: {
- NVM_INC: string;
- LC_FIG_SET_PARENT: string;
- FIG_PID: string;
- MANPATH: string;
- TERM_PROGRAM: string;
- NODE: string;
- NVM_CD_FLAGS: string;
- INIT_CWD: string;
- npm_package_devDependencies_typescript: string;
- TERM: string;
- SHELL: string;
- npm_package_devDependencies_vite: string;
- FIGTERM_SESSION_ID: string;
- TMPDIR: string;
- HOMEBREW_REPOSITORY: string;
- TERM_PROGRAM_VERSION: string;
- npm_package_scripts_dev: string;
- npm_config_public_hoist_pattern: string;
- TERM_SESSION_ID: string;
- npm_package_private: string;
- npm_package_devDependencies__sveltejs_kit: string;
- npm_package_devDependencies_svelte_preprocess: string;
- npm_config_registry: string;
- ZSH: string;
- PNPM_HOME: string;
- USER: string;
- NVM_DIR: string;
- HOMEBREW_SHELLENV_PREFIX: string;
- npm_package_scripts_check_watch: string;
- COMMAND_MODE: string;
- FIG_TERM_TMUX: string;
- PNPM_SCRIPT_SRC_DIR: string;
- npm_config_recursive_install: string;
- npm_config_strict_peer_dependencies: string;
- SSH_AUTH_SOCK: string;
- __CF_USER_TEXT_ENCODING: string;
- npm_package_devDependencies_tslib: string;
- npm_execpath: string;
- PAGER: string;
- npm_package_devDependencies_svelte: string;
- TMUX: string;
- LSCOLORS: string;
- PATH: string;
- npm_package_scripts_postinstall: string;
- npm_config_engine_strict: string;
- __CFBundleIdentifier: string;
- npm_config_auto_install_peers: string;
- TTY: string;
- PWD: string;
- npm_package_scripts_preview: string;
- npm_lifecycle_event: string;
- LANG: string;
- npm_package_name: string;
- ITERM_PROFILE: string;
- NODE_PATH: string;
- npm_package_scripts_build: string;
- XPC_FLAGS: string;
- TMUX_PANE: string;
- npm_config_node_gyp: string;
- XPC_SERVICE_NAME: string;
- npm_package_version: string;
- npm_package_devDependencies__sveltejs_adapter_auto: string;
- npm_package_devDependencies_svelte_check: string;
- SHLVL: string;
- HOME: string;
- FIG_PARENT: string;
- COLORFGBG: string;
- npm_package_type: string;
- LC_TERMINAL_VERSION: string;
- HOMEBREW_PREFIX: string;
- ITERM_SESSION_ID: string;
- FIG_SET_PARENT: string;
- LOGNAME: string;
- LESS: string;
- npm_lifecycle_script: string;
- NVM_BIN: string;
- BUN_INSTALL: string;
- npm_config_user_agent: string;
- INFOPATH: string;
- HOMEBREW_CELLAR: string;
- LC_TERMINAL: string;
- FIG_INTEGRATION_VERSION: string;
- FIG_TERM_VERSION: string;
- npm_package_scripts_check: string;
- FIG_TERM: string;
- COLORTERM: string;
- npm_node_execpath: string;
- [key: string]: string | undefined;
- }
-}
-
-/**
- * Similar to [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code.
- *
- * Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests — when possible, use `$env/static/public` instead.
- *
- * ```ts
- * import { env } from '$env/dynamic/public';
- * console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE);
- * ```
- */
-declare module '$env/dynamic/public' {
- export const env: {
- [key: string]: string | undefined;
- }
-}
diff --git a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/client-manifest.js b/smoke-test-apps/sveltekit-app/.svelte-kit/generated/client-manifest.js
deleted file mode 100644
index 7caf2a7a973..00000000000
--- a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/client-manifest.js
+++ /dev/null
@@ -1,15 +0,0 @@
-export { matchers } from './client-matchers.js';
-
- export const nodes = [() => import('./nodes/0'),
- () => import('./nodes/1'),
- () => import('./nodes/2')];
-
- export const server_loads = [];
-
- export const dictionary = {
- "": [2]
-};
-
- export const hooks = {
- handleError: (({ error }) => { console.error(error) }),
- };
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/client-matchers.js b/smoke-test-apps/sveltekit-app/.svelte-kit/generated/client-matchers.js
deleted file mode 100644
index f6bd30a4eb6..00000000000
--- a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/client-matchers.js
+++ /dev/null
@@ -1 +0,0 @@
-export const matchers = {};
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/nodes/0.js b/smoke-test-apps/sveltekit-app/.svelte-kit/generated/nodes/0.js
deleted file mode 100644
index 70d18fa43b6..00000000000
--- a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/nodes/0.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default as component } from "../../../../../node_modules/.pnpm/@sveltejs+kit@1.0.0-next.520_svelte@3.52.0+vite@3.1.8/node_modules/@sveltejs/kit/src/runtime/components/layout.svelte";
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/nodes/1.js b/smoke-test-apps/sveltekit-app/.svelte-kit/generated/nodes/1.js
deleted file mode 100644
index 44dbfc481b0..00000000000
--- a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/nodes/1.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default as component } from "../../../../../node_modules/.pnpm/@sveltejs+kit@1.0.0-next.520_svelte@3.52.0+vite@3.1.8/node_modules/@sveltejs/kit/src/runtime/components/error.svelte";
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/nodes/2.js b/smoke-test-apps/sveltekit-app/.svelte-kit/generated/nodes/2.js
deleted file mode 100644
index efaa62f11dc..00000000000
--- a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/nodes/2.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default as component } from "../../../src/routes/+page.svelte";
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/root.svelte b/smoke-test-apps/sveltekit-app/.svelte-kit/generated/root.svelte
deleted file mode 100644
index 789457f2689..00000000000
--- a/smoke-test-apps/sveltekit-app/.svelte-kit/generated/root.svelte
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-{#if components[1]}
-
-
-
-{:else}
-
-{/if}
-
-{#if mounted}
-
- {#if navigated}
- {title}
- {/if}
-
-{/if}
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-app/.svelte-kit/types/route_meta_data.json b/smoke-test-apps/sveltekit-app/.svelte-kit/types/route_meta_data.json
deleted file mode 100644
index 9c0a27d673f..00000000000
--- a/smoke-test-apps/sveltekit-app/.svelte-kit/types/route_meta_data.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "": []
-}
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-app/.svelte-kit/types/src/routes/$types.d.ts b/smoke-test-apps/sveltekit-app/.svelte-kit/types/src/routes/$types.d.ts
deleted file mode 100644
index 2f70213cbaa..00000000000
--- a/smoke-test-apps/sveltekit-app/.svelte-kit/types/src/routes/$types.d.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand
= T extends infer O ? { [K in keyof O]: O[K] } : never;
-type RouteParams = { }
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type PageParentData = EnsureDefined;
-type LayoutParams = RouteParams & { }
-type LayoutParentData = EnsureDefined<{}>;
-
-export type PageServerData = null;
-export type PageData = Expand;
-export type LayoutServerData = null;
-export type LayoutData = Expand;
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-app/package.json b/smoke-test-apps/sveltekit-app/package.json
index 63406a50e7d..d8e42674bcd 100644
--- a/smoke-test-apps/sveltekit-app/package.json
+++ b/smoke-test-apps/sveltekit-app/package.json
@@ -4,8 +4,6 @@
"private": true,
"scripts": {
"dev": "vite dev",
- "build": "vite build",
- "preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/ambient.d.ts b/smoke-test-apps/sveltekit-demo/.svelte-kit/ambient.d.ts
deleted file mode 100644
index f3c3a18f1d6..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/ambient.d.ts
+++ /dev/null
@@ -1,252 +0,0 @@
-
-// this file is generated — do not edit it
-
-
-///
-
-/**
- * Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), this module cannot be imported into public-facing code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env).
- *
- * _Unlike_ [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination.
- *
- * ```ts
- * import { API_KEY } from '$env/static/private';
- * ```
- *
- * Note that all environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed:
- *
- * ```
- * MY_FEATURE_FLAG=""
- * ```
- *
- * You can override `.env` values from the command line like so:
- *
- * ```bash
- * MY_FEATURE_FLAG="enabled" npm run dev
- * ```
- */
-declare module '$env/static/private' {
- export const NVM_INC: string;
- export const LC_FIG_SET_PARENT: string;
- export const FIG_PID: string;
- export const npm_package_devDependencies__fontsource_fira_mono: string;
- export const MANPATH: string;
- export const TERM_PROGRAM: string;
- export const NODE: string;
- export const NVM_CD_FLAGS: string;
- export const npm_package_devDependencies_typescript: string;
- export const INIT_CWD: string;
- export const TERM: string;
- export const SHELL: string;
- export const npm_package_devDependencies_vite: string;
- export const FIGTERM_SESSION_ID: string;
- export const npm_package_devDependencies__types_cookie: string;
- export const TMPDIR: string;
- export const HOMEBREW_REPOSITORY: string;
- export const TERM_PROGRAM_VERSION: string;
- export const npm_package_scripts_dev: string;
- export const npm_config_public_hoist_pattern: string;
- export const TERM_SESSION_ID: string;
- export const npm_package_devDependencies__sveltejs_kit: string;
- export const npm_package_devDependencies_svelte_preprocess: string;
- export const npm_config_registry: string;
- export const ZSH: string;
- export const PNPM_HOME: string;
- export const USER: string;
- export const NVM_DIR: string;
- export const HOMEBREW_SHELLENV_PREFIX: string;
- export const npm_package_scripts_check_watch: string;
- export const COMMAND_MODE: string;
- export const FIG_TERM_TMUX: string;
- export const PNPM_SCRIPT_SRC_DIR: string;
- export const npm_config_recursive_install: string;
- export const npm_config_strict_peer_dependencies: string;
- export const SSH_AUTH_SOCK: string;
- export const __CF_USER_TEXT_ENCODING: string;
- export const npm_package_devDependencies_tslib: string;
- export const npm_execpath: string;
- export const PAGER: string;
- export const npm_package_devDependencies_svelte: string;
- export const TMUX: string;
- export const LSCOLORS: string;
- export const PATH: string;
- export const npm_package_devDependencies__neoconfetti_svelte: string;
- export const npm_config_engine_strict: string;
- export const __CFBundleIdentifier: string;
- export const npm_config_auto_install_peers: string;
- export const TTY: string;
- export const PWD: string;
- export const npm_package_scripts_preview: string;
- export const npm_lifecycle_event: string;
- export const LANG: string;
- export const npm_package_name: string;
- export const ITERM_PROFILE: string;
- export const NODE_PATH: string;
- export const npm_package_scripts_build: string;
- export const XPC_FLAGS: string;
- export const TMUX_PANE: string;
- export const npm_config_node_gyp: string;
- export const XPC_SERVICE_NAME: string;
- export const npm_package_version: string;
- export const npm_package_devDependencies__sveltejs_adapter_auto: string;
- export const npm_package_devDependencies_svelte_check: string;
- export const SHLVL: string;
- export const HOME: string;
- export const FIG_PARENT: string;
- export const COLORFGBG: string;
- export const npm_package_type: string;
- export const LC_TERMINAL_VERSION: string;
- export const HOMEBREW_PREFIX: string;
- export const ITERM_SESSION_ID: string;
- export const FIG_SET_PARENT: string;
- export const LOGNAME: string;
- export const LESS: string;
- export const npm_lifecycle_script: string;
- export const NVM_BIN: string;
- export const BUN_INSTALL: string;
- export const npm_config_user_agent: string;
- export const INFOPATH: string;
- export const HOMEBREW_CELLAR: string;
- export const LC_TERMINAL: string;
- export const FIG_INTEGRATION_VERSION: string;
- export const FIG_TERM_VERSION: string;
- export const npm_package_scripts_check: string;
- export const FIG_TERM: string;
- export const COLORTERM: string;
- export const npm_node_execpath: string;
-}
-
-/**
- * Similar to [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code.
- *
- * Values are replaced statically at build time.
- *
- * ```ts
- * import { PUBLIC_BASE_URL } from '$env/static/public';
- * ```
- */
-declare module '$env/static/public' {
-
-}
-
-/**
- * This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/master/packages/adapter-node) (or running [`vite preview`](https://kit.svelte.dev/docs/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env).
- *
- * This module cannot be imported into public-facing code.
- *
- * ```ts
- * import { env } from '$env/dynamic/private';
- * console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE);
- * ```
- *
- * > In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter.
- */
-declare module '$env/dynamic/private' {
- export const env: {
- NVM_INC: string;
- LC_FIG_SET_PARENT: string;
- FIG_PID: string;
- npm_package_devDependencies__fontsource_fira_mono: string;
- MANPATH: string;
- TERM_PROGRAM: string;
- NODE: string;
- NVM_CD_FLAGS: string;
- npm_package_devDependencies_typescript: string;
- INIT_CWD: string;
- TERM: string;
- SHELL: string;
- npm_package_devDependencies_vite: string;
- FIGTERM_SESSION_ID: string;
- npm_package_devDependencies__types_cookie: string;
- TMPDIR: string;
- HOMEBREW_REPOSITORY: string;
- TERM_PROGRAM_VERSION: string;
- npm_package_scripts_dev: string;
- npm_config_public_hoist_pattern: string;
- TERM_SESSION_ID: string;
- npm_package_devDependencies__sveltejs_kit: string;
- npm_package_devDependencies_svelte_preprocess: string;
- npm_config_registry: string;
- ZSH: string;
- PNPM_HOME: string;
- USER: string;
- NVM_DIR: string;
- HOMEBREW_SHELLENV_PREFIX: string;
- npm_package_scripts_check_watch: string;
- COMMAND_MODE: string;
- FIG_TERM_TMUX: string;
- PNPM_SCRIPT_SRC_DIR: string;
- npm_config_recursive_install: string;
- npm_config_strict_peer_dependencies: string;
- SSH_AUTH_SOCK: string;
- __CF_USER_TEXT_ENCODING: string;
- npm_package_devDependencies_tslib: string;
- npm_execpath: string;
- PAGER: string;
- npm_package_devDependencies_svelte: string;
- TMUX: string;
- LSCOLORS: string;
- PATH: string;
- npm_package_devDependencies__neoconfetti_svelte: string;
- npm_config_engine_strict: string;
- __CFBundleIdentifier: string;
- npm_config_auto_install_peers: string;
- TTY: string;
- PWD: string;
- npm_package_scripts_preview: string;
- npm_lifecycle_event: string;
- LANG: string;
- npm_package_name: string;
- ITERM_PROFILE: string;
- NODE_PATH: string;
- npm_package_scripts_build: string;
- XPC_FLAGS: string;
- TMUX_PANE: string;
- npm_config_node_gyp: string;
- XPC_SERVICE_NAME: string;
- npm_package_version: string;
- npm_package_devDependencies__sveltejs_adapter_auto: string;
- npm_package_devDependencies_svelte_check: string;
- SHLVL: string;
- HOME: string;
- FIG_PARENT: string;
- COLORFGBG: string;
- npm_package_type: string;
- LC_TERMINAL_VERSION: string;
- HOMEBREW_PREFIX: string;
- ITERM_SESSION_ID: string;
- FIG_SET_PARENT: string;
- LOGNAME: string;
- LESS: string;
- npm_lifecycle_script: string;
- NVM_BIN: string;
- BUN_INSTALL: string;
- npm_config_user_agent: string;
- INFOPATH: string;
- HOMEBREW_CELLAR: string;
- LC_TERMINAL: string;
- FIG_INTEGRATION_VERSION: string;
- FIG_TERM_VERSION: string;
- npm_package_scripts_check: string;
- FIG_TERM: string;
- COLORTERM: string;
- npm_node_execpath: string;
- [key: string]: string | undefined;
- }
-}
-
-/**
- * Similar to [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code.
- *
- * Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests — when possible, use `$env/static/public` instead.
- *
- * ```ts
- * import { env } from '$env/dynamic/public';
- * console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE);
- * ```
- */
-declare module '$env/dynamic/public' {
- export const env: {
- [key: string]: string | undefined;
- }
-}
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/client-manifest.js b/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/client-manifest.js
deleted file mode 100644
index 7a16c81c44b..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/client-manifest.js
+++ /dev/null
@@ -1,21 +0,0 @@
-export { matchers } from './client-matchers.js';
-
- export const nodes = [() => import('./nodes/0'),
- () => import('./nodes/1'),
- () => import('./nodes/2'),
- () => import('./nodes/3'),
- () => import('./nodes/4'),
- () => import('./nodes/5')];
-
- export const server_loads = [];
-
- export const dictionary = {
- "/": [2],
- "/about": [3],
- "/sverdle": [~4],
- "/sverdle/how-to-play": [5]
-};
-
- export const hooks = {
- handleError: (({ error }) => { console.error(error) }),
- };
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/client-matchers.js b/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/client-matchers.js
deleted file mode 100644
index f6bd30a4eb6..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/client-matchers.js
+++ /dev/null
@@ -1 +0,0 @@
-export const matchers = {};
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/0.js b/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/0.js
deleted file mode 100644
index 851a03de9ee..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/0.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default as component } from "../../../src/routes/+layout.svelte";
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/1.js b/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/1.js
deleted file mode 100644
index 3ce14f5434b..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/1.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default as component } from "../../../../../node_modules/.pnpm/@sveltejs+kit@1.0.0-next.522_svelte@3.52.0+vite@3.1.8/node_modules/@sveltejs/kit/src/runtime/components/error.svelte";
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/2.js b/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/2.js
deleted file mode 100644
index 0381d97983c..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/2.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import * as shared from "../../../src/routes/+page.ts";
-export { shared };
-export { default as component } from "../../../src/routes/+page.svelte";
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/3.js b/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/3.js
deleted file mode 100644
index 643df33adb7..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/3.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import * as shared from "../../../src/routes/about/+page.ts";
-export { shared };
-export { default as component } from "../../../src/routes/about/+page.svelte";
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/4.js b/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/4.js
deleted file mode 100644
index fe2561474ed..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/4.js
+++ /dev/null
@@ -1,2 +0,0 @@
-export { default as component } from "../../../src/routes/sverdle/+page.svelte";
-export const server = true;
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/5.js b/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/5.js
deleted file mode 100644
index d5595004695..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/nodes/5.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import * as shared from "../../../src/routes/sverdle/how-to-play/+page.ts";
-export { shared };
-export { default as component } from "../../../src/routes/sverdle/how-to-play/+page.svelte";
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/root.svelte b/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/root.svelte
deleted file mode 100644
index 789457f2689..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/generated/root.svelte
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-{#if components[1]}
-
-
-
-{:else}
-
-{/if}
-
-{#if mounted}
-
- {#if navigated}
- {title}
- {/if}
-
-{/if}
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/route_meta_data.json b/smoke-test-apps/sveltekit-demo/.svelte-kit/types/route_meta_data.json
deleted file mode 100644
index fad3f798a4e..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/route_meta_data.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "/": [
- "src/routes/+page.ts"
- ],
- "/about": [
- "src/routes/about/+page.ts"
- ],
- "/sverdle": [
- "src/routes/sverdle/+page.server.ts"
- ],
- "/sverdle/how-to-play": [
- "src/routes/sverdle/how-to-play/+page.ts"
- ]
-}
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/$types.d.ts b/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/$types.d.ts
deleted file mode 100644
index 74ead0d2a72..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/$types.d.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-type RouteParams = { }
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type PageParentData = EnsureDefined;
-type LayoutParams = RouteParams & { }
-type LayoutParentData = EnsureDefined<{}>;
-
-export type PageServerData = null;
-export type PageLoad = OutputDataShape> = Kit.Load;
-export type PageLoadEvent = Parameters[0];
-export type PageData = Expand> & EnsureDefined>>;
-export type LayoutServerData = null;
-export type LayoutData = Expand;
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/about/$types.d.ts b/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/about/$types.d.ts
deleted file mode 100644
index 6921e140741..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/about/$types.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-type RouteParams = { }
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type PageParentData = EnsureDefined;
-
-export type PageServerData = null;
-export type PageLoad = OutputDataShape> = Kit.Load;
-export type PageLoadEvent = Parameters[0];
-export type PageData = Expand> & EnsureDefined>>;
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/sverdle/$types.d.ts b/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/sverdle/$types.d.ts
deleted file mode 100644
index 006650db5a5..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/sverdle/$types.d.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-type RouteParams = { }
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type PageServerParentData = EnsureDefined;
-type PageParentData = EnsureDefined;
-
-export type PageServerLoad = OutputDataShape> = Kit.ServerLoad;
-export type PageServerLoadEvent = Parameters[0];
-export type ActionData = Expand> | undefined;
-export type PageServerData = Expand>>>;
-export type PageData = Expand & EnsureDefined>;
-export type Action = Kit.Action
-export type Actions = Kit.Actions
-export type RequestEvent = Kit.RequestEvent;
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/sverdle/how-to-play/$types.d.ts b/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/sverdle/how-to-play/$types.d.ts
deleted file mode 100644
index f4d678a9c62..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/sverdle/how-to-play/$types.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import type * as Kit from '@sveltejs/kit';
-
-type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never;
-type RouteParams = { }
-type MaybeWithVoid = {} extends T ? T | void : T;
-export type RequiredKeys = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
-type OutputDataShape = MaybeWithVoid> & Partial> & Record>
-type EnsureDefined = T extends null | undefined ? {} : T;
-type PageParentData = EnsureDefined;
-
-export type PageServerData = null;
-export type PageLoad = OutputDataShape> = Kit.Load;
-export type PageLoadEvent = Parameters[0];
-export type PageData = Expand> & EnsureDefined>>;
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/sverdle/proxy+page.server.ts b/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/sverdle/proxy+page.server.ts
deleted file mode 100644
index 83d5cc37612..00000000000
--- a/smoke-test-apps/sveltekit-demo/.svelte-kit/types/src/routes/sverdle/proxy+page.server.ts
+++ /dev/null
@@ -1,145 +0,0 @@
-// @ts-nocheck
-import { invalid } from '@sveltejs/kit';
-import { words, allowed } from './words.server';
-import type { PageServerLoad, Actions } from './$types';
-
-export const load = ({ cookies }: Parameters[0]) => {
- 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
- };
-};
-
-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 }: import('./$types').RequestEvent) => {
- 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 }: import('./$types').RequestEvent) => {
- const game = new Game(cookies.get('sverdle'));
-
- const data = await request.formData();
- const guess = data.getAll('guess') as string[];
-
- if (!game.enter(guess)) {
- return invalid(400, { badGuess: true });
- }
-
- cookies.set('sverdle', game.toString());
- },
-
- restart: async ({ cookies }: import('./$types').RequestEvent) => {
- cookies.delete('sverdle');
- }
-};
-
-class Game {
- index: number;
- guesses: string[];
- answers: string[];
- answer: string;
-
- /**
- * Create a game object from the player's cookie, or initialise a new game
- */
- constructor(serialized: string | 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 = [] ;
- }
-
- 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
- */
- 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(' ')}`;
- }
-}
-;null as any as Actions;
\ No newline at end of file
diff --git a/smoke-test-apps/sveltekit-demo/package.json b/smoke-test-apps/sveltekit-demo/package.json
index f1d22456746..50993c99b12 100644
--- a/smoke-test-apps/sveltekit-demo/package.json
+++ b/smoke-test-apps/sveltekit-demo/package.json
@@ -1,25 +1,23 @@
{
- "name": "sveltekit-demo",
- "version": "0.0.1",
- "scripts": {
- "dev": "vite dev",
- "build": "vite build",
- "preview": "vite preview",
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
- },
- "devDependencies": {
- "@fontsource/fira-mono": "^4.5.0",
- "@neoconfetti/svelte": "^1.0.0",
- "@sveltejs/adapter-auto": "next",
- "@sveltejs/kit": "next",
- "@types/cookie": "^0.5.1",
- "svelte": "^3.46.0",
- "svelte-check": "^2.7.1",
- "svelte-preprocess": "^4.10.6",
- "tslib": "^2.3.1",
- "typescript": "^4.7.4",
- "vite": "^3.1.0"
- },
- "type": "module"
+ "name": "sveltekit-demo",
+ "version": "0.0.1",
+ "scripts": {
+ "dev": "vite dev",
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
+ },
+ "devDependencies": {
+ "@fontsource/fira-mono": "^4.5.0",
+ "@neoconfetti/svelte": "^1.0.0",
+ "@sveltejs/adapter-auto": "next",
+ "@sveltejs/kit": "next",
+ "@types/cookie": "^0.5.1",
+ "svelte": "^3.46.0",
+ "svelte-check": "^2.7.1",
+ "svelte-preprocess": "^4.10.6",
+ "tslib": "^2.3.1",
+ "typescript": "^4.7.4",
+ "vite": "^3.1.0"
+ },
+ "type": "module"
}
diff --git a/smoke-test-apps/vue2-app/package.json b/smoke-test-apps/vue2-app/package.json
index 2820b86f1a9..430a30341e2 100644
--- a/smoke-test-apps/vue2-app/package.json
+++ b/smoke-test-apps/vue2-app/package.json
@@ -1,9 +1,5 @@
{
"name": "vue2-app",
- "scripts": {
- "serve": "vue-cli-service serve",
- "build": "vue-cli-service build"
- },
"dependencies": {
"core-js": "^3",
"vue": "^2"
diff --git a/smoke-test-apps/vue3-app/package.json b/smoke-test-apps/vue3-app/package.json
index e5d04e690a0..6ca41cc6991 100644
--- a/smoke-test-apps/vue3-app/package.json
+++ b/smoke-test-apps/vue3-app/package.json
@@ -1,9 +1,5 @@
{
"name": "vue3-app",
- "scripts": {
- "serve": "vue-cli-service serve",
- "build": "vue-cli-service build"
- },
"dependencies": {
"core-js": "^3",
"vue": "^3"
diff --git a/test-apps/vue2/package.json b/test-apps/vue2/package.json
index b72fbeea2fd..4c7ac6eb939 100644
--- a/test-apps/vue2/package.json
+++ b/test-apps/vue2/package.json
@@ -1,9 +1,5 @@
{
"private": true,
- "scripts": {
- "serve": "vue-cli-service serve",
- "build": "vue-cli-service build"
- },
"dependencies": {
"vue": "^2.6.11"
},