druxt 0.25.0-dev.20261002115337 → 0.25.0-dev.20261005004109

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 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 WeakSet();
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" || watched.has(axios))
54
+ if (!interceptors || typeof interceptors.use !== "function")
55
55
  return;
56
- watched.add(axios);
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
- if (configHasCredentials(config, sessionCookie))
59
- credentialed.add(axios);
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.20261002115337";
465
+ var version = "0.25.0-dev.20261005004109";
456
466
  var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
457
467
  var keywords = [
458
468
  "cms",
@@ -511,7 +521,7 @@ var dependencies = {
511
521
  };
512
522
  var devDependencies = {
513
523
  "@storybook/addon-docs": "^6.5.16",
514
- "druxt-test-utils": "1.0.0-dev.20261002115337"
524
+ "druxt-test-utils": "1.0.0-dev.20261005004109"
515
525
  };
516
526
  var peerDependencies = {
517
527
  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 WeakSet();
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" || watched.has(axios))
67
+ if (!interceptors || typeof interceptors.use !== "function")
68
68
  return;
69
- watched.add(axios);
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
- if (configHasCredentials(config, sessionCookie))
72
- credentialed.add(axios);
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.20261002115337";
478
+ var version = "0.25.0-dev.20261005004109";
469
479
  var description = "The Fully Decoupled Drupal Framework for Nuxt.js.";
470
480
  var keywords = [
471
481
  "cms",
@@ -524,7 +534,7 @@ var dependencies = {
524
534
  };
525
535
  var devDependencies = {
526
536
  "@storybook/addon-docs": "^6.5.16",
527
- "druxt-test-utils": "1.0.0-dev.20261002115337"
537
+ "druxt-test-utils": "1.0.0-dev.20261005004109"
528
538
  };
529
539
  var peerDependencies = {
530
540
  axios: "0.28.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "druxt",
3
- "version": "0.25.0-dev.20261002115337",
3
+ "version": "0.25.0-dev.20261005004109",
4
4
  "description": "The Fully Decoupled Drupal Framework for Nuxt.js.",
5
5
  "keywords": [
6
6
  "cms",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "@storybook/addon-docs": "^6.5.16",
62
- "druxt-test-utils": "1.0.0-dev.20261002115337"
62
+ "druxt-test-utils": "1.0.0-dev.20261005004109"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "axios": "0.28.0",