houdini 1.2.9 → 1.2.11

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 (37) hide show
  1. package/build/cmd-cjs/index.js +14968 -150
  2. package/build/cmd-esm/index.js +14970 -152
  3. package/build/codegen-cjs/index.js +14887 -72
  4. package/build/codegen-esm/index.js +14889 -74
  5. package/build/lib/config.d.ts +1 -0
  6. package/build/lib/index.d.ts +1 -0
  7. package/build/lib/types.d.ts +14 -3
  8. package/build/lib-cjs/index.js +15484 -87
  9. package/build/lib-esm/index.js +15481 -89
  10. package/build/router/conventions.d.ts +25 -0
  11. package/build/router/index.d.ts +8 -0
  12. package/build/router/manifest.d.ts +45 -0
  13. package/build/router/types.d.ts +9 -0
  14. package/build/router-cjs/index.js +72353 -0
  15. package/build/router-cjs/package.json +1 -0
  16. package/build/router-esm/index.js +72345 -0
  17. package/build/router-esm/package.json +1 -0
  18. package/build/runtime/router/cookies.d.ts +41 -0
  19. package/build/runtime/router/jwt.d.ts +117 -0
  20. package/build/runtime/router/server.d.ts +25 -0
  21. package/build/runtime-cjs/router/cookies.d.ts +41 -0
  22. package/build/runtime-cjs/router/cookies.js +168 -0
  23. package/build/runtime-cjs/router/jwt.d.ts +117 -0
  24. package/build/runtime-cjs/router/jwt.js +181 -0
  25. package/build/runtime-cjs/router/server.d.ts +25 -0
  26. package/build/runtime-cjs/router/server.js +78 -0
  27. package/build/runtime-esm/router/cookies.d.ts +41 -0
  28. package/build/runtime-esm/router/cookies.js +143 -0
  29. package/build/runtime-esm/router/jwt.d.ts +117 -0
  30. package/build/runtime-esm/router/jwt.js +155 -0
  31. package/build/runtime-esm/router/server.d.ts +25 -0
  32. package/build/runtime-esm/router/server.js +53 -0
  33. package/build/test-cjs/index.js +14891 -73
  34. package/build/test-esm/index.js +14893 -75
  35. package/build/vite-cjs/index.js +15105 -101
  36. package/build/vite-esm/index.js +15107 -103
  37. package/package.json +10 -1
@@ -56,6 +56,7 @@ export declare class Config {
56
56
  get enumRuntimeDefinitionsPath(): string;
57
57
  get enumTypesDefinitionsPath(): string;
58
58
  get definitionsSchemaPath(): string;
59
+ get routerBuildDirectory(): string;
59
60
  get definitionsDocumentsPath(): string;
60
61
  get typeIndexPath(): string;
61
62
  get typeRootDir(): string;
@@ -16,4 +16,5 @@ export * from './walk';
16
16
  export type { EmbeddedGraphqlDocument } from './walk';
17
17
  export * as fs from './fs';
18
18
  export * as path from './path';
19
+ export * from '../router';
19
20
  export { Cache } from '../runtime/cache/cache';
@@ -1,7 +1,8 @@
1
1
  import type graphql from 'graphql';
2
2
  import type * as recast from 'recast';
3
- import type { CustomPluginOptions, LoadResult, ObjectHook, PluginContext, ResolveIdResult, SourceMapInput } from 'rollup';
4
- import type { UserConfig, ViteDevServer } from 'vite';
3
+ import type { CustomPluginOptions, InputOptions, LoadResult, MinimalPluginContext, NormalizedInputOptions, NullValue, ObjectHook, PluginContext, ResolveIdResult, SourceMapInput } from 'rollup';
4
+ import type { ConfigEnv, ResolvedConfig, UserConfig, ViteDevServer } from 'vite';
5
+ import type { Adapter } from '../router';
5
6
  import type { ConfigFile } from '../runtime/lib/config';
6
7
  import type { ArtifactKinds, BaseCompiledDocument, DocumentArtifact, ValueOf } from '../runtime/lib/types';
7
8
  import type { TransformPage } from '../vite/houdini';
@@ -247,7 +248,16 @@ export type PluginHooks = {
247
248
  map?: SourceMapInput | string;
248
249
  };
249
250
  vite?: {
250
- config?: (config: Config) => UserConfig;
251
+ config?: (config: Config, env: ConfigEnv) => UserConfig | Promise<UserConfig>;
252
+ buildStart?: (this: PluginContext, options: NormalizedInputOptions & {
253
+ houdiniConfig: Config;
254
+ }) => void;
255
+ buildEnd?: (this: PluginContext, error?: Error, houdiniConfig?: Config) => void | Promise<void>;
256
+ closeBundle?: (this: PluginContext) => void | Promise<void>;
257
+ configResolved?: ObjectHook<(this: void, config: ResolvedConfig) => void | Promise<void>>;
258
+ options?: (this: MinimalPluginContext, options: InputOptions & {
259
+ houdiniConfig: Config;
260
+ }) => InputOptions | NullValue;
251
261
  resolveId?: ObjectHook<(this: PluginContext, source: string, importer: string | undefined, options: {
252
262
  config: Config;
253
263
  custom?: CustomPluginOptions;
@@ -285,6 +295,7 @@ export type GenerateHookInput = {
285
295
  };
286
296
  export type PluginConfig = {
287
297
  configPath?: string;
298
+ adapter?: Adapter;
288
299
  } & Partial<ConfigFile>;
289
300
  export * from '../runtime/lib/types';
290
301
  export * from '../runtime/lib/config';