houdini 1.2.26 → 1.2.28
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/adapter/index.d.ts +1 -1
- package/build/cmd-cjs/index.js +4169 -1854
- package/build/cmd-esm/index.js +4169 -1854
- package/build/codegen/generators/artifacts/selection.d.ts +2 -1
- package/build/codegen/generators/typescript/inlineType.d.ts +5 -1
- package/build/codegen/generators/typescript/typeReference.d.ts +1 -1
- package/build/codegen/generators/typescript/types.d.ts +6 -3
- package/build/codegen/transforms/collectDefinitions.d.ts +1 -1
- package/build/codegen/transforms/componentFields.d.ts +8 -0
- package/build/codegen/transforms/fragmentVariables.d.ts +1 -1
- package/build/codegen/transforms/index.d.ts +1 -0
- package/build/codegen/validators/componentFields.d.ts +2 -0
- package/build/codegen/validators/index.d.ts +1 -0
- package/build/codegen-cjs/index.js +3674 -1393
- package/build/codegen-esm/index.js +3674 -1393
- package/build/lib/config.d.ts +21 -1
- package/build/lib/detectTools.d.ts +1 -1
- package/build/lib/graphql.d.ts +6 -0
- package/build/lib/imports.d.ts +1 -1
- package/build/lib/router/conventions.d.ts +1 -0
- package/build/lib/types.d.ts +4 -2
- package/build/lib/walk.d.ts +1 -0
- package/build/lib-cjs/index.js +1120 -747
- package/build/lib-esm/index.js +1119 -747
- package/build/runtime/cache/cache.d.ts +24 -3
- package/build/runtime/cache/storage.d.ts +1 -1
- package/build/runtime/client/index.d.ts +1 -0
- package/build/runtime/index.d.ts +1 -1
- package/build/runtime/lib/config.d.ts +9 -0
- package/build/runtime/lib/index.d.ts +1 -0
- package/build/runtime/lib/types.d.ts +18 -1
- package/build/runtime/router/server.d.ts +3 -1
- package/build/runtime/router/types.d.ts +1 -0
- package/build/runtime-cjs/cache/cache.d.ts +24 -3
- package/build/runtime-cjs/cache/cache.js +78 -8
- package/build/runtime-cjs/cache/storage.d.ts +1 -1
- package/build/runtime-cjs/cache/storage.js +16 -3
- package/build/runtime-cjs/client/index.d.ts +1 -0
- package/build/runtime-cjs/client/index.js +1 -0
- package/build/runtime-cjs/index.d.ts +1 -1
- package/build/runtime-cjs/lib/config.d.ts +9 -0
- package/build/runtime-cjs/lib/index.d.ts +1 -0
- package/build/runtime-cjs/lib/index.js +1 -0
- package/build/runtime-cjs/lib/types.d.ts +18 -1
- package/build/runtime-cjs/public/cache.js +3 -2
- package/build/runtime-cjs/router/server.d.ts +3 -1
- package/build/runtime-cjs/router/server.js +5 -2
- package/build/runtime-cjs/router/session.js +9 -6
- package/build/runtime-cjs/router/types.d.ts +1 -0
- package/build/runtime-esm/cache/cache.d.ts +24 -3
- package/build/runtime-esm/cache/cache.js +76 -8
- package/build/runtime-esm/cache/storage.d.ts +1 -1
- package/build/runtime-esm/cache/storage.js +16 -3
- package/build/runtime-esm/client/index.d.ts +1 -0
- package/build/runtime-esm/client/index.js +1 -0
- package/build/runtime-esm/index.d.ts +1 -1
- package/build/runtime-esm/lib/config.d.ts +9 -0
- package/build/runtime-esm/lib/index.d.ts +1 -0
- package/build/runtime-esm/lib/index.js +1 -0
- package/build/runtime-esm/lib/types.d.ts +18 -1
- package/build/runtime-esm/public/cache.js +3 -2
- package/build/runtime-esm/router/server.d.ts +3 -1
- package/build/runtime-esm/router/server.js +5 -2
- package/build/runtime-esm/router/session.js +9 -6
- package/build/runtime-esm/router/types.d.ts +1 -0
- package/build/test-cjs/index.js +3556 -1373
- package/build/test-esm/index.js +3556 -1373
- package/build/vite/schema.d.ts +4 -1
- package/build/vite-cjs/index.js +4543 -2823
- package/build/vite-esm/index.js +4540 -2822
- package/package.json +4 -3
package/build/lib/config.d.ts
CHANGED
|
@@ -36,6 +36,13 @@ export declare class Config {
|
|
|
36
36
|
schemaPollHeaders: ((env: any) => Record<string, string>) | Record<string, string | ((env: any) => string)>;
|
|
37
37
|
pluginMode: boolean;
|
|
38
38
|
plugins: PluginMeta[];
|
|
39
|
+
componentFields: Record<string, Record<string, {
|
|
40
|
+
fragment: string;
|
|
41
|
+
directive: graphql.DirectiveNode;
|
|
42
|
+
filepath: string;
|
|
43
|
+
prop: string;
|
|
44
|
+
parent: graphql.FragmentDefinitionNode | graphql.FragmentSpreadNode;
|
|
45
|
+
}>>;
|
|
39
46
|
constructor({ filepath, loadFrameworkConfig, ...configFile }: ConfigFile & {
|
|
40
47
|
filepath: string;
|
|
41
48
|
loadFrameworkConfig?: boolean;
|
|
@@ -47,6 +54,8 @@ export declare class Config {
|
|
|
47
54
|
processEnvValues(env: Record<string, string | undefined>, value: string | ((env: any) => string)): string | undefined;
|
|
48
55
|
pullHeaders(): Promise<any>;
|
|
49
56
|
sourceFiles(): Promise<string[]>;
|
|
57
|
+
get componentScalar(): string;
|
|
58
|
+
schemaString: string;
|
|
50
59
|
set newSchema(value: string);
|
|
51
60
|
get newSchema(): string;
|
|
52
61
|
get artifactDirectory(): string;
|
|
@@ -127,7 +136,18 @@ export declare class Config {
|
|
|
127
136
|
listRemoveFragment(name: string): string;
|
|
128
137
|
isInternalEnum(node: graphql.EnumTypeDefinitionNode): boolean;
|
|
129
138
|
isInternalDirective(name: string): boolean;
|
|
130
|
-
|
|
139
|
+
get componentFieldDirective(): string;
|
|
140
|
+
componentFieldFragmentName(args: {
|
|
141
|
+
type: string;
|
|
142
|
+
entry: graphql.DirectiveNode | string;
|
|
143
|
+
}): string;
|
|
144
|
+
localDocumentData(document: graphql.DocumentNode): {
|
|
145
|
+
paginated: boolean;
|
|
146
|
+
componentFields: {
|
|
147
|
+
type: string;
|
|
148
|
+
field: string;
|
|
149
|
+
}[];
|
|
150
|
+
};
|
|
131
151
|
registerFragmentVariablesHash({ hash, args, fragment, }: {
|
|
132
152
|
hash: string;
|
|
133
153
|
args: ValueMap | null;
|
|
@@ -12,5 +12,5 @@ export type DetectedTools = {
|
|
|
12
12
|
package_manager: 'npm' | 'yarn' | 'pnpm';
|
|
13
13
|
} & DetectedFromPackageTools;
|
|
14
14
|
export declare function detectFromPackageJSON(cwd: string): Promise<DetectedFromPackageTools>;
|
|
15
|
-
export declare function detectTools(cwd
|
|
15
|
+
export declare function detectTools(cwd?: string): Promise<DetectedTools>;
|
|
16
16
|
export {};
|
package/build/lib/graphql.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import * as graphql from 'graphql';
|
|
2
2
|
import type { Document, Config } from '.';
|
|
3
3
|
export declare function getRootType(type: graphql.GraphQLType): graphql.GraphQLType;
|
|
4
|
+
export declare function processComponentFieldDirective(directive: graphql.DirectiveNode): {
|
|
5
|
+
field: string;
|
|
6
|
+
prop: string;
|
|
7
|
+
export?: string;
|
|
8
|
+
raw?: string;
|
|
9
|
+
};
|
|
4
10
|
export declare function hashOriginal({ document }: {
|
|
5
11
|
document: Document;
|
|
6
12
|
}): string;
|
package/build/lib/imports.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare function ensureArtifactImport({ config, artifact, body, local, wi
|
|
|
13
13
|
export declare function ensureImports<_Count extends string[] | string>({ config, body, import: importID, sourceModule, importKind, }: {
|
|
14
14
|
config: Config;
|
|
15
15
|
body: Statement[];
|
|
16
|
-
import: _Count;
|
|
16
|
+
import: _Count | null;
|
|
17
17
|
sourceModule: string;
|
|
18
18
|
importKind?: 'value' | 'type';
|
|
19
19
|
}): _Count;
|
|
@@ -9,6 +9,7 @@ export declare function vite_render_path(config: Config, base?: string): string;
|
|
|
9
9
|
export declare function app_component_path(config: Config, base?: string): string;
|
|
10
10
|
export declare function page_unit_path(config: Config, id: string, base?: string): string;
|
|
11
11
|
export declare function layout_unit_path(config: Config, id: string, base?: string): string;
|
|
12
|
+
export declare function componentField_unit_path(config: Config, id: string, base?: string): string;
|
|
12
13
|
export declare function fallback_unit_path(config: Config, which: 'page' | 'layout', id: string, base?: string): string;
|
|
13
14
|
/** Load the page query for the given route from disk */
|
|
14
15
|
export declare function read_pageQuery(base: string): Promise<(string | null)[]>;
|
package/build/lib/types.d.ts
CHANGED
|
@@ -108,7 +108,9 @@ export type PluginHooks = {
|
|
|
108
108
|
importStatement: (where: string, as: string) => string;
|
|
109
109
|
exportDefaultStatement: (val: string) => string;
|
|
110
110
|
exportStarStatement: (val: string) => string;
|
|
111
|
-
}) => string> | ((docs: Document[]
|
|
111
|
+
}) => string> | ((docs: Document[], opts: {
|
|
112
|
+
config: Config;
|
|
113
|
+
}) => Record<string, (args: {
|
|
112
114
|
config: Config;
|
|
113
115
|
content: string;
|
|
114
116
|
importStatement: (where: string, as: string) => string;
|
|
@@ -251,7 +253,7 @@ export type PluginHooks = {
|
|
|
251
253
|
config?: (config: Config, env: ConfigEnv) => UserConfig | Promise<UserConfig>;
|
|
252
254
|
buildStart?: (this: PluginContext, options: NormalizedInputOptions & {
|
|
253
255
|
houdiniConfig: Config;
|
|
254
|
-
}) => void
|
|
256
|
+
}) => void | Promise<void>;
|
|
255
257
|
buildEnd?: (this: PluginContext, error?: Error, houdiniConfig?: Config) => void | Promise<void>;
|
|
256
258
|
closeBundle?: (this: PluginContext, config: Config) => void | Promise<void>;
|
|
257
259
|
configResolved?: ObjectHook<(this: void, config: ResolvedConfig) => void | Promise<void>>;
|