@wpnuxt/core 1.0.0-edge.8 → 1.0.0-edge.9

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.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpnuxt/core",
3
- "version": "1.0.0-edge.8",
3
+ "version": "1.0.0-edge.9",
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.8";
10
+ const version = "1.0.0-edge.9";
11
11
 
12
12
  const loggerRef = ref();
13
13
  const initLogger = (logLevel) => {
@@ -225,12 +225,12 @@ const module = defineNuxtModule({
225
225
  const userQueryPathExists = existsSync(userQueryPath);
226
226
  cpSync(resolveRuntimeModule("./queries/"), queryOutputPath, { recursive: true });
227
227
  if (hasNuxtModule("@wpnuxt/blocks")) {
228
- logger.debug("Loading @wpnuxt/blocks");
229
228
  for (const m of nuxt.options._installedModules) {
230
229
  if (m.meta.name === "@wpnuxt/blocks" && m.entryPath) {
230
+ logger.debug("Loading queries from @wpnuxt/blocks");
231
231
  let blocksQueriesPath;
232
- if (m.entryPath.startsWith("../src/module")) {
233
- blocksQueriesPath = join(nuxt.options.rootDir, "../src/runtime/queries/");
232
+ if (m.entryPath.startsWith("../")) {
233
+ blocksQueriesPath = join(nuxt.options.rootDir, "../", m.entryPath, "./runtime/queries/");
234
234
  } else {
235
235
  blocksQueriesPath = join("./node_modules", m.entryPath, "dist/runtime/queries/");
236
236
  }
@@ -239,6 +239,12 @@ const module = defineNuxtModule({
239
239
  }
240
240
  } else {
241
241
  logger.debug("Tip: Install the @wpnuxt/blocks module if you want to render Gutenberg blocks with separate vue components");
242
+ addTemplate({
243
+ write: true,
244
+ filename: "wpnuxt/blocks.mjs",
245
+ getContents: () => `export { }`
246
+ });
247
+ nuxt.options.alias["#wpnuxt/blocks"] = resolve(nuxt.options.buildDir, "wpnuxt/blocks");
242
248
  }
243
249
  if (userQueryPathExists) {
244
250
  logger.debug("Extending queries:", userQueryPath);
@@ -0,0 +1,3 @@
1
+ fragment NodeWithContentEditor on NodeWithContentEditor {
2
+ content
3
+ }
@@ -1,10 +1,11 @@
1
1
  #import '~/.queries/fragments/ContentNode.fragment.gql';
2
2
  #import '~/.queries/fragments/NodeWithFeaturedImage.fragment.gql';
3
+ #import '~/.queries/fragments/NodeWithContentEditor.fragment.gql';
3
4
 
4
5
  fragment Page on Page {
5
6
  ...ContentNode
6
7
  ...NodeWithFeaturedImage
7
- content
8
+ ...NodeWithContentEditor
8
9
  isFrontPage
9
10
  isPostsPage
10
11
  isPreview
@@ -1,11 +1,12 @@
1
1
  #import "~/.queries/fragments/NodeWithExcerpt.fragment.gql";
2
2
  #import '~/.queries/fragments/ContentNode.fragment.gql';
3
3
  #import '~/.queries/fragments/NodeWithFeaturedImage.fragment.gql';
4
+ #import '~/.queries/fragments/NodeWithContentEditor.fragment.gql';
4
5
 
5
6
  fragment Post on Post {
6
7
  ...NodeWithExcerpt
7
8
  ...ContentNode
8
9
  ...NodeWithFeaturedImage
9
- content
10
+ ...NodeWithContentEditor
10
11
  title
11
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpnuxt/core",
3
- "version": "1.0.0-edge.8",
3
+ "version": "1.0.0-edge.9",
4
4
  "description": "WPNuxt",
5
5
  "repository": {
6
6
  "type": "git",
@@ -72,7 +72,7 @@
72
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.3.0",
75
+ "@types/node": "22.4.1",
76
76
  "@vitest/coverage-v8": "^2.0.5",
77
77
  "@vue/test-utils": "^2.4.6",
78
78
  "@wordpress/env": "^10.5.0",