houdini-svelte 1.2.46 → 1.2.48
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/build/plugin-cjs/index.js +57 -14
- package/build/plugin-esm/index.js +57 -14
- package/build/preprocess-cjs/index.js +54 -12
- package/build/preprocess-esm/index.js +54 -12
- package/build/test-cjs/index.js +111 -26
- package/build/test-esm/index.js +111 -26
- package/package.json +2 -2
|
@@ -76801,9 +76801,12 @@ var InMemorySubscriptions = class {
|
|
|
76801
76801
|
removeSubscribers(id2, fieldName, specs) {
|
|
76802
76802
|
let targets = [];
|
|
76803
76803
|
const subscriber = this.subscribers.get(id2);
|
|
76804
|
-
|
|
76804
|
+
if (!subscriber) {
|
|
76805
|
+
return;
|
|
76806
|
+
}
|
|
76807
|
+
const subscriberField = subscriber.get(fieldName);
|
|
76805
76808
|
for (const spec of specs) {
|
|
76806
|
-
const counts = subscriber
|
|
76809
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
76807
76810
|
if (!counts?.has(spec.set)) {
|
|
76808
76811
|
continue;
|
|
76809
76812
|
}
|
|
@@ -76813,12 +76816,18 @@ var InMemorySubscriptions = class {
|
|
|
76813
76816
|
targets.push(spec.set);
|
|
76814
76817
|
counts.delete(spec.set);
|
|
76815
76818
|
}
|
|
76819
|
+
if (counts.size === 0) {
|
|
76820
|
+
subscriber.delete(fieldName);
|
|
76821
|
+
}
|
|
76816
76822
|
}
|
|
76817
76823
|
if (subscriberField) {
|
|
76818
76824
|
subscriberField.selections = this.get(id2, fieldName).filter(
|
|
76819
76825
|
([{ set }]) => !targets.includes(set)
|
|
76820
76826
|
);
|
|
76821
76827
|
}
|
|
76828
|
+
if (subscriber.size === 0) {
|
|
76829
|
+
this.subscribers.delete(id2);
|
|
76830
|
+
}
|
|
76822
76831
|
}
|
|
76823
76832
|
removeAllSubscribers(id2, targets, visited = []) {
|
|
76824
76833
|
visited.push(id2);
|
|
@@ -76839,6 +76848,15 @@ var InMemorySubscriptions = class {
|
|
|
76839
76848
|
}
|
|
76840
76849
|
}
|
|
76841
76850
|
}
|
|
76851
|
+
get size() {
|
|
76852
|
+
let size = 0;
|
|
76853
|
+
for (const [, nodeCounts] of this.subscribers) {
|
|
76854
|
+
for (const [, { referenceCounts }] of nodeCounts) {
|
|
76855
|
+
size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
|
|
76856
|
+
}
|
|
76857
|
+
}
|
|
76858
|
+
return size;
|
|
76859
|
+
}
|
|
76842
76860
|
};
|
|
76843
76861
|
var Cache = class {
|
|
76844
76862
|
_internal_unstable;
|
|
@@ -76885,6 +76903,9 @@ var Cache = class {
|
|
|
76885
76903
|
};
|
|
76886
76904
|
}
|
|
76887
76905
|
subscribe(spec, variables = {}) {
|
|
76906
|
+
if (this._internal_unstable.disabled) {
|
|
76907
|
+
return;
|
|
76908
|
+
}
|
|
76888
76909
|
return this._internal_unstable.subscriptions.add({
|
|
76889
76910
|
parent: spec.parentID || rootID,
|
|
76890
76911
|
spec,
|
|
@@ -77024,7 +77045,7 @@ var Cache = class {
|
|
|
77024
77045
|
}
|
|
77025
77046
|
};
|
|
77026
77047
|
var CacheInternal = class {
|
|
77027
|
-
|
|
77048
|
+
disabled = false;
|
|
77028
77049
|
_config;
|
|
77029
77050
|
storage;
|
|
77030
77051
|
subscriptions;
|
|
@@ -77055,10 +77076,10 @@ var CacheInternal = class {
|
|
|
77055
77076
|
this._config = config2;
|
|
77056
77077
|
this.componentCache = componentCache ?? {};
|
|
77057
77078
|
this.createComponent = createComponent ?? (() => ({}));
|
|
77058
|
-
this.
|
|
77079
|
+
this.disabled = disabled;
|
|
77059
77080
|
try {
|
|
77060
77081
|
if (process.env.HOUDINI_TEST === "true") {
|
|
77061
|
-
this.
|
|
77082
|
+
this.disabled = false;
|
|
77062
77083
|
}
|
|
77063
77084
|
} catch {
|
|
77064
77085
|
}
|
|
@@ -77080,7 +77101,7 @@ var CacheInternal = class {
|
|
|
77080
77101
|
forceNotify,
|
|
77081
77102
|
forceStale
|
|
77082
77103
|
}) {
|
|
77083
|
-
if (this.
|
|
77104
|
+
if (this.disabled) {
|
|
77084
77105
|
return [];
|
|
77085
77106
|
}
|
|
77086
77107
|
let targetSelection = getFieldsForType(
|
|
@@ -141735,9 +141756,12 @@ var InMemorySubscriptions2 = class {
|
|
|
141735
141756
|
removeSubscribers(id2, fieldName, specs) {
|
|
141736
141757
|
let targets = [];
|
|
141737
141758
|
const subscriber = this.subscribers.get(id2);
|
|
141738
|
-
|
|
141759
|
+
if (!subscriber) {
|
|
141760
|
+
return;
|
|
141761
|
+
}
|
|
141762
|
+
const subscriberField = subscriber.get(fieldName);
|
|
141739
141763
|
for (const spec of specs) {
|
|
141740
|
-
const counts = subscriber
|
|
141764
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
141741
141765
|
if (!counts?.has(spec.set)) {
|
|
141742
141766
|
continue;
|
|
141743
141767
|
}
|
|
@@ -141747,12 +141771,18 @@ var InMemorySubscriptions2 = class {
|
|
|
141747
141771
|
targets.push(spec.set);
|
|
141748
141772
|
counts.delete(spec.set);
|
|
141749
141773
|
}
|
|
141774
|
+
if (counts.size === 0) {
|
|
141775
|
+
subscriber.delete(fieldName);
|
|
141776
|
+
}
|
|
141750
141777
|
}
|
|
141751
141778
|
if (subscriberField) {
|
|
141752
141779
|
subscriberField.selections = this.get(id2, fieldName).filter(
|
|
141753
141780
|
([{ set }]) => !targets.includes(set)
|
|
141754
141781
|
);
|
|
141755
141782
|
}
|
|
141783
|
+
if (subscriber.size === 0) {
|
|
141784
|
+
this.subscribers.delete(id2);
|
|
141785
|
+
}
|
|
141756
141786
|
}
|
|
141757
141787
|
removeAllSubscribers(id2, targets, visited = []) {
|
|
141758
141788
|
visited.push(id2);
|
|
@@ -141773,6 +141803,15 @@ var InMemorySubscriptions2 = class {
|
|
|
141773
141803
|
}
|
|
141774
141804
|
}
|
|
141775
141805
|
}
|
|
141806
|
+
get size() {
|
|
141807
|
+
let size = 0;
|
|
141808
|
+
for (const [, nodeCounts] of this.subscribers) {
|
|
141809
|
+
for (const [, { referenceCounts }] of nodeCounts) {
|
|
141810
|
+
size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
|
|
141811
|
+
}
|
|
141812
|
+
}
|
|
141813
|
+
return size;
|
|
141814
|
+
}
|
|
141776
141815
|
};
|
|
141777
141816
|
var Cache2 = class {
|
|
141778
141817
|
_internal_unstable;
|
|
@@ -141819,6 +141858,9 @@ var Cache2 = class {
|
|
|
141819
141858
|
};
|
|
141820
141859
|
}
|
|
141821
141860
|
subscribe(spec, variables = {}) {
|
|
141861
|
+
if (this._internal_unstable.disabled) {
|
|
141862
|
+
return;
|
|
141863
|
+
}
|
|
141822
141864
|
return this._internal_unstable.subscriptions.add({
|
|
141823
141865
|
parent: spec.parentID || rootID2,
|
|
141824
141866
|
spec,
|
|
@@ -141958,7 +142000,7 @@ var Cache2 = class {
|
|
|
141958
142000
|
}
|
|
141959
142001
|
};
|
|
141960
142002
|
var CacheInternal2 = class {
|
|
141961
|
-
|
|
142003
|
+
disabled = false;
|
|
141962
142004
|
_config;
|
|
141963
142005
|
storage;
|
|
141964
142006
|
subscriptions;
|
|
@@ -141989,10 +142031,10 @@ var CacheInternal2 = class {
|
|
|
141989
142031
|
this._config = config2;
|
|
141990
142032
|
this.componentCache = componentCache ?? {};
|
|
141991
142033
|
this.createComponent = createComponent ?? (() => ({}));
|
|
141992
|
-
this.
|
|
142034
|
+
this.disabled = disabled;
|
|
141993
142035
|
try {
|
|
141994
142036
|
if (process.env.HOUDINI_TEST === "true") {
|
|
141995
|
-
this.
|
|
142037
|
+
this.disabled = false;
|
|
141996
142038
|
}
|
|
141997
142039
|
} catch {
|
|
141998
142040
|
}
|
|
@@ -142014,7 +142056,7 @@ var CacheInternal2 = class {
|
|
|
142014
142056
|
forceNotify,
|
|
142015
142057
|
forceStale
|
|
142016
142058
|
}) {
|
|
142017
|
-
if (this.
|
|
142059
|
+
if (this.disabled) {
|
|
142018
142060
|
return [];
|
|
142019
142061
|
}
|
|
142020
142062
|
let targetSelection = getFieldsForType2(
|
|
@@ -172475,9 +172517,10 @@ import_node_fs3.default.readFileSync = function(fp, options) {
|
|
|
172475
172517
|
}
|
|
172476
172518
|
return _readFileSync(filepath, options);
|
|
172477
172519
|
};
|
|
172478
|
-
import_node_fs3.default.statSync = function(
|
|
172520
|
+
import_node_fs3.default.statSync = function(fp, options) {
|
|
172521
|
+
let filepath = fp.toString();
|
|
172479
172522
|
if (!filepath.includes("routes") || !path_exports.basename(filepath).startsWith("+")) {
|
|
172480
|
-
return _statSync(
|
|
172523
|
+
return _statSync(fp, options);
|
|
172481
172524
|
}
|
|
172482
172525
|
try {
|
|
172483
172526
|
const result = _statSync(filepath, options);
|
|
@@ -76796,9 +76796,12 @@ var InMemorySubscriptions = class {
|
|
|
76796
76796
|
removeSubscribers(id2, fieldName, specs) {
|
|
76797
76797
|
let targets = [];
|
|
76798
76798
|
const subscriber = this.subscribers.get(id2);
|
|
76799
|
-
|
|
76799
|
+
if (!subscriber) {
|
|
76800
|
+
return;
|
|
76801
|
+
}
|
|
76802
|
+
const subscriberField = subscriber.get(fieldName);
|
|
76800
76803
|
for (const spec of specs) {
|
|
76801
|
-
const counts = subscriber
|
|
76804
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
76802
76805
|
if (!counts?.has(spec.set)) {
|
|
76803
76806
|
continue;
|
|
76804
76807
|
}
|
|
@@ -76808,12 +76811,18 @@ var InMemorySubscriptions = class {
|
|
|
76808
76811
|
targets.push(spec.set);
|
|
76809
76812
|
counts.delete(spec.set);
|
|
76810
76813
|
}
|
|
76814
|
+
if (counts.size === 0) {
|
|
76815
|
+
subscriber.delete(fieldName);
|
|
76816
|
+
}
|
|
76811
76817
|
}
|
|
76812
76818
|
if (subscriberField) {
|
|
76813
76819
|
subscriberField.selections = this.get(id2, fieldName).filter(
|
|
76814
76820
|
([{ set }]) => !targets.includes(set)
|
|
76815
76821
|
);
|
|
76816
76822
|
}
|
|
76823
|
+
if (subscriber.size === 0) {
|
|
76824
|
+
this.subscribers.delete(id2);
|
|
76825
|
+
}
|
|
76817
76826
|
}
|
|
76818
76827
|
removeAllSubscribers(id2, targets, visited = []) {
|
|
76819
76828
|
visited.push(id2);
|
|
@@ -76834,6 +76843,15 @@ var InMemorySubscriptions = class {
|
|
|
76834
76843
|
}
|
|
76835
76844
|
}
|
|
76836
76845
|
}
|
|
76846
|
+
get size() {
|
|
76847
|
+
let size = 0;
|
|
76848
|
+
for (const [, nodeCounts] of this.subscribers) {
|
|
76849
|
+
for (const [, { referenceCounts }] of nodeCounts) {
|
|
76850
|
+
size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
|
|
76851
|
+
}
|
|
76852
|
+
}
|
|
76853
|
+
return size;
|
|
76854
|
+
}
|
|
76837
76855
|
};
|
|
76838
76856
|
var Cache = class {
|
|
76839
76857
|
_internal_unstable;
|
|
@@ -76880,6 +76898,9 @@ var Cache = class {
|
|
|
76880
76898
|
};
|
|
76881
76899
|
}
|
|
76882
76900
|
subscribe(spec, variables = {}) {
|
|
76901
|
+
if (this._internal_unstable.disabled) {
|
|
76902
|
+
return;
|
|
76903
|
+
}
|
|
76883
76904
|
return this._internal_unstable.subscriptions.add({
|
|
76884
76905
|
parent: spec.parentID || rootID,
|
|
76885
76906
|
spec,
|
|
@@ -77019,7 +77040,7 @@ var Cache = class {
|
|
|
77019
77040
|
}
|
|
77020
77041
|
};
|
|
77021
77042
|
var CacheInternal = class {
|
|
77022
|
-
|
|
77043
|
+
disabled = false;
|
|
77023
77044
|
_config;
|
|
77024
77045
|
storage;
|
|
77025
77046
|
subscriptions;
|
|
@@ -77050,10 +77071,10 @@ var CacheInternal = class {
|
|
|
77050
77071
|
this._config = config2;
|
|
77051
77072
|
this.componentCache = componentCache ?? {};
|
|
77052
77073
|
this.createComponent = createComponent ?? (() => ({}));
|
|
77053
|
-
this.
|
|
77074
|
+
this.disabled = disabled;
|
|
77054
77075
|
try {
|
|
77055
77076
|
if (process.env.HOUDINI_TEST === "true") {
|
|
77056
|
-
this.
|
|
77077
|
+
this.disabled = false;
|
|
77057
77078
|
}
|
|
77058
77079
|
} catch {
|
|
77059
77080
|
}
|
|
@@ -77075,7 +77096,7 @@ var CacheInternal = class {
|
|
|
77075
77096
|
forceNotify,
|
|
77076
77097
|
forceStale
|
|
77077
77098
|
}) {
|
|
77078
|
-
if (this.
|
|
77099
|
+
if (this.disabled) {
|
|
77079
77100
|
return [];
|
|
77080
77101
|
}
|
|
77081
77102
|
let targetSelection = getFieldsForType(
|
|
@@ -141729,9 +141750,12 @@ var InMemorySubscriptions2 = class {
|
|
|
141729
141750
|
removeSubscribers(id2, fieldName, specs) {
|
|
141730
141751
|
let targets = [];
|
|
141731
141752
|
const subscriber = this.subscribers.get(id2);
|
|
141732
|
-
|
|
141753
|
+
if (!subscriber) {
|
|
141754
|
+
return;
|
|
141755
|
+
}
|
|
141756
|
+
const subscriberField = subscriber.get(fieldName);
|
|
141733
141757
|
for (const spec of specs) {
|
|
141734
|
-
const counts = subscriber
|
|
141758
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
141735
141759
|
if (!counts?.has(spec.set)) {
|
|
141736
141760
|
continue;
|
|
141737
141761
|
}
|
|
@@ -141741,12 +141765,18 @@ var InMemorySubscriptions2 = class {
|
|
|
141741
141765
|
targets.push(spec.set);
|
|
141742
141766
|
counts.delete(spec.set);
|
|
141743
141767
|
}
|
|
141768
|
+
if (counts.size === 0) {
|
|
141769
|
+
subscriber.delete(fieldName);
|
|
141770
|
+
}
|
|
141744
141771
|
}
|
|
141745
141772
|
if (subscriberField) {
|
|
141746
141773
|
subscriberField.selections = this.get(id2, fieldName).filter(
|
|
141747
141774
|
([{ set }]) => !targets.includes(set)
|
|
141748
141775
|
);
|
|
141749
141776
|
}
|
|
141777
|
+
if (subscriber.size === 0) {
|
|
141778
|
+
this.subscribers.delete(id2);
|
|
141779
|
+
}
|
|
141750
141780
|
}
|
|
141751
141781
|
removeAllSubscribers(id2, targets, visited = []) {
|
|
141752
141782
|
visited.push(id2);
|
|
@@ -141767,6 +141797,15 @@ var InMemorySubscriptions2 = class {
|
|
|
141767
141797
|
}
|
|
141768
141798
|
}
|
|
141769
141799
|
}
|
|
141800
|
+
get size() {
|
|
141801
|
+
let size = 0;
|
|
141802
|
+
for (const [, nodeCounts] of this.subscribers) {
|
|
141803
|
+
for (const [, { referenceCounts }] of nodeCounts) {
|
|
141804
|
+
size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
|
|
141805
|
+
}
|
|
141806
|
+
}
|
|
141807
|
+
return size;
|
|
141808
|
+
}
|
|
141770
141809
|
};
|
|
141771
141810
|
var Cache2 = class {
|
|
141772
141811
|
_internal_unstable;
|
|
@@ -141813,6 +141852,9 @@ var Cache2 = class {
|
|
|
141813
141852
|
};
|
|
141814
141853
|
}
|
|
141815
141854
|
subscribe(spec, variables = {}) {
|
|
141855
|
+
if (this._internal_unstable.disabled) {
|
|
141856
|
+
return;
|
|
141857
|
+
}
|
|
141816
141858
|
return this._internal_unstable.subscriptions.add({
|
|
141817
141859
|
parent: spec.parentID || rootID2,
|
|
141818
141860
|
spec,
|
|
@@ -141952,7 +141994,7 @@ var Cache2 = class {
|
|
|
141952
141994
|
}
|
|
141953
141995
|
};
|
|
141954
141996
|
var CacheInternal2 = class {
|
|
141955
|
-
|
|
141997
|
+
disabled = false;
|
|
141956
141998
|
_config;
|
|
141957
141999
|
storage;
|
|
141958
142000
|
subscriptions;
|
|
@@ -141983,10 +142025,10 @@ var CacheInternal2 = class {
|
|
|
141983
142025
|
this._config = config2;
|
|
141984
142026
|
this.componentCache = componentCache ?? {};
|
|
141985
142027
|
this.createComponent = createComponent ?? (() => ({}));
|
|
141986
|
-
this.
|
|
142028
|
+
this.disabled = disabled;
|
|
141987
142029
|
try {
|
|
141988
142030
|
if (process.env.HOUDINI_TEST === "true") {
|
|
141989
|
-
this.
|
|
142031
|
+
this.disabled = false;
|
|
141990
142032
|
}
|
|
141991
142033
|
} catch {
|
|
141992
142034
|
}
|
|
@@ -142008,7 +142050,7 @@ var CacheInternal2 = class {
|
|
|
142008
142050
|
forceNotify,
|
|
142009
142051
|
forceStale
|
|
142010
142052
|
}) {
|
|
142011
|
-
if (this.
|
|
142053
|
+
if (this.disabled) {
|
|
142012
142054
|
return [];
|
|
142013
142055
|
}
|
|
142014
142056
|
let targetSelection = getFieldsForType2(
|
|
@@ -172469,9 +172511,10 @@ filesystem.readFileSync = function(fp, options) {
|
|
|
172469
172511
|
}
|
|
172470
172512
|
return _readFileSync(filepath, options);
|
|
172471
172513
|
};
|
|
172472
|
-
filesystem.statSync = function(
|
|
172514
|
+
filesystem.statSync = function(fp, options) {
|
|
172515
|
+
let filepath = fp.toString();
|
|
172473
172516
|
if (!filepath.includes("routes") || !path_exports.basename(filepath).startsWith("+")) {
|
|
172474
|
-
return _statSync(
|
|
172517
|
+
return _statSync(fp, options);
|
|
172475
172518
|
}
|
|
172476
172519
|
try {
|
|
172477
172520
|
const result = _statSync(filepath, options);
|
|
@@ -80136,9 +80136,12 @@ var InMemorySubscriptions = class {
|
|
|
80136
80136
|
removeSubscribers(id2, fieldName, specs) {
|
|
80137
80137
|
let targets = [];
|
|
80138
80138
|
const subscriber = this.subscribers.get(id2);
|
|
80139
|
-
|
|
80139
|
+
if (!subscriber) {
|
|
80140
|
+
return;
|
|
80141
|
+
}
|
|
80142
|
+
const subscriberField = subscriber.get(fieldName);
|
|
80140
80143
|
for (const spec of specs) {
|
|
80141
|
-
const counts = subscriber
|
|
80144
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
80142
80145
|
if (!counts?.has(spec.set)) {
|
|
80143
80146
|
continue;
|
|
80144
80147
|
}
|
|
@@ -80148,12 +80151,18 @@ var InMemorySubscriptions = class {
|
|
|
80148
80151
|
targets.push(spec.set);
|
|
80149
80152
|
counts.delete(spec.set);
|
|
80150
80153
|
}
|
|
80154
|
+
if (counts.size === 0) {
|
|
80155
|
+
subscriber.delete(fieldName);
|
|
80156
|
+
}
|
|
80151
80157
|
}
|
|
80152
80158
|
if (subscriberField) {
|
|
80153
80159
|
subscriberField.selections = this.get(id2, fieldName).filter(
|
|
80154
80160
|
([{ set }]) => !targets.includes(set)
|
|
80155
80161
|
);
|
|
80156
80162
|
}
|
|
80163
|
+
if (subscriber.size === 0) {
|
|
80164
|
+
this.subscribers.delete(id2);
|
|
80165
|
+
}
|
|
80157
80166
|
}
|
|
80158
80167
|
removeAllSubscribers(id2, targets, visited = []) {
|
|
80159
80168
|
visited.push(id2);
|
|
@@ -80174,6 +80183,15 @@ var InMemorySubscriptions = class {
|
|
|
80174
80183
|
}
|
|
80175
80184
|
}
|
|
80176
80185
|
}
|
|
80186
|
+
get size() {
|
|
80187
|
+
let size = 0;
|
|
80188
|
+
for (const [, nodeCounts] of this.subscribers) {
|
|
80189
|
+
for (const [, { referenceCounts }] of nodeCounts) {
|
|
80190
|
+
size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
|
|
80191
|
+
}
|
|
80192
|
+
}
|
|
80193
|
+
return size;
|
|
80194
|
+
}
|
|
80177
80195
|
};
|
|
80178
80196
|
var Cache = class {
|
|
80179
80197
|
_internal_unstable;
|
|
@@ -80220,6 +80238,9 @@ var Cache = class {
|
|
|
80220
80238
|
};
|
|
80221
80239
|
}
|
|
80222
80240
|
subscribe(spec, variables = {}) {
|
|
80241
|
+
if (this._internal_unstable.disabled) {
|
|
80242
|
+
return;
|
|
80243
|
+
}
|
|
80223
80244
|
return this._internal_unstable.subscriptions.add({
|
|
80224
80245
|
parent: spec.parentID || rootID,
|
|
80225
80246
|
spec,
|
|
@@ -80359,7 +80380,7 @@ var Cache = class {
|
|
|
80359
80380
|
}
|
|
80360
80381
|
};
|
|
80361
80382
|
var CacheInternal = class {
|
|
80362
|
-
|
|
80383
|
+
disabled = false;
|
|
80363
80384
|
_config;
|
|
80364
80385
|
storage;
|
|
80365
80386
|
subscriptions;
|
|
@@ -80390,10 +80411,10 @@ var CacheInternal = class {
|
|
|
80390
80411
|
this._config = config2;
|
|
80391
80412
|
this.componentCache = componentCache ?? {};
|
|
80392
80413
|
this.createComponent = createComponent ?? (() => ({}));
|
|
80393
|
-
this.
|
|
80414
|
+
this.disabled = disabled;
|
|
80394
80415
|
try {
|
|
80395
80416
|
if (process.env.HOUDINI_TEST === "true") {
|
|
80396
|
-
this.
|
|
80417
|
+
this.disabled = false;
|
|
80397
80418
|
}
|
|
80398
80419
|
} catch {
|
|
80399
80420
|
}
|
|
@@ -80415,7 +80436,7 @@ var CacheInternal = class {
|
|
|
80415
80436
|
forceNotify,
|
|
80416
80437
|
forceStale
|
|
80417
80438
|
}) {
|
|
80418
|
-
if (this.
|
|
80439
|
+
if (this.disabled) {
|
|
80419
80440
|
return [];
|
|
80420
80441
|
}
|
|
80421
80442
|
let targetSelection = getFieldsForType(
|
|
@@ -173547,9 +173568,12 @@ var InMemorySubscriptions2 = class {
|
|
|
173547
173568
|
removeSubscribers(id2, fieldName, specs) {
|
|
173548
173569
|
let targets = [];
|
|
173549
173570
|
const subscriber = this.subscribers.get(id2);
|
|
173550
|
-
|
|
173571
|
+
if (!subscriber) {
|
|
173572
|
+
return;
|
|
173573
|
+
}
|
|
173574
|
+
const subscriberField = subscriber.get(fieldName);
|
|
173551
173575
|
for (const spec of specs) {
|
|
173552
|
-
const counts = subscriber
|
|
173576
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
173553
173577
|
if (!counts?.has(spec.set)) {
|
|
173554
173578
|
continue;
|
|
173555
173579
|
}
|
|
@@ -173559,12 +173583,18 @@ var InMemorySubscriptions2 = class {
|
|
|
173559
173583
|
targets.push(spec.set);
|
|
173560
173584
|
counts.delete(spec.set);
|
|
173561
173585
|
}
|
|
173586
|
+
if (counts.size === 0) {
|
|
173587
|
+
subscriber.delete(fieldName);
|
|
173588
|
+
}
|
|
173562
173589
|
}
|
|
173563
173590
|
if (subscriberField) {
|
|
173564
173591
|
subscriberField.selections = this.get(id2, fieldName).filter(
|
|
173565
173592
|
([{ set }]) => !targets.includes(set)
|
|
173566
173593
|
);
|
|
173567
173594
|
}
|
|
173595
|
+
if (subscriber.size === 0) {
|
|
173596
|
+
this.subscribers.delete(id2);
|
|
173597
|
+
}
|
|
173568
173598
|
}
|
|
173569
173599
|
removeAllSubscribers(id2, targets, visited = []) {
|
|
173570
173600
|
visited.push(id2);
|
|
@@ -173585,6 +173615,15 @@ var InMemorySubscriptions2 = class {
|
|
|
173585
173615
|
}
|
|
173586
173616
|
}
|
|
173587
173617
|
}
|
|
173618
|
+
get size() {
|
|
173619
|
+
let size = 0;
|
|
173620
|
+
for (const [, nodeCounts] of this.subscribers) {
|
|
173621
|
+
for (const [, { referenceCounts }] of nodeCounts) {
|
|
173622
|
+
size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
|
|
173623
|
+
}
|
|
173624
|
+
}
|
|
173625
|
+
return size;
|
|
173626
|
+
}
|
|
173588
173627
|
};
|
|
173589
173628
|
var Cache2 = class {
|
|
173590
173629
|
_internal_unstable;
|
|
@@ -173631,6 +173670,9 @@ var Cache2 = class {
|
|
|
173631
173670
|
};
|
|
173632
173671
|
}
|
|
173633
173672
|
subscribe(spec, variables = {}) {
|
|
173673
|
+
if (this._internal_unstable.disabled) {
|
|
173674
|
+
return;
|
|
173675
|
+
}
|
|
173634
173676
|
return this._internal_unstable.subscriptions.add({
|
|
173635
173677
|
parent: spec.parentID || rootID2,
|
|
173636
173678
|
spec,
|
|
@@ -173770,7 +173812,7 @@ var Cache2 = class {
|
|
|
173770
173812
|
}
|
|
173771
173813
|
};
|
|
173772
173814
|
var CacheInternal2 = class {
|
|
173773
|
-
|
|
173815
|
+
disabled = false;
|
|
173774
173816
|
_config;
|
|
173775
173817
|
storage;
|
|
173776
173818
|
subscriptions;
|
|
@@ -173801,10 +173843,10 @@ var CacheInternal2 = class {
|
|
|
173801
173843
|
this._config = config2;
|
|
173802
173844
|
this.componentCache = componentCache ?? {};
|
|
173803
173845
|
this.createComponent = createComponent ?? (() => ({}));
|
|
173804
|
-
this.
|
|
173846
|
+
this.disabled = disabled;
|
|
173805
173847
|
try {
|
|
173806
173848
|
if (process.env.HOUDINI_TEST === "true") {
|
|
173807
|
-
this.
|
|
173849
|
+
this.disabled = false;
|
|
173808
173850
|
}
|
|
173809
173851
|
} catch {
|
|
173810
173852
|
}
|
|
@@ -173826,7 +173868,7 @@ var CacheInternal2 = class {
|
|
|
173826
173868
|
forceNotify,
|
|
173827
173869
|
forceStale
|
|
173828
173870
|
}) {
|
|
173829
|
-
if (this.
|
|
173871
|
+
if (this.disabled) {
|
|
173830
173872
|
return [];
|
|
173831
173873
|
}
|
|
173832
173874
|
let targetSelection = getFieldsForType2(
|