diff --git a/.env b/.env
new file mode 100644
index 0000000000..5bc09addfc
--- /dev/null
+++ b/.env
@@ -0,0 +1,7 @@
+AUTH_TYPE=none
+GATEWAY_CLIENT_URL=http://localhost:9000
+GATEWAY_SERVER_URL=http://localhost:9000
+HASURA_CLIENT_URL=http://localhost:8080/v1/graphql
+HASURA_SERVER_URL=http://localhost:8080/v1/graphql
+HASURA_WEB_SOCKET_URL=ws://localhost:8080/v1/graphql
+ORIGIN=http://localhost:3000
diff --git a/docs/TESTING.md b/docs/TESTING.md
index 2e2ef92395..9712bdab10 100644
--- a/docs/TESTING.md
+++ b/docs/TESTING.md
@@ -49,7 +49,7 @@ npm run test:e2e:debug
The codegen test script runs the [Playwright test generator](https://playwright.dev/docs/codegen), which automatically generates [locators](https://playwright.dev/docs/locators) as you click elements on the page. It can greatly save test development time. The generator requires an instance of the application already running to select against.
```sh
-npm run test:e2e:dev # Starts aerie-ui
+npm run preview # Starts production build of aerie-ui
npm run test:e2e:codegen # Starts codegen
```
diff --git a/package.json b/package.json
index 3d33c8b0c1..45779001c6 100644
--- a/package.json
+++ b/package.json
@@ -25,12 +25,11 @@
"optimize": "vite optimize",
"prebuild": "npm run version",
"predev": "node ./scripts/check-node.cjs",
- "preview": "vite preview",
+ "preview": "vite preview --port 3000",
"test": "vitest",
"test:e2e": "playwright test",
"test:e2e:codegen": "playwright codegen http://localhost:3000",
"test:e2e:debug": "PWDEBUG=1 playwright test",
- "test:e2e:dev": "AUTH_TYPE=none ORIGIN=http://localhost:3000 node build",
"test:unit": "vitest run",
"version": "node ./scripts/version.js"
},
diff --git a/playwright.config.ts b/playwright.config.ts
index ab8f5f29f9..17465d991a 100644
--- a/playwright.config.ts
+++ b/playwright.config.ts
@@ -21,11 +21,7 @@ const config: PlaywrightTestConfig = {
video: process.env.CI ? 'retain-on-failure' : 'off',
},
webServer: {
- command: 'node build',
- env: {
- AUTH_TYPE: 'none',
- ORIGIN: 'http://localhost:3000',
- },
+ command: 'npm run preview',
port: 3000,
},
};
diff --git a/src/app.d.ts b/src/app.d.ts
index 05d9547edc..f139416461 100644
--- a/src/app.d.ts
+++ b/src/app.d.ts
@@ -1,4 +1,4 @@
-/* eslint @typescript-eslint/no-unused-vars: 0, @typescript-eslint/no-empty-interface: 0 */
+/* eslint @typescript-eslint/no-unused-vars: 0 */
///
@@ -7,13 +7,19 @@ declare namespace App {
user: User | null;
}
- interface Platform {}
+ interface PublicEnv {
+ AUTH_TYPE: string;
+ GATEWAY_CLIENT_URL: string;
+ GATEWAY_SERVER_URL: string;
+ HASURA_CLIENT_URL: string;
+ HASURA_SERVER_URL: string;
+ HASURA_WEB_SOCKET_URL: string;
+ ORIGIN: string;
+ }
interface Session {
user: User | null;
}
-
- interface Stuff {}
}
/**
diff --git a/src/components/menus/AppMenu.svelte b/src/components/menus/AppMenu.svelte
index 372f6bc3d0..c69887f19a 100644
--- a/src/components/menus/AppMenu.svelte
+++ b/src/components/menus/AppMenu.svelte
@@ -4,7 +4,7 @@
import { goto, prefetch } from '$app/navigation';
import { base } from '$app/paths';
import { session } from '$app/stores';
- import { env } from '../../stores/app';
+ import { env } from '$env/dynamic/public';
import { showAboutModal } from '../../utilities/modal';
import Menu from './Menu.svelte';
import MenuItem from './MenuItem.svelte';
@@ -54,11 +54,11 @@
Scheduling
-