houdini 2.0.0-next.0 → 2.0.0-next.10

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 (60) hide show
  1. package/build/adapter/index.d.ts +1 -1
  2. package/build/cmd-cjs/index.js +9970 -10376
  3. package/build/cmd-esm/index.js +9967 -10373
  4. package/build/codegen/generators/runtime/pluginRuntime.d.ts +3 -0
  5. package/build/codegen/generators/typescript/addReferencedInputTypes.d.ts +1 -1
  6. package/build/codegen/generators/typescript/inlineType.d.ts +2 -1
  7. package/build/codegen-cjs/index.js +9871 -10382
  8. package/build/codegen-esm/index.js +9926 -10437
  9. package/build/lib/config.d.ts +3 -0
  10. package/build/lib/fs.d.ts +2 -2
  11. package/build/lib/introspection.d.ts +1 -1
  12. package/build/lib/types.d.ts +3 -3
  13. package/build/lib/typescript.d.ts +3 -3
  14. package/build/lib-cjs/index.js +9440 -10174
  15. package/build/lib-esm/index.js +9440 -10174
  16. package/build/runtime/lib/config.d.ts +7 -0
  17. package/build/runtime/lib/types.d.ts +2 -2
  18. package/build/runtime/public/cache.d.ts +0 -1
  19. package/build/runtime/router/cookies.d.ts +9 -9
  20. package/build/runtime/router/server.d.ts +6 -6
  21. package/build/runtime/router/session.d.ts +1 -0
  22. package/build/runtime/server/index.d.ts +17 -0
  23. package/build/runtime-cjs/cache/cache.js +36 -29
  24. package/build/runtime-cjs/client/documentStore.js +2 -2
  25. package/build/runtime-cjs/client/index.js +1 -1
  26. package/build/runtime-cjs/client/plugins/test.js +2 -2
  27. package/build/runtime-cjs/lib/config.d.ts +7 -0
  28. package/build/runtime-cjs/lib/types.d.ts +2 -2
  29. package/build/runtime-cjs/public/cache.d.ts +0 -1
  30. package/build/runtime-cjs/public/cache.js +0 -14
  31. package/build/runtime-cjs/router/cookies.d.ts +9 -9
  32. package/build/runtime-cjs/router/cookies.js +1 -1
  33. package/build/runtime-cjs/router/server.d.ts +6 -6
  34. package/build/runtime-cjs/router/server.js +32 -17
  35. package/build/runtime-cjs/router/session.d.ts +1 -0
  36. package/build/runtime-cjs/router/session.js +7 -2
  37. package/build/runtime-cjs/server/index.d.ts +17 -0
  38. package/build/runtime-cjs/server/index.js +62 -0
  39. package/build/runtime-esm/cache/cache.js +36 -29
  40. package/build/runtime-esm/client/documentStore.js +2 -2
  41. package/build/runtime-esm/client/index.js +1 -1
  42. package/build/runtime-esm/client/plugins/test.js +2 -2
  43. package/build/runtime-esm/lib/config.d.ts +7 -0
  44. package/build/runtime-esm/lib/types.d.ts +2 -2
  45. package/build/runtime-esm/public/cache.d.ts +0 -1
  46. package/build/runtime-esm/public/cache.js +0 -14
  47. package/build/runtime-esm/router/cookies.d.ts +9 -9
  48. package/build/runtime-esm/router/cookies.js +1 -1
  49. package/build/runtime-esm/router/server.d.ts +6 -6
  50. package/build/runtime-esm/router/server.js +36 -21
  51. package/build/runtime-esm/router/session.d.ts +1 -0
  52. package/build/runtime-esm/router/session.js +5 -1
  53. package/build/runtime-esm/server/index.d.ts +17 -0
  54. package/build/runtime-esm/server/index.js +38 -0
  55. package/build/test-cjs/index.js +9913 -10450
  56. package/build/test-esm/index.js +9910 -10447
  57. package/build/vite/hmr.d.ts +0 -2
  58. package/build/vite-cjs/index.js +9896 -10376
  59. package/build/vite-esm/index.js +9893 -10373
  60. package/package.json +4 -4
