@wpnuxt/core 1.0.0-edge.9 → 2.0.0-alpha.1
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/client-options.d.mts +1 -0
- package/dist/client-options.d.ts +1 -0
- package/dist/client-options.mjs +1 -0
- package/dist/module.d.mts +72 -82
- package/dist/module.d.ts +72 -82
- package/dist/module.json +4 -5
- package/dist/module.mjs +431 -274
- package/dist/runtime/app/graphqlMiddleware.clientOptions.d.ts +0 -0
- package/dist/runtime/app/graphqlMiddleware.clientOptions.js +12 -0
- package/dist/runtime/components/WPNuxtLogo.d.vue.ts +0 -0
- package/dist/runtime/components/WPNuxtLogo.vue +7 -7
- package/dist/runtime/components/WPNuxtLogo.vue.d.ts +0 -0
- package/dist/runtime/composables/useWPContent.d.ts +0 -5
- package/dist/runtime/composables/useWPContent.js +30 -16
- package/dist/runtime/plugins/graphqlConfig.d.ts +0 -0
- package/dist/runtime/plugins/graphqlConfig.js +17 -0
- package/dist/runtime/plugins/graphqlErrors.d.ts +0 -0
- package/dist/runtime/plugins/graphqlErrors.js +9 -0
- package/dist/runtime/queries/GeneralSettings.gql +0 -2
- package/dist/runtime/queries/Menu.gql +0 -2
- package/dist/runtime/queries/Node.gql +0 -3
- package/dist/runtime/queries/Pages.gql +0 -2
- package/dist/runtime/queries/Posts.gql +15 -2
- package/dist/runtime/queries/fragments/GeneralSettings.fragment.gql +1 -1
- package/dist/runtime/queries/fragments/NodeWithFeaturedImage.fragment.gql +0 -2
- package/dist/runtime/queries/fragments/NodeWithFeaturedImageToMediaItemConnectionEdge.fragment.gql +0 -2
- package/dist/runtime/queries/fragments/Page.fragment.gql +0 -4
- package/dist/runtime/queries/fragments/Post.fragment.gql +8 -5
- package/dist/runtime/server/graphqlMiddleware.serverOptions.d.ts +0 -0
- package/dist/runtime/server/graphqlMiddleware.serverOptions.js +18 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/util/images.d.ts +0 -2
- package/dist/runtime/util/images.js +11 -3
- package/dist/server-options.d.mts +2 -0
- package/dist/server-options.d.ts +2 -0
- package/dist/server-options.mjs +1 -0
- package/dist/types.d.mts +2 -2
- package/package.json +50 -79
- package/README.md +0 -80
- package/dist/module.cjs +0 -5
- package/dist/runtime/app/graphqlMiddleware.serverOptions.d.ts +0 -2
- package/dist/runtime/app/graphqlMiddleware.serverOptions.js +0 -11
- package/dist/runtime/components/StagingBanner.vue +0 -107
- package/dist/runtime/components/WordPressLogo.vue +0 -15
- package/dist/runtime/composables/index.d.ts +0 -3
- package/dist/runtime/composables/index.js +0 -3
- package/dist/runtime/composables/isStaging.d.ts +0 -1
- package/dist/runtime/composables/isStaging.js +0 -6
- package/dist/runtime/composables/useFeaturedImage.d.ts +0 -2
- package/dist/runtime/composables/useFeaturedImage.js +0 -7
- package/dist/runtime/composables/usePrevNextPost.d.ts +0 -4
- package/dist/runtime/composables/usePrevNextPost.js +0 -25
- package/dist/runtime/composables/useWPUri.d.ts +0 -8
- package/dist/runtime/composables/useWPUri.js +0 -23
- package/dist/runtime/plugins/vue-sanitize-directive.d.ts +0 -2
- package/dist/runtime/plugins/vue-sanitize-directive.js +0 -5
- package/dist/runtime/server/api/purgeCache.get.d.ts +0 -5
- package/dist/runtime/server/api/purgeCache.get.js +0 -9
- package/dist/runtime/server/api/wpContent.post.d.ts +0 -9
- package/dist/runtime/server/api/wpContent.post.js +0 -50
- package/dist/runtime/server/index.d.ts +0 -1
- package/dist/runtime/server/index.js +0 -8
- package/dist/runtime/server/storage.d.ts +0 -3
- package/dist/runtime/server/storage.js +0 -11
- package/dist/runtime/util/logger.d.ts +0 -3
- package/dist/runtime/util/logger.js +0 -25
- package/dist/types.d.ts +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { defineGraphqlClientOptions } from 'nuxt-graphql-middleware/client-options';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { defineGraphqlClientOptions } from 'nuxt-graphql-middleware/client-options';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { defineGraphqlClientOptions } from 'nuxt-graphql-middleware/client-options';
|
package/dist/module.d.mts
CHANGED
|
@@ -1,89 +1,79 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
3
|
interface WPNuxtConfig {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
4
|
+
/**
|
|
5
|
+
* URL of the WordPress site
|
|
6
|
+
*
|
|
7
|
+
* There is no default value for this option, so it's required.
|
|
8
|
+
*
|
|
9
|
+
* @example 'https://wordpress.wpnuxt.com'
|
|
10
|
+
*/
|
|
11
|
+
wordpressUrl: string;
|
|
12
|
+
/**
|
|
13
|
+
* The endpoint to use for the GraphQL API.
|
|
14
|
+
*
|
|
15
|
+
* (will be appended to the wordpressUrl)
|
|
16
|
+
*
|
|
17
|
+
* @default '/graphql'
|
|
18
|
+
*/
|
|
19
|
+
graphqlEndpoint: string;
|
|
20
|
+
queries: {
|
|
21
|
+
/**
|
|
22
|
+
* Path to the folder containing the queries to extend the default WPNuxt queries
|
|
23
|
+
*
|
|
24
|
+
* @default '~/extend/queries/'
|
|
25
|
+
*/
|
|
26
|
+
extendFolder: string;
|
|
27
|
+
/**
|
|
28
|
+
* Path to the folder containing the merged queries
|
|
29
|
+
*
|
|
30
|
+
* @default '.queries/'
|
|
31
|
+
*/
|
|
32
|
+
mergedOutputFolder: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Whether to download the schema from the WordPress site and save it to disk
|
|
36
|
+
* If downloadSchema is false, the file must be present at './schema.graphql' in order to generate types.
|
|
37
|
+
*
|
|
38
|
+
* https://nuxt-graphql-middleware.dulnan.net/configuration/module.html#downloadschema-boolean
|
|
39
|
+
*
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
downloadSchema: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to enable debug mode
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
debug: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Server-side caching configuration
|
|
51
|
+
*
|
|
52
|
+
* Uses Nitro's built-in caching with stale-while-revalidate support
|
|
53
|
+
*/
|
|
54
|
+
cache?: {
|
|
55
|
+
/**
|
|
56
|
+
* Enable server-side caching
|
|
57
|
+
*
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
60
|
+
enabled?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Cache duration in seconds
|
|
63
|
+
*
|
|
64
|
+
* @default 300 (5 minutes)
|
|
65
|
+
*/
|
|
66
|
+
maxAge?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Enable stale-while-revalidate
|
|
69
|
+
* Serves stale content while refreshing in background
|
|
70
|
+
*
|
|
71
|
+
* @default true
|
|
72
|
+
*/
|
|
73
|
+
swr?: boolean;
|
|
74
|
+
};
|
|
43
75
|
}
|
|
44
76
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Folder for user defined queries
|
|
49
|
-
*
|
|
50
|
-
* relative to the src dir of your nuxt app
|
|
51
|
-
*
|
|
52
|
-
* @default extend/queries
|
|
53
|
-
*/
|
|
54
|
-
extendDir?: string
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The predefined queries & the user defined queries will be merged and placed in the queries output folder
|
|
58
|
-
*
|
|
59
|
-
* relative to the src dir of your nuxt app
|
|
60
|
-
*
|
|
61
|
-
* @default queries
|
|
62
|
-
*/
|
|
63
|
-
outputDir?: string
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare const _default: _nuxt_schema.NuxtModule<WPNuxtConfig>;
|
|
67
|
-
|
|
68
|
-
declare module '@nuxt/schema' {
|
|
69
|
-
interface RuntimeConfig {
|
|
70
|
-
wpNuxt: {
|
|
71
|
-
faustSecretKey: string;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
interface PublicRuntimeConfig {
|
|
75
|
-
wpNuxt: WPNuxtConfig;
|
|
76
|
-
}
|
|
77
|
-
interface ConfigSchema {
|
|
78
|
-
wpNuxt: {
|
|
79
|
-
faustSecretKey: string;
|
|
80
|
-
};
|
|
81
|
-
runtimeConfig: {
|
|
82
|
-
public?: {
|
|
83
|
-
wpNuxt: WPNuxtConfig;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
77
|
+
declare const _default: _nuxt_schema.NuxtModule<WPNuxtConfig, WPNuxtConfig, false>;
|
|
88
78
|
|
|
89
79
|
export { _default as default };
|
package/dist/module.d.ts
CHANGED
|
@@ -1,89 +1,79 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
3
|
interface WPNuxtConfig {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
4
|
+
/**
|
|
5
|
+
* URL of the WordPress site
|
|
6
|
+
*
|
|
7
|
+
* There is no default value for this option, so it's required.
|
|
8
|
+
*
|
|
9
|
+
* @example 'https://wordpress.wpnuxt.com'
|
|
10
|
+
*/
|
|
11
|
+
wordpressUrl: string;
|
|
12
|
+
/**
|
|
13
|
+
* The endpoint to use for the GraphQL API.
|
|
14
|
+
*
|
|
15
|
+
* (will be appended to the wordpressUrl)
|
|
16
|
+
*
|
|
17
|
+
* @default '/graphql'
|
|
18
|
+
*/
|
|
19
|
+
graphqlEndpoint: string;
|
|
20
|
+
queries: {
|
|
21
|
+
/**
|
|
22
|
+
* Path to the folder containing the queries to extend the default WPNuxt queries
|
|
23
|
+
*
|
|
24
|
+
* @default '~/extend/queries/'
|
|
25
|
+
*/
|
|
26
|
+
extendFolder: string;
|
|
27
|
+
/**
|
|
28
|
+
* Path to the folder containing the merged queries
|
|
29
|
+
*
|
|
30
|
+
* @default '.queries/'
|
|
31
|
+
*/
|
|
32
|
+
mergedOutputFolder: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Whether to download the schema from the WordPress site and save it to disk
|
|
36
|
+
* If downloadSchema is false, the file must be present at './schema.graphql' in order to generate types.
|
|
37
|
+
*
|
|
38
|
+
* https://nuxt-graphql-middleware.dulnan.net/configuration/module.html#downloadschema-boolean
|
|
39
|
+
*
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
downloadSchema: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to enable debug mode
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
debug: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Server-side caching configuration
|
|
51
|
+
*
|
|
52
|
+
* Uses Nitro's built-in caching with stale-while-revalidate support
|
|
53
|
+
*/
|
|
54
|
+
cache?: {
|
|
55
|
+
/**
|
|
56
|
+
* Enable server-side caching
|
|
57
|
+
*
|
|
58
|
+
* @default true
|
|
59
|
+
*/
|
|
60
|
+
enabled?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Cache duration in seconds
|
|
63
|
+
*
|
|
64
|
+
* @default 300 (5 minutes)
|
|
65
|
+
*/
|
|
66
|
+
maxAge?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Enable stale-while-revalidate
|
|
69
|
+
* Serves stale content while refreshing in background
|
|
70
|
+
*
|
|
71
|
+
* @default true
|
|
72
|
+
*/
|
|
73
|
+
swr?: boolean;
|
|
74
|
+
};
|
|
43
75
|
}
|
|
44
76
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Folder for user defined queries
|
|
49
|
-
*
|
|
50
|
-
* relative to the src dir of your nuxt app
|
|
51
|
-
*
|
|
52
|
-
* @default extend/queries
|
|
53
|
-
*/
|
|
54
|
-
extendDir?: string
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The predefined queries & the user defined queries will be merged and placed in the queries output folder
|
|
58
|
-
*
|
|
59
|
-
* relative to the src dir of your nuxt app
|
|
60
|
-
*
|
|
61
|
-
* @default queries
|
|
62
|
-
*/
|
|
63
|
-
outputDir?: string
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare const _default: _nuxt_schema.NuxtModule<WPNuxtConfig>;
|
|
67
|
-
|
|
68
|
-
declare module '@nuxt/schema' {
|
|
69
|
-
interface RuntimeConfig {
|
|
70
|
-
wpNuxt: {
|
|
71
|
-
faustSecretKey: string;
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
interface PublicRuntimeConfig {
|
|
75
|
-
wpNuxt: WPNuxtConfig;
|
|
76
|
-
}
|
|
77
|
-
interface ConfigSchema {
|
|
78
|
-
wpNuxt: {
|
|
79
|
-
faustSecretKey: string;
|
|
80
|
-
};
|
|
81
|
-
runtimeConfig: {
|
|
82
|
-
public?: {
|
|
83
|
-
wpNuxt: WPNuxtConfig;
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
77
|
+
declare const _default: _nuxt_schema.NuxtModule<WPNuxtConfig, WPNuxtConfig, false>;
|
|
88
78
|
|
|
89
79
|
export { _default as default };
|
package/dist/module.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"version": "1.0.0-edge.9",
|
|
2
|
+
"name": "wpnuxt",
|
|
4
3
|
"configKey": "wpNuxt",
|
|
5
|
-
"
|
|
4
|
+
"version": "2.0.0-alpha.0",
|
|
6
5
|
"builder": {
|
|
7
|
-
"@nuxt/module-builder": "0.
|
|
8
|
-
"unbuild": "
|
|
6
|
+
"@nuxt/module-builder": "1.0.2",
|
|
7
|
+
"unbuild": "3.6.1"
|
|
9
8
|
}
|
|
10
9
|
}
|