Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: v0.0.58
_commit: v0.0.59
_src_path: gh:LabAutomationAndScreening/copier-base-template.git
description: A web app that is hosted within a local intranet. Nuxt frontend, python
backend, docker-compose
Expand Down
12 changes: 7 additions & 5 deletions extensions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ def hook(self, context: dict[Any, Any]) -> dict[Any, Any]:
context["uvicorn_version"] = "0.35.0"
context["lab_auto_pulumi_version"] = "0.1.15"

context["nuxt_ui_version"] = "^3.1.2"
context["nuxt_version"] = "^3.17.3"
context["nuxt_ui_version"] = "^3.3.0"
context["nuxt_version"] = "^3.17.7"
context["typescript_version"] = "^5.8.2"
context["vue_version"] = "^3.5.13"
context["vue_router_version"] = "^4.5.0"
context["faker_version"] = "^9.8.0"
context["dot_env_cli_version"] = "^9.0.0"
context["playwright_version"] = "^1.52.0"
context["vue_version"] = "^3.5.18"
context["vue_router_version"] = "^4.5.1"
context["faker_version"] = "^9.9.0"
context["graphql_codegen_cli_version"] = "^5.0.5"
context["graphql_codegen_typescript_version"] = "^4.1.6"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@ export default defineAppConfig({
error: "red",
neutral: "slate",
},
inputMenu: {
slots: {
content: "min-w-fit",
},
},
},
});
3 changes: 3 additions & 0 deletions template/frontend/nuxt.config.ts.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ export default defineNuxtConfig({
css: ["~/assets/css/main.css"],
experimental: { appManifest: false }, // https://github.com/nuxt/nuxt/issues/30461#issuecomment-2572616714{% endraw %}{% if has_backend and not deploy_as_executable %}{% raw %}
nitro: {
prerender: {
concurrency: 4, // lower the concurrency to not be such a memory hog
},
devProxy: {
// this is just a proxy used for `pnpm run dev`
"/api": {
Expand Down
13 changes: 6 additions & 7 deletions template/frontend/package.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,25 @@
"@graphql-tools/mock": "^9.0.22",
"@graphql-tools/schema": "^10.0.23",{% endraw %}{% endif %}{% raw %}
"@nuxt/eslint": "^1.2.0",
"@nuxt/schema": "^3.0.0",
"@nuxt/schema": "{% endraw %}{{ nuxt_version }}{% raw %}",
"@nuxt/test-utils": "^3.17.2",{% endraw %}{% if frontend_uses_graphql %}{% raw %}
"@nuxtjs/apollo": "5.0.0-alpha.14",{% endraw %}{% endif %}{% raw %}
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@playwright/test": "^1.52.0",
"@playwright/test": "{% endraw %}{{ playwright_version }}{% raw %}",
"@vitest/coverage-istanbul": "^3.1.3",{% endraw %}{% if frontend_uses_graphql %}{% raw %}
"@vue/apollo-composable": "^4.2.2",{% endraw %}{% endif %}{% raw %}
"@vue/devtools-api": "^7.7.2",
"@vue/test-utils": "^2.4.6",
"autoprefixer": "^10.4.21",
"dotenv-cli": "^8.0.0",
"dotenv-cli": "{% endraw %}{{ dot_env_cli_version }}{% raw %}",
"eslint": "^9.22.0",
"eslint-plugin-vitest": "^0.5.4",
"flush-promises": "^1.0.2",{% endraw %}{% if frontend_uses_graphql %}{% raw %}
"eslint-plugin-vitest": "^0.5.4",{% endraw %}{% if frontend_uses_graphql %}{% raw %}
Copy link

Copilot AI Jul 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the 'flush-promises' dependency appears to be unrelated to the folder restructuring. This change should be documented in the PR description or handled in a separate commit to maintain clear change tracking.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that was on purpose. we can just import it from vue-test-utils

"graphql": "^16.10.0",
"graphql-tag": "^2.12.6",{% endraw %}{% endif %}{% raw %}
"happy-dom": "^17.4.4",{% endraw %}{% if frontend_uses_graphql %}{% raw %}
"mock-apollo-client": "^1.3.1",{% endraw %}{% endif %}{% raw %}
"playwright": "^1.52.0",
"playwright-core": "^1.52.0",
"playwright": "{% endraw %}{{ playwright_version }}{% raw %}",
"playwright-core": "{% endraw %}{{ playwright_version }}{% raw %}",
"postcss": "^8.5.3",
"tailwindcss": "^4.0.14",
"typescript": "{% endraw %}{{ typescript_version }}{% raw %}",
Expand Down
4 changes: 2 additions & 2 deletions template/frontend/tests/e2e/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, test } from "vitest";
import { url } from "~/tests/e2e/helpers/playwright";
import { getPage } from "~/tests/setup/app";
import { url } from "~~/tests/e2e/helpers/playwright";
import { getPage } from "~~/tests/setup/app";

describe("Index page", async () => {
test("Page displays Hello World", async () => {
Expand Down
2 changes: 1 addition & 1 deletion template/frontend/tests/setup/globalSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from "path";
import type { Browser } from "playwright";
import { chromium } from "playwright";
import type { TestProject } from "vitest/node";
import { APP_NAME, DEPLOYED_BACKEND_PORT_NUMBER, DEPLOYED_FRONTEND_PORT_NUMBER } from "~/tests/setup/constants";
import { APP_NAME, DEPLOYED_BACKEND_PORT_NUMBER, DEPLOYED_FRONTEND_PORT_NUMBER } from "~~/tests/setup/constants";

const isE2E = process.env.USE_DOCKER_COMPOSE_FOR_VITEST_E2E || process.env.USE_BUILT_BACKEND_FOR_VITEST_E2E;
const isDockerE2E = process.env.USE_DOCKER_COMPOSE_FOR_VITEST_E2E;
Expand Down
1 change: 1 addition & 0 deletions template/frontend/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineVitestConfig({
shuffle: true,
},
include: ["tests/**/*.spec.ts"],
root: ".",
coverage: {
provider: "istanbul",
reporter: ["text", "json", "html"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import type { CodegenConfig } from "@graphql-codegen/cli";

const config: CodegenConfig = {
schema: process.env.GRAPHQL_ENDPOINT || "http://127.0.0.1:4000/api/graphql",
documents: "./graphql/queries/**/*.gql",
documents: "./app/graphql/queries/**/*.gql",
generates: {
"./graphql/generated/graphql.ts": {
"./app/graphql/generated/graphql.ts": {
plugins: ["typescript", "typescript-operations", "typescript-vue-apollo"], // cannot use `preset: "client"` because it causes duplications with typescript-vue-apollo
config: {
documentMode: "graphQLTag",
Expand Down