druxt 0.25.0-dev.20261002115337 → 0.25.0-dev.20261005110003
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/druxt.esm.js +18 -7
- package/dist/druxt.ssr.js +18 -7
- package/package.json +3 -2
package/dist/druxt.esm.js
CHANGED
|
@@ -13,7 +13,7 @@ const scopes = globalThis[SCOPES] || (globalThis[SCOPES] = new Map());
|
|
|
13
13
|
const GENERATION = Symbol.for("druxt.processCacheGeneration");
|
|
14
14
|
const generation = globalThis[GENERATION] || (globalThis[GENERATION] = { value: 0 });
|
|
15
15
|
const credentialed = new WeakSet();
|
|
16
|
-
const watched = new
|
|
16
|
+
const watched = new WeakMap();
|
|
17
17
|
const runtime = { isServer: () => typeof window === "undefined" };
|
|
18
18
|
const DRUPAL_SESSION_COOKIE = "S?SESS[0-9a-f]+";
|
|
19
19
|
const consumerId = (axios) => {
|
|
@@ -51,12 +51,22 @@ const hasCredentials = (axios, sessionCookie = DRUPAL_SESSION_COOKIE) => {
|
|
|
51
51
|
};
|
|
52
52
|
const watchCredentials = (axios, sessionCookie = DRUPAL_SESSION_COOKIE) => {
|
|
53
53
|
const interceptors = ((axios || {}).interceptors || {}).response;
|
|
54
|
-
if (!interceptors || typeof interceptors.use !== "function"
|
|
54
|
+
if (!interceptors || typeof interceptors.use !== "function")
|
|
55
55
|
return;
|
|
56
|
-
watched.
|
|
56
|
+
const registered = watched.get(axios);
|
|
57
|
+
if (registered) {
|
|
58
|
+
registered.add(sessionCookie);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const patterns = new Set([sessionCookie]);
|
|
62
|
+
watched.set(axios, patterns);
|
|
57
63
|
const mark = (config) => {
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
for (const pattern of patterns) {
|
|
65
|
+
if (configHasCredentials(config, pattern)) {
|
|
66
|
+
credentialed.add(axios);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
60
70
|
};
|
|
61
71
|
interceptors.use((response) => {
|
|
62
72
|
mark((response || {}).config);
|
|
@@ -452,7 +462,7 @@ const cacheClearHandler = (secret) => (req, res) => {
|
|
|
452
462
|
};
|
|
453
463
|
|
|
454
464
|
var name = "druxt";
|
|
455
|
-
var version = "0.25.0-dev.
|
|
465
|
+
var version = "0.25.0-dev.20261005110003";
|
|
456
466
|
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
|
|
457
467
|
var keywords = [
|
|
458
468
|
"cms",
|
|
@@ -478,6 +488,7 @@ var repository = {
|
|
|
478
488
|
var license = "MIT";
|
|
479
489
|
var author = "Stuart Clark <stuart@druxtjs.org>";
|
|
480
490
|
var exports = {
|
|
491
|
+
"./package.json": "./package.json",
|
|
481
492
|
".": {
|
|
482
493
|
require: "./dist/druxt.ssr.js",
|
|
483
494
|
"import": "./dist/druxt.esm.js"
|
|
@@ -511,7 +522,7 @@ var dependencies = {
|
|
|
511
522
|
};
|
|
512
523
|
var devDependencies = {
|
|
513
524
|
"@storybook/addon-docs": "^6.5.16",
|
|
514
|
-
"druxt-test-utils": "1.0.0-dev.
|
|
525
|
+
"druxt-test-utils": "1.0.0-dev.20261005110003"
|
|
515
526
|
};
|
|
516
527
|
var peerDependencies = {
|
|
517
528
|
axios: "0.28.0",
|
package/dist/druxt.ssr.js
CHANGED
|
@@ -26,7 +26,7 @@ const scopes = globalThis[SCOPES] || (globalThis[SCOPES] = new Map());
|
|
|
26
26
|
const GENERATION = Symbol.for("druxt.processCacheGeneration");
|
|
27
27
|
const generation = globalThis[GENERATION] || (globalThis[GENERATION] = { value: 0 });
|
|
28
28
|
const credentialed = new WeakSet();
|
|
29
|
-
const watched = new
|
|
29
|
+
const watched = new WeakMap();
|
|
30
30
|
const runtime = { isServer: () => typeof window === "undefined" };
|
|
31
31
|
const DRUPAL_SESSION_COOKIE = "S?SESS[0-9a-f]+";
|
|
32
32
|
const consumerId = (axios) => {
|
|
@@ -64,12 +64,22 @@ const hasCredentials = (axios, sessionCookie = DRUPAL_SESSION_COOKIE) => {
|
|
|
64
64
|
};
|
|
65
65
|
const watchCredentials = (axios, sessionCookie = DRUPAL_SESSION_COOKIE) => {
|
|
66
66
|
const interceptors = ((axios || {}).interceptors || {}).response;
|
|
67
|
-
if (!interceptors || typeof interceptors.use !== "function"
|
|
67
|
+
if (!interceptors || typeof interceptors.use !== "function")
|
|
68
68
|
return;
|
|
69
|
-
watched.
|
|
69
|
+
const registered = watched.get(axios);
|
|
70
|
+
if (registered) {
|
|
71
|
+
registered.add(sessionCookie);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const patterns = new Set([sessionCookie]);
|
|
75
|
+
watched.set(axios, patterns);
|
|
70
76
|
const mark = (config) => {
|
|
71
|
-
|
|
72
|
-
|
|
77
|
+
for (const pattern of patterns) {
|
|
78
|
+
if (configHasCredentials(config, pattern)) {
|
|
79
|
+
credentialed.add(axios);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
73
83
|
};
|
|
74
84
|
interceptors.use((response) => {
|
|
75
85
|
mark((response || {}).config);
|
|
@@ -465,7 +475,7 @@ const cacheClearHandler = (secret) => (req, res) => {
|
|
|
465
475
|
};
|
|
466
476
|
|
|
467
477
|
var name = "druxt";
|
|
468
|
-
var version = "0.25.0-dev.
|
|
478
|
+
var version = "0.25.0-dev.20261005110003";
|
|
469
479
|
var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
|
|
470
480
|
var keywords = [
|
|
471
481
|
"cms",
|
|
@@ -491,6 +501,7 @@ var repository = {
|
|
|
491
501
|
var license = "MIT";
|
|
492
502
|
var author = "Stuart Clark <stuart@druxtjs.org>";
|
|
493
503
|
var exports$1 = {
|
|
504
|
+
"./package.json": "./package.json",
|
|
494
505
|
".": {
|
|
495
506
|
require: "./dist/druxt.ssr.js",
|
|
496
507
|
"import": "./dist/druxt.esm.js"
|
|
@@ -524,7 +535,7 @@ var dependencies = {
|
|
|
524
535
|
};
|
|
525
536
|
var devDependencies = {
|
|
526
537
|
"@storybook/addon-docs": "^6.5.16",
|
|
527
|
-
"druxt-test-utils": "1.0.0-dev.
|
|
538
|
+
"druxt-test-utils": "1.0.0-dev.20261005110003"
|
|
528
539
|
};
|
|
529
540
|
var peerDependencies = {
|
|
530
541
|
axios: "0.28.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "druxt",
|
|
3
|
-
"version": "0.25.0-dev.
|
|
3
|
+
"version": "0.25.0-dev.20261005110003",
|
|
4
4
|
"description": "The Fully Decoupled Drupal Framework for Nuxt.js.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cms",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"author": "Stuart Clark <stuart@druxtjs.org>",
|
|
28
28
|
"exports": {
|
|
29
|
+
"./package.json": "./package.json",
|
|
29
30
|
".": {
|
|
30
31
|
"require": "./dist/druxt.ssr.js",
|
|
31
32
|
"import": "./dist/druxt.esm.js"
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
},
|
|
60
61
|
"devDependencies": {
|
|
61
62
|
"@storybook/addon-docs": "^6.5.16",
|
|
62
|
-
"druxt-test-utils": "1.0.0-dev.
|
|
63
|
+
"druxt-test-utils": "1.0.0-dev.20261005110003"
|
|
63
64
|
},
|
|
64
65
|
"peerDependencies": {
|
|
65
66
|
"axios": "0.28.0",
|