@@ -36,6 +36,7 @@ export declare class Config {
36
36
  routesDir: string;
37
37
  schemaPollInterval: number | null;
38
38
  schemaPollTimeout: number;
39
+ schemaPollWriteToDisk: boolean;
39
40
  schemaPollHeaders: ((env: any) => Record<string, string>) | Record<string, string | ((env: any) => string)>;
40
41
  pluginMode: boolean;
41
42
  plugins: PluginMeta[];
@@ -58,6 +59,7 @@ export declare class Config {
58
59
  processEnvValues(env: Record<string, string | undefined>, value: string | ((env: any) => string)): string | undefined;
59
60
  pullHeaders(): Promise<any>;
60
61
  pluginRuntimeSource(plugin: PluginMeta): string | null;
62
+ pluginStaticRuntimeSource(plugin: PluginMeta): string | null;
61
63
  sourceFiles(): Promise<string[]>;
62
64
  get componentScalar(): string;
63
65
  schemaString: string;
@@ -99,6 +101,7 @@ export declare class Config {
99
101
  ignore_plugins?: boolean;
100
102
  }): boolean;
101
103
  pluginRuntimeDirectory(name: string): string;
104
+ pluginStaticRuntimeDirectory(name: string): string;
102
105
  get pluginRootDirectory(): string;
103
106
  pluginDirectory(name: string): string;
104
107
  get loadDirective(): string;
package/build/lib/fs.d.ts CHANGED
@@ -8,8 +8,8 @@ export declare function readFile(filepath: string, encoding?: BufferEncoding): P
8
8
  export declare function readFileSync(filepath: string): string | null;
9
9
  export declare function writeFile(filepath: string, data: string): Promise<void>;
10
10
  export declare function access(filepath: string): Promise<void | import("memfs/lib/Stats").Stats<number>>;
11
- export declare function mkdirp(filepath: string): Promise<void>;
12
- export declare function mkdirpSync(filepath: string): Promise<void>;
11
+ export declare function mkdirp(filepath: string): Promise<string | void>;
12
+ export declare function mkdirpSync(filepath: string): Promise<string | void>;
13
13
  export declare function mkdir(filepath: string): Promise<void>;
14
14
  export declare function rmdir(filepath: string): Promise<unknown>;
15
15
  export declare function stat(filepath: string): Promise<import("memfs/lib/Stats").Stats<number> | fsExtra.Stats>;
@@ -1,3 +1,3 @@
1
- export declare function pullSchema(url: string, fetchTimeout: number, schemaPath: string, headers?: Record<string, string>, skipWriting?: boolean): Promise<string | null>;
1
+ export declare function pullSchema(url: string, fetchTimeout: number, schemaPath: string, headers?: Record<string, string>, writeToDisk?: boolean): Promise<string | null>;
2
2
  export declare function extractHeadersStr(str: string | undefined): Record<string, string>;
3
3
  export declare function extractHeaders(headers?: string[] | undefined): {};
@@ -1,7 +1,7 @@
1
1
  import type * as graphql from 'graphql';
2
2
  import type * as recast from 'recast';
3
3
  import type { CustomPluginOptions, InputOptions, LoadResult, MinimalPluginContext, NormalizedInputOptions, NullValue, ObjectHook, PluginContext, ResolveIdResult, SourceMapInput } from 'rollup';
4
- import type { ConfigEnv, ResolvedConfig, UserConfig, ViteDevServer } from 'vite';
4
+ import type { ConfigEnv, MinimalPluginContextWithoutEnvironment, ResolvedConfig, UserConfig, ViteDevServer } from 'vite';
5
5
  import type { ConfigFile } from '../runtime/lib/config';
6
6
  import type { ArtifactKinds, BaseCompiledDocument, DocumentArtifact, ValueOf } from '../runtime/lib/types';
7
7
  import type { TransformPage } from '../vite/houdini';
@@ -265,7 +265,7 @@ export type PluginHooks = {
265
265
  }) => void | Promise<void>;
266
266
  buildEnd?: (this: PluginContext, error?: Error, houdiniConfig?: Config) => void | Promise<void>;
267
267
  closeBundle?: (this: PluginContext, config: Config) => void | Promise<void>;
268
- configResolved?: ObjectHook<(this: void, config: ResolvedConfig) => void | Promise<void>>;
268
+ configResolved?: ObjectHook<(this: MinimalPluginContextWithoutEnvironment, config: ResolvedConfig) => void | Promise<void>>;
269
269
  options?: (this: MinimalPluginContext, options: InputOptions & {
270
270
  houdiniConfig: Config;
271
271
  }) => InputOptions | NullValue;
@@ -279,7 +279,7 @@ export type PluginHooks = {
279
279
  config: Config;
280
280
  ssr?: boolean;
281
281
  }) => Promise<LoadResult> | LoadResult>;
282
- configureServer?: ObjectHook<(this: void, server: ViteDevServer & {
282
+ configureServer?: ObjectHook<(this: MinimalPluginContextWithoutEnvironment, server: ViteDevServer & {
283
283
  houdiniConfig: Config;
284
284
  }) => (() => void) | void | Promise<(() => void) | void>, {}> | undefined;
285
285
  };
@@ -6,15 +6,15 @@ import { TypeWrapper } from './graphql';
6
6
  export declare function unwrappedTsTypeReference(config: Config, filepath: string, missingScalars: Set<string>, { type, wrappers, }: {
7
7
  type: graphql.GraphQLNamedType;
8
8
  wrappers: TypeWrapper[];
9
- }, body: StatementKind[]): TSTypeKind;
9
+ }, body: StatementKind[], input: boolean): TSTypeKind;
10
10
  export declare function tsTypeReference(config: Config, filepath: string, missingScalars: Set<string>, definition: {
11
11
  type: graphql.GraphQLScalarType | graphql.GraphQLInputType | graphql.GraphQLNamedType | graphql.TypeNode;
12
- }, body: StatementKind[]): TSTypeKind;
12
+ }, body: StatementKind[], input: boolean): TSTypeKind;
13
13
  export declare function enumReference(config: Config, body: StatementKind[], name: string): recast.types.namedTypes.TSTypeReference;
14
14
  export declare function readonlyProperty(prop: recast.types.namedTypes.TSPropertySignature, enable?: boolean): recast.types.namedTypes.TSPropertySignature;
15
15
  export declare function nullableField(inner: TSTypeKind, input?: boolean): recast.types.namedTypes.TSUnionType;
16
16
  export declare function scalarPropertyValue(config: Config, filepath: string, missingScalars: Set<string>, target: graphql.GraphQLNamedType, body: StatementKind[], field: {
17
17
  parent: string;
18
18
  field: string;
19
- } | null): TSTypeKind;
19
+ } | null, input: boolean): TSTypeKind;
20
20
  export declare function writeTsConfig(config: Config): Promise<void>;