@wpnuxt/core 1.0.0-edge.12 → 1.0.0-edge.14

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 CHANGED
@@ -63,6 +63,13 @@ interface WPNuxtConfigQueries {
63
63
  outputDir?: string
64
64
  }
65
65
 
66
+ type WPNuxtQuery = {
67
+ name: string
68
+ nodes?: string[]
69
+ fragments: string[]
70
+ params: Record<string, string>
71
+ }
72
+
66
73
  declare const _default: _nuxt_schema.NuxtModule<WPNuxtConfig, WPNuxtConfig, false>;
67
74
 
68
75
  declare module '@nuxt/schema' {
@@ -86,4 +93,4 @@ declare module '@nuxt/schema' {
86
93
  }
87
94
  }
88
95
 
89
- export { _default as default };
96
+ export { type WPNuxtConfig, type WPNuxtConfigQueries, type WPNuxtQuery, _default as default };
package/dist/module.d.ts CHANGED
@@ -63,6 +63,13 @@ interface WPNuxtConfigQueries {
63
63
  outputDir?: string
64
64
  }
65
65
 
66
+ type WPNuxtQuery = {
67
+ name: string
68
+ nodes?: string[]
69
+ fragments: string[]
70
+ params: Record<string, string>
71
+ }
72
+
66
73
  declare const _default: _nuxt_schema.NuxtModule<WPNuxtConfig, WPNuxtConfig, false>;
67
74
 
68
75
  declare module '@nuxt/schema' {
@@ -86,4 +93,4 @@ declare module '@nuxt/schema' {
86
93
  }
87
94
  }
88
95
 
89
- export { _default as default };
96
+ export { type WPNuxtConfig, type WPNuxtConfigQueries, type WPNuxtQuery, _default as default };
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpnuxt/core",
3
- "version": "1.0.0-edge.12",
3
+ "version": "1.0.0-edge.14",
4
4
  "configKey": "wpNuxt",
5
5
  "nuxt": ">=3.1.0",
6
6
  "builder": {
package/dist/module.mjs CHANGED
@@ -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.12";
10
+ const version = "1.0.0-edge.14";
11
11
 
12
12
  const loggerRef = ref();
13
13
  const initLogger = (logLevel) => {
@@ -228,7 +228,9 @@ const module = defineNuxtModule({
228
228
  if (m.meta.name === "@wpnuxt/blocks" && m.entryPath) {
229
229
  logger.debug("Loading queries from @wpnuxt/blocks");
230
230
  let blocksQueriesPath;
231
- if (m.entryPath.startsWith("../")) {
231
+ if (m.entryPath == "../src/module") {
232
+ blocksQueriesPath = join(nuxt.options.rootDir, "../src/runtime/queries/");
233
+ } else if (m.entryPath.startsWith("../")) {
232
234
  blocksQueriesPath = join(nuxt.options.rootDir, "../", m.entryPath, "./runtime/queries/");
233
235
  } else {
234
236
  blocksQueriesPath = join("./node_modules", m.entryPath, "dist/runtime/queries/");
@@ -20,7 +20,7 @@ const componentToRender = await findComponentToRender()
20
20
  <template>
21
21
  <component
22
22
  :is="componentToRender"
23
- v-if="componentToRender"
23
+ v-if="componentToRender && node"
24
24
  :node="node"
25
25
  />
26
26
  </template>
package/dist/types.d.mts CHANGED
@@ -4,4 +4,4 @@ import type { default as Module } from './module.js'
4
4
 
5
5
  export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
6
 
7
- export { default } from './module.js'
7
+ export { type WPNuxtConfig, type WPNuxtConfigQueries, type WPNuxtQuery, default } from './module.js'
package/dist/types.d.ts CHANGED
@@ -4,4 +4,4 @@ import type { default as Module } from './module'
4
4
 
5
5
  export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
6
 
7
- export { default } from './module'
7
+ export { type WPNuxtConfig, type WPNuxtConfigQueries, type WPNuxtQuery, default } from './module'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpnuxt/core",
3
- "version": "1.0.0-edge.12",
3
+ "version": "1.0.0-edge.14",
4
4
  "description": "WPNuxt",
5
5
  "repository": {
6
6
  "type": "git",