houdini-svelte 1.0.0-next.0 → 1.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.
- package/build/plugin/artifactData.d.ts +8 -0
- package/build/plugin/codegen/components/index.d.ts +2 -2
- package/build/plugin/codegen/fragmentTypedefs/index.d.ts +1 -1
- package/build/plugin/codegen/index.d.ts +1 -1
- package/build/plugin/codegen/routes/index.d.ts +2 -2
- package/build/plugin/codegen/stores/custom.d.ts +1 -1
- package/build/plugin/codegen/stores/fragment.d.ts +2 -2
- package/build/plugin/codegen/stores/index.d.ts +1 -1
- package/build/plugin/codegen/stores/mutation.d.ts +2 -2
- package/build/plugin/codegen/stores/query.d.ts +2 -2
- package/build/plugin/codegen/stores/subscription.d.ts +2 -2
- package/build/plugin/extract.d.ts +5 -2
- package/build/plugin/extractLoadFunction.d.ts +2 -2
- package/build/plugin/fsPatch.d.ts +1 -1
- package/build/plugin/index.d.ts +6 -13
- package/build/plugin/kit.d.ts +5 -5
- package/build/plugin/naming.d.ts +1 -1
- package/build/plugin/transforms/componentQuery.d.ts +5 -5
- package/build/plugin/transforms/index.d.ts +2 -2
- package/build/plugin/transforms/kit/index.d.ts +2 -2
- package/build/plugin/transforms/kit/init.d.ts +1 -1
- package/build/plugin/transforms/kit/load.d.ts +1 -1
- package/build/plugin/transforms/kit/session.d.ts +1 -1
- package/build/plugin/transforms/tags.d.ts +2 -2
- package/build/plugin/transforms/types.d.ts +3 -3
- package/build/plugin/validate.d.ts +2 -2
- package/build/plugin-cjs/index.js +3648 -6997
- package/build/plugin-esm/index.js +3582 -6932
- package/build/preprocess/index.d.ts +1 -1
- package/build/preprocess-cjs/index.js +3724 -7027
- package/build/preprocess-esm/index.js +3670 -6973
- package/build/runtime/client.d.ts +3 -0
- package/build/runtime/fragments.d.ts +5 -3
- package/build/runtime/session.d.ts +2 -2
- package/build/runtime/stores/base.d.ts +8 -0
- package/build/runtime/stores/fragment.d.ts +4 -5
- package/build/runtime/stores/mutation.d.ts +8 -23
- package/build/runtime/stores/pagination/cursor.d.ts +10 -12
- package/build/runtime/stores/pagination/fetch.d.ts +2 -2
- package/build/runtime/stores/pagination/fragment.d.ts +19 -101
- package/build/runtime/stores/pagination/index.d.ts +2 -2
- package/build/runtime/stores/pagination/offset.d.ts +7 -9
- package/build/runtime/stores/pagination/pageInfo.d.ts +1 -1
- package/build/runtime/stores/pagination/query.d.ts +14 -25
- package/build/runtime/stores/query.d.ts +17 -22
- package/build/runtime/stores/subscription.d.ts +7 -11
- package/build/runtime/types.d.ts +1 -1
- package/build/runtime-cjs/client.d.ts +3 -0
- package/build/runtime-cjs/{network.js → client.js} +20 -7
- package/build/runtime-cjs/fragments.d.ts +5 -3
- package/build/runtime-cjs/fragments.js +1 -21
- package/build/runtime-cjs/session.d.ts +2 -2
- package/build/runtime-cjs/stores/base.d.ts +8 -0
- package/build/runtime-cjs/stores/{store.js → base.js} +18 -9
- package/build/runtime-cjs/stores/fragment.d.ts +4 -5
- package/build/runtime-cjs/stores/fragment.js +1 -3
- package/build/runtime-cjs/stores/mutation.d.ts +8 -23
- package/build/runtime-cjs/stores/mutation.js +19 -104
- package/build/runtime-cjs/stores/pagination/cursor.d.ts +10 -12
- package/build/runtime-cjs/stores/pagination/cursor.js +80 -76
- package/build/runtime-cjs/stores/pagination/fetch.d.ts +2 -2
- package/build/runtime-cjs/stores/pagination/fragment.d.ts +19 -101
- package/build/runtime-cjs/stores/pagination/fragment.js +76 -66
- package/build/runtime-cjs/stores/pagination/index.d.ts +2 -2
- package/build/runtime-cjs/stores/pagination/index.js +4 -8
- package/build/runtime-cjs/stores/pagination/offset.d.ts +7 -9
- package/build/runtime-cjs/stores/pagination/offset.js +17 -46
- package/build/runtime-cjs/stores/pagination/pageInfo.d.ts +1 -1
- package/build/runtime-cjs/stores/pagination/query.d.ts +14 -25
- package/build/runtime-cjs/stores/pagination/query.js +69 -47
- package/build/runtime-cjs/stores/query.d.ts +17 -22
- package/build/runtime-cjs/stores/query.js +63 -195
- package/build/runtime-cjs/stores/subscription.d.ts +7 -11
- package/build/runtime-cjs/stores/subscription.js +7 -70
- package/build/runtime-cjs/types.d.ts +1 -1
- package/build/runtime-esm/client.d.ts +3 -0
- package/build/runtime-esm/client.js +18 -0
- package/build/runtime-esm/fragments.d.ts +5 -3
- package/build/runtime-esm/fragments.js +1 -15
- package/build/runtime-esm/session.d.ts +2 -2
- package/build/runtime-esm/stores/base.d.ts +8 -0
- package/build/runtime-esm/stores/base.js +21 -0
- package/build/runtime-esm/stores/fragment.d.ts +4 -5
- package/build/runtime-esm/stores/fragment.js +2 -6
- package/build/runtime-esm/stores/mutation.d.ts +8 -23
- package/build/runtime-esm/stores/mutation.js +18 -103
- package/build/runtime-esm/stores/pagination/cursor.d.ts +10 -12
- package/build/runtime-esm/stores/pagination/cursor.js +79 -75
- package/build/runtime-esm/stores/pagination/fetch.d.ts +2 -2
- package/build/runtime-esm/stores/pagination/fragment.d.ts +19 -101
- package/build/runtime-esm/stores/pagination/fragment.js +79 -70
- package/build/runtime-esm/stores/pagination/index.d.ts +2 -2
- package/build/runtime-esm/stores/pagination/index.js +4 -10
- package/build/runtime-esm/stores/pagination/offset.d.ts +7 -9
- package/build/runtime-esm/stores/pagination/offset.js +15 -44
- package/build/runtime-esm/stores/pagination/pageInfo.d.ts +1 -1
- package/build/runtime-esm/stores/pagination/query.d.ts +14 -25
- package/build/runtime-esm/stores/pagination/query.js +71 -50
- package/build/runtime-esm/stores/query.d.ts +17 -22
- package/build/runtime-esm/stores/query.js +65 -201
- package/build/runtime-esm/stores/subscription.d.ts +7 -11
- package/build/runtime-esm/stores/subscription.js +6 -69
- package/build/runtime-esm/types.d.ts +1 -1
- package/build/test/index.d.ts +4 -4
- package/build/test-cjs/index.js +7516 -13734
- package/build/test-esm/index.js +7428 -13646
- package/package.json +6 -9
- package/build/plugin/transforms/reactive.d.ts +0 -3
- package/build/runtime/network.d.ts +0 -2
- package/build/runtime/stores/store.d.ts +0 -4
- package/build/runtime-cjs/network.d.ts +0 -2
- package/build/runtime-cjs/stores/store.d.ts +0 -4
- package/build/runtime-esm/network.d.ts +0 -2
- package/build/runtime-esm/network.js +0 -6
- package/build/runtime-esm/stores/store.d.ts +0 -4
- package/build/runtime-esm/stores/store.js +0 -12
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { GenerateHookInput } from 'houdini';
|
|
2
|
-
import { Framework } from '../../kit';
|
|
1
|
+
import type { GenerateHookInput } from 'houdini';
|
|
2
|
+
import type { Framework } from '../../kit';
|
|
3
3
|
export default function componentTypesGenerator(framework: Framework, { config, documents }: GenerateHookInput): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PluginGenerateInput } from '..';
|
|
1
|
+
import type { PluginGenerateInput } from '..';
|
|
2
2
|
export default function fragmentTypedefs(input: PluginGenerateInput): Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GenerateHookInput, Config } from 'houdini';
|
|
1
|
+
import type { GenerateHookInput, Config } from 'houdini';
|
|
2
2
|
export default function (input: PluginGenerateInput): Promise<void>;
|
|
3
3
|
export type PluginGenerateInput = Omit<GenerateHookInput, 'config'> & {
|
|
4
4
|
config: Config;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { GenerateHookInput } from 'houdini';
|
|
2
|
-
import { Framework } from '../../kit';
|
|
1
|
+
import type { GenerateHookInput } from 'houdini';
|
|
2
|
+
import type { Framework } from '../../kit';
|
|
3
3
|
export default function svelteKitGenerator(framework: Framework, { config }: GenerateHookInput): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function fragmentStore({ config,
|
|
1
|
+
import type { Document, GenerateHookInput } from 'houdini';
|
|
2
|
+
export declare function fragmentStore({ config, pluginRoot }: GenerateHookInput, doc: Document): Promise<string>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { GenerateHookInput } from 'houdini';
|
|
1
|
+
import type { GenerateHookInput } from 'houdini';
|
|
2
2
|
export default function storesGenerator(input: GenerateHookInput): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function mutationStore({ config,
|
|
1
|
+
import type { Document, GenerateHookInput } from 'houdini';
|
|
2
|
+
export declare function mutationStore({ config, pluginRoot }: GenerateHookInput, doc: Document): Promise<string>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function queryStore({ config,
|
|
1
|
+
import type { Document, GenerateHookInput } from 'houdini';
|
|
2
|
+
export declare function queryStore({ config, pluginRoot }: GenerateHookInput, doc: Document): Promise<string>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function subscriptionStore({ config,
|
|
1
|
+
import type { Document, GenerateHookInput } from 'houdini';
|
|
2
|
+
export declare function subscriptionStore({ config, pluginRoot }: GenerateHookInput, doc: Document): Promise<string>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default function (config
|
|
1
|
+
import type { Config, Maybe, Script } from 'houdini';
|
|
2
|
+
export default function ({ config, content, }: {
|
|
3
|
+
config: Config;
|
|
4
|
+
content: string;
|
|
5
|
+
}): Promise<string[]>;
|
|
3
6
|
export declare function parseSvelte(str: string): Promise<ParsedFile>;
|
|
4
7
|
export type ParsedFile = Maybe<{
|
|
5
8
|
script: Script;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Config } from 'houdini';
|
|
2
|
-
import { HoudiniRouteScript } from './kit';
|
|
1
|
+
import type { Config } from 'houdini';
|
|
2
|
+
import type { HoudiniRouteScript } from './kit';
|
|
3
3
|
export declare function extract_load_function(config: Config, filepath: string, mockArtifacts?: Record<string, {
|
|
4
4
|
raw: string;
|
|
5
5
|
}>): Promise<HoudiniRouteScript>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Framework } from './kit';
|
|
1
|
+
import type { Framework } from './kit';
|
|
2
2
|
declare const _default: (getFramwork: () => Framework) => {
|
|
3
3
|
resolveId?: import("rollup").ObjectHook<(this: import("rollup").PluginContext, source: string, importer: string | undefined, options: {
|
|
4
4
|
config: import("houdini").Config;
|
package/build/plugin/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PluginHooks, Config } from 'houdini';
|
|
2
2
|
export declare let _config: Config;
|
|
3
|
-
declare const
|
|
4
|
-
|
|
3
|
+
export declare const pluginHooks: () => Promise<PluginHooks>;
|
|
4
|
+
declare const _default: import("houdini").PluginInit;
|
|
5
|
+
export default _default;
|
|
5
6
|
declare module 'houdini' {
|
|
6
7
|
interface HoudiniPluginConfig {
|
|
7
8
|
'houdini-svelte': HoudiniSvelteConfig;
|
|
@@ -23,12 +24,6 @@ export type HoudiniSvelteConfig = {
|
|
|
23
24
|
* @default +layout.gql
|
|
24
25
|
*/
|
|
25
26
|
layoutQueryFilename?: string;
|
|
26
|
-
/**
|
|
27
|
-
* With this enabled, errors in your query will not be thrown as exceptions. You will have to handle
|
|
28
|
-
* error state in your route components or by hand in your load (or the onError hook)
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
quietQueryErrors?: boolean;
|
|
32
27
|
/**
|
|
33
28
|
* A flag to treat every component as a non-route. This is useful for projects built with the static-adapter
|
|
34
29
|
* @default false
|
|
@@ -43,11 +38,9 @@ export type HoudiniSvelteConfig = {
|
|
|
43
38
|
mutation?: string;
|
|
44
39
|
subscription?: string;
|
|
45
40
|
fragment?: string;
|
|
46
|
-
|
|
47
|
-
queryBackwardsCursor?: string;
|
|
41
|
+
queryCursor?: string;
|
|
48
42
|
queryOffset?: string;
|
|
49
|
-
|
|
50
|
-
fragmentBackwardsCursor?: string;
|
|
43
|
+
fragmentCursor?: string;
|
|
51
44
|
fragmentOffset?: string;
|
|
52
45
|
};
|
|
53
46
|
};
|
package/build/plugin/kit.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as graphql from 'graphql';
|
|
2
|
-
import { Config } from 'houdini';
|
|
3
|
-
import recast from 'recast';
|
|
4
|
-
import { HoudiniSvelteConfig } from '.';
|
|
5
|
-
import { SvelteTransformPage } from './transforms/types';
|
|
2
|
+
import type { Config } from 'houdini';
|
|
3
|
+
import type recast from 'recast';
|
|
4
|
+
import type { HoudiniSvelteConfig } from '.';
|
|
5
|
+
import type { 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;
|
|
8
8
|
export declare function route_data_path(config: Config, filename: string): string;
|
|
@@ -45,7 +45,7 @@ export type HoudiniRouteScript = {
|
|
|
45
45
|
};
|
|
46
46
|
export declare function route_page_path(config: Config, filename: string): string;
|
|
47
47
|
export declare function stores_directory_name(): string;
|
|
48
|
-
export declare function stores_directory(
|
|
48
|
+
export declare function stores_directory(pluginRoot: string): string;
|
|
49
49
|
export declare function type_route_dir(config: Config): string;
|
|
50
50
|
export declare function store_import_path({ config, name }: {
|
|
51
51
|
config: Config;
|
package/build/plugin/naming.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const query_variable_fn: (name: string) => string;
|
|
2
2
|
export declare const houdini_load_fn = "_houdini_load";
|
|
3
3
|
export declare const houdini_before_load_fn = "_houdini_beforeLoad";
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const houdini_afterLoad_fn = "_houdini_afterLoad";
|
|
5
5
|
export declare const houdini_on_error_fn = "_houdini_onError";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ExpressionKind } from 'ast-types/lib/gen/kinds';
|
|
2
|
-
import * as graphql from 'graphql';
|
|
3
|
-
import { Config, Script } from 'houdini';
|
|
4
|
-
import { TransformPage } from 'houdini/vite';
|
|
5
|
-
import { SvelteTransformPage } from './types';
|
|
1
|
+
import type { ExpressionKind } from 'ast-types/lib/gen/kinds';
|
|
2
|
+
import type * as graphql from 'graphql';
|
|
3
|
+
import type { Config, Script } from 'houdini';
|
|
4
|
+
import type { TransformPage } from 'houdini/vite';
|
|
5
|
+
import type { SvelteTransformPage } from './types';
|
|
6
6
|
export default function QueryProcessor(config: Config, page: SvelteTransformPage): Promise<void>;
|
|
7
7
|
export declare function find_inline_queries(page: TransformPage, parsed: Script | null, store_id: (name: string) => ExpressionKind): Promise<LoadTarget[]>;
|
|
8
8
|
export type LoadTarget = graphql.OperationDefinitionNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TransformPage } from 'houdini/vite';
|
|
2
|
-
import { Framework } from '../kit';
|
|
1
|
+
import type { TransformPage } from 'houdini/vite';
|
|
2
|
+
import type { Framework } from '../kit';
|
|
3
3
|
export default function apply_transforms(framework: Framework, page: TransformPage): Promise<{
|
|
4
4
|
code: string;
|
|
5
5
|
}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Config } from 'houdini';
|
|
2
|
-
import { SvelteTransformPage } from '../types';
|
|
1
|
+
import type { Config } from 'houdini';
|
|
2
|
+
import type { SvelteTransformPage } from '../types';
|
|
3
3
|
export default function SvelteKitProcessor(config: Config, page: SvelteTransformPage): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SvelteTransformPage } from '../types';
|
|
1
|
+
import type { SvelteTransformPage } from '../types';
|
|
2
2
|
export default function kit_init(page: SvelteTransformPage): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SvelteTransformPage } from '../types';
|
|
1
|
+
import type { SvelteTransformPage } from '../types';
|
|
2
2
|
export default function kit_load_generator(page: SvelteTransformPage): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SvelteTransformPage } from '../types';
|
|
1
|
+
import type { SvelteTransformPage } from '../types';
|
|
2
2
|
export default function (page: SvelteTransformPage): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Config } from 'houdini';
|
|
2
|
-
import { SvelteTransformPage } from './types';
|
|
1
|
+
import type { Config } from 'houdini';
|
|
2
|
+
import type { SvelteTransformPage } from './types';
|
|
3
3
|
export default function GraphQLTagProcessor(config: Config, page: SvelteTransformPage): Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Script } from 'houdini';
|
|
2
|
-
import { TransformPage } from 'houdini/vite';
|
|
3
|
-
import { Framework } from '../kit';
|
|
1
|
+
import type { Script } from 'houdini';
|
|
2
|
+
import type { TransformPage } from 'houdini/vite';
|
|
3
|
+
import type { Framework } from '../kit';
|
|
4
4
|
export type SvelteTransformPage = TransformPage & {
|
|
5
5
|
framework: Framework;
|
|
6
6
|
script: Script;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Config,
|
|
1
|
+
import type { Config, Document } from 'houdini';
|
|
2
2
|
export default function validateDocuments({ config, documents, }: {
|
|
3
3
|
config: Config;
|
|
4
|
-
documents:
|
|
4
|
+
documents: Document[];
|
|
5
5
|
}): Promise<void>;
|