@wpnuxt/core 1.0.0-edge.6 → 1.0.0-edge.7
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/README.md +8 -0
- package/dist/module.d.mts +0 -5
- package/dist/module.d.ts +0 -5
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -6
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -30,6 +30,14 @@ Install the module to your Nuxt application with one command:
|
|
|
30
30
|
npx nuxi module add @wpnuxt/core
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
And connect WPNuxt to your wordpress installation in your nuxt.config.ts:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
wpNuxt: {
|
|
37
|
+
wordpressUrl: 'https://yourwordpress.domain.com'
|
|
38
|
+
},
|
|
39
|
+
```
|
|
40
|
+
|
|
33
41
|
That's it! You can now use the WPNuxt module in your Nuxt app ✨
|
|
34
42
|
|
|
35
43
|
## Development
|
package/dist/module.d.mts
CHANGED
|
@@ -18,7 +18,6 @@ interface WPNuxtConfig {
|
|
|
18
18
|
wordpressUrl: string
|
|
19
19
|
frontendUrl: string
|
|
20
20
|
|
|
21
|
-
faustSecretKey?: string
|
|
22
21
|
defaultMenuName?: string
|
|
23
22
|
|
|
24
23
|
enableCache?: boolean
|
|
@@ -44,10 +43,6 @@ interface WPNuxtConfig {
|
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
interface WPNuxtConfigQueries {
|
|
47
|
-
/**
|
|
48
|
-
* @default true
|
|
49
|
-
*/
|
|
50
|
-
usePredefinedQueries?: boolean
|
|
51
46
|
|
|
52
47
|
/**
|
|
53
48
|
* Folder for user defined queries
|
package/dist/module.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ interface WPNuxtConfig {
|
|
|
18
18
|
wordpressUrl: string
|
|
19
19
|
frontendUrl: string
|
|
20
20
|
|
|
21
|
-
faustSecretKey?: string
|
|
22
21
|
defaultMenuName?: string
|
|
23
22
|
|
|
24
23
|
enableCache?: boolean
|
|
@@ -44,10 +43,6 @@ interface WPNuxtConfig {
|
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
interface WPNuxtConfigQueries {
|
|
47
|
-
/**
|
|
48
|
-
* @default true
|
|
49
|
-
*/
|
|
50
|
-
usePredefinedQueries?: boolean
|
|
51
46
|
|
|
52
47
|
/**
|
|
53
48
|
* Folder for user defined queries
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { promises, statSync, existsSync, cpSync } from 'node:fs';
|
|
2
2
|
import { resolveFiles, defineNuxtModule, createResolver, addPlugin, addImports, addComponent, addServerHandler, installModule, hasNuxtModule, addTemplate, addTypeTemplate } from '@nuxt/kit';
|
|
3
|
-
import defu from 'defu';
|
|
4
3
|
import { join } from 'pathe';
|
|
5
4
|
import consola, { createConsola } from 'consola';
|
|
6
5
|
import { ref } from 'vue';
|
|
@@ -8,7 +7,7 @@ import { upperFirst } from 'scule';
|
|
|
8
7
|
import { parse } from 'graphql';
|
|
9
8
|
|
|
10
9
|
const name = "@wpnuxt/core";
|
|
11
|
-
const version = "1.0.0-edge.
|
|
10
|
+
const version = "1.0.0-edge.7";
|
|
12
11
|
|
|
13
12
|
const loggerRef = ref();
|
|
14
13
|
const initLogger = (logLevel) => {
|
|
@@ -144,7 +143,6 @@ async function generateWPNuxtComposables(ctx, queryOutputPath, resolver) {
|
|
|
144
143
|
const defaultConfigs = {
|
|
145
144
|
wordpressUrl: "",
|
|
146
145
|
frontendUrl: "",
|
|
147
|
-
faustSecretKey: "",
|
|
148
146
|
defaultMenuName: "main",
|
|
149
147
|
enableCache: true,
|
|
150
148
|
staging: false,
|
|
@@ -173,9 +171,6 @@ const module = defineNuxtModule({
|
|
|
173
171
|
logLevel: process.env.WPNUXT_LOG_LEVEL ? Number.parseInt(process.env.WPNUXT_LOG_LEVEL) : options.logLevel,
|
|
174
172
|
composablesPrefix: process.env.WPNUXT_COMPOSABLES_PREFIX || options.composablesPrefix
|
|
175
173
|
};
|
|
176
|
-
nuxt.options.runtimeConfig.wpNuxt = defu(nuxt.options.runtimeConfig.wpNuxt, {
|
|
177
|
-
faustSecretKey: process.env.WPNUXT_FAUST_SECRET_KEY ? process.env.WPNUXT_FAUST_SECRET_KEY : options.faustSecretKey
|
|
178
|
-
});
|
|
179
174
|
nuxt.options.runtimeConfig.public.wpNuxt = publicWPNuxtConfig;
|
|
180
175
|
validateConfig(publicWPNuxtConfig);
|
|
181
176
|
const logger = initLogger(publicWPNuxtConfig.logLevel);
|
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.7",
|
|
4
4
|
"description": "WPNuxt",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@nuxt/kit": "3.12.4",
|
|
56
|
-
"@vueuse/nuxt": "^
|
|
56
|
+
"@vueuse/nuxt": "^11.0.0",
|
|
57
57
|
"defu": "^6.1.4",
|
|
58
58
|
"graphql": "^16.9.0",
|
|
59
59
|
"nuxt-graphql-middleware": "4.1.1",
|
|
@@ -67,12 +67,12 @@
|
|
|
67
67
|
"@graphql-codegen/typescript-operations": "^4.2.3",
|
|
68
68
|
"@nuxt/devtools": "^1.3.9",
|
|
69
69
|
"@nuxt/eslint-config": "^0.5.0",
|
|
70
|
-
"@nuxt/module-builder": "^0.8.
|
|
70
|
+
"@nuxt/module-builder": "^0.8.3",
|
|
71
71
|
"@nuxt/schema": "3.12.4",
|
|
72
|
-
"@nuxt/test-utils": "^3.14.
|
|
72
|
+
"@nuxt/test-utils": "^3.14.1",
|
|
73
73
|
"@rollup/rollup-linux-arm64-gnu": "^4.20.0",
|
|
74
74
|
"@rollup/rollup-linux-arm64-musl": "^4.20.0",
|
|
75
|
-
"@types/node": "22.
|
|
75
|
+
"@types/node": "22.3.0",
|
|
76
76
|
"@vitest/coverage-v8": "^2.0.5",
|
|
77
77
|
"@vue/test-utils": "^2.4.6",
|
|
78
78
|
"@wordpress/env": "^10.5.0",
|
|
@@ -81,11 +81,11 @@
|
|
|
81
81
|
"nuxt": "^3.12.4",
|
|
82
82
|
"nuxt-content-twoslash": "^0.1.1",
|
|
83
83
|
"release-it": "^17.6.0",
|
|
84
|
-
"shiki": "^1.
|
|
84
|
+
"shiki": "^1.13.0",
|
|
85
85
|
"twoslash": "^0.2.9",
|
|
86
86
|
"typescript": "^5.5.4",
|
|
87
87
|
"untyped": "1.4.2",
|
|
88
|
-
"vite": "^5.4.
|
|
88
|
+
"vite": "^5.4.1",
|
|
89
89
|
"vitest": "^2.0.5",
|
|
90
90
|
"vue-docgen-web-types": "^0.1.8",
|
|
91
91
|
"vue-tsc": "2.0.29"
|