Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into volar
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Jul 6, 2024
2 parents 09e6197 + 739b600 commit 6f6b9ab
Show file tree
Hide file tree
Showing 7 changed files with 3,018 additions and 5,324 deletions.
2 changes: 1 addition & 1 deletion components/LandingPageFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
</footer>
</template>
<script setup lang="ts">
import type { ParsedContent } from '@nuxt/content/dist/runtime/types'
import type { ParsedContent } from '@nuxt/content'
const showLegalNotices = ref(false)
const legalNotices = ref<ParsedContent | null>(null)
Expand Down
7 changes: 7 additions & 0 deletions config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ export interface Config {
githubRepoToken: string
public: {
environment: Environment
// Only here to fix typescript error in @nuxtjs/mdc/dist/runtime/components/prose/ProseImg.vue
mdc: {
useNuxtImage: boolean
}
}
}

Expand All @@ -87,6 +91,9 @@ export function constructConfig() {
githubRepoToken: process.env.GITHUB_REPO_TOKEN ?? 'UNDEFINED',
public: {
environment: getEnvironment(),
mdc: {
useNuxtImage: false,
},
},
} satisfies Config
}
8 changes: 3 additions & 5 deletions middleware/authenticated.global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import { gql } from '@apollo/client/core'
* Plugin that adds checks if the user is logged in, and redirects her to the login page if not.
*/
export default defineNuxtRouteMiddleware(async (to, _from) => {
if (
to.matched.some(
(record: { meta: { requiresAuth: any } }) => record.meta.requiresAuth,
)
) {
if (to.matched.some((record) => record.meta.requiresAuth)) {
const { $apolloClient } = useNuxtApp()
try {
// TODO: Only call this if we have a session cookie?
// @ts-expect-error: not sure why this is not typed
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
const response = await $apolloClient.query({
query: gql(/* GraphQL */ `
query CheckLoggedIn {
Expand Down
58 changes: 29 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"validate": "pnpm graphql:validate"
},
"dependencies": {
"@apollo/client": "^3.10.4",
"@apollo/client": "^3.10.8",
"@apollo/server": "^4.10.4",
"@as-integrations/h3": "^1.1.6",
"@azure/communication-email": "^1.0.0",
Expand All @@ -53,18 +53,18 @@
"@nuxtjs/tailwindcss": "^6.12.0",
"@pinia/nuxt": "^0.5.1",
"@popperjs/core": "^2.11.8",
"@prisma/client": "^5.14.0",
"@prisma/client": "^5.16.1",
"@variantjs/core": "^0.0.90",
"@variantjs/vue": "^0.0.22",
"@vee-validate/zod": "^4.12.8",
"@vee-validate/zod": "^4.13.1",
"@vue/apollo-composable": "4.0.2",
"@vue/apollo-util": "^4.0.0-beta.6",
"@vueuse/core": "^10.10.0",
"@yaireo/tagify": "^4.26.5",
"@vueuse/core": "^10.11.0",
"@yaireo/tagify": "^4.27.0",
"autoprefixer": "^10.4.17",
"body-scroll-lock": "^4.0.0-beta.0",
"cross-fetch": "^4.0.0",
"graphql": "^16.8.1",
"graphql": "^16.9.0",
"graphql-scalars": "^1.23.0",
"ioredis": "^5.4.1",
"json-bigint-patch": "^0.0.8",
Expand All @@ -77,33 +77,33 @@
"tsyringe": "^4.8.0",
"typescript": "^5.5.3",
"unstorage": "^1.10.1",
"vee-validate": "^4.12.8",
"vue": "^3.4.27",
"vue-router": "^4.3.2",
"vee-validate": "^4.13.1",
"vue": "^3.4.31",
"vue-router": "^4.4.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@apollo/utils.keyvaluecache": "^3.1.0",
"@azure/core-rest-pipeline": "^1.16.0",
"@azure/static-web-apps-cli": "^1.1.8",
"@bg-dev/nuxt-naiveui": "^1.13.3",
"@graphql-codegen/add": "^5.0.0",
"@azure/core-rest-pipeline": "^1.16.1",
"@azure/static-web-apps-cli": "^1.1.10",
"@bg-dev/nuxt-naiveui": "^1.14.0",
"@graphql-codegen/add": "^5.0.3",
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/fragment-matcher": "^5.0.0",
"@graphql-codegen/gql-tag-operations-preset": "^2.1.0",
"@graphql-codegen/typed-document-node": "^5.0.7",
"@graphql-codegen/typescript-operations": "^4.2.1",
"@graphql-codegen/typed-document-node": "^5.0.9",
"@graphql-codegen/typescript-operations": "^4.2.3",
"@graphql-eslint/eslint-plugin": "^3.20.1",
"@graphql-inspector/cli": "^5.0.5",
"@graphql-inspector/cli": "^5.0.6",
"@graphql-tools/merge": "^9.0.4",
"@graphql-tools/utils": "^10.2.1",
"@graphql-tools/utils": "^10.2.3",
"@graphql-typed-document-node/core": "^3.2.0",
"@nuxt/content": "^2.12.1",
"@nuxt/kit": "^3.11.2",
"@nuxt/content": "^2.13.0",
"@nuxt/kit": "^3.12.3",
"@nuxt/test-utils": "^3.13.1",
"@nuxtjs/eslint-config": "^12.0.0",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@nuxtjs/seo": "^2.0.0-rc.10",
"@nuxtjs/seo": "^2.0.0-rc.11",
"@storybook/core-client": "^7.6.17",
"@storybook/core-server": "7.6.17",
"@storybook/types": "^8.0.8",
Expand All @@ -113,18 +113,18 @@
"@tailwindcss/line-clamp": "^0.4.4",
"@tailwindcss/typography": "^0.5.13",
"@types/bcryptjs": "^2.4.6",
"@types/lodash": "^4.17.4",
"@types/lodash": "^4.17.6",
"@types/node": "^20.13.0",
"@types/nodemailer": "^6.4.15",
"@types/supertest": "^6.0.2",
"@types/uuid": "^9.0.8",
"@types/uuid": "^10.0.0",
"@types/yaireo__tagify": "^4.24.0",
"@typescript-eslint/eslint-plugin": "^7.5.0",
"@typescript-eslint/parser": "^7.5.0",
"@vee-validate/nuxt": "^4.12.8",
"@vee-validate/nuxt": "^4.13.1",
"@vitest/coverage-v8": "^1.6.0",
"@vue/compiler-sfc": "^3.4.27",
"@vue/runtime-dom": "^3.4.27",
"@vue/compiler-sfc": "^3.4.31",
"@vue/runtime-dom": "^3.4.31",
"@vue/test-utils": "^2.4.6",
"chalk": "^5.3.0",
"chromatic": "^11.0.4",
Expand All @@ -142,21 +142,21 @@
"graphql-tag": "^2.12.6",
"mount-vue-component": "^0.10.2",
"naive-ui": "^2.38.2",
"nuxt": "^3.11.2",
"nuxt": "^3.12.3",
"nuxt-graphql-server": "3.0.0",
"nuxt-icon": "^0.6.10",
"postinstall-postinstall": "^2.1.0",
"prettier": "^3.3.2",
"prettier-plugin-organize-imports": "^4.0.0",
"prisma": "^5.14.0",
"prisma": "^5.16.1",
"storybook": "7.6.17",
"storybook-vue-addon": "^0.4.0",
"supertest": "^7.0.0",
"supertest-graphql": "^1.1.4",
"tailwindcss": "^3.4.4",
"ufo": "^1.5.3",
"unplugin-vue-components": "^0.27.0",
"vite": "^5.2.12",
"unplugin-vue-components": "^0.27.2",
"vite": "^5.3.3",
"vitest": "^1.6.0",
"vitest-environment-nuxt": "^1.0.0",
"vitest-github-actions-reporter": "^0.11.1",
Expand Down
1 change: 1 addition & 0 deletions pages/codeprojects/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<script setup lang="ts">
const route = useRoute('codeprojects-slug')
let markdownPath = 'codeprojects/'
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- typing issue?
if (route.params.slug != null) {
markdownPath += (route.params.slug as string[])
.map((param) => param.toLowerCase())
Expand Down
1 change: 1 addition & 0 deletions pages/surveys/2015/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ definePageMeta({ layout: 'content' })
const route = useRoute('surveys-2015-slug')
let markdownPath = 'surveys/2015/'
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- typing issue?
if (route.params.slug != null) {
markdownPath += (route.params.slug as string[])
.map((param) => param.toLowerCase())
Expand Down
Loading

0 comments on commit 6f6b9ab

Please sign in to comment.