@dotcms/client 26.7.27-1 → 26.7.28-1
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/index.cjs.js +13 -2
- package/index.esm.js +13 -2
- package/package.json +1 -1
- package/src/lib/utils/params/utils.d.ts +2 -1
package/index.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ var consola = require('consola');
|
|
|
4
4
|
var types = require('@dotcms/types');
|
|
5
5
|
var internal = require('./internal.cjs.js');
|
|
6
6
|
|
|
7
|
-
const SDK_VERSION = "26.07.
|
|
7
|
+
const SDK_VERSION = "26.07.28-01";
|
|
8
8
|
|
|
9
9
|
const DOTCMS_VERSION_HEADER = 'x-dotcms-version';
|
|
10
10
|
const DOTCMS_MIN_SDK_HEADER = 'x-dotcms-min-sdk';
|
|
@@ -232,7 +232,8 @@ function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
|
-
* Utility functions for AI search parameter mapping and processing
|
|
235
|
+
* Utility functions for AI search parameter mapping and processing.
|
|
236
|
+
* This module provides functionality for mapping and appending parameters to a URLSearchParams object.
|
|
236
237
|
*/
|
|
237
238
|
/**
|
|
238
239
|
* Appends mapped parameters to URLSearchParams based on a mapping configuration.
|
|
@@ -2428,6 +2429,16 @@ async function fetchGraphQL({ baseURL, body, headers, httpClient }) {
|
|
|
2428
2429
|
});
|
|
2429
2430
|
}
|
|
2430
2431
|
|
|
2432
|
+
/**
|
|
2433
|
+
* Logs a verbose DotCMS GraphQL error with rich contextual information.
|
|
2434
|
+
*
|
|
2435
|
+
* @param {string} url - The page or API URL associated with the error.
|
|
2436
|
+
* @param {string} message - The main error message to log.
|
|
2437
|
+
* @param {Object} details - Additional error details for debugging.
|
|
2438
|
+
* @param {number} [details.status] - Optional status code associated with the error.
|
|
2439
|
+
* @param {string} [details.code] - Optional error code describing the error type.
|
|
2440
|
+
* @param {Record<string, unknown>} details.variables - The GraphQL variables used in the query.
|
|
2441
|
+
*/
|
|
2431
2442
|
function logVerboseError(url, message, details) {
|
|
2432
2443
|
const statusLine = details.status !== undefined ? `\n status: ${details.status} | code: ${details.code}` : '';
|
|
2433
2444
|
const variables = JSON.stringify(details.variables, null, 2).replace(/\n/g, '\n ');
|
package/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { consola } from 'consola';
|
|
|
2
2
|
import { BaseHttpClient, DISTANCE_FUNCTIONS, DotHttpError, DotErrorAISearch, DotErrorContent, DotErrorNavigation, UVE_MODE, DotErrorPage } from '@dotcms/types';
|
|
3
3
|
import { graphqlToPageEntity } from './internal.esm.js';
|
|
4
4
|
|
|
5
|
-
const SDK_VERSION = "26.07.
|
|
5
|
+
const SDK_VERSION = "26.07.28-01";
|
|
6
6
|
|
|
7
7
|
const DOTCMS_VERSION_HEADER = 'x-dotcms-version';
|
|
8
8
|
const DOTCMS_MIN_SDK_HEADER = 'x-dotcms-min-sdk';
|
|
@@ -230,7 +230,8 @@ function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
/**
|
|
233
|
-
* Utility functions for AI search parameter mapping and processing
|
|
233
|
+
* Utility functions for AI search parameter mapping and processing.
|
|
234
|
+
* This module provides functionality for mapping and appending parameters to a URLSearchParams object.
|
|
234
235
|
*/
|
|
235
236
|
/**
|
|
236
237
|
* Appends mapped parameters to URLSearchParams based on a mapping configuration.
|
|
@@ -2426,6 +2427,16 @@ async function fetchGraphQL({ baseURL, body, headers, httpClient }) {
|
|
|
2426
2427
|
});
|
|
2427
2428
|
}
|
|
2428
2429
|
|
|
2430
|
+
/**
|
|
2431
|
+
* Logs a verbose DotCMS GraphQL error with rich contextual information.
|
|
2432
|
+
*
|
|
2433
|
+
* @param {string} url - The page or API URL associated with the error.
|
|
2434
|
+
* @param {string} message - The main error message to log.
|
|
2435
|
+
* @param {Object} details - Additional error details for debugging.
|
|
2436
|
+
* @param {number} [details.status] - Optional status code associated with the error.
|
|
2437
|
+
* @param {string} [details.code] - Optional error code describing the error type.
|
|
2438
|
+
* @param {Record<string, unknown>} details.variables - The GraphQL variables used in the query.
|
|
2439
|
+
*/
|
|
2429
2440
|
function logVerboseError(url, message, details) {
|
|
2430
2441
|
const statusLine = details.status !== undefined ? `\n status: ${details.status} | code: ${details.code}` : '';
|
|
2431
2442
|
const variables = JSON.stringify(details.variables, null, 2).replace(/\n/g, '\n ');
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Utility functions for AI search parameter mapping and processing
|
|
2
|
+
* Utility functions for AI search parameter mapping and processing.
|
|
3
|
+
* This module provides functionality for mapping and appending parameters to a URLSearchParams object.
|
|
3
4
|
*/
|
|
4
5
|
/**
|
|
5
6
|
* Appends mapped parameters to URLSearchParams based on a mapping configuration.
|