houdini 1.5.3 → 2.0.0-next.0

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.
Files changed (85) hide show
  1. package/build/cmd-cjs/index.js +29435 -22707
  2. package/build/cmd-esm/index.js +27980 -21253
  3. package/build/codegen/generators/artifacts/index.d.ts +8 -0
  4. package/build/codegen/generators/runtime/index.d.ts +2 -7
  5. package/build/codegen/generators/runtime/pluginRuntime.d.ts +8 -1
  6. package/build/codegen/index.d.ts +3 -2
  7. package/build/codegen/transforms/fragmentVariables.d.ts +1 -1
  8. package/build/codegen/transforms/list.d.ts +2 -2
  9. package/build/codegen/transforms/paginate.d.ts +2 -34
  10. package/build/codegen/utils/flattenSelections.d.ts +1 -1
  11. package/build/codegen-cjs/index.js +24805 -19718
  12. package/build/codegen-esm/index.js +24979 -19892
  13. package/build/lib/fs.d.ts +3 -2
  14. package/build/lib/index.d.ts +1 -0
  15. package/build/lib/router/conventions.d.ts +1 -1
  16. package/build/lib/router/manifest.d.ts +1 -1
  17. package/build/lib/typescript.d.ts +1 -1
  18. package/build/lib/watchAndRun.d.ts +61 -0
  19. package/build/lib-cjs/index.js +27118 -21197
  20. package/build/lib-esm/index.js +25693 -19775
  21. package/build/runtime-cjs/cache/cache.js +22 -1
  22. package/build/runtime-cjs/cache/gc.js +1 -0
  23. package/build/runtime-cjs/cache/index.js +0 -2
  24. package/build/runtime-cjs/cache/lists.js +9 -0
  25. package/build/runtime-cjs/cache/staleManager.js +26 -1
  26. package/build/runtime-cjs/cache/storage.js +4 -0
  27. package/build/runtime-cjs/cache/subscription.js +1 -0
  28. package/build/runtime-cjs/client/documentStore.js +28 -2
  29. package/build/runtime-cjs/client/index.js +17 -1
  30. package/build/runtime-cjs/client/plugins/cache.js +8 -2
  31. package/build/runtime-cjs/client/plugins/fetch.js +14 -6
  32. package/build/runtime-cjs/client/plugins/fetchParams.js +2 -0
  33. package/build/runtime-cjs/client/plugins/fragment.js +1 -0
  34. package/build/runtime-cjs/client/plugins/index.js +9 -1
  35. package/build/runtime-cjs/client/plugins/injectedPlugins.js +0 -2
  36. package/build/runtime-cjs/client/plugins/mutation.js +6 -0
  37. package/build/runtime-cjs/client/plugins/optimisticKeys.js +10 -3
  38. package/build/runtime-cjs/client/plugins/query.js +4 -0
  39. package/build/runtime-cjs/client/utils/index.js +4 -0
  40. package/build/runtime-cjs/imports/config.js +0 -2
  41. package/build/runtime-cjs/imports/pluginConfig.js +0 -2
  42. package/build/runtime-cjs/index.js +12 -6
  43. package/build/runtime-cjs/lib/config.js +4 -0
  44. package/build/runtime-cjs/lib/deepEquals.js +2 -4
  45. package/build/runtime-cjs/lib/index.js +13 -0
  46. package/build/runtime-cjs/lib/pagination.js +2 -1
  47. package/build/runtime-cjs/lib/types.js +11 -1
  48. package/build/runtime-cjs/public/cache.js +11 -0
  49. package/build/runtime-cjs/public/record.js +5 -0
  50. package/build/runtime-cjs/router/jwt.js +15 -28
  51. package/build/runtime-cjs/router/match.js +2 -4
  52. package/build/runtime-cjs/router/server.js +6 -1
  53. package/build/runtime-cjs/router/session.js +1 -1
  54. package/build/runtime-esm/cache/cache.js +22 -1
  55. package/build/runtime-esm/cache/gc.js +1 -0
  56. package/build/runtime-esm/cache/lists.js +9 -0
  57. package/build/runtime-esm/cache/staleManager.js +26 -1
  58. package/build/runtime-esm/cache/storage.js +4 -0
  59. package/build/runtime-esm/cache/subscription.js +1 -0
  60. package/build/runtime-esm/client/documentStore.js +28 -2
  61. package/build/runtime-esm/client/index.js +13 -1
  62. package/build/runtime-esm/client/plugins/cache.js +4 -2
  63. package/build/runtime-esm/client/plugins/fetch.js +14 -6
  64. package/build/runtime-esm/client/plugins/fetchParams.js +2 -0
  65. package/build/runtime-esm/client/plugins/fragment.js +1 -0
  66. package/build/runtime-esm/client/plugins/mutation.js +6 -0
  67. package/build/runtime-esm/client/plugins/optimisticKeys.js +6 -3
  68. package/build/runtime-esm/client/plugins/query.js +4 -0
  69. package/build/runtime-esm/lib/deepEquals.js +2 -4
  70. package/build/runtime-esm/lib/pagination.js +2 -1
  71. package/build/runtime-esm/lib/types.js +9 -0
  72. package/build/runtime-esm/public/cache.js +11 -0
  73. package/build/runtime-esm/public/record.js +5 -0
  74. package/build/runtime-esm/router/jwt.js +15 -28
  75. package/build/runtime-esm/router/match.js +2 -4
  76. package/build/runtime-esm/router/server.js +6 -1
  77. package/build/runtime-esm/router/session.js +1 -1
  78. package/build/test-cjs/index.js +26344 -21258
  79. package/build/test-esm/index.js +24972 -19886
  80. package/build/vite/hmr.d.ts +5 -0
  81. package/build/vite/imports.d.ts +2 -2
  82. package/build/vite/schema.d.ts +0 -3
  83. package/build/vite-cjs/index.js +34848 -32101
  84. package/build/vite-esm/index.js +31526 -28780
  85. package/package.json +13 -14
