houdini-svelte 1.2.45 → 1.2.47
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 +63 -15
- package/build/plugin-esm/index.js +63 -15
- package/build/preprocess-cjs/index.js +60 -13
- package/build/preprocess-esm/index.js +60 -13
- package/build/test-cjs/index.js +130 -31
- package/build/test-esm/index.js +130 -31
- 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(
|
|
@@ -77865,7 +77886,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
77865
77886
|
}
|
|
77866
77887
|
function parseJS(str, config2) {
|
|
77867
77888
|
const defaultConfig = {
|
|
77868
|
-
plugins: [
|
|
77889
|
+
plugins: [
|
|
77890
|
+
"typescript",
|
|
77891
|
+
"importAssertions",
|
|
77892
|
+
"decorators-legacy",
|
|
77893
|
+
"explicitResourceManagement"
|
|
77894
|
+
],
|
|
77869
77895
|
sourceType: "module"
|
|
77870
77896
|
};
|
|
77871
77897
|
return (0, import_parser.parse)(str || "", config2 ? deepMerge2("", defaultConfig, config2) : defaultConfig).program;
|
|
@@ -141730,9 +141756,12 @@ var InMemorySubscriptions2 = class {
|
|
|
141730
141756
|
removeSubscribers(id2, fieldName, specs) {
|
|
141731
141757
|
let targets = [];
|
|
141732
141758
|
const subscriber = this.subscribers.get(id2);
|
|
141733
|
-
|
|
141759
|
+
if (!subscriber) {
|
|
141760
|
+
return;
|
|
141761
|
+
}
|
|
141762
|
+
const subscriberField = subscriber.get(fieldName);
|
|
141734
141763
|
for (const spec of specs) {
|
|
141735
|
-
const counts = subscriber
|
|
141764
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
141736
141765
|
if (!counts?.has(spec.set)) {
|
|
141737
141766
|
continue;
|
|
141738
141767
|
}
|
|
@@ -141742,12 +141771,18 @@ var InMemorySubscriptions2 = class {
|
|
|
141742
141771
|
targets.push(spec.set);
|
|
141743
141772
|
counts.delete(spec.set);
|
|
141744
141773
|
}
|
|
141774
|
+
if (counts.size === 0) {
|
|
141775
|
+
subscriber.delete(fieldName);
|
|
141776
|
+
}
|
|
141745
141777
|
}
|
|
141746
141778
|
if (subscriberField) {
|
|
141747
141779
|
subscriberField.selections = this.get(id2, fieldName).filter(
|
|
141748
141780
|
([{ set }]) => !targets.includes(set)
|
|
141749
141781
|
);
|
|
141750
141782
|
}
|
|
141783
|
+
if (subscriber.size === 0) {
|
|
141784
|
+
this.subscribers.delete(id2);
|
|
141785
|
+
}
|
|
141751
141786
|
}
|
|
141752
141787
|
removeAllSubscribers(id2, targets, visited = []) {
|
|
141753
141788
|
visited.push(id2);
|
|
@@ -141768,6 +141803,15 @@ var InMemorySubscriptions2 = class {
|
|
|
141768
141803
|
}
|
|
141769
141804
|
}
|
|
141770
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
|
+
}
|
|
141771
141815
|
};
|
|
141772
141816
|
var Cache2 = class {
|
|
141773
141817
|
_internal_unstable;
|
|
@@ -141814,6 +141858,9 @@ var Cache2 = class {
|
|
|
141814
141858
|
};
|
|
141815
141859
|
}
|
|
141816
141860
|
subscribe(spec, variables = {}) {
|
|
141861
|
+
if (this._internal_unstable.disabled) {
|
|
141862
|
+
return;
|
|
141863
|
+
}
|
|
141817
141864
|
return this._internal_unstable.subscriptions.add({
|
|
141818
141865
|
parent: spec.parentID || rootID2,
|
|
141819
141866
|
spec,
|
|
@@ -141953,7 +142000,7 @@ var Cache2 = class {
|
|
|
141953
142000
|
}
|
|
141954
142001
|
};
|
|
141955
142002
|
var CacheInternal2 = class {
|
|
141956
|
-
|
|
142003
|
+
disabled = false;
|
|
141957
142004
|
_config;
|
|
141958
142005
|
storage;
|
|
141959
142006
|
subscriptions;
|
|
@@ -141984,10 +142031,10 @@ var CacheInternal2 = class {
|
|
|
141984
142031
|
this._config = config2;
|
|
141985
142032
|
this.componentCache = componentCache ?? {};
|
|
141986
142033
|
this.createComponent = createComponent ?? (() => ({}));
|
|
141987
|
-
this.
|
|
142034
|
+
this.disabled = disabled;
|
|
141988
142035
|
try {
|
|
141989
142036
|
if (process.env.HOUDINI_TEST === "true") {
|
|
141990
|
-
this.
|
|
142037
|
+
this.disabled = false;
|
|
141991
142038
|
}
|
|
141992
142039
|
} catch {
|
|
141993
142040
|
}
|
|
@@ -142009,7 +142056,7 @@ var CacheInternal2 = class {
|
|
|
142009
142056
|
forceNotify,
|
|
142010
142057
|
forceStale
|
|
142011
142058
|
}) {
|
|
142012
|
-
if (this.
|
|
142059
|
+
if (this.disabled) {
|
|
142013
142060
|
return [];
|
|
142014
142061
|
}
|
|
142015
142062
|
let targetSelection = getFieldsForType2(
|
|
@@ -172470,9 +172517,10 @@ import_node_fs3.default.readFileSync = function(fp, options) {
|
|
|
172470
172517
|
}
|
|
172471
172518
|
return _readFileSync(filepath, options);
|
|
172472
172519
|
};
|
|
172473
|
-
import_node_fs3.default.statSync = function(
|
|
172520
|
+
import_node_fs3.default.statSync = function(fp, options) {
|
|
172521
|
+
let filepath = fp.toString();
|
|
172474
172522
|
if (!filepath.includes("routes") || !path_exports.basename(filepath).startsWith("+")) {
|
|
172475
|
-
return _statSync(
|
|
172523
|
+
return _statSync(fp, options);
|
|
172476
172524
|
}
|
|
172477
172525
|
try {
|
|
172478
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(
|
|
@@ -77860,7 +77881,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
77860
77881
|
}
|
|
77861
77882
|
function parseJS(str, config2) {
|
|
77862
77883
|
const defaultConfig = {
|
|
77863
|
-
plugins: [
|
|
77884
|
+
plugins: [
|
|
77885
|
+
"typescript",
|
|
77886
|
+
"importAssertions",
|
|
77887
|
+
"decorators-legacy",
|
|
77888
|
+
"explicitResourceManagement"
|
|
77889
|
+
],
|
|
77864
77890
|
sourceType: "module"
|
|
77865
77891
|
};
|
|
77866
77892
|
return (0, import_parser.parse)(str || "", config2 ? deepMerge2("", defaultConfig, config2) : defaultConfig).program;
|
|
@@ -141724,9 +141750,12 @@ var InMemorySubscriptions2 = class {
|
|
|
141724
141750
|
removeSubscribers(id2, fieldName, specs) {
|
|
141725
141751
|
let targets = [];
|
|
141726
141752
|
const subscriber = this.subscribers.get(id2);
|
|
141727
|
-
|
|
141753
|
+
if (!subscriber) {
|
|
141754
|
+
return;
|
|
141755
|
+
}
|
|
141756
|
+
const subscriberField = subscriber.get(fieldName);
|
|
141728
141757
|
for (const spec of specs) {
|
|
141729
|
-
const counts = subscriber
|
|
141758
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
141730
141759
|
if (!counts?.has(spec.set)) {
|
|
141731
141760
|
continue;
|
|
141732
141761
|
}
|
|
@@ -141736,12 +141765,18 @@ var InMemorySubscriptions2 = class {
|
|
|
141736
141765
|
targets.push(spec.set);
|
|
141737
141766
|
counts.delete(spec.set);
|
|
141738
141767
|
}
|
|
141768
|
+
if (counts.size === 0) {
|
|
141769
|
+
subscriber.delete(fieldName);
|
|
141770
|
+
}
|
|
141739
141771
|
}
|
|
141740
141772
|
if (subscriberField) {
|
|
141741
141773
|
subscriberField.selections = this.get(id2, fieldName).filter(
|
|
141742
141774
|
([{ set }]) => !targets.includes(set)
|
|
141743
141775
|
);
|
|
141744
141776
|
}
|
|
141777
|
+
if (subscriber.size === 0) {
|
|
141778
|
+
this.subscribers.delete(id2);
|
|
141779
|
+
}
|
|
141745
141780
|
}
|
|
141746
141781
|
removeAllSubscribers(id2, targets, visited = []) {
|
|
141747
141782
|
visited.push(id2);
|
|
@@ -141762,6 +141797,15 @@ var InMemorySubscriptions2 = class {
|
|
|
141762
141797
|
}
|
|
141763
141798
|
}
|
|
141764
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
|
+
}
|
|
141765
141809
|
};
|
|
141766
141810
|
var Cache2 = class {
|
|
141767
141811
|
_internal_unstable;
|
|
@@ -141808,6 +141852,9 @@ var Cache2 = class {
|
|
|
141808
141852
|
};
|
|
141809
141853
|
}
|
|
141810
141854
|
subscribe(spec, variables = {}) {
|
|
141855
|
+
if (this._internal_unstable.disabled) {
|
|
141856
|
+
return;
|
|
141857
|
+
}
|
|
141811
141858
|
return this._internal_unstable.subscriptions.add({
|
|
141812
141859
|
parent: spec.parentID || rootID2,
|
|
141813
141860
|
spec,
|
|
@@ -141947,7 +141994,7 @@ var Cache2 = class {
|
|
|
141947
141994
|
}
|
|
141948
141995
|
};
|
|
141949
141996
|
var CacheInternal2 = class {
|
|
141950
|
-
|
|
141997
|
+
disabled = false;
|
|
141951
141998
|
_config;
|
|
141952
141999
|
storage;
|
|
141953
142000
|
subscriptions;
|
|
@@ -141978,10 +142025,10 @@ var CacheInternal2 = class {
|
|
|
141978
142025
|
this._config = config2;
|
|
141979
142026
|
this.componentCache = componentCache ?? {};
|
|
141980
142027
|
this.createComponent = createComponent ?? (() => ({}));
|
|
141981
|
-
this.
|
|
142028
|
+
this.disabled = disabled;
|
|
141982
142029
|
try {
|
|
141983
142030
|
if (process.env.HOUDINI_TEST === "true") {
|
|
141984
|
-
this.
|
|
142031
|
+
this.disabled = false;
|
|
141985
142032
|
}
|
|
141986
142033
|
} catch {
|
|
141987
142034
|
}
|
|
@@ -142003,7 +142050,7 @@ var CacheInternal2 = class {
|
|
|
142003
142050
|
forceNotify,
|
|
142004
142051
|
forceStale
|
|
142005
142052
|
}) {
|
|
142006
|
-
if (this.
|
|
142053
|
+
if (this.disabled) {
|
|
142007
142054
|
return [];
|
|
142008
142055
|
}
|
|
142009
142056
|
let targetSelection = getFieldsForType2(
|
|
@@ -172464,9 +172511,10 @@ filesystem.readFileSync = function(fp, options) {
|
|
|
172464
172511
|
}
|
|
172465
172512
|
return _readFileSync(filepath, options);
|
|
172466
172513
|
};
|
|
172467
|
-
filesystem.statSync = function(
|
|
172514
|
+
filesystem.statSync = function(fp, options) {
|
|
172515
|
+
let filepath = fp.toString();
|
|
172468
172516
|
if (!filepath.includes("routes") || !path_exports.basename(filepath).startsWith("+")) {
|
|
172469
|
-
return _statSync(
|
|
172517
|
+
return _statSync(fp, options);
|
|
172470
172518
|
}
|
|
172471
172519
|
try {
|
|
172472
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(
|
|
@@ -82067,7 +82088,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
82067
82088
|
}
|
|
82068
82089
|
function parseJS(str, config2) {
|
|
82069
82090
|
const defaultConfig = {
|
|
82070
|
-
plugins: [
|
|
82091
|
+
plugins: [
|
|
82092
|
+
"typescript",
|
|
82093
|
+
"importAssertions",
|
|
82094
|
+
"decorators-legacy",
|
|
82095
|
+
"explicitResourceManagement"
|
|
82096
|
+
],
|
|
82071
82097
|
sourceType: "module"
|
|
82072
82098
|
};
|
|
82073
82099
|
return (0, import_parser.parse)(str || "", config2 ? deepMerge2("", defaultConfig, config2) : defaultConfig).program;
|
|
@@ -173542,9 +173568,12 @@ var InMemorySubscriptions2 = class {
|
|
|
173542
173568
|
removeSubscribers(id2, fieldName, specs) {
|
|
173543
173569
|
let targets = [];
|
|
173544
173570
|
const subscriber = this.subscribers.get(id2);
|
|
173545
|
-
|
|
173571
|
+
if (!subscriber) {
|
|
173572
|
+
return;
|
|
173573
|
+
}
|
|
173574
|
+
const subscriberField = subscriber.get(fieldName);
|
|
173546
173575
|
for (const spec of specs) {
|
|
173547
|
-
const counts = subscriber
|
|
173576
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
173548
173577
|
if (!counts?.has(spec.set)) {
|
|
173549
173578
|
continue;
|
|
173550
173579
|
}
|
|
@@ -173554,12 +173583,18 @@ var InMemorySubscriptions2 = class {
|
|
|
173554
173583
|
targets.push(spec.set);
|
|
173555
173584
|
counts.delete(spec.set);
|
|
173556
173585
|
}
|
|
173586
|
+
if (counts.size === 0) {
|
|
173587
|
+
subscriber.delete(fieldName);
|
|
173588
|
+
}
|
|
173557
173589
|
}
|
|
173558
173590
|
if (subscriberField) {
|
|
173559
173591
|
subscriberField.selections = this.get(id2, fieldName).filter(
|
|
173560
173592
|
([{ set }]) => !targets.includes(set)
|
|
173561
173593
|
);
|
|
173562
173594
|
}
|
|
173595
|
+
if (subscriber.size === 0) {
|
|
173596
|
+
this.subscribers.delete(id2);
|
|
173597
|
+
}
|
|
173563
173598
|
}
|
|
173564
173599
|
removeAllSubscribers(id2, targets, visited = []) {
|
|
173565
173600
|
visited.push(id2);
|
|
@@ -173580,6 +173615,15 @@ var InMemorySubscriptions2 = class {
|
|
|
173580
173615
|
}
|
|
173581
173616
|
}
|
|
173582
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
|
+
}
|
|
173583
173627
|
};
|
|
173584
173628
|
var Cache2 = class {
|
|
173585
173629
|
_internal_unstable;
|
|
@@ -173626,6 +173670,9 @@ var Cache2 = class {
|
|
|
173626
173670
|
};
|
|
173627
173671
|
}
|
|
173628
173672
|
subscribe(spec, variables = {}) {
|
|
173673
|
+
if (this._internal_unstable.disabled) {
|
|
173674
|
+
return;
|
|
173675
|
+
}
|
|
173629
173676
|
return this._internal_unstable.subscriptions.add({
|
|
173630
173677
|
parent: spec.parentID || rootID2,
|
|
173631
173678
|
spec,
|
|
@@ -173765,7 +173812,7 @@ var Cache2 = class {
|
|
|
173765
173812
|
}
|
|
173766
173813
|
};
|
|
173767
173814
|
var CacheInternal2 = class {
|
|
173768
|
-
|
|
173815
|
+
disabled = false;
|
|
173769
173816
|
_config;
|
|
173770
173817
|
storage;
|
|
173771
173818
|
subscriptions;
|
|
@@ -173796,10 +173843,10 @@ var CacheInternal2 = class {
|
|
|
173796
173843
|
this._config = config2;
|
|
173797
173844
|
this.componentCache = componentCache ?? {};
|
|
173798
173845
|
this.createComponent = createComponent ?? (() => ({}));
|
|
173799
|
-
this.
|
|
173846
|
+
this.disabled = disabled;
|
|
173800
173847
|
try {
|
|
173801
173848
|
if (process.env.HOUDINI_TEST === "true") {
|
|
173802
|
-
this.
|
|
173849
|
+
this.disabled = false;
|
|
173803
173850
|
}
|
|
173804
173851
|
} catch {
|
|
173805
173852
|
}
|
|
@@ -173821,7 +173868,7 @@ var CacheInternal2 = class {
|
|
|
173821
173868
|
forceNotify,
|
|
173822
173869
|
forceStale
|
|
173823
173870
|
}) {
|
|
173824
|
-
if (this.
|
|
173871
|
+
if (this.disabled) {
|
|
173825
173872
|
return [];
|
|
173826
173873
|
}
|
|
173827
173874
|
let targetSelection = getFieldsForType2(
|