@wpnuxt/core 2.0.0-alpha.1 → 2.0.0-alpha.11
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/LICENSE +9 -0
- package/dist/module.d.mts +40 -0
- package/dist/module.d.ts +40 -0
- package/dist/module.json +5 -2
- package/dist/module.mjs +754 -63
- package/dist/runtime/components/WPContent.d.vue.ts +0 -0
- package/dist/runtime/components/WPContent.vue +60 -0
- package/dist/runtime/components/WPContent.vue.d.ts +0 -0
- package/dist/runtime/composables/usePrevNextPost.d.ts +0 -0
- package/dist/runtime/composables/usePrevNextPost.js +22 -0
- package/dist/runtime/composables/useWPContent.js +122 -30
- package/dist/runtime/plugins/graphqlConfig.js +2 -3
- package/dist/runtime/plugins/graphqlErrors.js +1 -1
- package/dist/runtime/queries/Pages.gql +2 -2
- package/dist/runtime/queries/Posts.gql +2 -2
- package/dist/runtime/queries/Viewer.gql +4 -4
- package/dist/runtime/queries/fragments/GeneralSettings.fragment.gql +0 -1
- package/dist/runtime/types/errors.d.ts +0 -0
- package/dist/runtime/types/errors.js +32 -0
- package/dist/runtime/types/stub.d.ts +51 -0
- package/dist/runtime/util/content.d.ts +0 -0
- package/dist/runtime/util/content.js +41 -0
- package/dist/runtime/util/links.d.ts +0 -0
- package/dist/runtime/util/links.js +40 -0
- package/package.json +13 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-present - WPNuxt Team
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/module.d.mts
CHANGED
|
@@ -30,6 +30,11 @@ interface WPNuxtConfig {
|
|
|
30
30
|
* @default '.queries/'
|
|
31
31
|
*/
|
|
32
32
|
mergedOutputFolder: string;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to warn when a user query file overrides a default query file
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
warnOnOverride?: boolean;
|
|
33
38
|
};
|
|
34
39
|
/**
|
|
35
40
|
* Whether to download the schema from the WordPress site and save it to disk
|
|
@@ -40,6 +45,41 @@ interface WPNuxtConfig {
|
|
|
40
45
|
* @default true
|
|
41
46
|
*/
|
|
42
47
|
downloadSchema: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Bearer token for authenticated schema introspection at build time.
|
|
50
|
+
*
|
|
51
|
+
* Required when your WordPress GraphQL endpoint has public introspection disabled.
|
|
52
|
+
* The token is sent as an `Authorization: Bearer <token>` header during:
|
|
53
|
+
* - Endpoint validation (introspection query)
|
|
54
|
+
* - Schema download (get-graphql-schema)
|
|
55
|
+
*
|
|
56
|
+
* Can also be set via `WPNUXT_SCHEMA_AUTH_TOKEN` environment variable.
|
|
57
|
+
*
|
|
58
|
+
* This token is only used at build time and is NOT included in client bundles.
|
|
59
|
+
*/
|
|
60
|
+
schemaAuthToken?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Whether to replace internal WordPress links with client-side navigation (NuxtLink).
|
|
63
|
+
*
|
|
64
|
+
* When enabled, clicks on `<a>` tags pointing to the WordPress domain inside
|
|
65
|
+
* `<WPContent>` are intercepted and handled via `navigateTo()`.
|
|
66
|
+
*
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
replaceLinks?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Whether to convert featured image `sourceUrl` values to relative paths.
|
|
72
|
+
*
|
|
73
|
+
* When enabled, a `relativePath` property is added to `featuredImage.node`
|
|
74
|
+
* by stripping the WordPress domain from `sourceUrl`.
|
|
75
|
+
*
|
|
76
|
+
* Set to `true` when using relative image paths with Nuxt Image or a proxy.
|
|
77
|
+
* Leave `false` (default) for SSG or external image providers (Vercel, Cloudflare)
|
|
78
|
+
* that need full URLs.
|
|
79
|
+
*
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
imageRelativePaths?: boolean;
|
|
43
83
|
/**
|
|
44
84
|
* Whether to enable debug mode
|
|
45
85
|
*
|
package/dist/module.d.ts
CHANGED
|
@@ -30,6 +30,11 @@ interface WPNuxtConfig {
|
|
|
30
30
|
* @default '.queries/'
|
|
31
31
|
*/
|
|
32
32
|
mergedOutputFolder: string;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to warn when a user query file overrides a default query file
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
warnOnOverride?: boolean;
|
|
33
38
|
};
|
|
34
39
|
/**
|
|
35
40
|
* Whether to download the schema from the WordPress site and save it to disk
|
|
@@ -40,6 +45,41 @@ interface WPNuxtConfig {
|
|
|
40
45
|
* @default true
|
|
41
46
|
*/
|
|
42
47
|
downloadSchema: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Bearer token for authenticated schema introspection at build time.
|
|
50
|
+
*
|
|
51
|
+
* Required when your WordPress GraphQL endpoint has public introspection disabled.
|
|
52
|
+
* The token is sent as an `Authorization: Bearer <token>` header during:
|
|
53
|
+
* - Endpoint validation (introspection query)
|
|
54
|
+
* - Schema download (get-graphql-schema)
|
|
55
|
+
*
|
|
56
|
+
* Can also be set via `WPNUXT_SCHEMA_AUTH_TOKEN` environment variable.
|
|
57
|
+
*
|
|
58
|
+
* This token is only used at build time and is NOT included in client bundles.
|
|
59
|
+
*/
|
|
60
|
+
schemaAuthToken?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Whether to replace internal WordPress links with client-side navigation (NuxtLink).
|
|
63
|
+
*
|
|
64
|
+
* When enabled, clicks on `<a>` tags pointing to the WordPress domain inside
|
|
65
|
+
* `<WPContent>` are intercepted and handled via `navigateTo()`.
|
|
66
|
+
*
|
|
67
|
+
* @default true
|
|
68
|
+
*/
|
|
69
|
+
replaceLinks?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Whether to convert featured image `sourceUrl` values to relative paths.
|
|
72
|
+
*
|
|
73
|
+
* When enabled, a `relativePath` property is added to `featuredImage.node`
|
|
74
|
+
* by stripping the WordPress domain from `sourceUrl`.
|
|
75
|
+
*
|
|
76
|
+
* Set to `true` when using relative image paths with Nuxt Image or a proxy.
|
|
77
|
+
* Leave `false` (default) for SSG or external image providers (Vercel, Cloudflare)
|
|
78
|
+
* that need full URLs.
|
|
79
|
+
*
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
imageRelativePaths?: boolean;
|
|
43
83
|
/**
|
|
44
84
|
* Whether to enable debug mode
|
|
45
85
|
*
|
package/dist/module.json
CHANGED