houdini-svelte 0.18.2 → 0.19.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.
@@ -0,0 +1,2 @@
1
+ import { PluginGenerateInput } from '..';
2
+ export default function fragmentTypedefs(input: PluginGenerateInput): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import { Config } from 'houdini';
2
- import type { HoudiniVitePluginConfig } from '../../';
3
- export declare function store_import(cfg: Config, which: keyof Required<HoudiniVitePluginConfig>['customStores']): {
2
+ import type { HoudiniSvelteConfig } from '../../';
3
+ export declare function store_import(cfg: Config, which: keyof Required<HoudiniSvelteConfig>['customStores']): {
4
4
  statement: string;
5
5
  store_class: string;
6
6
  };
@@ -1,5 +1,5 @@
1
- import { type Maybe, type Script } from 'houdini';
2
- export default function (filepath: string, contents: string): Promise<string[]>;
1
+ import { type Maybe, type Script, Config } from 'houdini';
2
+ export default function (config: Config, filepath: string, contents: string): Promise<string[]>;
3
3
  export declare function parseSvelte(str: string): Promise<ParsedFile>;
4
4
  export type ParsedFile = Maybe<{
5
5
  script: Script;
@@ -3,12 +3,13 @@ declare const HoudiniSveltePlugin: PluginFactory;
3
3
  export default HoudiniSveltePlugin;
4
4
  declare module 'houdini' {
5
5
  interface HoudiniPluginConfig {
6
- 'houdini-svelte': HoudiniVitePluginConfig;
6
+ 'houdini-svelte': HoudiniSvelteConfig;
7
7
  }
8
8
  }
9
- export type HoudiniVitePluginConfig = {
9
+ export type HoudiniSvelteConfig = {
10
10
  /**
11
11
  * A relative path from your houdini.config.js to the file that exports your client as its default value
12
+ * @default `./src/client.ts`
12
13
  */
13
14
  client?: string;
14
15
  /**
@@ -21,20 +22,15 @@ export type HoudiniVitePluginConfig = {
21
22
  * @default +layout.gql
22
23
  */
23
24
  layoutQueryFilename?: string;
24
- /**
25
- * The default prefix of your global stores.
26
- *
27
- * _Note: it's nice to have a prefix so that your editor finds all your stores by just typings this prefix_
28
- * @default GQL_
29
- */
30
- globalStorePrefix?: string;
31
25
  /**
32
26
  * With this enabled, errors in your query will not be thrown as exceptions. You will have to handle
33
27
  * error state in your route components or by hand in your load (or the onError hook)
28
+ * @default false
34
29
  */
35
30
  quietQueryErrors?: boolean;
36
31
  /**
37
32
  * A flag to treat every component as a non-route. This is useful for projects built with the static-adapter
33
+ * @default false
38
34
  */
39
35
  static?: boolean;
40
36
  /**
@@ -1,7 +1,7 @@
1
1
  import * as graphql from 'graphql';
2
2
  import { Config } from 'houdini';
3
3
  import recast from 'recast';
4
- import { HoudiniVitePluginConfig } from '.';
4
+ import { HoudiniSvelteConfig } from '.';
5
5
  import { SvelteTransformPage } from './transforms/types';
6
6
  type Identifier = recast.types.namedTypes.Identifier;
7
7
  export declare function is_route(config: Config, framework: Framework, filepath: string): boolean;
@@ -56,11 +56,7 @@ export declare function store_name({ config, name }: {
56
56
  config: Config;
57
57
  name: string;
58
58
  }): string;
59
- export declare function global_store_name({ config, name }: {
60
- config: Config;
61
- name: string;
62
- }): string;
63
- export declare function plugin_config(config: Config): Required<HoudiniVitePluginConfig>;
59
+ export declare function plugin_config(config: Config): Required<HoudiniSvelteConfig>;
64
60
  export declare function store_import({ page, artifact, local, }: {
65
61
  page: SvelteTransformPage;
66
62
  artifact: {
@@ -1,14 +1,10 @@
1
1
  import { ExpressionKind } from 'ast-types/lib/gen/kinds';
2
2
  import { Config, Script } from 'houdini';
3
3
  import { TransformPage } from 'houdini/vite';
4
- import * as recast from 'recast';
5
4
  import { SvelteTransformPage } from './types';
6
- type Statement = recast.types.namedTypes.Statement;
7
5
  export default function QueryProcessor(config: Config, page: SvelteTransformPage): Promise<void>;
8
6
  export declare function find_inline_queries(page: TransformPage, parsed: Script | null, store_id: (name: string) => ExpressionKind): Promise<LoadTarget[]>;
9
7
  export type LoadTarget = {
10
- store_id: Statement;
11
8
  name: string;
12
9
  variables: boolean;
13
10
  };
14
- export {};