@wpnuxt/core 1.0.0-edge.26 → 1.0.0-edge.27
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/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/composables/usePrevNextPost.d.ts +1 -1
- package/dist/runtime/composables/usePrevNextPost.js +2 -1
- package/dist/runtime/queries/Posts.gql +15 -0
- package/dist/runtime/queries/fragments/Post.fragment.gql +8 -0
- package/package.json +24 -28
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OperationTypeNode } from "graphql";
|
|
2
2
|
import { useWPContent } from "./useWPContent.js";
|
|
3
|
-
const _usePrevNextPost = async (
|
|
3
|
+
const _usePrevNextPost = async (currentPostPath) => {
|
|
4
|
+
const currentPostSlug = currentPostPath.replaceAll("/", "");
|
|
4
5
|
const allPosts = await getAllPosts();
|
|
5
6
|
if (!allPosts) return { prev: null, next: null };
|
|
6
7
|
const currentIndex = allPosts.slugs.findIndex((slug) => slug === currentPostSlug);
|
|
@@ -17,3 +17,18 @@ query PostById($id: ID!, $asPreview: Boolean = false) {
|
|
|
17
17
|
...Post
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
query PostsByCategoryName($categoryName: String!, $limit: Int = 10) {
|
|
22
|
+
posts(first: $limit, where: {categoryName: $categoryName}) {
|
|
23
|
+
nodes {
|
|
24
|
+
...Post
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
query PostsByCategoryId($categoryId: Int!, $limit: Int = 10) {
|
|
29
|
+
posts(first: $limit, where: {categoryId: $categoryId}) {
|
|
30
|
+
nodes {
|
|
31
|
+
...Post
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wpnuxt/core",
|
|
3
|
-
"version": "1.0.0-edge.
|
|
3
|
+
"version": "1.0.0-edge.27",
|
|
4
4
|
"description": "WPNuxt",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,43 +52,39 @@
|
|
|
52
52
|
"start": "pnpm run wp-env:create && pnpm run dev"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@nuxt/kit": "3.
|
|
56
|
-
"@vueuse/nuxt": "^
|
|
55
|
+
"@nuxt/kit": "3.16.0",
|
|
56
|
+
"@vueuse/nuxt": "^13.0.0",
|
|
57
57
|
"defu": "^6.1.4",
|
|
58
58
|
"graphql": "^16.10.0",
|
|
59
59
|
"nuxt-graphql-middleware": "4.3.2",
|
|
60
|
-
"ohash": "^1.1.4",
|
|
61
|
-
"unstorage": "^1.14.4",
|
|
62
60
|
"vue-sanitize-directive": "^0.2.1"
|
|
63
61
|
},
|
|
64
62
|
"devDependencies": {
|
|
65
|
-
"@graphql-codegen/cli": "^5.0.
|
|
66
|
-
"@graphql-codegen/client-preset": "^4.
|
|
67
|
-
"@graphql-codegen/typescript-operations": "^4.4.
|
|
68
|
-
"@nuxt/devtools": "^
|
|
69
|
-
"@nuxt/eslint-config": "^0.
|
|
63
|
+
"@graphql-codegen/cli": "^5.0.4",
|
|
64
|
+
"@graphql-codegen/client-preset": "^4.6.2",
|
|
65
|
+
"@graphql-codegen/typescript-operations": "^4.4.1",
|
|
66
|
+
"@nuxt/devtools": "^2.0.0",
|
|
67
|
+
"@nuxt/eslint-config": "^1.0.1",
|
|
70
68
|
"@nuxt/module-builder": "^0.8.4",
|
|
71
|
-
"@nuxt/schema": "3.
|
|
72
|
-
"@nuxt/test-utils": "^3.15.
|
|
73
|
-
"@rollup/rollup-linux-arm64-gnu": "^4.
|
|
74
|
-
"@rollup/rollup-linux-arm64-musl": "^4.
|
|
75
|
-
"@types/node": "22.10
|
|
76
|
-
"@vitest/coverage-v8": "^
|
|
69
|
+
"@nuxt/schema": "3.16.0",
|
|
70
|
+
"@nuxt/test-utils": "^3.15.4",
|
|
71
|
+
"@rollup/rollup-linux-arm64-gnu": "^4.34.6",
|
|
72
|
+
"@rollup/rollup-linux-arm64-musl": "^4.34.6",
|
|
73
|
+
"@types/node": "22.13.10",
|
|
74
|
+
"@vitest/coverage-v8": "^3.0.5",
|
|
77
75
|
"@vue/test-utils": "^2.4.6",
|
|
78
|
-
"@wordpress/env": "^10.
|
|
79
|
-
"changelogen": "^0.
|
|
80
|
-
"markdownlint-cli": "^0.
|
|
81
|
-
"nuxt": "^3.
|
|
76
|
+
"@wordpress/env": "^10.17.0",
|
|
77
|
+
"changelogen": "^0.6.1",
|
|
78
|
+
"markdownlint-cli": "^0.44.0",
|
|
79
|
+
"nuxt": "^3.16.0",
|
|
82
80
|
"nuxt-content-twoslash": "^0.1.2",
|
|
83
|
-
"release-it": "^18.1.
|
|
84
|
-
"shiki": "^1.26.1",
|
|
85
|
-
"twoslash": "^0.2.12",
|
|
81
|
+
"release-it": "^18.1.2",
|
|
86
82
|
"typescript": "^5.7.3",
|
|
87
|
-
"untyped": "
|
|
88
|
-
"vite": "^6.0
|
|
89
|
-
"vitest": "^
|
|
83
|
+
"untyped": "2.0.0",
|
|
84
|
+
"vite": "^6.1.0",
|
|
85
|
+
"vitest": "^3.0.5",
|
|
90
86
|
"vue-docgen-web-types": "^0.1.8",
|
|
91
|
-
"vue-tsc": "2.2.
|
|
87
|
+
"vue-tsc": "2.2.8"
|
|
92
88
|
},
|
|
93
89
|
"peerDependencies": {
|
|
94
90
|
"consola": "^3.3.3",
|
|
@@ -98,6 +94,6 @@
|
|
|
98
94
|
"scule": "^1.3.0"
|
|
99
95
|
},
|
|
100
96
|
"engines": {
|
|
101
|
-
"node": ">=
|
|
97
|
+
"node": ">=20"
|
|
102
98
|
}
|
|
103
99
|
}
|