@wpnuxt/core 1.0.0-edge.19 → 1.0.0-edge.20
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
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.
|
|
10
|
+
const version = "1.0.0-edge.20";
|
|
11
11
|
|
|
12
12
|
const loggerRef = ref();
|
|
13
13
|
const initLogger = (logLevel) => {
|
|
@@ -58,7 +58,6 @@ async function mergeQueries(nuxt) {
|
|
|
58
58
|
function addQueriesFromAddOnModule(addOnModuleName, queryOutputPath, nuxt, resolve) {
|
|
59
59
|
const logger = getLogger();
|
|
60
60
|
if (hasNuxtModule(addOnModuleName)) {
|
|
61
|
-
console.log("addOnModule found:", addOnModuleName);
|
|
62
61
|
for (const m of nuxt.options._installedModules) {
|
|
63
62
|
if (m.meta.name === addOnModuleName && m.entryPath) {
|
|
64
63
|
logger.debug("Loading queries from " + addOnModuleName);
|
|
@@ -70,7 +69,6 @@ function addQueriesFromAddOnModule(addOnModuleName, queryOutputPath, nuxt, resol
|
|
|
70
69
|
} else {
|
|
71
70
|
blocksQueriesPath = join("./node_modules", m.entryPath, "dist/runtime/queries/");
|
|
72
71
|
}
|
|
73
|
-
console.log("blocksQueriesPath", blocksQueriesPath);
|
|
74
72
|
cpSync(blocksQueriesPath, queryOutputPath, { recursive: true });
|
|
75
73
|
}
|
|
76
74
|
}
|
|
@@ -276,13 +274,11 @@ const module = defineNuxtModule({
|
|
|
276
274
|
});
|
|
277
275
|
await installModule("@vueuse/nuxt", {});
|
|
278
276
|
const mergedQueriesFolder = await mergeQueries(nuxt);
|
|
279
|
-
console.log("mergedQueriesFolder", mergedQueriesFolder);
|
|
280
277
|
await installModule("nuxt-graphql-middleware", {
|
|
281
278
|
debug: publicWPNuxtConfig.logLevel ? publicWPNuxtConfig.logLevel > 3 : false,
|
|
282
279
|
graphqlEndpoint: `${publicWPNuxtConfig.wordpressUrl}/graphql`,
|
|
283
280
|
downloadSchema: publicWPNuxtConfig.downloadSchema,
|
|
284
281
|
codegenConfig: {
|
|
285
|
-
silent: false,
|
|
286
282
|
skipTypename: true,
|
|
287
283
|
useTypeImports: true,
|
|
288
284
|
// inlineFragmentTypes: 'combine',
|
|
@@ -290,14 +286,9 @@ const module = defineNuxtModule({
|
|
|
290
286
|
onlyOperationTypes: true,
|
|
291
287
|
avoidOptionals: false,
|
|
292
288
|
maybeValue: "T | undefined",
|
|
293
|
-
disableOnBuild: false,
|
|
294
|
-
gqlImport: "graphql-request#wpnuxt",
|
|
295
289
|
namingConvention: {
|
|
296
290
|
enumValues: "change-case-all#upperCaseFirst"
|
|
297
|
-
}
|
|
298
|
-
documents: [
|
|
299
|
-
resolve("!./graphql/**/*")
|
|
300
|
-
]
|
|
291
|
+
}
|
|
301
292
|
},
|
|
302
293
|
codegenSchemaConfig: {
|
|
303
294
|
urlSchemaOptions: {
|
|
@@ -307,7 +298,7 @@ const module = defineNuxtModule({
|
|
|
307
298
|
}
|
|
308
299
|
},
|
|
309
300
|
outputDocuments: true,
|
|
310
|
-
autoImportPatterns: mergedQueriesFolder,
|
|
301
|
+
autoImportPatterns: [mergedQueriesFolder],
|
|
311
302
|
includeComposables: true,
|
|
312
303
|
devtools: true
|
|
313
304
|
});
|