@depup/gatsby 5.16.1-depup.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.
Files changed (1361) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +142 -0
  3. package/adapters.js +31 -0
  4. package/apis.json +73 -0
  5. package/cache-dir/.eslintrc.json +10 -0
  6. package/cache-dir/api-runner-browser-plugins.js +14 -0
  7. package/cache-dir/api-runner-browser.js +52 -0
  8. package/cache-dir/api-runner-ssr.js +88 -0
  9. package/cache-dir/api-ssr-docs.js +207 -0
  10. package/cache-dir/app.js +249 -0
  11. package/cache-dir/blank.css +0 -0
  12. package/cache-dir/commonjs/api-runner-browser-plugins.js +17 -0
  13. package/cache-dir/commonjs/api-runner-browser-plugins.js.map +1 -0
  14. package/cache-dir/commonjs/api-runner-browser.js +49 -0
  15. package/cache-dir/commonjs/api-runner-browser.js.map +1 -0
  16. package/cache-dir/commonjs/api-runner-ssr.js +88 -0
  17. package/cache-dir/commonjs/api-runner-ssr.js.map +1 -0
  18. package/cache-dir/commonjs/api-ssr-docs.js +210 -0
  19. package/cache-dir/commonjs/api-ssr-docs.js.map +1 -0
  20. package/cache-dir/commonjs/app.js +197 -0
  21. package/cache-dir/commonjs/app.js.map +1 -0
  22. package/cache-dir/commonjs/context-utils.js +25 -0
  23. package/cache-dir/commonjs/context-utils.js.map +1 -0
  24. package/cache-dir/commonjs/create-content-digest-browser-shim.js +4 -0
  25. package/cache-dir/commonjs/create-content-digest-browser-shim.js.map +1 -0
  26. package/cache-dir/commonjs/css-to-object.js +21 -0
  27. package/cache-dir/commonjs/css-to-object.js.map +1 -0
  28. package/cache-dir/commonjs/debug-log.js +11 -0
  29. package/cache-dir/commonjs/debug-log.js.map +1 -0
  30. package/cache-dir/commonjs/default-html.js +33 -0
  31. package/cache-dir/commonjs/default-html.js.map +1 -0
  32. package/cache-dir/commonjs/dev-loader.js +247 -0
  33. package/cache-dir/commonjs/dev-loader.js.map +1 -0
  34. package/cache-dir/commonjs/develop-static-entry.js +129 -0
  35. package/cache-dir/commonjs/develop-static-entry.js.map +1 -0
  36. package/cache-dir/commonjs/dummy.js +8 -0
  37. package/cache-dir/commonjs/dummy.js.map +1 -0
  38. package/cache-dir/commonjs/emitter.js +10 -0
  39. package/cache-dir/commonjs/emitter.js.map +1 -0
  40. package/cache-dir/commonjs/ensure-resources.js +107 -0
  41. package/cache-dir/commonjs/ensure-resources.js.map +1 -0
  42. package/cache-dir/commonjs/error-overlay-handler.js +35 -0
  43. package/cache-dir/commonjs/error-overlay-handler.js.map +1 -0
  44. package/cache-dir/commonjs/fast-refresh-overlay/components/accordion.js +80 -0
  45. package/cache-dir/commonjs/fast-refresh-overlay/components/accordion.js.map +1 -0
  46. package/cache-dir/commonjs/fast-refresh-overlay/components/build-error.js +44 -0
  47. package/cache-dir/commonjs/fast-refresh-overlay/components/build-error.js.map +1 -0
  48. package/cache-dir/commonjs/fast-refresh-overlay/components/code-frame.js +38 -0
  49. package/cache-dir/commonjs/fast-refresh-overlay/components/code-frame.js.map +1 -0
  50. package/cache-dir/commonjs/fast-refresh-overlay/components/dev-ssr-error.js +52 -0
  51. package/cache-dir/commonjs/fast-refresh-overlay/components/dev-ssr-error.js.map +1 -0
  52. package/cache-dir/commonjs/fast-refresh-overlay/components/error-boundary.js +31 -0
  53. package/cache-dir/commonjs/fast-refresh-overlay/components/error-boundary.js.map +1 -0
  54. package/cache-dir/commonjs/fast-refresh-overlay/components/getserverdata-error.js +47 -0
  55. package/cache-dir/commonjs/fast-refresh-overlay/components/getserverdata-error.js.map +1 -0
  56. package/cache-dir/commonjs/fast-refresh-overlay/components/graphql-errors.js +77 -0
  57. package/cache-dir/commonjs/fast-refresh-overlay/components/graphql-errors.js.map +1 -0
  58. package/cache-dir/commonjs/fast-refresh-overlay/components/hooks.js +93 -0
  59. package/cache-dir/commonjs/fast-refresh-overlay/components/hooks.js.map +1 -0
  60. package/cache-dir/commonjs/fast-refresh-overlay/components/overlay.js +147 -0
  61. package/cache-dir/commonjs/fast-refresh-overlay/components/overlay.js.map +1 -0
  62. package/cache-dir/commonjs/fast-refresh-overlay/components/runtime-errors.js +110 -0
  63. package/cache-dir/commonjs/fast-refresh-overlay/components/runtime-errors.js.map +1 -0
  64. package/cache-dir/commonjs/fast-refresh-overlay/components/use-id.js +50 -0
  65. package/cache-dir/commonjs/fast-refresh-overlay/components/use-id.js.map +1 -0
  66. package/cache-dir/commonjs/fast-refresh-overlay/helpers/focus-trap.js +2879 -0
  67. package/cache-dir/commonjs/fast-refresh-overlay/helpers/focus-trap.js.map +1 -0
  68. package/cache-dir/commonjs/fast-refresh-overlay/helpers/keys.js +84 -0
  69. package/cache-dir/commonjs/fast-refresh-overlay/helpers/keys.js.map +1 -0
  70. package/cache-dir/commonjs/fast-refresh-overlay/helpers/lock-body.js +48 -0
  71. package/cache-dir/commonjs/fast-refresh-overlay/helpers/lock-body.js.map +1 -0
  72. package/cache-dir/commonjs/fast-refresh-overlay/helpers/match.js +44 -0
  73. package/cache-dir/commonjs/fast-refresh-overlay/helpers/match.js.map +1 -0
  74. package/cache-dir/commonjs/fast-refresh-overlay/index.js +182 -0
  75. package/cache-dir/commonjs/fast-refresh-overlay/index.js.map +1 -0
  76. package/cache-dir/commonjs/fast-refresh-overlay/style.js +418 -0
  77. package/cache-dir/commonjs/fast-refresh-overlay/style.js.map +1 -0
  78. package/cache-dir/commonjs/fast-refresh-overlay/utils.js +75 -0
  79. package/cache-dir/commonjs/fast-refresh-overlay/utils.js.map +1 -0
  80. package/cache-dir/commonjs/find-path.js +145 -0
  81. package/cache-dir/commonjs/find-path.js.map +1 -0
  82. package/cache-dir/commonjs/gatsby-browser-entry.js +52 -0
  83. package/cache-dir/commonjs/gatsby-browser-entry.js.map +1 -0
  84. package/cache-dir/commonjs/head/components/fire-callback-in-effect.js +18 -0
  85. package/cache-dir/commonjs/head/components/fire-callback-in-effect.js.map +1 -0
  86. package/cache-dir/commonjs/head/components/head-components.js +72 -0
  87. package/cache-dir/commonjs/head/components/head-components.js.map +1 -0
  88. package/cache-dir/commonjs/head/constants.js +13 -0
  89. package/cache-dir/commonjs/head/constants.js.map +1 -0
  90. package/cache-dir/commonjs/head/head-export-handler-for-browser.js +144 -0
  91. package/cache-dir/commonjs/head/head-export-handler-for-browser.js.map +1 -0
  92. package/cache-dir/commonjs/head/head-export-handler-for-ssr.js +225 -0
  93. package/cache-dir/commonjs/head/head-export-handler-for-ssr.js.map +1 -0
  94. package/cache-dir/commonjs/head/utils.js +264 -0
  95. package/cache-dir/commonjs/head/utils.js.map +1 -0
  96. package/cache-dir/commonjs/loader.js +861 -0
  97. package/cache-dir/commonjs/loader.js.map +1 -0
  98. package/cache-dir/commonjs/loading-indicator/index.js +25 -0
  99. package/cache-dir/commonjs/loading-indicator/index.js.map +1 -0
  100. package/cache-dir/commonjs/loading-indicator/indicator.js +63 -0
  101. package/cache-dir/commonjs/loading-indicator/indicator.js.map +1 -0
  102. package/cache-dir/commonjs/loading-indicator/style.js +103 -0
  103. package/cache-dir/commonjs/loading-indicator/style.js.map +1 -0
  104. package/cache-dir/commonjs/navigation.js +260 -0
  105. package/cache-dir/commonjs/navigation.js.map +1 -0
  106. package/cache-dir/commonjs/normalize-page-path.js +22 -0
  107. package/cache-dir/commonjs/normalize-page-path.js.map +1 -0
  108. package/cache-dir/commonjs/page-renderer.js +59 -0
  109. package/cache-dir/commonjs/page-renderer.js.map +1 -0
  110. package/cache-dir/commonjs/pages.json +1 -0
  111. package/cache-dir/commonjs/polyfill-entry.js +7 -0
  112. package/cache-dir/commonjs/polyfill-entry.js.map +1 -0
  113. package/cache-dir/commonjs/prefetch.js +67 -0
  114. package/cache-dir/commonjs/prefetch.js.map +1 -0
  115. package/cache-dir/commonjs/production-app.js +256 -0
  116. package/cache-dir/commonjs/production-app.js.map +1 -0
  117. package/cache-dir/commonjs/public-page-renderer-dev.js +26 -0
  118. package/cache-dir/commonjs/public-page-renderer-dev.js.map +1 -0
  119. package/cache-dir/commonjs/public-page-renderer-prod.js +30 -0
  120. package/cache-dir/commonjs/public-page-renderer-prod.js.map +1 -0
  121. package/cache-dir/commonjs/public-page-renderer.js +11 -0
  122. package/cache-dir/commonjs/public-page-renderer.js.map +1 -0
  123. package/cache-dir/commonjs/query-result-store.js +160 -0
  124. package/cache-dir/commonjs/query-result-store.js.map +1 -0
  125. package/cache-dir/commonjs/react-dom-utils.js +34 -0
  126. package/cache-dir/commonjs/react-dom-utils.js.map +1 -0
  127. package/cache-dir/commonjs/react-lifecycles-compat.js +4 -0
  128. package/cache-dir/commonjs/react-lifecycles-compat.js.map +1 -0
  129. package/cache-dir/commonjs/redirect-utils.js +25 -0
  130. package/cache-dir/commonjs/redirect-utils.js.map +1 -0
  131. package/cache-dir/commonjs/redirects.json +1 -0
  132. package/cache-dir/commonjs/register-service-worker.js +66 -0
  133. package/cache-dir/commonjs/register-service-worker.js.map +1 -0
  134. package/cache-dir/commonjs/root.js +105 -0
  135. package/cache-dir/commonjs/root.js.map +1 -0
  136. package/cache-dir/commonjs/route-announcer-props.js +24 -0
  137. package/cache-dir/commonjs/route-announcer-props.js.map +1 -0
  138. package/cache-dir/commonjs/server-utils/writable-as-promise.js +42 -0
  139. package/cache-dir/commonjs/server-utils/writable-as-promise.js.map +1 -0
  140. package/cache-dir/commonjs/shadow-portal.js +36 -0
  141. package/cache-dir/commonjs/shadow-portal.js.map +1 -0
  142. package/cache-dir/commonjs/slice/context.js +15 -0
  143. package/cache-dir/commonjs/slice/context.js.map +1 -0
  144. package/cache-dir/commonjs/slice/inline-slice.js +34 -0
  145. package/cache-dir/commonjs/slice/inline-slice.js.map +1 -0
  146. package/cache-dir/commonjs/slice/server-slice-renderer.js +29 -0
  147. package/cache-dir/commonjs/slice/server-slice-renderer.js.map +1 -0
  148. package/cache-dir/commonjs/slice/server-slice.js +54 -0
  149. package/cache-dir/commonjs/slice/server-slice.js.map +1 -0
  150. package/cache-dir/commonjs/slice.js +124 -0
  151. package/cache-dir/commonjs/slice.js.map +1 -0
  152. package/cache-dir/commonjs/socketIo.js +62 -0
  153. package/cache-dir/commonjs/socketIo.js.map +1 -0
  154. package/cache-dir/commonjs/ssr-builtin-trackers/child_process.js +8 -0
  155. package/cache-dir/commonjs/ssr-builtin-trackers/child_process.js.map +1 -0
  156. package/cache-dir/commonjs/ssr-builtin-trackers/fs.js +7 -0
  157. package/cache-dir/commonjs/ssr-builtin-trackers/fs.js.map +1 -0
  158. package/cache-dir/commonjs/ssr-builtin-trackers/http.js +9 -0
  159. package/cache-dir/commonjs/ssr-builtin-trackers/http.js.map +1 -0
  160. package/cache-dir/commonjs/ssr-builtin-trackers/http2.js +7 -0
  161. package/cache-dir/commonjs/ssr-builtin-trackers/http2.js.map +1 -0
  162. package/cache-dir/commonjs/ssr-builtin-trackers/https.js +9 -0
  163. package/cache-dir/commonjs/ssr-builtin-trackers/https.js.map +1 -0
  164. package/cache-dir/commonjs/ssr-builtin-trackers/tracking-unsafe-module-wrapper.js +55 -0
  165. package/cache-dir/commonjs/ssr-builtin-trackers/tracking-unsafe-module-wrapper.js.map +1 -0
  166. package/cache-dir/commonjs/ssr-develop-static-entry.js +366 -0
  167. package/cache-dir/commonjs/ssr-develop-static-entry.js.map +1 -0
  168. package/cache-dir/commonjs/static-entry.js +544 -0
  169. package/cache-dir/commonjs/static-entry.js.map +1 -0
  170. package/cache-dir/commonjs/static-query.js +74 -0
  171. package/cache-dir/commonjs/static-query.js.map +1 -0
  172. package/cache-dir/commonjs/strip-prefix.js +22 -0
  173. package/cache-dir/commonjs/strip-prefix.js.map +1 -0
  174. package/cache-dir/context-utils.js +29 -0
  175. package/cache-dir/create-content-digest-browser-shim.js +1 -0
  176. package/cache-dir/css-to-object.js +19 -0
  177. package/cache-dir/debug-log.js +13 -0
  178. package/cache-dir/default-html.js +36 -0
  179. package/cache-dir/dev-loader.js +280 -0
  180. package/cache-dir/develop-static-entry.js +129 -0
  181. package/cache-dir/dummy.js +2 -0
  182. package/cache-dir/emitter.js +4 -0
  183. package/cache-dir/ensure-resources.js +119 -0
  184. package/cache-dir/error-overlay-handler.js +36 -0
  185. package/cache-dir/fast-refresh-overlay/components/accordion.js +83 -0
  186. package/cache-dir/fast-refresh-overlay/components/build-error.js +46 -0
  187. package/cache-dir/fast-refresh-overlay/components/code-frame.js +38 -0
  188. package/cache-dir/fast-refresh-overlay/components/dev-ssr-error.js +66 -0
  189. package/cache-dir/fast-refresh-overlay/components/error-boundary.js +28 -0
  190. package/cache-dir/fast-refresh-overlay/components/getserverdata-error.js +53 -0
  191. package/cache-dir/fast-refresh-overlay/components/graphql-errors.js +100 -0
  192. package/cache-dir/fast-refresh-overlay/components/hooks.js +102 -0
  193. package/cache-dir/fast-refresh-overlay/components/overlay.js +143 -0
  194. package/cache-dir/fast-refresh-overlay/components/runtime-errors.js +139 -0
  195. package/cache-dir/fast-refresh-overlay/components/use-id.js +56 -0
  196. package/cache-dir/fast-refresh-overlay/helpers/focus-trap.js +3561 -0
  197. package/cache-dir/fast-refresh-overlay/helpers/keys.js +80 -0
  198. package/cache-dir/fast-refresh-overlay/helpers/lock-body.js +52 -0
  199. package/cache-dir/fast-refresh-overlay/helpers/match.js +42 -0
  200. package/cache-dir/fast-refresh-overlay/index.js +147 -0
  201. package/cache-dir/fast-refresh-overlay/style.js +413 -0
  202. package/cache-dir/fast-refresh-overlay/utils.js +81 -0
  203. package/cache-dir/find-path.js +160 -0
  204. package/cache-dir/gatsby-browser-entry.js +27 -0
  205. package/cache-dir/head/components/fire-callback-in-effect.js +12 -0
  206. package/cache-dir/head/components/head-components.js +86 -0
  207. package/cache-dir/head/constants.js +15 -0
  208. package/cache-dir/head/head-export-handler-for-browser.js +170 -0
  209. package/cache-dir/head/head-export-handler-for-ssr.js +237 -0
  210. package/cache-dir/head/utils.js +287 -0
  211. package/cache-dir/loader.js +977 -0
  212. package/cache-dir/loading-indicator/index.js +19 -0
  213. package/cache-dir/loading-indicator/indicator.js +65 -0
  214. package/cache-dir/loading-indicator/style.js +99 -0
  215. package/cache-dir/navigation.js +257 -0
  216. package/cache-dir/normalize-page-path.js +17 -0
  217. package/cache-dir/page-renderer.js +59 -0
  218. package/cache-dir/page-ssr/index.d.ts +76 -0
  219. package/cache-dir/pages.json +1 -0
  220. package/cache-dir/polyfill-entry.js +5 -0
  221. package/cache-dir/prefetch.js +80 -0
  222. package/cache-dir/production-app.js +340 -0
  223. package/cache-dir/public-page-renderer-dev.js +21 -0
  224. package/cache-dir/public-page-renderer-prod.js +25 -0
  225. package/cache-dir/public-page-renderer.js +9 -0
  226. package/cache-dir/query-engine/index.d.ts +31 -0
  227. package/cache-dir/query-result-store.js +197 -0
  228. package/cache-dir/react-dom-utils.js +38 -0
  229. package/cache-dir/react-lifecycles-compat.js +1 -0
  230. package/cache-dir/redirect-utils.js +22 -0
  231. package/cache-dir/redirects.json +1 -0
  232. package/cache-dir/register-service-worker.js +64 -0
  233. package/cache-dir/root.js +147 -0
  234. package/cache-dir/route-announcer-props.js +18 -0
  235. package/cache-dir/server-utils/writable-as-promise.js +41 -0
  236. package/cache-dir/shadow-portal.js +28 -0
  237. package/cache-dir/slice/context.js +13 -0
  238. package/cache-dir/slice/inline-slice.js +34 -0
  239. package/cache-dir/slice/server-slice-renderer.js +28 -0
  240. package/cache-dir/slice/server-slice.js +52 -0
  241. package/cache-dir/slice.js +158 -0
  242. package/cache-dir/socketIo.js +58 -0
  243. package/cache-dir/ssr-builtin-trackers/child_process.js +4 -0
  244. package/cache-dir/ssr-builtin-trackers/fs.js +3 -0
  245. package/cache-dir/ssr-builtin-trackers/http.js +3 -0
  246. package/cache-dir/ssr-builtin-trackers/http2.js +3 -0
  247. package/cache-dir/ssr-builtin-trackers/https.js +3 -0
  248. package/cache-dir/ssr-builtin-trackers/tracking-unsafe-module-wrapper.js +64 -0
  249. package/cache-dir/ssr-develop-static-entry.js +428 -0
  250. package/cache-dir/static-entry.js +594 -0
  251. package/cache-dir/static-query.js +91 -0
  252. package/cache-dir/strip-prefix.js +20 -0
  253. package/changes.json +454 -0
  254. package/cli.js +3 -0
  255. package/dist/bin/gatsby.js +5 -0
  256. package/dist/bin/gatsby.js.map +1 -0
  257. package/dist/bootstrap/__mocks__/get-config/ts/gatsby-config.d.ts +3 -0
  258. package/dist/bootstrap/__mocks__/resolve-module-exports.d.ts +1 -0
  259. package/dist/bootstrap/create-graphql-runner.d.ts +10 -0
  260. package/dist/bootstrap/create-graphql-runner.js +71 -0
  261. package/dist/bootstrap/create-graphql-runner.js.map +1 -0
  262. package/dist/bootstrap/get-config-file.d.ts +4 -0
  263. package/dist/bootstrap/get-config-file.js +152 -0
  264. package/dist/bootstrap/get-config-file.js.map +1 -0
  265. package/dist/bootstrap/index.d.ts +12 -0
  266. package/dist/bootstrap/index.js +56 -0
  267. package/dist/bootstrap/index.js.map +1 -0
  268. package/dist/bootstrap/load-config/index.d.ts +7 -0
  269. package/dist/bootstrap/load-config/index.js +73 -0
  270. package/dist/bootstrap/load-config/index.js.map +1 -0
  271. package/dist/bootstrap/load-plugins/index.d.ts +3 -0
  272. package/dist/bootstrap/load-plugins/index.js +79 -0
  273. package/dist/bootstrap/load-plugins/index.js.map +1 -0
  274. package/dist/bootstrap/load-plugins/load-internal-plugins.d.ts +2 -0
  275. package/dist/bootstrap/load-plugins/load-internal-plugins.js +105 -0
  276. package/dist/bootstrap/load-plugins/load-internal-plugins.js.map +1 -0
  277. package/dist/bootstrap/load-plugins/process-plugin.d.ts +2 -0
  278. package/dist/bootstrap/load-plugins/process-plugin.js +81 -0
  279. package/dist/bootstrap/load-plugins/process-plugin.js.map +1 -0
  280. package/dist/bootstrap/load-plugins/resolve-plugin.d.ts +13 -0
  281. package/dist/bootstrap/load-plugins/resolve-plugin.js +75 -0
  282. package/dist/bootstrap/load-plugins/resolve-plugin.js.map +1 -0
  283. package/dist/bootstrap/load-plugins/types.d.ts +48 -0
  284. package/dist/bootstrap/load-plugins/types.js +4 -0
  285. package/dist/bootstrap/load-plugins/types.js.map +1 -0
  286. package/dist/bootstrap/load-plugins/utils/check-local-plugin.d.ts +8 -0
  287. package/dist/bootstrap/load-plugins/utils/check-local-plugin.js +38 -0
  288. package/dist/bootstrap/load-plugins/utils/check-local-plugin.js.map +1 -0
  289. package/dist/bootstrap/load-plugins/utils/create-hash.d.ts +1 -0
  290. package/dist/bootstrap/load-plugins/utils/create-hash.js +20 -0
  291. package/dist/bootstrap/load-plugins/utils/create-hash.js.map +1 -0
  292. package/dist/bootstrap/load-plugins/utils/create-id.d.ts +10 -0
  293. package/dist/bootstrap/load-plugins/utils/create-id.js +16 -0
  294. package/dist/bootstrap/load-plugins/utils/create-id.js.map +1 -0
  295. package/dist/bootstrap/load-plugins/utils/flatten-plugins.d.ts +2 -0
  296. package/dist/bootstrap/load-plugins/utils/flatten-plugins.js +41 -0
  297. package/dist/bootstrap/load-plugins/utils/flatten-plugins.js.map +1 -0
  298. package/dist/bootstrap/load-plugins/utils/get-api.d.ts +12 -0
  299. package/dist/bootstrap/load-plugins/utils/get-api.js +12 -0
  300. package/dist/bootstrap/load-plugins/utils/get-api.js.map +1 -0
  301. package/dist/bootstrap/load-plugins/utils/normalize.d.ts +5 -0
  302. package/dist/bootstrap/load-plugins/utils/normalize.js +33 -0
  303. package/dist/bootstrap/load-plugins/utils/normalize.js.map +1 -0
  304. package/dist/bootstrap/load-plugins/validate.d.ts +41 -0
  305. package/dist/bootstrap/load-plugins/validate.js +369 -0
  306. package/dist/bootstrap/load-plugins/validate.js.map +1 -0
  307. package/dist/bootstrap/load-themes/index.d.ts +17 -0
  308. package/dist/bootstrap/load-themes/index.js +186 -0
  309. package/dist/bootstrap/load-themes/index.js.map +1 -0
  310. package/dist/bootstrap/log-line-function.d.ts +0 -0
  311. package/dist/bootstrap/log-line-function.js +19 -0
  312. package/dist/bootstrap/log-line-function.js.map +1 -0
  313. package/dist/bootstrap/prefer-default.d.ts +1 -0
  314. package/dist/bootstrap/prefer-default.js +7 -0
  315. package/dist/bootstrap/prefer-default.js.map +1 -0
  316. package/dist/bootstrap/redirects-writer.d.ts +2 -0
  317. package/dist/bootstrap/redirects-writer.js +59 -0
  318. package/dist/bootstrap/redirects-writer.js.map +1 -0
  319. package/dist/bootstrap/remove-stale-jobs.d.ts +2 -0
  320. package/dist/bootstrap/remove-stale-jobs.js +31 -0
  321. package/dist/bootstrap/remove-stale-jobs.js.map +1 -0
  322. package/dist/bootstrap/requires-writer.d.ts +11 -0
  323. package/dist/bootstrap/requires-writer.js +260 -0
  324. package/dist/bootstrap/requires-writer.js.map +1 -0
  325. package/dist/bootstrap/resolve-js-file-path.d.ts +14 -0
  326. package/dist/bootstrap/resolve-js-file-path.js +58 -0
  327. package/dist/bootstrap/resolve-js-file-path.js.map +1 -0
  328. package/dist/bootstrap/resolve-module-exports.d.ts +20 -0
  329. package/dist/bootstrap/resolve-module-exports.js +188 -0
  330. package/dist/bootstrap/resolve-module-exports.js.map +1 -0
  331. package/dist/bootstrap/schema-hot-reloader.d.ts +3 -0
  332. package/dist/bootstrap/schema-hot-reloader.js +60 -0
  333. package/dist/bootstrap/schema-hot-reloader.js.map +1 -0
  334. package/dist/cache/cache-fs.d.ts +1 -0
  335. package/dist/cache/cache-fs.js +270 -0
  336. package/dist/cache/cache-fs.js.map +1 -0
  337. package/dist/cache/json-file-store.d.ts +8 -0
  338. package/dist/cache/json-file-store.js +144 -0
  339. package/dist/cache/json-file-store.js.map +1 -0
  340. package/dist/cache/wrap-callback.d.ts +0 -0
  341. package/dist/cache/wrap-callback.js +49 -0
  342. package/dist/cache/wrap-callback.js.map +1 -0
  343. package/dist/commands/build-html.d.ts +69 -0
  344. package/dist/commands/build-html.js +652 -0
  345. package/dist/commands/build-html.js.map +1 -0
  346. package/dist/commands/build-javascript.d.ts +4 -0
  347. package/dist/commands/build-javascript.js +18 -0
  348. package/dist/commands/build-javascript.js.map +1 -0
  349. package/dist/commands/build-utils.d.ts +8 -0
  350. package/dist/commands/build-utils.js +186 -0
  351. package/dist/commands/build-utils.js.map +1 -0
  352. package/dist/commands/build.d.ts +1 -0
  353. package/dist/commands/build.js +505 -0
  354. package/dist/commands/build.js.map +1 -0
  355. package/dist/commands/clean.d.ts +1 -0
  356. package/dist/commands/clean.js +29 -0
  357. package/dist/commands/clean.js.map +1 -0
  358. package/dist/commands/develop-process.d.ts +1 -0
  359. package/dist/commands/develop-process.js +120 -0
  360. package/dist/commands/develop-process.js.map +1 -0
  361. package/dist/commands/develop-static.d.ts +3 -0
  362. package/dist/commands/develop-static.js +22 -0
  363. package/dist/commands/develop-static.js.map +1 -0
  364. package/dist/commands/develop.d.ts +2 -0
  365. package/dist/commands/develop.js +273 -0
  366. package/dist/commands/develop.js.map +1 -0
  367. package/dist/commands/feedback.d.ts +1 -0
  368. package/dist/commands/feedback.js +17 -0
  369. package/dist/commands/feedback.js.map +1 -0
  370. package/dist/commands/repl.d.ts +1 -0
  371. package/dist/commands/repl.js +58 -0
  372. package/dist/commands/repl.js.map +1 -0
  373. package/dist/commands/serve.d.ts +1 -0
  374. package/dist/commands/serve.js +282 -0
  375. package/dist/commands/serve.js.map +1 -0
  376. package/dist/commands/types.d.ts +54 -0
  377. package/dist/commands/types.js +23 -0
  378. package/dist/commands/types.js.map +1 -0
  379. package/dist/constants.d.ts +1 -0
  380. package/dist/constants.js +7 -0
  381. package/dist/constants.js.map +1 -0
  382. package/dist/datastore/common/iterable.d.ts +51 -0
  383. package/dist/datastore/common/iterable.js +217 -0
  384. package/dist/datastore/common/iterable.js.map +1 -0
  385. package/dist/datastore/common/query.d.ts +69 -0
  386. package/dist/datastore/common/query.js +219 -0
  387. package/dist/datastore/common/query.js.map +1 -0
  388. package/dist/datastore/datastore.d.ts +2 -0
  389. package/dist/datastore/datastore.js +23 -0
  390. package/dist/datastore/datastore.js.map +1 -0
  391. package/dist/datastore/in-memory/in-memory-datastore.d.ts +2 -0
  392. package/dist/datastore/in-memory/in-memory-datastore.js +75 -0
  393. package/dist/datastore/in-memory/in-memory-datastore.js.map +1 -0
  394. package/dist/datastore/in-memory/indexing.d.ts +80 -0
  395. package/dist/datastore/in-memory/indexing.js +994 -0
  396. package/dist/datastore/in-memory/indexing.js.map +1 -0
  397. package/dist/datastore/in-memory/run-fast-filters.d.ts +27 -0
  398. package/dist/datastore/in-memory/run-fast-filters.js +276 -0
  399. package/dist/datastore/in-memory/run-fast-filters.js.map +1 -0
  400. package/dist/datastore/index.d.ts +20 -0
  401. package/dist/datastore/index.js +34 -0
  402. package/dist/datastore/index.js.map +1 -0
  403. package/dist/datastore/lmdb/lmdb-datastore.d.ts +14 -0
  404. package/dist/datastore/lmdb/lmdb-datastore.js +261 -0
  405. package/dist/datastore/lmdb/lmdb-datastore.js.map +1 -0
  406. package/dist/datastore/lmdb/query/common.d.ts +23 -0
  407. package/dist/datastore/lmdb/query/common.js +127 -0
  408. package/dist/datastore/lmdb/query/common.js.map +1 -0
  409. package/dist/datastore/lmdb/query/create-index.d.ts +25 -0
  410. package/dist/datastore/lmdb/query/create-index.js +239 -0
  411. package/dist/datastore/lmdb/query/create-index.js.map +1 -0
  412. package/dist/datastore/lmdb/query/filter-using-index.d.ts +43 -0
  413. package/dist/datastore/lmdb/query/filter-using-index.js +577 -0
  414. package/dist/datastore/lmdb/query/filter-using-index.js.map +1 -0
  415. package/dist/datastore/lmdb/query/run-query.d.ts +9 -0
  416. package/dist/datastore/lmdb/query/run-query.js +285 -0
  417. package/dist/datastore/lmdb/query/run-query.js.map +1 -0
  418. package/dist/datastore/lmdb/query/suggest-index.d.ts +15 -0
  419. package/dist/datastore/lmdb/query/suggest-index.js +93 -0
  420. package/dist/datastore/lmdb/query/suggest-index.js.map +1 -0
  421. package/dist/datastore/lmdb/updates/nodes-by-type.d.ts +3 -0
  422. package/dist/datastore/lmdb/updates/nodes-by-type.js +21 -0
  423. package/dist/datastore/lmdb/updates/nodes-by-type.js.map +1 -0
  424. package/dist/datastore/lmdb/updates/nodes.d.ts +5 -0
  425. package/dist/datastore/lmdb/updates/nodes.js +33 -0
  426. package/dist/datastore/lmdb/updates/nodes.js.map +1 -0
  427. package/dist/datastore/types.d.ts +47 -0
  428. package/dist/datastore/types.js +4 -0
  429. package/dist/datastore/types.js.map +1 -0
  430. package/dist/internal-plugins/bundle-optimisations/gatsby-node.js +42 -0
  431. package/dist/internal-plugins/bundle-optimisations/gatsby-node.js.map +1 -0
  432. package/dist/internal-plugins/bundle-optimisations/index.js +3 -0
  433. package/dist/internal-plugins/bundle-optimisations/index.js.map +1 -0
  434. package/dist/internal-plugins/bundle-optimisations/package.json +10 -0
  435. package/dist/internal-plugins/bundle-optimisations/polyfills/fetch.js +4 -0
  436. package/dist/internal-plugins/bundle-optimisations/polyfills/fetch.js.map +1 -0
  437. package/dist/internal-plugins/bundle-optimisations/polyfills/no-op.js +3 -0
  438. package/dist/internal-plugins/bundle-optimisations/polyfills/no-op.js.map +1 -0
  439. package/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js +4 -0
  440. package/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js.map +1 -0
  441. package/dist/internal-plugins/bundle-optimisations/polyfills/whatwg-fetch.js +6 -0
  442. package/dist/internal-plugins/bundle-optimisations/polyfills/whatwg-fetch.js.map +1 -0
  443. package/dist/internal-plugins/dev-404-page/gatsby-node.js +30 -0
  444. package/dist/internal-plugins/dev-404-page/gatsby-node.js.map +1 -0
  445. package/dist/internal-plugins/dev-404-page/index.js +3 -0
  446. package/dist/internal-plugins/dev-404-page/index.js.map +1 -0
  447. package/dist/internal-plugins/dev-404-page/package.json +11 -0
  448. package/dist/internal-plugins/dev-404-page/raw_dev-404-page.js +262 -0
  449. package/dist/internal-plugins/functions/api-function-webpack-loader.d.ts +3 -0
  450. package/dist/internal-plugins/functions/api-function-webpack-loader.js +74 -0
  451. package/dist/internal-plugins/functions/api-function-webpack-loader.js.map +1 -0
  452. package/dist/internal-plugins/functions/config.d.ts +20 -0
  453. package/dist/internal-plugins/functions/config.js +96 -0
  454. package/dist/internal-plugins/functions/config.js.map +1 -0
  455. package/dist/internal-plugins/functions/gatsby-node.d.ts +3 -0
  456. package/dist/internal-plugins/functions/gatsby-node.js +452 -0
  457. package/dist/internal-plugins/functions/gatsby-node.js.map +1 -0
  458. package/dist/internal-plugins/functions/index.js +3 -0
  459. package/dist/internal-plugins/functions/index.js.map +1 -0
  460. package/dist/internal-plugins/functions/middleware.d.ts +11 -0
  461. package/dist/internal-plugins/functions/middleware.js +160 -0
  462. package/dist/internal-plugins/functions/middleware.js.map +1 -0
  463. package/dist/internal-plugins/functions/package.json +11 -0
  464. package/dist/internal-plugins/internal-data-bridge/gatsby-node.js +191 -0
  465. package/dist/internal-plugins/internal-data-bridge/gatsby-node.js.map +1 -0
  466. package/dist/internal-plugins/internal-data-bridge/index.js +3 -0
  467. package/dist/internal-plugins/internal-data-bridge/index.js.map +1 -0
  468. package/dist/internal-plugins/internal-data-bridge/package.json +11 -0
  469. package/dist/internal-plugins/load-babel-config/gatsby-node.js +37 -0
  470. package/dist/internal-plugins/load-babel-config/gatsby-node.js.map +1 -0
  471. package/dist/internal-plugins/load-babel-config/index.js +3 -0
  472. package/dist/internal-plugins/load-babel-config/index.js.map +1 -0
  473. package/dist/internal-plugins/load-babel-config/package.json +11 -0
  474. package/dist/internal-plugins/partytown/gatsby-browser.js +23 -0
  475. package/dist/internal-plugins/partytown/gatsby-browser.js.map +1 -0
  476. package/dist/internal-plugins/partytown/gatsby-node.d.ts +2 -0
  477. package/dist/internal-plugins/partytown/gatsby-node.js +60 -0
  478. package/dist/internal-plugins/partytown/gatsby-node.js.map +1 -0
  479. package/dist/internal-plugins/partytown/gatsby-ssr.js +39 -0
  480. package/dist/internal-plugins/partytown/gatsby-ssr.js.map +1 -0
  481. package/dist/internal-plugins/partytown/index.js +3 -0
  482. package/dist/internal-plugins/partytown/index.js.map +1 -0
  483. package/dist/internal-plugins/partytown/package.json +12 -0
  484. package/dist/internal-plugins/partytown/proxy.d.ts +3 -0
  485. package/dist/internal-plugins/partytown/proxy.js +26 -0
  486. package/dist/internal-plugins/partytown/proxy.js.map +1 -0
  487. package/dist/internal-plugins/partytown/utils/get-forwards.d.ts +2 -0
  488. package/dist/internal-plugins/partytown/utils/get-forwards.js +8 -0
  489. package/dist/internal-plugins/partytown/utils/get-forwards.js.map +1 -0
  490. package/dist/internal-plugins/partytown/utils/inject-partytown-snippet.d.ts +2 -0
  491. package/dist/internal-plugins/partytown/utils/inject-partytown-snippet.js +28 -0
  492. package/dist/internal-plugins/partytown/utils/inject-partytown-snippet.js.map +1 -0
  493. package/dist/internal-plugins/prod-404-500/gatsby-node.js +50 -0
  494. package/dist/internal-plugins/prod-404-500/gatsby-node.js.map +1 -0
  495. package/dist/internal-plugins/prod-404-500/index.js +3 -0
  496. package/dist/internal-plugins/prod-404-500/index.js.map +1 -0
  497. package/dist/internal-plugins/prod-404-500/package.json +11 -0
  498. package/dist/internal-plugins/webpack-theme-component-shadowing/create-page.js +31 -0
  499. package/dist/internal-plugins/webpack-theme-component-shadowing/create-page.js.map +1 -0
  500. package/dist/internal-plugins/webpack-theme-component-shadowing/gatsby-node.js +31 -0
  501. package/dist/internal-plugins/webpack-theme-component-shadowing/gatsby-node.js.map +1 -0
  502. package/dist/internal-plugins/webpack-theme-component-shadowing/index.js +273 -0
  503. package/dist/internal-plugins/webpack-theme-component-shadowing/index.js.map +1 -0
  504. package/dist/internal-plugins/webpack-theme-component-shadowing/package.json +11 -0
  505. package/dist/internal.d.ts +5 -0
  506. package/dist/internal.js +34 -0
  507. package/dist/internal.js.map +1 -0
  508. package/dist/joi-schemas/joi.d.ts +5 -0
  509. package/dist/joi-schemas/joi.js +122 -0
  510. package/dist/joi-schemas/joi.js.map +1 -0
  511. package/dist/query/error-parser.d.ts +19 -0
  512. package/dist/query/error-parser.js +163 -0
  513. package/dist/query/error-parser.js.map +1 -0
  514. package/dist/query/file-parser.js +584 -0
  515. package/dist/query/file-parser.js.map +1 -0
  516. package/dist/query/graphql-errors-codeframe.d.ts +1 -0
  517. package/dist/query/graphql-errors-codeframe.js +20 -0
  518. package/dist/query/graphql-errors-codeframe.js.map +1 -0
  519. package/dist/query/graphql-errors.js +278 -0
  520. package/dist/query/graphql-errors.js.map +1 -0
  521. package/dist/query/graphql-runner.d.ts +39 -0
  522. package/dist/query/graphql-runner.js +221 -0
  523. package/dist/query/graphql-runner.js.map +1 -0
  524. package/dist/query/graphql-span-tracer.d.ts +19 -0
  525. package/dist/query/graphql-span-tracer.js +63 -0
  526. package/dist/query/graphql-span-tracer.js.map +1 -0
  527. package/dist/query/index.d.ts +32 -0
  528. package/dist/query/index.js +301 -0
  529. package/dist/query/index.js.map +1 -0
  530. package/dist/query/query-compiler.js +433 -0
  531. package/dist/query/query-compiler.js.map +1 -0
  532. package/dist/query/query-runner.d.ts +13 -0
  533. package/dist/query/query-runner.js +176 -0
  534. package/dist/query/query-runner.js.map +1 -0
  535. package/dist/query/query-watcher.d.ts +17 -0
  536. package/dist/query/query-watcher.js +250 -0
  537. package/dist/query/query-watcher.js.map +1 -0
  538. package/dist/query/transform-document.d.ts +6 -0
  539. package/dist/query/transform-document.js +131 -0
  540. package/dist/query/transform-document.js.map +1 -0
  541. package/dist/query/types.d.ts +35 -0
  542. package/dist/query/types.js +4 -0
  543. package/dist/query/types.js.map +1 -0
  544. package/dist/query/utils.d.ts +4 -0
  545. package/dist/query/utils.js +20 -0
  546. package/dist/query/utils.js.map +1 -0
  547. package/dist/redux/actions/add-page-dependency.d.ts +7 -0
  548. package/dist/redux/actions/add-page-dependency.js +52 -0
  549. package/dist/redux/actions/add-page-dependency.js.map +1 -0
  550. package/dist/redux/actions/index.d.ts +16 -0
  551. package/dist/redux/actions/index.js +21 -0
  552. package/dist/redux/actions/index.js.map +1 -0
  553. package/dist/redux/actions/internal.d.ts +124 -0
  554. package/dist/redux/actions/internal.js +394 -0
  555. package/dist/redux/actions/internal.js.map +1 -0
  556. package/dist/redux/actions/public.js +1354 -0
  557. package/dist/redux/actions/public.js.map +1 -0
  558. package/dist/redux/actions/restricted.d.ts +332 -0
  559. package/dist/redux/actions/restricted.js +521 -0
  560. package/dist/redux/actions/restricted.js.map +1 -0
  561. package/dist/redux/index.d.ts +20 -0
  562. package/dist/redux/index.js +125 -0
  563. package/dist/redux/index.js.map +1 -0
  564. package/dist/redux/persist.d.ts +5 -0
  565. package/dist/redux/persist.js +191 -0
  566. package/dist/redux/persist.js.map +1 -0
  567. package/dist/redux/plugin-runner.d.ts +1 -0
  568. package/dist/redux/plugin-runner.js +45 -0
  569. package/dist/redux/plugin-runner.js.map +1 -0
  570. package/dist/redux/reducers/adapter.d.ts +6 -0
  571. package/dist/redux/reducers/adapter.js +22 -0
  572. package/dist/redux/reducers/adapter.js.map +1 -0
  573. package/dist/redux/reducers/babelrc.d.ts +9 -0
  574. package/dist/redux/reducers/babelrc.js +104 -0
  575. package/dist/redux/reducers/babelrc.js.map +1 -0
  576. package/dist/redux/reducers/components-using-slices.d.ts +2 -0
  577. package/dist/redux/reducers/components-using-slices.js +15 -0
  578. package/dist/redux/reducers/components-using-slices.js.map +1 -0
  579. package/dist/redux/reducers/components.d.ts +2 -0
  580. package/dist/redux/reducers/components.js +104 -0
  581. package/dist/redux/reducers/components.js.map +1 -0
  582. package/dist/redux/reducers/config.d.ts +2 -0
  583. package/dist/redux/reducers/config.js +16 -0
  584. package/dist/redux/reducers/config.js.map +1 -0
  585. package/dist/redux/reducers/definitions.d.ts +2 -0
  586. package/dist/redux/reducers/definitions.js +14 -0
  587. package/dist/redux/reducers/definitions.js.map +1 -0
  588. package/dist/redux/reducers/flattened-plugins.d.ts +17 -0
  589. package/dist/redux/reducers/flattened-plugins.js +14 -0
  590. package/dist/redux/reducers/flattened-plugins.js.map +1 -0
  591. package/dist/redux/reducers/functions.d.ts +2 -0
  592. package/dist/redux/reducers/functions.js +14 -0
  593. package/dist/redux/reducers/functions.js.map +1 -0
  594. package/dist/redux/reducers/html.d.ts +25 -0
  595. package/dist/redux/reducers/html.js +384 -0
  596. package/dist/redux/reducers/html.js.map +1 -0
  597. package/dist/redux/reducers/index.d.ts +45 -0
  598. package/dist/redux/reducers/index.js +86 -0
  599. package/dist/redux/reducers/index.js.map +1 -0
  600. package/dist/redux/reducers/inference-metadata.d.ts +7 -0
  601. package/dist/redux/reducers/inference-metadata.js +174 -0
  602. package/dist/redux/reducers/inference-metadata.js.map +1 -0
  603. package/dist/redux/reducers/jobs.d.ts +5 -0
  604. package/dist/redux/reducers/jobs.js +65 -0
  605. package/dist/redux/reducers/jobs.js.map +1 -0
  606. package/dist/redux/reducers/jobsv2.d.ts +6 -0
  607. package/dist/redux/reducers/jobsv2.js +88 -0
  608. package/dist/redux/reducers/jobsv2.js.map +1 -0
  609. package/dist/redux/reducers/last-action.d.ts +2 -0
  610. package/dist/redux/reducers/last-action.js +7 -0
  611. package/dist/redux/reducers/last-action.js.map +1 -0
  612. package/dist/redux/reducers/node-manifest.d.ts +2 -0
  613. package/dist/redux/reducers/node-manifest.js +58 -0
  614. package/dist/redux/reducers/node-manifest.js.map +1 -0
  615. package/dist/redux/reducers/nodes-by-type.d.ts +2 -0
  616. package/dist/redux/reducers/nodes-by-type.js +53 -0
  617. package/dist/redux/reducers/nodes-by-type.js.map +1 -0
  618. package/dist/redux/reducers/nodes-touched.d.ts +3 -0
  619. package/dist/redux/reducers/nodes-touched.js +18 -0
  620. package/dist/redux/reducers/nodes-touched.js.map +1 -0
  621. package/dist/redux/reducers/nodes.d.ts +2 -0
  622. package/dist/redux/reducers/nodes.js +30 -0
  623. package/dist/redux/reducers/nodes.js.map +1 -0
  624. package/dist/redux/reducers/page-data-stats.d.ts +2 -0
  625. package/dist/redux/reducers/page-data-stats.js +15 -0
  626. package/dist/redux/reducers/page-data-stats.js.map +1 -0
  627. package/dist/redux/reducers/pages.d.ts +2 -0
  628. package/dist/redux/reducers/pages.js +43 -0
  629. package/dist/redux/reducers/pages.js.map +1 -0
  630. package/dist/redux/reducers/pending-page-data-writes.d.ts +5 -0
  631. package/dist/redux/reducers/pending-page-data-writes.js +66 -0
  632. package/dist/redux/reducers/pending-page-data-writes.js.map +1 -0
  633. package/dist/redux/reducers/program.d.ts +2 -0
  634. package/dist/redux/reducers/program.js +62 -0
  635. package/dist/redux/reducers/program.js.map +1 -0
  636. package/dist/redux/reducers/queries.d.ts +26 -0
  637. package/dist/redux/reducers/queries.js +403 -0
  638. package/dist/redux/reducers/queries.js.map +1 -0
  639. package/dist/redux/reducers/redirects.d.ts +2 -0
  640. package/dist/redux/reducers/redirects.js +39 -0
  641. package/dist/redux/reducers/redirects.js.map +1 -0
  642. package/dist/redux/reducers/remote-file-allowed-urls.d.ts +2 -0
  643. package/dist/redux/reducers/remote-file-allowed-urls.js +19 -0
  644. package/dist/redux/reducers/remote-file-allowed-urls.js.map +1 -0
  645. package/dist/redux/reducers/resolved-nodes.d.ts +2 -0
  646. package/dist/redux/reducers/resolved-nodes.js +45 -0
  647. package/dist/redux/reducers/resolved-nodes.js.map +1 -0
  648. package/dist/redux/reducers/schema-customization.d.ts +23 -0
  649. package/dist/redux/reducers/schema-customization.js +103 -0
  650. package/dist/redux/reducers/schema-customization.js.map +1 -0
  651. package/dist/redux/reducers/schema.d.ts +3 -0
  652. package/dist/redux/reducers/schema.js +17 -0
  653. package/dist/redux/reducers/schema.js.map +1 -0
  654. package/dist/redux/reducers/set-request-headers.d.ts +7 -0
  655. package/dist/redux/reducers/set-request-headers.js +24 -0
  656. package/dist/redux/reducers/set-request-headers.js.map +1 -0
  657. package/dist/redux/reducers/slices-by-template.d.ts +2 -0
  658. package/dist/redux/reducers/slices-by-template.js +16 -0
  659. package/dist/redux/reducers/slices-by-template.js.map +1 -0
  660. package/dist/redux/reducers/slices.d.ts +2 -0
  661. package/dist/redux/reducers/slices.js +22 -0
  662. package/dist/redux/reducers/slices.js.map +1 -0
  663. package/dist/redux/reducers/stateful-source-plugins.d.ts +5 -0
  664. package/dist/redux/reducers/stateful-source-plugins.js +20 -0
  665. package/dist/redux/reducers/stateful-source-plugins.js.map +1 -0
  666. package/dist/redux/reducers/static-queries-by-template.d.ts +2 -0
  667. package/dist/redux/reducers/static-queries-by-template.js +19 -0
  668. package/dist/redux/reducers/static-queries-by-template.js.map +1 -0
  669. package/dist/redux/reducers/static-query-components.d.ts +2 -0
  670. package/dist/redux/reducers/static-query-components.js +18 -0
  671. package/dist/redux/reducers/static-query-components.js.map +1 -0
  672. package/dist/redux/reducers/status.d.ts +7 -0
  673. package/dist/redux/reducers/status.js +57 -0
  674. package/dist/redux/reducers/status.js.map +1 -0
  675. package/dist/redux/reducers/telemetry.d.ts +2 -0
  676. package/dist/redux/reducers/telemetry.js +46 -0
  677. package/dist/redux/reducers/telemetry.js.map +1 -0
  678. package/dist/redux/reducers/type-owners.d.ts +5 -0
  679. package/dist/redux/reducers/type-owners.js +102 -0
  680. package/dist/redux/reducers/type-owners.js.map +1 -0
  681. package/dist/redux/reducers/visited-page.d.ts +2 -0
  682. package/dist/redux/reducers/visited-page.js +31 -0
  683. package/dist/redux/reducers/visited-page.js.map +1 -0
  684. package/dist/redux/reducers/webpack-compilation-hash.d.ts +2 -0
  685. package/dist/redux/reducers/webpack-compilation-hash.js +14 -0
  686. package/dist/redux/reducers/webpack-compilation-hash.js.map +1 -0
  687. package/dist/redux/reducers/webpack.d.ts +2 -0
  688. package/dist/redux/reducers/webpack.js +27 -0
  689. package/dist/redux/reducers/webpack.js.map +1 -0
  690. package/dist/redux/save-state.js +19 -0
  691. package/dist/redux/save-state.js.map +1 -0
  692. package/dist/redux/types.d.ts +1337 -0
  693. package/dist/redux/types.js +326 -0
  694. package/dist/redux/types.js.map +1 -0
  695. package/dist/schema/context.d.ts +14 -0
  696. package/dist/schema/context.js +38 -0
  697. package/dist/schema/context.js.map +1 -0
  698. package/dist/schema/extensions/index.js +205 -0
  699. package/dist/schema/extensions/index.js.map +1 -0
  700. package/dist/schema/graphql-engine/bootstrap.d.ts +2 -0
  701. package/dist/schema/graphql-engine/bootstrap.js +12 -0
  702. package/dist/schema/graphql-engine/bootstrap.js.map +1 -0
  703. package/dist/schema/graphql-engine/bundle-webpack.d.ts +5 -0
  704. package/dist/schema/graphql-engine/bundle-webpack.js +446 -0
  705. package/dist/schema/graphql-engine/bundle-webpack.js.map +1 -0
  706. package/dist/schema/graphql-engine/entry.d.ts +23 -0
  707. package/dist/schema/graphql-engine/entry.js +204 -0
  708. package/dist/schema/graphql-engine/entry.js.map +1 -0
  709. package/dist/schema/graphql-engine/lmdb-bundling-patch.d.ts +1 -0
  710. package/dist/schema/graphql-engine/lmdb-bundling-patch.js +72 -0
  711. package/dist/schema/graphql-engine/lmdb-bundling-patch.js.map +1 -0
  712. package/dist/schema/graphql-engine/platform-and-arch-check.d.ts +0 -0
  713. package/dist/schema/graphql-engine/platform-and-arch-check.js +6 -0
  714. package/dist/schema/graphql-engine/platform-and-arch-check.js.map +1 -0
  715. package/dist/schema/graphql-engine/print-plugins.d.ts +2 -0
  716. package/dist/schema/graphql-engine/print-plugins.js +145 -0
  717. package/dist/schema/graphql-engine/print-plugins.js.map +1 -0
  718. package/dist/schema/graphql-engine/sharp-bundling-patch.d.ts +1 -0
  719. package/dist/schema/graphql-engine/sharp-bundling-patch.js +8 -0
  720. package/dist/schema/graphql-engine/sharp-bundling-patch.js.map +1 -0
  721. package/dist/schema/graphql-engine/shims/gatsby-sharp.js +10 -0
  722. package/dist/schema/graphql-engine/shims/gatsby-sharp.js.map +1 -0
  723. package/dist/schema/graphql-engine/shims/no-op-module.js +3 -0
  724. package/dist/schema/graphql-engine/shims/no-op-module.js.map +1 -0
  725. package/dist/schema/graphql-engine/shims/ts-node.js +17 -0
  726. package/dist/schema/graphql-engine/shims/ts-node.js.map +1 -0
  727. package/dist/schema/graphql-engine/standalone-regenerate.d.ts +2 -0
  728. package/dist/schema/graphql-engine/standalone-regenerate.js +73 -0
  729. package/dist/schema/graphql-engine/standalone-regenerate.js.map +1 -0
  730. package/dist/schema/index.js +189 -0
  731. package/dist/schema/index.js.map +1 -0
  732. package/dist/schema/infer/add-inferred-fields.js +413 -0
  733. package/dist/schema/infer/add-inferred-fields.js.map +1 -0
  734. package/dist/schema/infer/build-example-data.d.ts +5 -0
  735. package/dist/schema/infer/build-example-data.js +199 -0
  736. package/dist/schema/infer/build-example-data.js.map +1 -0
  737. package/dist/schema/infer/index.js +121 -0
  738. package/dist/schema/infer/index.js.map +1 -0
  739. package/dist/schema/infer/inference-metadata.d.ts +72 -0
  740. package/dist/schema/infer/inference-metadata.js +280 -0
  741. package/dist/schema/infer/inference-metadata.js.map +1 -0
  742. package/dist/schema/infer/is-file.d.ts +1 -0
  743. package/dist/schema/infer/is-file.js +65 -0
  744. package/dist/schema/infer/is-file.js.map +1 -0
  745. package/dist/schema/infer/type-conflict-reporter.d.ts +28 -0
  746. package/dist/schema/infer/type-conflict-reporter.js +104 -0
  747. package/dist/schema/infer/type-conflict-reporter.js.map +1 -0
  748. package/dist/schema/node-model.js +784 -0
  749. package/dist/schema/node-model.js.map +1 -0
  750. package/dist/schema/print.d.ts +20 -0
  751. package/dist/schema/print.js +279 -0
  752. package/dist/schema/print.js.map +1 -0
  753. package/dist/schema/resolvers.d.ts +40 -0
  754. package/dist/schema/resolvers.js +569 -0
  755. package/dist/schema/resolvers.js.map +1 -0
  756. package/dist/schema/schema-composer.d.ts +3 -0
  757. package/dist/schema/schema-composer.js +31 -0
  758. package/dist/schema/schema-composer.js.map +1 -0
  759. package/dist/schema/schema.js +1295 -0
  760. package/dist/schema/schema.js.map +1 -0
  761. package/dist/schema/type-definitions.d.ts +47 -0
  762. package/dist/schema/type-definitions.js +4 -0
  763. package/dist/schema/type-definitions.js.map +1 -0
  764. package/dist/schema/types/built-in-types.d.ts +5 -0
  765. package/dist/schema/types/built-in-types.js +139 -0
  766. package/dist/schema/types/built-in-types.js.map +1 -0
  767. package/dist/schema/types/date.d.ts +37 -0
  768. package/dist/schema/types/date.js +225 -0
  769. package/dist/schema/types/date.js.map +1 -0
  770. package/dist/schema/types/derived-types.d.ts +45 -0
  771. package/dist/schema/types/derived-types.js +108 -0
  772. package/dist/schema/types/derived-types.js.map +1 -0
  773. package/dist/schema/types/filter.d.ts +12 -0
  774. package/dist/schema/types/filter.js +105 -0
  775. package/dist/schema/types/filter.js.map +1 -0
  776. package/dist/schema/types/media.d.ts +2 -0
  777. package/dist/schema/types/media.js +10 -0
  778. package/dist/schema/types/media.js.map +1 -0
  779. package/dist/schema/types/node-interface.d.ts +14 -0
  780. package/dist/schema/types/node-interface.js +103 -0
  781. package/dist/schema/types/node-interface.js.map +1 -0
  782. package/dist/schema/types/pagination.d.ts +16 -0
  783. package/dist/schema/types/pagination.js +198 -0
  784. package/dist/schema/types/pagination.js.map +1 -0
  785. package/dist/schema/types/remote-file-interface.d.ts +3 -0
  786. package/dist/schema/types/remote-file-interface.js +34 -0
  787. package/dist/schema/types/remote-file-interface.js.map +1 -0
  788. package/dist/schema/types/sort.d.ts +24 -0
  789. package/dist/schema/types/sort.js +178 -0
  790. package/dist/schema/types/sort.js.map +1 -0
  791. package/dist/schema/types/type-builders.d.ts +36 -0
  792. package/dist/schema/types/type-builders.js +61 -0
  793. package/dist/schema/types/type-builders.js.map +1 -0
  794. package/dist/schema/types/type-defs.js +86 -0
  795. package/dist/schema/types/type-defs.js.map +1 -0
  796. package/dist/schema/types/utils.d.ts +33 -0
  797. package/dist/schema/types/utils.js +153 -0
  798. package/dist/schema/types/utils.js.map +1 -0
  799. package/dist/schema/utils.d.ts +28 -0
  800. package/dist/schema/utils.js +149 -0
  801. package/dist/schema/utils.js.map +1 -0
  802. package/dist/services/build-schema.d.ts +2 -0
  803. package/dist/services/build-schema.js +24 -0
  804. package/dist/services/build-schema.js.map +1 -0
  805. package/dist/services/calculate-dirty-queries.d.ts +5 -0
  806. package/dist/services/calculate-dirty-queries.js +44 -0
  807. package/dist/services/calculate-dirty-queries.js.map +1 -0
  808. package/dist/services/create-pages.d.ts +5 -0
  809. package/dist/services/create-pages.js +108 -0
  810. package/dist/services/create-pages.js.map +1 -0
  811. package/dist/services/customize-schema.d.ts +2 -0
  812. package/dist/services/customize-schema.js +26 -0
  813. package/dist/services/customize-schema.js.map +1 -0
  814. package/dist/services/extract-queries.d.ts +2 -0
  815. package/dist/services/extract-queries.js +24 -0
  816. package/dist/services/extract-queries.js.map +1 -0
  817. package/dist/services/graphql-typegen.d.ts +2 -0
  818. package/dist/services/graphql-typegen.js +46 -0
  819. package/dist/services/graphql-typegen.js.map +1 -0
  820. package/dist/services/index.d.ts +19 -0
  821. package/dist/services/index.js +68 -0
  822. package/dist/services/index.js.map +1 -0
  823. package/dist/services/initialize.d.ts +14 -0
  824. package/dist/services/initialize.js +519 -0
  825. package/dist/services/initialize.js.map +1 -0
  826. package/dist/services/listen-for-mutations.d.ts +2 -0
  827. package/dist/services/listen-for-mutations.js +59 -0
  828. package/dist/services/listen-for-mutations.js.map +1 -0
  829. package/dist/services/listen-to-webpack.d.ts +3 -0
  830. package/dist/services/listen-to-webpack.js +17 -0
  831. package/dist/services/listen-to-webpack.js.map +1 -0
  832. package/dist/services/post-bootstrap.d.ts +2 -0
  833. package/dist/services/post-bootstrap.js +29 -0
  834. package/dist/services/post-bootstrap.js.map +1 -0
  835. package/dist/services/recompile.d.ts +3 -0
  836. package/dist/services/recompile.js +67 -0
  837. package/dist/services/recompile.js.map +1 -0
  838. package/dist/services/run-mutation-batch.d.ts +2 -0
  839. package/dist/services/run-mutation-batch.js +12 -0
  840. package/dist/services/run-mutation-batch.js.map +1 -0
  841. package/dist/services/run-page-queries.d.ts +2 -0
  842. package/dist/services/run-page-queries.js +38 -0
  843. package/dist/services/run-page-queries.js.map +1 -0
  844. package/dist/services/run-slice-queries.d.ts +2 -0
  845. package/dist/services/run-slice-queries.js +40 -0
  846. package/dist/services/run-slice-queries.js.map +1 -0
  847. package/dist/services/run-static-queries.d.ts +2 -0
  848. package/dist/services/run-static-queries.js +38 -0
  849. package/dist/services/run-static-queries.js.map +1 -0
  850. package/dist/services/source-nodes.d.ts +5 -0
  851. package/dist/services/source-nodes.js +47 -0
  852. package/dist/services/source-nodes.js.map +1 -0
  853. package/dist/services/start-webpack-server.d.ts +9 -0
  854. package/dist/services/start-webpack-server.js +103 -0
  855. package/dist/services/start-webpack-server.js.map +1 -0
  856. package/dist/services/types.d.ts +53 -0
  857. package/dist/services/types.js +4 -0
  858. package/dist/services/types.js.map +1 -0
  859. package/dist/services/write-out-redirects.d.ts +2 -0
  860. package/dist/services/write-out-redirects.js +20 -0
  861. package/dist/services/write-out-redirects.js.map +1 -0
  862. package/dist/services/write-out-requires.d.ts +2 -0
  863. package/dist/services/write-out-requires.js +27 -0
  864. package/dist/services/write-out-requires.js.map +1 -0
  865. package/dist/state-machines/data-layer/actions.d.ts +11 -0
  866. package/dist/state-machines/data-layer/actions.js +38 -0
  867. package/dist/state-machines/data-layer/actions.js.map +1 -0
  868. package/dist/state-machines/data-layer/index.d.ts +24 -0
  869. package/dist/state-machines/data-layer/index.js +152 -0
  870. package/dist/state-machines/data-layer/index.js.map +1 -0
  871. package/dist/state-machines/data-layer/services.d.ts +3 -0
  872. package/dist/state-machines/data-layer/services.js +14 -0
  873. package/dist/state-machines/data-layer/services.js.map +1 -0
  874. package/dist/state-machines/data-layer/types.d.ts +27 -0
  875. package/dist/state-machines/data-layer/types.js +4 -0
  876. package/dist/state-machines/data-layer/types.js.map +1 -0
  877. package/dist/state-machines/develop/actions.d.ts +68 -0
  878. package/dist/state-machines/develop/actions.js +259 -0
  879. package/dist/state-machines/develop/actions.js.map +1 -0
  880. package/dist/state-machines/develop/index.d.ts +5 -0
  881. package/dist/state-machines/develop/index.js +372 -0
  882. package/dist/state-machines/develop/index.js.map +1 -0
  883. package/dist/state-machines/develop/services.d.ts +3 -0
  884. package/dist/state-machines/develop/services.js +22 -0
  885. package/dist/state-machines/develop/services.js.map +1 -0
  886. package/dist/state-machines/index.d.ts +7 -0
  887. package/dist/state-machines/index.js +21 -0
  888. package/dist/state-machines/index.js.map +1 -0
  889. package/dist/state-machines/query-running/actions.d.ts +9 -0
  890. package/dist/state-machines/query-running/actions.js +55 -0
  891. package/dist/state-machines/query-running/actions.js.map +1 -0
  892. package/dist/state-machines/query-running/index.d.ts +7 -0
  893. package/dist/state-machines/query-running/index.js +142 -0
  894. package/dist/state-machines/query-running/index.js.map +1 -0
  895. package/dist/state-machines/query-running/services.d.ts +3 -0
  896. package/dist/state-machines/query-running/services.js +17 -0
  897. package/dist/state-machines/query-running/services.js.map +1 -0
  898. package/dist/state-machines/query-running/types.d.ts +26 -0
  899. package/dist/state-machines/query-running/types.js +4 -0
  900. package/dist/state-machines/query-running/types.js.map +1 -0
  901. package/dist/state-machines/waiting/actions.d.ts +11 -0
  902. package/dist/state-machines/waiting/actions.js +36 -0
  903. package/dist/state-machines/waiting/actions.js.map +1 -0
  904. package/dist/state-machines/waiting/index.d.ts +12 -0
  905. package/dist/state-machines/waiting/index.js +145 -0
  906. package/dist/state-machines/waiting/index.js.map +1 -0
  907. package/dist/state-machines/waiting/services.d.ts +3 -0
  908. package/dist/state-machines/waiting/services.js +10 -0
  909. package/dist/state-machines/waiting/services.js.map +1 -0
  910. package/dist/state-machines/waiting/types.d.ts +12 -0
  911. package/dist/state-machines/waiting/types.js +4 -0
  912. package/dist/state-machines/waiting/types.js.map +1 -0
  913. package/dist/types.d.ts +9 -0
  914. package/dist/types.js +4 -0
  915. package/dist/types.js.map +1 -0
  916. package/dist/utils/adapter/constants.d.ts +5 -0
  917. package/dist/utils/adapter/constants.js +31 -0
  918. package/dist/utils/adapter/constants.js.map +1 -0
  919. package/dist/utils/adapter/create-headers.d.ts +10 -0
  920. package/dist/utils/adapter/create-headers.js +94 -0
  921. package/dist/utils/adapter/create-headers.js.map +1 -0
  922. package/dist/utils/adapter/get-route-path.d.ts +3 -0
  923. package/dist/utils/adapter/get-route-path.js +22 -0
  924. package/dist/utils/adapter/get-route-path.js.map +1 -0
  925. package/dist/utils/adapter/init.d.ts +3 -0
  926. package/dist/utils/adapter/init.js +183 -0
  927. package/dist/utils/adapter/init.js.map +1 -0
  928. package/dist/utils/adapter/manager.d.ts +9 -0
  929. package/dist/utils/adapter/manager.js +554 -0
  930. package/dist/utils/adapter/manager.js.map +1 -0
  931. package/dist/utils/adapter/no-op-manager.d.ts +2 -0
  932. package/dist/utils/adapter/no-op-manager.js +18 -0
  933. package/dist/utils/adapter/no-op-manager.js.map +1 -0
  934. package/dist/utils/adapter/types.d.ts +282 -0
  935. package/dist/utils/adapter/types.js +4 -0
  936. package/dist/utils/adapter/types.js.map +1 -0
  937. package/dist/utils/api-browser-docs.d.ts +272 -0
  938. package/dist/utils/api-browser-docs.js +318 -0
  939. package/dist/utils/api-browser-docs.js.map +1 -0
  940. package/dist/utils/api-node-docs.d.ts +470 -0
  941. package/dist/utils/api-node-docs.js +519 -0
  942. package/dist/utils/api-node-docs.js.map +1 -0
  943. package/dist/utils/api-node-helpers-docs.js +322 -0
  944. package/dist/utils/api-node-helpers-docs.js.map +1 -0
  945. package/dist/utils/api-runner-error-parser.d.ts +5 -0
  946. package/dist/utils/api-runner-error-parser.js +63 -0
  947. package/dist/utils/api-runner-error-parser.js.map +1 -0
  948. package/dist/utils/api-runner-node.js +663 -0
  949. package/dist/utils/api-runner-node.js.map +1 -0
  950. package/dist/utils/app-data.d.ts +2 -0
  951. package/dist/utils/app-data.js +15 -0
  952. package/dist/utils/app-data.js.map +1 -0
  953. package/dist/utils/assert-store.d.ts +2 -0
  954. package/dist/utils/assert-store.js +12 -0
  955. package/dist/utils/assert-store.js.map +1 -0
  956. package/dist/utils/babel/babel-module-exports-helpers.d.ts +22 -0
  957. package/dist/utils/babel/babel-module-exports-helpers.js +48 -0
  958. package/dist/utils/babel/babel-module-exports-helpers.js.map +1 -0
  959. package/dist/utils/babel/babel-plugin-add-slice-placeholder-location.d.ts +10 -0
  960. package/dist/utils/babel/babel-plugin-add-slice-placeholder-location.js +48 -0
  961. package/dist/utils/babel/babel-plugin-add-slice-placeholder-location.js.map +1 -0
  962. package/dist/utils/babel/babel-plugin-remove-api.d.ts +5 -0
  963. package/dist/utils/babel/babel-plugin-remove-api.js +148 -0
  964. package/dist/utils/babel/babel-plugin-remove-api.js.map +1 -0
  965. package/dist/utils/babel/find-slices.d.ts +8 -0
  966. package/dist/utils/babel/find-slices.js +68 -0
  967. package/dist/utils/babel/find-slices.js.map +1 -0
  968. package/dist/utils/babel-loader-helpers.d.ts +19 -0
  969. package/dist/utils/babel-loader-helpers.js +158 -0
  970. package/dist/utils/babel-loader-helpers.js.map +1 -0
  971. package/dist/utils/babel-loader.d.ts +8 -0
  972. package/dist/utils/babel-loader.js +158 -0
  973. package/dist/utils/babel-loader.js.map +1 -0
  974. package/dist/utils/babel-parse-to-ast.d.ts +4 -0
  975. package/dist/utils/babel-parse-to-ast.js +34 -0
  976. package/dist/utils/babel-parse-to-ast.js.map +1 -0
  977. package/dist/utils/batcher.d.ts +15 -0
  978. package/dist/utils/batcher.js +46 -0
  979. package/dist/utils/batcher.js.map +1 -0
  980. package/dist/utils/browserslist.d.ts +2 -0
  981. package/dist/utils/browserslist.js +38 -0
  982. package/dist/utils/browserslist.js.map +1 -0
  983. package/dist/utils/cache-lmdb.d.ts +19 -0
  984. package/dist/utils/cache-lmdb.js +88 -0
  985. package/dist/utils/cache-lmdb.js.map +1 -0
  986. package/dist/utils/cache.d.ts +17 -0
  987. package/dist/utils/cache.js +77 -0
  988. package/dist/utils/cache.js.map +1 -0
  989. package/dist/utils/call-deferred-api.d.ts +8 -0
  990. package/dist/utils/call-deferred-api.js +35 -0
  991. package/dist/utils/call-deferred-api.js.map +1 -0
  992. package/dist/utils/changed-pages.d.ts +6 -0
  993. package/dist/utils/changed-pages.js +45 -0
  994. package/dist/utils/changed-pages.js.map +1 -0
  995. package/dist/utils/clear-require-cache.d.ts +1 -0
  996. package/dist/utils/clear-require-cache.js +24 -0
  997. package/dist/utils/clear-require-cache.js.map +1 -0
  998. package/dist/utils/client-assets-for-template.d.ts +9 -0
  999. package/dist/utils/client-assets-for-template.js +141 -0
  1000. package/dist/utils/client-assets-for-template.js.map +1 -0
  1001. package/dist/utils/create-node-id.d.ts +24 -0
  1002. package/dist/utils/create-node-id.js +67 -0
  1003. package/dist/utils/create-node-id.js.map +1 -0
  1004. package/dist/utils/create-schema-customization.d.ts +6 -0
  1005. package/dist/utils/create-schema-customization.js +25 -0
  1006. package/dist/utils/create-schema-customization.js.map +1 -0
  1007. package/dist/utils/detect-node-mutations.d.ts +4 -0
  1008. package/dist/utils/detect-node-mutations.js +134 -0
  1009. package/dist/utils/detect-node-mutations.js.map +1 -0
  1010. package/dist/utils/detect-port-in-use-and-prompt.d.ts +1 -0
  1011. package/dist/utils/detect-port-in-use-and-prompt.js +31 -0
  1012. package/dist/utils/detect-port-in-use-and-prompt.js.map +1 -0
  1013. package/dist/utils/dev-ssr/parse-error.d.ts +22 -0
  1014. package/dist/utils/dev-ssr/parse-error.js +119 -0
  1015. package/dist/utils/dev-ssr/parse-error.js.map +1 -0
  1016. package/dist/utils/dev-ssr/render-dev-html-child.d.ts +13 -0
  1017. package/dist/utils/dev-ssr/render-dev-html-child.js +47 -0
  1018. package/dist/utils/dev-ssr/render-dev-html-child.js.map +1 -0
  1019. package/dist/utils/dev-ssr/render-dev-html.d.ts +23 -0
  1020. package/dist/utils/dev-ssr/render-dev-html.js +227 -0
  1021. package/dist/utils/dev-ssr/render-dev-html.js.map +1 -0
  1022. package/dist/utils/develop-preload-headers.d.ts +7 -0
  1023. package/dist/utils/develop-preload-headers.js +64 -0
  1024. package/dist/utils/develop-preload-headers.js.map +1 -0
  1025. package/dist/utils/did-you-mean.d.ts +3 -0
  1026. package/dist/utils/did-you-mean.js +21 -0
  1027. package/dist/utils/did-you-mean.js.map +1 -0
  1028. package/dist/utils/engine-context.d.ts +5 -0
  1029. package/dist/utils/engine-context.js +19 -0
  1030. package/dist/utils/engine-context.js.map +1 -0
  1031. package/dist/utils/engines-fs-provider.d.ts +9 -0
  1032. package/dist/utils/engines-fs-provider.js +24 -0
  1033. package/dist/utils/engines-fs-provider.js.map +1 -0
  1034. package/dist/utils/engines-helpers.d.ts +10 -0
  1035. package/dist/utils/engines-helpers.js +48 -0
  1036. package/dist/utils/engines-helpers.js.map +1 -0
  1037. package/dist/utils/ensure-file-content.d.ts +1 -0
  1038. package/dist/utils/ensure-file-content.js +19 -0
  1039. package/dist/utils/ensure-file-content.js.map +1 -0
  1040. package/dist/utils/eslint/required.js +10 -0
  1041. package/dist/utils/eslint/required.js.map +1 -0
  1042. package/dist/utils/eslint-config.d.ts +3 -0
  1043. package/dist/utils/eslint-config.js +136 -0
  1044. package/dist/utils/eslint-config.js.map +1 -0
  1045. package/dist/utils/eslint-rules/limited-exports-page-templates.d.ts +1 -0
  1046. package/dist/utils/eslint-rules/limited-exports-page-templates.js +183 -0
  1047. package/dist/utils/eslint-rules/limited-exports-page-templates.js.map +1 -0
  1048. package/dist/utils/eslint-rules/no-anonymous-exports-page-templates.d.ts +1 -0
  1049. package/dist/utils/eslint-rules/no-anonymous-exports-page-templates.js +75 -0
  1050. package/dist/utils/eslint-rules/no-anonymous-exports-page-templates.js.map +1 -0
  1051. package/dist/utils/eslint-rules-helpers.d.ts +4 -0
  1052. package/dist/utils/eslint-rules-helpers.js +22 -0
  1053. package/dist/utils/eslint-rules-helpers.js.map +1 -0
  1054. package/dist/utils/express-middlewares.d.ts +4 -0
  1055. package/dist/utils/express-middlewares.js +57 -0
  1056. package/dist/utils/express-middlewares.js.map +1 -0
  1057. package/dist/utils/extract-undefined-global.d.ts +4 -0
  1058. package/dist/utils/extract-undefined-global.js +15 -0
  1059. package/dist/utils/extract-undefined-global.js.map +1 -0
  1060. package/dist/utils/fast-refresh-module.d.ts +22 -0
  1061. package/dist/utils/fast-refresh-module.js +53 -0
  1062. package/dist/utils/fast-refresh-module.js.map +1 -0
  1063. package/dist/utils/feedback.d.ts +5 -0
  1064. package/dist/utils/feedback.js +159 -0
  1065. package/dist/utils/feedback.js.map +1 -0
  1066. package/dist/utils/find-page-by-path.d.ts +2 -0
  1067. package/dist/utils/find-page-by-path.js +96 -0
  1068. package/dist/utils/find-page-by-path.js.map +1 -0
  1069. package/dist/utils/flags.d.ts +41 -0
  1070. package/dist/utils/flags.js +92 -0
  1071. package/dist/utils/flags.js.map +1 -0
  1072. package/dist/utils/gatsby-cloud-config.d.ts +4 -0
  1073. package/dist/utils/gatsby-cloud-config.js +15 -0
  1074. package/dist/utils/gatsby-cloud-config.js.map +1 -0
  1075. package/dist/utils/gatsby-dependents.d.ts +8 -0
  1076. package/dist/utils/gatsby-dependents.js +51 -0
  1077. package/dist/utils/gatsby-dependents.js.map +1 -0
  1078. package/dist/utils/gatsby-webpack-stats-extractor.d.ts +7 -0
  1079. package/dist/utils/gatsby-webpack-stats-extractor.js +136 -0
  1080. package/dist/utils/gatsby-webpack-stats-extractor.js.map +1 -0
  1081. package/dist/utils/gatsby-webpack-virtual-modules.d.ts +6 -0
  1082. package/dist/utils/gatsby-webpack-virtual-modules.js +45 -0
  1083. package/dist/utils/gatsby-webpack-virtual-modules.js.map +1 -0
  1084. package/dist/utils/get-cache.d.ts +2 -0
  1085. package/dist/utils/get-cache.js +18 -0
  1086. package/dist/utils/get-cache.js.map +1 -0
  1087. package/dist/utils/get-latest-gatsby-files.d.ts +8 -0
  1088. package/dist/utils/get-latest-gatsby-files.js +93 -0
  1089. package/dist/utils/get-latest-gatsby-files.js.map +1 -0
  1090. package/dist/utils/get-page-data.d.ts +3 -0
  1091. package/dist/utils/get-page-data.js +88 -0
  1092. package/dist/utils/get-page-data.js.map +1 -0
  1093. package/dist/utils/get-public-path.d.ts +5 -0
  1094. package/dist/utils/get-public-path.js +19 -0
  1095. package/dist/utils/get-public-path.js.map +1 -0
  1096. package/dist/utils/get-server-data.d.ts +19 -0
  1097. package/dist/utils/get-server-data.js +29 -0
  1098. package/dist/utils/get-server-data.js.map +1 -0
  1099. package/dist/utils/get-ssl-cert.d.ts +9 -0
  1100. package/dist/utils/get-ssl-cert.js +95 -0
  1101. package/dist/utils/get-ssl-cert.js.map +1 -0
  1102. package/dist/utils/get-static-dir.d.ts +12 -0
  1103. package/dist/utils/get-static-dir.js +60 -0
  1104. package/dist/utils/get-static-dir.js.map +1 -0
  1105. package/dist/utils/get-value-at.d.ts +1 -0
  1106. package/dist/utils/get-value-at.js +22 -0
  1107. package/dist/utils/get-value-at.js.map +1 -0
  1108. package/dist/utils/graphql-typegen/file-writes.d.ts +5 -0
  1109. package/dist/utils/graphql-typegen/file-writes.js +63 -0
  1110. package/dist/utils/graphql-typegen/file-writes.js.map +1 -0
  1111. package/dist/utils/graphql-typegen/ts-codegen.d.ts +5 -0
  1112. package/dist/utils/graphql-typegen/ts-codegen.js +136 -0
  1113. package/dist/utils/graphql-typegen/ts-codegen.js.map +1 -0
  1114. package/dist/utils/graphql-typegen/utils.d.ts +11 -0
  1115. package/dist/utils/graphql-typegen/utils.js +70 -0
  1116. package/dist/utils/graphql-typegen/utils.js.map +1 -0
  1117. package/dist/utils/handle-flags.d.ts +8 -0
  1118. package/dist/utils/handle-flags.js +212 -0
  1119. package/dist/utils/handle-flags.js.map +1 -0
  1120. package/dist/utils/import-gatsby-plugin.d.ts +11 -0
  1121. package/dist/utils/import-gatsby-plugin.js +40 -0
  1122. package/dist/utils/import-gatsby-plugin.js.map +1 -0
  1123. package/dist/utils/is-32-bit-integer.d.ts +1 -0
  1124. package/dist/utils/is-32-bit-integer.js +8 -0
  1125. package/dist/utils/is-32-bit-integer.js.map +1 -0
  1126. package/dist/utils/is-near-match.d.ts +1 -0
  1127. package/dist/utils/is-near-match.js +10 -0
  1128. package/dist/utils/is-near-match.js.map +1 -0
  1129. package/dist/utils/jobs/manager.d.ts +34 -0
  1130. package/dist/utils/jobs/manager.js +313 -0
  1131. package/dist/utils/jobs/manager.js.map +1 -0
  1132. package/dist/utils/jobs/types.d.ts +63 -0
  1133. package/dist/utils/jobs/types.js +32 -0
  1134. package/dist/utils/jobs/types.js.map +1 -0
  1135. package/dist/utils/jobs/worker-messaging.d.ts +10 -0
  1136. package/dist/utils/jobs/worker-messaging.js +114 -0
  1137. package/dist/utils/jobs/worker-messaging.js.map +1 -0
  1138. package/dist/utils/js-chunk-names.d.ts +1 -0
  1139. package/dist/utils/js-chunk-names.js +72 -0
  1140. package/dist/utils/js-chunk-names.js.map +1 -0
  1141. package/dist/utils/loading-indicator.d.ts +3 -0
  1142. package/dist/utils/loading-indicator.js +44 -0
  1143. package/dist/utils/loading-indicator.js.map +1 -0
  1144. package/dist/utils/local-eslint-config-finder.d.ts +1 -0
  1145. package/dist/utils/local-eslint-config-finder.js +31 -0
  1146. package/dist/utils/local-eslint-config-finder.js.map +1 -0
  1147. package/dist/utils/merge-gatsby-config.d.ts +28 -0
  1148. package/dist/utils/merge-gatsby-config.js +43 -0
  1149. package/dist/utils/merge-gatsby-config.js.map +1 -0
  1150. package/dist/utils/mett.d.ts +10 -0
  1151. package/dist/utils/mett.js +42 -0
  1152. package/dist/utils/mett.js.map +1 -0
  1153. package/dist/utils/module-resolver.d.ts +2 -0
  1154. package/dist/utils/module-resolver.js +24 -0
  1155. package/dist/utils/module-resolver.js.map +1 -0
  1156. package/dist/utils/node-manifest.d.ts +46 -0
  1157. package/dist/utils/node-manifest.js +367 -0
  1158. package/dist/utils/node-manifest.js.map +1 -0
  1159. package/dist/utils/nodes.d.ts +13 -0
  1160. package/dist/utils/nodes.js +62 -0
  1161. package/dist/utils/nodes.js.map +1 -0
  1162. package/dist/utils/normalize-path.d.ts +2 -0
  1163. package/dist/utils/normalize-path.js +11 -0
  1164. package/dist/utils/normalize-path.js.map +1 -0
  1165. package/dist/utils/page-data-helpers.d.ts +23 -0
  1166. package/dist/utils/page-data-helpers.js +76 -0
  1167. package/dist/utils/page-data-helpers.js.map +1 -0
  1168. package/dist/utils/page-data.d.ts +39 -0
  1169. package/dist/utils/page-data.js +366 -0
  1170. package/dist/utils/page-data.js.map +1 -0
  1171. package/dist/utils/page-mode.d.ts +18 -0
  1172. package/dist/utils/page-mode.js +124 -0
  1173. package/dist/utils/page-mode.js.map +1 -0
  1174. package/dist/utils/page-ssr-module/bundle-webpack.d.ts +18 -0
  1175. package/dist/utils/page-ssr-module/bundle-webpack.js +209 -0
  1176. package/dist/utils/page-ssr-module/bundle-webpack.js.map +1 -0
  1177. package/dist/utils/page-ssr-module/entry.d.ts +61 -0
  1178. package/dist/utils/page-ssr-module/entry.js +344 -0
  1179. package/dist/utils/page-ssr-module/entry.js.map +1 -0
  1180. package/dist/utils/page-ssr-module/lambda.d.ts +3 -0
  1181. package/dist/utils/page-ssr-module/lambda.js +401 -0
  1182. package/dist/utils/page-ssr-module/lambda.js.map +1 -0
  1183. package/dist/utils/parcel/compile-gatsby-files.d.ts +26 -0
  1184. package/dist/utils/parcel/compile-gatsby-files.js +271 -0
  1185. package/dist/utils/parcel/compile-gatsby-files.js.map +1 -0
  1186. package/dist/utils/path.d.ts +5 -0
  1187. package/dist/utils/path.js +55 -0
  1188. package/dist/utils/path.js.map +1 -0
  1189. package/dist/utils/prepare-regex.d.ts +1 -0
  1190. package/dist/utils/prepare-regex.js +13 -0
  1191. package/dist/utils/prepare-regex.js.map +1 -0
  1192. package/dist/utils/prepare-urls.d.ts +7 -0
  1193. package/dist/utils/prepare-urls.js +58 -0
  1194. package/dist/utils/prepare-urls.js.map +1 -0
  1195. package/dist/utils/print-instructions.d.ts +2 -0
  1196. package/dist/utils/print-instructions.js +42 -0
  1197. package/dist/utils/print-instructions.js.map +1 -0
  1198. package/dist/utils/rank-route.d.ts +1 -0
  1199. package/dist/utils/rank-route.js +26 -0
  1200. package/dist/utils/rank-route.js.map +1 -0
  1201. package/dist/utils/reach-router-add-basecontext-export-loader.d.ts +1 -0
  1202. package/dist/utils/reach-router-add-basecontext-export-loader.js +23 -0
  1203. package/dist/utils/reach-router-add-basecontext-export-loader.js.map +1 -0
  1204. package/dist/utils/report-once.d.ts +1 -0
  1205. package/dist/utils/report-once.js +17 -0
  1206. package/dist/utils/report-once.js.map +1 -0
  1207. package/dist/utils/sanitize-node.d.ts +12 -0
  1208. package/dist/utils/sanitize-node.js +87 -0
  1209. package/dist/utils/sanitize-node.js.map +1 -0
  1210. package/dist/utils/show-experiment-notice.d.ts +6 -0
  1211. package/dist/utils/show-experiment-notice.js +51 -0
  1212. package/dist/utils/show-experiment-notice.js.map +1 -0
  1213. package/dist/utils/slices/stitching.d.ts +4 -0
  1214. package/dist/utils/slices/stitching.js +92 -0
  1215. package/dist/utils/slices/stitching.js.map +1 -0
  1216. package/dist/utils/slices.d.ts +2 -0
  1217. package/dist/utils/slices.js +9 -0
  1218. package/dist/utils/slices.js.map +1 -0
  1219. package/dist/utils/source-nodes-api-runner.d.ts +8 -0
  1220. package/dist/utils/source-nodes-api-runner.js +23 -0
  1221. package/dist/utils/source-nodes-api-runner.js.map +1 -0
  1222. package/dist/utils/source-nodes.d.ts +11 -0
  1223. package/dist/utils/source-nodes.js +150 -0
  1224. package/dist/utils/source-nodes.js.map +1 -0
  1225. package/dist/utils/stack-trace-utils.d.ts +24 -0
  1226. package/dist/utils/stack-trace-utils.js +113 -0
  1227. package/dist/utils/stack-trace-utils.js.map +1 -0
  1228. package/dist/utils/start-server.d.ts +22 -0
  1229. package/dist/utils/start-server.js +722 -0
  1230. package/dist/utils/start-server.js.map +1 -0
  1231. package/dist/utils/state-machine-logging.d.ts +4 -0
  1232. package/dist/utils/state-machine-logging.js +47 -0
  1233. package/dist/utils/state-machine-logging.js.map +1 -0
  1234. package/dist/utils/static-query-utils.d.ts +13 -0
  1235. package/dist/utils/static-query-utils.js +57 -0
  1236. package/dist/utils/static-query-utils.js.map +1 -0
  1237. package/dist/utils/test-import-error.d.ts +1 -0
  1238. package/dist/utils/test-import-error.js +18 -0
  1239. package/dist/utils/test-import-error.js.map +1 -0
  1240. package/dist/utils/tracer/index.d.ts +12 -0
  1241. package/dist/utils/tracer/index.js +42 -0
  1242. package/dist/utils/tracer/index.js.map +1 -0
  1243. package/dist/utils/tracer/jaeger-local.d.ts +4 -0
  1244. package/dist/utils/tracer/jaeger-local.js +32 -0
  1245. package/dist/utils/tracer/jaeger-local.js.map +1 -0
  1246. package/dist/utils/tracer/zipkin-local.d.ts +11 -0
  1247. package/dist/utils/tracer/zipkin-local.js +87 -0
  1248. package/dist/utils/tracer/zipkin-local.js.map +1 -0
  1249. package/dist/utils/tracer/zipkin-types.d.js +14 -0
  1250. package/dist/utils/tracer/zipkin-types.d.js.map +1 -0
  1251. package/dist/utils/validate-component.d.ts +23 -0
  1252. package/dist/utils/validate-component.js +99 -0
  1253. package/dist/utils/validate-component.js.map +1 -0
  1254. package/dist/utils/validate-engines/child.d.ts +1 -0
  1255. package/dist/utils/validate-engines/child.js +74 -0
  1256. package/dist/utils/validate-engines/child.js.map +1 -0
  1257. package/dist/utils/validate-engines/index.d.ts +2 -0
  1258. package/dist/utils/validate-engines/index.js +48 -0
  1259. package/dist/utils/validate-engines/index.js.map +1 -0
  1260. package/dist/utils/wait-until-jobs-complete.d.ts +2 -0
  1261. package/dist/utils/wait-until-jobs-complete.js +30 -0
  1262. package/dist/utils/wait-until-jobs-complete.js.map +1 -0
  1263. package/dist/utils/webpack/bundle.d.ts +9 -0
  1264. package/dist/utils/webpack/bundle.js +41 -0
  1265. package/dist/utils/webpack/bundle.js.map +1 -0
  1266. package/dist/utils/webpack/get-ssr-chunk-hashes.d.ts +9 -0
  1267. package/dist/utils/webpack/get-ssr-chunk-hashes.js +55 -0
  1268. package/dist/utils/webpack/get-ssr-chunk-hashes.js.map +1 -0
  1269. package/dist/utils/webpack/loaders/client-components-requires-writer-loader.d.ts +1 -0
  1270. package/dist/utils/webpack/loaders/client-components-requires-writer-loader.js +22 -0
  1271. package/dist/utils/webpack/loaders/client-components-requires-writer-loader.js.map +1 -0
  1272. package/dist/utils/webpack/loaders/partial-hydration-reference-loader.d.ts +1 -0
  1273. package/dist/utils/webpack/loaders/partial-hydration-reference-loader.js +127 -0
  1274. package/dist/utils/webpack/loaders/partial-hydration-reference-loader.js.map +1 -0
  1275. package/dist/utils/webpack/loaders/webpack-remove-exports-loader.d.ts +1 -0
  1276. package/dist/utils/webpack/loaders/webpack-remove-exports-loader.js +40 -0
  1277. package/dist/utils/webpack/loaders/webpack-remove-exports-loader.js.map +1 -0
  1278. package/dist/utils/webpack/plugins/cache-folder-resolver.d.ts +25 -0
  1279. package/dist/utils/webpack/plugins/cache-folder-resolver.js +111 -0
  1280. package/dist/utils/webpack/plugins/cache-folder-resolver.js.map +1 -0
  1281. package/dist/utils/webpack/plugins/corejs-resolver.d.ts +12 -0
  1282. package/dist/utils/webpack/plugins/corejs-resolver.js +66 -0
  1283. package/dist/utils/webpack/plugins/corejs-resolver.js.map +1 -0
  1284. package/dist/utils/webpack/plugins/force-css-hmr-for-edge-cases.d.ts +22 -0
  1285. package/dist/utils/webpack/plugins/force-css-hmr-for-edge-cases.js +88 -0
  1286. package/dist/utils/webpack/plugins/force-css-hmr-for-edge-cases.js.map +1 -0
  1287. package/dist/utils/webpack/plugins/partial-hydration.d.ts +26 -0
  1288. package/dist/utils/webpack/plugins/partial-hydration.js +362 -0
  1289. package/dist/utils/webpack/plugins/partial-hydration.js.map +1 -0
  1290. package/dist/utils/webpack/plugins/static-query-mapper.d.ts +13 -0
  1291. package/dist/utils/webpack/plugins/static-query-mapper.js +235 -0
  1292. package/dist/utils/webpack/plugins/static-query-mapper.js.map +1 -0
  1293. package/dist/utils/webpack/plugins/webpack-logging.d.ts +12 -0
  1294. package/dist/utils/webpack/plugins/webpack-logging.js +51 -0
  1295. package/dist/utils/webpack/plugins/webpack-logging.js.map +1 -0
  1296. package/dist/utils/webpack/utils/create-normalized-module-key.d.ts +12 -0
  1297. package/dist/utils/webpack/utils/create-normalized-module-key.js +25 -0
  1298. package/dist/utils/webpack/utils/create-normalized-module-key.js.map +1 -0
  1299. package/dist/utils/webpack/utils/is-file-inside-compilations.d.ts +7 -0
  1300. package/dist/utils/webpack/utils/is-file-inside-compilations.js +37 -0
  1301. package/dist/utils/webpack/utils/is-file-inside-compilations.js.map +1 -0
  1302. package/dist/utils/webpack-error-utils.d.ts +24 -0
  1303. package/dist/utils/webpack-error-utils.js +112 -0
  1304. package/dist/utils/webpack-error-utils.js.map +1 -0
  1305. package/dist/utils/webpack-plugins.d.ts +46 -0
  1306. package/dist/utils/webpack-plugins.js +61 -0
  1307. package/dist/utils/webpack-plugins.js.map +1 -0
  1308. package/dist/utils/webpack-status.d.ts +3 -0
  1309. package/dist/utils/webpack-status.js +21 -0
  1310. package/dist/utils/webpack-status.js.map +1 -0
  1311. package/dist/utils/webpack-utils.d.ts +121 -0
  1312. package/dist/utils/webpack-utils.js +574 -0
  1313. package/dist/utils/webpack-utils.js.map +1 -0
  1314. package/dist/utils/webpack.config.js +804 -0
  1315. package/dist/utils/webpack.config.js.map +1 -0
  1316. package/dist/utils/websocket-manager.d.ts +39 -0
  1317. package/dist/utils/websocket-manager.js +183 -0
  1318. package/dist/utils/websocket-manager.js.map +1 -0
  1319. package/dist/utils/worker/child/index.d.ts +5 -0
  1320. package/dist/utils/worker/child/index.js +35 -0
  1321. package/dist/utils/worker/child/index.js.map +1 -0
  1322. package/dist/utils/worker/child/load-config-and-plugins.d.ts +2 -0
  1323. package/dist/utils/worker/child/load-config-and-plugins.js +28 -0
  1324. package/dist/utils/worker/child/load-config-and-plugins.js.map +1 -0
  1325. package/dist/utils/worker/child/queries.d.ts +7 -0
  1326. package/dist/utils/worker/child/queries.js +84 -0
  1327. package/dist/utils/worker/child/queries.js.map +1 -0
  1328. package/dist/utils/worker/child/render-html.d.ts +49 -0
  1329. package/dist/utils/worker/child/render-html.js +562 -0
  1330. package/dist/utils/worker/child/render-html.js.map +1 -0
  1331. package/dist/utils/worker/child/schema.d.ts +2 -0
  1332. package/dist/utils/worker/child/schema.js +41 -0
  1333. package/dist/utils/worker/child/schema.js.map +1 -0
  1334. package/dist/utils/worker/child/state.d.ts +2 -0
  1335. package/dist/utils/worker/child/state.js +13 -0
  1336. package/dist/utils/worker/child/state.js.map +1 -0
  1337. package/dist/utils/worker/messaging.d.ts +16 -0
  1338. package/dist/utils/worker/messaging.js +9 -0
  1339. package/dist/utils/worker/messaging.js.map +1 -0
  1340. package/dist/utils/worker/pool.d.ts +10 -0
  1341. package/dist/utils/worker/pool.js +122 -0
  1342. package/dist/utils/worker/pool.js.map +1 -0
  1343. package/dist/utils/worker/reporter.d.ts +3 -0
  1344. package/dist/utils/worker/reporter.js +26 -0
  1345. package/dist/utils/worker/reporter.js.map +1 -0
  1346. package/dist/utils/worker/types.d.ts +3 -0
  1347. package/dist/utils/worker/types.js +4 -0
  1348. package/dist/utils/worker/types.js.map +1 -0
  1349. package/graphql.d.ts +2 -0
  1350. package/graphql.js +6 -0
  1351. package/index.d.ts +1906 -0
  1352. package/internal.d.ts +4 -0
  1353. package/internal.js +5 -0
  1354. package/ipc.json +3 -0
  1355. package/package.json +744 -0
  1356. package/reporter.d.ts +4 -0
  1357. package/reporter.js +3 -0
  1358. package/scripts/postinstall.js +7 -0
  1359. package/utils.js +1 -0
  1360. package/webpack.d.ts +3 -0
  1361. package/webpack.js +3 -0
