Skip to content

Commit

Permalink
chore: update deps to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
ComfortablyCoding committed Jul 28, 2024
1 parent 019fd3c commit b0dd3c7
Show file tree
Hide file tree
Showing 7 changed files with 3,186 additions and 5,551 deletions.
2 changes: 1 addition & 1 deletion .directus/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
image: redis:6

directus:
image: directus/directus:10.8.3
image: directus/directus:10.13.1
ports:
- 8055:8055
volumes:
Expand Down
8 changes: 0 additions & 8 deletions modules/directus/runtime/composables/useDirectusAuth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import jwtDecode from 'jwt-decode';
import { readMe, passwordRequest, passwordReset } from '@directus/sdk';
import type { RestClient, AuthenticationClient } from '@directus/sdk';
import type { Schema } from '~/types/schema';
Expand Down Expand Up @@ -60,18 +59,11 @@ export default function useDirectusAuth<DirectusSchema extends object>() {
user.value = response as User;
}

async function isTokenExpired(token: string) {
const decodedToken = jwtDecode(token) as { exp: number };
const expirationDate = new Date(decodedToken.exp * 1000);
return expirationDate < new Date();
}

return {
user,
login,
logout,
fetchUser,
isTokenExpired,
_loggedIn,
};
}
2 changes: 0 additions & 2 deletions modules/directus/runtime/plugins/directus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ export default defineNuxtPlugin((nuxtApp) => {
const config = useRuntimeConfig();
const directusUrl = config.public.directus.rest.baseUrl as string;

const { isTokenExpired } = useDirectusAuth();

// We're creating a custom storage class to use the Nuxt so we can use auth on the server and clien
class CookieStorage {
get() {
Expand Down
20 changes: 8 additions & 12 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,15 @@ export default defineNuxtConfig({
css: ['~/assets/css/tailwind.css', '~/assets/css/main.css'],

modules: [
'@nuxt/devtools', // https://devtools.nuxtjs.org/
'@nuxt/image',
'@nuxt/ui',
'@nuxtjs/color-mode',
'@nuxtjs/google-fonts',
'@nuxtjs/sitemap', // https://nuxtseo.com/sitemap/getting-started/how-it-works
'@nuxt/ui', // https://ui.nuxt.com
'@nuxtjs/color-mode', // https://color-mode.nuxtjs.org
'@nuxtjs/google-fonts', // https://google-fonts.nuxtjs.org
'@nuxtjs/seo', // https://nuxtseo.com
'@formkit/auto-animate/nuxt',
'@vueuse/motion/nuxt', // https://motion.vueuse.org/nuxt.html
'@vueuse/nuxt', // https://vueuse.org/
'nuxt-icon', // https://github.com/nuxt-modules/icon
'nuxt-og-image',
'nuxt-schema-org', // https://nuxtseo.com/schema-org/guides/quick-setup
'@nuxt/icon', // https://github.com/nuxt-modules/icon
],

experimental: {
Expand Down Expand Up @@ -72,10 +70,6 @@ export default defineNuxtConfig({
// Nuxt DevTools - https://devtools.nuxtjs.org/
devtools: { enabled: true },

ui: {
icons: 'all',
},

// Color Mode Configuration - https://color-mode.nuxtjs.org/
colorMode: {
classSuffix: '', // This is so we play nice with TailwindCSS
Expand Down Expand Up @@ -139,4 +133,6 @@ export default defineNuxtConfig({
build: {
transpile: ['v-perfect-signature'],
},

compatibilityDate: '2024-07-28',
});
75 changes: 35 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,45 @@
"format": "prettier --write \"**/*.{md,y?(a)ml,json,vue}\""
},
"devDependencies": {
"@directus/sdk": "14.0.0",
"@directus/types": "11.0.3",
"@formkit/auto-animate": "1.0.0-beta.6",
"@headlessui/vue": "1.7.16",
"@iconify/json": "2.2.166",
"@nuxt/devtools": "^1.0.6",
"@nuxt/ui": "2.11.1",
"@nuxtjs/color-mode": "3.3.2",
"@nuxtjs/eslint-config-typescript": "12.1.0",
"@nuxtjs/eslint-module": "4.1.0",
"@nuxtjs/google-fonts": "3.1.3",
"@nuxtjs/sitemap": "5.1.4",
"@nuxtjs/tailwindcss": "6.10.3",
"@stripe/stripe-js": "2.2.2",
"@tailwindcss/forms": "0.5.7",
"@tailwindcss/typography": "0.5.10",
"@types/uuid": "9.0.7",
"@vueuse/core": "10.7.1",
"@vueuse/motion": "2.0.0",
"@vueuse/nuxt": "10.7.1",
"@iconify-json/material-symbols": "^1.1.85",
"@iconify-json/mdi": "^1.1.67",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@nuxtjs/eslint-module": "^4.1.0",
"@nuxtjs/tailwindcss": "^6.12.1",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.13",
"@types/uuid": "^10.0.0",
"@vueuse/core": "^10.11.0",
"@vueuse/nuxt": "^10.11.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.2",
"eslint-plugin-vue": "9.19.2",
"floating-vue": "2.0.0-beta.24",
"form-data": "4.0.0",
"jwt-decode": "3.1.2",
"micromark": "4.0.0",
"micromark-extension-gfm": "3.0.0",
"nuxt": "3.10.3",
"nuxt-icon": "0.6.8",
"nuxt-schema-org": "3.3.2",
"prettier": "3.1.1",
"stripe": "13.8.0",
"typescript": "5.3.3",
"uuid": "9.0.1",
"v-perfect-signature": "1.4.0",
"vue-tsc": "1.8.27"
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-vue": "^9.27.0",
"prettier": "^3.3.3",
"typescript": "^5.5.4",
"vue-tsc": "^2.0.29"
},
"dependencies": {
"@nuxt/image": "1.1.0",
"nuxt-og-image": "3.0.0-rc.23"
"@directus/sdk": "^16.1.1",
"@formkit/auto-animate": "^0.8.2",
"@headlessui/vue": "^1.7.22",
"@nuxt/icon": "^1.3.1",
"@nuxt/image": "^1.7.0",
"@nuxt/ui": "^2.18.2",
"@nuxtjs/color-mode": "^3.4.2",
"@nuxtjs/google-fonts": "^3.2.0",
"@nuxtjs/seo": "^2.0.0-rc.16",
"@stripe/stripe-js": "^4.1.0",
"@vueuse/motion": "^2.2.3",
"micromark": "^4.0.0",
"micromark-extension-gfm": "^3.0.0",
"nuxt": "^3.12.4",
"stripe": "^16.5.0",
"uuid": "^10.0.0",
"v-perfect-signature": "^1.4.0",
"vue": "^3.4.34"
},
"packageManager": "pnpm@8.6.0",
"packageManager": "pnpm@9.6.0",
"engines": {
"node": ">=18.0.0",
"pnpm": ">=8.6.0"
Expand Down
4 changes: 0 additions & 4 deletions plugins/animate.ts

This file was deleted.

Loading

0 comments on commit b0dd3c7

Please sign in to comment.