houdini 1.5.3 → 2.0.0-next.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.
- package/build/cmd-cjs/index.js +29435 -22707
- package/build/cmd-esm/index.js +27980 -21253
- package/build/codegen/generators/artifacts/index.d.ts +8 -0
- package/build/codegen/generators/runtime/index.d.ts +2 -7
- package/build/codegen/generators/runtime/pluginRuntime.d.ts +8 -1
- package/build/codegen/index.d.ts +3 -2
- package/build/codegen/transforms/fragmentVariables.d.ts +1 -1
- package/build/codegen/transforms/list.d.ts +2 -2
- package/build/codegen/transforms/paginate.d.ts +2 -34
- package/build/codegen/utils/flattenSelections.d.ts +1 -1
- package/build/codegen-cjs/index.js +24805 -19718
- package/build/codegen-esm/index.js +24979 -19892
- package/build/lib/fs.d.ts +3 -2
- package/build/lib/index.d.ts +1 -0
- package/build/lib/router/conventions.d.ts +1 -1
- package/build/lib/router/manifest.d.ts +1 -1
- package/build/lib/typescript.d.ts +1 -1
- package/build/lib/watchAndRun.d.ts +61 -0
- package/build/lib-cjs/index.js +27118 -21197
- package/build/lib-esm/index.js +25693 -19775
- package/build/runtime-cjs/cache/cache.js +22 -1
- package/build/runtime-cjs/cache/gc.js +1 -0
- package/build/runtime-cjs/cache/index.js +0 -2
- package/build/runtime-cjs/cache/lists.js +9 -0
- package/build/runtime-cjs/cache/staleManager.js +26 -1
- package/build/runtime-cjs/cache/storage.js +4 -0
- package/build/runtime-cjs/cache/subscription.js +1 -0
- package/build/runtime-cjs/client/documentStore.js +28 -2
- package/build/runtime-cjs/client/index.js +17 -1
- package/build/runtime-cjs/client/plugins/cache.js +8 -2
- package/build/runtime-cjs/client/plugins/fetch.js +14 -6
- package/build/runtime-cjs/client/plugins/fetchParams.js +2 -0
- package/build/runtime-cjs/client/plugins/fragment.js +1 -0
- package/build/runtime-cjs/client/plugins/index.js +9 -1
- package/build/runtime-cjs/client/plugins/injectedPlugins.js +0 -2
- package/build/runtime-cjs/client/plugins/mutation.js +6 -0
- package/build/runtime-cjs/client/plugins/optimisticKeys.js +10 -3
- package/build/runtime-cjs/client/plugins/query.js +4 -0
- package/build/runtime-cjs/client/utils/index.js +4 -0
- package/build/runtime-cjs/imports/config.js +0 -2
- package/build/runtime-cjs/imports/pluginConfig.js +0 -2
- package/build/runtime-cjs/index.js +12 -6
- package/build/runtime-cjs/lib/config.js +4 -0
- package/build/runtime-cjs/lib/deepEquals.js +2 -4
- package/build/runtime-cjs/lib/index.js +13 -0
- package/build/runtime-cjs/lib/pagination.js +2 -1
- package/build/runtime-cjs/lib/types.js +11 -1
- package/build/runtime-cjs/public/cache.js +11 -0
- package/build/runtime-cjs/public/record.js +5 -0
- package/build/runtime-cjs/router/jwt.js +15 -28
- package/build/runtime-cjs/router/match.js +2 -4
- package/build/runtime-cjs/router/server.js +6 -1
- package/build/runtime-cjs/router/session.js +1 -1
- package/build/runtime-esm/cache/cache.js +22 -1
- package/build/runtime-esm/cache/gc.js +1 -0
- package/build/runtime-esm/cache/lists.js +9 -0
- package/build/runtime-esm/cache/staleManager.js +26 -1
- package/build/runtime-esm/cache/storage.js +4 -0
- package/build/runtime-esm/cache/subscription.js +1 -0
- package/build/runtime-esm/client/documentStore.js +28 -2
- package/build/runtime-esm/client/index.js +13 -1
- package/build/runtime-esm/client/plugins/cache.js +4 -2
- package/build/runtime-esm/client/plugins/fetch.js +14 -6
- package/build/runtime-esm/client/plugins/fetchParams.js +2 -0
- package/build/runtime-esm/client/plugins/fragment.js +1 -0
- package/build/runtime-esm/client/plugins/mutation.js +6 -0
- package/build/runtime-esm/client/plugins/optimisticKeys.js +6 -3
- package/build/runtime-esm/client/plugins/query.js +4 -0
- package/build/runtime-esm/lib/deepEquals.js +2 -4
- package/build/runtime-esm/lib/pagination.js +2 -1
- package/build/runtime-esm/lib/types.js +9 -0
- package/build/runtime-esm/public/cache.js +11 -0
- package/build/runtime-esm/public/record.js +5 -0
- package/build/runtime-esm/router/jwt.js +15 -28
- package/build/runtime-esm/router/match.js +2 -4
- package/build/runtime-esm/router/server.js +6 -1
- package/build/runtime-esm/router/session.js +1 -1
- package/build/test-cjs/index.js +26344 -21258
- package/build/test-esm/index.js +24972 -19886
- package/build/vite/hmr.d.ts +5 -0
- package/build/vite/imports.d.ts +2 -2
- package/build/vite/schema.d.ts +0 -3
- package/build/vite-cjs/index.js +34848 -32101
- package/build/vite-esm/index.js +31526 -28780
- package/package.json +13 -14
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<
|
|
12
|
-
export declare function mkdirpSync(filepath: string): Promise<
|
|
11
|
+
export declare function mkdirp(filepath: string): Promise<void>;
|
|
12
|
+
export declare function mkdirpSync(filepath: string): Promise<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>;
|
|
@@ -31,4 +31,5 @@ export declare function glob(pattern: string): Promise<string[]>;
|
|
|
31
31
|
export declare namespace glob {
|
|
32
32
|
var hasMagic: (pattern: string | string[], options?: import("glob").GlobOptions | undefined) => boolean;
|
|
33
33
|
}
|
|
34
|
+
export declare function walk(dir: string): AsyncGenerator<string>;
|
|
34
35
|
export {};
|
package/build/lib/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from './plugin';
|
|
|
14
14
|
export * from './detectTools';
|
|
15
15
|
export * from '../runtime/router/match';
|
|
16
16
|
export * from './typescript';
|
|
17
|
+
export * from './watchAndRun';
|
|
17
18
|
export * from './walk';
|
|
18
19
|
export type { EmbeddedGraphqlDocument } from './walk';
|
|
19
20
|
export * as fs from './fs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Config } from '..';
|
|
2
1
|
import type { ProjectManifest, PageManifest, QueryManifest } from '../../runtime/lib/types';
|
|
2
|
+
import type { Config } from '../config';
|
|
3
3
|
export type { ProjectManifest, PageManifest, QueryManifest };
|
|
4
4
|
/**
|
|
5
5
|
* Walk down the routes directory and build a normalized description of the project's
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { StatementKind, TSTypeKind } from 'ast-types/lib/gen/kinds';
|
|
2
2
|
import * as graphql from 'graphql';
|
|
3
3
|
import * as recast from 'recast';
|
|
4
|
-
import {
|
|
4
|
+
import type { Config } from './config';
|
|
5
5
|
import { TypeWrapper } from './graphql';
|
|
6
6
|
export declare function unwrappedTsTypeReference(config: Config, filepath: string, missingScalars: Set<string>, { type, wrappers, }: {
|
|
7
7
|
type: graphql.GraphQLNamedType;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { PluginOption, ViteDevServer } from 'vite';
|
|
2
|
+
export type Options = {
|
|
3
|
+
/**
|
|
4
|
+
* watch files to trigger the run action (glob format)
|
|
5
|
+
*/
|
|
6
|
+
watch?: string | string[];
|
|
7
|
+
/**
|
|
8
|
+
* watch files to trigger the run action (function format)
|
|
9
|
+
*/
|
|
10
|
+
watchFile?: (filepath: string) => Promise<boolean>;
|
|
11
|
+
/**
|
|
12
|
+
* Kind of watch that will trigger the run action
|
|
13
|
+
*/
|
|
14
|
+
watchKind?: WatchKind[];
|
|
15
|
+
/**
|
|
16
|
+
* Tune what you want to print to the console. By default, everything.
|
|
17
|
+
*/
|
|
18
|
+
logs?: LogType[];
|
|
19
|
+
/**
|
|
20
|
+
* run command (npm run gen for example!)
|
|
21
|
+
*/
|
|
22
|
+
run: string | ((server: ViteDevServer, absolutePath: string | null) => void | Promise<void>);
|
|
23
|
+
/**
|
|
24
|
+
* Delay before running the run command (in ms)
|
|
25
|
+
* @default 300 ms
|
|
26
|
+
*/
|
|
27
|
+
delay?: number | null;
|
|
28
|
+
/**
|
|
29
|
+
* Name to display in the logs as prefix
|
|
30
|
+
*/
|
|
31
|
+
name?: string | null;
|
|
32
|
+
/**
|
|
33
|
+
* Add shell option to spawn, set "powershell.exe" for example to use it there.
|
|
34
|
+
*/
|
|
35
|
+
shell?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* formatErrors instead of throwing an error
|
|
38
|
+
*/
|
|
39
|
+
formatErrors?: (e: unknown, afterError?: (e: Error) => void) => void;
|
|
40
|
+
};
|
|
41
|
+
export declare const kindWithPath: readonly ["add", "addDir", "change", "unlink", "unlinkDir"];
|
|
42
|
+
export type KindWithPath = (typeof kindWithPath)[number];
|
|
43
|
+
export type LogType = 'trigger' | 'streamData' | 'streamError' | 'end';
|
|
44
|
+
export declare const kindWithoutPath: readonly ["all", "error", "raw", "ready"];
|
|
45
|
+
export type KindWithoutPath = (typeof kindWithoutPath)[number];
|
|
46
|
+
export type WatchKind = KindWithPath | KindWithoutPath;
|
|
47
|
+
export type StateDetail = {
|
|
48
|
+
kind: WatchKind[];
|
|
49
|
+
logs: LogType[];
|
|
50
|
+
run: string | ((server: ViteDevServer, absolutePath: string | null) => void | Promise<void>);
|
|
51
|
+
delay: number;
|
|
52
|
+
isRunning: boolean;
|
|
53
|
+
watchFile?: (filepath: string) => boolean | Promise<boolean>;
|
|
54
|
+
watch?: string | string[];
|
|
55
|
+
name?: string | null;
|
|
56
|
+
shell: string | boolean;
|
|
57
|
+
formatErrors?: (e: unknown, afterError?: (e: Error) => void) => void;
|
|
58
|
+
};
|
|
59
|
+
export declare const watchAndRun: (params: Options[]) => PluginOption & {
|
|
60
|
+
getCheckedConf: () => StateDetail[];
|
|
61
|
+
};
|