druxt 0.25.1-dev.20261031205554 → 0.25.1-dev.20261031213358
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.
|
@@ -12,6 +12,10 @@ import DruxtWrapper from './DruxtWrapper.vue'
|
|
|
12
12
|
* NaN as `null`, so two different values can write the same text. Anything
|
|
13
13
|
* JSON does not hold exactly is compared by identity instead.
|
|
14
14
|
*
|
|
15
|
+
* `undefined` is comparable. JSON leaves out an undefined property, as a prop
|
|
16
|
+
* does, which makes `{ included: undefined }` the same propsData as `{}`. In
|
|
17
|
+
* an array it writes as `null`, so there it is not.
|
|
18
|
+
*
|
|
15
19
|
* @private
|
|
16
20
|
*
|
|
17
21
|
* @param {*} value - The value to check.
|
|
@@ -20,7 +24,7 @@ import DruxtWrapper from './DruxtWrapper.vue'
|
|
|
20
24
|
* @returns {boolean} Whether JSON.stringify represents the value exactly.
|
|
21
25
|
*/
|
|
22
26
|
const isComparable = (value, seen = new WeakSet()) => {
|
|
23
|
-
if (value === null) return true
|
|
27
|
+
if (value === null || value === undefined) return true
|
|
24
28
|
|
|
25
29
|
const type = typeof value
|
|
26
30
|
if (type === 'string' || type === 'boolean') return true
|
|
@@ -30,7 +34,7 @@ const isComparable = (value, seen = new WeakSet()) => {
|
|
|
30
34
|
if (seen.has(value)) return false
|
|
31
35
|
seen.add(value)
|
|
32
36
|
|
|
33
|
-
if (Array.isArray(value)) return value.every((item) => isComparable(item, seen))
|
|
37
|
+
if (Array.isArray(value)) return value.every((item) => item !== undefined && isComparable(item, seen))
|
|
34
38
|
|
|
35
39
|
// A Map, a Set, a Date or any class instance writes as something other than itself.
|
|
36
40
|
const prototype = Object.getPrototypeOf(value)
|
package/dist/druxt.esm.js
CHANGED
|
@@ -240,6 +240,7 @@ class DruxtClient {
|
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
242
|
this.options = {
|
|
243
|
+
baseUrl: baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl,
|
|
243
244
|
endpoint: "/jsonapi",
|
|
244
245
|
jsonapiResourceConfig: "jsonapi_resource_config--jsonapi_resource_config",
|
|
245
246
|
...options
|
|
@@ -358,7 +359,7 @@ class DruxtClient {
|
|
|
358
359
|
(err.response || {}).status,
|
|
359
360
|
(err.response || {}).statusText || err.message
|
|
360
361
|
].filter((s) => s).join(": ");
|
|
361
|
-
const meta = { url: url && [this.options.baseUrl, url].join("") };
|
|
362
|
+
const meta = { url: url && (/^https?:\/\//.test(url) ? url : [this.options.baseUrl, url].join("")) };
|
|
362
363
|
let message = [title];
|
|
363
364
|
if (Object.values(meta).filter((o) => o).length) {
|
|
364
365
|
message.push(Object.entries(meta).filter(([, v]) => v).map(([key, value]) => `${key.toUpperCase()}: ${value}`).join("\n"));
|
|
@@ -563,7 +564,7 @@ const cacheClearHandler = (secret) => (req, res) => {
|
|
|
563
564
|
};
|
|
564
565
|
|
|
565
566
|
var name = "druxt";
|
|
566
|
-
var version = "0.25.1-dev.
|
|
567
|
+
var version = "0.25.1-dev.20261031213358";
|
|
567
568
|
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
|
|
568
569
|
var keywords = [
|
|
569
570
|
"cms",
|
package/dist/druxt.ssr.js
CHANGED
|
@@ -253,6 +253,7 @@ class DruxtClient {
|
|
|
253
253
|
});
|
|
254
254
|
}
|
|
255
255
|
this.options = {
|
|
256
|
+
baseUrl: baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl,
|
|
256
257
|
endpoint: "/jsonapi",
|
|
257
258
|
jsonapiResourceConfig: "jsonapi_resource_config--jsonapi_resource_config",
|
|
258
259
|
...options
|
|
@@ -371,7 +372,7 @@ class DruxtClient {
|
|
|
371
372
|
(err.response || {}).status,
|
|
372
373
|
(err.response || {}).statusText || err.message
|
|
373
374
|
].filter((s) => s).join(": ");
|
|
374
|
-
const meta = { url: url && [this.options.baseUrl, url].join("") };
|
|
375
|
+
const meta = { url: url && (/^https?:\/\//.test(url) ? url : [this.options.baseUrl, url].join("")) };
|
|
375
376
|
let message = [title];
|
|
376
377
|
if (Object.values(meta).filter((o) => o).length) {
|
|
377
378
|
message.push(Object.entries(meta).filter(([, v]) => v).map(([key, value]) => `${key.toUpperCase()}: ${value}`).join("\n"));
|
|
@@ -576,7 +577,7 @@ const cacheClearHandler = (secret) => (req, res) => {
|
|
|
576
577
|
};
|
|
577
578
|
|
|
578
579
|
var name = "druxt";
|
|
579
|
-
var version = "0.25.1-dev.
|
|
580
|
+
var version = "0.25.1-dev.20261031213358";
|
|
580
581
|
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
|
|
581
582
|
var keywords = [
|
|
582
583
|
"cms",
|