@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.
Files changed (67) hide show
  1. package/dist/client-options.d.mts +1 -0
  2. package/dist/client-options.d.ts +1 -0
  3. package/dist/client-options.mjs +1 -0
  4. package/dist/module.d.mts +72 -82
  5. package/dist/module.d.ts +72 -82
  6. package/dist/module.json +4 -5
  7. package/dist/module.mjs +431 -274
  8. package/dist/runtime/app/graphqlMiddleware.clientOptions.d.ts +0 -0
  9. package/dist/runtime/app/graphqlMiddleware.clientOptions.js +12 -0
  10. package/dist/runtime/components/WPNuxtLogo.d.vue.ts +0 -0
  11. package/dist/runtime/components/WPNuxtLogo.vue +7 -7
  12. package/dist/runtime/components/WPNuxtLogo.vue.d.ts +0 -0
  13. package/dist/runtime/composables/useWPContent.d.ts +0 -5
  14. package/dist/runtime/composables/useWPContent.js +30 -16
  15. package/dist/runtime/plugins/graphqlConfig.d.ts +0 -0
  16. package/dist/runtime/plugins/graphqlConfig.js +17 -0
  17. package/dist/runtime/plugins/graphqlErrors.d.ts +0 -0
  18. package/dist/runtime/plugins/graphqlErrors.js +9 -0
  19. package/dist/runtime/queries/GeneralSettings.gql +0 -2
  20. package/dist/runtime/queries/Menu.gql +0 -2
  21. package/dist/runtime/queries/Node.gql +0 -3
  22. package/dist/runtime/queries/Pages.gql +0 -2
  23. package/dist/runtime/queries/Posts.gql +15 -2
  24. package/dist/runtime/queries/fragments/GeneralSettings.fragment.gql +1 -1
  25. package/dist/runtime/queries/fragments/NodeWithFeaturedImage.fragment.gql +0 -2
  26. package/dist/runtime/queries/fragments/NodeWithFeaturedImageToMediaItemConnectionEdge.fragment.gql +0 -2
  27. package/dist/runtime/queries/fragments/Page.fragment.gql +0 -4
  28. package/dist/runtime/queries/fragments/Post.fragment.gql +8 -5
  29. package/dist/runtime/server/graphqlMiddleware.serverOptions.d.ts +0 -0
  30. package/dist/runtime/server/graphqlMiddleware.serverOptions.js +18 -0
  31. package/dist/runtime/server/tsconfig.json +3 -0
  32. package/dist/runtime/util/images.d.ts +0 -2
  33. package/dist/runtime/util/images.js +11 -3
  34. package/dist/server-options.d.mts +2 -0
  35. package/dist/server-options.d.ts +2 -0
  36. package/dist/server-options.mjs +1 -0
  37. package/dist/types.d.mts +2 -2
  38. package/package.json +50 -79
  39. package/README.md +0 -80
  40. package/dist/module.cjs +0 -5
  41. package/dist/runtime/app/graphqlMiddleware.serverOptions.d.ts +0 -2
  42. package/dist/runtime/app/graphqlMiddleware.serverOptions.js +0 -11
  43. package/dist/runtime/components/StagingBanner.vue +0 -107
  44. package/dist/runtime/components/WordPressLogo.vue +0 -15
  45. package/dist/runtime/composables/index.d.ts +0 -3
  46. package/dist/runtime/composables/index.js +0 -3
  47. package/dist/runtime/composables/isStaging.d.ts +0 -1
  48. package/dist/runtime/composables/isStaging.js +0 -6
  49. package/dist/runtime/composables/useFeaturedImage.d.ts +0 -2
  50. package/dist/runtime/composables/useFeaturedImage.js +0 -7
  51. package/dist/runtime/composables/usePrevNextPost.d.ts +0 -4
  52. package/dist/runtime/composables/usePrevNextPost.js +0 -25
  53. package/dist/runtime/composables/useWPUri.d.ts +0 -8
  54. package/dist/runtime/composables/useWPUri.js +0 -23
  55. package/dist/runtime/plugins/vue-sanitize-directive.d.ts +0 -2
  56. package/dist/runtime/plugins/vue-sanitize-directive.js +0 -5
  57. package/dist/runtime/server/api/purgeCache.get.d.ts +0 -5
  58. package/dist/runtime/server/api/purgeCache.get.js +0 -9
  59. package/dist/runtime/server/api/wpContent.post.d.ts +0 -9
  60. package/dist/runtime/server/api/wpContent.post.js +0 -50
  61. package/dist/runtime/server/index.d.ts +0 -1
  62. package/dist/runtime/server/index.js +0 -8
  63. package/dist/runtime/server/storage.d.ts +0 -3
  64. package/dist/runtime/server/storage.js +0 -11
  65. package/dist/runtime/util/logger.d.ts +0 -3
  66. package/dist/runtime/util/logger.js +0 -25
  67. 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
