@dotcms/client 0.0.1-beta.35 → 0.0.1-beta.36
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/next.cjs.js +3 -2
- package/next.esm.js +3 -2
- package/package.json +4 -1
package/next.cjs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var consola = require('consola');
|
|
3
4
|
var transforms = require('./transforms.cjs.js');
|
|
4
5
|
|
|
5
6
|
class NavigationClient {
|
|
@@ -79,7 +80,7 @@ const DEFAULT_PAGE_CONTENTLETS_CONTENT = `
|
|
|
79
80
|
*/
|
|
80
81
|
const buildPageQuery = ({ page, fragments, additionalQueries }) => {
|
|
81
82
|
if (!page) {
|
|
82
|
-
|
|
83
|
+
consola.consola.warn("[DotCMS Client]: No page query was found, so we're loading all content using _map. This might slow things down. For better performance, we recommend adding a specific query in the page attribute.");
|
|
83
84
|
}
|
|
84
85
|
return `
|
|
85
86
|
fragment DotCMSPage on DotPage {
|
|
@@ -445,7 +446,7 @@ function parseURL(url) {
|
|
|
445
446
|
return new URL(url);
|
|
446
447
|
}
|
|
447
448
|
catch {
|
|
448
|
-
|
|
449
|
+
consola.consola.error('[DotCMS Client]: Invalid URL:', url);
|
|
449
450
|
return undefined;
|
|
450
451
|
}
|
|
451
452
|
}
|
package/next.esm.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { consola } from 'consola';
|
|
1
2
|
import { E as ErrorMessages, g as graphqlToPageEntity, C as Content } from './transforms.esm.js';
|
|
2
3
|
|
|
3
4
|
class NavigationClient {
|
|
@@ -77,7 +78,7 @@ const DEFAULT_PAGE_CONTENTLETS_CONTENT = `
|
|
|
77
78
|
*/
|
|
78
79
|
const buildPageQuery = ({ page, fragments, additionalQueries }) => {
|
|
79
80
|
if (!page) {
|
|
80
|
-
|
|
81
|
+
consola.warn("[DotCMS Client]: No page query was found, so we're loading all content using _map. This might slow things down. For better performance, we recommend adding a specific query in the page attribute.");
|
|
81
82
|
}
|
|
82
83
|
return `
|
|
83
84
|
fragment DotCMSPage on DotPage {
|
|
@@ -443,7 +444,7 @@ function parseURL(url) {
|
|
|
443
444
|
return new URL(url);
|
|
444
445
|
}
|
|
445
446
|
catch {
|
|
446
|
-
|
|
447
|
+
consola.error('[DotCMS Client]: Invalid URL:', url);
|
|
447
448
|
return undefined;
|
|
448
449
|
}
|
|
449
450
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotcms/client",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.36",
|
|
4
4
|
"description": "Official JavaScript library for interacting with DotCMS REST APIs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/dotCMS/core.git#main"
|
|
8
8
|
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"consola": "^3.4.2"
|
|
11
|
+
},
|
|
9
12
|
"devDependencies": {
|
|
10
13
|
"@dotcms/types": "next"
|
|
11
14
|
},
|