houdini 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/cmd-cjs/index.js +42 -12
- package/build/cmd-esm/index.js +42 -12
- package/build/codegen-cjs/index.js +40 -10
- package/build/codegen-esm/index.js +40 -10
- package/build/lib-cjs/index.js +91 -12
- package/build/lib-esm/index.js +91 -12
- package/build/runtime/cache/cache.d.ts +1 -1
- package/build/runtime/cache/subscription.d.ts +1 -0
- package/build/runtime/router/match.d.ts +3 -2
- package/build/runtime-cjs/cache/cache.d.ts +1 -1
- package/build/runtime-cjs/cache/cache.js +7 -4
- package/build/runtime-cjs/cache/subscription.d.ts +1 -0
- package/build/runtime-cjs/cache/subscription.js +20 -2
- package/build/runtime-cjs/client/plugins/cache.js +1 -1
- package/build/runtime-cjs/client/plugins/fetchParams.js +1 -1
- package/build/runtime-cjs/router/match.d.ts +3 -2
- package/build/runtime-cjs/router/match.js +13 -2
- package/build/runtime-cjs/router/server.js +1 -1
- package/build/runtime-esm/cache/cache.d.ts +1 -1
- package/build/runtime-esm/cache/cache.js +7 -4
- package/build/runtime-esm/cache/subscription.d.ts +1 -0
- package/build/runtime-esm/cache/subscription.js +20 -2
- package/build/runtime-esm/client/plugins/cache.js +1 -1
- package/build/runtime-esm/client/plugins/fetchParams.js +1 -1
- package/build/runtime-esm/router/match.d.ts +3 -2
- package/build/runtime-esm/router/match.js +13 -2
- package/build/runtime-esm/router/server.js +1 -1
- package/build/test-cjs/index.js +40 -10
- package/build/test-esm/index.js +40 -10
- package/build/vite-cjs/index.js +52 -11
- package/build/vite-esm/index.js +52 -11
- package/package.json +1 -1
package/build/cmd-cjs/index.js
CHANGED
|
@@ -66262,9 +66262,12 @@ var InMemorySubscriptions = class {
|
|
|
66262
66262
|
removeSubscribers(id, fieldName, specs) {
|
|
66263
66263
|
let targets = [];
|
|
66264
66264
|
const subscriber = this.subscribers.get(id);
|
|
66265
|
-
|
|
66265
|
+
if (!subscriber) {
|
|
66266
|
+
return;
|
|
66267
|
+
}
|
|
66268
|
+
const subscriberField = subscriber.get(fieldName);
|
|
66266
66269
|
for (const spec of specs) {
|
|
66267
|
-
const counts = subscriber
|
|
66270
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
66268
66271
|
if (!counts?.has(spec.set)) {
|
|
66269
66272
|
continue;
|
|
66270
66273
|
}
|
|
@@ -66274,12 +66277,18 @@ var InMemorySubscriptions = class {
|
|
|
66274
66277
|
targets.push(spec.set);
|
|
66275
66278
|
counts.delete(spec.set);
|
|
66276
66279
|
}
|
|
66280
|
+
if (counts.size === 0) {
|
|
66281
|
+
subscriber.delete(fieldName);
|
|
66282
|
+
}
|
|
66277
66283
|
}
|
|
66278
66284
|
if (subscriberField) {
|
|
66279
66285
|
subscriberField.selections = this.get(id, fieldName).filter(
|
|
66280
66286
|
([{ set }]) => !targets.includes(set)
|
|
66281
66287
|
);
|
|
66282
66288
|
}
|
|
66289
|
+
if (subscriber.size === 0) {
|
|
66290
|
+
this.subscribers.delete(id);
|
|
66291
|
+
}
|
|
66283
66292
|
}
|
|
66284
66293
|
removeAllSubscribers(id, targets, visited = []) {
|
|
66285
66294
|
visited.push(id);
|
|
@@ -66300,6 +66309,15 @@ var InMemorySubscriptions = class {
|
|
|
66300
66309
|
}
|
|
66301
66310
|
}
|
|
66302
66311
|
}
|
|
66312
|
+
get size() {
|
|
66313
|
+
let size = 0;
|
|
66314
|
+
for (const [, nodeCounts] of this.subscribers) {
|
|
66315
|
+
for (const [, { referenceCounts }] of nodeCounts) {
|
|
66316
|
+
size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
|
|
66317
|
+
}
|
|
66318
|
+
}
|
|
66319
|
+
return size;
|
|
66320
|
+
}
|
|
66303
66321
|
};
|
|
66304
66322
|
|
|
66305
66323
|
// src/runtime/cache/cache.ts
|
|
@@ -66348,6 +66366,9 @@ var Cache = class {
|
|
|
66348
66366
|
};
|
|
66349
66367
|
}
|
|
66350
66368
|
subscribe(spec, variables = {}) {
|
|
66369
|
+
if (this._internal_unstable.disabled) {
|
|
66370
|
+
return;
|
|
66371
|
+
}
|
|
66351
66372
|
return this._internal_unstable.subscriptions.add({
|
|
66352
66373
|
parent: spec.parentID || rootID,
|
|
66353
66374
|
spec,
|
|
@@ -66487,7 +66508,7 @@ var Cache = class {
|
|
|
66487
66508
|
}
|
|
66488
66509
|
};
|
|
66489
66510
|
var CacheInternal = class {
|
|
66490
|
-
|
|
66511
|
+
disabled = false;
|
|
66491
66512
|
_config;
|
|
66492
66513
|
storage;
|
|
66493
66514
|
subscriptions;
|
|
@@ -66518,10 +66539,10 @@ var CacheInternal = class {
|
|
|
66518
66539
|
this._config = config;
|
|
66519
66540
|
this.componentCache = componentCache ?? {};
|
|
66520
66541
|
this.createComponent = createComponent ?? (() => ({}));
|
|
66521
|
-
this.
|
|
66542
|
+
this.disabled = disabled;
|
|
66522
66543
|
try {
|
|
66523
66544
|
if (process.env.HOUDINI_TEST === "true") {
|
|
66524
|
-
this.
|
|
66545
|
+
this.disabled = false;
|
|
66525
66546
|
}
|
|
66526
66547
|
} catch {
|
|
66527
66548
|
}
|
|
@@ -66543,7 +66564,7 @@ var CacheInternal = class {
|
|
|
66543
66564
|
forceNotify,
|
|
66544
66565
|
forceStale
|
|
66545
66566
|
}) {
|
|
66546
|
-
if (this.
|
|
66567
|
+
if (this.disabled) {
|
|
66547
66568
|
return [];
|
|
66548
66569
|
}
|
|
66549
66570
|
let targetSelection = getFieldsForType(
|
|
@@ -68340,7 +68361,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
68340
68361
|
// src/lib/parse.ts
|
|
68341
68362
|
function parseJS(str, config) {
|
|
68342
68363
|
const defaultConfig = {
|
|
68343
|
-
plugins: [
|
|
68364
|
+
plugins: [
|
|
68365
|
+
"typescript",
|
|
68366
|
+
"importAssertions",
|
|
68367
|
+
"decorators-legacy",
|
|
68368
|
+
"explicitResourceManagement"
|
|
68369
|
+
],
|
|
68344
68370
|
sourceType: "module"
|
|
68345
68371
|
};
|
|
68346
68372
|
return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
|
|
@@ -70045,7 +70071,11 @@ function operationsByPath(config, filepath, definition, filterTypes) {
|
|
|
70045
70071
|
const pathOperations = {};
|
|
70046
70072
|
graphql11.visit(definition, {
|
|
70047
70073
|
FragmentSpread(node, _3, __, ___, ancestors) {
|
|
70048
|
-
|
|
70074
|
+
let nameWithoutHash = node.name.value;
|
|
70075
|
+
if (node.directives && node.directives.find((directive) => directive.name.value === "with")) {
|
|
70076
|
+
nameWithoutHash = nameWithoutHash.substring(0, nameWithoutHash.lastIndexOf("_"));
|
|
70077
|
+
}
|
|
70078
|
+
if (!config.isListFragment(nameWithoutHash)) {
|
|
70049
70079
|
return;
|
|
70050
70080
|
}
|
|
70051
70081
|
const path3 = ancestorKey(ancestors);
|
|
@@ -70056,8 +70086,8 @@ function operationsByPath(config, filepath, definition, filterTypes) {
|
|
|
70056
70086
|
operationObject({
|
|
70057
70087
|
config,
|
|
70058
70088
|
filepath,
|
|
70059
|
-
listName: config.listNameFromFragment(
|
|
70060
|
-
operationKind: config.listOperationFromFragment(
|
|
70089
|
+
listName: config.listNameFromFragment(nameWithoutHash),
|
|
70090
|
+
operationKind: config.listOperationFromFragment(nameWithoutHash),
|
|
70061
70091
|
type: parentTypeFromAncestors(config.schema, filepath, ancestors).name,
|
|
70062
70092
|
selection: node
|
|
70063
70093
|
})
|
|
@@ -78023,12 +78053,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
78023
78053
|
}
|
|
78024
78054
|
packageJSON2.devDependencies = {
|
|
78025
78055
|
...packageJSON2.devDependencies,
|
|
78026
|
-
houdini: "^1.2.
|
|
78056
|
+
houdini: "^1.2.47"
|
|
78027
78057
|
};
|
|
78028
78058
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
78029
78059
|
packageJSON2.devDependencies = {
|
|
78030
78060
|
...packageJSON2.devDependencies,
|
|
78031
|
-
"houdini-svelte": "^1.2.
|
|
78061
|
+
"houdini-svelte": "^1.2.47"
|
|
78032
78062
|
};
|
|
78033
78063
|
} else {
|
|
78034
78064
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -66268,9 +66268,12 @@ var InMemorySubscriptions = class {
|
|
|
66268
66268
|
removeSubscribers(id, fieldName, specs) {
|
|
66269
66269
|
let targets = [];
|
|
66270
66270
|
const subscriber = this.subscribers.get(id);
|
|
66271
|
-
|
|
66271
|
+
if (!subscriber) {
|
|
66272
|
+
return;
|
|
66273
|
+
}
|
|
66274
|
+
const subscriberField = subscriber.get(fieldName);
|
|
66272
66275
|
for (const spec of specs) {
|
|
66273
|
-
const counts = subscriber
|
|
66276
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
66274
66277
|
if (!counts?.has(spec.set)) {
|
|
66275
66278
|
continue;
|
|
66276
66279
|
}
|
|
@@ -66280,12 +66283,18 @@ var InMemorySubscriptions = class {
|
|
|
66280
66283
|
targets.push(spec.set);
|
|
66281
66284
|
counts.delete(spec.set);
|
|
66282
66285
|
}
|
|
66286
|
+
if (counts.size === 0) {
|
|
66287
|
+
subscriber.delete(fieldName);
|
|
66288
|
+
}
|
|
66283
66289
|
}
|
|
66284
66290
|
if (subscriberField) {
|
|
66285
66291
|
subscriberField.selections = this.get(id, fieldName).filter(
|
|
66286
66292
|
([{ set }]) => !targets.includes(set)
|
|
66287
66293
|
);
|
|
66288
66294
|
}
|
|
66295
|
+
if (subscriber.size === 0) {
|
|
66296
|
+
this.subscribers.delete(id);
|
|
66297
|
+
}
|
|
66289
66298
|
}
|
|
66290
66299
|
removeAllSubscribers(id, targets, visited = []) {
|
|
66291
66300
|
visited.push(id);
|
|
@@ -66306,6 +66315,15 @@ var InMemorySubscriptions = class {
|
|
|
66306
66315
|
}
|
|
66307
66316
|
}
|
|
66308
66317
|
}
|
|
66318
|
+
get size() {
|
|
66319
|
+
let size = 0;
|
|
66320
|
+
for (const [, nodeCounts] of this.subscribers) {
|
|
66321
|
+
for (const [, { referenceCounts }] of nodeCounts) {
|
|
66322
|
+
size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
|
|
66323
|
+
}
|
|
66324
|
+
}
|
|
66325
|
+
return size;
|
|
66326
|
+
}
|
|
66309
66327
|
};
|
|
66310
66328
|
|
|
66311
66329
|
// src/runtime/cache/cache.ts
|
|
@@ -66354,6 +66372,9 @@ var Cache = class {
|
|
|
66354
66372
|
};
|
|
66355
66373
|
}
|
|
66356
66374
|
subscribe(spec, variables = {}) {
|
|
66375
|
+
if (this._internal_unstable.disabled) {
|
|
66376
|
+
return;
|
|
66377
|
+
}
|
|
66357
66378
|
return this._internal_unstable.subscriptions.add({
|
|
66358
66379
|
parent: spec.parentID || rootID,
|
|
66359
66380
|
spec,
|
|
@@ -66493,7 +66514,7 @@ var Cache = class {
|
|
|
66493
66514
|
}
|
|
66494
66515
|
};
|
|
66495
66516
|
var CacheInternal = class {
|
|
66496
|
-
|
|
66517
|
+
disabled = false;
|
|
66497
66518
|
_config;
|
|
66498
66519
|
storage;
|
|
66499
66520
|
subscriptions;
|
|
@@ -66524,10 +66545,10 @@ var CacheInternal = class {
|
|
|
66524
66545
|
this._config = config;
|
|
66525
66546
|
this.componentCache = componentCache ?? {};
|
|
66526
66547
|
this.createComponent = createComponent ?? (() => ({}));
|
|
66527
|
-
this.
|
|
66548
|
+
this.disabled = disabled;
|
|
66528
66549
|
try {
|
|
66529
66550
|
if (process.env.HOUDINI_TEST === "true") {
|
|
66530
|
-
this.
|
|
66551
|
+
this.disabled = false;
|
|
66531
66552
|
}
|
|
66532
66553
|
} catch {
|
|
66533
66554
|
}
|
|
@@ -66549,7 +66570,7 @@ var CacheInternal = class {
|
|
|
66549
66570
|
forceNotify,
|
|
66550
66571
|
forceStale
|
|
66551
66572
|
}) {
|
|
66552
|
-
if (this.
|
|
66573
|
+
if (this.disabled) {
|
|
66553
66574
|
return [];
|
|
66554
66575
|
}
|
|
66555
66576
|
let targetSelection = getFieldsForType(
|
|
@@ -68345,7 +68366,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
68345
68366
|
// src/lib/parse.ts
|
|
68346
68367
|
function parseJS(str, config) {
|
|
68347
68368
|
const defaultConfig = {
|
|
68348
|
-
plugins: [
|
|
68369
|
+
plugins: [
|
|
68370
|
+
"typescript",
|
|
68371
|
+
"importAssertions",
|
|
68372
|
+
"decorators-legacy",
|
|
68373
|
+
"explicitResourceManagement"
|
|
68374
|
+
],
|
|
68349
68375
|
sourceType: "module"
|
|
68350
68376
|
};
|
|
68351
68377
|
return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
|
|
@@ -70050,7 +70076,11 @@ function operationsByPath(config, filepath, definition, filterTypes) {
|
|
|
70050
70076
|
const pathOperations = {};
|
|
70051
70077
|
graphql11.visit(definition, {
|
|
70052
70078
|
FragmentSpread(node, _3, __, ___, ancestors) {
|
|
70053
|
-
|
|
70079
|
+
let nameWithoutHash = node.name.value;
|
|
70080
|
+
if (node.directives && node.directives.find((directive) => directive.name.value === "with")) {
|
|
70081
|
+
nameWithoutHash = nameWithoutHash.substring(0, nameWithoutHash.lastIndexOf("_"));
|
|
70082
|
+
}
|
|
70083
|
+
if (!config.isListFragment(nameWithoutHash)) {
|
|
70054
70084
|
return;
|
|
70055
70085
|
}
|
|
70056
70086
|
const path3 = ancestorKey(ancestors);
|
|
@@ -70061,8 +70091,8 @@ function operationsByPath(config, filepath, definition, filterTypes) {
|
|
|
70061
70091
|
operationObject({
|
|
70062
70092
|
config,
|
|
70063
70093
|
filepath,
|
|
70064
|
-
listName: config.listNameFromFragment(
|
|
70065
|
-
operationKind: config.listOperationFromFragment(
|
|
70094
|
+
listName: config.listNameFromFragment(nameWithoutHash),
|
|
70095
|
+
operationKind: config.listOperationFromFragment(nameWithoutHash),
|
|
70066
70096
|
type: parentTypeFromAncestors(config.schema, filepath, ancestors).name,
|
|
70067
70097
|
selection: node
|
|
70068
70098
|
})
|
|
@@ -78028,12 +78058,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
78028
78058
|
}
|
|
78029
78059
|
packageJSON2.devDependencies = {
|
|
78030
78060
|
...packageJSON2.devDependencies,
|
|
78031
|
-
houdini: "^1.2.
|
|
78061
|
+
houdini: "^1.2.47"
|
|
78032
78062
|
};
|
|
78033
78063
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
78034
78064
|
packageJSON2.devDependencies = {
|
|
78035
78065
|
...packageJSON2.devDependencies,
|
|
78036
|
-
"houdini-svelte": "^1.2.
|
|
78066
|
+
"houdini-svelte": "^1.2.47"
|
|
78037
78067
|
};
|
|
78038
78068
|
} else {
|
|
78039
78069
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
|
@@ -55636,9 +55636,12 @@ var InMemorySubscriptions = class {
|
|
|
55636
55636
|
removeSubscribers(id, fieldName, specs) {
|
|
55637
55637
|
let targets = [];
|
|
55638
55638
|
const subscriber = this.subscribers.get(id);
|
|
55639
|
-
|
|
55639
|
+
if (!subscriber) {
|
|
55640
|
+
return;
|
|
55641
|
+
}
|
|
55642
|
+
const subscriberField = subscriber.get(fieldName);
|
|
55640
55643
|
for (const spec of specs) {
|
|
55641
|
-
const counts = subscriber
|
|
55644
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
55642
55645
|
if (!counts?.has(spec.set)) {
|
|
55643
55646
|
continue;
|
|
55644
55647
|
}
|
|
@@ -55648,12 +55651,18 @@ var InMemorySubscriptions = class {
|
|
|
55648
55651
|
targets.push(spec.set);
|
|
55649
55652
|
counts.delete(spec.set);
|
|
55650
55653
|
}
|
|
55654
|
+
if (counts.size === 0) {
|
|
55655
|
+
subscriber.delete(fieldName);
|
|
55656
|
+
}
|
|
55651
55657
|
}
|
|
55652
55658
|
if (subscriberField) {
|
|
55653
55659
|
subscriberField.selections = this.get(id, fieldName).filter(
|
|
55654
55660
|
([{ set }]) => !targets.includes(set)
|
|
55655
55661
|
);
|
|
55656
55662
|
}
|
|
55663
|
+
if (subscriber.size === 0) {
|
|
55664
|
+
this.subscribers.delete(id);
|
|
55665
|
+
}
|
|
55657
55666
|
}
|
|
55658
55667
|
removeAllSubscribers(id, targets, visited = []) {
|
|
55659
55668
|
visited.push(id);
|
|
@@ -55674,6 +55683,15 @@ var InMemorySubscriptions = class {
|
|
|
55674
55683
|
}
|
|
55675
55684
|
}
|
|
55676
55685
|
}
|
|
55686
|
+
get size() {
|
|
55687
|
+
let size = 0;
|
|
55688
|
+
for (const [, nodeCounts] of this.subscribers) {
|
|
55689
|
+
for (const [, { referenceCounts }] of nodeCounts) {
|
|
55690
|
+
size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
|
|
55691
|
+
}
|
|
55692
|
+
}
|
|
55693
|
+
return size;
|
|
55694
|
+
}
|
|
55677
55695
|
};
|
|
55678
55696
|
|
|
55679
55697
|
// src/runtime/cache/cache.ts
|
|
@@ -55722,6 +55740,9 @@ var Cache = class {
|
|
|
55722
55740
|
};
|
|
55723
55741
|
}
|
|
55724
55742
|
subscribe(spec, variables = {}) {
|
|
55743
|
+
if (this._internal_unstable.disabled) {
|
|
55744
|
+
return;
|
|
55745
|
+
}
|
|
55725
55746
|
return this._internal_unstable.subscriptions.add({
|
|
55726
55747
|
parent: spec.parentID || rootID,
|
|
55727
55748
|
spec,
|
|
@@ -55861,7 +55882,7 @@ var Cache = class {
|
|
|
55861
55882
|
}
|
|
55862
55883
|
};
|
|
55863
55884
|
var CacheInternal = class {
|
|
55864
|
-
|
|
55885
|
+
disabled = false;
|
|
55865
55886
|
_config;
|
|
55866
55887
|
storage;
|
|
55867
55888
|
subscriptions;
|
|
@@ -55892,10 +55913,10 @@ var CacheInternal = class {
|
|
|
55892
55913
|
this._config = config;
|
|
55893
55914
|
this.componentCache = componentCache ?? {};
|
|
55894
55915
|
this.createComponent = createComponent ?? (() => ({}));
|
|
55895
|
-
this.
|
|
55916
|
+
this.disabled = disabled;
|
|
55896
55917
|
try {
|
|
55897
55918
|
if (process.env.HOUDINI_TEST === "true") {
|
|
55898
|
-
this.
|
|
55919
|
+
this.disabled = false;
|
|
55899
55920
|
}
|
|
55900
55921
|
} catch {
|
|
55901
55922
|
}
|
|
@@ -55917,7 +55938,7 @@ var CacheInternal = class {
|
|
|
55917
55938
|
forceNotify,
|
|
55918
55939
|
forceStale
|
|
55919
55940
|
}) {
|
|
55920
|
-
if (this.
|
|
55941
|
+
if (this.disabled) {
|
|
55921
55942
|
return [];
|
|
55922
55943
|
}
|
|
55923
55944
|
let targetSelection = getFieldsForType(
|
|
@@ -56819,7 +56840,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
56819
56840
|
// src/lib/parse.ts
|
|
56820
56841
|
function parseJS(str, config) {
|
|
56821
56842
|
const defaultConfig = {
|
|
56822
|
-
plugins: [
|
|
56843
|
+
plugins: [
|
|
56844
|
+
"typescript",
|
|
56845
|
+
"importAssertions",
|
|
56846
|
+
"decorators-legacy",
|
|
56847
|
+
"explicitResourceManagement"
|
|
56848
|
+
],
|
|
56823
56849
|
sourceType: "module"
|
|
56824
56850
|
};
|
|
56825
56851
|
return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
|
|
@@ -58431,7 +58457,11 @@ function operationsByPath(config, filepath, definition, filterTypes) {
|
|
|
58431
58457
|
const pathOperations = {};
|
|
58432
58458
|
graphql11.visit(definition, {
|
|
58433
58459
|
FragmentSpread(node, _, __, ___, ancestors) {
|
|
58434
|
-
|
|
58460
|
+
let nameWithoutHash = node.name.value;
|
|
58461
|
+
if (node.directives && node.directives.find((directive) => directive.name.value === "with")) {
|
|
58462
|
+
nameWithoutHash = nameWithoutHash.substring(0, nameWithoutHash.lastIndexOf("_"));
|
|
58463
|
+
}
|
|
58464
|
+
if (!config.isListFragment(nameWithoutHash)) {
|
|
58435
58465
|
return;
|
|
58436
58466
|
}
|
|
58437
58467
|
const path2 = ancestorKey(ancestors);
|
|
@@ -58442,8 +58472,8 @@ function operationsByPath(config, filepath, definition, filterTypes) {
|
|
|
58442
58472
|
operationObject({
|
|
58443
58473
|
config,
|
|
58444
58474
|
filepath,
|
|
58445
|
-
listName: config.listNameFromFragment(
|
|
58446
|
-
operationKind: config.listOperationFromFragment(
|
|
58475
|
+
listName: config.listNameFromFragment(nameWithoutHash),
|
|
58476
|
+
operationKind: config.listOperationFromFragment(nameWithoutHash),
|
|
58447
58477
|
type: parentTypeFromAncestors(config.schema, filepath, ancestors).name,
|
|
58448
58478
|
selection: node
|
|
58449
58479
|
})
|
|
@@ -55636,9 +55636,12 @@ var InMemorySubscriptions = class {
|
|
|
55636
55636
|
removeSubscribers(id, fieldName, specs) {
|
|
55637
55637
|
let targets = [];
|
|
55638
55638
|
const subscriber = this.subscribers.get(id);
|
|
55639
|
-
|
|
55639
|
+
if (!subscriber) {
|
|
55640
|
+
return;
|
|
55641
|
+
}
|
|
55642
|
+
const subscriberField = subscriber.get(fieldName);
|
|
55640
55643
|
for (const spec of specs) {
|
|
55641
|
-
const counts = subscriber
|
|
55644
|
+
const counts = subscriber.get(fieldName)?.referenceCounts;
|
|
55642
55645
|
if (!counts?.has(spec.set)) {
|
|
55643
55646
|
continue;
|
|
55644
55647
|
}
|
|
@@ -55648,12 +55651,18 @@ var InMemorySubscriptions = class {
|
|
|
55648
55651
|
targets.push(spec.set);
|
|
55649
55652
|
counts.delete(spec.set);
|
|
55650
55653
|
}
|
|
55654
|
+
if (counts.size === 0) {
|
|
55655
|
+
subscriber.delete(fieldName);
|
|
55656
|
+
}
|
|
55651
55657
|
}
|
|
55652
55658
|
if (subscriberField) {
|
|
55653
55659
|
subscriberField.selections = this.get(id, fieldName).filter(
|
|
55654
55660
|
([{ set }]) => !targets.includes(set)
|
|
55655
55661
|
);
|
|
55656
55662
|
}
|
|
55663
|
+
if (subscriber.size === 0) {
|
|
55664
|
+
this.subscribers.delete(id);
|
|
55665
|
+
}
|
|
55657
55666
|
}
|
|
55658
55667
|
removeAllSubscribers(id, targets, visited = []) {
|
|
55659
55668
|
visited.push(id);
|
|
@@ -55674,6 +55683,15 @@ var InMemorySubscriptions = class {
|
|
|
55674
55683
|
}
|
|
55675
55684
|
}
|
|
55676
55685
|
}
|
|
55686
|
+
get size() {
|
|
55687
|
+
let size = 0;
|
|
55688
|
+
for (const [, nodeCounts] of this.subscribers) {
|
|
55689
|
+
for (const [, { referenceCounts }] of nodeCounts) {
|
|
55690
|
+
size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
|
|
55691
|
+
}
|
|
55692
|
+
}
|
|
55693
|
+
return size;
|
|
55694
|
+
}
|
|
55677
55695
|
};
|
|
55678
55696
|
|
|
55679
55697
|
// src/runtime/cache/cache.ts
|
|
@@ -55722,6 +55740,9 @@ var Cache = class {
|
|
|
55722
55740
|
};
|
|
55723
55741
|
}
|
|
55724
55742
|
subscribe(spec, variables = {}) {
|
|
55743
|
+
if (this._internal_unstable.disabled) {
|
|
55744
|
+
return;
|
|
55745
|
+
}
|
|
55725
55746
|
return this._internal_unstable.subscriptions.add({
|
|
55726
55747
|
parent: spec.parentID || rootID,
|
|
55727
55748
|
spec,
|
|
@@ -55861,7 +55882,7 @@ var Cache = class {
|
|
|
55861
55882
|
}
|
|
55862
55883
|
};
|
|
55863
55884
|
var CacheInternal = class {
|
|
55864
|
-
|
|
55885
|
+
disabled = false;
|
|
55865
55886
|
_config;
|
|
55866
55887
|
storage;
|
|
55867
55888
|
subscriptions;
|
|
@@ -55892,10 +55913,10 @@ var CacheInternal = class {
|
|
|
55892
55913
|
this._config = config;
|
|
55893
55914
|
this.componentCache = componentCache ?? {};
|
|
55894
55915
|
this.createComponent = createComponent ?? (() => ({}));
|
|
55895
|
-
this.
|
|
55916
|
+
this.disabled = disabled;
|
|
55896
55917
|
try {
|
|
55897
55918
|
if (process.env.HOUDINI_TEST === "true") {
|
|
55898
|
-
this.
|
|
55919
|
+
this.disabled = false;
|
|
55899
55920
|
}
|
|
55900
55921
|
} catch {
|
|
55901
55922
|
}
|
|
@@ -55917,7 +55938,7 @@ var CacheInternal = class {
|
|
|
55917
55938
|
forceNotify,
|
|
55918
55939
|
forceStale
|
|
55919
55940
|
}) {
|
|
55920
|
-
if (this.
|
|
55941
|
+
if (this.disabled) {
|
|
55921
55942
|
return [];
|
|
55922
55943
|
}
|
|
55923
55944
|
let targetSelection = getFieldsForType(
|
|
@@ -56818,7 +56839,12 @@ function deepMerge2(filepath, ...targets) {
|
|
|
56818
56839
|
// src/lib/parse.ts
|
|
56819
56840
|
function parseJS(str, config) {
|
|
56820
56841
|
const defaultConfig = {
|
|
56821
|
-
plugins: [
|
|
56842
|
+
plugins: [
|
|
56843
|
+
"typescript",
|
|
56844
|
+
"importAssertions",
|
|
56845
|
+
"decorators-legacy",
|
|
56846
|
+
"explicitResourceManagement"
|
|
56847
|
+
],
|
|
56822
56848
|
sourceType: "module"
|
|
56823
56849
|
};
|
|
56824
56850
|
return (0, import_parser.parse)(str || "", config ? deepMerge2("", defaultConfig, config) : defaultConfig).program;
|
|
@@ -58430,7 +58456,11 @@ function operationsByPath(config, filepath, definition, filterTypes) {
|
|
|
58430
58456
|
const pathOperations = {};
|
|
58431
58457
|
graphql11.visit(definition, {
|
|
58432
58458
|
FragmentSpread(node, _, __, ___, ancestors) {
|
|
58433
|
-
|
|
58459
|
+
let nameWithoutHash = node.name.value;
|
|
58460
|
+
if (node.directives && node.directives.find((directive) => directive.name.value === "with")) {
|
|
58461
|
+
nameWithoutHash = nameWithoutHash.substring(0, nameWithoutHash.lastIndexOf("_"));
|
|
58462
|
+
}
|
|
58463
|
+
if (!config.isListFragment(nameWithoutHash)) {
|
|
58434
58464
|
return;
|
|
58435
58465
|
}
|
|
58436
58466
|
const path2 = ancestorKey(ancestors);
|
|
@@ -58441,8 +58471,8 @@ function operationsByPath(config, filepath, definition, filterTypes) {
|
|
|
58441
58471
|
operationObject({
|
|
58442
58472
|
config,
|
|
58443
58473
|
filepath,
|
|
58444
|
-
listName: config.listNameFromFragment(
|
|
58445
|
-
operationKind: config.listOperationFromFragment(
|
|
58474
|
+
listName: config.listNameFromFragment(nameWithoutHash),
|
|
58475
|
+
operationKind: config.listOperationFromFragment(nameWithoutHash),
|
|
58446
58476
|
type: parentTypeFromAncestors(config.schema, filepath, ancestors).name,
|
|
58447
58477
|
selection: node
|
|
58448
58478
|
})
|