gatsby 2.32.2 → 2.32.3
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/CHANGELOG.md +4 -0
- package/cli.js +0 -0
- package/dist/bootstrap/create-graphql-runner.d.ts +11 -11
- package/dist/bootstrap/get-config-file.d.ts +4 -4
- package/dist/bootstrap/load-plugins/index.d.ts +2 -2
- package/dist/bootstrap/load-plugins/load.d.ts +11 -11
- package/dist/bootstrap/load-plugins/types.d.ts +40 -40
- package/dist/bootstrap/load-plugins/validate.d.ts +39 -39
- package/dist/bootstrap/prefer-default.d.ts +1 -1
- package/dist/bootstrap/redirects-writer.d.ts +2 -2
- package/dist/bootstrap/remove-stale-jobs.d.ts +2 -2
- package/dist/bootstrap/requires-writer.d.ts +10 -10
- package/dist/bootstrap/resolve-module-exports.d.ts +15 -15
- package/dist/commands/develop-static.d.ts +3 -3
- package/dist/commands/types.d.ts +48 -48
- package/dist/db/common/query.d.ts +37 -37
- package/dist/internal.d.ts +5 -5
- package/dist/joi-schemas/joi.d.ts +6 -6
- package/dist/query/error-parser.d.ts +19 -19
- package/dist/query/graphql-runner.d.ts +30 -30
- package/dist/query/graphql-span-tracer.d.ts +19 -19
- package/dist/query/query-watcher.d.ts +17 -17
- package/dist/query/types.d.ts +34 -34
- package/dist/query/utils.d.ts +4 -4
- package/dist/redux/actions/add-page-dependency.d.ts +5 -5
- package/dist/redux/actions/index.d.ts +13 -13
- package/dist/redux/actions/internal.d.ts +109 -109
- package/dist/redux/actions/restricted.d.ts +293 -293
- package/dist/redux/index.d.ts +12 -12
- package/dist/redux/nodes.d.ts +92 -92
- package/dist/redux/persist.d.ts +3 -3
- package/dist/redux/plugin-runner.d.ts +1 -1
- package/dist/redux/reducers/babelrc.d.ts +9 -9
- package/dist/redux/reducers/components.d.ts +7 -7
- package/dist/redux/reducers/config.d.ts +2 -2
- package/dist/redux/reducers/definitions.d.ts +2 -2
- package/dist/redux/reducers/flattened-plugins.d.ts +15 -15
- package/dist/redux/reducers/index.d.ts +34 -34
- package/dist/redux/reducers/inference-metadata.d.ts +7 -7
- package/dist/redux/reducers/jobs.d.ts +5 -5
- package/dist/redux/reducers/jobsv2.d.ts +5 -5
- package/dist/redux/reducers/last-action.d.ts +2 -2
- package/dist/redux/reducers/nodes-by-type.d.ts +2 -2
- package/dist/redux/reducers/nodes-touched.d.ts +3 -3
- package/dist/redux/reducers/nodes.d.ts +2 -2
- package/dist/redux/reducers/page-data-stats.d.ts +2 -2
- package/dist/redux/reducers/page-data.d.ts +2 -2
- package/dist/redux/reducers/pages.d.ts +2 -2
- package/dist/redux/reducers/pending-page-data-writes.d.ts +4 -4
- package/dist/redux/reducers/program.d.ts +2 -2
- package/dist/redux/reducers/queries.d.ts +26 -26
- package/dist/redux/reducers/redirects.d.ts +2 -2
- package/dist/redux/reducers/resolved-nodes.d.ts +2 -2
- package/dist/redux/reducers/schema-customization.d.ts +23 -23
- package/dist/redux/reducers/schema.d.ts +3 -3
- package/dist/redux/reducers/static-queries-by-template.d.ts +2 -2
- package/dist/redux/reducers/static-query-components.d.ts +2 -2
- package/dist/redux/reducers/status.d.ts +5 -5
- package/dist/redux/reducers/themes.d.ts +2 -2
- package/dist/redux/reducers/visited-page.d.ts +2 -2
- package/dist/redux/reducers/webpack-compilation-hash.d.ts +2 -2
- package/dist/redux/reducers/webpack.d.ts +2 -2
- package/dist/redux/types.d.ts +667 -667
- package/dist/schema/context.d.ts +13 -13
- package/dist/schema/infer/inference-metadata.d.ts +72 -72
- package/dist/schema/infer/type-conflict-reporter.d.ts +28 -28
- package/dist/schema/resolvers.d.ts +34 -34
- package/dist/schema/type-definitions.d.ts +42 -42
- package/dist/schema/types/date.d.ts +40 -40
- package/dist/schema/types/derived-types.d.ts +42 -42
- package/dist/schema/types/filter.d.ts +12 -12
- package/dist/schema/types/node-interface.d.ts +14 -14
- package/dist/schema/types/sort.d.ts +18 -18
- package/dist/schema/types/type-builders.d.ts +36 -36
- package/dist/services/build-schema.d.ts +2 -2
- package/dist/services/calculate-dirty-queries.d.ts +5 -5
- package/dist/services/create-pages-statefully.d.ts +2 -2
- package/dist/services/create-pages.d.ts +5 -5
- package/dist/services/customize-schema.d.ts +2 -2
- package/dist/services/extract-queries.d.ts +2 -2
- package/dist/services/index.d.ts +19 -19
- package/dist/services/initialize.d.ts +8 -8
- package/dist/services/listen-for-mutations.d.ts +2 -2
- package/dist/services/listen-to-webpack.d.ts +3 -3
- package/dist/services/post-bootstrap.d.ts +2 -2
- package/dist/services/rebuild-schema-with-site-pages.d.ts +2 -2
- package/dist/services/recompile.d.ts +3 -3
- package/dist/services/run-mutation-batch.d.ts +2 -2
- package/dist/services/run-page-queries.d.ts +2 -2
- package/dist/services/run-static-queries.d.ts +2 -2
- package/dist/services/source-nodes.d.ts +5 -5
- package/dist/services/start-webpack-server.d.ts +9 -9
- package/dist/services/types.d.ts +45 -45
- package/dist/services/write-out-redirects.d.ts +2 -2
- package/dist/services/write-out-requires.d.ts +2 -2
- package/dist/state-machines/data-layer/actions.d.ts +8 -8
- package/dist/state-machines/data-layer/index.d.ts +24 -24
- package/dist/state-machines/data-layer/services.d.ts +3 -3
- package/dist/state-machines/data-layer/types.d.ts +30 -30
- package/dist/state-machines/develop/actions.d.ts +37 -37
- package/dist/state-machines/index.d.ts +7 -7
- package/dist/state-machines/query-running/actions.d.ts +9 -9
- package/dist/state-machines/query-running/index.d.ts +7 -7
- package/dist/state-machines/query-running/services.d.ts +3 -3
- package/dist/state-machines/query-running/types.d.ts +23 -23
- package/dist/state-machines/waiting/actions.d.ts +11 -11
- package/dist/state-machines/waiting/index.d.ts +12 -12
- package/dist/state-machines/waiting/services.d.ts +3 -3
- package/dist/state-machines/waiting/types.d.ts +12 -12
- package/dist/types.d.ts +9 -9
- package/dist/utils/api-browser-docs.d.ts +252 -252
- package/dist/utils/api-node-docs.d.ts +443 -443
- package/dist/utils/assert-store.d.ts +2 -2
- package/dist/utils/babel-parse-to-ast.d.ts +4 -4
- package/dist/utils/browserslist.d.ts +1 -1
- package/dist/utils/call-deferred-api.d.ts +8 -8
- package/dist/utils/changed-pages.d.ts +6 -6
- package/dist/utils/create-node-id.d.ts +24 -24
- package/dist/utils/create-schema-customization.d.ts +6 -6
- package/dist/utils/develop-preload-headers.d.ts +7 -7
- package/dist/utils/did-you-mean.d.ts +3 -3
- package/dist/utils/find-page-by-path.d.ts +2 -2
- package/dist/utils/flags.d.ts +34 -34
- package/dist/utils/gatsby-dependents.d.ts +8 -8
- package/dist/utils/gatsby-webpack-virtual-modules.d.ts +6 -6
- package/dist/utils/get-latest-apis.d.ts +6 -6
- package/dist/utils/get-page-data.d.ts +3 -3
- package/dist/utils/get-react-hot-loader-strategy.d.ts +1 -1
- package/dist/utils/get-value-at.d.ts +1 -1
- package/dist/utils/handle-flags.d.ts +7 -7
- package/dist/utils/is-32-bit-integer.d.ts +1 -1
- package/dist/utils/jobs-manager.d.ts +61 -61
- package/dist/utils/loading-indicator.d.ts +3 -3
- package/dist/utils/map-templates-to-static-query-hashes.d.ts +16 -16
- package/dist/utils/mett.d.ts +10 -10
- package/dist/utils/page-data.d.ts +22 -22
- package/dist/utils/path.d.ts +5 -5
- package/dist/utils/prepare-urls.d.ts +7 -7
- package/dist/utils/print-deprecation-warnings.d.ts +1 -1
- package/dist/utils/print-instructions.d.ts +2 -2
- package/dist/utils/sample-site-for-experiment.d.ts +2 -2
- package/dist/utils/show-experiment-notice.d.ts +6 -6
- package/dist/utils/source-nodes.d.ts +8 -8
- package/dist/utils/stack-trace-utils.d.ts +22 -22
- package/dist/utils/start-server.d.ts +25 -25
- package/dist/utils/test-require-error.d.ts +1 -1
- package/dist/utils/wait-until-jobs-complete.d.ts +1 -1
- package/dist/utils/webpack-error-utils.d.ts +18 -18
- package/dist/utils/webpack-status.d.ts +3 -3
- package/dist/utils/websocket-manager.d.ts +39 -39
- package/dist/utils/worker/pool.d.ts +2 -2
- package/gatsby-admin-public/4c744e84-6c27fb4a13dc8c8c3e88.js.map +1 -1
- package/gatsby-admin-public/69bd6bf3-00a5b50945cce68e041c.js.map +1 -1
- package/gatsby-admin-public/784b2cee55c07b638f20445dec340adf9f1888a3-d690a55f56dedc0f95b3.js.map +1 -1
- package/gatsby-admin-public/854a7ef1f34af0aefbdfdd9304a0c00251662775-30cef3c004238987a416.js.map +1 -1
- package/gatsby-admin-public/{app-d9751648e893ba210043.js → app-74fe4789160202707c96.js} +2 -2
- package/gatsby-admin-public/{app-d9751648e893ba210043.js.LICENSE.txt → app-74fe4789160202707c96.js.LICENSE.txt} +0 -0
- package/gatsby-admin-public/app-74fe4789160202707c96.js.map +1 -0
- package/gatsby-admin-public/c432bec7e9afb3443fd639df9e5f119e13575cf7-976ea4aa8380d4a68cb1.js.map +1 -1
- package/gatsby-admin-public/chunk-map.json +1 -1
- package/gatsby-admin-public/component---src-pages-index-tsx-70aa31e4e1eca0a560a8.js.map +1 -1
- package/gatsby-admin-public/component---src-pages-plugins-tsx-c6700b48ed9ac88a9768.js.map +1 -1
- package/gatsby-admin-public/{component---src-pages-recipe-js-91150640d438410a1a0b.js → component---src-pages-recipe-js-4e8fdacf3e36393b3739.js} +1 -1
- package/gatsby-admin-public/component---src-pages-recipe-js-4e8fdacf3e36393b3739.js.map +1 -0
- package/gatsby-admin-public/e2852b4470dcb2615e49edcd9de2a3c8119d4bec-fbd253211b90ee4d944c.js.map +1 -1
- package/gatsby-admin-public/framework-b5530edc347e85dd3979.js.map +1 -1
- package/gatsby-admin-public/index.html +1 -1
- package/gatsby-admin-public/page-data/app-data.json +1 -1
- package/gatsby-admin-public/pages/index.html +1 -1
- package/gatsby-admin-public/plugins/index.html +1 -1
- package/gatsby-admin-public/polyfill-bb3950ad41cd96a6ba64.js.map +1 -1
- package/gatsby-admin-public/recipe/index.html +1 -1
- package/gatsby-admin-public/recipes/index.html +1 -1
- package/gatsby-admin-public/{webpack-runtime-0a97eab52901d3d030d8.js → webpack-runtime-ce59e1ba33a41c65ea97.js} +2 -2
- package/gatsby-admin-public/{webpack-runtime-0a97eab52901d3d030d8.js.map → webpack-runtime-ce59e1ba33a41c65ea97.js.map} +1 -1
- package/gatsby-admin-public/webpack.stats.json +1 -1
- package/package.json +3 -3
- package/gatsby-admin-public/app-d9751648e893ba210043.js.map +0 -1
- package/gatsby-admin-public/component---src-pages-recipe-js-91150640d438410a1a0b.js.map +0 -1
package/dist/redux/types.d.ts
CHANGED
|
@@ -1,667 +1,667 @@
|
|
|
1
|
-
import { IProgram } from "../commands/types";
|
|
2
|
-
import { GraphQLFieldExtensionDefinition } from "../schema/extensions";
|
|
3
|
-
import { DocumentNode, GraphQLSchema, DefinitionNode } from "graphql";
|
|
4
|
-
import { SchemaComposer } from "graphql-compose";
|
|
5
|
-
import { IGatsbyCLIState } from "gatsby-cli/src/reporter/redux/types";
|
|
6
|
-
import { InternalJob, JobResultInterface } from "../utils/jobs-manager";
|
|
7
|
-
import { ITypeMetadata } from "../schema/infer/inference-metadata";
|
|
8
|
-
declare type SystemPath = string;
|
|
9
|
-
declare type Identifier = string;
|
|
10
|
-
export interface IRedirect {
|
|
11
|
-
fromPath: string;
|
|
12
|
-
toPath: string;
|
|
13
|
-
isPermanent?: boolean;
|
|
14
|
-
redirectInBrowser?: boolean;
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
}
|
|
17
|
-
export declare enum ProgramStatus {
|
|
18
|
-
BOOTSTRAP_FINISHED = "BOOTSTRAP_FINISHED",
|
|
19
|
-
BOOTSTRAP_QUERY_RUNNING_FINISHED = "BOOTSTRAP_QUERY_RUNNING_FINISHED"
|
|
20
|
-
}
|
|
21
|
-
export interface IGatsbyPage {
|
|
22
|
-
internalComponentName: string;
|
|
23
|
-
path: string;
|
|
24
|
-
matchPath: undefined | string;
|
|
25
|
-
component: SystemPath;
|
|
26
|
-
componentChunkName: string;
|
|
27
|
-
isCreatedByStatefulCreatePages: boolean;
|
|
28
|
-
context: {};
|
|
29
|
-
updatedAt: number;
|
|
30
|
-
pluginCreator___NODE: Identifier;
|
|
31
|
-
pluginCreatorId: Identifier;
|
|
32
|
-
componentPath: SystemPath;
|
|
33
|
-
}
|
|
34
|
-
export interface IGatsbyConfig {
|
|
35
|
-
plugins?: Array<{
|
|
36
|
-
resolve: string;
|
|
37
|
-
options: {
|
|
38
|
-
[key: string]: unknown;
|
|
39
|
-
};
|
|
40
|
-
}>;
|
|
41
|
-
siteMetadata?: {
|
|
42
|
-
title?: string;
|
|
43
|
-
author?: string;
|
|
44
|
-
description?: string;
|
|
45
|
-
siteUrl?: string;
|
|
46
|
-
[key: string]: unknown;
|
|
47
|
-
};
|
|
48
|
-
polyfill?: boolean;
|
|
49
|
-
developMiddleware?: any;
|
|
50
|
-
proxy?: any;
|
|
51
|
-
pathPrefix?: string;
|
|
52
|
-
mapping?: Record<string, string>;
|
|
53
|
-
}
|
|
54
|
-
export interface IGatsbyNode {
|
|
55
|
-
id: Identifier;
|
|
56
|
-
parent: Identifier;
|
|
57
|
-
children: Array<Identifier>;
|
|
58
|
-
internal: {
|
|
59
|
-
type: string;
|
|
60
|
-
counter: number;
|
|
61
|
-
owner: string;
|
|
62
|
-
contentDigest: string;
|
|
63
|
-
mediaType?: string;
|
|
64
|
-
content?: string;
|
|
65
|
-
description?: string;
|
|
66
|
-
};
|
|
67
|
-
__gatsby_resolved: any;
|
|
68
|
-
[key: string]: unknown;
|
|
69
|
-
fields: Array<string>;
|
|
70
|
-
}
|
|
71
|
-
export interface IGatsbyPlugin {
|
|
72
|
-
id: Identifier;
|
|
73
|
-
name: string;
|
|
74
|
-
version: string;
|
|
75
|
-
[key: string]: any;
|
|
76
|
-
}
|
|
77
|
-
export interface IGatsbyPluginContext {
|
|
78
|
-
[key: string]: (...args: Array<any>) => any;
|
|
79
|
-
}
|
|
80
|
-
export interface IGatsbyStaticQueryComponents {
|
|
81
|
-
name: string;
|
|
82
|
-
componentPath: SystemPath;
|
|
83
|
-
id: Identifier;
|
|
84
|
-
query: string;
|
|
85
|
-
hash: string;
|
|
86
|
-
}
|
|
87
|
-
export interface IDefinitionMeta {
|
|
88
|
-
name: string;
|
|
89
|
-
def: DefinitionNode;
|
|
90
|
-
filePath: string;
|
|
91
|
-
text: string;
|
|
92
|
-
templateLoc: any;
|
|
93
|
-
printedAst: string;
|
|
94
|
-
isHook: boolean;
|
|
95
|
-
isStaticQuery: boolean;
|
|
96
|
-
isFragment: boolean;
|
|
97
|
-
hash: string;
|
|
98
|
-
}
|
|
99
|
-
declare type GatsbyNodes = Map<string, IGatsbyNode>;
|
|
100
|
-
export interface IGatsbyIncompleteJobV2 {
|
|
101
|
-
job: InternalJob;
|
|
102
|
-
plugin: IGatsbyPlugin;
|
|
103
|
-
}
|
|
104
|
-
export interface IGatsbyIncompleteJob {
|
|
105
|
-
job: InternalJob;
|
|
106
|
-
plugin: IGatsbyPlugin;
|
|
107
|
-
}
|
|
108
|
-
export interface IGatsbyCompleteJobV2 {
|
|
109
|
-
result: JobResultInterface;
|
|
110
|
-
inputPaths: InternalJob["inputPaths"];
|
|
111
|
-
}
|
|
112
|
-
export interface IPlugin {
|
|
113
|
-
name: string;
|
|
114
|
-
options: Record<string, any>;
|
|
115
|
-
}
|
|
116
|
-
export interface IBabelStage {
|
|
117
|
-
plugins: Array<IPlugin>;
|
|
118
|
-
presets: Array<IPlugin>;
|
|
119
|
-
options: {
|
|
120
|
-
cacheDirectory: boolean;
|
|
121
|
-
sourceType: string;
|
|
122
|
-
sourceMaps?: string;
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
declare type BabelStageKeys = "develop" | "develop-html" | "build-html" | "build-javascript";
|
|
126
|
-
export interface IStateProgram extends IProgram {
|
|
127
|
-
extensions: Array<string>;
|
|
128
|
-
}
|
|
129
|
-
export interface IQueryState {
|
|
130
|
-
dirty: number;
|
|
131
|
-
running: number;
|
|
132
|
-
}
|
|
133
|
-
export interface IComponentState {
|
|
134
|
-
componentPath: string;
|
|
135
|
-
query: string;
|
|
136
|
-
pages: Set<Identifier>;
|
|
137
|
-
errors: number;
|
|
138
|
-
}
|
|
139
|
-
export declare type GatsbyNodeAPI = "onPreBoostrap" | "onPostBoostrap" | "onCreateWebpackConfig" | "onCreatePage" | "sourceNodes" | "createPagesStatefully" | "createPages" | "onPostBuild";
|
|
140
|
-
export interface IGatsbyState {
|
|
141
|
-
program: IStateProgram;
|
|
142
|
-
nodes: GatsbyNodes;
|
|
143
|
-
nodesByType: Map<string, GatsbyNodes>;
|
|
144
|
-
resolvedNodesCache: Map<string, any>;
|
|
145
|
-
nodesTouched: Set<string>;
|
|
146
|
-
lastAction: ActionsUnion;
|
|
147
|
-
flattenedPlugins: Array<{
|
|
148
|
-
resolve: SystemPath;
|
|
149
|
-
id: Identifier;
|
|
150
|
-
name: string;
|
|
151
|
-
version: string;
|
|
152
|
-
pluginOptions: {
|
|
153
|
-
plugins: [];
|
|
154
|
-
[key: string]: unknown;
|
|
155
|
-
};
|
|
156
|
-
nodeAPIs: Array<GatsbyNodeAPI>;
|
|
157
|
-
browserAPIs: Array<"onRouteUpdate" | "registerServiceWorker" | "onServiceWorkerActive" | "onPostPrefetchPathname">;
|
|
158
|
-
ssrAPIs: Array<"onRenderBody" | "onPreRenderHTML">;
|
|
159
|
-
pluginFilepath: SystemPath;
|
|
160
|
-
}>;
|
|
161
|
-
config: IGatsbyConfig;
|
|
162
|
-
pages: Map<string, IGatsbyPage>;
|
|
163
|
-
schema: GraphQLSchema;
|
|
164
|
-
definitions: Map<string, IDefinitionMeta>;
|
|
165
|
-
status: {
|
|
166
|
-
plugins: Record<string, IGatsbyPlugin>;
|
|
167
|
-
PLUGINS_HASH: Identifier;
|
|
168
|
-
};
|
|
169
|
-
queries: {
|
|
170
|
-
byNode: Map<Identifier, Set<Identifier>>;
|
|
171
|
-
byConnection: Map<string, Set<Identifier>>;
|
|
172
|
-
queryNodes: Map<Identifier, Set<Identifier>>;
|
|
173
|
-
trackedQueries: Map<Identifier, IQueryState>;
|
|
174
|
-
trackedComponents: Map<string, IComponentState>;
|
|
175
|
-
deletedQueries: Set<Identifier>;
|
|
176
|
-
dirtyQueriesListToEmitViaWebsocket: Array<string>;
|
|
177
|
-
};
|
|
178
|
-
components: Map<SystemPath, {
|
|
179
|
-
componentPath: SystemPath;
|
|
180
|
-
query: string;
|
|
181
|
-
pages: Set<string>;
|
|
182
|
-
isInBootstrap: boolean;
|
|
183
|
-
}>;
|
|
184
|
-
staticQueryComponents: Map<IGatsbyStaticQueryComponents["id"], IGatsbyStaticQueryComponents>;
|
|
185
|
-
staticQueriesByTemplate: Map<SystemPath, Array<Identifier>>;
|
|
186
|
-
pendingPageDataWrites: {
|
|
187
|
-
pagePaths: Set<string>;
|
|
188
|
-
};
|
|
189
|
-
jobs: {
|
|
190
|
-
active: Array<any>;
|
|
191
|
-
done: Array<any>;
|
|
192
|
-
};
|
|
193
|
-
jobsV2: {
|
|
194
|
-
incomplete: Map<Identifier, IGatsbyIncompleteJobV2>;
|
|
195
|
-
complete: Map<Identifier, IGatsbyCompleteJobV2>;
|
|
196
|
-
};
|
|
197
|
-
webpack: any;
|
|
198
|
-
webpackCompilationHash: string;
|
|
199
|
-
redirects: Array<IRedirect>;
|
|
200
|
-
babelrc: {
|
|
201
|
-
stages: {
|
|
202
|
-
[key in BabelStageKeys]: IBabelStage;
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
schemaCustomization: {
|
|
206
|
-
composer: null | SchemaComposer<any>;
|
|
207
|
-
context: Record<string, any>;
|
|
208
|
-
fieldExtensions: GraphQLFieldExtensionDefinition;
|
|
209
|
-
printConfig: {
|
|
210
|
-
path?: string;
|
|
211
|
-
include?: {
|
|
212
|
-
types?: Array<string>;
|
|
213
|
-
plugins?: Array<string>;
|
|
214
|
-
};
|
|
215
|
-
exclude?: {
|
|
216
|
-
types?: Array<string>;
|
|
217
|
-
plugins?: Array<string>;
|
|
218
|
-
};
|
|
219
|
-
withFieldTypes?: boolean;
|
|
220
|
-
} | null;
|
|
221
|
-
thirdPartySchemas: Array<GraphQLSchema>;
|
|
222
|
-
types: Array<string | {
|
|
223
|
-
typeOrTypeDef: DocumentNode;
|
|
224
|
-
plugin: IGatsbyPlugin;
|
|
225
|
-
}>;
|
|
226
|
-
};
|
|
227
|
-
themes: any;
|
|
228
|
-
logs: IGatsbyCLIState;
|
|
229
|
-
inferenceMetadata: {
|
|
230
|
-
step: string;
|
|
231
|
-
typeMap: {
|
|
232
|
-
[key: string]: ITypeMetadata;
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
pageDataStats: Map<SystemPath, number>;
|
|
236
|
-
pageData: Map<Identifier, string>;
|
|
237
|
-
visitedPages: Map<string, Set<string>>;
|
|
238
|
-
}
|
|
239
|
-
export interface ICachedReduxState {
|
|
240
|
-
nodes?: IGatsbyState["nodes"];
|
|
241
|
-
status: IGatsbyState["status"];
|
|
242
|
-
components: IGatsbyState["components"];
|
|
243
|
-
jobsV2: IGatsbyState["jobsV2"];
|
|
244
|
-
staticQueryComponents: IGatsbyState["staticQueryComponents"];
|
|
245
|
-
webpackCompilationHash: IGatsbyState["webpackCompilationHash"];
|
|
246
|
-
pageDataStats: IGatsbyState["pageDataStats"];
|
|
247
|
-
pageData: IGatsbyState["pageData"];
|
|
248
|
-
staticQueriesByTemplate: IGatsbyState["staticQueriesByTemplate"];
|
|
249
|
-
pendingPageDataWrites: IGatsbyState["pendingPageDataWrites"];
|
|
250
|
-
queries: IGatsbyState["queries"];
|
|
251
|
-
}
|
|
252
|
-
export declare type ActionsUnion = IAddChildNodeToParentNodeAction | IAddFieldToNodeAction | IAddThirdPartySchema | IApiFinishedAction | ICreateFieldExtension | ICreateNodeAction | ICreatePageAction | ICreatePageDependencyAction | ICreateTypes | IDeleteCacheAction | IDeleteNodeAction | IDeleteNodesAction | IDeletePageAction | IPageQueryRunAction | IPrintTypeDefinitions | IQueryClearDirtyQueriesListToEmitViaWebsocket | IQueryExtractedAction | IQueryExtractedBabelSuccessAction | IQueryExtractionBabelErrorAction | IQueryExtractionGraphQLErrorAction | IQueryStartAction | IRemoveStaticQuery | IReplaceComponentQueryAction | IReplaceStaticQueryAction | IReplaceWebpackConfigAction | ISetPluginStatusAction | ISetProgramStatusAction | ISetResolvedNodesAction | ISetSchemaAction | ISetGraphQLDefinitionsAction | ISetSiteFlattenedPluginsAction | ISetWebpackCompilationHashAction | ISetWebpackConfigAction | ITouchNodeAction | IUpdatePluginsHashAction | IRemovePageDataAction | ISetPageDataAction | ICreateJobV2Action | IEndJobV2Action | IRemoveStaleJobV2Action | IAddPageDataStatsAction | IRemoveTemplateComponentAction | ISetBabelPluginAction | ISetBabelPresetAction | ISetBabelOptionsAction | ICreateJobAction | ISetJobAction | IEndJobAction | ISetStaticQueriesByTemplateAction | IAddPendingPageDataWriteAction | IAddPendingTemplateDataWriteAction | IClearPendingPageDataWriteAction | ICreateResolverContext | IClearSchemaCustomizationAction | ISetSchemaComposerAction | IStartIncrementalInferenceAction | IBuildTypeMetadataAction | IDisableTypeInferenceAction | ISetProgramAction | ISetProgramExtensions;
|
|
253
|
-
export interface IApiFinishedAction {
|
|
254
|
-
type: `API_FINISHED`;
|
|
255
|
-
payload: {
|
|
256
|
-
apiName: GatsbyNodeAPI;
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
interface ISetBabelPluginAction {
|
|
260
|
-
type: `SET_BABEL_PLUGIN`;
|
|
261
|
-
payload: {
|
|
262
|
-
stage: BabelStageKeys;
|
|
263
|
-
name: IPlugin["name"];
|
|
264
|
-
options: IPlugin["options"];
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
interface ISetBabelPresetAction {
|
|
268
|
-
type: `SET_BABEL_PRESET`;
|
|
269
|
-
payload: {
|
|
270
|
-
stage: BabelStageKeys;
|
|
271
|
-
name: IPlugin["name"];
|
|
272
|
-
options: IPlugin["options"];
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
interface ISetBabelOptionsAction {
|
|
276
|
-
type: `SET_BABEL_OPTIONS`;
|
|
277
|
-
payload: {
|
|
278
|
-
stage: BabelStageKeys;
|
|
279
|
-
name: IPlugin["name"];
|
|
280
|
-
options: IPlugin["options"];
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
export interface ICreateJobV2Action {
|
|
284
|
-
type: `CREATE_JOB_V2`;
|
|
285
|
-
payload: {
|
|
286
|
-
job: IGatsbyIncompleteJobV2["job"];
|
|
287
|
-
plugin: IGatsbyIncompleteJobV2["plugin"];
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
export interface IEndJobV2Action {
|
|
291
|
-
type: `END_JOB_V2`;
|
|
292
|
-
payload: {
|
|
293
|
-
jobContentDigest: string;
|
|
294
|
-
result: JobResultInterface;
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
export interface IRemoveStaleJobV2Action {
|
|
298
|
-
type: `REMOVE_STALE_JOB_V2`;
|
|
299
|
-
payload: {
|
|
300
|
-
contentDigest: string;
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
interface ICreateJobAction {
|
|
304
|
-
type: `CREATE_JOB`;
|
|
305
|
-
payload: {
|
|
306
|
-
id: string;
|
|
307
|
-
job: IGatsbyIncompleteJob["job"];
|
|
308
|
-
};
|
|
309
|
-
plugin: IGatsbyIncompleteJob["plugin"];
|
|
310
|
-
}
|
|
311
|
-
interface ISetJobAction {
|
|
312
|
-
type: `SET_JOB`;
|
|
313
|
-
payload: {
|
|
314
|
-
id: string;
|
|
315
|
-
job: IGatsbyIncompleteJob["job"];
|
|
316
|
-
};
|
|
317
|
-
plugin: IGatsbyIncompleteJob["plugin"];
|
|
318
|
-
}
|
|
319
|
-
interface IEndJobAction {
|
|
320
|
-
type: `END_JOB`;
|
|
321
|
-
payload: {
|
|
322
|
-
id: string;
|
|
323
|
-
job: IGatsbyIncompleteJob["job"];
|
|
324
|
-
};
|
|
325
|
-
plugin: IGatsbyIncompleteJob["plugin"];
|
|
326
|
-
}
|
|
327
|
-
export interface ICreatePageDependencyAction {
|
|
328
|
-
type: `CREATE_COMPONENT_DEPENDENCY`;
|
|
329
|
-
plugin?: string;
|
|
330
|
-
payload: {
|
|
331
|
-
path: string;
|
|
332
|
-
nodeId?: string;
|
|
333
|
-
connection?: string;
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
export interface IDeleteComponentDependenciesAction {
|
|
337
|
-
type: "DELETE_COMPONENTS_DEPENDENCIES";
|
|
338
|
-
payload: {
|
|
339
|
-
paths: Array<string>;
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
export interface IReplaceComponentQueryAction {
|
|
343
|
-
type: "REPLACE_COMPONENT_QUERY";
|
|
344
|
-
payload: {
|
|
345
|
-
query: string;
|
|
346
|
-
componentPath: string;
|
|
347
|
-
};
|
|
348
|
-
}
|
|
349
|
-
export interface IReplaceStaticQueryAction {
|
|
350
|
-
type: `REPLACE_STATIC_QUERY`;
|
|
351
|
-
plugin: IGatsbyPlugin | null | undefined;
|
|
352
|
-
payload: {
|
|
353
|
-
name: string;
|
|
354
|
-
componentPath: string;
|
|
355
|
-
id: string;
|
|
356
|
-
query: string;
|
|
357
|
-
hash: string;
|
|
358
|
-
};
|
|
359
|
-
}
|
|
360
|
-
export interface IQueryClearDirtyQueriesListToEmitViaWebsocket {
|
|
361
|
-
type: `QUERY_CLEAR_DIRTY_QUERIES_LIST_TO_EMIT_VIA_WEBSOCKET`;
|
|
362
|
-
}
|
|
363
|
-
export interface IQueryExtractedAction {
|
|
364
|
-
type: `QUERY_EXTRACTED`;
|
|
365
|
-
plugin: IGatsbyPlugin;
|
|
366
|
-
traceId: string | undefined;
|
|
367
|
-
payload: {
|
|
368
|
-
componentPath: string;
|
|
369
|
-
query: string;
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
|
-
export interface IQueryExtractionGraphQLErrorAction {
|
|
373
|
-
type: `QUERY_EXTRACTION_GRAPHQL_ERROR`;
|
|
374
|
-
plugin: IGatsbyPlugin;
|
|
375
|
-
traceId: string | undefined;
|
|
376
|
-
payload: {
|
|
377
|
-
componentPath: string;
|
|
378
|
-
error: string;
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
export interface IQueryExtractedBabelSuccessAction {
|
|
382
|
-
type: `QUERY_EXTRACTION_BABEL_SUCCESS`;
|
|
383
|
-
plugin: IGatsbyPlugin;
|
|
384
|
-
traceId: string | undefined;
|
|
385
|
-
payload: {
|
|
386
|
-
componentPath: string;
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
export interface IQueryExtractionBabelErrorAction {
|
|
390
|
-
type: `QUERY_EXTRACTION_BABEL_ERROR`;
|
|
391
|
-
plugin: IGatsbyPlugin;
|
|
392
|
-
traceId: string | undefined;
|
|
393
|
-
payload: {
|
|
394
|
-
componentPath: string;
|
|
395
|
-
error: Error;
|
|
396
|
-
};
|
|
397
|
-
}
|
|
398
|
-
export interface ISetProgramStatusAction {
|
|
399
|
-
type: `SET_PROGRAM_STATUS`;
|
|
400
|
-
plugin: IGatsbyPlugin;
|
|
401
|
-
traceId: string | undefined;
|
|
402
|
-
payload: ProgramStatus;
|
|
403
|
-
}
|
|
404
|
-
export interface IPageQueryRunAction {
|
|
405
|
-
type: `PAGE_QUERY_RUN`;
|
|
406
|
-
plugin: IGatsbyPlugin;
|
|
407
|
-
traceId: string | undefined;
|
|
408
|
-
payload: {
|
|
409
|
-
path: string;
|
|
410
|
-
componentPath: string;
|
|
411
|
-
isPage: boolean;
|
|
412
|
-
};
|
|
413
|
-
}
|
|
414
|
-
export interface IQueryStartAction {
|
|
415
|
-
type: `QUERY_START`;
|
|
416
|
-
plugin: IGatsbyPlugin;
|
|
417
|
-
traceId: string | undefined;
|
|
418
|
-
payload: {
|
|
419
|
-
path: string;
|
|
420
|
-
componentPath: string;
|
|
421
|
-
isPage: boolean;
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
export interface IRemoveStaleJobAction {
|
|
425
|
-
type: `REMOVE_STALE_JOB_V2`;
|
|
426
|
-
plugin: IGatsbyPlugin | undefined;
|
|
427
|
-
traceId?: string;
|
|
428
|
-
payload: {
|
|
429
|
-
contentDigest: string;
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
export interface IAddThirdPartySchema {
|
|
433
|
-
type: `ADD_THIRD_PARTY_SCHEMA`;
|
|
434
|
-
plugin: IGatsbyPlugin;
|
|
435
|
-
traceId?: string;
|
|
436
|
-
payload: GraphQLSchema;
|
|
437
|
-
}
|
|
438
|
-
export interface ICreateTypes {
|
|
439
|
-
type: `CREATE_TYPES`;
|
|
440
|
-
plugin: IGatsbyPlugin;
|
|
441
|
-
traceId?: string;
|
|
442
|
-
payload: DocumentNode | Array<DocumentNode>;
|
|
443
|
-
}
|
|
444
|
-
export interface ICreateFieldExtension {
|
|
445
|
-
type: `CREATE_FIELD_EXTENSION`;
|
|
446
|
-
plugin: IGatsbyPlugin;
|
|
447
|
-
traceId?: string;
|
|
448
|
-
payload: {
|
|
449
|
-
name: string;
|
|
450
|
-
extension: GraphQLFieldExtensionDefinition;
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
export interface IPrintTypeDefinitions {
|
|
454
|
-
type: `PRINT_SCHEMA_REQUESTED`;
|
|
455
|
-
plugin: IGatsbyPlugin;
|
|
456
|
-
traceId?: string;
|
|
457
|
-
payload: {
|
|
458
|
-
path?: string;
|
|
459
|
-
include?: {
|
|
460
|
-
types?: Array<string>;
|
|
461
|
-
plugins?: Array<string>;
|
|
462
|
-
};
|
|
463
|
-
exclude?: {
|
|
464
|
-
types?: Array<string>;
|
|
465
|
-
plugins?: Array<string>;
|
|
466
|
-
};
|
|
467
|
-
withFieldTypes?: boolean;
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
export interface ICreateResolverContext {
|
|
471
|
-
type: `CREATE_RESOLVER_CONTEXT`;
|
|
472
|
-
plugin: IGatsbyPlugin;
|
|
473
|
-
traceId?: string;
|
|
474
|
-
payload: IGatsbyPluginContext | {
|
|
475
|
-
[camelCasedPluginNameWithoutPrefix: string]: IGatsbyPluginContext;
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
interface IClearSchemaCustomizationAction {
|
|
479
|
-
type: `CLEAR_SCHEMA_CUSTOMIZATION`;
|
|
480
|
-
}
|
|
481
|
-
interface ISetSchemaComposerAction {
|
|
482
|
-
type: `SET_SCHEMA_COMPOSER`;
|
|
483
|
-
payload: SchemaComposer<any>;
|
|
484
|
-
}
|
|
485
|
-
export interface ICreateServerVisitedPage {
|
|
486
|
-
type: `CREATE_SERVER_VISITED_PAGE`;
|
|
487
|
-
payload: IGatsbyPage;
|
|
488
|
-
plugin?: IGatsbyPlugin;
|
|
489
|
-
}
|
|
490
|
-
export interface ICreatePageAction {
|
|
491
|
-
type: `CREATE_PAGE`;
|
|
492
|
-
payload: IGatsbyPage;
|
|
493
|
-
plugin?: IGatsbyPlugin;
|
|
494
|
-
contextModified?: boolean;
|
|
495
|
-
}
|
|
496
|
-
export interface ICreateRedirectAction {
|
|
497
|
-
type: `CREATE_REDIRECT`;
|
|
498
|
-
payload: IRedirect;
|
|
499
|
-
}
|
|
500
|
-
export interface ISetResolvedThemesAction {
|
|
501
|
-
type: `SET_RESOLVED_THEMES`;
|
|
502
|
-
payload: any;
|
|
503
|
-
}
|
|
504
|
-
export interface IDeleteCacheAction {
|
|
505
|
-
type: `DELETE_CACHE`;
|
|
506
|
-
cacheIsCorrupt?: boolean;
|
|
507
|
-
}
|
|
508
|
-
export interface IRemovePageDataAction {
|
|
509
|
-
type: `REMOVE_PAGE_DATA`;
|
|
510
|
-
payload: {
|
|
511
|
-
id: Identifier;
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
export interface ISetPageDataAction {
|
|
515
|
-
type: `SET_PAGE_DATA`;
|
|
516
|
-
payload: {
|
|
517
|
-
id: Identifier;
|
|
518
|
-
resultHash: string;
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
export interface IRemoveTemplateComponentAction {
|
|
522
|
-
type: `REMOVE_STATIC_QUERIES_BY_TEMPLATE`;
|
|
523
|
-
payload: {
|
|
524
|
-
componentPath: string;
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
export interface ISetStaticQueriesByTemplateAction {
|
|
528
|
-
type: `SET_STATIC_QUERIES_BY_TEMPLATE`;
|
|
529
|
-
payload: {
|
|
530
|
-
componentPath: string;
|
|
531
|
-
staticQueryHashes: Array<Identifier>;
|
|
532
|
-
};
|
|
533
|
-
}
|
|
534
|
-
export interface IAddPendingPageDataWriteAction {
|
|
535
|
-
type: `ADD_PENDING_PAGE_DATA_WRITE`;
|
|
536
|
-
payload: {
|
|
537
|
-
path: string;
|
|
538
|
-
};
|
|
539
|
-
}
|
|
540
|
-
export interface IAddPendingTemplateDataWriteAction {
|
|
541
|
-
type: `ADD_PENDING_TEMPLATE_DATA_WRITE`;
|
|
542
|
-
payload: {
|
|
543
|
-
componentPath: SystemPath;
|
|
544
|
-
pages: Array<string>;
|
|
545
|
-
};
|
|
546
|
-
}
|
|
547
|
-
export interface IClearPendingPageDataWriteAction {
|
|
548
|
-
type: `CLEAR_PENDING_PAGE_DATA_WRITE`;
|
|
549
|
-
payload: {
|
|
550
|
-
page: string;
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
export interface IDeletePageAction {
|
|
554
|
-
type: `DELETE_PAGE`;
|
|
555
|
-
payload: IGatsbyPage;
|
|
556
|
-
}
|
|
557
|
-
export interface IReplaceStaticQueryAction {
|
|
558
|
-
type: `REPLACE_STATIC_QUERY`;
|
|
559
|
-
payload: IGatsbyStaticQueryComponents;
|
|
560
|
-
}
|
|
561
|
-
export interface IRemoveStaticQuery {
|
|
562
|
-
type: `REMOVE_STATIC_QUERY`;
|
|
563
|
-
payload: IGatsbyStaticQueryComponents["id"];
|
|
564
|
-
}
|
|
565
|
-
export interface ISetWebpackCompilationHashAction {
|
|
566
|
-
type: `SET_WEBPACK_COMPILATION_HASH`;
|
|
567
|
-
payload: IGatsbyState["webpackCompilationHash"];
|
|
568
|
-
}
|
|
569
|
-
export interface IUpdatePluginsHashAction {
|
|
570
|
-
type: `UPDATE_PLUGINS_HASH`;
|
|
571
|
-
payload: Identifier;
|
|
572
|
-
}
|
|
573
|
-
export interface ISetPluginStatusAction {
|
|
574
|
-
type: `SET_PLUGIN_STATUS`;
|
|
575
|
-
plugin: IGatsbyPlugin;
|
|
576
|
-
payload: {
|
|
577
|
-
[key: string]: any;
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
export interface IReplaceWebpackConfigAction {
|
|
581
|
-
type: `REPLACE_WEBPACK_CONFIG`;
|
|
582
|
-
payload: IGatsbyState["webpack"];
|
|
583
|
-
}
|
|
584
|
-
export interface ISetWebpackConfigAction {
|
|
585
|
-
type: `SET_WEBPACK_CONFIG`;
|
|
586
|
-
payload: Partial<IGatsbyState["webpack"]>;
|
|
587
|
-
}
|
|
588
|
-
export interface ISetSchemaAction {
|
|
589
|
-
type: `SET_SCHEMA`;
|
|
590
|
-
payload: IGatsbyState["schema"];
|
|
591
|
-
}
|
|
592
|
-
export interface ISetGraphQLDefinitionsAction {
|
|
593
|
-
type: `SET_GRAPHQL_DEFINITIONS`;
|
|
594
|
-
payload: IGatsbyState["definitions"];
|
|
595
|
-
}
|
|
596
|
-
export interface ISetSiteConfig {
|
|
597
|
-
type: `SET_SITE_CONFIG`;
|
|
598
|
-
payload: IGatsbyState["config"];
|
|
599
|
-
}
|
|
600
|
-
export interface ICreateNodeAction {
|
|
601
|
-
type: `CREATE_NODE`;
|
|
602
|
-
payload: IGatsbyNode;
|
|
603
|
-
oldNode?: IGatsbyNode;
|
|
604
|
-
}
|
|
605
|
-
export interface IAddFieldToNodeAction {
|
|
606
|
-
type: `ADD_FIELD_TO_NODE`;
|
|
607
|
-
payload: IGatsbyNode;
|
|
608
|
-
addedField: string;
|
|
609
|
-
}
|
|
610
|
-
export interface IAddChildNodeToParentNodeAction {
|
|
611
|
-
type: `ADD_CHILD_NODE_TO_PARENT_NODE`;
|
|
612
|
-
payload: IGatsbyNode;
|
|
613
|
-
}
|
|
614
|
-
export interface IDeleteNodeAction {
|
|
615
|
-
type: `DELETE_NODE`;
|
|
616
|
-
payload: IGatsbyNode | void;
|
|
617
|
-
}
|
|
618
|
-
export interface IDeleteNodesAction {
|
|
619
|
-
type: `DELETE_NODES`;
|
|
620
|
-
payload: Array<Identifier>;
|
|
621
|
-
fullNodes: Array<IGatsbyNode>;
|
|
622
|
-
}
|
|
623
|
-
export interface ISetSiteFlattenedPluginsAction {
|
|
624
|
-
type: `SET_SITE_FLATTENED_PLUGINS`;
|
|
625
|
-
payload: IGatsbyState["flattenedPlugins"];
|
|
626
|
-
}
|
|
627
|
-
export interface ISetResolvedNodesAction {
|
|
628
|
-
type: `SET_RESOLVED_NODES`;
|
|
629
|
-
payload: {
|
|
630
|
-
key: string;
|
|
631
|
-
nodes: IGatsbyState["resolvedNodesCache"];
|
|
632
|
-
};
|
|
633
|
-
}
|
|
634
|
-
export interface IAddPageDataStatsAction {
|
|
635
|
-
type: `ADD_PAGE_DATA_STATS`;
|
|
636
|
-
payload: {
|
|
637
|
-
filePath: SystemPath;
|
|
638
|
-
size: number;
|
|
639
|
-
};
|
|
640
|
-
}
|
|
641
|
-
export interface ITouchNodeAction {
|
|
642
|
-
type: `TOUCH_NODE`;
|
|
643
|
-
payload: Identifier;
|
|
644
|
-
}
|
|
645
|
-
interface IStartIncrementalInferenceAction {
|
|
646
|
-
type: `START_INCREMENTAL_INFERENCE`;
|
|
647
|
-
}
|
|
648
|
-
interface IBuildTypeMetadataAction {
|
|
649
|
-
type: `BUILD_TYPE_METADATA`;
|
|
650
|
-
payload: {
|
|
651
|
-
nodes: Array<IGatsbyNode>;
|
|
652
|
-
typeName: string;
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
|
-
interface IDisableTypeInferenceAction {
|
|
656
|
-
type: `DISABLE_TYPE_INFERENCE`;
|
|
657
|
-
payload: Array<string>;
|
|
658
|
-
}
|
|
659
|
-
interface ISetProgramAction {
|
|
660
|
-
type: `SET_PROGRAM`;
|
|
661
|
-
payload: IStateProgram;
|
|
662
|
-
}
|
|
663
|
-
interface ISetProgramExtensions {
|
|
664
|
-
type: `SET_PROGRAM_EXTENSIONS`;
|
|
665
|
-
payload: Array<string>;
|
|
666
|
-
}
|
|
667
|
-
export {};
|
|
1
|
+
import { IProgram } from "../commands/types";
|
|
2
|
+
import { GraphQLFieldExtensionDefinition } from "../schema/extensions";
|
|
3
|
+
import { DocumentNode, GraphQLSchema, DefinitionNode } from "graphql";
|
|
4
|
+
import { SchemaComposer } from "graphql-compose";
|
|
5
|
+
import { IGatsbyCLIState } from "gatsby-cli/src/reporter/redux/types";
|
|
6
|
+
import { InternalJob, JobResultInterface } from "../utils/jobs-manager";
|
|
7
|
+
import { ITypeMetadata } from "../schema/infer/inference-metadata";
|
|
8
|
+
declare type SystemPath = string;
|
|
9
|
+
declare type Identifier = string;
|
|
10
|
+
export interface IRedirect {
|
|
11
|
+
fromPath: string;
|
|
12
|
+
toPath: string;
|
|
13
|
+
isPermanent?: boolean;
|
|
14
|
+
redirectInBrowser?: boolean;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
export declare enum ProgramStatus {
|
|
18
|
+
BOOTSTRAP_FINISHED = "BOOTSTRAP_FINISHED",
|
|
19
|
+
BOOTSTRAP_QUERY_RUNNING_FINISHED = "BOOTSTRAP_QUERY_RUNNING_FINISHED"
|
|
20
|
+
}
|
|
21
|
+
export interface IGatsbyPage {
|
|
22
|
+
internalComponentName: string;
|
|
23
|
+
path: string;
|
|
24
|
+
matchPath: undefined | string;
|
|
25
|
+
component: SystemPath;
|
|
26
|
+
componentChunkName: string;
|
|
27
|
+
isCreatedByStatefulCreatePages: boolean;
|
|
28
|
+
context: {};
|
|
29
|
+
updatedAt: number;
|
|
30
|
+
pluginCreator___NODE: Identifier;
|
|
31
|
+
pluginCreatorId: Identifier;
|
|
32
|
+
componentPath: SystemPath;
|
|
33
|
+
}
|
|
34
|
+
export interface IGatsbyConfig {
|
|
35
|
+
plugins?: Array<{
|
|
36
|
+
resolve: string;
|
|
37
|
+
options: {
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
siteMetadata?: {
|
|
42
|
+
title?: string;
|
|
43
|
+
author?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
siteUrl?: string;
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
};
|
|
48
|
+
polyfill?: boolean;
|
|
49
|
+
developMiddleware?: any;
|
|
50
|
+
proxy?: any;
|
|
51
|
+
pathPrefix?: string;
|
|
52
|
+
mapping?: Record<string, string>;
|
|
53
|
+
}
|
|
54
|
+
export interface IGatsbyNode {
|
|
55
|
+
id: Identifier;
|
|
56
|
+
parent: Identifier;
|
|
57
|
+
children: Array<Identifier>;
|
|
58
|
+
internal: {
|
|
59
|
+
type: string;
|
|
60
|
+
counter: number;
|
|
61
|
+
owner: string;
|
|
62
|
+
contentDigest: string;
|
|
63
|
+
mediaType?: string;
|
|
64
|
+
content?: string;
|
|
65
|
+
description?: string;
|
|
66
|
+
};
|
|
67
|
+
__gatsby_resolved: any;
|
|
68
|
+
[key: string]: unknown;
|
|
69
|
+
fields: Array<string>;
|
|
70
|
+
}
|
|
71
|
+
export interface IGatsbyPlugin {
|
|
72
|
+
id: Identifier;
|
|
73
|
+
name: string;
|
|
74
|
+
version: string;
|
|
75
|
+
[key: string]: any;
|
|
76
|
+
}
|
|
77
|
+
export interface IGatsbyPluginContext {
|
|
78
|
+
[key: string]: (...args: Array<any>) => any;
|
|
79
|
+
}
|
|
80
|
+
export interface IGatsbyStaticQueryComponents {
|
|
81
|
+
name: string;
|
|
82
|
+
componentPath: SystemPath;
|
|
83
|
+
id: Identifier;
|
|
84
|
+
query: string;
|
|
85
|
+
hash: string;
|
|
86
|
+
}
|
|
87
|
+
export interface IDefinitionMeta {
|
|
88
|
+
name: string;
|
|
89
|
+
def: DefinitionNode;
|
|
90
|
+
filePath: string;
|
|
91
|
+
text: string;
|
|
92
|
+
templateLoc: any;
|
|
93
|
+
printedAst: string;
|
|
94
|
+
isHook: boolean;
|
|
95
|
+
isStaticQuery: boolean;
|
|
96
|
+
isFragment: boolean;
|
|
97
|
+
hash: string;
|
|
98
|
+
}
|
|
99
|
+
declare type GatsbyNodes = Map<string, IGatsbyNode>;
|
|
100
|
+
export interface IGatsbyIncompleteJobV2 {
|
|
101
|
+
job: InternalJob;
|
|
102
|
+
plugin: IGatsbyPlugin;
|
|
103
|
+
}
|
|
104
|
+
export interface IGatsbyIncompleteJob {
|
|
105
|
+
job: InternalJob;
|
|
106
|
+
plugin: IGatsbyPlugin;
|
|
107
|
+
}
|
|
108
|
+
export interface IGatsbyCompleteJobV2 {
|
|
109
|
+
result: JobResultInterface;
|
|
110
|
+
inputPaths: InternalJob["inputPaths"];
|
|
111
|
+
}
|
|
112
|
+
export interface IPlugin {
|
|
113
|
+
name: string;
|
|
114
|
+
options: Record<string, any>;
|
|
115
|
+
}
|
|
116
|
+
export interface IBabelStage {
|
|
117
|
+
plugins: Array<IPlugin>;
|
|
118
|
+
presets: Array<IPlugin>;
|
|
119
|
+
options: {
|
|
120
|
+
cacheDirectory: boolean;
|
|
121
|
+
sourceType: string;
|
|
122
|
+
sourceMaps?: string;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
declare type BabelStageKeys = "develop" | "develop-html" | "build-html" | "build-javascript";
|
|
126
|
+
export interface IStateProgram extends IProgram {
|
|
127
|
+
extensions: Array<string>;
|
|
128
|
+
}
|
|
129
|
+
export interface IQueryState {
|
|
130
|
+
dirty: number;
|
|
131
|
+
running: number;
|
|
132
|
+
}
|
|
133
|
+
export interface IComponentState {
|
|
134
|
+
componentPath: string;
|
|
135
|
+
query: string;
|
|
136
|
+
pages: Set<Identifier>;
|
|
137
|
+
errors: number;
|
|
138
|
+
}
|
|
139
|
+
export declare type GatsbyNodeAPI = "onPreBoostrap" | "onPostBoostrap" | "onCreateWebpackConfig" | "onCreatePage" | "sourceNodes" | "createPagesStatefully" | "createPages" | "onPostBuild";
|
|
140
|
+
export interface IGatsbyState {
|
|
141
|
+
program: IStateProgram;
|
|
142
|
+
nodes: GatsbyNodes;
|
|
143
|
+
nodesByType: Map<string, GatsbyNodes>;
|
|
144
|
+
resolvedNodesCache: Map<string, any>;
|
|
145
|
+
nodesTouched: Set<string>;
|
|
146
|
+
lastAction: ActionsUnion;
|
|
147
|
+
flattenedPlugins: Array<{
|
|
148
|
+
resolve: SystemPath;
|
|
149
|
+
id: Identifier;
|
|
150
|
+
name: string;
|
|
151
|
+
version: string;
|
|
152
|
+
pluginOptions: {
|
|
153
|
+
plugins: [];
|
|
154
|
+
[key: string]: unknown;
|
|
155
|
+
};
|
|
156
|
+
nodeAPIs: Array<GatsbyNodeAPI>;
|
|
157
|
+
browserAPIs: Array<"onRouteUpdate" | "registerServiceWorker" | "onServiceWorkerActive" | "onPostPrefetchPathname">;
|
|
158
|
+
ssrAPIs: Array<"onRenderBody" | "onPreRenderHTML">;
|
|
159
|
+
pluginFilepath: SystemPath;
|
|
160
|
+
}>;
|
|
161
|
+
config: IGatsbyConfig;
|
|
162
|
+
pages: Map<string, IGatsbyPage>;
|
|
163
|
+
schema: GraphQLSchema;
|
|
164
|
+
definitions: Map<string, IDefinitionMeta>;
|
|
165
|
+
status: {
|
|
166
|
+
plugins: Record<string, IGatsbyPlugin>;
|
|
167
|
+
PLUGINS_HASH: Identifier;
|
|
168
|
+
};
|
|
169
|
+
queries: {
|
|
170
|
+
byNode: Map<Identifier, Set<Identifier>>;
|
|
171
|
+
byConnection: Map<string, Set<Identifier>>;
|
|
172
|
+
queryNodes: Map<Identifier, Set<Identifier>>;
|
|
173
|
+
trackedQueries: Map<Identifier, IQueryState>;
|
|
174
|
+
trackedComponents: Map<string, IComponentState>;
|
|
175
|
+
deletedQueries: Set<Identifier>;
|
|
176
|
+
dirtyQueriesListToEmitViaWebsocket: Array<string>;
|
|
177
|
+
};
|
|
178
|
+
components: Map<SystemPath, {
|
|
179
|
+
componentPath: SystemPath;
|
|
180
|
+
query: string;
|
|
181
|
+
pages: Set<string>;
|
|
182
|
+
isInBootstrap: boolean;
|
|
183
|
+
}>;
|
|
184
|
+
staticQueryComponents: Map<IGatsbyStaticQueryComponents["id"], IGatsbyStaticQueryComponents>;
|
|
185
|
+
staticQueriesByTemplate: Map<SystemPath, Array<Identifier>>;
|
|
186
|
+
pendingPageDataWrites: {
|
|
187
|
+
pagePaths: Set<string>;
|
|
188
|
+
};
|
|
189
|
+
jobs: {
|
|
190
|
+
active: Array<any>;
|
|
191
|
+
done: Array<any>;
|
|
192
|
+
};
|
|
193
|
+
jobsV2: {
|
|
194
|
+
incomplete: Map<Identifier, IGatsbyIncompleteJobV2>;
|
|
195
|
+
complete: Map<Identifier, IGatsbyCompleteJobV2>;
|
|
196
|
+
};
|
|
197
|
+
webpack: any;
|
|
198
|
+
webpackCompilationHash: string;
|
|
199
|
+
redirects: Array<IRedirect>;
|
|
200
|
+
babelrc: {
|
|
201
|
+
stages: {
|
|
202
|
+
[key in BabelStageKeys]: IBabelStage;
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
schemaCustomization: {
|
|
206
|
+
composer: null | SchemaComposer<any>;
|
|
207
|
+
context: Record<string, any>;
|
|
208
|
+
fieldExtensions: GraphQLFieldExtensionDefinition;
|
|
209
|
+
printConfig: {
|
|
210
|
+
path?: string;
|
|
211
|
+
include?: {
|
|
212
|
+
types?: Array<string>;
|
|
213
|
+
plugins?: Array<string>;
|
|
214
|
+
};
|
|
215
|
+
exclude?: {
|
|
216
|
+
types?: Array<string>;
|
|
217
|
+
plugins?: Array<string>;
|
|
218
|
+
};
|
|
219
|
+
withFieldTypes?: boolean;
|
|
220
|
+
} | null;
|
|
221
|
+
thirdPartySchemas: Array<GraphQLSchema>;
|
|
222
|
+
types: Array<string | {
|
|
223
|
+
typeOrTypeDef: DocumentNode;
|
|
224
|
+
plugin: IGatsbyPlugin;
|
|
225
|
+
}>;
|
|
226
|
+
};
|
|
227
|
+
themes: any;
|
|
228
|
+
logs: IGatsbyCLIState;
|
|
229
|
+
inferenceMetadata: {
|
|
230
|
+
step: string;
|
|
231
|
+
typeMap: {
|
|
232
|
+
[key: string]: ITypeMetadata;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
pageDataStats: Map<SystemPath, number>;
|
|
236
|
+
pageData: Map<Identifier, string>;
|
|
237
|
+
visitedPages: Map<string, Set<string>>;
|
|
238
|
+
}
|
|
239
|
+
export interface ICachedReduxState {
|
|
240
|
+
nodes?: IGatsbyState["nodes"];
|
|
241
|
+
status: IGatsbyState["status"];
|
|
242
|
+
components: IGatsbyState["components"];
|
|
243
|
+
jobsV2: IGatsbyState["jobsV2"];
|
|
244
|
+
staticQueryComponents: IGatsbyState["staticQueryComponents"];
|
|
245
|
+
webpackCompilationHash: IGatsbyState["webpackCompilationHash"];
|
|
246
|
+
pageDataStats: IGatsbyState["pageDataStats"];
|
|
247
|
+
pageData: IGatsbyState["pageData"];
|
|
248
|
+
staticQueriesByTemplate: IGatsbyState["staticQueriesByTemplate"];
|
|
249
|
+
pendingPageDataWrites: IGatsbyState["pendingPageDataWrites"];
|
|
250
|
+
queries: IGatsbyState["queries"];
|
|
251
|
+
}
|
|
252
|
+
export declare type ActionsUnion = IAddChildNodeToParentNodeAction | IAddFieldToNodeAction | IAddThirdPartySchema | IApiFinishedAction | ICreateFieldExtension | ICreateNodeAction | ICreatePageAction | ICreatePageDependencyAction | ICreateTypes | IDeleteCacheAction | IDeleteNodeAction | IDeleteNodesAction | IDeletePageAction | IPageQueryRunAction | IPrintTypeDefinitions | IQueryClearDirtyQueriesListToEmitViaWebsocket | IQueryExtractedAction | IQueryExtractedBabelSuccessAction | IQueryExtractionBabelErrorAction | IQueryExtractionGraphQLErrorAction | IQueryStartAction | IRemoveStaticQuery | IReplaceComponentQueryAction | IReplaceStaticQueryAction | IReplaceWebpackConfigAction | ISetPluginStatusAction | ISetProgramStatusAction | ISetResolvedNodesAction | ISetSchemaAction | ISetGraphQLDefinitionsAction | ISetSiteFlattenedPluginsAction | ISetWebpackCompilationHashAction | ISetWebpackConfigAction | ITouchNodeAction | IUpdatePluginsHashAction | IRemovePageDataAction | ISetPageDataAction | ICreateJobV2Action | IEndJobV2Action | IRemoveStaleJobV2Action | IAddPageDataStatsAction | IRemoveTemplateComponentAction | ISetBabelPluginAction | ISetBabelPresetAction | ISetBabelOptionsAction | ICreateJobAction | ISetJobAction | IEndJobAction | ISetStaticQueriesByTemplateAction | IAddPendingPageDataWriteAction | IAddPendingTemplateDataWriteAction | IClearPendingPageDataWriteAction | ICreateResolverContext | IClearSchemaCustomizationAction | ISetSchemaComposerAction | IStartIncrementalInferenceAction | IBuildTypeMetadataAction | IDisableTypeInferenceAction | ISetProgramAction | ISetProgramExtensions;
|
|
253
|
+
export interface IApiFinishedAction {
|
|
254
|
+
type: `API_FINISHED`;
|
|
255
|
+
payload: {
|
|
256
|
+
apiName: GatsbyNodeAPI;
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
interface ISetBabelPluginAction {
|
|
260
|
+
type: `SET_BABEL_PLUGIN`;
|
|
261
|
+
payload: {
|
|
262
|
+
stage: BabelStageKeys;
|
|
263
|
+
name: IPlugin["name"];
|
|
264
|
+
options: IPlugin["options"];
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
interface ISetBabelPresetAction {
|
|
268
|
+
type: `SET_BABEL_PRESET`;
|
|
269
|
+
payload: {
|
|
270
|
+
stage: BabelStageKeys;
|
|
271
|
+
name: IPlugin["name"];
|
|
272
|
+
options: IPlugin["options"];
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
interface ISetBabelOptionsAction {
|
|
276
|
+
type: `SET_BABEL_OPTIONS`;
|
|
277
|
+
payload: {
|
|
278
|
+
stage: BabelStageKeys;
|
|
279
|
+
name: IPlugin["name"];
|
|
280
|
+
options: IPlugin["options"];
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
export interface ICreateJobV2Action {
|
|
284
|
+
type: `CREATE_JOB_V2`;
|
|
285
|
+
payload: {
|
|
286
|
+
job: IGatsbyIncompleteJobV2["job"];
|
|
287
|
+
plugin: IGatsbyIncompleteJobV2["plugin"];
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
export interface IEndJobV2Action {
|
|
291
|
+
type: `END_JOB_V2`;
|
|
292
|
+
payload: {
|
|
293
|
+
jobContentDigest: string;
|
|
294
|
+
result: JobResultInterface;
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
export interface IRemoveStaleJobV2Action {
|
|
298
|
+
type: `REMOVE_STALE_JOB_V2`;
|
|
299
|
+
payload: {
|
|
300
|
+
contentDigest: string;
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
interface ICreateJobAction {
|
|
304
|
+
type: `CREATE_JOB`;
|
|
305
|
+
payload: {
|
|
306
|
+
id: string;
|
|
307
|
+
job: IGatsbyIncompleteJob["job"];
|
|
308
|
+
};
|
|
309
|
+
plugin: IGatsbyIncompleteJob["plugin"];
|
|
310
|
+
}
|
|
311
|
+
interface ISetJobAction {
|
|
312
|
+
type: `SET_JOB`;
|
|
313
|
+
payload: {
|
|
314
|
+
id: string;
|
|
315
|
+
job: IGatsbyIncompleteJob["job"];
|
|
316
|
+
};
|
|
317
|
+
plugin: IGatsbyIncompleteJob["plugin"];
|
|
318
|
+
}
|
|
319
|
+
interface IEndJobAction {
|
|
320
|
+
type: `END_JOB`;
|
|
321
|
+
payload: {
|
|
322
|
+
id: string;
|
|
323
|
+
job: IGatsbyIncompleteJob["job"];
|
|
324
|
+
};
|
|
325
|
+
plugin: IGatsbyIncompleteJob["plugin"];
|
|
326
|
+
}
|
|
327
|
+
export interface ICreatePageDependencyAction {
|
|
328
|
+
type: `CREATE_COMPONENT_DEPENDENCY`;
|
|
329
|
+
plugin?: string;
|
|
330
|
+
payload: {
|
|
331
|
+
path: string;
|
|
332
|
+
nodeId?: string;
|
|
333
|
+
connection?: string;
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
export interface IDeleteComponentDependenciesAction {
|
|
337
|
+
type: "DELETE_COMPONENTS_DEPENDENCIES";
|
|
338
|
+
payload: {
|
|
339
|
+
paths: Array<string>;
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
export interface IReplaceComponentQueryAction {
|
|
343
|
+
type: "REPLACE_COMPONENT_QUERY";
|
|
344
|
+
payload: {
|
|
345
|
+
query: string;
|
|
346
|
+
componentPath: string;
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
export interface IReplaceStaticQueryAction {
|
|
350
|
+
type: `REPLACE_STATIC_QUERY`;
|
|
351
|
+
plugin: IGatsbyPlugin | null | undefined;
|
|
352
|
+
payload: {
|
|
353
|
+
name: string;
|
|
354
|
+
componentPath: string;
|
|
355
|
+
id: string;
|
|
356
|
+
query: string;
|
|
357
|
+
hash: string;
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
export interface IQueryClearDirtyQueriesListToEmitViaWebsocket {
|
|
361
|
+
type: `QUERY_CLEAR_DIRTY_QUERIES_LIST_TO_EMIT_VIA_WEBSOCKET`;
|
|
362
|
+
}
|
|
363
|
+
export interface IQueryExtractedAction {
|
|
364
|
+
type: `QUERY_EXTRACTED`;
|
|
365
|
+
plugin: IGatsbyPlugin;
|
|
366
|
+
traceId: string | undefined;
|
|
367
|
+
payload: {
|
|
368
|
+
componentPath: string;
|
|
369
|
+
query: string;
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
export interface IQueryExtractionGraphQLErrorAction {
|
|
373
|
+
type: `QUERY_EXTRACTION_GRAPHQL_ERROR`;
|
|
374
|
+
plugin: IGatsbyPlugin;
|
|
375
|
+
traceId: string | undefined;
|
|
376
|
+
payload: {
|
|
377
|
+
componentPath: string;
|
|
378
|
+
error: string;
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
export interface IQueryExtractedBabelSuccessAction {
|
|
382
|
+
type: `QUERY_EXTRACTION_BABEL_SUCCESS`;
|
|
383
|
+
plugin: IGatsbyPlugin;
|
|
384
|
+
traceId: string | undefined;
|
|
385
|
+
payload: {
|
|
386
|
+
componentPath: string;
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
export interface IQueryExtractionBabelErrorAction {
|
|
390
|
+
type: `QUERY_EXTRACTION_BABEL_ERROR`;
|
|
391
|
+
plugin: IGatsbyPlugin;
|
|
392
|
+
traceId: string | undefined;
|
|
393
|
+
payload: {
|
|
394
|
+
componentPath: string;
|
|
395
|
+
error: Error;
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
export interface ISetProgramStatusAction {
|
|
399
|
+
type: `SET_PROGRAM_STATUS`;
|
|
400
|
+
plugin: IGatsbyPlugin;
|
|
401
|
+
traceId: string | undefined;
|
|
402
|
+
payload: ProgramStatus;
|
|
403
|
+
}
|
|
404
|
+
export interface IPageQueryRunAction {
|
|
405
|
+
type: `PAGE_QUERY_RUN`;
|
|
406
|
+
plugin: IGatsbyPlugin;
|
|
407
|
+
traceId: string | undefined;
|
|
408
|
+
payload: {
|
|
409
|
+
path: string;
|
|
410
|
+
componentPath: string;
|
|
411
|
+
isPage: boolean;
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
export interface IQueryStartAction {
|
|
415
|
+
type: `QUERY_START`;
|
|
416
|
+
plugin: IGatsbyPlugin;
|
|
417
|
+
traceId: string | undefined;
|
|
418
|
+
payload: {
|
|
419
|
+
path: string;
|
|
420
|
+
componentPath: string;
|
|
421
|
+
isPage: boolean;
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
export interface IRemoveStaleJobAction {
|
|
425
|
+
type: `REMOVE_STALE_JOB_V2`;
|
|
426
|
+
plugin: IGatsbyPlugin | undefined;
|
|
427
|
+
traceId?: string;
|
|
428
|
+
payload: {
|
|
429
|
+
contentDigest: string;
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
export interface IAddThirdPartySchema {
|
|
433
|
+
type: `ADD_THIRD_PARTY_SCHEMA`;
|
|
434
|
+
plugin: IGatsbyPlugin;
|
|
435
|
+
traceId?: string;
|
|
436
|
+
payload: GraphQLSchema;
|
|
437
|
+
}
|
|
438
|
+
export interface ICreateTypes {
|
|
439
|
+
type: `CREATE_TYPES`;
|
|
440
|
+
plugin: IGatsbyPlugin;
|
|
441
|
+
traceId?: string;
|
|
442
|
+
payload: DocumentNode | Array<DocumentNode>;
|
|
443
|
+
}
|
|
444
|
+
export interface ICreateFieldExtension {
|
|
445
|
+
type: `CREATE_FIELD_EXTENSION`;
|
|
446
|
+
plugin: IGatsbyPlugin;
|
|
447
|
+
traceId?: string;
|
|
448
|
+
payload: {
|
|
449
|
+
name: string;
|
|
450
|
+
extension: GraphQLFieldExtensionDefinition;
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
export interface IPrintTypeDefinitions {
|
|
454
|
+
type: `PRINT_SCHEMA_REQUESTED`;
|
|
455
|
+
plugin: IGatsbyPlugin;
|
|
456
|
+
traceId?: string;
|
|
457
|
+
payload: {
|
|
458
|
+
path?: string;
|
|
459
|
+
include?: {
|
|
460
|
+
types?: Array<string>;
|
|
461
|
+
plugins?: Array<string>;
|
|
462
|
+
};
|
|
463
|
+
exclude?: {
|
|
464
|
+
types?: Array<string>;
|
|
465
|
+
plugins?: Array<string>;
|
|
466
|
+
};
|
|
467
|
+
withFieldTypes?: boolean;
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
export interface ICreateResolverContext {
|
|
471
|
+
type: `CREATE_RESOLVER_CONTEXT`;
|
|
472
|
+
plugin: IGatsbyPlugin;
|
|
473
|
+
traceId?: string;
|
|
474
|
+
payload: IGatsbyPluginContext | {
|
|
475
|
+
[camelCasedPluginNameWithoutPrefix: string]: IGatsbyPluginContext;
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
interface IClearSchemaCustomizationAction {
|
|
479
|
+
type: `CLEAR_SCHEMA_CUSTOMIZATION`;
|
|
480
|
+
}
|
|
481
|
+
interface ISetSchemaComposerAction {
|
|
482
|
+
type: `SET_SCHEMA_COMPOSER`;
|
|
483
|
+
payload: SchemaComposer<any>;
|
|
484
|
+
}
|
|
485
|
+
export interface ICreateServerVisitedPage {
|
|
486
|
+
type: `CREATE_SERVER_VISITED_PAGE`;
|
|
487
|
+
payload: IGatsbyPage;
|
|
488
|
+
plugin?: IGatsbyPlugin;
|
|
489
|
+
}
|
|
490
|
+
export interface ICreatePageAction {
|
|
491
|
+
type: `CREATE_PAGE`;
|
|
492
|
+
payload: IGatsbyPage;
|
|
493
|
+
plugin?: IGatsbyPlugin;
|
|
494
|
+
contextModified?: boolean;
|
|
495
|
+
}
|
|
496
|
+
export interface ICreateRedirectAction {
|
|
497
|
+
type: `CREATE_REDIRECT`;
|
|
498
|
+
payload: IRedirect;
|
|
499
|
+
}
|
|
500
|
+
export interface ISetResolvedThemesAction {
|
|
501
|
+
type: `SET_RESOLVED_THEMES`;
|
|
502
|
+
payload: any;
|
|
503
|
+
}
|
|
504
|
+
export interface IDeleteCacheAction {
|
|
505
|
+
type: `DELETE_CACHE`;
|
|
506
|
+
cacheIsCorrupt?: boolean;
|
|
507
|
+
}
|
|
508
|
+
export interface IRemovePageDataAction {
|
|
509
|
+
type: `REMOVE_PAGE_DATA`;
|
|
510
|
+
payload: {
|
|
511
|
+
id: Identifier;
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
export interface ISetPageDataAction {
|
|
515
|
+
type: `SET_PAGE_DATA`;
|
|
516
|
+
payload: {
|
|
517
|
+
id: Identifier;
|
|
518
|
+
resultHash: string;
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
export interface IRemoveTemplateComponentAction {
|
|
522
|
+
type: `REMOVE_STATIC_QUERIES_BY_TEMPLATE`;
|
|
523
|
+
payload: {
|
|
524
|
+
componentPath: string;
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
export interface ISetStaticQueriesByTemplateAction {
|
|
528
|
+
type: `SET_STATIC_QUERIES_BY_TEMPLATE`;
|
|
529
|
+
payload: {
|
|
530
|
+
componentPath: string;
|
|
531
|
+
staticQueryHashes: Array<Identifier>;
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
export interface IAddPendingPageDataWriteAction {
|
|
535
|
+
type: `ADD_PENDING_PAGE_DATA_WRITE`;
|
|
536
|
+
payload: {
|
|
537
|
+
path: string;
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
export interface IAddPendingTemplateDataWriteAction {
|
|
541
|
+
type: `ADD_PENDING_TEMPLATE_DATA_WRITE`;
|
|
542
|
+
payload: {
|
|
543
|
+
componentPath: SystemPath;
|
|
544
|
+
pages: Array<string>;
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
export interface IClearPendingPageDataWriteAction {
|
|
548
|
+
type: `CLEAR_PENDING_PAGE_DATA_WRITE`;
|
|
549
|
+
payload: {
|
|
550
|
+
page: string;
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
export interface IDeletePageAction {
|
|
554
|
+
type: `DELETE_PAGE`;
|
|
555
|
+
payload: IGatsbyPage;
|
|
556
|
+
}
|
|
557
|
+
export interface IReplaceStaticQueryAction {
|
|
558
|
+
type: `REPLACE_STATIC_QUERY`;
|
|
559
|
+
payload: IGatsbyStaticQueryComponents;
|
|
560
|
+
}
|
|
561
|
+
export interface IRemoveStaticQuery {
|
|
562
|
+
type: `REMOVE_STATIC_QUERY`;
|
|
563
|
+
payload: IGatsbyStaticQueryComponents["id"];
|
|
564
|
+
}
|
|
565
|
+
export interface ISetWebpackCompilationHashAction {
|
|
566
|
+
type: `SET_WEBPACK_COMPILATION_HASH`;
|
|
567
|
+
payload: IGatsbyState["webpackCompilationHash"];
|
|
568
|
+
}
|
|
569
|
+
export interface IUpdatePluginsHashAction {
|
|
570
|
+
type: `UPDATE_PLUGINS_HASH`;
|
|
571
|
+
payload: Identifier;
|
|
572
|
+
}
|
|
573
|
+
export interface ISetPluginStatusAction {
|
|
574
|
+
type: `SET_PLUGIN_STATUS`;
|
|
575
|
+
plugin: IGatsbyPlugin;
|
|
576
|
+
payload: {
|
|
577
|
+
[key: string]: any;
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
export interface IReplaceWebpackConfigAction {
|
|
581
|
+
type: `REPLACE_WEBPACK_CONFIG`;
|
|
582
|
+
payload: IGatsbyState["webpack"];
|
|
583
|
+
}
|
|
584
|
+
export interface ISetWebpackConfigAction {
|
|
585
|
+
type: `SET_WEBPACK_CONFIG`;
|
|
586
|
+
payload: Partial<IGatsbyState["webpack"]>;
|
|
587
|
+
}
|
|
588
|
+
export interface ISetSchemaAction {
|
|
589
|
+
type: `SET_SCHEMA`;
|
|
590
|
+
payload: IGatsbyState["schema"];
|
|
591
|
+
}
|
|
592
|
+
export interface ISetGraphQLDefinitionsAction {
|
|
593
|
+
type: `SET_GRAPHQL_DEFINITIONS`;
|
|
594
|
+
payload: IGatsbyState["definitions"];
|
|
595
|
+
}
|
|
596
|
+
export interface ISetSiteConfig {
|
|
597
|
+
type: `SET_SITE_CONFIG`;
|
|
598
|
+
payload: IGatsbyState["config"];
|
|
599
|
+
}
|
|
600
|
+
export interface ICreateNodeAction {
|
|
601
|
+
type: `CREATE_NODE`;
|
|
602
|
+
payload: IGatsbyNode;
|
|
603
|
+
oldNode?: IGatsbyNode;
|
|
604
|
+
}
|
|
605
|
+
export interface IAddFieldToNodeAction {
|
|
606
|
+
type: `ADD_FIELD_TO_NODE`;
|
|
607
|
+
payload: IGatsbyNode;
|
|
608
|
+
addedField: string;
|
|
609
|
+
}
|
|
610
|
+
export interface IAddChildNodeToParentNodeAction {
|
|
611
|
+
type: `ADD_CHILD_NODE_TO_PARENT_NODE`;
|
|
612
|
+
payload: IGatsbyNode;
|
|
613
|
+
}
|
|
614
|
+
export interface IDeleteNodeAction {
|
|
615
|
+
type: `DELETE_NODE`;
|
|
616
|
+
payload: IGatsbyNode | void;
|
|
617
|
+
}
|
|
618
|
+
export interface IDeleteNodesAction {
|
|
619
|
+
type: `DELETE_NODES`;
|
|
620
|
+
payload: Array<Identifier>;
|
|
621
|
+
fullNodes: Array<IGatsbyNode>;
|
|
622
|
+
}
|
|
623
|
+
export interface ISetSiteFlattenedPluginsAction {
|
|
624
|
+
type: `SET_SITE_FLATTENED_PLUGINS`;
|
|
625
|
+
payload: IGatsbyState["flattenedPlugins"];
|
|
626
|
+
}
|
|
627
|
+
export interface ISetResolvedNodesAction {
|
|
628
|
+
type: `SET_RESOLVED_NODES`;
|
|
629
|
+
payload: {
|
|
630
|
+
key: string;
|
|
631
|
+
nodes: IGatsbyState["resolvedNodesCache"];
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
export interface IAddPageDataStatsAction {
|
|
635
|
+
type: `ADD_PAGE_DATA_STATS`;
|
|
636
|
+
payload: {
|
|
637
|
+
filePath: SystemPath;
|
|
638
|
+
size: number;
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
export interface ITouchNodeAction {
|
|
642
|
+
type: `TOUCH_NODE`;
|
|
643
|
+
payload: Identifier;
|
|
644
|
+
}
|
|
645
|
+
interface IStartIncrementalInferenceAction {
|
|
646
|
+
type: `START_INCREMENTAL_INFERENCE`;
|
|
647
|
+
}
|
|
648
|
+
interface IBuildTypeMetadataAction {
|
|
649
|
+
type: `BUILD_TYPE_METADATA`;
|
|
650
|
+
payload: {
|
|
651
|
+
nodes: Array<IGatsbyNode>;
|
|
652
|
+
typeName: string;
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
interface IDisableTypeInferenceAction {
|
|
656
|
+
type: `DISABLE_TYPE_INFERENCE`;
|
|
657
|
+
payload: Array<string>;
|
|
658
|
+
}
|
|
659
|
+
interface ISetProgramAction {
|
|
660
|
+
type: `SET_PROGRAM`;
|
|
661
|
+
payload: IStateProgram;
|
|
662
|
+
}
|
|
663
|
+
interface ISetProgramExtensions {
|
|
664
|
+
type: `SET_PROGRAM_EXTENSIONS`;
|
|
665
|
+
payload: Array<string>;
|
|
666
|
+
}
|
|
667
|
+
export {};
|