@studio-fes/layer-strapi 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @studio-fes/layer-strapi
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- upgrade packages, fix getRelativeUrl and removed slugify, update multiCache.serverOptions filename and fixed i18n stuff on useStrapiPage
|
|
8
|
+
|
|
9
|
+
## 0.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- moved dependencies packages from devDependencies
|
|
14
|
+
|
|
3
15
|
## 0.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -2,7 +2,7 @@ export async function useStrapiPage<T>(queryName: never, variables?: Record<stri
|
|
|
2
2
|
const nuxtApp = useNuxtApp()
|
|
3
3
|
|
|
4
4
|
// @ts-expect-error i18n is not used yet
|
|
5
|
-
const locale = '$i18n' in nuxtApp ?
|
|
5
|
+
const locale = '$i18n' in nuxtApp ? nuxtApp.$i18n?.locale?.value : undefined
|
|
6
6
|
|
|
7
7
|
// @ts-expect-error queryName is not used yet
|
|
8
8
|
const response = await useAsyncGraphqlQuery(queryName, {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { StrapiFileFragment } from '~/types/graphql-operations'
|
|
2
|
+
|
|
3
|
+
export function mediaIsImage(media: StrapiFileFragment | null | undefined): boolean {
|
|
4
|
+
if (!media)
|
|
5
|
+
return false
|
|
6
|
+
|
|
7
|
+
const imageMimeTypes = ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/avif', 'image/svg+xml', 'image/tiff', 'image/bmp', 'image/x-icon']
|
|
8
|
+
return imageMimeTypes.includes(media.mime)
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studio-fes/layer-strapi",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "nuxi dev",
|
|
@@ -13,14 +13,16 @@
|
|
|
13
13
|
"lint": "eslint .",
|
|
14
14
|
"lint:fix": "eslint . --fix"
|
|
15
15
|
},
|
|
16
|
-
"
|
|
16
|
+
"dependencies": {
|
|
17
17
|
"@nuxt/eslint": "latest",
|
|
18
|
+
"nuxt-graphql-middleware": "^5.3.2",
|
|
19
|
+
"nuxt-multi-cache": "^4.0.3"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
18
22
|
"@studio-fes/layer-base": "workspace:*",
|
|
19
|
-
"@types/node": "^
|
|
23
|
+
"@types/node": "^25.1.0",
|
|
20
24
|
"eslint": "^9.39.2",
|
|
21
|
-
"nuxt": "^4.
|
|
22
|
-
"nuxt-graphql-middleware": "^5.3.2",
|
|
23
|
-
"nuxt-multi-cache": "^4.0.3",
|
|
25
|
+
"nuxt": "^4.3.0",
|
|
24
26
|
"typescript": "^5.9.3",
|
|
25
27
|
"vue": "latest"
|
|
26
28
|
},
|
|
File without changes
|