diff --git a/CHANGELOG.md b/CHANGELOG.md
index 44e0032f..1f9dda72 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,29 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+## v5.4.3
+
+
+### 🩹 Fixes
+
+ - UseRoute is undefined (1c95841)
+
+### ❤️ Contributors
+
+- Conner Bachmann ([@Intevel](http://github.com/Intevel))
+
+## v5.4.2
+
+
+### 🩹 Fixes
+
+ - Invalid url parsing (b7cba7a)
+ - UseDirectusUrl is not defined (3001e9b)
+
+### ❤️ Contributors
+
+- Conner Bachmann ([@Intevel](http://github.com/Intevel))
+
## v5.4.1
diff --git a/docs/content/1.getting-started/2.options.md b/docs/content/1.getting-started/2.options.md
index dc6253c7..2118d4a0 100644
--- a/docs/content/1.getting-started/2.options.md
+++ b/docs/content/1.getting-started/2.options.md
@@ -1,59 +1,80 @@
-# Options
-
-Configure Nuxt Directus easily with the `directus` property.
-
----
-
-```ts [nuxt.config]
-export default {
- // Defaults options
- directus: {
- autoFetch: true,
- }
-}
-```
-
-## `url`
-
-- No default - **Required**
-
-The url to which requests are made to.
-
-## `autoFetch`
-
-- Default: `true`
-
-Should the user be fetched automatically
-
-## `fetchUserParams`
-
-- No default - **Optional**
-
-The Parameters which should be sent when the user is fetched, see [DirectusQueryParams](https://github.com/directus-community/nuxt-directus/blob/313a5a227e1d8b88a43d92c79b47a87d92a21fc5/src/runtime/types/index.d.ts#L26)
-
-## `token`
-
-- No default - **Optional**
-
-A static token
-
-## `cookieNameToken`
-
-- Default: `directus_token`
-
-Specify the cookie name of the directus auth token
-
-## `cookieNameRefreshToken`
-
-- Default: `directus_refresh_token`
-
-Specify the cookie name of the directus refresh auth token
-
-## `devtools`
-
-- Default: `false`
-
-Activate the Nuxt Devtools, checkout [Devtools](/getting-started/devtools) before activating
-
-::feedback-box
-::
+# Options
+
+Configure Nuxt Directus easily with the `directus` property.
+
+---
+
+```ts [nuxt.config]
+export default {
+ // Defaults options
+ directus: {
+ autoFetch: true,
+ }
+}
+```
+
+## `url`
+
+- No default - **Required**
+
+The url to which requests are made to.
+
+## `autoFetch`
+
+- Default: `true`
+
+Should the user be fetched automatically
+
+## `autoRefresh`
+
+- Default: `true`
+
+Auto refesh tokens
+
+
+## `onAutoRefreshFailure()`
+
+- Default: `not defined`
+
+The function that get called if the `autoRefresh` fail
+
+## `maxAgeRefreshToken`
+
+- Default: `604800`
+
+Need to be the same as specified in your directus config; this is the max amount of milliseconds that your refresh cookie will be kept in the browser.
+
+Auto refesh tokens
+
+## `fetchUserParams`
+
+- No default - **Optional**
+
+The Parameters which should be sent when the user is fetched, see [DirectusQueryParams](https://github.com/directus-community/nuxt-directus/blob/313a5a227e1d8b88a43d92c79b47a87d92a21fc5/src/runtime/types/index.d.ts#L26)
+
+## `token`
+
+- No default - **Optional**
+
+A static token
+
+## `cookieNameToken`
+
+- Default: `directus_token`
+
+Specify the cookie name of the directus auth token
+
+## `cookieNameRefreshToken`
+
+- Default: `directus_refresh_token`
+
+Specify the cookie name of the directus refresh auth token
+
+## `devtools`
+
+- Default: `false`
+
+Activate the Nuxt Devtools, checkout [Devtools](/getting-started/devtools) before activating
+
+::feedback-box
+::
diff --git a/docs/content/2.composables/1.useDirectusAuth.md b/docs/content/2.composables/1.useDirectusAuth.md
index 9bc64a2b..3042f8b2 100644
--- a/docs/content/2.composables/1.useDirectusAuth.md
+++ b/docs/content/2.composables/1.useDirectusAuth.md
@@ -104,31 +104,7 @@ const onSubmit = async () => {
## Middleware example
-### Redirect user to login
-
-You can protect your authenticated routes by creating a custom middleware in your project, here is an example:
-
-Create `./middleware/auth.ts`
-
-```ts
-export default defineNuxtRouteMiddleware((to, _from) => {
- const user = useDirectusUser();
-
- if (!user.value) {
- return navigateTo("/login");
- }
-});
-```
-
-Now you can add the middleware to your pages
-
-```ts
-
-```
+> Check how to Redirect user to login page [over here](/examples/redirectuserlogin).
::feedback-box
::
diff --git a/docs/content/5.examples/1.useAsyncData.md b/docs/content/5.examples/1.useAsyncData.md
new file mode 100644
index 00000000..cad35412
--- /dev/null
+++ b/docs/content/5.examples/1.useAsyncData.md
@@ -0,0 +1,25 @@
+# useAsyncData
+
+---
+
+Using `useAsyncData` composable allows your app to fetch data more efficiently with status control (pending, error) and the refresh function option.
+Check [Nuxt 3 documentation](https://nuxt.com/docs/api/composables/use-async-data) for more details on `useAsyncData`
+
+```js
+const { getItemById } = useDirectusItems();
+
+const {
+ data: myCollection,
+ pending,
+ error,
+ refresh,
+} = await useAsyncData("myCollection", () =>
+ getItemById({
+ collection: myCollection,
+ id: id,
+ params: params,
+ })
+);
+```
+::feedback-box
+::
diff --git a/docs/content/5.examples/2.redirectUserLogin.md b/docs/content/5.examples/2.redirectUserLogin.md
new file mode 100644
index 00000000..8c298a08
--- /dev/null
+++ b/docs/content/5.examples/2.redirectUserLogin.md
@@ -0,0 +1,30 @@
+# Redirect user to login
+
+---
+
+You can protect your authenticated routes by creating a custom middleware in your project, here is an example:
+
+Create `./middleware/auth.ts`
+
+```ts
+export default defineNuxtRouteMiddleware((to, _from) => {
+ const user = useDirectusUser();
+
+ if (!user.value) {
+ return navigateTo("/login");
+ }
+});
+```
+
+Now you can add the middleware to your pages
+
+```ts
+
+```
+
+::feedback-box
+::
diff --git a/docs/content/5.examples/_dir.yml b/docs/content/5.examples/_dir.yml
new file mode 100644
index 00000000..f7bd75cd
--- /dev/null
+++ b/docs/content/5.examples/_dir.yml
@@ -0,0 +1,2 @@
+title: Examples
+icon: heroicons-outline:chat-bubble-left-ellipsis
\ No newline at end of file
diff --git a/package.json b/package.json
index ff55ce0f..d7bf5a55 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "nuxt-directus",
- "version": "5.4.1",
+ "version": "5.4.3",
"license": "MIT",
"repository": "https://github.com/intevel/nuxt-directus",
"homepage": "https://nuxt-directus.netlify.app/",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9e75b342..1e68869d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -11,10 +11,10 @@ devDependencies:
version: 0.4.2(nuxt@3.2.2)(rollup@3.21.0)(vite@4.1.4)
'@nuxt/module-builder':
specifier: latest
- version: 0.3.1
+ version: 0.4.0(@nuxt/kit@3.2.2)(nuxi@3.5.3)
'@nuxtjs/eslint-config-typescript':
specifier: latest
- version: 12.0.0(eslint@8.40.0)(typescript@4.9.5)
+ version: 12.0.0(eslint@8.42.0)(typescript@4.9.5)
'@types/node':
specifier: ^18.14.1
version: 18.14.1
@@ -23,10 +23,10 @@ devDependencies:
version: 0.4.1
eslint:
specifier: latest
- version: 8.40.0
+ version: 8.42.0
nuxt:
specifier: ^3.0.0
- version: 3.2.2(@types/node@18.14.1)(eslint@8.40.0)(rollup@3.21.0)(typescript@4.9.5)
+ version: 3.2.2(@types/node@18.14.1)(eslint@8.42.0)(rollup@3.21.0)(typescript@4.9.5)
typescript:
specifier: ^4.9.5
version: 4.9.5
@@ -1061,13 +1061,13 @@ packages:
dev: true
optional: true
- /@eslint-community/eslint-utils@4.4.0(eslint@8.40.0):
+ /@eslint-community/eslint-utils@4.4.0(eslint@8.42.0):
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
dependencies:
- eslint: 8.40.0
+ eslint: 8.42.0
eslint-visitor-keys: 3.4.1
dev: true
@@ -1093,8 +1093,8 @@ packages:
- supports-color
dev: true
- /@eslint/js@8.40.0:
- resolution: {integrity: sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==}
+ /@eslint/js@8.42.0:
+ resolution: {integrity: sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
@@ -1112,8 +1112,8 @@ packages:
'@hapi/hoek': 9.3.0
dev: true
- /@humanwhocodes/config-array@0.11.8:
- resolution: {integrity: sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==}
+ /@humanwhocodes/config-array@0.11.10:
+ resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==}
engines: {node: '>=10.10.0'}
dependencies:
'@humanwhocodes/object-schema': 1.2.1
@@ -1306,7 +1306,7 @@ packages:
'@nuxt/kit': 3.4.2(rollup@3.21.0)
'@nuxt/schema': 3.4.2(rollup@3.21.0)
execa: 7.1.1
- nuxt: 3.2.2(@types/node@18.14.1)(eslint@8.40.0)(rollup@3.21.0)(typescript@4.9.5)
+ nuxt: 3.2.2(@types/node@18.14.1)(eslint@8.42.0)(rollup@3.21.0)(typescript@4.9.5)
vite: 4.1.4(@types/node@18.14.1)
transitivePeerDependencies:
- rollup
@@ -1352,7 +1352,7 @@ packages:
is-installed-globally: 0.4.0
launch-editor: 2.6.0
local-pkg: 0.4.3
- nuxt: 3.2.2(@types/node@18.14.1)(eslint@8.40.0)(rollup@3.21.0)(typescript@4.9.5)
+ nuxt: 3.2.2(@types/node@18.14.1)(eslint@8.42.0)(rollup@3.21.0)(typescript@4.9.5)
nypm: 0.2.0
pacote: 15.1.2
pathe: 1.1.0
@@ -1458,13 +1458,18 @@ packages:
- supports-color
dev: true
- /@nuxt/module-builder@0.3.1:
- resolution: {integrity: sha512-qH/F3SgIE4mobpAfJ6D9c6IqIrhEsiPM+aSdckyJgRGUbyU8urKqPR0d3DkGanN9mWy5Nk6Fwqon6jNKz97SRA==}
+ /@nuxt/module-builder@0.4.0(@nuxt/kit@3.2.2)(nuxi@3.5.3):
+ resolution: {integrity: sha512-B+UAYgFV1Hkc2ZcD7GaiKZ3SNHhyxFlXzZoBWTc9ulE0Z/+rq6RTa9fNm13BZyGhVhDCl5FN/wF/yYa1O/D2iw==}
hasBin: true
+ peerDependencies:
+ '@nuxt/kit': ^3.5.0
+ nuxi: ^3.5.0
dependencies:
+ '@nuxt/kit': 3.2.2(rollup@3.21.0)
consola: 3.1.0
- mlly: 1.2.0
+ mlly: 1.3.0
mri: 1.2.0
+ nuxi: 3.5.3
pathe: 1.1.0
unbuild: 1.2.1
transitivePeerDependencies:
@@ -1566,7 +1571,7 @@ packages:
resolution: {integrity: sha512-PjVETP7+iZXAs5Q8O4ivl4t6qjWZMZqwiTVogUXHoHGZZcw7GZW3u3tzfYfE1HbzyYJfr236IXqQ02MeR8Fz2w==}
dev: true
- /@nuxt/vite-builder@3.2.2(@types/node@18.14.1)(eslint@8.40.0)(typescript@4.9.5)(vue@3.2.47):
+ /@nuxt/vite-builder@3.2.2(@types/node@18.14.1)(eslint@8.42.0)(typescript@4.9.5)(vue@3.2.47):
resolution: {integrity: sha512-J46xnpVtpkYSpFYL7NrqIFEUQWY0KNCeOKdsPa6CzJovSng6k8eQVuTQ3EQHxbRTt9j7vRFIvwge6E//c7iMJg==}
engines: {node: ^14.18.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0}
peerDependencies:
@@ -1604,7 +1609,7 @@ packages:
unplugin: 1.1.0
vite: 4.1.4(@types/node@18.14.1)
vite-node: 0.28.5(@types/node@18.14.1)
- vite-plugin-checker: 0.5.6(eslint@8.40.0)(typescript@4.9.5)(vite@4.1.4)
+ vite-plugin-checker: 0.5.6(eslint@8.42.0)(typescript@4.9.5)(vite@4.1.4)
vue: 3.2.47
vue-bundle-renderer: 1.0.2
transitivePeerDependencies:
@@ -1625,37 +1630,37 @@ packages:
- vue-tsc
dev: true
- /@nuxtjs/eslint-config-typescript@12.0.0(eslint@8.40.0)(typescript@4.9.5):
+ /@nuxtjs/eslint-config-typescript@12.0.0(eslint@8.42.0)(typescript@4.9.5):
resolution: {integrity: sha512-HJR0ho5MYuOCFjkL+eMX/VXbUwy36J12DUMVy+dj3Qz1GYHwX92Saxap3urFzr8oPkzzFiuOknDivfCeRBWakg==}
peerDependencies:
eslint: ^8.23.0
dependencies:
- '@nuxtjs/eslint-config': 12.0.0(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.40.0)
- '@typescript-eslint/eslint-plugin': 5.53.0(@typescript-eslint/parser@5.53.0)(eslint@8.40.0)(typescript@4.9.5)
- '@typescript-eslint/parser': 5.53.0(eslint@8.40.0)(typescript@4.9.5)
- eslint: 8.40.0
- eslint-import-resolver-typescript: 3.5.3(eslint-plugin-import@2.27.5)(eslint@8.40.0)
- eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.40.0)
- eslint-plugin-vue: 9.9.0(eslint@8.40.0)
+ '@nuxtjs/eslint-config': 12.0.0(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.42.0)
+ '@typescript-eslint/eslint-plugin': 5.53.0(@typescript-eslint/parser@5.53.0)(eslint@8.42.0)(typescript@4.9.5)
+ '@typescript-eslint/parser': 5.53.0(eslint@8.42.0)(typescript@4.9.5)
+ eslint: 8.42.0
+ eslint-import-resolver-typescript: 3.5.3(eslint-plugin-import@2.27.5)(eslint@8.42.0)
+ eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.53.0)(eslint@8.42.0)
+ eslint-plugin-vue: 9.9.0(eslint@8.42.0)
transitivePeerDependencies:
- eslint-import-resolver-webpack
- supports-color
- typescript
dev: true
- /@nuxtjs/eslint-config@12.0.0(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.40.0):
+ /@nuxtjs/eslint-config@12.0.0(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.42.0):
resolution: {integrity: sha512-ewenelo75x0eYEUK+9EBXjc/OopQCvdkmYmlZuoHq5kub/vtiRpyZ/autppwokpHUq8tiVyl2ejMakoiHiDTrg==}
peerDependencies:
eslint: ^8.23.0
dependencies:
- eslint: 8.40.0
- eslint-config-standard: 17.0.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.40.0)
- eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.40.0)
- eslint-plugin-n: 15.6.1(eslint@8.40.0)
- eslint-plugin-node: 11.1.0(eslint@8.40.0)
- eslint-plugin-promise: 6.1.1(eslint@8.40.0)
- eslint-plugin-unicorn: 44.0.2(eslint@8.40.0)
- eslint-plugin-vue: 9.9.0(eslint@8.40.0)
+ eslint: 8.42.0
+ eslint-config-standard: 17.0.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.42.0)
+ eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.42.0)
+ eslint-plugin-n: 15.6.1(eslint@8.42.0)
+ eslint-plugin-node: 11.1.0(eslint@8.42.0)
+ eslint-plugin-promise: 6.1.1(eslint@8.42.0)
+ eslint-plugin-unicorn: 44.0.2(eslint@8.42.0)
+ eslint-plugin-vue: 9.9.0(eslint@8.42.0)
local-pkg: 0.4.3
transitivePeerDependencies:
- '@typescript-eslint/parser'
@@ -1987,7 +1992,7 @@ packages:
resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==}
dev: true
- /@typescript-eslint/eslint-plugin@5.53.0(@typescript-eslint/parser@5.53.0)(eslint@8.40.0)(typescript@4.9.5):
+ /@typescript-eslint/eslint-plugin@5.53.0(@typescript-eslint/parser@5.53.0)(eslint@8.42.0)(typescript@4.9.5):
resolution: {integrity: sha512-alFpFWNucPLdUOySmXCJpzr6HKC3bu7XooShWM+3w/EL6J2HIoB2PFxpLnq4JauWVk6DiVeNKzQlFEaE+X9sGw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -1998,12 +2003,12 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/parser': 5.53.0(eslint@8.40.0)(typescript@4.9.5)
+ '@typescript-eslint/parser': 5.53.0(eslint@8.42.0)(typescript@4.9.5)
'@typescript-eslint/scope-manager': 5.53.0
- '@typescript-eslint/type-utils': 5.53.0(eslint@8.40.0)(typescript@4.9.5)
- '@typescript-eslint/utils': 5.53.0(eslint@8.40.0)(typescript@4.9.5)
+ '@typescript-eslint/type-utils': 5.53.0(eslint@8.42.0)(typescript@4.9.5)
+ '@typescript-eslint/utils': 5.53.0(eslint@8.42.0)(typescript@4.9.5)
debug: 4.3.4
- eslint: 8.40.0
+ eslint: 8.42.0
grapheme-splitter: 1.0.4
ignore: 5.2.4
natural-compare-lite: 1.4.0
@@ -2015,7 +2020,7 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/parser@5.53.0(eslint@8.40.0)(typescript@4.9.5):
+ /@typescript-eslint/parser@5.53.0(eslint@8.42.0)(typescript@4.9.5):
resolution: {integrity: sha512-MKBw9i0DLYlmdOb3Oq/526+al20AJZpANdT6Ct9ffxcV8nKCHz63t/S0IhlTFNsBIHJv+GY5SFJ0XfqVeydQrQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -2029,7 +2034,7 @@ packages:
'@typescript-eslint/types': 5.53.0
'@typescript-eslint/typescript-estree': 5.53.0(typescript@4.9.5)
debug: 4.3.4
- eslint: 8.40.0
+ eslint: 8.42.0
typescript: 4.9.5
transitivePeerDependencies:
- supports-color
@@ -2043,7 +2048,7 @@ packages:
'@typescript-eslint/visitor-keys': 5.53.0
dev: true
- /@typescript-eslint/type-utils@5.53.0(eslint@8.40.0)(typescript@4.9.5):
+ /@typescript-eslint/type-utils@5.53.0(eslint@8.42.0)(typescript@4.9.5):
resolution: {integrity: sha512-HO2hh0fmtqNLzTAme/KnND5uFNwbsdYhCZghK2SoxGp3Ifn2emv+hi0PBUjzzSh0dstUIFqOj3bp0AwQlK4OWw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -2054,9 +2059,9 @@ packages:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 5.53.0(typescript@4.9.5)
- '@typescript-eslint/utils': 5.53.0(eslint@8.40.0)(typescript@4.9.5)
+ '@typescript-eslint/utils': 5.53.0(eslint@8.42.0)(typescript@4.9.5)
debug: 4.3.4
- eslint: 8.40.0
+ eslint: 8.42.0
tsutils: 3.21.0(typescript@4.9.5)
typescript: 4.9.5
transitivePeerDependencies:
@@ -2089,7 +2094,7 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/utils@5.53.0(eslint@8.40.0)(typescript@4.9.5):
+ /@typescript-eslint/utils@5.53.0(eslint@8.42.0)(typescript@4.9.5):
resolution: {integrity: sha512-VUOOtPv27UNWLxFwQK/8+7kvxVC+hPHNsJjzlJyotlaHjLSIgOCKj9I0DBUjwOOA64qjBwx5afAPjksqOxMO0g==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -2100,9 +2105,9 @@ packages:
'@typescript-eslint/scope-manager': 5.53.0
'@typescript-eslint/types': 5.53.0
'@typescript-eslint/typescript-estree': 5.53.0(typescript@4.9.5)
- eslint: 8.40.0
+ eslint: 8.42.0
eslint-scope: 5.1.1
- eslint-utils: 3.0.0(eslint@8.40.0)
+ eslint-utils: 3.0.0(eslint@8.42.0)
semver: 7.5.0
transitivePeerDependencies:
- supports-color
@@ -2703,7 +2708,7 @@ packages:
dotenv: 16.0.3
giget: 1.1.2
jiti: 1.18.2
- mlly: 1.2.0
+ mlly: 1.3.0
ohash: 1.1.2
pathe: 1.1.0
perfect-debounce: 0.1.3
@@ -3574,7 +3579,7 @@ packages:
resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==}
engines: {node: '>=12'}
- /eslint-config-standard@17.0.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.40.0):
+ /eslint-config-standard@17.0.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@15.6.1)(eslint-plugin-promise@6.1.1)(eslint@8.42.0):
resolution: {integrity: sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==}
peerDependencies:
eslint: ^8.0.1
@@ -3582,10 +3587,10 @@ packages:
eslint-plugin-n: ^15.0.0
eslint-plugin-promise: ^6.0.0
dependencies:
- eslint: 8.40.0
- eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.40.0)
- eslint-plugin-n: 15.6.1(eslint@8.40.0)
- eslint-plugin-promise: 6.1.1(eslint@8.40.0)
+ eslint: 8.42.0
+ eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.42.0)
+ eslint-plugin-n: 15.6.1(eslint@8.42.0)
+ eslint-plugin-promise: 6.1.1(eslint@8.42.0)
dev: true
/eslint-import-resolver-node@0.3.7:
@@ -3598,7 +3603,7 @@ packages:
- supports-color
dev: true
- /eslint-import-resolver-typescript@3.5.3(eslint-plugin-import@2.27.5)(eslint@8.40.0):
+ /eslint-import-resolver-typescript@3.5.3(eslint-plugin-import@2.27.5)(eslint@8.42.0):
resolution: {integrity: sha512-njRcKYBc3isE42LaTcJNVANR3R99H9bAxBDMNDr2W7yq5gYPxbU3MkdhsQukxZ/Xg9C2vcyLlDsbKfRDg0QvCQ==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@@ -3607,8 +3612,8 @@ packages:
dependencies:
debug: 4.3.4
enhanced-resolve: 5.12.0
- eslint: 8.40.0
- eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.40.0)
+ eslint: 8.42.0
+ eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.53.0)(eslint@8.42.0)
get-tsconfig: 4.4.0
globby: 13.1.4
is-core-module: 2.11.0
@@ -3618,7 +3623,37 @@ packages:
- supports-color
dev: true
- /eslint-module-utils@2.7.4(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.3)(eslint@8.40.0):
+ /eslint-module-utils@2.7.4(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.3)(eslint@8.42.0):
+ resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==}
+ engines: {node: '>=4'}
+ peerDependencies:
+ '@typescript-eslint/parser': '*'
+ eslint: '*'
+ eslint-import-resolver-node: '*'
+ eslint-import-resolver-typescript: '*'
+ eslint-import-resolver-webpack: '*'
+ peerDependenciesMeta:
+ '@typescript-eslint/parser':
+ optional: true
+ eslint:
+ optional: true
+ eslint-import-resolver-node:
+ optional: true
+ eslint-import-resolver-typescript:
+ optional: true
+ eslint-import-resolver-webpack:
+ optional: true
+ dependencies:
+ '@typescript-eslint/parser': 5.53.0(eslint@8.42.0)(typescript@4.9.5)
+ debug: 3.2.7
+ eslint: 8.42.0
+ eslint-import-resolver-node: 0.3.7
+ eslint-import-resolver-typescript: 3.5.3(eslint-plugin-import@2.27.5)(eslint@8.42.0)
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ /eslint-module-utils@2.7.4(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-node@0.3.7)(eslint@8.42.0):
resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==}
engines: {node: '>=4'}
peerDependencies:
@@ -3639,38 +3674,70 @@ packages:
eslint-import-resolver-webpack:
optional: true
dependencies:
- '@typescript-eslint/parser': 5.53.0(eslint@8.40.0)(typescript@4.9.5)
+ '@typescript-eslint/parser': 5.53.0(eslint@8.42.0)(typescript@4.9.5)
debug: 3.2.7
- eslint: 8.40.0
+ eslint: 8.42.0
eslint-import-resolver-node: 0.3.7
- eslint-import-resolver-typescript: 3.5.3(eslint-plugin-import@2.27.5)(eslint@8.40.0)
transitivePeerDependencies:
- supports-color
dev: true
- /eslint-plugin-es@3.0.1(eslint@8.40.0):
+ /eslint-plugin-es@3.0.1(eslint@8.42.0):
resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==}
engines: {node: '>=8.10.0'}
peerDependencies:
eslint: '>=4.19.1'
dependencies:
- eslint: 8.40.0
+ eslint: 8.42.0
eslint-utils: 2.1.0
regexpp: 3.2.0
dev: true
- /eslint-plugin-es@4.1.0(eslint@8.40.0):
+ /eslint-plugin-es@4.1.0(eslint@8.42.0):
resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==}
engines: {node: '>=8.10.0'}
peerDependencies:
eslint: '>=4.19.1'
dependencies:
- eslint: 8.40.0
+ eslint: 8.42.0
eslint-utils: 2.1.0
regexpp: 3.2.0
dev: true
- /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.40.0):
+ /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-typescript@3.5.3)(eslint@8.42.0):
+ resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
+ engines: {node: '>=4'}
+ peerDependencies:
+ '@typescript-eslint/parser': '*'
+ eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
+ peerDependenciesMeta:
+ '@typescript-eslint/parser':
+ optional: true
+ dependencies:
+ '@typescript-eslint/parser': 5.53.0(eslint@8.42.0)(typescript@4.9.5)
+ array-includes: 3.1.6
+ array.prototype.flat: 1.3.1
+ array.prototype.flatmap: 1.3.1
+ debug: 3.2.7
+ doctrine: 2.1.0
+ eslint: 8.42.0
+ eslint-import-resolver-node: 0.3.7
+ eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.3)(eslint@8.42.0)
+ has: 1.0.3
+ is-core-module: 2.11.0
+ is-glob: 4.0.3
+ minimatch: 3.1.2
+ object.values: 1.1.6
+ resolve: 1.22.1
+ semver: 6.3.0
+ tsconfig-paths: 3.14.1
+ transitivePeerDependencies:
+ - eslint-import-resolver-typescript
+ - eslint-import-resolver-webpack
+ - supports-color
+ dev: true
+
+ /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.53.0)(eslint@8.42.0):
resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
engines: {node: '>=4'}
peerDependencies:
@@ -3680,15 +3747,15 @@ packages:
'@typescript-eslint/parser':
optional: true
dependencies:
- '@typescript-eslint/parser': 5.53.0(eslint@8.40.0)(typescript@4.9.5)
+ '@typescript-eslint/parser': 5.53.0(eslint@8.42.0)(typescript@4.9.5)
array-includes: 3.1.6
array.prototype.flat: 1.3.1
array.prototype.flatmap: 1.3.1
debug: 3.2.7
doctrine: 2.1.0
- eslint: 8.40.0
+ eslint: 8.42.0
eslint-import-resolver-node: 0.3.7
- eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.3)(eslint@8.40.0)
+ eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.53.0)(eslint-import-resolver-node@0.3.7)(eslint@8.42.0)
has: 1.0.3
is-core-module: 2.11.0
is-glob: 4.0.3
@@ -3703,16 +3770,16 @@ packages:
- supports-color
dev: true
- /eslint-plugin-n@15.6.1(eslint@8.40.0):
+ /eslint-plugin-n@15.6.1(eslint@8.42.0):
resolution: {integrity: sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA==}
engines: {node: '>=12.22.0'}
peerDependencies:
eslint: '>=7.0.0'
dependencies:
builtins: 5.0.1
- eslint: 8.40.0
- eslint-plugin-es: 4.1.0(eslint@8.40.0)
- eslint-utils: 3.0.0(eslint@8.40.0)
+ eslint: 8.42.0
+ eslint-plugin-es: 4.1.0(eslint@8.42.0)
+ eslint-utils: 3.0.0(eslint@8.42.0)
ignore: 5.2.4
is-core-module: 2.11.0
minimatch: 3.1.2
@@ -3720,14 +3787,14 @@ packages:
semver: 7.5.0
dev: true
- /eslint-plugin-node@11.1.0(eslint@8.40.0):
+ /eslint-plugin-node@11.1.0(eslint@8.42.0):
resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==}
engines: {node: '>=8.10.0'}
peerDependencies:
eslint: '>=5.16.0'
dependencies:
- eslint: 8.40.0
- eslint-plugin-es: 3.0.1(eslint@8.40.0)
+ eslint: 8.42.0
+ eslint-plugin-es: 3.0.1(eslint@8.42.0)
eslint-utils: 2.1.0
ignore: 5.2.4
minimatch: 3.1.2
@@ -3735,16 +3802,16 @@ packages:
semver: 6.3.0
dev: true
- /eslint-plugin-promise@6.1.1(eslint@8.40.0):
+ /eslint-plugin-promise@6.1.1(eslint@8.42.0):
resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
dependencies:
- eslint: 8.40.0
+ eslint: 8.42.0
dev: true
- /eslint-plugin-unicorn@44.0.2(eslint@8.40.0):
+ /eslint-plugin-unicorn@44.0.2(eslint@8.42.0):
resolution: {integrity: sha512-GLIDX1wmeEqpGaKcnMcqRvMVsoabeF0Ton0EX4Th5u6Kmf7RM9WBl705AXFEsns56ESkEs0uyelLuUTvz9Tr0w==}
engines: {node: '>=14.18'}
peerDependencies:
@@ -3753,8 +3820,8 @@ packages:
'@babel/helper-validator-identifier': 7.19.1
ci-info: 3.8.0
clean-regexp: 1.0.0
- eslint: 8.40.0
- eslint-utils: 3.0.0(eslint@8.40.0)
+ eslint: 8.42.0
+ eslint-utils: 3.0.0(eslint@8.42.0)
esquery: 1.4.2
indent-string: 4.0.0
is-builtin-module: 3.2.1
@@ -3767,19 +3834,19 @@ packages:
strip-indent: 3.0.0
dev: true
- /eslint-plugin-vue@9.9.0(eslint@8.40.0):
+ /eslint-plugin-vue@9.9.0(eslint@8.42.0):
resolution: {integrity: sha512-YbubS7eK0J7DCf0U2LxvVP7LMfs6rC6UltihIgval3azO3gyDwEGVgsCMe1TmDiEkl6GdMKfRpaME6QxIYtzDQ==}
engines: {node: ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.2.0 || ^7.0.0 || ^8.0.0
dependencies:
- eslint: 8.40.0
- eslint-utils: 3.0.0(eslint@8.40.0)
+ eslint: 8.42.0
+ eslint-utils: 3.0.0(eslint@8.42.0)
natural-compare: 1.4.0
nth-check: 2.1.1
postcss-selector-parser: 6.0.11
semver: 7.5.0
- vue-eslint-parser: 9.1.0(eslint@8.40.0)
+ vue-eslint-parser: 9.1.0(eslint@8.42.0)
xml-name-validator: 4.0.0
transitivePeerDependencies:
- supports-color
@@ -3808,13 +3875,13 @@ packages:
eslint-visitor-keys: 1.3.0
dev: true
- /eslint-utils@3.0.0(eslint@8.40.0):
+ /eslint-utils@3.0.0(eslint@8.42.0):
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
peerDependencies:
eslint: '>=5'
dependencies:
- eslint: 8.40.0
+ eslint: 8.42.0
eslint-visitor-keys: 2.1.0
dev: true
@@ -3833,16 +3900,16 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
- /eslint@8.40.0:
- resolution: {integrity: sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==}
+ /eslint@8.42.0:
+ resolution: {integrity: sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
hasBin: true
dependencies:
- '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0)
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.42.0)
'@eslint-community/regexpp': 4.5.0
'@eslint/eslintrc': 2.0.3
- '@eslint/js': 8.40.0
- '@humanwhocodes/config-array': 0.11.8
+ '@eslint/js': 8.42.0
+ '@humanwhocodes/config-array': 0.11.10
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
ajv: 6.12.6
@@ -3861,13 +3928,12 @@ packages:
find-up: 5.0.0
glob-parent: 6.0.2
globals: 13.20.0
- grapheme-splitter: 1.0.4
+ graphemer: 1.4.0
ignore: 5.2.4
import-fresh: 3.3.0
imurmurhash: 0.1.4
is-glob: 4.0.3
is-path-inside: 3.0.3
- js-sdsl: 4.3.0
js-yaml: 4.1.0
json-stable-stringify-without-jsonify: 1.0.1
levn: 0.4.1
@@ -4008,9 +4074,9 @@ packages:
resolution: {integrity: sha512-MAU9ci3XdpqOX1aoIoyL2DMzW97P8LYeJxIUkfXhOfsrkH4KLHFaYDwKN0B2l6tqedVJWiTIJtWmxmZfa05vOQ==}
dependencies:
enhanced-resolve: 5.12.0
- mlly: 1.2.0
+ mlly: 1.3.0
pathe: 1.1.0
- ufo: 1.1.1
+ ufo: 1.1.2
dev: true
/fast-deep-equal@3.1.3:
@@ -4442,6 +4508,10 @@ packages:
resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==}
dev: true
+ /graphemer@1.4.0:
+ resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
+ dev: true
+
/gzip-size@7.0.0:
resolution: {integrity: sha512-O1Ld7Dr+nqPnmGpdhzLmMTQ4vAsD+rHwMm1NLUmoUFFymBOMKxCCrtDxqdBRYXdeEPEi3SyoR4TizJLQrnKBNA==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -5021,10 +5091,6 @@ packages:
'@sideway/pinpoint': 2.0.0
dev: true
- /js-sdsl@4.3.0:
- resolution: {integrity: sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==}
- dev: true
-
/js-tokens@4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
@@ -5143,7 +5209,7 @@ packages:
http-shutdown: 1.2.2
ip-regex: 5.0.0
node-forge: 1.3.1
- ufo: 1.1.1
+ ufo: 1.1.2
dev: true
/local-pkg@0.4.3:
@@ -5564,7 +5630,7 @@ packages:
fs-extra: 11.1.1
globby: 13.1.4
jiti: 1.18.2
- mlly: 1.2.0
+ mlly: 1.3.0
mri: 1.2.0
pathe: 1.1.0
typescript: 5.0.4
@@ -5586,6 +5652,15 @@ packages:
pkg-types: 1.0.2
ufo: 1.1.1
+ /mlly@1.3.0:
+ resolution: {integrity: sha512-HT5mcgIQKkOrZecOjOX3DJorTikWXwsBfpcr/MGBkhfWcjiqvnaL/9ppxvIUXfjT6xt4DVIAsN9fMUz1ev4bIw==}
+ dependencies:
+ acorn: 8.8.2
+ pathe: 1.1.0
+ pkg-types: 1.0.3
+ ufo: 1.1.2
+ dev: true
+
/mri@1.2.0:
resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
engines: {node: '>=4'}
@@ -5926,7 +6001,15 @@ packages:
fsevents: 2.3.2
dev: true
- /nuxt@3.2.2(@types/node@18.14.1)(eslint@8.40.0)(rollup@3.21.0)(typescript@4.9.5):
+ /nuxi@3.5.3:
+ resolution: {integrity: sha512-H0/Nj0ulUN8PrSvr6H433Awt4hNT5uaN57041QfknYVXlUce7yEbl/NcpNtnneAHYn2hMUZL9/nJCVkZ1xTvHA==}
+ engines: {node: ^14.18.0 || >=16.10.0}
+ hasBin: true
+ optionalDependencies:
+ fsevents: 2.3.2
+ dev: true
+
+ /nuxt@3.2.2(@types/node@18.14.1)(eslint@8.42.0)(rollup@3.21.0)(typescript@4.9.5):
resolution: {integrity: sha512-fxO8zjNwWBd6ORvuOgVFXksd0+eliWSNQwACsCwqNRFXsjFawONfvqtdTd/pBOlRDZMJpPUTvdflsyHPaAsfJg==}
engines: {node: ^14.18.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0}
hasBin: true
@@ -5936,7 +6019,7 @@ packages:
'@nuxt/schema': 3.2.2(rollup@3.21.0)
'@nuxt/telemetry': 2.1.10(rollup@3.21.0)
'@nuxt/ui-templates': 1.1.1
- '@nuxt/vite-builder': 3.2.2(@types/node@18.14.1)(eslint@8.40.0)(typescript@4.9.5)(vue@3.2.47)
+ '@nuxt/vite-builder': 3.2.2(@types/node@18.14.1)(eslint@8.42.0)(typescript@4.9.5)(vue@3.2.47)
'@unhead/ssr': 1.0.22
'@vue/reactivity': 3.2.47
'@vue/shared': 3.2.47
@@ -6302,6 +6385,14 @@ packages:
mlly: 1.2.0
pathe: 1.1.0
+ /pkg-types@1.0.3:
+ resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==}
+ dependencies:
+ jsonc-parser: 3.2.0
+ mlly: 1.3.0
+ pathe: 1.1.0
+ dev: true
+
/pluralize@8.0.0:
resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
engines: {node: '>=4'}
@@ -7595,6 +7686,10 @@ packages:
/ufo@1.1.1:
resolution: {integrity: sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==}
+ /ufo@1.1.2:
+ resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==}
+ dev: true
+
/unbox-primitive@1.0.2:
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
dependencies:
@@ -7623,7 +7718,7 @@ packages:
jiti: 1.18.2
magic-string: 0.30.0
mkdist: 1.2.0(typescript@5.0.4)
- mlly: 1.2.0
+ mlly: 1.3.0
mri: 1.2.0
pathe: 1.1.0
pkg-types: 1.0.2
@@ -7794,7 +7889,7 @@ packages:
mri: 1.2.0
node-fetch-native: 1.0.2
ofetch: 1.0.1
- ufo: 1.1.1
+ ufo: 1.1.2
ws: 8.12.1
optionalDependencies:
'@planetscale/database': 1.5.0
@@ -7879,7 +7974,7 @@ packages:
dependencies:
cac: 6.7.14
debug: 4.3.4
- mlly: 1.2.0
+ mlly: 1.3.0
pathe: 1.1.0
picocolors: 1.0.0
source-map: 0.6.1
@@ -7895,7 +7990,7 @@ packages:
- terser
dev: true
- /vite-plugin-checker@0.5.6(eslint@8.40.0)(typescript@4.9.5)(vite@4.1.4):
+ /vite-plugin-checker@0.5.6(eslint@8.42.0)(typescript@4.9.5)(vite@4.1.4):
resolution: {integrity: sha512-ftRyON0gORUHDxcDt2BErmsikKSkfvl1i2DoP6Jt2zDO9InfvM6tqO1RkXhSjkaXEhKPea6YOnhFaZxW3BzudQ==}
engines: {node: '>=14.16'}
peerDependencies:
@@ -7931,7 +8026,7 @@ packages:
chalk: 4.1.2
chokidar: 3.5.3
commander: 8.3.0
- eslint: 8.40.0
+ eslint: 8.42.0
fast-glob: 3.2.12
fs-extra: 11.1.1
lodash.debounce: 4.0.8
@@ -8068,14 +8163,14 @@ packages:
resolution: {integrity: sha512-RutnB7X8c5hjq39NceArgXg28WZtZpGc3+J16ljMiYnFhKvd8hITxSWQSQ5bvldxMDU6gG5mkxl1MTQLXckVSQ==}
dev: true
- /vue-eslint-parser@9.1.0(eslint@8.40.0):
+ /vue-eslint-parser@9.1.0(eslint@8.42.0):
resolution: {integrity: sha512-NGn/iQy8/Wb7RrRa4aRkokyCZfOUWk19OP5HP6JEozQFX5AoS/t+Z0ZN7FY4LlmWc4FNI922V7cvX28zctN8dQ==}
engines: {node: ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '>=6.0.0'
dependencies:
debug: 4.3.4
- eslint: 8.40.0
+ eslint: 8.42.0
eslint-scope: 7.2.0
eslint-visitor-keys: 3.4.1
espree: 9.5.2
diff --git a/src/runtime/composables/useDirectus.ts b/src/runtime/composables/useDirectus.ts
index 2c5332e1..239f0b49 100644
--- a/src/runtime/composables/useDirectus.ts
+++ b/src/runtime/composables/useDirectus.ts
@@ -1,12 +1,14 @@
+/* eslint-disable no-console */
import type { NitroFetchOptions } from 'nitropack'
import { useRuntimeConfig, createError } from '#app'
+import { joinURL } from 'ufo'
import { useDirectusUrl } from './useDirectusUrl'
import { useDirectusToken } from './useDirectusToken'
export const useDirectus = () => {
const baseURL = useDirectusUrl()
const config = useRuntimeConfig()
- const { token, token_expired, refreshToken, refreshTokens, checkAutoRefresh } = useDirectusToken()
+ const { token, token_expired, checkAutoRefresh } = useDirectusToken()
return async (
url: string,
@@ -24,8 +26,7 @@ export const useDirectus = () => {
}
try {
- return await $fetch(url, {
- baseURL,
+ return await $fetch(joinURL(baseURL, url), {
...fetchOptions,
headers: {
...headers,
diff --git a/src/runtime/composables/useDirectusAuth.ts b/src/runtime/composables/useDirectusAuth.ts
index 857d4cd5..9d7f454a 100644
--- a/src/runtime/composables/useDirectusAuth.ts
+++ b/src/runtime/composables/useDirectusAuth.ts
@@ -1,5 +1,5 @@
import type { Ref } from 'vue'
-import { useRuntimeConfig } from '#app'
+import { useRuntimeConfig, useRoute } from '#app'
import type {
DirectusAuthResponse,
DirectusAuthCredentials,
@@ -11,13 +11,14 @@ import type {
import { useDirectus } from './useDirectus'
import { useDirectusUser } from './useDirectusUser'
import { useDirectusToken } from './useDirectusToken'
+import { useDirectusUrl } from './useDirectusUrl'
export const useDirectusAuth = () => {
const config = useRuntimeConfig()
const directus = useDirectus()
const baseUrl = useDirectusUrl()
const user = useDirectusUser()
- const route = useRoute();
+ const route = useRoute()
const { token, refreshToken, expires } = useDirectusToken()
const setAuthCookies = (_token: string, _refreshToken: string, _expires: number) => {
@@ -78,14 +79,18 @@ export const useDirectusAuth = () => {
})
if (!response.data.access_token) { throw new Error('Login failed, please check your credentials.') }
- setAuthCookies(response.data.access_token, response.data.refresh_token, response.data.expires)
+
+ // Calculate new expires date, bug fix https://github.com/Intevel/nuxt-directus/issues/157
+ const newExpires = (response.data.expires ?? 0) + new Date().getTime();
+
+ setAuthCookies(response.data.access_token, response.data.refresh_token, newExpires)
const user = await fetchUser()
return {
user: user.value,
access_token: response.data.access_token,
- expires: response.data.expires,
+ expires: newExpires,
refresh_token: response.data.refresh_token
}
}
@@ -95,7 +100,7 @@ export const useDirectusAuth = () => {
redirectOnLogin?: string
) => {
removeTokens()
- const redirect = `${window.location.origin}${redirectOnLogin ?? route.fullPath}`;
+ const redirect = `${window.location.origin}${redirectOnLogin ?? route.fullPath}`
await navigateTo(`${baseUrl}/auth/login/${provider}?redirect=${encodeURIComponent(redirect)}`, { external: true })
}
@@ -138,7 +143,6 @@ export const useDirectusAuth = () => {
}
const logout = async (): Promise => {
-
await $fetch('/auth/logout', {
baseURL: baseUrl,
body: { refresh_token: refreshToken.value },