diff --git a/.github/workflows/partial-frontend.yml b/.github/workflows/partial-frontend.yml index bdb8999a..ec16a53c 100644 --- a/.github/workflows/partial-frontend.yml +++ b/.github/workflows/partial-frontend.yml @@ -38,6 +38,10 @@ jobs: run: yarn lint working-directory: "frontend" + - name: Run tests 🧪 + run: yarn test:ci + working-directory: "frontend" + build: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index 231db452..164c8186 100644 --- a/.gitignore +++ b/.gitignore @@ -55,7 +55,6 @@ develop-eggs/ downloads/ eggs/ .eggs/ -lib/ lib64/ parts/ !frontend/src/components/Recipe/Parts/ diff --git a/dev/code-generation/gen_ts_types.py b/dev/code-generation/gen_ts_types.py index d1c319e8..96391dce 100644 --- a/dev/code-generation/gen_ts_types.py +++ b/dev/code-generation/gen_ts_types.py @@ -75,7 +75,7 @@ def generate_typescript_types() -> None: return str_path schema_path = PROJECT_DIR / "mealie" / "schema" - types_dir = PROJECT_DIR / "frontend" / "types" / "api-types" + types_dir = PROJECT_DIR / "frontend" / "lib" / "api" / "types" ignore_dirs = ["__pycache__", "static", "_mealie"] diff --git a/frontend/.husky/.gitignore b/frontend/.husky/.gitignore deleted file mode 100644 index 31354ec1..00000000 --- a/frontend/.husky/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/frontend/components/Domain/Group/GroupExportData.vue b/frontend/components/Domain/Group/GroupExportData.vue index b47d5935..64cf4efe 100644 --- a/frontend/components/Domain/Group/GroupExportData.vue +++ b/frontend/components/Domain/Group/GroupExportData.vue @@ -20,7 +20,7 @@ \ No newline at end of file + diff --git a/frontend/components/Domain/Recipe/RecipeNotes.vue b/frontend/components/Domain/Recipe/RecipeNotes.vue index db29f38d..f5edcaaf 100644 --- a/frontend/components/Domain/Recipe/RecipeNotes.vue +++ b/frontend/components/Domain/Recipe/RecipeNotes.vue @@ -31,7 +31,7 @@ \ No newline at end of file + diff --git a/frontend/components/global/RecipeJsonEditor.vue b/frontend/components/global/RecipeJsonEditor.vue index a3399dc1..99067f8e 100644 --- a/frontend/components/global/RecipeJsonEditor.vue +++ b/frontend/components/global/RecipeJsonEditor.vue @@ -27,4 +27,3 @@ export default defineComponent({ }, }); - diff --git a/frontend/components/global/ReportTable.vue b/frontend/components/global/ReportTable.vue index 22b305c8..cab54139 100644 --- a/frontend/components/global/ReportTable.vue +++ b/frontend/components/global/ReportTable.vue @@ -26,7 +26,7 @@ - + diff --git a/frontend/pages/admin/site-settings.vue b/frontend/pages/admin/site-settings.vue index cc2b0c57..0d61adf5 100644 --- a/frontend/pages/admin/site-settings.vue +++ b/frontend/pages/admin/site-settings.vue @@ -179,7 +179,7 @@ import { import { useAdminApi, useUserApi } from "~/composables/api"; import { validators } from "~/composables/use-validators"; import { useAsyncKey } from "~/composables/use-utils"; -import { CheckAppConfig } from "~/types/api-types/admin"; +import { CheckAppConfig } from "~/lib/api/types/admin"; enum DockerVolumeState { Unknown = "unknown", @@ -259,7 +259,7 @@ export default defineComponent({ const { data } = await adminApi.about.checkApp(); if (data) { - appConfig.value = { ...data, isSiteSecure: false}; + appConfig.value = { ...data, isSiteSecure: false }; } appConfig.value.isSiteSecure = isLocalHostOrHttps(); diff --git a/frontend/pages/group/data/foods.vue b/frontend/pages/group/data/foods.vue index 5dd8e510..f9d07800 100644 --- a/frontend/pages/group/data/foods.vue +++ b/frontend/pages/group/data/foods.vue @@ -159,7 +159,7 @@ import { computed } from "vue-demi"; import type { LocaleObject } from "@nuxtjs/i18n"; import { validators } from "~/composables/use-validators"; import { useUserApi } from "~/composables/api"; -import { CreateIngredientFood, IngredientFood } from "~/types/api-types/recipe"; +import { CreateIngredientFood, IngredientFood } from "~/lib/api/types/recipe"; import MultiPurposeLabel from "~/components/Domain/ShoppingList/MultiPurposeLabel.vue"; import { useLocales } from "~/composables/use-locales"; import { useFoodStore, useLabelStore } from "~/composables/store"; diff --git a/frontend/pages/group/data/labels.vue b/frontend/pages/group/data/labels.vue index e0990682..61423a09 100644 --- a/frontend/pages/group/data/labels.vue +++ b/frontend/pages/group/data/labels.vue @@ -116,7 +116,7 @@ import type { LocaleObject } from "@nuxtjs/i18n"; import { validators } from "~/composables/use-validators"; import { useUserApi } from "~/composables/api"; import MultiPurposeLabel from "~/components/Domain/ShoppingList/MultiPurposeLabel.vue"; -import { MultiPurposeLabelSummary } from "~/types/api-types/labels"; +import { MultiPurposeLabelSummary } from "~/lib/api/types/labels"; import { useLocales } from "~/composables/use-locales"; import { useLabelData, useLabelStore } from "~/composables/store"; diff --git a/frontend/pages/group/data/recipes.vue b/frontend/pages/group/data/recipes.vue index 1163422c..de05c439 100644 --- a/frontend/pages/group/data/recipes.vue +++ b/frontend/pages/group/data/recipes.vue @@ -162,9 +162,9 @@ import RecipeDataTable from "~/components/Domain/Recipe/RecipeDataTable.vue"; import RecipeOrganizerSelector from "~/components/Domain/Recipe/RecipeOrganizerSelector.vue"; import { useUserApi } from "~/composables/api"; import { useRecipes, allRecipes } from "~/composables/recipes"; -import { Recipe, RecipeSettings } from "~/types/api-types/recipe"; +import { Recipe, RecipeSettings } from "~/lib/api/types/recipe"; import GroupExportData from "~/components/Domain/Group/GroupExportData.vue"; -import { GroupDataExport } from "~/types/api-types/group"; +import { GroupDataExport } from "~/lib/api/types/group"; import { MenuItem } from "~/components/global/BaseOverflowButton.vue"; import RecipeSettingsSwitches from "~/components/Domain/Recipe/RecipeSettingsSwitches.vue"; diff --git a/frontend/pages/group/data/units.vue b/frontend/pages/group/data/units.vue index 5626bd33..96a23b42 100644 --- a/frontend/pages/group/data/units.vue +++ b/frontend/pages/group/data/units.vue @@ -159,7 +159,7 @@ import { computed, defineComponent, onMounted, ref } from "@nuxtjs/composition-a import type { LocaleObject } from "@nuxtjs/i18n"; import { validators } from "~/composables/use-validators"; import { useUserApi } from "~/composables/api"; -import { CreateIngredientUnit, IngredientUnit } from "~/types/api-types/recipe"; +import { CreateIngredientUnit, IngredientUnit } from "~/lib/api/types/recipe"; import { useLocales } from "~/composables/use-locales"; import { useUnitStore } from "~/composables/store"; import { VForm } from "~/types/vuetify"; diff --git a/frontend/pages/group/mealplan/planner.vue b/frontend/pages/group/mealplan/planner.vue index 6ef697dd..67500c18 100644 --- a/frontend/pages/group/mealplan/planner.vue +++ b/frontend/pages/group/mealplan/planner.vue @@ -271,7 +271,7 @@ import { useRecipes, allRecipes } from "~/composables/recipes"; import RecipeCardImage from "~/components/Domain/Recipe/RecipeCardImage.vue"; import RecipeCard from "~/components/Domain/Recipe/RecipeCard.vue"; import RecipeContextMenu from "~/components/Domain/Recipe/RecipeContextMenu.vue"; -import { PlanEntryType } from "~/types/api-types/meal-plan"; +import { PlanEntryType } from "~/lib/api/types/meal-plan"; import { useUserApi } from "~/composables/api"; export default defineComponent({ diff --git a/frontend/pages/group/mealplan/settings.vue b/frontend/pages/group/mealplan/settings.vue index 430612ed..cfa9c90f 100644 --- a/frontend/pages/group/mealplan/settings.vue +++ b/frontend/pages/group/mealplan/settings.vue @@ -93,7 +93,7 @@ - + diff --git a/frontend/pages/group/notifiers.vue b/frontend/pages/group/notifiers.vue index 14ab22ae..f5e532b1 100644 --- a/frontend/pages/group/notifiers.vue +++ b/frontend/pages/group/notifiers.vue @@ -106,7 +106,7 @@ import { defineComponent, useAsync, reactive, useContext, toRefs } from "@nuxtjs/composition-api"; import { useUserApi } from "~/composables/api"; import { useAsyncKey } from "~/composables/use-utils"; -import { GroupEventNotifierCreate, GroupEventNotifierOut } from "~/types/api-types/group"; +import { GroupEventNotifierCreate, GroupEventNotifierOut } from "~/lib/api/types/group"; interface OptionKey { text: string; diff --git a/frontend/pages/group/reports/_id.vue b/frontend/pages/group/reports/_id.vue index 6624791e..5724b3ac 100644 --- a/frontend/pages/group/reports/_id.vue +++ b/frontend/pages/group/reports/_id.vue @@ -31,7 +31,7 @@