@@ -1,4 +1,12 @@
1
1
  import type { Config, Document } from '../../../lib';
2
+ export interface ArtifactStats {
3
+ total: string[];
4
+ changed: string[];
5
+ new: string[];
6
+ deleted: string[];
7
+ hashSize: number[];
8
+ querySize: number[];
9
+ }
2
10
  export default function artifactGenerator(stats: {
3
11
  total: string[];
4
12
  new: string[];
@@ -1,8 +1,3 @@
1
- import { exportDefault, exportStarFrom, importDefaultFrom } from '../../../codegen/utils';
2
- import type { Config, Document } from '../../../lib';
1
+ import type { Config } from '../../../lib/config';
2
+ import type { Document } from '../../../lib/types';
3
3
  export default function runtimeGenerator(config: Config, docs: Document[]): Promise<void>;
4
- export declare function moduleStatments(config: Config): {
5
- importStatement: typeof importDefaultFrom;
6
- exportDefaultStatement: typeof exportDefault;
7
- exportStarStatement: typeof exportStarFrom;
8
- };
@@ -1,4 +1,11 @@
1
- import type { Config, Document } from '../../../lib';
1
+ import { exportDefault, exportStarFrom, importDefaultFrom } from '../../../codegen/utils';
2
+ import type { Config } from '../../../lib/config';
3
+ import type { Document } from '../../../lib/types';
4
+ export declare function moduleStatments(config: Config): {
5
+ importStatement: typeof importDefaultFrom;
6
+ exportDefaultStatement: typeof exportDefault;
7
+ exportStarStatement: typeof exportStarFrom;
8
+ };
2
9
  export declare function generatePluginRuntimes({ config, docs, }: {
3
10
  config: Config;
4
11
  docs: Document[];
@@ -1,6 +1,7 @@
1
1
  import type { Config, Document } from '../lib';
2
- export default function compile(config: Config): Promise<void>;
3
- export declare function runPipeline(config: Config, docs: Document[]): Promise<void>;
2
+ import type { ArtifactStats } from './generators/artifacts';
3
+ export default function compile(config: Config): Promise<ArtifactStats | undefined>;
4
+ export declare function runPipeline(config: Config, docs: Document[]): Promise<ArtifactStats | undefined>;
4
5
  export type DiscoveredDoc = {
5
6
  filepath: string;
6
7
  document: string;
@@ -6,7 +6,7 @@ export type FragmentArgument = {
6
6
  name: string;
7
7
  type: graphql.TypeNode;
8
8
  required: boolean;
9
- defaultValue: graphql.ValueNode | null;
9
+ defaultValue: graphql.ConstValueNode | null;
10
10
  };
11
11
  export declare function fragmentArguments(config: Config, filepath: string, definition: graphql.FragmentDefinitionNode | graphql.FragmentSpreadNode): FragmentArgument[];
12
12
  export declare function parseArgumentTypeString(input: string): graphql.TypeNode;
@@ -1,9 +1,9 @@
1
1
  import * as graphql from 'graphql';
2
2
  import type { Config, Document } from '../../lib';
3
3
  export default function addListFragments(config: Config, documents: Document[]): Promise<void>;
4
- export declare function connectionSelection(config: Config, field: graphql.GraphQLField<any, any>, type: graphql.GraphQLObjectType, selection: graphql.SelectionSetNode | undefined): {
4
+ export declare function connectionSelection(config: Config, field: graphql.GraphQLField<any, any>, type: graphql.GraphQLObjectType | graphql.GraphQLInterfaceType, selection: graphql.SelectionSetNode | undefined): {
5
5
  selection: graphql.SelectionSetNode | undefined;
6
- type: graphql.GraphQLObjectType;
6
+ type: graphql.GraphQLObjectType | graphql.GraphQLInterfaceType;
7
7
  connection: boolean;
8
8
  error: string | null;
9
9
  };
@@ -1,36 +1,4 @@
1
+ import * as graphql from 'graphql';
1
2
  import type { Config, Document } from '../../lib';
2
3
  export default function paginate(config: Config, documents: Document[]): Promise<void>;
3
- export declare const selectionConnectionInfo: {
4
- kind: "Field";
5
- name: {
6
- kind: "Name";
7
- value: string;
8
- };
9
- selectionSet: {
10
- kind: "SelectionSet";
11
- selections: ({
12
- kind: "Field";
13
- name: {
14
- kind: "Name";
15
- value: string;
16
- };
17
- selectionSet?: undefined;
18
- } | {
19
- kind: "Field";
20
- name: {
21
- kind: "Name";
22
- value: string;
23
- };
24
- selectionSet: {
25
- kind: "SelectionSet";
26
- selections: {
27
- kind: "Field";
28
- name: {
29
- kind: "Name";
30
- value: string;
31
- };
32
- }[];
33
- };
34
- })[];
35
- };
36
- }[];
4
+ export declare const selectionConnectionInfo: Array<graphql.SelectionNode>;
@@ -1,4 +1,4 @@
1
- import type * as graphql from 'graphql';
1
+ import * as graphql from 'graphql';
2
2
  import type { Config } from '../../lib';
3
3
  export declare function flattenSelections({ config, filepath, selections, fragmentDefinitions, applyFragments, }: {
4
4
  config: Config;