- * Log level for the WPNuxt module
7
- * @default 3
8
- * @example 0 = silent, 1 = error, 2 = warn, 3 = info, 4 = debug, 5 = trace
9
- */
10
- logLevel?: number
11
- /**
12
- * URL of the WordPress site
13
- *
14
- * There is no default value for this option, so it's required.
15
- *
16
- * @example 'https://wordpress.wpnuxt.com'
17
- */
18
- wordpressUrl: string
19
- frontendUrl: string
20
-
21
- defaultMenuName?: string
22
-
23
- enableCache?: boolean
24
-
25
- staging?: boolean
26
-
27
- /**
28
- * @default 'useWP'
29
- */
30
- composablesPrefix: string
31
-
32
- queries?: WPNuxtConfigQueries
33
-
34
- /**
35
- * Download the GraphQL schema and store it on disk.
36
- *
37
- * When setting this to false, the module will expect a graphql.schema file to be available.
38
- * You could first enable this, commit the schema file and then set downloadSchema to false to avoid have to query the graphql introspection on each start of the application
39
- *
40
- * @default true
41
- */
42
- downloadSchema?: boolean
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
- interface WPNuxtConfigQueries {
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
- * Log level for the WPNuxt module
7
- * @default 3
8
- * @example 0 = silent, 1 = error, 2 = warn, 3 = info, 4 = debug, 5 = trace
9
- */
10
- logLevel?: number
11
- /**
12
- * URL of the WordPress site
13
- *
14
- * There is no default value for this option, so it's required.
15
- *
16
- * @example 'https://wordpress.wpnuxt.com'
17
- */
18
- wordpressUrl: string
19
- frontendUrl: string
20
-
21
- defaultMenuName?: string
22
-
23
- enableCache?: boolean
24
-
25
- staging?: boolean
26
-
27
- /**
28
- * @default 'useWP'
29
- */
30
- composablesPrefix: string
31
-
32
- queries?: WPNuxtConfigQueries
33
-
34
- /**
35
- * Download the GraphQL schema and store it on disk.
36
- *
37
- * When setting this to false, the module will expect a graphql.schema file to be available.
38
- * You could first enable this, commit the schema file and then set downloadSchema to false to avoid have to query the graphql introspection on each start of the application
39
- *
40
- * @default true
41
- */
42
- downloadSchema?: boolean
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
- interface WPNuxtConfigQueries {
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": "@wpnuxt/core",
3
- "version": "1.0.0-edge.9",
2
+ "name": "wpnuxt",
4
3
  "configKey": "wpNuxt",
5
- "nuxt": ">=3.1.0",
4
+ "version": "2.0.0-alpha.0",
6
5
  "builder": {
7
- "@nuxt/module-builder": "0.8.3",
8
- "unbuild": "2.0.0"
6
+ "@nuxt/module-builder": "1.0.2",
7
+ "unbuild": "3.6.1"
9
8
  }
10
9
  }