@wpnuxt/core 1.0.0-edge.28 → 1.0.0-edge.30
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.d.mts +2 -1
- package/dist/module.json +3 -3
- package/dist/module.mjs +11 -23
- package/dist/runtime/components/ContentRenderer.vue +4 -6
- package/dist/runtime/components/ContentRenderer.vue.d.ts +6 -0
- package/dist/runtime/components/StagingBanner.vue +23 -26
- package/dist/runtime/components/StagingBanner.vue.d.ts +2 -0
- package/dist/runtime/components/WPContent.vue +12 -15
- package/dist/runtime/components/WPContent.vue.d.ts +6 -0
- package/dist/runtime/components/WPNuxtLogo.vue +6 -6
- package/dist/runtime/components/WPNuxtLogo.vue.d.ts +5 -0
- package/dist/runtime/components/WordPressLogo.vue.d.ts +2 -0
- package/dist/runtime/composables/useWPContent.js +1 -1
- 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 +0 -2
- package/dist/runtime/queries/fragments/GeneralSettings.fragment.gql +0 -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 +0 -5
- package/dist/types.d.mts +4 -2
- package/package.json +24 -28
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -100
- package/dist/types.d.ts +0 -7
package/dist/module.d.mts
CHANGED
package/dist/module.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wpnuxt/core",
|
|
3
|
-
"version": "1.0.0-edge.
|
|
3
|
+
"version": "1.0.0-edge.30",
|
|
4
4
|
"configKey": "wpNuxt",
|
|
5
5
|
"nuxt": ">=3.1.0",
|
|
6
6
|
"builder": {
|
|
7
|
-
"@nuxt/module-builder": "0.
|
|
8
|
-
"unbuild": "
|
|
7
|
+
"@nuxt/module-builder": "1.0.1",
|
|
8
|
+
"unbuild": "3.5.0"
|
|
9
9
|
}
|
|
10
10
|
}
|
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createResolver, hasNuxtModule, addTemplate, resolveFiles, defineNuxtModule, addPlugin, addImports, addComponentsDir, addServerHandler, installModule, addTypeTemplate } from '@nuxt/kit';
|
|
2
|
-
import
|
|
2
|
+
import { createConsola, consola } from 'consola';
|
|
3
3
|
import { promises, existsSync, cpSync, statSync } from 'node:fs';
|
|
4
4
|
import { ref } from 'vue';
|
|
5
5
|
import { join } from 'pathe';
|
|
@@ -7,7 +7,7 @@ import { upperFirst } from 'scule';
|
|
|
7
7
|
import { parse } from 'graphql';
|
|
8
8
|
|
|
9
9
|
const name = "@wpnuxt/core";
|
|
10
|
-
const version = "1.0.0-edge.
|
|
10
|
+
const version = "1.0.0-edge.30";
|
|
11
11
|
|
|
12
12
|
const loggerRef = ref();
|
|
13
13
|
const initLogger = (logLevel) => {
|
|
@@ -103,14 +103,13 @@ const _parseDoc = async (doc) => {
|
|
|
103
103
|
return operations;
|
|
104
104
|
};
|
|
105
105
|
function processSelections(selections, level, query) {
|
|
106
|
-
if (!selections || selections.length === 0)
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
query.nodes.push(selections[0].name.value.trim());
|
|
106
|
+
if (!selections || selections.length === 0) return;
|
|
107
|
+
if (selections.length === 1 && selections[0]?.kind === "Field") {
|
|
108
|
+
query.nodes?.push(selections[0].name.value.trim());
|
|
110
109
|
}
|
|
111
110
|
selections.forEach((s) => {
|
|
112
111
|
if (s.kind === "FragmentSpread") {
|
|
113
|
-
query.fragments
|
|
112
|
+
query.fragments?.push(s.name.value.trim());
|
|
114
113
|
} else if (s.selectionSet?.selections) {
|
|
115
114
|
processSelections(s.selectionSet.selections, level + 1, query);
|
|
116
115
|
}
|
|
@@ -227,11 +226,9 @@ const module = defineNuxtModule({
|
|
|
227
226
|
logger.info("config:", publicWPNuxtConfig);
|
|
228
227
|
logger.info("Connecting GraphQL to", publicWPNuxtConfig.wordpressUrl);
|
|
229
228
|
logger.info("frontendUrl:", publicWPNuxtConfig.frontendUrl);
|
|
230
|
-
if (publicWPNuxtConfig.enableCache)
|
|
231
|
-
logger.info("Cache enabled");
|
|
229
|
+
if (publicWPNuxtConfig.enableCache) logger.info("Cache enabled");
|
|
232
230
|
logger.debug("Debug mode enabled, log level:", publicWPNuxtConfig.logLevel);
|
|
233
|
-
if (publicWPNuxtConfig.staging)
|
|
234
|
-
logger.info("Staging enabled");
|
|
231
|
+
if (publicWPNuxtConfig.staging) logger.info("Staging enabled");
|
|
235
232
|
const { resolve } = createResolver(import.meta.url);
|
|
236
233
|
const resolveRuntimeModule = (path) => resolve("./runtime", path);
|
|
237
234
|
const srcResolver = createResolver(nuxt.options.srcDir);
|
|
@@ -279,16 +276,8 @@ const module = defineNuxtModule({
|
|
|
279
276
|
graphqlEndpoint: `${publicWPNuxtConfig.wordpressUrl}/graphql`,
|
|
280
277
|
downloadSchema: publicWPNuxtConfig.downloadSchema,
|
|
281
278
|
codegenConfig: {
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
// inlineFragmentTypes: 'combine',
|
|
285
|
-
dedupeFragments: true,
|
|
286
|
-
onlyOperationTypes: true,
|
|
287
|
-
avoidOptionals: false,
|
|
288
|
-
maybeValue: "T | undefined",
|
|
289
|
-
namingConvention: {
|
|
290
|
-
enumValues: "change-case-all#upperCaseFirst"
|
|
291
|
-
}
|
|
279
|
+
debugMode: publicWPNuxtConfig.logLevel ? publicWPNuxtConfig.logLevel > 3 : false,
|
|
280
|
+
useCache: false
|
|
292
281
|
},
|
|
293
282
|
codegenSchemaConfig: {
|
|
294
283
|
urlSchemaOptions: {
|
|
@@ -325,8 +314,7 @@ const module = defineNuxtModule({
|
|
|
325
314
|
nuxt.hook("nitro:init", async (nitro) => {
|
|
326
315
|
const keys = await nitro.storage.getKeys("cache:api:wpContent");
|
|
327
316
|
keys.forEach(async (key) => {
|
|
328
|
-
if (key.startsWith("cache:api:wpContent"))
|
|
329
|
-
await nitro.storage.removeItem(key);
|
|
317
|
+
if (key.startsWith("cache:api:wpContent")) await nitro.storage.removeItem(key);
|
|
330
318
|
});
|
|
331
319
|
});
|
|
332
320
|
const endTime = (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
node: NodeWithContentEditorFragment
|
|
6
|
-
}>()
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
node: { type: null, required: true }
|
|
4
|
+
});
|
|
7
5
|
</script>
|
|
8
6
|
|
|
9
7
|
<template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NodeWithContentEditorFragment } from '#build/graphql-operations';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
node: NodeWithContentEditorFragment;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { OperationTypeNode } from
|
|
3
|
-
import { useWPUri } from
|
|
4
|
-
import { useWPContent } from
|
|
5
|
-
import WPNuxtLogo from
|
|
6
|
-
import WordPressLogo from
|
|
7
|
-
import { useRuntimeConfig, useHead, useRoute } from
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const wpUri = useWPUri()
|
|
1
|
+
<script setup>
|
|
2
|
+
import { OperationTypeNode } from "graphql";
|
|
3
|
+
import { useWPUri } from "../composables/useWPUri";
|
|
4
|
+
import { useWPContent } from "../composables";
|
|
5
|
+
import WPNuxtLogo from "./WPNuxtLogo.vue";
|
|
6
|
+
import WordPressLogo from "./WordPressLogo.vue";
|
|
7
|
+
import { useRuntimeConfig, useHead, useRoute } from "#imports";
|
|
8
|
+
const config = useRuntimeConfig();
|
|
9
|
+
const frontendUrl = config.public.wpNuxt.frontendUrl;
|
|
10
|
+
const wordpressUrl = config.public.wpNuxt.wordpressUrl;
|
|
11
|
+
const wpUri = useWPUri();
|
|
13
12
|
useHead({
|
|
14
|
-
title:
|
|
13
|
+
title: "Staging",
|
|
15
14
|
link: [
|
|
16
15
|
{
|
|
17
|
-
type:
|
|
18
|
-
href: wordpressUrl +
|
|
16
|
+
type: "stylesheet",
|
|
17
|
+
href: wordpressUrl + "/wp-admin/load-styles.php?c=0&dir=ltr&load%5Bchunk_0%5D=dashicons,admin-bar,site-health,common,forms,admin-menu,dashboard,list-tables,edit,revisions,media,themes,about,nav-menus,wp-poi&load%5Bchunk_1%5D=nter,widgets,site-icon,l10n,buttons,wp-auth-check&ver=6.4.3"
|
|
19
18
|
}
|
|
20
19
|
]
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
uri = uri.substring(1)
|
|
20
|
+
});
|
|
21
|
+
const route = useRoute();
|
|
22
|
+
let uri = route.path === "/" ? "home" : route.path;
|
|
23
|
+
if (uri.startsWith("/")) {
|
|
24
|
+
uri = uri.substring(1);
|
|
27
25
|
}
|
|
28
|
-
if (uri.endsWith(
|
|
29
|
-
uri = uri.substring(0, uri.length - 1)
|
|
26
|
+
if (uri.endsWith("/")) {
|
|
27
|
+
uri = uri.substring(0, uri.length - 1);
|
|
30
28
|
}
|
|
31
|
-
const { data: post } = await useWPContent(OperationTypeNode.QUERY,
|
|
32
|
-
|
|
29
|
+
const { data: post } = await useWPContent(OperationTypeNode.QUERY, "NodeByUri", ["nodeByUri"], false, { uri });
|
|
33
30
|
if (import.meta.client) {
|
|
34
|
-
document.body.style.marginBottom =
|
|
31
|
+
document.body.style.marginBottom = "40px";
|
|
35
32
|
}
|
|
36
33
|
</script>
|
|
37
34
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}>()
|
|
8
|
-
|
|
9
|
-
const manifest = await import('#wpnuxt/blocks').catch(() => ({}))
|
|
1
|
+
<script setup>
|
|
2
|
+
import { resolveComponent } from "#imports";
|
|
3
|
+
defineProps({
|
|
4
|
+
node: { type: null, required: true }
|
|
5
|
+
});
|
|
6
|
+
const manifest = await import("#wpnuxt/blocks").catch(() => ({}));
|
|
10
7
|
const findComponentToRender = async () => {
|
|
11
|
-
const componentImporter = manifest[
|
|
12
|
-
if (typeof componentImporter ===
|
|
13
|
-
return await componentImporter()
|
|
8
|
+
const componentImporter = manifest["BlockRenderer"];
|
|
9
|
+
if (typeof componentImporter === "function") {
|
|
10
|
+
return await componentImporter();
|
|
14
11
|
}
|
|
15
|
-
return await resolveComponent(
|
|
16
|
-
}
|
|
17
|
-
const componentToRender = await findComponentToRender()
|
|
12
|
+
return await resolveComponent("ContentRenderer");
|
|
13
|
+
};
|
|
14
|
+
const componentToRender = await findComponentToRender();
|
|
18
15
|
</script>
|
|
19
16
|
|
|
20
17
|
<template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NodeWithContentEditorFragment, NodeWithEditorBlocksFragment } from '#build/graphql-operations';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
node: NodeWithContentEditorFragment | NodeWithEditorBlocksFragment;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
const props = defineProps
|
|
3
|
-
wpColor
|
|
4
|
-
}
|
|
5
|
-
const wpLight = props.wpColor ? props.wpColor :
|
|
6
|
-
const wpDark = props.wpColor ? props.wpColor :
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
wpColor: { type: String, required: false }
|
|
4
|
+
});
|
|
5
|
+
const wpLight = props.wpColor ? props.wpColor : "back";
|
|
6
|
+
const wpDark = props.wpColor ? props.wpColor : "white";
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<template>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
wpColor?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
#import "~/.queries/fragments/NodeWithExcerpt.fragment.gql";
|
|
2
|
-
#import '~/.queries/fragments/ContentNode.fragment.gql';
|
|
3
|
-
#import '~/.queries/fragments/NodeWithFeaturedImage.fragment.gql';
|
|
4
|
-
#import '~/.queries/fragments/NodeWithContentEditor.fragment.gql';
|
|
5
|
-
|
|
6
1
|
fragment Post on Post {
|
|
7
2
|
...NodeWithExcerpt
|
|
8
3
|
...ContentNode
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { NuxtModule } from '@nuxt/schema'
|
|
2
2
|
|
|
3
|
-
import type { default as Module } from './module.
|
|
3
|
+
import type { default as Module } from './module.mjs'
|
|
4
4
|
|
|
5
5
|
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { default } from './module.mjs'
|
|
8
|
+
|
|
9
|
+
export { type WPNuxtConfig, type WPNuxtConfigQueries, type WPNuxtQuery } from './module.mjs'
|
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.30",
|
|
4
4
|
"description": "WPNuxt",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"types": "./dist/types.d.
|
|
13
|
+
"types": "./dist/types.d.mts",
|
|
14
14
|
"import": "./dist/module.mjs",
|
|
15
|
-
"require": "./dist/module.
|
|
15
|
+
"require": "./dist/module.mjs"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
"main": "./dist/module.
|
|
19
|
-
"types": "./dist/types.d.ts",
|
|
18
|
+
"main": "./dist/module.mjs",
|
|
20
19
|
"files": [
|
|
21
20
|
"dist"
|
|
22
21
|
],
|
|
@@ -52,39 +51,36 @@
|
|
|
52
51
|
"start": "pnpm run wp-env:create && pnpm run dev"
|
|
53
52
|
},
|
|
54
53
|
"dependencies": {
|
|
55
|
-
"@nuxt/kit": "3.
|
|
56
|
-
"@vueuse/nuxt": "^13.
|
|
54
|
+
"@nuxt/kit": "3.17.1",
|
|
55
|
+
"@vueuse/nuxt": "^13.1.0",
|
|
57
56
|
"defu": "^6.1.4",
|
|
58
|
-
"graphql": "^16.
|
|
59
|
-
"nuxt-graphql-middleware": "
|
|
57
|
+
"graphql": "^16.11.0",
|
|
58
|
+
"nuxt-graphql-middleware": "5.0.0",
|
|
60
59
|
"vue-sanitize-directive": "^0.2.1"
|
|
61
60
|
},
|
|
62
61
|
"devDependencies": {
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@
|
|
66
|
-
"@nuxt/
|
|
67
|
-
"@nuxt/
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"@rollup/rollup-linux-arm64-musl": "^4.34.6",
|
|
73
|
-
"@types/node": "22.13.10",
|
|
74
|
-
"@vitest/coverage-v8": "^3.0.5",
|
|
62
|
+
"@nuxt/devtools": "^2.4.0",
|
|
63
|
+
"@nuxt/eslint-config": "^1.3.0",
|
|
64
|
+
"@nuxt/module-builder": "^1.0.1",
|
|
65
|
+
"@nuxt/schema": "3.17.1",
|
|
66
|
+
"@nuxt/test-utils": "^3.18.0",
|
|
67
|
+
"@rollup/rollup-linux-arm64-gnu": "^4.40.1",
|
|
68
|
+
"@rollup/rollup-linux-arm64-musl": "^4.40.1",
|
|
69
|
+
"@types/node": "22.15.3",
|
|
70
|
+
"@vitest/coverage-v8": "^3.1.2",
|
|
75
71
|
"@vue/test-utils": "^2.4.6",
|
|
76
|
-
"@wordpress/env": "^10.
|
|
72
|
+
"@wordpress/env": "^10.22.0",
|
|
77
73
|
"changelogen": "^0.6.1",
|
|
78
74
|
"markdownlint-cli": "^0.44.0",
|
|
79
|
-
"nuxt": "^3.
|
|
75
|
+
"nuxt": "^3.17.1",
|
|
80
76
|
"nuxt-content-twoslash": "^0.1.2",
|
|
81
|
-
"release-it": "^
|
|
82
|
-
"typescript": "^5.
|
|
77
|
+
"release-it": "^19.0.1",
|
|
78
|
+
"typescript": "^5.8.3",
|
|
83
79
|
"untyped": "2.0.0",
|
|
84
|
-
"vite": "^6.
|
|
85
|
-
"vitest": "^3.
|
|
80
|
+
"vite": "^6.3.4",
|
|
81
|
+
"vitest": "^3.1.2",
|
|
86
82
|
"vue-docgen-web-types": "^0.1.8",
|
|
87
|
-
"vue-tsc": "2.2.
|
|
83
|
+
"vue-tsc": "2.2.10"
|
|
88
84
|
},
|
|
89
85
|
"peerDependencies": {
|
|
90
86
|
"consola": "^3.3.3",
|
package/dist/module.cjs
DELETED
package/dist/module.d.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
-
|
|
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
|
|
43
|
-
|
|
44
|
-
hasBlocksModule?: boolean
|
|
45
|
-
hasAuthModule?: boolean
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
interface WPNuxtConfigQueries {
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Folder for user defined queries
|
|
52
|
-
*
|
|
53
|
-
* relative to the src dir of your nuxt app
|
|
54
|
-
*
|
|
55
|
-
* @default extend/queries
|
|
56
|
-
*/
|
|
57
|
-
extendDir?: string
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* The predefined queries & the user defined queries will be merged and placed in the queries output folder
|
|
61
|
-
*
|
|
62
|
-
* relative to the src dir of your nuxt app
|
|
63
|
-
*
|
|
64
|
-
* @default queries
|
|
65
|
-
*/
|
|
66
|
-
outputDir?: string
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
type WPNuxtQuery = {
|
|
70
|
-
name: string
|
|
71
|
-
nodes?: string[]
|
|
72
|
-
fragments: string[]
|
|
73
|
-
params: Record<string, string>
|
|
74
|
-
operation: OperationTypeNode
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
declare const _default: _nuxt_schema.NuxtModule<WPNuxtConfig, WPNuxtConfig, false>;
|
|
78
|
-
|
|
79
|
-
declare module '@nuxt/schema' {
|
|
80
|
-
interface RuntimeConfig {
|
|
81
|
-
wpNuxt: {
|
|
82
|
-
faustSecretKey: string;
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
interface PublicRuntimeConfig {
|
|
86
|
-
wpNuxt: WPNuxtConfig;
|
|
87
|
-
}
|
|
88
|
-
interface ConfigSchema {
|
|
89
|
-
wpNuxt: {
|
|
90
|
-
faustSecretKey: string;
|
|
91
|
-
};
|
|
92
|
-
runtimeConfig: {
|
|
93
|
-
public?: {
|
|
94
|
-
wpNuxt: WPNuxtConfig;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export { type WPNuxtConfig, type WPNuxtConfigQueries, type WPNuxtQuery, _default as default };
|
package/dist/types.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
-
|
|
3
|
-
import type { default as Module } from './module'
|
|
4
|
-
|
|
5
|
-
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
-
|
|
7
|
-
export { type WPNuxtConfig, type WPNuxtConfigQueries, type WPNuxtQuery, default } from './module'
|