houdini-svelte 1.0.0-next.18 → 1.0.0-next.19
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 +20 -11
- package/build/plugin-esm/index.js +20 -11
- package/build/preprocess-cjs/index.js +35 -14
- package/build/preprocess-esm/index.js +35 -14
- package/build/runtime/stores/fragment.d.ts +2 -2
- package/build/runtime/stores/pagination/fragment.d.ts +3 -3
- package/build/runtime/stores/query.d.ts +4 -5
- package/build/runtime/stores/subscription.d.ts +1 -1
- package/build/runtime-cjs/stores/fragment.d.ts +2 -2
- package/build/runtime-cjs/stores/pagination/fragment.d.ts +3 -3
- package/build/runtime-cjs/stores/query.d.ts +4 -5
- package/build/runtime-cjs/stores/subscription.d.ts +1 -1
- package/build/runtime-esm/stores/fragment.d.ts +2 -2
- package/build/runtime-esm/stores/pagination/fragment.d.ts +3 -3
- package/build/runtime-esm/stores/query.d.ts +4 -5
- package/build/runtime-esm/stores/subscription.d.ts +1 -1
- package/build/test-cjs/index.js +97 -46
- package/build/test-esm/index.js +97 -46
- package/package.json +2 -2
|
@@ -89301,17 +89301,16 @@ var import_graphql26 = __toESM2(require_graphql2(), 1);
|
|
|
89301
89301
|
var import_graphql28 = __toESM2(require_graphql2(), 1);
|
|
89302
89302
|
var graphql2 = __toESM2(require_graphql2(), 1);
|
|
89303
89303
|
var import_minimatch = __toESM2(require_minimatch(), 1);
|
|
89304
|
-
var ArtifactKind =
|
|
89305
|
-
|
|
89306
|
-
|
|
89307
|
-
|
|
89308
|
-
|
|
89309
|
-
|
|
89310
|
-
|
|
89311
|
-
var
|
|
89312
|
-
var
|
|
89313
|
-
var
|
|
89314
|
-
var CompiledSubscriptionKind = "HoudiniSubscription";
|
|
89304
|
+
var ArtifactKind = {
|
|
89305
|
+
Query: "HoudiniQuery",
|
|
89306
|
+
Subscription: "HoudiniSubscription",
|
|
89307
|
+
Mutation: "HoudiniMutation",
|
|
89308
|
+
Fragment: "HoudiniFragment"
|
|
89309
|
+
};
|
|
89310
|
+
var CompiledFragmentKind = ArtifactKind.Fragment;
|
|
89311
|
+
var CompiledMutationKind = ArtifactKind.Mutation;
|
|
89312
|
+
var CompiledQueryKind = ArtifactKind.Query;
|
|
89313
|
+
var CompiledSubscriptionKind = ArtifactKind.Subscription;
|
|
89315
89314
|
var houdini_mode = {
|
|
89316
89315
|
get is_testing() {
|
|
89317
89316
|
return process.env.HOUDINI_TEST === "true";
|
|
@@ -152244,6 +152243,16 @@ var import_graphql262 = __toESM3(require_graphql22(), 1);
|
|
|
152244
152243
|
var import_graphql282 = __toESM3(require_graphql22(), 1);
|
|
152245
152244
|
var graphql22 = __toESM3(require_graphql22(), 1);
|
|
152246
152245
|
var import_minimatch3 = __toESM3(require_minimatch2(), 1);
|
|
152246
|
+
var ArtifactKind2 = {
|
|
152247
|
+
Query: "HoudiniQuery",
|
|
152248
|
+
Subscription: "HoudiniSubscription",
|
|
152249
|
+
Mutation: "HoudiniMutation",
|
|
152250
|
+
Fragment: "HoudiniFragment"
|
|
152251
|
+
};
|
|
152252
|
+
var CompiledFragmentKind2 = ArtifactKind2.Fragment;
|
|
152253
|
+
var CompiledMutationKind2 = ArtifactKind2.Mutation;
|
|
152254
|
+
var CompiledQueryKind2 = ArtifactKind2.Query;
|
|
152255
|
+
var CompiledSubscriptionKind2 = ArtifactKind2.Subscription;
|
|
152247
152256
|
var siteURL = "https://houdinigraphql.com";
|
|
152248
152257
|
var houdini_mode2 = {
|
|
152249
152258
|
get is_testing() {
|
|
@@ -89296,17 +89296,16 @@ var import_graphql26 = __toESM2(require_graphql2(), 1);
|
|
|
89296
89296
|
var import_graphql28 = __toESM2(require_graphql2(), 1);
|
|
89297
89297
|
var graphql2 = __toESM2(require_graphql2(), 1);
|
|
89298
89298
|
var import_minimatch = __toESM2(require_minimatch(), 1);
|
|
89299
|
-
var ArtifactKind =
|
|
89300
|
-
|
|
89301
|
-
|
|
89302
|
-
|
|
89303
|
-
|
|
89304
|
-
|
|
89305
|
-
|
|
89306
|
-
var
|
|
89307
|
-
var
|
|
89308
|
-
var
|
|
89309
|
-
var CompiledSubscriptionKind = "HoudiniSubscription";
|
|
89299
|
+
var ArtifactKind = {
|
|
89300
|
+
Query: "HoudiniQuery",
|
|
89301
|
+
Subscription: "HoudiniSubscription",
|
|
89302
|
+
Mutation: "HoudiniMutation",
|
|
89303
|
+
Fragment: "HoudiniFragment"
|
|
89304
|
+
};
|
|
89305
|
+
var CompiledFragmentKind = ArtifactKind.Fragment;
|
|
89306
|
+
var CompiledMutationKind = ArtifactKind.Mutation;
|
|
89307
|
+
var CompiledQueryKind = ArtifactKind.Query;
|
|
89308
|
+
var CompiledSubscriptionKind = ArtifactKind.Subscription;
|
|
89310
89309
|
var houdini_mode = {
|
|
89311
89310
|
get is_testing() {
|
|
89312
89311
|
return process.env.HOUDINI_TEST === "true";
|
|
@@ -152238,6 +152237,16 @@ var import_graphql262 = __toESM3(require_graphql22(), 1);
|
|
|
152238
152237
|
var import_graphql282 = __toESM3(require_graphql22(), 1);
|
|
152239
152238
|
var graphql22 = __toESM3(require_graphql22(), 1);
|
|
152240
152239
|
var import_minimatch3 = __toESM3(require_minimatch2(), 1);
|
|
152240
|
+
var ArtifactKind2 = {
|
|
152241
|
+
Query: "HoudiniQuery",
|
|
152242
|
+
Subscription: "HoudiniSubscription",
|
|
152243
|
+
Mutation: "HoudiniMutation",
|
|
152244
|
+
Fragment: "HoudiniFragment"
|
|
152245
|
+
};
|
|
152246
|
+
var CompiledFragmentKind2 = ArtifactKind2.Fragment;
|
|
152247
|
+
var CompiledMutationKind2 = ArtifactKind2.Mutation;
|
|
152248
|
+
var CompiledQueryKind2 = ArtifactKind2.Query;
|
|
152249
|
+
var CompiledSubscriptionKind2 = ArtifactKind2.Subscription;
|
|
152241
152250
|
var siteURL = "https://houdinigraphql.com";
|
|
152242
152251
|
var houdini_mode2 = {
|
|
152243
152252
|
get is_testing() {
|
|
@@ -91952,10 +91952,22 @@ function computeID(configFile, type, data2) {
|
|
|
91952
91952
|
}
|
|
91953
91953
|
return id2.slice(0, -2);
|
|
91954
91954
|
}
|
|
91955
|
-
var
|
|
91956
|
-
|
|
91957
|
-
|
|
91958
|
-
|
|
91955
|
+
var CachePolicy = {
|
|
91956
|
+
CacheOrNetwork: "CacheOrNetwork",
|
|
91957
|
+
CacheOnly: "CacheOnly",
|
|
91958
|
+
NetworkOnly: "NetworkOnly",
|
|
91959
|
+
CacheAndNetwork: "CacheAndNetwork"
|
|
91960
|
+
};
|
|
91961
|
+
var ArtifactKind = {
|
|
91962
|
+
Query: "HoudiniQuery",
|
|
91963
|
+
Subscription: "HoudiniSubscription",
|
|
91964
|
+
Mutation: "HoudiniMutation",
|
|
91965
|
+
Fragment: "HoudiniFragment"
|
|
91966
|
+
};
|
|
91967
|
+
var CompiledFragmentKind = ArtifactKind.Fragment;
|
|
91968
|
+
var CompiledMutationKind = ArtifactKind.Mutation;
|
|
91969
|
+
var CompiledQueryKind = ArtifactKind.Query;
|
|
91970
|
+
var CompiledSubscriptionKind = ArtifactKind.Subscription;
|
|
91959
91971
|
var houdini_mode = {
|
|
91960
91972
|
get is_testing() {
|
|
91961
91973
|
return process.env.HOUDINI_TEST === "true";
|
|
@@ -93463,13 +93475,12 @@ function plugin(name, hooks) {
|
|
|
93463
93475
|
};
|
|
93464
93476
|
return data2;
|
|
93465
93477
|
}
|
|
93466
|
-
var LogLevel =
|
|
93467
|
-
|
|
93468
|
-
|
|
93469
|
-
|
|
93470
|
-
|
|
93471
|
-
|
|
93472
|
-
})(LogLevel || {});
|
|
93478
|
+
var LogLevel = {
|
|
93479
|
+
Full: "full",
|
|
93480
|
+
Summary: "summary",
|
|
93481
|
+
ShortSummary: "short-summary",
|
|
93482
|
+
Quiet: "quiet"
|
|
93483
|
+
};
|
|
93473
93484
|
var currentDir = global.__dirname || dirname((0, import_node_url.fileURLToPath)(import_meta.url));
|
|
93474
93485
|
var Config = class {
|
|
93475
93486
|
filepath;
|
|
@@ -93518,7 +93529,7 @@ var Config = class {
|
|
|
93518
93529
|
scalars,
|
|
93519
93530
|
cacheBufferSize,
|
|
93520
93531
|
definitionsPath,
|
|
93521
|
-
defaultCachePolicy =
|
|
93532
|
+
defaultCachePolicy = CachePolicy.CacheOrNetwork,
|
|
93522
93533
|
defaultPartial = false,
|
|
93523
93534
|
defaultListPosition = "append",
|
|
93524
93535
|
defaultListTarget = null,
|
|
@@ -93540,7 +93551,7 @@ var Config = class {
|
|
|
93540
93551
|
Object.values(LogLevel)
|
|
93541
93552
|
)}`
|
|
93542
93553
|
);
|
|
93543
|
-
logLevel =
|
|
93554
|
+
logLevel = LogLevel.Summary;
|
|
93544
93555
|
}
|
|
93545
93556
|
this.schemaPath = schemaPath;
|
|
93546
93557
|
this.filepath = filepath;
|
|
@@ -93556,7 +93567,7 @@ var Config = class {
|
|
|
93556
93567
|
this.internalListPosition = defaultListPosition === "append" ? "last" : "first";
|
|
93557
93568
|
this.defaultListTarget = defaultListTarget;
|
|
93558
93569
|
this.definitionsFolder = definitionsPath;
|
|
93559
|
-
this.logLevel = (logLevel ||
|
|
93570
|
+
this.logLevel = (logLevel || LogLevel.Summary).toLowerCase();
|
|
93560
93571
|
this.defaultFragmentMasking = defaultFragmentMasking;
|
|
93561
93572
|
this.routesDir = join2(this.projectRoot, "src", "routes");
|
|
93562
93573
|
this.schemaPollInterval = watchSchema?.interval ?? 2e3;
|
|
@@ -184115,6 +184126,16 @@ var import_graphql262 = __toESM3(require_graphql22(), 1);
|
|
|
184115
184126
|
var import_graphql282 = __toESM3(require_graphql22(), 1);
|
|
184116
184127
|
var graphql22 = __toESM3(require_graphql22(), 1);
|
|
184117
184128
|
var import_minimatch3 = __toESM3(require_minimatch2(), 1);
|
|
184129
|
+
var ArtifactKind2 = {
|
|
184130
|
+
Query: "HoudiniQuery",
|
|
184131
|
+
Subscription: "HoudiniSubscription",
|
|
184132
|
+
Mutation: "HoudiniMutation",
|
|
184133
|
+
Fragment: "HoudiniFragment"
|
|
184134
|
+
};
|
|
184135
|
+
var CompiledFragmentKind2 = ArtifactKind2.Fragment;
|
|
184136
|
+
var CompiledMutationKind2 = ArtifactKind2.Mutation;
|
|
184137
|
+
var CompiledQueryKind2 = ArtifactKind2.Query;
|
|
184138
|
+
var CompiledSubscriptionKind2 = ArtifactKind2.Subscription;
|
|
184118
184139
|
var siteURL = "https://houdinigraphql.com";
|
|
184119
184140
|
var houdini_mode2 = {
|
|
184120
184141
|
get is_testing() {
|
|
@@ -91945,10 +91945,22 @@ function computeID(configFile, type, data2) {
|
|
|
91945
91945
|
}
|
|
91946
91946
|
return id2.slice(0, -2);
|
|
91947
91947
|
}
|
|
91948
|
-
var
|
|
91949
|
-
|
|
91950
|
-
|
|
91951
|
-
|
|
91948
|
+
var CachePolicy = {
|
|
91949
|
+
CacheOrNetwork: "CacheOrNetwork",
|
|
91950
|
+
CacheOnly: "CacheOnly",
|
|
91951
|
+
NetworkOnly: "NetworkOnly",
|
|
91952
|
+
CacheAndNetwork: "CacheAndNetwork"
|
|
91953
|
+
};
|
|
91954
|
+
var ArtifactKind = {
|
|
91955
|
+
Query: "HoudiniQuery",
|
|
91956
|
+
Subscription: "HoudiniSubscription",
|
|
91957
|
+
Mutation: "HoudiniMutation",
|
|
91958
|
+
Fragment: "HoudiniFragment"
|
|
91959
|
+
};
|
|
91960
|
+
var CompiledFragmentKind = ArtifactKind.Fragment;
|
|
91961
|
+
var CompiledMutationKind = ArtifactKind.Mutation;
|
|
91962
|
+
var CompiledQueryKind = ArtifactKind.Query;
|
|
91963
|
+
var CompiledSubscriptionKind = ArtifactKind.Subscription;
|
|
91952
91964
|
var houdini_mode = {
|
|
91953
91965
|
get is_testing() {
|
|
91954
91966
|
return process.env.HOUDINI_TEST === "true";
|
|
@@ -93456,13 +93468,12 @@ function plugin(name, hooks) {
|
|
|
93456
93468
|
};
|
|
93457
93469
|
return data2;
|
|
93458
93470
|
}
|
|
93459
|
-
var LogLevel =
|
|
93460
|
-
|
|
93461
|
-
|
|
93462
|
-
|
|
93463
|
-
|
|
93464
|
-
|
|
93465
|
-
})(LogLevel || {});
|
|
93471
|
+
var LogLevel = {
|
|
93472
|
+
Full: "full",
|
|
93473
|
+
Summary: "summary",
|
|
93474
|
+
ShortSummary: "short-summary",
|
|
93475
|
+
Quiet: "quiet"
|
|
93476
|
+
};
|
|
93466
93477
|
var currentDir = global.__dirname || dirname(fileURLToPath(import.meta.url));
|
|
93467
93478
|
var Config = class {
|
|
93468
93479
|
filepath;
|
|
@@ -93511,7 +93522,7 @@ var Config = class {
|
|
|
93511
93522
|
scalars,
|
|
93512
93523
|
cacheBufferSize,
|
|
93513
93524
|
definitionsPath,
|
|
93514
|
-
defaultCachePolicy =
|
|
93525
|
+
defaultCachePolicy = CachePolicy.CacheOrNetwork,
|
|
93515
93526
|
defaultPartial = false,
|
|
93516
93527
|
defaultListPosition = "append",
|
|
93517
93528
|
defaultListTarget = null,
|
|
@@ -93533,7 +93544,7 @@ var Config = class {
|
|
|
93533
93544
|
Object.values(LogLevel)
|
|
93534
93545
|
)}`
|
|
93535
93546
|
);
|
|
93536
|
-
logLevel =
|
|
93547
|
+
logLevel = LogLevel.Summary;
|
|
93537
93548
|
}
|
|
93538
93549
|
this.schemaPath = schemaPath;
|
|
93539
93550
|
this.filepath = filepath;
|
|
@@ -93549,7 +93560,7 @@ var Config = class {
|
|
|
93549
93560
|
this.internalListPosition = defaultListPosition === "append" ? "last" : "first";
|
|
93550
93561
|
this.defaultListTarget = defaultListTarget;
|
|
93551
93562
|
this.definitionsFolder = definitionsPath;
|
|
93552
|
-
this.logLevel = (logLevel ||
|
|
93563
|
+
this.logLevel = (logLevel || LogLevel.Summary).toLowerCase();
|
|
93553
93564
|
this.defaultFragmentMasking = defaultFragmentMasking;
|
|
93554
93565
|
this.routesDir = join2(this.projectRoot, "src", "routes");
|
|
93555
93566
|
this.schemaPollInterval = watchSchema?.interval ?? 2e3;
|
|
@@ -184107,6 +184118,16 @@ var import_graphql262 = __toESM3(require_graphql22(), 1);
|
|
|
184107
184118
|
var import_graphql282 = __toESM3(require_graphql22(), 1);
|
|
184108
184119
|
var graphql22 = __toESM3(require_graphql22(), 1);
|
|
184109
184120
|
var import_minimatch3 = __toESM3(require_minimatch2(), 1);
|
|
184121
|
+
var ArtifactKind2 = {
|
|
184122
|
+
Query: "HoudiniQuery",
|
|
184123
|
+
Subscription: "HoudiniSubscription",
|
|
184124
|
+
Mutation: "HoudiniMutation",
|
|
184125
|
+
Fragment: "HoudiniFragment"
|
|
184126
|
+
};
|
|
184127
|
+
var CompiledFragmentKind2 = ArtifactKind2.Fragment;
|
|
184128
|
+
var CompiledMutationKind2 = ArtifactKind2.Mutation;
|
|
184129
|
+
var CompiledQueryKind2 = ArtifactKind2.Query;
|
|
184130
|
+
var CompiledSubscriptionKind2 = ArtifactKind2.Subscription;
|
|
184110
184131
|
var siteURL = "https://houdinigraphql.com";
|
|
184111
184132
|
var houdini_mode2 = {
|
|
184112
184133
|
get is_testing() {
|
|
@@ -2,14 +2,14 @@ import type { GraphQLObject, FragmentArtifact, HoudiniFetchContext } from '$houd
|
|
|
2
2
|
export declare class FragmentStore<_Data extends GraphQLObject, _Input = {}> {
|
|
3
3
|
artifact: FragmentArtifact;
|
|
4
4
|
name: string;
|
|
5
|
-
kind:
|
|
5
|
+
kind: "HoudiniFragment";
|
|
6
6
|
protected context: HoudiniFetchContext | null;
|
|
7
7
|
constructor({ artifact, storeName }: {
|
|
8
8
|
artifact: FragmentArtifact;
|
|
9
9
|
storeName: string;
|
|
10
10
|
});
|
|
11
11
|
get(initialValue: _Data | null): {
|
|
12
|
-
kind:
|
|
12
|
+
kind: "HoudiniFragment";
|
|
13
13
|
subscribe: (run: import("svelte/store").Subscriber<_Data | null>, invalidate?: ((value?: _Data | null | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
|
|
14
14
|
update: (val: _Data | null) => void;
|
|
15
15
|
};
|
|
@@ -11,13 +11,13 @@ declare class BasePaginatedFragmentStore<_Data extends GraphQLObject, _Input> {
|
|
|
11
11
|
paginated: boolean;
|
|
12
12
|
protected paginationArtifact: QueryArtifact;
|
|
13
13
|
name: string;
|
|
14
|
-
kind:
|
|
14
|
+
kind: "HoudiniFragment";
|
|
15
15
|
constructor(config: FragmentStoreConfig<_Data, _Input>);
|
|
16
16
|
protected queryVariables(store: Readable<FragmentPaginatedResult<_Data, unknown>>): _Input;
|
|
17
17
|
}
|
|
18
18
|
export declare class FragmentStoreCursor<_Data extends GraphQLObject, _Input extends Record<string, any>> extends BasePaginatedFragmentStore<_Data, _Input> {
|
|
19
19
|
get(initialValue: _Data | null): {
|
|
20
|
-
kind:
|
|
20
|
+
kind: "HoudiniFragment";
|
|
21
21
|
data: Readable<_Data | null>;
|
|
22
22
|
subscribe: (run: Subscriber<FragmentPaginatedResult<_Data, {
|
|
23
23
|
pageInfo: PageInfo;
|
|
@@ -44,7 +44,7 @@ export declare class FragmentStoreCursor<_Data extends GraphQLObject, _Input ext
|
|
|
44
44
|
}
|
|
45
45
|
export declare class FragmentStoreOffset<_Data extends GraphQLObject, _Input extends Record<string, any>> extends BasePaginatedFragmentStore<_Data, _Input> {
|
|
46
46
|
get(initialValue: _Data | null): {
|
|
47
|
-
kind:
|
|
47
|
+
kind: "HoudiniFragment";
|
|
48
48
|
data: Readable<_Data | null>;
|
|
49
49
|
subscribe: (run: import("$houdini/runtime/lib").Subscriber<import("$houdini/runtime/lib/types").QueryResult<_Data, _Input>>, invalidate?: (value?: import("$houdini/runtime/lib/types").QueryResult<_Data, _Input> | undefined) => void) => import("$houdini/runtime/lib").Unsubscriber;
|
|
50
50
|
fetch: (args?: import("../query").QueryStoreFetchParams<_Data, _Input> | undefined) => Promise<import("$houdini/runtime/lib/types").QueryResult<_Data, _Input>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { FetchContext } from '$houdini/runtime/client/plugins/fetch';
|
|
2
|
-
import type { GraphQLObject, HoudiniFetchContext, MutationArtifact, QueryArtifact, QueryResult } from '$houdini/runtime/lib/types';
|
|
3
|
-
import { ArtifactKind, CachePolicy } from '$houdini/runtime/lib/types';
|
|
2
|
+
import type { GraphQLObject, HoudiniFetchContext, MutationArtifact, QueryArtifact, QueryResult, CachePolicies } from '$houdini/runtime/lib/types';
|
|
4
3
|
import type { LoadEvent, RequestEvent } from '@sveltejs/kit';
|
|
5
4
|
import type { Readable } from 'svelte/store';
|
|
6
5
|
import type { PluginArtifactData } from '../../plugin/artifactData';
|
|
@@ -8,7 +7,7 @@ import { BaseStore } from './base';
|
|
|
8
7
|
export declare class QueryStore<_Data extends GraphQLObject, _Input extends {}> extends BaseStore<_Data, _Input, QueryArtifact> {
|
|
9
8
|
#private;
|
|
10
9
|
variables: boolean;
|
|
11
|
-
kind:
|
|
10
|
+
kind: "HoudiniQuery";
|
|
12
11
|
protected loadPending: boolean;
|
|
13
12
|
protected subscriberCount: number;
|
|
14
13
|
protected storeName: string;
|
|
@@ -34,7 +33,7 @@ export type StoreConfig<_Data extends GraphQLObject, _Input, _Artifact> = {
|
|
|
34
33
|
};
|
|
35
34
|
export declare function fetchParams<_Data extends GraphQLObject, _Input>(artifact: QueryArtifact | MutationArtifact, storeName: string, params?: QueryStoreFetchParams<_Data, _Input>): Promise<{
|
|
36
35
|
context: FetchContext;
|
|
37
|
-
policy:
|
|
36
|
+
policy: CachePolicies | undefined;
|
|
38
37
|
params: QueryStoreFetchParams<_Data, _Input>;
|
|
39
38
|
}>;
|
|
40
39
|
type FetchGlobalParams<_Data extends GraphQLObject, _Input> = {
|
|
@@ -44,7 +43,7 @@ type FetchGlobalParams<_Data extends GraphQLObject, _Input> = {
|
|
|
44
43
|
* a request will always be sent, even if the variables are the same as the last call
|
|
45
44
|
* to fetch.
|
|
46
45
|
*/
|
|
47
|
-
policy?:
|
|
46
|
+
policy?: CachePolicies;
|
|
48
47
|
/**
|
|
49
48
|
* An object that will be passed to the fetch function.
|
|
50
49
|
* You can do what you want with it!
|
|
@@ -3,7 +3,7 @@ import type { SubscriptionArtifact } from '$houdini/runtime/lib/types';
|
|
|
3
3
|
import type { GraphQLObject } from 'houdini';
|
|
4
4
|
import { BaseStore } from './base';
|
|
5
5
|
export declare class SubscriptionStore<_Data extends GraphQLObject, _Input extends {}> extends BaseStore<_Data, _Input, SubscriptionArtifact> {
|
|
6
|
-
kind:
|
|
6
|
+
kind: "HoudiniSubscription";
|
|
7
7
|
constructor({ artifact }: {
|
|
8
8
|
artifact: SubscriptionArtifact;
|
|
9
9
|
});
|
|
@@ -2,14 +2,14 @@ import type { GraphQLObject, FragmentArtifact, HoudiniFetchContext } from '$houd
|
|
|
2
2
|
export declare class FragmentStore<_Data extends GraphQLObject, _Input = {}> {
|
|
3
3
|
artifact: FragmentArtifact;
|
|
4
4
|
name: string;
|
|
5
|
-
kind:
|
|
5
|
+
kind: "HoudiniFragment";
|
|
6
6
|
protected context: HoudiniFetchContext | null;
|
|
7
7
|
constructor({ artifact, storeName }: {
|
|
8
8
|
artifact: FragmentArtifact;
|
|
9
9
|
storeName: string;
|
|
10
10
|
});
|
|
11
11
|
get(initialValue: _Data | null): {
|
|
12
|
-
kind:
|
|
12
|
+
kind: "HoudiniFragment";
|
|
13
13
|
subscribe: (run: import("svelte/store").Subscriber<_Data | null>, invalidate?: ((value?: _Data | null | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
|
|
14
14
|
update: (val: _Data | null) => void;
|
|
15
15
|
};
|
|
@@ -11,13 +11,13 @@ declare class BasePaginatedFragmentStore<_Data extends GraphQLObject, _Input> {
|
|
|
11
11
|
paginated: boolean;
|
|
12
12
|
protected paginationArtifact: QueryArtifact;
|
|
13
13
|
name: string;
|
|
14
|
-
kind:
|
|
14
|
+
kind: "HoudiniFragment";
|
|
15
15
|
constructor(config: FragmentStoreConfig<_Data, _Input>);
|
|
16
16
|
protected queryVariables(store: Readable<FragmentPaginatedResult<_Data, unknown>>): _Input;
|
|
17
17
|
}
|
|
18
18
|
export declare class FragmentStoreCursor<_Data extends GraphQLObject, _Input extends Record<string, any>> extends BasePaginatedFragmentStore<_Data, _Input> {
|
|
19
19
|
get(initialValue: _Data | null): {
|
|
20
|
-
kind:
|
|
20
|
+
kind: "HoudiniFragment";
|
|
21
21
|
data: Readable<_Data | null>;
|
|
22
22
|
subscribe: (run: Subscriber<FragmentPaginatedResult<_Data, {
|
|
23
23
|
pageInfo: PageInfo;
|
|
@@ -44,7 +44,7 @@ export declare class FragmentStoreCursor<_Data extends GraphQLObject, _Input ext
|
|
|
44
44
|
}
|
|
45
45
|
export declare class FragmentStoreOffset<_Data extends GraphQLObject, _Input extends Record<string, any>> extends BasePaginatedFragmentStore<_Data, _Input> {
|
|
46
46
|
get(initialValue: _Data | null): {
|
|
47
|
-
kind:
|
|
47
|
+
kind: "HoudiniFragment";
|
|
48
48
|
data: Readable<_Data | null>;
|
|
49
49
|
subscribe: (run: import("$houdini/runtime/lib").Subscriber<import("$houdini/runtime/lib/types").QueryResult<_Data, _Input>>, invalidate?: (value?: import("$houdini/runtime/lib/types").QueryResult<_Data, _Input> | undefined) => void) => import("$houdini/runtime/lib").Unsubscriber;
|
|
50
50
|
fetch: (args?: import("../query").QueryStoreFetchParams<_Data, _Input> | undefined) => Promise<import("$houdini/runtime/lib/types").QueryResult<_Data, _Input>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { FetchContext } from '$houdini/runtime/client/plugins/fetch';
|
|
2
|
-
import type { GraphQLObject, HoudiniFetchContext, MutationArtifact, QueryArtifact, QueryResult } from '$houdini/runtime/lib/types';
|
|
3
|
-
import { ArtifactKind, CachePolicy } from '$houdini/runtime/lib/types';
|
|
2
|
+
import type { GraphQLObject, HoudiniFetchContext, MutationArtifact, QueryArtifact, QueryResult, CachePolicies } from '$houdini/runtime/lib/types';
|
|
4
3
|
import type { LoadEvent, RequestEvent } from '@sveltejs/kit';
|
|
5
4
|
import type { Readable } from 'svelte/store';
|
|
6
5
|
import type { PluginArtifactData } from '../../plugin/artifactData';
|
|
@@ -8,7 +7,7 @@ import { BaseStore } from './base';
|
|
|
8
7
|
export declare class QueryStore<_Data extends GraphQLObject, _Input extends {}> extends BaseStore<_Data, _Input, QueryArtifact> {
|
|
9
8
|
#private;
|
|
10
9
|
variables: boolean;
|
|
11
|
-
kind:
|
|
10
|
+
kind: "HoudiniQuery";
|
|
12
11
|
protected loadPending: boolean;
|
|
13
12
|
protected subscriberCount: number;
|
|
14
13
|
protected storeName: string;
|
|
@@ -34,7 +33,7 @@ export type StoreConfig<_Data extends GraphQLObject, _Input, _Artifact> = {
|
|
|
34
33
|
};
|
|
35
34
|
export declare function fetchParams<_Data extends GraphQLObject, _Input>(artifact: QueryArtifact | MutationArtifact, storeName: string, params?: QueryStoreFetchParams<_Data, _Input>): Promise<{
|
|
36
35
|
context: FetchContext;
|
|
37
|
-
policy:
|
|
36
|
+
policy: CachePolicies | undefined;
|
|
38
37
|
params: QueryStoreFetchParams<_Data, _Input>;
|
|
39
38
|
}>;
|
|
40
39
|
type FetchGlobalParams<_Data extends GraphQLObject, _Input> = {
|
|
@@ -44,7 +43,7 @@ type FetchGlobalParams<_Data extends GraphQLObject, _Input> = {
|
|
|
44
43
|
* a request will always be sent, even if the variables are the same as the last call
|
|
45
44
|
* to fetch.
|
|
46
45
|
*/
|
|
47
|
-
policy?:
|
|
46
|
+
policy?: CachePolicies;
|
|
48
47
|
/**
|
|
49
48
|
* An object that will be passed to the fetch function.
|
|
50
49
|
* You can do what you want with it!
|
|
@@ -3,7 +3,7 @@ import type { SubscriptionArtifact } from '$houdini/runtime/lib/types';
|
|
|
3
3
|
import type { GraphQLObject } from 'houdini';
|
|
4
4
|
import { BaseStore } from './base';
|
|
5
5
|
export declare class SubscriptionStore<_Data extends GraphQLObject, _Input extends {}> extends BaseStore<_Data, _Input, SubscriptionArtifact> {
|
|
6
|
-
kind:
|
|
6
|
+
kind: "HoudiniSubscription";
|
|
7
7
|
constructor({ artifact }: {
|
|
8
8
|
artifact: SubscriptionArtifact;
|
|
9
9
|
});
|
|
@@ -2,14 +2,14 @@ import type { GraphQLObject, FragmentArtifact, HoudiniFetchContext } from '$houd
|
|
|
2
2
|
export declare class FragmentStore<_Data extends GraphQLObject, _Input = {}> {
|
|
3
3
|
artifact: FragmentArtifact;
|
|
4
4
|
name: string;
|
|
5
|
-
kind:
|
|
5
|
+
kind: "HoudiniFragment";
|
|
6
6
|
protected context: HoudiniFetchContext | null;
|
|
7
7
|
constructor({ artifact, storeName }: {
|
|
8
8
|
artifact: FragmentArtifact;
|
|
9
9
|
storeName: string;
|
|
10
10
|
});
|
|
11
11
|
get(initialValue: _Data | null): {
|
|
12
|
-
kind:
|
|
12
|
+
kind: "HoudiniFragment";
|
|
13
13
|
subscribe: (run: import("svelte/store").Subscriber<_Data | null>, invalidate?: ((value?: _Data | null | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
|
|
14
14
|
update: (val: _Data | null) => void;
|
|
15
15
|
};
|
|
@@ -11,13 +11,13 @@ declare class BasePaginatedFragmentStore<_Data extends GraphQLObject, _Input> {
|
|
|
11
11
|
paginated: boolean;
|
|
12
12
|
protected paginationArtifact: QueryArtifact;
|
|
13
13
|
name: string;
|
|
14
|
-
kind:
|
|
14
|
+
kind: "HoudiniFragment";
|
|
15
15
|
constructor(config: FragmentStoreConfig<_Data, _Input>);
|
|
16
16
|
protected queryVariables(store: Readable<FragmentPaginatedResult<_Data, unknown>>): _Input;
|
|
17
17
|
}
|
|
18
18
|
export declare class FragmentStoreCursor<_Data extends GraphQLObject, _Input extends Record<string, any>> extends BasePaginatedFragmentStore<_Data, _Input> {
|
|
19
19
|
get(initialValue: _Data | null): {
|
|
20
|
-
kind:
|
|
20
|
+
kind: "HoudiniFragment";
|
|
21
21
|
data: Readable<_Data | null>;
|
|
22
22
|
subscribe: (run: Subscriber<FragmentPaginatedResult<_Data, {
|
|
23
23
|
pageInfo: PageInfo;
|
|
@@ -44,7 +44,7 @@ export declare class FragmentStoreCursor<_Data extends GraphQLObject, _Input ext
|
|
|
44
44
|
}
|
|
45
45
|
export declare class FragmentStoreOffset<_Data extends GraphQLObject, _Input extends Record<string, any>> extends BasePaginatedFragmentStore<_Data, _Input> {
|
|
46
46
|
get(initialValue: _Data | null): {
|
|
47
|
-
kind:
|
|
47
|
+
kind: "HoudiniFragment";
|
|
48
48
|
data: Readable<_Data | null>;
|
|
49
49
|
subscribe: (run: import("$houdini/runtime/lib").Subscriber<import("$houdini/runtime/lib/types").QueryResult<_Data, _Input>>, invalidate?: (value?: import("$houdini/runtime/lib/types").QueryResult<_Data, _Input> | undefined) => void) => import("$houdini/runtime/lib").Unsubscriber;
|
|
50
50
|
fetch: (args?: import("../query").QueryStoreFetchParams<_Data, _Input> | undefined) => Promise<import("$houdini/runtime/lib/types").QueryResult<_Data, _Input>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { FetchContext } from '$houdini/runtime/client/plugins/fetch';
|
|
2
|
-
import type { GraphQLObject, HoudiniFetchContext, MutationArtifact, QueryArtifact, QueryResult } from '$houdini/runtime/lib/types';
|
|
3
|
-
import { ArtifactKind, CachePolicy } from '$houdini/runtime/lib/types';
|
|
2
|
+
import type { GraphQLObject, HoudiniFetchContext, MutationArtifact, QueryArtifact, QueryResult, CachePolicies } from '$houdini/runtime/lib/types';
|
|
4
3
|
import type { LoadEvent, RequestEvent } from '@sveltejs/kit';
|
|
5
4
|
import type { Readable } from 'svelte/store';
|
|
6
5
|
import type { PluginArtifactData } from '../../plugin/artifactData';
|
|
@@ -8,7 +7,7 @@ import { BaseStore } from './base';
|
|
|
8
7
|
export declare class QueryStore<_Data extends GraphQLObject, _Input extends {}> extends BaseStore<_Data, _Input, QueryArtifact> {
|
|
9
8
|
#private;
|
|
10
9
|
variables: boolean;
|
|
11
|
-
kind:
|
|
10
|
+
kind: "HoudiniQuery";
|
|
12
11
|
protected loadPending: boolean;
|
|
13
12
|
protected subscriberCount: number;
|
|
14
13
|
protected storeName: string;
|
|
@@ -34,7 +33,7 @@ export type StoreConfig<_Data extends GraphQLObject, _Input, _Artifact> = {
|
|
|
34
33
|
};
|
|
35
34
|
export declare function fetchParams<_Data extends GraphQLObject, _Input>(artifact: QueryArtifact | MutationArtifact, storeName: string, params?: QueryStoreFetchParams<_Data, _Input>): Promise<{
|
|
36
35
|
context: FetchContext;
|
|
37
|
-
policy:
|
|
36
|
+
policy: CachePolicies | undefined;
|
|
38
37
|
params: QueryStoreFetchParams<_Data, _Input>;
|
|
39
38
|
}>;
|
|
40
39
|
type FetchGlobalParams<_Data extends GraphQLObject, _Input> = {
|
|
@@ -44,7 +43,7 @@ type FetchGlobalParams<_Data extends GraphQLObject, _Input> = {
|
|
|
44
43
|
* a request will always be sent, even if the variables are the same as the last call
|
|
45
44
|
* to fetch.
|
|
46
45
|
*/
|
|
47
|
-
policy?:
|
|
46
|
+
policy?: CachePolicies;
|
|
48
47
|
/**
|
|
49
48
|
* An object that will be passed to the fetch function.
|
|
50
49
|
* You can do what you want with it!
|
|
@@ -3,7 +3,7 @@ import type { SubscriptionArtifact } from '$houdini/runtime/lib/types';
|
|
|
3
3
|
import type { GraphQLObject } from 'houdini';
|
|
4
4
|
import { BaseStore } from './base';
|
|
5
5
|
export declare class SubscriptionStore<_Data extends GraphQLObject, _Input extends {}> extends BaseStore<_Data, _Input, SubscriptionArtifact> {
|
|
6
|
-
kind:
|
|
6
|
+
kind: "HoudiniSubscription";
|
|
7
7
|
constructor({ artifact }: {
|
|
8
8
|
artifact: SubscriptionArtifact;
|
|
9
9
|
});
|
package/build/test-cjs/index.js
CHANGED
|
@@ -89304,17 +89304,16 @@ var import_graphql26 = __toESM2(require_graphql2(), 1);
|
|
|
89304
89304
|
var import_graphql28 = __toESM2(require_graphql2(), 1);
|
|
89305
89305
|
var graphql2 = __toESM2(require_graphql2(), 1);
|
|
89306
89306
|
var import_minimatch = __toESM2(require_minimatch(), 1);
|
|
89307
|
-
var ArtifactKind =
|
|
89308
|
-
|
|
89309
|
-
|
|
89310
|
-
|
|
89311
|
-
|
|
89312
|
-
|
|
89313
|
-
|
|
89314
|
-
var
|
|
89315
|
-
var
|
|
89316
|
-
var
|
|
89317
|
-
var CompiledSubscriptionKind = "HoudiniSubscription";
|
|
89307
|
+
var ArtifactKind = {
|
|
89308
|
+
Query: "HoudiniQuery",
|
|
89309
|
+
Subscription: "HoudiniSubscription",
|
|
89310
|
+
Mutation: "HoudiniMutation",
|
|
89311
|
+
Fragment: "HoudiniFragment"
|
|
89312
|
+
};
|
|
89313
|
+
var CompiledFragmentKind = ArtifactKind.Fragment;
|
|
89314
|
+
var CompiledMutationKind = ArtifactKind.Mutation;
|
|
89315
|
+
var CompiledQueryKind = ArtifactKind.Query;
|
|
89316
|
+
var CompiledSubscriptionKind = ArtifactKind.Subscription;
|
|
89318
89317
|
var houdini_mode = {
|
|
89319
89318
|
get is_testing() {
|
|
89320
89319
|
return process.env.HOUDINI_TEST === "true";
|
|
@@ -144094,6 +144093,27 @@ var import_minimatch2 = __toESM3(require_minimatch2(), 1);
|
|
|
144094
144093
|
function keyFieldsForType(configFile, type) {
|
|
144095
144094
|
return configFile.types?.[type]?.keys || configFile.defaultKeys;
|
|
144096
144095
|
}
|
|
144096
|
+
var CachePolicy = {
|
|
144097
|
+
CacheOrNetwork: "CacheOrNetwork",
|
|
144098
|
+
CacheOnly: "CacheOnly",
|
|
144099
|
+
NetworkOnly: "NetworkOnly",
|
|
144100
|
+
CacheAndNetwork: "CacheAndNetwork"
|
|
144101
|
+
};
|
|
144102
|
+
var ArtifactKind2 = {
|
|
144103
|
+
Query: "HoudiniQuery",
|
|
144104
|
+
Subscription: "HoudiniSubscription",
|
|
144105
|
+
Mutation: "HoudiniMutation",
|
|
144106
|
+
Fragment: "HoudiniFragment"
|
|
144107
|
+
};
|
|
144108
|
+
var CompiledFragmentKind2 = ArtifactKind2.Fragment;
|
|
144109
|
+
var CompiledMutationKind2 = ArtifactKind2.Mutation;
|
|
144110
|
+
var CompiledQueryKind2 = ArtifactKind2.Query;
|
|
144111
|
+
var CompiledSubscriptionKind2 = ArtifactKind2.Subscription;
|
|
144112
|
+
var RefetchUpdateMode = {
|
|
144113
|
+
append: "append",
|
|
144114
|
+
prepend: "prepend",
|
|
144115
|
+
replace: "replace"
|
|
144116
|
+
};
|
|
144097
144117
|
var siteURL = "https://houdinigraphql.com";
|
|
144098
144118
|
var houdini_mode2 = {
|
|
144099
144119
|
get is_testing() {
|
|
@@ -144397,6 +144417,12 @@ async function glob2(pattern) {
|
|
|
144397
144417
|
return await (0, import_node_util5.promisify)(import_glob2.glob)(posixify2(pattern));
|
|
144398
144418
|
}
|
|
144399
144419
|
glob2.hasMagic = import_glob2.glob.hasMagic;
|
|
144420
|
+
var LogLevel = {
|
|
144421
|
+
Full: "full",
|
|
144422
|
+
Summary: "summary",
|
|
144423
|
+
ShortSummary: "short-summary",
|
|
144424
|
+
Quiet: "quiet"
|
|
144425
|
+
};
|
|
144400
144426
|
var currentDir2 = global.__dirname || dirname2((0, import_node_url3.fileURLToPath)(import_meta2.url));
|
|
144401
144427
|
var DEFAULT_CONFIG_PATH2 = join3(process.cwd(), "houdini.config.js");
|
|
144402
144428
|
var graphql5 = __toESM3(require_graphql22(), 1);
|
|
@@ -144959,7 +144985,7 @@ async function fragmentVariables(config22, documents) {
|
|
|
144959
144985
|
};
|
|
144960
144986
|
documents.push({
|
|
144961
144987
|
name: "generated::fragmentVariables",
|
|
144962
|
-
kind:
|
|
144988
|
+
kind: ArtifactKind2.Fragment,
|
|
144963
144989
|
document: doc,
|
|
144964
144990
|
originalParsed: doc,
|
|
144965
144991
|
generateStore: false,
|
|
@@ -145860,7 +145886,7 @@ async function paginate(config22, documents) {
|
|
|
145860
145886
|
]
|
|
145861
145887
|
};
|
|
145862
145888
|
newDocs.push({
|
|
145863
|
-
kind:
|
|
145889
|
+
kind: ArtifactKind2.Query,
|
|
145864
145890
|
filename: doc.filename,
|
|
145865
145891
|
name: refetchQueryName,
|
|
145866
145892
|
document: queryDoc,
|
|
@@ -146278,7 +146304,7 @@ async function addListFragments(config22, documents) {
|
|
|
146278
146304
|
config22.newDocuments += "\n" + generatedDoc.definitions.filter((c2) => c2.kind === "FragmentDefinition").map(graphql9.print).join("\n\n");
|
|
146279
146305
|
documents.push({
|
|
146280
146306
|
name: "generated::lists",
|
|
146281
|
-
kind:
|
|
146307
|
+
kind: ArtifactKind2.Fragment,
|
|
146282
146308
|
generateArtifact: false,
|
|
146283
146309
|
generateStore: false,
|
|
146284
146310
|
document: generatedDoc,
|
|
@@ -146541,7 +146567,7 @@ function selection({
|
|
|
146541
146567
|
(directive) => directive.name.value === config22.paginateDirective
|
|
146542
146568
|
);
|
|
146543
146569
|
if (paginated && document2.refetch && document2.refetch.method === "offset") {
|
|
146544
|
-
fieldObj.updates = [
|
|
146570
|
+
fieldObj.updates = [RefetchUpdateMode.append];
|
|
146545
146571
|
}
|
|
146546
146572
|
let continueConnection = inConnection;
|
|
146547
146573
|
if ([
|
|
@@ -146551,7 +146577,7 @@ function selection({
|
|
|
146551
146577
|
"hasNextPage",
|
|
146552
146578
|
"hasPreviousPage"
|
|
146553
146579
|
].includes(attributeName) && inConnection && document2.refetch) {
|
|
146554
|
-
fieldObj.updates = [
|
|
146580
|
+
fieldObj.updates = [RefetchUpdateMode.append, RefetchUpdateMode.prepend];
|
|
146555
146581
|
}
|
|
146556
146582
|
if (attributeName === "node" && inConnection) {
|
|
146557
146583
|
continueConnection = false;
|
|
@@ -146728,7 +146754,7 @@ function artifactGenerator(stats) {
|
|
|
146728
146754
|
);
|
|
146729
146755
|
let rootType = "";
|
|
146730
146756
|
let selectionSet;
|
|
146731
|
-
if (docKind !==
|
|
146757
|
+
if (docKind !== ArtifactKind2.Fragment) {
|
|
146732
146758
|
const operation = operations[0];
|
|
146733
146759
|
if (operation.operation === "query") {
|
|
146734
146760
|
rootType = config22.schema.getQueryType()?.name;
|
|
@@ -146761,7 +146787,7 @@ function artifactGenerator(stats) {
|
|
|
146761
146787
|
let directive = fragments[0]?.directives?.find(
|
|
146762
146788
|
(directive2) => directive2.name.value === config22.argumentsDirective
|
|
146763
146789
|
);
|
|
146764
|
-
if (docKind ===
|
|
146790
|
+
if (docKind === ArtifactKind2.Fragment && directive) {
|
|
146765
146791
|
inputs = fragmentArgumentsDefinitions(config22, doc.filename, fragments[0]);
|
|
146766
146792
|
}
|
|
146767
146793
|
const mergedSelection = flattenSelections({
|
|
@@ -146809,7 +146835,7 @@ function artifactGenerator(stats) {
|
|
|
146809
146835
|
}
|
|
146810
146836
|
const result = { ...prev };
|
|
146811
146837
|
const dataToAdd = plugin2.artifactData({ config: config22, document: doc }) ?? {};
|
|
146812
|
-
if (Object.keys(dataToAdd)
|
|
146838
|
+
if (Object.keys(dataToAdd)) {
|
|
146813
146839
|
result[plugin2.name] = dataToAdd;
|
|
146814
146840
|
}
|
|
146815
146841
|
return result;
|
|
@@ -148032,7 +148058,7 @@ function listDefinitions(config22, body, docs) {
|
|
|
148032
148058
|
function queryDefinitions(config22, body, docs, returnType) {
|
|
148033
148059
|
return AST12.tsTupleType(
|
|
148034
148060
|
docs.reduce((prev, doc) => {
|
|
148035
|
-
if (doc.kind !==
|
|
148061
|
+
if (doc.kind !== ArtifactKind2.Query || !doc.generateStore) {
|
|
148036
148062
|
return prev;
|
|
148037
148063
|
}
|
|
148038
148064
|
const definition = doc.document.definitions.find(
|
|
@@ -148063,7 +148089,7 @@ function queryDefinitions(config22, body, docs, returnType) {
|
|
|
148063
148089
|
}
|
|
148064
148090
|
function fragmentListMap(config22, concreteTypes, body, docs, return_type) {
|
|
148065
148091
|
return docs.reduce((prev, doc) => {
|
|
148066
|
-
if (doc.kind !==
|
|
148092
|
+
if (doc.kind !== ArtifactKind2.Fragment) {
|
|
148067
148093
|
return prev;
|
|
148068
148094
|
}
|
|
148069
148095
|
const definition = doc.document.definitions.find(
|
|
@@ -148262,10 +148288,10 @@ var graphql20 = __toESM3(require_graphql22(), 1);
|
|
|
148262
148288
|
async function graphqlExtensions(config22, documents) {
|
|
148263
148289
|
let internalSchema = `
|
|
148264
148290
|
enum CachePolicy {
|
|
148265
|
-
${
|
|
148266
|
-
${
|
|
148267
|
-
${
|
|
148268
|
-
${
|
|
148291
|
+
${CachePolicy.CacheAndNetwork}
|
|
148292
|
+
${CachePolicy.CacheOnly}
|
|
148293
|
+
${CachePolicy.CacheOrNetwork}
|
|
148294
|
+
${CachePolicy.NetworkOnly}
|
|
148269
148295
|
}
|
|
148270
148296
|
|
|
148271
148297
|
"""
|
|
@@ -149175,7 +149201,7 @@ function getAndVerifyNodeInterface(config22) {
|
|
|
149175
149201
|
var nbInvalidNodeFieldMessageDisplayed = 0;
|
|
149176
149202
|
function displayInvalidNodeFieldMessage(logLevel) {
|
|
149177
149203
|
if (nbInvalidNodeFieldMessageDisplayed === 0) {
|
|
149178
|
-
if (logLevel ===
|
|
149204
|
+
if (logLevel === LogLevel.Full) {
|
|
149179
149205
|
console.warn(invalidNodeFieldMessage);
|
|
149180
149206
|
} else {
|
|
149181
149207
|
console.warn(invalidNodeFieldMessageLight);
|
|
@@ -149331,7 +149357,7 @@ async function runPipeline22(config22, docs) {
|
|
|
149331
149357
|
}
|
|
149332
149358
|
const unchanged = artifactStats.total.length - artifactStats.changed.length - artifactStats.new.length - artifactStats.deleted.length;
|
|
149333
149359
|
const printMessage = !config22.pluginMode || unchanged !== artifactStats.total.length;
|
|
149334
|
-
if (!printMessage || config22.logLevel ===
|
|
149360
|
+
if (!printMessage || config22.logLevel === LogLevel.Quiet) {
|
|
149335
149361
|
if (error3) {
|
|
149336
149362
|
throw error3;
|
|
149337
149363
|
}
|
|
@@ -149345,14 +149371,14 @@ async function runPipeline22(config22, docs) {
|
|
|
149345
149371
|
}
|
|
149346
149372
|
if (artifactStats.total.length === 0) {
|
|
149347
149373
|
console.log(`\u{1F4A1} No operation found. If that's unexpected, please check your config.`);
|
|
149348
|
-
} else if (
|
|
149374
|
+
} else if (config22.logLevel == LogLevel.Summary || config22.logLevel == LogLevel.ShortSummary) {
|
|
149349
149375
|
if (unchanged > 0 && printMessage && !config22.pluginMode) {
|
|
149350
149376
|
console.log(`\u{1F4C3} Unchanged: ${unchanged}`);
|
|
149351
149377
|
}
|
|
149352
149378
|
logStyled("CREATED", artifactStats.new, config22.logLevel, config22.pluginMode);
|
|
149353
149379
|
logStyled("UPDATED", artifactStats.changed, config22.logLevel, config22.pluginMode);
|
|
149354
149380
|
logStyled("DELETED", artifactStats.deleted, config22.logLevel, config22.pluginMode);
|
|
149355
|
-
} else if (config22.logLevel ===
|
|
149381
|
+
} else if (config22.logLevel === LogLevel.Full) {
|
|
149356
149382
|
for (const artifact of artifactStats.total) {
|
|
149357
149383
|
let emoji = "\u{1F4C3}";
|
|
149358
149384
|
if (artifactStats.changed.includes(artifact)) {
|
|
@@ -149396,7 +149422,7 @@ function logStyled(kind, stat23, logLevel, plugin2) {
|
|
|
149396
149422
|
}
|
|
149397
149423
|
}
|
|
149398
149424
|
console.log(msg.join(""));
|
|
149399
|
-
if (!plugin2 && logLevel ===
|
|
149425
|
+
if (!plugin2 && logLevel === LogLevel.Summary) {
|
|
149400
149426
|
for (const artifact of stat23.slice(0, nbToDisplay)) {
|
|
149401
149427
|
console.log(` ${artifact}`);
|
|
149402
149428
|
}
|
|
@@ -202989,6 +203015,22 @@ function computeID(configFile, type, data2) {
|
|
|
202989
203015
|
}
|
|
202990
203016
|
return id2.slice(0, -2);
|
|
202991
203017
|
}
|
|
203018
|
+
var CachePolicy2 = {
|
|
203019
|
+
CacheOrNetwork: "CacheOrNetwork",
|
|
203020
|
+
CacheOnly: "CacheOnly",
|
|
203021
|
+
NetworkOnly: "NetworkOnly",
|
|
203022
|
+
CacheAndNetwork: "CacheAndNetwork"
|
|
203023
|
+
};
|
|
203024
|
+
var ArtifactKind3 = {
|
|
203025
|
+
Query: "HoudiniQuery",
|
|
203026
|
+
Subscription: "HoudiniSubscription",
|
|
203027
|
+
Mutation: "HoudiniMutation",
|
|
203028
|
+
Fragment: "HoudiniFragment"
|
|
203029
|
+
};
|
|
203030
|
+
var CompiledFragmentKind3 = ArtifactKind3.Fragment;
|
|
203031
|
+
var CompiledMutationKind3 = ArtifactKind3.Mutation;
|
|
203032
|
+
var CompiledQueryKind3 = ArtifactKind3.Query;
|
|
203033
|
+
var CompiledSubscriptionKind3 = ArtifactKind3.Subscription;
|
|
202992
203034
|
var siteURL2 = "https://houdinigraphql.com";
|
|
202993
203035
|
var houdini_mode3 = {
|
|
202994
203036
|
get is_testing() {
|
|
@@ -203280,13 +203322,12 @@ async function glob3(pattern) {
|
|
|
203280
203322
|
return await (0, import_node_util6.promisify)(import_glob3.glob)(posixify3(pattern));
|
|
203281
203323
|
}
|
|
203282
203324
|
glob3.hasMagic = import_glob3.glob.hasMagic;
|
|
203283
|
-
var
|
|
203284
|
-
|
|
203285
|
-
|
|
203286
|
-
|
|
203287
|
-
|
|
203288
|
-
|
|
203289
|
-
})(LogLevel || {});
|
|
203325
|
+
var LogLevel2 = {
|
|
203326
|
+
Full: "full",
|
|
203327
|
+
Summary: "summary",
|
|
203328
|
+
ShortSummary: "short-summary",
|
|
203329
|
+
Quiet: "quiet"
|
|
203330
|
+
};
|
|
203290
203331
|
var currentDir3 = global.__dirname || dirname3((0, import_node_url4.fileURLToPath)(import_meta3.url));
|
|
203291
203332
|
var Config = class {
|
|
203292
203333
|
filepath;
|
|
@@ -203335,7 +203376,7 @@ var Config = class {
|
|
|
203335
203376
|
scalars,
|
|
203336
203377
|
cacheBufferSize,
|
|
203337
203378
|
definitionsPath,
|
|
203338
|
-
defaultCachePolicy =
|
|
203379
|
+
defaultCachePolicy = CachePolicy2.CacheOrNetwork,
|
|
203339
203380
|
defaultPartial = false,
|
|
203340
203381
|
defaultListPosition = "append",
|
|
203341
203382
|
defaultListTarget = null,
|
|
@@ -203351,13 +203392,13 @@ var Config = class {
|
|
|
203351
203392
|
} else {
|
|
203352
203393
|
this.schema = schema2;
|
|
203353
203394
|
}
|
|
203354
|
-
if (logLevel && !Object.values(
|
|
203395
|
+
if (logLevel && !Object.values(LogLevel2).includes(logLevel.toLowerCase())) {
|
|
203355
203396
|
console.warn(
|
|
203356
203397
|
`\u26A0\uFE0F Invalid log level provided. Valid values are: ${JSON.stringify(
|
|
203357
|
-
Object.values(
|
|
203398
|
+
Object.values(LogLevel2)
|
|
203358
203399
|
)}`
|
|
203359
203400
|
);
|
|
203360
|
-
logLevel =
|
|
203401
|
+
logLevel = LogLevel2.Summary;
|
|
203361
203402
|
}
|
|
203362
203403
|
this.schemaPath = schemaPath;
|
|
203363
203404
|
this.filepath = filepath;
|
|
@@ -203373,7 +203414,7 @@ var Config = class {
|
|
|
203373
203414
|
this.internalListPosition = defaultListPosition === "append" ? "last" : "first";
|
|
203374
203415
|
this.defaultListTarget = defaultListTarget;
|
|
203375
203416
|
this.definitionsFolder = definitionsPath;
|
|
203376
|
-
this.logLevel = (logLevel ||
|
|
203417
|
+
this.logLevel = (logLevel || LogLevel2.Summary).toLowerCase();
|
|
203377
203418
|
this.defaultFragmentMasking = defaultFragmentMasking;
|
|
203378
203419
|
this.routesDir = join4(this.projectRoot, "src", "routes");
|
|
203379
203420
|
this.schemaPollInterval = watchSchema?.interval ?? 2e3;
|
|
@@ -204186,14 +204227,14 @@ function mockCollectedDoc(query) {
|
|
|
204186
204227
|
const parsed = graphql252.parse(query);
|
|
204187
204228
|
const name = parsed.definitions[0].name.value;
|
|
204188
204229
|
const operations = parsed.definitions;
|
|
204189
|
-
let kind =
|
|
204230
|
+
let kind = ArtifactKind3.Fragment;
|
|
204190
204231
|
if (operations.length === 1) {
|
|
204191
204232
|
if (operations[0].kind === "OperationDefinition" && operations[0].operation === "query") {
|
|
204192
|
-
kind =
|
|
204233
|
+
kind = ArtifactKind3.Query;
|
|
204193
204234
|
} else if (operations[0].kind === "OperationDefinition" && operations[0].operation === "mutation") {
|
|
204194
|
-
kind =
|
|
204235
|
+
kind = ArtifactKind3.Mutation;
|
|
204195
204236
|
} else if (operations[0].kind === "OperationDefinition" && operations[0].operation === "subscription") {
|
|
204196
|
-
kind =
|
|
204237
|
+
kind = ArtifactKind3.Subscription;
|
|
204197
204238
|
}
|
|
204198
204239
|
}
|
|
204199
204240
|
return {
|
|
@@ -265924,6 +265965,16 @@ var import_graphql262 = __toESM5(require_graphql24(), 1);
|
|
|
265924
265965
|
var import_graphql282 = __toESM5(require_graphql24(), 1);
|
|
265925
265966
|
var graphql29 = __toESM5(require_graphql24(), 1);
|
|
265926
265967
|
var import_minimatch4 = __toESM5(require_minimatch4(), 1);
|
|
265968
|
+
var ArtifactKind4 = {
|
|
265969
|
+
Query: "HoudiniQuery",
|
|
265970
|
+
Subscription: "HoudiniSubscription",
|
|
265971
|
+
Mutation: "HoudiniMutation",
|
|
265972
|
+
Fragment: "HoudiniFragment"
|
|
265973
|
+
};
|
|
265974
|
+
var CompiledFragmentKind4 = ArtifactKind4.Fragment;
|
|
265975
|
+
var CompiledMutationKind4 = ArtifactKind4.Mutation;
|
|
265976
|
+
var CompiledQueryKind4 = ArtifactKind4.Query;
|
|
265977
|
+
var CompiledSubscriptionKind4 = ArtifactKind4.Subscription;
|
|
265927
265978
|
var siteURL3 = "https://houdinigraphql.com";
|
|
265928
265979
|
var houdini_mode4 = {
|
|
265929
265980
|
get is_testing() {
|
package/build/test-esm/index.js
CHANGED
|
@@ -89296,17 +89296,16 @@ var import_graphql26 = __toESM2(require_graphql2(), 1);
|
|
|
89296
89296
|
var import_graphql28 = __toESM2(require_graphql2(), 1);
|
|
89297
89297
|
var graphql2 = __toESM2(require_graphql2(), 1);
|
|
89298
89298
|
var import_minimatch = __toESM2(require_minimatch(), 1);
|
|
89299
|
-
var ArtifactKind =
|
|
89300
|
-
|
|
89301
|
-
|
|
89302
|
-
|
|
89303
|
-
|
|
89304
|
-
|
|
89305
|
-
|
|
89306
|
-
var
|
|
89307
|
-
var
|
|
89308
|
-
var
|
|
89309
|
-
var CompiledSubscriptionKind = "HoudiniSubscription";
|
|
89299
|
+
var ArtifactKind = {
|
|
89300
|
+
Query: "HoudiniQuery",
|
|
89301
|
+
Subscription: "HoudiniSubscription",
|
|
89302
|
+
Mutation: "HoudiniMutation",
|
|
89303
|
+
Fragment: "HoudiniFragment"
|
|
89304
|
+
};
|
|
89305
|
+
var CompiledFragmentKind = ArtifactKind.Fragment;
|
|
89306
|
+
var CompiledMutationKind = ArtifactKind.Mutation;
|
|
89307
|
+
var CompiledQueryKind = ArtifactKind.Query;
|
|
89308
|
+
var CompiledSubscriptionKind = ArtifactKind.Subscription;
|
|
89310
89309
|
var houdini_mode = {
|
|
89311
89310
|
get is_testing() {
|
|
89312
89311
|
return process.env.HOUDINI_TEST === "true";
|
|
@@ -144085,6 +144084,27 @@ var import_minimatch2 = __toESM3(require_minimatch2(), 1);
|
|
|
144085
144084
|
function keyFieldsForType(configFile, type) {
|
|
144086
144085
|
return configFile.types?.[type]?.keys || configFile.defaultKeys;
|
|
144087
144086
|
}
|
|
144087
|
+
var CachePolicy = {
|
|
144088
|
+
CacheOrNetwork: "CacheOrNetwork",
|
|
144089
|
+
CacheOnly: "CacheOnly",
|
|
144090
|
+
NetworkOnly: "NetworkOnly",
|
|
144091
|
+
CacheAndNetwork: "CacheAndNetwork"
|
|
144092
|
+
};
|
|
144093
|
+
var ArtifactKind2 = {
|
|
144094
|
+
Query: "HoudiniQuery",
|
|
144095
|
+
Subscription: "HoudiniSubscription",
|
|
144096
|
+
Mutation: "HoudiniMutation",
|
|
144097
|
+
Fragment: "HoudiniFragment"
|
|
144098
|
+
};
|
|
144099
|
+
var CompiledFragmentKind2 = ArtifactKind2.Fragment;
|
|
144100
|
+
var CompiledMutationKind2 = ArtifactKind2.Mutation;
|
|
144101
|
+
var CompiledQueryKind2 = ArtifactKind2.Query;
|
|
144102
|
+
var CompiledSubscriptionKind2 = ArtifactKind2.Subscription;
|
|
144103
|
+
var RefetchUpdateMode = {
|
|
144104
|
+
append: "append",
|
|
144105
|
+
prepend: "prepend",
|
|
144106
|
+
replace: "replace"
|
|
144107
|
+
};
|
|
144088
144108
|
var siteURL = "https://houdinigraphql.com";
|
|
144089
144109
|
var houdini_mode2 = {
|
|
144090
144110
|
get is_testing() {
|
|
@@ -144388,6 +144408,12 @@ async function glob2(pattern) {
|
|
|
144388
144408
|
return await promisify3(import_glob2.glob)(posixify2(pattern));
|
|
144389
144409
|
}
|
|
144390
144410
|
glob2.hasMagic = import_glob2.glob.hasMagic;
|
|
144411
|
+
var LogLevel = {
|
|
144412
|
+
Full: "full",
|
|
144413
|
+
Summary: "summary",
|
|
144414
|
+
ShortSummary: "short-summary",
|
|
144415
|
+
Quiet: "quiet"
|
|
144416
|
+
};
|
|
144391
144417
|
var currentDir2 = global.__dirname || dirname2(fileURLToPath2(import.meta.url));
|
|
144392
144418
|
var DEFAULT_CONFIG_PATH2 = join3(process.cwd(), "houdini.config.js");
|
|
144393
144419
|
var graphql5 = __toESM3(require_graphql22(), 1);
|
|
@@ -144950,7 +144976,7 @@ async function fragmentVariables(config22, documents) {
|
|
|
144950
144976
|
};
|
|
144951
144977
|
documents.push({
|
|
144952
144978
|
name: "generated::fragmentVariables",
|
|
144953
|
-
kind:
|
|
144979
|
+
kind: ArtifactKind2.Fragment,
|
|
144954
144980
|
document: doc,
|
|
144955
144981
|
originalParsed: doc,
|
|
144956
144982
|
generateStore: false,
|
|
@@ -145851,7 +145877,7 @@ async function paginate(config22, documents) {
|
|
|
145851
145877
|
]
|
|
145852
145878
|
};
|
|
145853
145879
|
newDocs.push({
|
|
145854
|
-
kind:
|
|
145880
|
+
kind: ArtifactKind2.Query,
|
|
145855
145881
|
filename: doc.filename,
|
|
145856
145882
|
name: refetchQueryName,
|
|
145857
145883
|
document: queryDoc,
|
|
@@ -146269,7 +146295,7 @@ async function addListFragments(config22, documents) {
|
|
|
146269
146295
|
config22.newDocuments += "\n" + generatedDoc.definitions.filter((c2) => c2.kind === "FragmentDefinition").map(graphql9.print).join("\n\n");
|
|
146270
146296
|
documents.push({
|
|
146271
146297
|
name: "generated::lists",
|
|
146272
|
-
kind:
|
|
146298
|
+
kind: ArtifactKind2.Fragment,
|
|
146273
146299
|
generateArtifact: false,
|
|
146274
146300
|
generateStore: false,
|
|
146275
146301
|
document: generatedDoc,
|
|
@@ -146532,7 +146558,7 @@ function selection({
|
|
|
146532
146558
|
(directive) => directive.name.value === config22.paginateDirective
|
|
146533
146559
|
);
|
|
146534
146560
|
if (paginated && document2.refetch && document2.refetch.method === "offset") {
|
|
146535
|
-
fieldObj.updates = [
|
|
146561
|
+
fieldObj.updates = [RefetchUpdateMode.append];
|
|
146536
146562
|
}
|
|
146537
146563
|
let continueConnection = inConnection;
|
|
146538
146564
|
if ([
|
|
@@ -146542,7 +146568,7 @@ function selection({
|
|
|
146542
146568
|
"hasNextPage",
|
|
146543
146569
|
"hasPreviousPage"
|
|
146544
146570
|
].includes(attributeName) && inConnection && document2.refetch) {
|
|
146545
|
-
fieldObj.updates = [
|
|
146571
|
+
fieldObj.updates = [RefetchUpdateMode.append, RefetchUpdateMode.prepend];
|
|
146546
146572
|
}
|
|
146547
146573
|
if (attributeName === "node" && inConnection) {
|
|
146548
146574
|
continueConnection = false;
|
|
@@ -146719,7 +146745,7 @@ function artifactGenerator(stats) {
|
|
|
146719
146745
|
);
|
|
146720
146746
|
let rootType = "";
|
|
146721
146747
|
let selectionSet;
|
|
146722
|
-
if (docKind !==
|
|
146748
|
+
if (docKind !== ArtifactKind2.Fragment) {
|
|
146723
146749
|
const operation = operations[0];
|
|
146724
146750
|
if (operation.operation === "query") {
|
|
146725
146751
|
rootType = config22.schema.getQueryType()?.name;
|
|
@@ -146752,7 +146778,7 @@ function artifactGenerator(stats) {
|
|
|
146752
146778
|
let directive = fragments[0]?.directives?.find(
|
|
146753
146779
|
(directive2) => directive2.name.value === config22.argumentsDirective
|
|
146754
146780
|
);
|
|
146755
|
-
if (docKind ===
|
|
146781
|
+
if (docKind === ArtifactKind2.Fragment && directive) {
|
|
146756
146782
|
inputs = fragmentArgumentsDefinitions(config22, doc.filename, fragments[0]);
|
|
146757
146783
|
}
|
|
146758
146784
|
const mergedSelection = flattenSelections({
|
|
@@ -146800,7 +146826,7 @@ function artifactGenerator(stats) {
|
|
|
146800
146826
|
}
|
|
146801
146827
|
const result = { ...prev };
|
|
146802
146828
|
const dataToAdd = plugin2.artifactData({ config: config22, document: doc }) ?? {};
|
|
146803
|
-
if (Object.keys(dataToAdd)
|
|
146829
|
+
if (Object.keys(dataToAdd)) {
|
|
146804
146830
|
result[plugin2.name] = dataToAdd;
|
|
146805
146831
|
}
|
|
146806
146832
|
return result;
|
|
@@ -148023,7 +148049,7 @@ function listDefinitions(config22, body, docs) {
|
|
|
148023
148049
|
function queryDefinitions(config22, body, docs, returnType) {
|
|
148024
148050
|
return AST12.tsTupleType(
|
|
148025
148051
|
docs.reduce((prev, doc) => {
|
|
148026
|
-
if (doc.kind !==
|
|
148052
|
+
if (doc.kind !== ArtifactKind2.Query || !doc.generateStore) {
|
|
148027
148053
|
return prev;
|
|
148028
148054
|
}
|
|
148029
148055
|
const definition = doc.document.definitions.find(
|
|
@@ -148054,7 +148080,7 @@ function queryDefinitions(config22, body, docs, returnType) {
|
|
|
148054
148080
|
}
|
|
148055
148081
|
function fragmentListMap(config22, concreteTypes, body, docs, return_type) {
|
|
148056
148082
|
return docs.reduce((prev, doc) => {
|
|
148057
|
-
if (doc.kind !==
|
|
148083
|
+
if (doc.kind !== ArtifactKind2.Fragment) {
|
|
148058
148084
|
return prev;
|
|
148059
148085
|
}
|
|
148060
148086
|
const definition = doc.document.definitions.find(
|
|
@@ -148253,10 +148279,10 @@ var graphql20 = __toESM3(require_graphql22(), 1);
|
|
|
148253
148279
|
async function graphqlExtensions(config22, documents) {
|
|
148254
148280
|
let internalSchema = `
|
|
148255
148281
|
enum CachePolicy {
|
|
148256
|
-
${
|
|
148257
|
-
${
|
|
148258
|
-
${
|
|
148259
|
-
${
|
|
148282
|
+
${CachePolicy.CacheAndNetwork}
|
|
148283
|
+
${CachePolicy.CacheOnly}
|
|
148284
|
+
${CachePolicy.CacheOrNetwork}
|
|
148285
|
+
${CachePolicy.NetworkOnly}
|
|
148260
148286
|
}
|
|
148261
148287
|
|
|
148262
148288
|
"""
|
|
@@ -149166,7 +149192,7 @@ function getAndVerifyNodeInterface(config22) {
|
|
|
149166
149192
|
var nbInvalidNodeFieldMessageDisplayed = 0;
|
|
149167
149193
|
function displayInvalidNodeFieldMessage(logLevel) {
|
|
149168
149194
|
if (nbInvalidNodeFieldMessageDisplayed === 0) {
|
|
149169
|
-
if (logLevel ===
|
|
149195
|
+
if (logLevel === LogLevel.Full) {
|
|
149170
149196
|
console.warn(invalidNodeFieldMessage);
|
|
149171
149197
|
} else {
|
|
149172
149198
|
console.warn(invalidNodeFieldMessageLight);
|
|
@@ -149322,7 +149348,7 @@ async function runPipeline22(config22, docs) {
|
|
|
149322
149348
|
}
|
|
149323
149349
|
const unchanged = artifactStats.total.length - artifactStats.changed.length - artifactStats.new.length - artifactStats.deleted.length;
|
|
149324
149350
|
const printMessage = !config22.pluginMode || unchanged !== artifactStats.total.length;
|
|
149325
|
-
if (!printMessage || config22.logLevel ===
|
|
149351
|
+
if (!printMessage || config22.logLevel === LogLevel.Quiet) {
|
|
149326
149352
|
if (error3) {
|
|
149327
149353
|
throw error3;
|
|
149328
149354
|
}
|
|
@@ -149336,14 +149362,14 @@ async function runPipeline22(config22, docs) {
|
|
|
149336
149362
|
}
|
|
149337
149363
|
if (artifactStats.total.length === 0) {
|
|
149338
149364
|
console.log(`\u{1F4A1} No operation found. If that's unexpected, please check your config.`);
|
|
149339
|
-
} else if (
|
|
149365
|
+
} else if (config22.logLevel == LogLevel.Summary || config22.logLevel == LogLevel.ShortSummary) {
|
|
149340
149366
|
if (unchanged > 0 && printMessage && !config22.pluginMode) {
|
|
149341
149367
|
console.log(`\u{1F4C3} Unchanged: ${unchanged}`);
|
|
149342
149368
|
}
|
|
149343
149369
|
logStyled("CREATED", artifactStats.new, config22.logLevel, config22.pluginMode);
|
|
149344
149370
|
logStyled("UPDATED", artifactStats.changed, config22.logLevel, config22.pluginMode);
|
|
149345
149371
|
logStyled("DELETED", artifactStats.deleted, config22.logLevel, config22.pluginMode);
|
|
149346
|
-
} else if (config22.logLevel ===
|
|
149372
|
+
} else if (config22.logLevel === LogLevel.Full) {
|
|
149347
149373
|
for (const artifact of artifactStats.total) {
|
|
149348
149374
|
let emoji = "\u{1F4C3}";
|
|
149349
149375
|
if (artifactStats.changed.includes(artifact)) {
|
|
@@ -149387,7 +149413,7 @@ function logStyled(kind, stat23, logLevel, plugin2) {
|
|
|
149387
149413
|
}
|
|
149388
149414
|
}
|
|
149389
149415
|
console.log(msg.join(""));
|
|
149390
|
-
if (!plugin2 && logLevel ===
|
|
149416
|
+
if (!plugin2 && logLevel === LogLevel.Summary) {
|
|
149391
149417
|
for (const artifact of stat23.slice(0, nbToDisplay)) {
|
|
149392
149418
|
console.log(` ${artifact}`);
|
|
149393
149419
|
}
|
|
@@ -202979,6 +203005,22 @@ function computeID(configFile, type, data2) {
|
|
|
202979
203005
|
}
|
|
202980
203006
|
return id2.slice(0, -2);
|
|
202981
203007
|
}
|
|
203008
|
+
var CachePolicy2 = {
|
|
203009
|
+
CacheOrNetwork: "CacheOrNetwork",
|
|
203010
|
+
CacheOnly: "CacheOnly",
|
|
203011
|
+
NetworkOnly: "NetworkOnly",
|
|
203012
|
+
CacheAndNetwork: "CacheAndNetwork"
|
|
203013
|
+
};
|
|
203014
|
+
var ArtifactKind3 = {
|
|
203015
|
+
Query: "HoudiniQuery",
|
|
203016
|
+
Subscription: "HoudiniSubscription",
|
|
203017
|
+
Mutation: "HoudiniMutation",
|
|
203018
|
+
Fragment: "HoudiniFragment"
|
|
203019
|
+
};
|
|
203020
|
+
var CompiledFragmentKind3 = ArtifactKind3.Fragment;
|
|
203021
|
+
var CompiledMutationKind3 = ArtifactKind3.Mutation;
|
|
203022
|
+
var CompiledQueryKind3 = ArtifactKind3.Query;
|
|
203023
|
+
var CompiledSubscriptionKind3 = ArtifactKind3.Subscription;
|
|
202982
203024
|
var siteURL2 = "https://houdinigraphql.com";
|
|
202983
203025
|
var houdini_mode3 = {
|
|
202984
203026
|
get is_testing() {
|
|
@@ -203270,13 +203312,12 @@ async function glob3(pattern) {
|
|
|
203270
203312
|
return await promisify4(import_glob3.glob)(posixify3(pattern));
|
|
203271
203313
|
}
|
|
203272
203314
|
glob3.hasMagic = import_glob3.glob.hasMagic;
|
|
203273
|
-
var
|
|
203274
|
-
|
|
203275
|
-
|
|
203276
|
-
|
|
203277
|
-
|
|
203278
|
-
|
|
203279
|
-
})(LogLevel || {});
|
|
203315
|
+
var LogLevel2 = {
|
|
203316
|
+
Full: "full",
|
|
203317
|
+
Summary: "summary",
|
|
203318
|
+
ShortSummary: "short-summary",
|
|
203319
|
+
Quiet: "quiet"
|
|
203320
|
+
};
|
|
203280
203321
|
var currentDir3 = global.__dirname || dirname3(fileURLToPath3(import.meta.url));
|
|
203281
203322
|
var Config = class {
|
|
203282
203323
|
filepath;
|
|
@@ -203325,7 +203366,7 @@ var Config = class {
|
|
|
203325
203366
|
scalars,
|
|
203326
203367
|
cacheBufferSize,
|
|
203327
203368
|
definitionsPath,
|
|
203328
|
-
defaultCachePolicy =
|
|
203369
|
+
defaultCachePolicy = CachePolicy2.CacheOrNetwork,
|
|
203329
203370
|
defaultPartial = false,
|
|
203330
203371
|
defaultListPosition = "append",
|
|
203331
203372
|
defaultListTarget = null,
|
|
@@ -203341,13 +203382,13 @@ var Config = class {
|
|
|
203341
203382
|
} else {
|
|
203342
203383
|
this.schema = schema2;
|
|
203343
203384
|
}
|
|
203344
|
-
if (logLevel && !Object.values(
|
|
203385
|
+
if (logLevel && !Object.values(LogLevel2).includes(logLevel.toLowerCase())) {
|
|
203345
203386
|
console.warn(
|
|
203346
203387
|
`\u26A0\uFE0F Invalid log level provided. Valid values are: ${JSON.stringify(
|
|
203347
|
-
Object.values(
|
|
203388
|
+
Object.values(LogLevel2)
|
|
203348
203389
|
)}`
|
|
203349
203390
|
);
|
|
203350
|
-
logLevel =
|
|
203391
|
+
logLevel = LogLevel2.Summary;
|
|
203351
203392
|
}
|
|
203352
203393
|
this.schemaPath = schemaPath;
|
|
203353
203394
|
this.filepath = filepath;
|
|
@@ -203363,7 +203404,7 @@ var Config = class {
|
|
|
203363
203404
|
this.internalListPosition = defaultListPosition === "append" ? "last" : "first";
|
|
203364
203405
|
this.defaultListTarget = defaultListTarget;
|
|
203365
203406
|
this.definitionsFolder = definitionsPath;
|
|
203366
|
-
this.logLevel = (logLevel ||
|
|
203407
|
+
this.logLevel = (logLevel || LogLevel2.Summary).toLowerCase();
|
|
203367
203408
|
this.defaultFragmentMasking = defaultFragmentMasking;
|
|
203368
203409
|
this.routesDir = join4(this.projectRoot, "src", "routes");
|
|
203369
203410
|
this.schemaPollInterval = watchSchema?.interval ?? 2e3;
|
|
@@ -204176,14 +204217,14 @@ function mockCollectedDoc(query) {
|
|
|
204176
204217
|
const parsed = graphql252.parse(query);
|
|
204177
204218
|
const name = parsed.definitions[0].name.value;
|
|
204178
204219
|
const operations = parsed.definitions;
|
|
204179
|
-
let kind =
|
|
204220
|
+
let kind = ArtifactKind3.Fragment;
|
|
204180
204221
|
if (operations.length === 1) {
|
|
204181
204222
|
if (operations[0].kind === "OperationDefinition" && operations[0].operation === "query") {
|
|
204182
|
-
kind =
|
|
204223
|
+
kind = ArtifactKind3.Query;
|
|
204183
204224
|
} else if (operations[0].kind === "OperationDefinition" && operations[0].operation === "mutation") {
|
|
204184
|
-
kind =
|
|
204225
|
+
kind = ArtifactKind3.Mutation;
|
|
204185
204226
|
} else if (operations[0].kind === "OperationDefinition" && operations[0].operation === "subscription") {
|
|
204186
|
-
kind =
|
|
204227
|
+
kind = ArtifactKind3.Subscription;
|
|
204187
204228
|
}
|
|
204188
204229
|
}
|
|
204189
204230
|
return {
|
|
@@ -265913,6 +265954,16 @@ var import_graphql262 = __toESM5(require_graphql24(), 1);
|
|
|
265913
265954
|
var import_graphql282 = __toESM5(require_graphql24(), 1);
|
|
265914
265955
|
var graphql29 = __toESM5(require_graphql24(), 1);
|
|
265915
265956
|
var import_minimatch4 = __toESM5(require_minimatch4(), 1);
|
|
265957
|
+
var ArtifactKind4 = {
|
|
265958
|
+
Query: "HoudiniQuery",
|
|
265959
|
+
Subscription: "HoudiniSubscription",
|
|
265960
|
+
Mutation: "HoudiniMutation",
|
|
265961
|
+
Fragment: "HoudiniFragment"
|
|
265962
|
+
};
|
|
265963
|
+
var CompiledFragmentKind4 = ArtifactKind4.Fragment;
|
|
265964
|
+
var CompiledMutationKind4 = ArtifactKind4.Mutation;
|
|
265965
|
+
var CompiledQueryKind4 = ArtifactKind4.Query;
|
|
265966
|
+
var CompiledSubscriptionKind4 = ArtifactKind4.Subscription;
|
|
265916
265967
|
var siteURL3 = "https://houdinigraphql.com";
|
|
265917
265968
|
var houdini_mode4 = {
|
|
265918
265969
|
get is_testing() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-svelte",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.19",
|
|
4
4
|
"description": "The svelte plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"rollup": "^3.7.4",
|
|
33
33
|
"svelte": "^3.55.1",
|
|
34
34
|
"vite": "^4.0.4",
|
|
35
|
-
"houdini": "^1.0.0-next.
|
|
35
|
+
"houdini": "^1.0.0-next.19"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"build"
|