@@ -0,0 +1,1354 @@
1
+ "use strict";
2
+
3
+ var _sanitizeNode = require("../../utils/sanitize-node");
4
+ var _joi = require("../../joi-schemas/joi");
5
+ var _internal = require("./internal");
6
+ var _workerMessaging = require("../../utils/jobs/worker-messaging");
7
+ var _reportOnce = require("../../utils/report-once");
8
+ var _detectNodeMutations = require("../../utils/detect-node-mutations");
9
+ const reporter = require(`gatsby-cli/lib/reporter`);
10
+ const chalk = require(`chalk`);
11
+ const _ = require(`lodash`);
12
+ const {
13
+ stripIndent
14
+ } = require(`common-tags`);
15
+ const report = require(`gatsby-cli/lib/reporter`);
16
+ const {
17
+ platform
18
+ } = require(`os`);
19
+ const path = require(`path`);
20
+ const {
21
+ trueCasePathSync
22
+ } = require(`true-case-path`);
23
+ const url = require(`url`);
24
+ const {
25
+ slash
26
+ } = require(`gatsby-core-utils/path`);
27
+ const {
28
+ createContentDigest
29
+ } = require(`gatsby-core-utils/create-content-digest`);
30
+ const {
31
+ splitComponentPath
32
+ } = require(`gatsby-core-utils/parse-component-path`);
33
+ const {
34
+ hasNodeChanged
35
+ } = require(`../../utils/nodes`);
36
+ const {
37
+ getNode,
38
+ getDataStore
39
+ } = require(`../../datastore`);
40
+ const {
41
+ store
42
+ } = require(`../index`);
43
+ const {
44
+ validateComponent
45
+ } = require(`../../utils/validate-component`);
46
+ const {
47
+ generateComponentChunkName
48
+ } = require(`../../utils/js-chunk-names`);
49
+ const {
50
+ getCommonDir,
51
+ truncatePath,
52
+ tooLongSegmentsInPath
53
+ } = require(`../../utils/path`);
54
+ const {
55
+ applyTrailingSlashOption
56
+ } = require(`gatsby-page-utils`);
57
+ const apiRunnerNode = require(`../../utils/api-runner-node`);
58
+ const {
59
+ getNonGatsbyCodeFrame
60
+ } = require(`../../utils/stack-trace-utils`);
61
+ const {
62
+ getPageMode
63
+ } = require(`../../utils/page-mode`);
64
+ const normalizePath = require(`../../utils/normalize-path`).default;
65
+ const isNotTestEnv = process.env.NODE_ENV !== `test`;
66
+ const isTestEnv = process.env.NODE_ENV === `test`;
67
+
68
+ // Memoize function used to pick shadowed page components to avoid expensive I/O.
69
+ // Ideally, we should invalidate memoized values if there are any FS operations
70
+ // on files that are in shadowing chain, but webpack currently doesn't handle
71
+ // shadowing changes during develop session, so no invalidation is not a deal breaker.
72
+ const shadowCreatePagePath = _.memoize(require(`../../internal-plugins/webpack-theme-component-shadowing/create-page`));
73
+ const {
74
+ createInternalJob
75
+ } = require(`../../utils/jobs/manager`);
76
+ const actions = {};
77
+ const isWindows = platform() === `win32`;
78
+ const ensureWindowsDriveIsUppercase = filePath => {
79
+ const segments = filePath.split(`:`).filter(s => s !== ``);
80
+ return segments.length > 0 ? segments.shift().toUpperCase() + `:` + segments.join(`:`) : filePath;
81
+ };
82
+ const findChildren = initialChildren => {
83
+ const children = [...initialChildren];
84
+ const queue = [...initialChildren];
85
+ const traversedNodes = new Set();
86
+ while (queue.length > 0) {
87
+ const currentChild = getNode(queue.pop());
88
+ if (!currentChild || traversedNodes.has(currentChild.id)) {
89
+ continue;
90
+ }
91
+ traversedNodes.add(currentChild.id);
92
+ const newChildren = currentChild.children;
93
+ if (_.isArray(newChildren) && newChildren.length > 0) {
94
+ children.push(...newChildren);
95
+ queue.push(...newChildren);
96
+ }
97
+ }
98
+ return children;
99
+ };
100
+ /**
101
+ * Delete a page
102
+ * @param {Object} page a page object
103
+ * @param {string} page.path The path of the page
104
+ * @param {string} page.component The absolute path to the page component
105
+ * @example
106
+ * deletePage(page)
107
+ */
108
+ actions.deletePage = page => {
109
+ return {
110
+ type: `DELETE_PAGE`,
111
+ payload: page
112
+ };
113
+ };
114
+ const hasWarnedForPageComponentInvalidContext = new Set();
115
+ const hasWarnedForPageComponentInvalidCasing = new Set();
116
+ const hasErroredBecauseOfNodeValidation = new Set();
117
+ const pageComponentCache = new Map();
118
+ const reservedFields = [`path`, `matchPath`, `component`, `componentChunkName`, `pluginCreator___NODE`, `pluginCreatorId`];
119
+ /**
120
+ * Create a page. See [the guide on creating and modifying pages](/docs/creating-and-modifying-pages/)
121
+ * for detailed documentation about creating pages.
122
+ * @param {Object} page a page object
123
+ * @param {string} page.path Any valid URL. Must start with a forward slash. Unicode characters should be passed directly and not encoded (eg. `á` not `%C3%A1`).
124
+ * @param {string} page.matchPath Path that Reach Router uses to match the page on the client side.
125
+ * Also see docs on [matchPath](/docs/gatsby-internals-terminology/#matchpath)
126
+ * @param {string} page.ownerNodeId The id of the node that owns this page. This is used for routing users to previews via the unstable_createNodeManifest public action. Since multiple nodes can be queried on a single page, this allows the user to tell us which node is the main node for the page. Note that the ownerNodeId must be for a node which is queried on this page via a GraphQL query.
127
+ * @param {string} page.component The absolute path to the component for this page
128
+ * @param {Object} page.context Context data for this page. Passed as props
129
+ * to the component `this.props.pageContext` as well as to the graphql query
130
+ * as graphql arguments.
131
+ * @param {Object} page.slices A mapping of alias-of-id for Slices rendered on this page. See the technical docs for the [Gatsby Slice API](/docs/reference/built-in-components/gatsby-slice).
132
+ * @param {boolean} page.defer When set to `true`, Gatsby will exclude the page from the build step and instead generate it during the first HTTP request. Default value is `false`. Also see docs on [Deferred Static Generation](/docs/reference/rendering-options/deferred-static-generation/).
133
+ * @example
134
+ * createPage({
135
+ * path: `/my-sweet-new-page/`,
136
+ * component: path.resolve(`./src/templates/my-sweet-new-page.js`),
137
+ * ownerNodeId: `123456`,
138
+ * // The context is passed as props to the component as well
139
+ * // as into the component's GraphQL query.
140
+ * context: {
141
+ * id: `123456`,
142
+ * },
143
+ * })
144
+ */
145
+ actions.createPage = (page, plugin, actionOptions) => {
146
+ var _plugin$id, _plugin$id2;
147
+ let name = `The plugin "${plugin.name}"`;
148
+ if (plugin.name === `default-site-plugin`) {
149
+ name = `Your site's "gatsby-node.js"`;
150
+ }
151
+ if (!page.path) {
152
+ const message = `${name} must set the page path when creating a page`;
153
+ // Don't log out when testing
154
+ if (isNotTestEnv) {
155
+ report.panic({
156
+ id: `11323`,
157
+ context: {
158
+ pluginName: name,
159
+ pageObject: page,
160
+ message
161
+ }
162
+ });
163
+ } else {
164
+ return message;
165
+ }
166
+ }
167
+
168
+ // Validate that the context object doesn't overlap with any core page fields
169
+ // as this will cause trouble when running graphql queries.
170
+ if (page.context && typeof page.context === `object`) {
171
+ const invalidFields = reservedFields.filter(field => field in page.context);
172
+ if (invalidFields.length > 0) {
173
+ const error = `${invalidFields.length === 1 ? `${name} used a reserved field name in the context object when creating a page:` : `${name} used reserved field names in the context object when creating a page:`}
174
+
175
+ ${invalidFields.map(f => ` * "${f}"`).join(`\n`)}
176
+
177
+ ${JSON.stringify(page, null, 4)}
178
+
179
+ Data in "context" is passed to GraphQL as potential arguments when running the
180
+ page query.
181
+
182
+ When arguments for GraphQL are constructed, the context object is combined with
183
+ the page object so *both* page object and context data are available as
184
+ arguments. So you don't need to add the page "path" to the context as it's
185
+ already available in GraphQL. If a context field duplicates a field already
186
+ used by the page object, this can break functionality within Gatsby so must be
187
+ avoided.
188
+
189
+ Please choose another name for the conflicting fields.
190
+
191
+ The following fields are used by the page object and should be avoided.
192
+
193
+ ${reservedFields.map(f => ` * "${f}"`).join(`\n`)}
194
+
195
+ `;
196
+ if (isTestEnv) {
197
+ return error;
198
+ // Only error if the context version is different than the page
199
+ // version. People in v1 often thought that they needed to also pass
200
+ // the path to context for it to be available in GraphQL
201
+ } else if (invalidFields.some(f => page.context[f] !== page[f])) {
202
+ report.panic({
203
+ id: `11324`,
204
+ context: {
205
+ message: error
206
+ }
207
+ });
208
+ } else {
209
+ if (!hasWarnedForPageComponentInvalidContext.has(page.component)) {
210
+ report.warn(error);
211
+ hasWarnedForPageComponentInvalidContext.add(page.component);
212
+ }
213
+ }
214
+ }
215
+ }
216
+
217
+ // Check if a component is set.
218
+ if (!page.component) {
219
+ if (isNotTestEnv) {
220
+ report.panic({
221
+ id: `11322`,
222
+ context: {
223
+ input: page,
224
+ pluginName: name
225
+ }
226
+ });
227
+ } else {
228
+ // For test
229
+ return `A component must be set when creating a page`;
230
+ }
231
+ }
232
+ const pageComponentPath = shadowCreatePagePath(page.component);
233
+ if (pageComponentPath) {
234
+ page.component = pageComponentPath;
235
+ }
236
+ const {
237
+ config,
238
+ program
239
+ } = store.getState();
240
+ const {
241
+ trailingSlash
242
+ } = config;
243
+ const {
244
+ directory
245
+ } = program;
246
+ const {
247
+ error,
248
+ panicOnBuild
249
+ } = validateComponent({
250
+ input: page,
251
+ pluginName: name,
252
+ errorIdMap: {
253
+ noPath: `11322`,
254
+ notAbsolute: `11326`,
255
+ doesNotExist: `11325`,
256
+ empty: `11327`,
257
+ noDefaultExport: `11328`
258
+ }
259
+ });
260
+ if (error) {
261
+ if (isNotTestEnv) {
262
+ if (panicOnBuild) {
263
+ report.panicOnBuild(error);
264
+ } else {
265
+ report.panic(error);
266
+ }
267
+ }
268
+ return `${name} must set the absolute path to the page component when creating a page`;
269
+ }
270
+
271
+ // check if we've processed this component path
272
+ // before, before running the expensive "trueCasePath"
273
+ // operation
274
+ //
275
+ // Skip during testing as the paths don't exist on disk.
276
+ if (isNotTestEnv) {
277
+ if (pageComponentCache.has(page.component)) {
278
+ page.component = pageComponentCache.get(page.component);
279
+ } else {
280
+ const originalPageComponent = page.component;
281
+ const splitPath = splitComponentPath(page.component);
282
+
283
+ // normalize component path
284
+ page.component = slash(splitPath[0]);
285
+ // check if path uses correct casing - incorrect casing will
286
+ // cause issues in query compiler and inconsistencies when
287
+ // developing on Mac or Windows and trying to deploy from
288
+ // linux CI/CD pipeline
289
+ let trueComponentPath;
290
+ try {
291
+ // most systems
292
+ trueComponentPath = slash(trueCasePathSync(page.component));
293
+ } catch (e) {
294
+ // systems where user doesn't have access to /
295
+ const commonDir = getCommonDir(directory, page.component);
296
+
297
+ // using `path.win32` to force case insensitive relative path
298
+ const relativePath = slash(path.win32.relative(commonDir, page.component));
299
+ trueComponentPath = slash(trueCasePathSync(relativePath, commonDir));
300
+ }
301
+ if (isWindows) {
302
+ page.component = ensureWindowsDriveIsUppercase(page.component);
303
+ }
304
+ if (trueComponentPath !== page.component) {
305
+ if (!hasWarnedForPageComponentInvalidCasing.has(page.component)) {
306
+ const markers = page.component.split(``).map((letter, index) => {
307
+ if (letter !== trueComponentPath[index]) {
308
+ return `^`;
309
+ }
310
+ return ` `;
311
+ }).join(``);
312
+ report.warn(stripIndent`
313
+ ${name} created a page with a component path that doesn't match the casing of the actual file. This may work locally, but will break on systems which are case-sensitive, e.g. most CI/CD pipelines.
314
+
315
+ page.component: "${page.component}"
316
+ path in filesystem: "${trueComponentPath}"
317
+ ${markers}
318
+ `);
319
+ hasWarnedForPageComponentInvalidCasing.add(page.component);
320
+ }
321
+ page.component = trueComponentPath;
322
+ }
323
+ if (splitPath.length > 1) {
324
+ page.component = `${page.component}?__contentFilePath=${splitPath[1]}`;
325
+ }
326
+ pageComponentCache.set(originalPageComponent, page.component);
327
+ }
328
+ }
329
+ let internalComponentName;
330
+ if (page.path === `/`) {
331
+ internalComponentName = `ComponentIndex`;
332
+ } else {
333
+ internalComponentName = `Component${page.path}`;
334
+ }
335
+ const invalidPathSegments = tooLongSegmentsInPath(page.path);
336
+ if (invalidPathSegments.length > 0) {
337
+ const truncatedPath = truncatePath(page.path);
338
+ report.warn(report.stripIndent(`
339
+ The path to the following page is longer than the supported limit on most
340
+ operating systems and will cause an ENAMETOOLONG error. The path has been
341
+ truncated to prevent this.
342
+
343
+ Original Path: ${page.path}
344
+
345
+ Truncated Path: ${truncatedPath}
346
+ `));
347
+ page.path = truncatedPath;
348
+ }
349
+ page.path = applyTrailingSlashOption(page.path, trailingSlash);
350
+ const internalPage = {
351
+ internalComponentName,
352
+ path: page.path,
353
+ matchPath: page.matchPath,
354
+ component: normalizePath(page.component),
355
+ componentPath: normalizePath(page.component),
356
+ componentChunkName: generateComponentChunkName(page.component),
357
+ isCreatedByStatefulCreatePages: (actionOptions === null || actionOptions === void 0 ? void 0 : actionOptions.traceId) === `initial-createPagesStatefully`,
358
+ // Ensure the page has a context object
359
+ context: page.context || {},
360
+ updatedAt: Date.now(),
361
+ slices: (page === null || page === void 0 ? void 0 : page.slices) || {},
362
+ // Link page to its plugin.
363
+ pluginCreator___NODE: (_plugin$id = plugin.id) !== null && _plugin$id !== void 0 ? _plugin$id : ``,
364
+ pluginCreatorId: (_plugin$id2 = plugin.id) !== null && _plugin$id2 !== void 0 ? _plugin$id2 : ``
365
+ };
366
+ if (page.defer) {
367
+ internalPage.defer = true;
368
+ }
369
+ // Note: mode is updated in the end of the build after we get access to all page components,
370
+ // see materializePageMode in utils/page-mode.ts
371
+ internalPage.mode = getPageMode(internalPage);
372
+ if (page.ownerNodeId) {
373
+ internalPage.ownerNodeId = page.ownerNodeId;
374
+ }
375
+
376
+ // If the path doesn't have an initial forward slash, add it.
377
+ if (internalPage.path[0] !== `/`) {
378
+ internalPage.path = `/${internalPage.path}`;
379
+ }
380
+ const oldPage = store.getState().pages.get(internalPage.path);
381
+ const contextModified = !!oldPage && !_.isEqual(oldPage.context, internalPage.context);
382
+ const componentModified = !!oldPage && !_.isEqual(oldPage.component, internalPage.component);
383
+ const slicesModified = !!oldPage && !_.isEqual(oldPage.slices, internalPage.slices);
384
+ const alternateSlashPath = page.path.endsWith(`/`) ? page.path.slice(0, -1) : page.path + `/`;
385
+ if (store.getState().pages.has(alternateSlashPath)) {
386
+ report.warn(chalk.bold.yellow(`Non-deterministic routing danger: `) + `Attempting to create page: "${page.path}", but page "${alternateSlashPath}" already exists\n` + chalk.bold.yellow(`This could lead to non-deterministic routing behavior`));
387
+ }
388
+
389
+ // just so it's easier to c&p from createPage action creator for now - ideally it's DRYed
390
+ const {
391
+ updatedAt,
392
+ ...node
393
+ } = internalPage;
394
+ node.children = [];
395
+ node.internal = {
396
+ type: `SitePage`,
397
+ contentDigest: createContentDigest(node)
398
+ };
399
+ node.id = `SitePage ${internalPage.path}`;
400
+ const oldNode = getNode(node.id);
401
+ let deleteActions;
402
+ let updateNodeAction;
403
+ // marking internal-data-bridge as owner of SitePage instead of plugin that calls createPage
404
+ if (oldNode && !hasNodeChanged(node.id, node.internal.contentDigest)) {
405
+ updateNodeAction = {
406
+ ...actionOptions,
407
+ plugin: {
408
+ name: `internal-data-bridge`
409
+ },
410
+ type: `TOUCH_NODE`,
411
+ typeName: node.internal.type,
412
+ payload: node.id
413
+ };
414
+ } else {
415
+ // Remove any previously created descendant nodes as they're all due
416
+ // to be recreated.
417
+ if (oldNode) {
418
+ const createDeleteAction = node => {
419
+ return {
420
+ ...actionOptions,
421
+ type: `DELETE_NODE`,
422
+ plugin: {
423
+ name: `internal-data-bridge`
424
+ },
425
+ payload: node,
426
+ isRecursiveChildrenDelete: true
427
+ };
428
+ };
429
+ deleteActions = findChildren(oldNode.children).map(getNode).map(createDeleteAction);
430
+ }
431
+ node.internal.counter = getNextNodeCounter();
432
+ updateNodeAction = {
433
+ ...actionOptions,
434
+ type: `CREATE_NODE`,
435
+ plugin: {
436
+ name: `internal-data-bridge`
437
+ },
438
+ oldNode,
439
+ payload: node
440
+ };
441
+ }
442
+
443
+ // Sanitize page object so we don't attempt to serialize user-provided objects that are not serializable later
444
+ const sanitizedPayload = (0, _sanitizeNode.sanitizeNode)(internalPage);
445
+ const actions = [{
446
+ ...actionOptions,
447
+ type: `CREATE_PAGE`,
448
+ contextModified,
449
+ componentModified,
450
+ slicesModified,
451
+ plugin,
452
+ payload: sanitizedPayload
453
+ }];
454
+ if (deleteActions && deleteActions.length) {
455
+ actions.push(...deleteActions);
456
+ }
457
+ actions.push(updateNodeAction);
458
+ return actions;
459
+ };
460
+
461
+ /**
462
+ * Delete a node
463
+ * @param {object} node A node object. See the "createNode" action for more information about the node object details.
464
+ * @example
465
+ * deleteNode(node)
466
+ */
467
+ actions.deleteNode = (node, plugin) => {
468
+ const id = node && node.id;
469
+
470
+ // Always get node from the store, as the node we get as an arg
471
+ // might already have been deleted.
472
+ const internalNode = getNode(id);
473
+ const createDeleteAction = node => {
474
+ return {
475
+ type: `DELETE_NODE`,
476
+ plugin,
477
+ payload: node,
478
+ // main node need to be owned by plugin that calls deleteNode
479
+ // child nodes should skip ownership check
480
+ isRecursiveChildrenDelete: node !== internalNode
481
+ };
482
+ };
483
+ const deleteAction = createDeleteAction(internalNode);
484
+
485
+ // It's possible the file node was never created as sometimes tools will
486
+ // write and then immediately delete temporary files to the file system.
487
+ const deleteDescendantsActions = internalNode && findChildren(internalNode.children).map(getNode).map(createDeleteAction);
488
+ if (deleteDescendantsActions && deleteDescendantsActions.length) {
489
+ return [...deleteDescendantsActions, deleteAction];
490
+ } else {
491
+ return deleteAction;
492
+ }
493
+ };
494
+
495
+ // We add a counter to node.internal for fast comparisons/intersections
496
+ // of various node slices. The counter must increase even across builds.
497
+ function getNextNodeCounter() {
498
+ var _store$getState$statu;
499
+ const lastNodeCounter = (_store$getState$statu = store.getState().status.LAST_NODE_COUNTER) !== null && _store$getState$statu !== void 0 ? _store$getState$statu : 0;
500
+ if (lastNodeCounter >= Number.MAX_SAFE_INTEGER) {
501
+ throw new Error(`Could not create more nodes. Maximum node count is reached: ${lastNodeCounter}`);
502
+ }
503
+ return lastNodeCounter + 1;
504
+ }
505
+
506
+ // memberof notation is added so this code can be referenced instead of the wrapper.
507
+ /**
508
+ * Create a new node.
509
+ * @memberof actions
510
+ * @param {Object} node a node object
511
+ * @param {string} node.id The node's ID. Must be globally unique.
512
+ * @param {string} node.parent The ID of the parent's node. If the node is
513
+ * derived from another node, set that node as the parent. Otherwise it can
514
+ * just be `null`.
515
+ * @param {Array} node.children An array of children node IDs. If you're
516
+ * creating the children nodes while creating the parent node, add the
517
+ * children node IDs here directly. If you're adding a child node to a
518
+ * parent node created by a plugin, you can't mutate this value directly
519
+ * to add your node id, instead use the action creator `createParentChildLink`.
520
+ * @param {Object} node.internal node fields that aren't generally
521
+ * interesting to consumers of node data but are very useful for plugin writers
522
+ * and Gatsby core. Only fields described below are allowed in `internal` object.
523
+ * Using any type of custom fields will result in validation errors.
524
+ * @param {string} node.internal.mediaType An optional field to indicate to
525
+ * transformer plugins that your node has raw content they can transform.
526
+ * Use either an official media type (we use mime-db as our source
527
+ * (https://www.npmjs.com/package/mime-db) or a made-up one if your data
528
+ * doesn't fit in any existing bucket. Transformer plugins use node media types
529
+ * for deciding if they should transform a node into a new one. E.g.
530
+ * markdown transformers look for media types of
531
+ * `text/markdown`.
532
+ * @param {string} node.internal.type An arbitrary globally unique type
533
+ * chosen by the plugin creating the node. Should be descriptive of the
534
+ * node as the type is used in forming GraphQL types so users will query
535
+ * for nodes based on the type chosen here. Nodes of a given type can
536
+ * only be created by one plugin.
537
+ * @param {string} node.internal.content An optional field. This is rarely
538
+ * used. It is used when a source plugin sources data it doesn't know how
539
+ * to transform e.g. a markdown string pulled from an API. The source plugin
540
+ * can defer the transformation to a specialized transformer plugin like
541
+ * gatsby-transformer-remark. This `content` field holds the raw content
542
+ * (so for the markdown case, the markdown string).
543
+ *
544
+ * Data that's already structured should be added to the top-level of the node
545
+ * object and _not_ added here. You should not `JSON.stringify` your node's
546
+ * data here.
547
+ *
548
+ * If the content is very large and can be lazy-loaded, e.g. a file on disk,
549
+ * you can define a `loadNodeContent` function for this node and the node
550
+ * content will be lazy loaded when it's needed.
551
+ * @param {string} node.internal.contentDigest the digest for the content
552
+ * of this node. Helps Gatsby avoid doing extra work on data that hasn't
553
+ * changed.
554
+ * @param {string} node.internal.description An optional field. Human
555
+ * readable description of what this node represent / its source. It will
556
+ * be displayed when type conflicts are found, making it easier to find
557
+ * and correct type conflicts.
558
+ * @param {string} node.internal.contentFilePath An optional field. A plugin
559
+ * can add an absolute path to a content file (e.g. markdown file) here
560
+ * while creating the node. Example: gatsby-plugin-mdx adds the absolute path
561
+ * of the `File` node to the `Mdx` node under `internal.contentFilePath`.
562
+ * @returns {Promise} The returned Promise resolves when all cascading
563
+ * `onCreateNode` API calls triggered by `createNode` have finished.
564
+ * @example
565
+ * createNode({
566
+ * // Data for the node.
567
+ * field1: `a string`,
568
+ * field2: 10,
569
+ * field3: true,
570
+ * ...arbitraryOtherData,
571
+ *
572
+ * // Required fields.
573
+ * id: `a-node-id`,
574
+ * parent: `the-id-of-the-parent-node`, // or null if it's a source node without a parent
575
+ * children: [],
576
+ * internal: {
577
+ * type: `CoolServiceMarkdownField`,
578
+ * contentDigest: crypto
579
+ * .createHash(`md5`)
580
+ * .update(JSON.stringify(fieldData))
581
+ * .digest(`hex`),
582
+ * mediaType: `text/markdown`, // optional
583
+ * content: JSON.stringify(fieldData), // optional
584
+ * description: `Cool Service: "Title of entry"`, // optional
585
+ * }
586
+ * })
587
+ */
588
+ const createNode = (node, plugin, actionOptions = {}) => {
589
+ if (!_.isObject(node)) {
590
+ return console.log(chalk.bold.red(`The node passed to the "createNode" action creator must be an object`));
591
+ }
592
+
593
+ // Ensure the new node has an internals object.
594
+ if (!node.internal) {
595
+ node.internal = {};
596
+ }
597
+
598
+ // Ensure the new node has a children array.
599
+ if (!node.array && !_.isArray(node.children)) {
600
+ node.children = [];
601
+ }
602
+
603
+ // Ensure the new node has a parent field
604
+ if (!node.parent) {
605
+ node.parent = null;
606
+ }
607
+
608
+ // Tell user not to set the owner name themself.
609
+ if (node.internal.owner) {
610
+ report.error(JSON.stringify(node, null, 4));
611
+ report.panic(chalk.bold.red(`The node internal.owner field is set automatically by Gatsby and not by plugins`));
612
+ }
613
+ const trackParams = {};
614
+ // Add the plugin name to the internal object.
615
+ if (plugin) {
616
+ node.internal.owner = plugin.name;
617
+ trackParams[`pluginName`] = `${plugin.name}@${plugin.version}`;
618
+ }
619
+ const result = _joi.nodeSchema.validate(node);
620
+ if (result.error) {
621
+ if (!hasErroredBecauseOfNodeValidation.has(result.error.message)) {
622
+ const errorObj = {
623
+ id: `11467`,
624
+ context: {
625
+ validationErrorMessage: result.error.message,
626
+ node
627
+ }
628
+ };
629
+ const possiblyCodeFrame = getNonGatsbyCodeFrame();
630
+ if (possiblyCodeFrame) {
631
+ errorObj.context.codeFrame = possiblyCodeFrame.codeFrame;
632
+ errorObj.filePath = possiblyCodeFrame.fileName;
633
+ errorObj.location = {
634
+ start: {
635
+ line: possiblyCodeFrame.line,
636
+ column: possiblyCodeFrame.column
637
+ }
638
+ };
639
+ }
640
+ report.error(errorObj);
641
+ hasErroredBecauseOfNodeValidation.add(result.error.message);
642
+ }
643
+ return {
644
+ type: `VALIDATION_ERROR`,
645
+ error: true
646
+ };
647
+ }
648
+
649
+ // Ensure node isn't directly setting fields.
650
+ if (node.fields) {
651
+ throw new Error(stripIndent`
652
+ Plugins creating nodes can not set data on the reserved field "fields"
653
+ as this is reserved for plugins which wish to extend your nodes.
654
+
655
+ If your plugin didn't add "fields" you're probably seeing this
656
+ error because you're reusing an old node object.
657
+
658
+ Node:
659
+
660
+ ${JSON.stringify(node, null, 4)}
661
+
662
+ Plugin that created the node:
663
+
664
+ ${JSON.stringify(plugin, null, 4)}
665
+ `);
666
+ }
667
+ node = (0, _sanitizeNode.sanitizeNode)(node);
668
+ const oldNode = getNode(node.id);
669
+ if (actionOptions.parentSpan) {
670
+ actionOptions.parentSpan.setTag(`nodeId`, node.id);
671
+ actionOptions.parentSpan.setTag(`nodeType`, node.id);
672
+ }
673
+ let deleteActions;
674
+ let updateNodeAction;
675
+ // Check if the node has already been processed.
676
+ if (oldNode && !hasNodeChanged(node.id, node.internal.contentDigest)) {
677
+ updateNodeAction = {
678
+ ...actionOptions,
679
+ plugin,
680
+ type: `TOUCH_NODE`,
681
+ payload: node.id,
682
+ typeName: node.internal.type
683
+ };
684
+ } else {
685
+ // Remove any previously created descendant nodes as they're all due
686
+ // to be recreated.
687
+ if (oldNode) {
688
+ const createDeleteAction = node => {
689
+ return {
690
+ ...actionOptions,
691
+ type: `DELETE_NODE`,
692
+ plugin,
693
+ payload: node,
694
+ isRecursiveChildrenDelete: true
695
+ };
696
+ };
697
+ deleteActions = findChildren(oldNode.children).map(getNode).map(createDeleteAction);
698
+ }
699
+ node.internal.counter = getNextNodeCounter();
700
+ updateNodeAction = {
701
+ ...actionOptions,
702
+ type: `CREATE_NODE`,
703
+ plugin,
704
+ oldNode,
705
+ payload: node
706
+ };
707
+ }
708
+ if (deleteActions && deleteActions.length) {
709
+ return [...deleteActions, updateNodeAction];
710
+ } else {
711
+ return updateNodeAction;
712
+ }
713
+ };
714
+ actions.createNode = (...args) => dispatch => {
715
+ const actions = createNode(...args);
716
+ dispatch(actions);
717
+ const createNodeAction = (Array.isArray(actions) ? actions : [actions]).find(action => action.type === `CREATE_NODE`);
718
+ if (!createNodeAction) {
719
+ return Promise.resolve(undefined);
720
+ }
721
+ const {
722
+ payload: node,
723
+ traceId,
724
+ parentSpan
725
+ } = createNodeAction;
726
+ const maybePromise = apiRunnerNode(`onCreateNode`, {
727
+ node: (0, _detectNodeMutations.wrapNode)(node),
728
+ traceId,
729
+ parentSpan,
730
+ traceTags: {
731
+ nodeId: node.id,
732
+ nodeType: node.internal.type
733
+ }
734
+ });
735
+ if (maybePromise !== null && maybePromise !== void 0 && maybePromise.then) {
736
+ return maybePromise.then(res => getDataStore().ready().then(() => res));
737
+ } else {
738
+ return getDataStore().ready().then(() => maybePromise);
739
+ }
740
+ };
741
+
742
+ /**
743
+ * "Touch" a node. Tells Gatsby a node still exists and shouldn't
744
+ * be garbage collected. Primarily useful for source plugins fetching
745
+ * nodes from a remote system that can return only nodes that have
746
+ * updated. The source plugin then touches all the nodes that haven't
747
+ * updated but still exist so Gatsby knows to keep them.
748
+ * @param {Object} node A node object. See the "createNode" action for more information about the node object details.
749
+ * @example
750
+ * touchNode(node)
751
+ */
752
+ actions.touchNode = (node, plugin) => {
753
+ const nodeId = node === null || node === void 0 ? void 0 : node.id;
754
+ if (!nodeId) {
755
+ // if we don't have a node id, we don't want to dispatch this action
756
+ return [];
757
+ }
758
+ return {
759
+ type: `TOUCH_NODE`,
760
+ plugin,
761
+ payload: nodeId,
762
+ typeName: node.internal.type
763
+ };
764
+ };
765
+ /**
766
+ * Extend another node. The new node field is placed under the `fields`
767
+ * key on the extended node object.
768
+ *
769
+ * Once a plugin has claimed a field name the field name can't be used by
770
+ * other plugins. Also since nodes are immutable, you can't mutate the node
771
+ * directly. So to extend another node, use this.
772
+ * @param {Object} $0
773
+ * @param {Object} $0.node the target node object
774
+ * @param {string} $0.name the name for the field
775
+ * @param {any} $0.value the value for the field
776
+ * @example
777
+ * createNodeField({
778
+ * node,
779
+ * name: `happiness`,
780
+ * value: `is sweet graphql queries`
781
+ * })
782
+ *
783
+ * // The field value is now accessible at node.fields.happiness
784
+ */
785
+ actions.createNodeField = ({
786
+ node,
787
+ name,
788
+ value
789
+ }, plugin, actionOptions) => {
790
+ // Ensure required fields are set.
791
+ if (!node.internal.fieldOwners) {
792
+ node.internal.fieldOwners = {};
793
+ }
794
+ if (!node.fields) {
795
+ node.fields = {};
796
+ }
797
+
798
+ // Normalized name of the field that will be used in schema
799
+ const schemaFieldName = _.includes(name, `___NODE`) ? name.split(`___`)[0] : name;
800
+
801
+ // Check that this field isn't owned by another plugin.
802
+ const fieldOwner = node.internal.fieldOwners[schemaFieldName];
803
+ if (fieldOwner && fieldOwner !== plugin.name) {
804
+ throw new Error(stripIndent`
805
+ A plugin tried to update a node field that it doesn't own:
806
+
807
+ Node id: ${node.id}
808
+ Plugin: ${plugin.name}
809
+ name: ${name}
810
+ value: ${value}
811
+ `);
812
+ }
813
+
814
+ // Update node
815
+ node.fields[name] = value;
816
+ node.internal.fieldOwners[schemaFieldName] = plugin.name;
817
+ node = (0, _sanitizeNode.sanitizeNode)(node);
818
+ return {
819
+ ...actionOptions,
820
+ type: `ADD_FIELD_TO_NODE`,
821
+ plugin,
822
+ payload: node,
823
+ addedField: name
824
+ };
825
+ };
826
+
827
+ /**
828
+ * Creates a link between a parent and child node. This is used when you
829
+ * transform content from a node creating a new child node. You need to add
830
+ * this new child node to the `children` array of the parent but since you
831
+ * don't have direct access to the immutable parent node, use this action
832
+ * instead.
833
+ * @param {Object} $0
834
+ * @param {Object} $0.parent the parent node object
835
+ * @param {Object} $0.child the child node object
836
+ * @example
837
+ * createParentChildLink({ parent: parentNode, child: childNode })
838
+ */
839
+ actions.createParentChildLink = ({
840
+ parent,
841
+ child
842
+ }, plugin) => {
843
+ if (!parent.children.includes(child.id)) {
844
+ parent.children.push(child.id);
845
+ }
846
+ return {
847
+ type: `ADD_CHILD_NODE_TO_PARENT_NODE`,
848
+ plugin,
849
+ payload: parent
850
+ };
851
+ };
852
+
853
+ /**
854
+ * Merge additional configuration into the current webpack config. A few
855
+ * configurations options will be ignored if set, in order to try prevent accidental breakage.
856
+ * Specifically, any change to `entry`, `output`, `target`, or `resolveLoaders` will be ignored.
857
+ *
858
+ * For full control over the webpack config, use `replaceWebpackConfig()`.
859
+ *
860
+ * @param {Object} config partial webpack config, to be merged into the current one
861
+ */
862
+ actions.setWebpackConfig = (config, plugin = null) => {
863
+ var _config$node;
864
+ if (((_config$node = config.node) === null || _config$node === void 0 ? void 0 : _config$node.fs) === `empty`) {
865
+ report.warn(`[deprecated${plugin ? ` ` + plugin.name : ``}] node.fs is deprecated. Please set "resolve.fallback.fs = false".`);
866
+ delete config.node.fs;
867
+ config.resolve = config.resolve || {};
868
+ config.resolve.fallback = config.resolve.fallback || {};
869
+ config.resolve.fallback.fs = false;
870
+ }
871
+ return {
872
+ type: `SET_WEBPACK_CONFIG`,
873
+ plugin,
874
+ payload: config
875
+ };
876
+ };
877
+
878
+ /**
879
+ * Completely replace the webpack config for the current stage. This can be
880
+ * dangerous and break Gatsby if certain configuration options are changed.
881
+ *
882
+ * Generally only useful for cases where you need to handle config merging logic
883
+ * yourself, in which case consider using `webpack-merge`.
884
+ *
885
+ * @param {Object} config complete webpack config
886
+ */
887
+ actions.replaceWebpackConfig = (config, plugin = null) => {
888
+ var _config$node2;
889
+ if (((_config$node2 = config.node) === null || _config$node2 === void 0 ? void 0 : _config$node2.fs) === `empty`) {
890
+ report.warn(`[deprecated${plugin ? ` ` + plugin.name : ``}] node.fs is deprecated. Please set "resolve.fallback.fs = false".`);
891
+ delete config.node.fs;
892
+ config.resolve = config.resolve || {};
893
+ config.resolve.fallback = config.resolve.fallback || {};
894
+ config.resolve.fallback.fs = false;
895
+ }
896
+ return {
897
+ type: `REPLACE_WEBPACK_CONFIG`,
898
+ plugin,
899
+ payload: config
900
+ };
901
+ };
902
+
903
+ /**
904
+ * Set top-level Babel options. Plugins and presets will be ignored. Use
905
+ * setBabelPlugin and setBabelPreset for this.
906
+ * @param {Object} config An options object in the shape of a normal babelrc JavaScript object
907
+ * @example
908
+ * setBabelOptions({
909
+ * options: {
910
+ * sourceMaps: `inline`,
911
+ * }
912
+ * })
913
+ */
914
+ actions.setBabelOptions = (options, plugin = null) => {
915
+ // Validate
916
+ let name = `The plugin "${plugin.name}"`;
917
+ if (plugin.name === `default-site-plugin`) {
918
+ name = `Your site's "gatsby-node.js"`;
919
+ }
920
+ if (!_.isObject(options)) {
921
+ console.log(`${name} must pass an object to "setBabelOptions"`);
922
+ console.log(JSON.stringify(options, null, 4));
923
+ if (isNotTestEnv) {
924
+ process.exit(1);
925
+ }
926
+ }
927
+ if (!_.isObject(options.options)) {
928
+ console.log(`${name} must pass options to "setBabelOptions"`);
929
+ console.log(JSON.stringify(options, null, 4));
930
+ if (isNotTestEnv) {
931
+ process.exit(1);
932
+ }
933
+ }
934
+ return {
935
+ type: `SET_BABEL_OPTIONS`,
936
+ plugin,
937
+ payload: options
938
+ };
939
+ };
940
+
941
+ /**
942
+ * Add new plugins or merge options into existing Babel plugins.
943
+ * @param {Object} config A config object describing the Babel plugin to be added.
944
+ * @param {string} config.name The name of the Babel plugin
945
+ * @param {Object} config.options Options to pass to the Babel plugin.
946
+ * @example
947
+ * setBabelPlugin({
948
+ * name: `@emotion/babel-plugin`,
949
+ * options: {
950
+ * sourceMap: true,
951
+ * },
952
+ * })
953
+ */
954
+ actions.setBabelPlugin = (config, plugin = null) => {
955
+ // Validate
956
+ let name = `The plugin "${plugin.name}"`;
957
+ if (plugin.name === `default-site-plugin`) {
958
+ name = `Your site's "gatsby-node.js"`;
959
+ }
960
+ if (!config.name) {
961
+ console.log(`${name} must set the name of the Babel plugin`);
962
+ console.log(JSON.stringify(config, null, 4));
963
+ if (isNotTestEnv) {
964
+ process.exit(1);
965
+ }
966
+ }
967
+ if (!config.options) {
968
+ config.options = {};
969
+ }
970
+ return {
971
+ type: `SET_BABEL_PLUGIN`,
972
+ plugin,
973
+ payload: config
974
+ };
975
+ };
976
+
977
+ /**
978
+ * Add new presets or merge options into existing Babel presets.
979
+ * @param {Object} config A config object describing the Babel plugin to be added.
980
+ * @param {string} config.name The name of the Babel preset.
981
+ * @param {Object} config.options Options to pass to the Babel preset.
982
+ * @example
983
+ * setBabelPreset({
984
+ * name: `@babel/preset-react`,
985
+ * options: {
986
+ * pragma: `Glamor.createElement`,
987
+ * },
988
+ * })
989
+ */
990
+ actions.setBabelPreset = (config, plugin = null) => {
991
+ // Validate
992
+ let name = `The plugin "${plugin.name}"`;
993
+ if (plugin.name === `default-site-plugin`) {
994
+ name = `Your site's "gatsby-node.js"`;
995
+ }
996
+ if (!config.name) {
997
+ console.log(`${name} must set the name of the Babel preset`);
998
+ console.log(JSON.stringify(config, null, 4));
999
+ if (isNotTestEnv) {
1000
+ process.exit(1);
1001
+ }
1002
+ }
1003
+ if (!config.options) {
1004
+ config.options = {};
1005
+ }
1006
+ return {
1007
+ type: `SET_BABEL_PRESET`,
1008
+ plugin,
1009
+ payload: config
1010
+ };
1011
+ };
1012
+
1013
+ /**
1014
+ * DEPRECATED. Use createJobV2 instead.
1015
+ *
1016
+ * Create a "job". This is a long-running process that is generally
1017
+ * started as a side-effect to a GraphQL query.
1018
+ * [`gatsby-plugin-sharp`](/plugins/gatsby-plugin-sharp/) uses this for
1019
+ * example.
1020
+ *
1021
+ * Gatsby doesn't finish its process until all jobs are ended.
1022
+ * @param {Object} job A job object with at least an id set
1023
+ * @param {id} job.id The id of the job
1024
+ * @deprecated Use "createJobV2" instead
1025
+ * @example
1026
+ * createJob({ id: `write file id: 123`, fileName: `something.jpeg` })
1027
+ */
1028
+ actions.createJob = (job, plugin = null) => {
1029
+ let msg = `Action "createJob" is deprecated. Please use "createJobV2" instead`;
1030
+ if (plugin !== null && plugin !== void 0 && plugin.name) {
1031
+ msg = msg + ` (called by ${plugin.name})`;
1032
+ }
1033
+ (0, _reportOnce.reportOnce)(msg);
1034
+ return {
1035
+ type: `CREATE_JOB`,
1036
+ plugin,
1037
+ payload: job
1038
+ };
1039
+ };
1040
+
1041
+ /**
1042
+ * Create a "job". This is a long-running process that is generally
1043
+ * started as a side-effect to a GraphQL query.
1044
+ * [`gatsby-plugin-sharp`](/plugins/gatsby-plugin-sharp/) uses this for
1045
+ * example.
1046
+ *
1047
+ * Gatsby doesn't finish its process until all jobs are ended.
1048
+ * @param {Object} job A job object with name, inputPaths, outputDir and args
1049
+ * @param {string} job.name The name of the job you want to execute
1050
+ * @param {string[]} job.inputPaths The inputPaths that are needed to run
1051
+ * @param {string} job.outputDir The directory where all files are being saved to
1052
+ * @param {Object} job.args The arguments the job needs to execute
1053
+ * @returns {Promise<object>} Promise to see if the job is done executing
1054
+ * @example
1055
+ * createJobV2({ name: `IMAGE_PROCESSING`, inputPaths: [`something.jpeg`], outputDir: `public/static`, args: { width: 100, height: 100 } })
1056
+ */
1057
+ actions.createJobV2 = (job, plugin) => (dispatch, getState) => {
1058
+ const internalJob = createInternalJob(job, plugin);
1059
+ const maybeWorkerPromise = (0, _workerMessaging.maybeSendJobToMainProcess)(internalJob);
1060
+ if (maybeWorkerPromise) {
1061
+ return maybeWorkerPromise;
1062
+ }
1063
+ return (0, _internal.createJobV2FromInternalJob)(internalJob)(dispatch, getState);
1064
+ };
1065
+ actions.addGatsbyImageSourceUrl = sourceUrl => {
1066
+ return {
1067
+ type: `PROCESS_GATSBY_IMAGE_SOURCE_URL`,
1068
+ payload: {
1069
+ sourceUrl
1070
+ }
1071
+ };
1072
+ };
1073
+
1074
+ /**
1075
+ * DEPRECATED. Use createJobV2 instead.
1076
+ *
1077
+ * Set (update) a "job". Sometimes on really long running jobs you want
1078
+ * to update the job as it continues.
1079
+ *
1080
+ * @param {Object} job A job object with at least an id set
1081
+ * @param {id} job.id The id of the job
1082
+ * @deprecated Use "createJobV2" instead
1083
+ * @example
1084
+ * setJob({ id: `write file id: 123`, progress: 50 })
1085
+ */
1086
+ actions.setJob = (job, plugin = null) => {
1087
+ let msg = `Action "setJob" is deprecated. Please use "createJobV2" instead`;
1088
+ if (plugin !== null && plugin !== void 0 && plugin.name) {
1089
+ msg = msg + ` (called by ${plugin.name})`;
1090
+ }
1091
+ (0, _reportOnce.reportOnce)(msg);
1092
+ return {
1093
+ type: `SET_JOB`,
1094
+ plugin,
1095
+ payload: job
1096
+ };
1097
+ };
1098
+
1099
+ /**
1100
+ * DEPRECATED. Use createJobV2 instead.
1101
+ *
1102
+ * End a "job".
1103
+ *
1104
+ * Gatsby doesn't finish its process until all jobs are ended.
1105
+ * @param {Object} job A job object with at least an id set
1106
+ * @param {id} job.id The id of the job
1107
+ * @deprecated Use "createJobV2" instead
1108
+ * @example
1109
+ * endJob({ id: `write file id: 123` })
1110
+ */
1111
+ actions.endJob = (job, plugin = null) => {
1112
+ let msg = `Action "endJob" is deprecated. Please use "createJobV2" instead`;
1113
+ if (plugin !== null && plugin !== void 0 && plugin.name) {
1114
+ msg = msg + ` (called by ${plugin.name})`;
1115
+ }
1116
+ (0, _reportOnce.reportOnce)(msg);
1117
+ return {
1118
+ type: `END_JOB`,
1119
+ plugin,
1120
+ payload: job
1121
+ };
1122
+ };
1123
+
1124
+ /**
1125
+ * Set plugin status. A plugin can use this to save status keys e.g. the last
1126
+ * it fetched something. These values are persisted between runs of Gatsby.
1127
+ *
1128
+ * @param {Object} status An object with arbitrary values set
1129
+ * @example
1130
+ * setPluginStatus({ lastFetched: Date.now() })
1131
+ */
1132
+ actions.setPluginStatus = (status, plugin) => {
1133
+ return {
1134
+ type: `SET_PLUGIN_STATUS`,
1135
+ plugin,
1136
+ payload: status
1137
+ };
1138
+ };
1139
+
1140
+ // Check if path is absolute and add pathPrefix in front if it's not
1141
+ const maybeAddPathPrefix = (path, pathPrefix) => {
1142
+ const parsed = url.parse(path);
1143
+ const isRelativeProtocol = path.startsWith(`//`);
1144
+ return `${parsed.protocol != null || isRelativeProtocol ? `` : pathPrefix}${path}`;
1145
+ };
1146
+
1147
+ /**
1148
+ * Create a redirect from one page to another.
1149
+ *
1150
+ * Redirects must be implemented by your deployment platform (e.g. Gatsby Cloud, Netlify, etc.). You can use an [adapter](/docs/how-to/previews-deploys-hosting/adapters/) or plugins for this. Alternatively, you can use [gatsby-plugin-meta-redirect](/plugins/gatsby-plugin-meta-redirect/) to generate meta redirect HTML files for redirecting on any static file host.
1151
+ *
1152
+ * You can read the source code of [gatsby-adapter-netlify](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-adapter-netlify) to see how redirects are implemented on Netlify. Redirects also work out of the box on Gatsby Cloud.
1153
+ *
1154
+ * Keep the redirects configuration in sync with trailing slash configuration from [Gatsby Config API](/docs/reference/config-files/gatsby-config/#trailingslash).
1155
+ *
1156
+ * @param {Object} redirect Redirect data
1157
+ * @param {string} redirect.fromPath Any valid URL. Must start with a forward slash
1158
+ * @param {boolean} redirect.isPermanent This is a permanent redirect; defaults to temporary
1159
+ * @param {string} redirect.toPath URL of a created page (see `createPage`)
1160
+ * @param {boolean} redirect.redirectInBrowser Redirects are generally for redirecting legacy URLs to their new configuration on the server. If you can't update your UI for some reason, set `redirectInBrowser` to true and Gatsby will handle redirecting in the client as well. You almost never need this so be sure your use case fits before enabling.
1161
+ * @param {boolean} redirect.force (Plugin-specific) Will trigger the redirect even if the `fromPath` matches a piece of content. This is not part of the Gatsby API, but implemented by (some) plugins that configure hosting provider redirects
1162
+ * @param {number} redirect.statusCode (Plugin-specific) Manually set the HTTP status code. This allows you to create a rewrite (status code 200) or custom error page (status code 404). Note that this will override the `isPermanent` option which also sets the status code. This is not part of the Gatsby API, but implemented by (some) plugins that configure hosting provider redirects
1163
+ * @param {boolean} redirect.ignoreCase (Plugin-specific) Ignore case when looking for redirects
1164
+ * @param {Object} redirect.conditions Specify a country or language based redirect
1165
+ * @param {(string|string[])} redirect.conditions.country A two-letter country code based on the regional indicator symbol
1166
+ * @param {(string|string[])} redirect.conditions.language A two-letter identifier defined by ISO 639-1
1167
+ * @example
1168
+ * // Generally you create redirects while creating pages.
1169
+ * exports.createPages = ({ graphql, actions }) => {
1170
+ * const { createRedirect } = actions
1171
+ *
1172
+ * createRedirect({ fromPath: '/old-url/', toPath: '/new-url/', isPermanent: true })
1173
+ * createRedirect({ fromPath: '/url/', toPath: '/zn-CH/url/', conditions: { language: 'zn' }})
1174
+ * createRedirect({ fromPath: '/url/', toPath: '/en/url/', conditions: { language: ['ca', 'us'] }})
1175
+ * createRedirect({ fromPath: '/url/', toPath: '/ca/url/', conditions: { country: 'ca' }})
1176
+ * createRedirect({ fromPath: '/url/', toPath: '/en/url/', conditions: { country: ['ca', 'us'] }})
1177
+ * createRedirect({ fromPath: '/not_so-pretty_url/', toPath: '/pretty/url/', statusCode: 200 })
1178
+ *
1179
+ * // Create pages here
1180
+ * }
1181
+ */
1182
+ actions.createRedirect = ({
1183
+ fromPath,
1184
+ isPermanent = false,
1185
+ redirectInBrowser = false,
1186
+ toPath,
1187
+ ignoreCase = true,
1188
+ ...rest
1189
+ }) => {
1190
+ let pathPrefix = ``;
1191
+ if (store.getState().program.prefixPaths) {
1192
+ pathPrefix = store.getState().config.pathPrefix;
1193
+ }
1194
+ return {
1195
+ type: `CREATE_REDIRECT`,
1196
+ payload: {
1197
+ fromPath: maybeAddPathPrefix(fromPath, pathPrefix),
1198
+ isPermanent,
1199
+ ignoreCase,
1200
+ redirectInBrowser,
1201
+ toPath: maybeAddPathPrefix(toPath, pathPrefix),
1202
+ ...rest
1203
+ }
1204
+ };
1205
+ };
1206
+
1207
+ /**
1208
+ * Create a dependency between a page and data.
1209
+ *
1210
+ * @param {Object} $0
1211
+ * @param {string} $0.path the path to the page
1212
+ * @param {string} $0.nodeId A node ID
1213
+ * @param {string} $0.connection A connection type
1214
+ * @private
1215
+ */
1216
+ actions.createPageDependency = ({
1217
+ path,
1218
+ nodeId,
1219
+ connection
1220
+ }, plugin = ``) => {
1221
+ console.warn(`Calling "createPageDependency" directly from actions in deprecated. Use "createPageDependency" from "gatsby/dist/redux/actions/add-page-dependency".`);
1222
+ return {
1223
+ type: `CREATE_COMPONENT_DEPENDENCY`,
1224
+ plugin,
1225
+ payload: [{
1226
+ path,
1227
+ nodeId,
1228
+ connection
1229
+ }]
1230
+ };
1231
+ };
1232
+
1233
+ /**
1234
+ * Record that a page was visited on the server..
1235
+ *
1236
+ * @param {Object} $0
1237
+ * @param {string} $0.id the chunkName for the page component.
1238
+ */
1239
+ actions.createServerVisitedPage = chunkName => {
1240
+ var _store$getState$visit;
1241
+ if ((_store$getState$visit = store.getState().visitedPages.get(`server`)) !== null && _store$getState$visit !== void 0 && _store$getState$visit.has(chunkName)) {
1242
+ // we already have given chunk tracked, let's not emit `CREATE_SERVER_VISITED_PAGE`
1243
+ // action to not cause any additional work
1244
+ return [];
1245
+ }
1246
+ return {
1247
+ type: `CREATE_SERVER_VISITED_PAGE`,
1248
+ payload: {
1249
+ componentChunkName: chunkName
1250
+ }
1251
+ };
1252
+ };
1253
+
1254
+ /**
1255
+ * Creates an individual node manifest.
1256
+ * This is used to tie the unique revision state within a data source at the current point in time to a page generated from the provided node when it's node manifest is processed.
1257
+ *
1258
+ * @param {Object} manifest Manifest data
1259
+ * @param {string} manifest.manifestId An id which ties the unique revision state of this manifest to the unique revision state of a data source.
1260
+ * @param {Object} manifest.node The Gatsby node to tie the manifestId to. See the "createNode" action for more information about the node object details.
1261
+ * @param {string} manifest.updatedAtUTC (optional) The time in which the node was last updated. If this parameter is not included, a manifest is created for every node that gets called. By default, node manifests are created for content updated in the last 30 days. To change this, set a `NODE_MANIFEST_MAX_DAYS_OLD` environment variable.
1262
+ * @example
1263
+ * unstable_createNodeManifest({
1264
+ * manifestId: `post-id-1--updated-53154315`,
1265
+ * updatedAtUTC: `2021-07-08T21:52:28.791+01:00`,
1266
+ * node: {
1267
+ * id: `post-id-1`
1268
+ * },
1269
+ * })
1270
+ */
1271
+ actions.unstable_createNodeManifest = ({
1272
+ manifestId,
1273
+ node,
1274
+ updatedAtUTC
1275
+ }, plugin) => {
1276
+ return {
1277
+ type: `CREATE_NODE_MANIFEST`,
1278
+ payload: {
1279
+ manifestId,
1280
+ node,
1281
+ pluginName: plugin.name,
1282
+ updatedAtUTC
1283
+ }
1284
+ };
1285
+ };
1286
+
1287
+ /**
1288
+ * Marks a source plugin as "stateful" which disables automatically deleting untouched nodes. Stateful source plugins manage deleting their own nodes without stale node checks in Gatsby.
1289
+ * Enabling this is a major performance improvement for source plugins that manage their own node deletion. It also lowers the total memory required by a source plugin.
1290
+ * When using this action, check if it's supported first with `hasFeature('stateful-source-nodes')`, `hasFeature` is exported from `gatsby-plugin-utils`.
1291
+ *
1292
+ * @example
1293
+ * import { hasFeature } from "gatsby-plugin-utils"
1294
+ *
1295
+ * exports.sourceNodes = ({ actions }) => {
1296
+ * if (hasFeature(`stateful-source-nodes`)) {
1297
+ * actions.enableStatefulSourceNodes()
1298
+ * } else {
1299
+ * // fallback to old behavior where all nodes are iterated on and touchNode is called.
1300
+ * }
1301
+ * }
1302
+ *
1303
+ * @param {void} $0
1304
+ */
1305
+ actions.enableStatefulSourceNodes = plugin => {
1306
+ return {
1307
+ type: `ENABLE_STATEFUL_SOURCE_PLUGIN`,
1308
+ plugin
1309
+ };
1310
+ };
1311
+
1312
+ /**
1313
+ * Stores request headers for a given domain to be later used when making requests for Image CDN (and potentially other features).
1314
+ *
1315
+ * @param {Object} $0
1316
+ * @param {string} $0.domain The domain to store the headers for.
1317
+ * @param {Object} $0.headers The headers to store.
1318
+ */
1319
+ actions.setRequestHeaders = ({
1320
+ domain,
1321
+ headers
1322
+ }, plugin) => {
1323
+ var _url$parse;
1324
+ const headersIsObject = typeof headers === `object` && headers !== null && !Array.isArray(headers);
1325
+ const noHeaders = !headersIsObject;
1326
+ const noDomain = typeof domain !== `string`;
1327
+ if (noHeaders) {
1328
+ reporter.warn(`Plugin ${plugin.name} called actions.setRequestHeaders with a headers property that isn't an object.`);
1329
+ }
1330
+ if (noDomain) {
1331
+ reporter.warn(`Plugin ${plugin.name} called actions.setRequestHeaders with a domain property that isn't a string.`);
1332
+ }
1333
+ if (noDomain || noHeaders) {
1334
+ reporter.panic(`Plugin ${plugin.name} attempted to set request headers with invalid arguments. See above warnings for more info.`);
1335
+ return null;
1336
+ }
1337
+ const baseDomain = (_url$parse = url.parse(domain)) === null || _url$parse === void 0 ? void 0 : _url$parse.hostname;
1338
+ if (baseDomain) {
1339
+ return {
1340
+ type: `SET_REQUEST_HEADERS`,
1341
+ payload: {
1342
+ domain: baseDomain,
1343
+ headers
1344
+ }
1345
+ };
1346
+ } else {
1347
+ reporter.panic(`Plugin ${plugin.name} attempted to set request headers for a domain that is not a valid URL. (${domain})`);
1348
+ return null;
1349
+ }
1350
+ };
1351
+ module.exports = {
1352
+ actions
1353
+ };
1354
+ //# sourceMappingURL=public.js.map