@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.
- package/LICENSE +22 -0
- package/README.md +142 -0
- package/adapters.js +31 -0
- package/apis.json +73 -0
- package/cache-dir/.eslintrc.json +10 -0
- package/cache-dir/api-runner-browser-plugins.js +14 -0
- package/cache-dir/api-runner-browser.js +52 -0
- package/cache-dir/api-runner-ssr.js +88 -0
- package/cache-dir/api-ssr-docs.js +207 -0
- package/cache-dir/app.js +249 -0
- package/cache-dir/blank.css +0 -0
- package/cache-dir/commonjs/api-runner-browser-plugins.js +17 -0
- package/cache-dir/commonjs/api-runner-browser-plugins.js.map +1 -0
- package/cache-dir/commonjs/api-runner-browser.js +49 -0
- package/cache-dir/commonjs/api-runner-browser.js.map +1 -0
- package/cache-dir/commonjs/api-runner-ssr.js +88 -0
- package/cache-dir/commonjs/api-runner-ssr.js.map +1 -0
- package/cache-dir/commonjs/api-ssr-docs.js +210 -0
- package/cache-dir/commonjs/api-ssr-docs.js.map +1 -0
- package/cache-dir/commonjs/app.js +197 -0
- package/cache-dir/commonjs/app.js.map +1 -0
- package/cache-dir/commonjs/context-utils.js +25 -0
- package/cache-dir/commonjs/context-utils.js.map +1 -0
- package/cache-dir/commonjs/create-content-digest-browser-shim.js +4 -0
- package/cache-dir/commonjs/create-content-digest-browser-shim.js.map +1 -0
- package/cache-dir/commonjs/css-to-object.js +21 -0
- package/cache-dir/commonjs/css-to-object.js.map +1 -0
- package/cache-dir/commonjs/debug-log.js +11 -0
- package/cache-dir/commonjs/debug-log.js.map +1 -0
- package/cache-dir/commonjs/default-html.js +33 -0
- package/cache-dir/commonjs/default-html.js.map +1 -0
- package/cache-dir/commonjs/dev-loader.js +247 -0
- package/cache-dir/commonjs/dev-loader.js.map +1 -0
- package/cache-dir/commonjs/develop-static-entry.js +129 -0
- package/cache-dir/commonjs/develop-static-entry.js.map +1 -0
- package/cache-dir/commonjs/dummy.js +8 -0
- package/cache-dir/commonjs/dummy.js.map +1 -0
- package/cache-dir/commonjs/emitter.js +10 -0
- package/cache-dir/commonjs/emitter.js.map +1 -0
- package/cache-dir/commonjs/ensure-resources.js +107 -0
- package/cache-dir/commonjs/ensure-resources.js.map +1 -0
- package/cache-dir/commonjs/error-overlay-handler.js +35 -0
- package/cache-dir/commonjs/error-overlay-handler.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/accordion.js +80 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/accordion.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/build-error.js +44 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/build-error.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/code-frame.js +38 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/code-frame.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/dev-ssr-error.js +52 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/dev-ssr-error.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/error-boundary.js +31 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/error-boundary.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/getserverdata-error.js +47 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/getserverdata-error.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/graphql-errors.js +77 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/graphql-errors.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/hooks.js +93 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/hooks.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/overlay.js +147 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/overlay.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/runtime-errors.js +110 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/runtime-errors.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/use-id.js +50 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/use-id.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/focus-trap.js +2879 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/focus-trap.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/keys.js +84 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/keys.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/lock-body.js +48 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/lock-body.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/match.js +44 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/match.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/index.js +182 -0
- package/cache-dir/commonjs/fast-refresh-overlay/index.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/style.js +418 -0
- package/cache-dir/commonjs/fast-refresh-overlay/style.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/utils.js +75 -0
- package/cache-dir/commonjs/fast-refresh-overlay/utils.js.map +1 -0
- package/cache-dir/commonjs/find-path.js +145 -0
- package/cache-dir/commonjs/find-path.js.map +1 -0
- package/cache-dir/commonjs/gatsby-browser-entry.js +52 -0
- package/cache-dir/commonjs/gatsby-browser-entry.js.map +1 -0
- package/cache-dir/commonjs/head/components/fire-callback-in-effect.js +18 -0
- package/cache-dir/commonjs/head/components/fire-callback-in-effect.js.map +1 -0
- package/cache-dir/commonjs/head/components/head-components.js +72 -0
- package/cache-dir/commonjs/head/components/head-components.js.map +1 -0
- package/cache-dir/commonjs/head/constants.js +13 -0
- package/cache-dir/commonjs/head/constants.js.map +1 -0
- package/cache-dir/commonjs/head/head-export-handler-for-browser.js +144 -0
- package/cache-dir/commonjs/head/head-export-handler-for-browser.js.map +1 -0
- package/cache-dir/commonjs/head/head-export-handler-for-ssr.js +225 -0
- package/cache-dir/commonjs/head/head-export-handler-for-ssr.js.map +1 -0
- package/cache-dir/commonjs/head/utils.js +264 -0
- package/cache-dir/commonjs/head/utils.js.map +1 -0
- package/cache-dir/commonjs/loader.js +861 -0
- package/cache-dir/commonjs/loader.js.map +1 -0
- package/cache-dir/commonjs/loading-indicator/index.js +25 -0
- package/cache-dir/commonjs/loading-indicator/index.js.map +1 -0
- package/cache-dir/commonjs/loading-indicator/indicator.js +63 -0
- package/cache-dir/commonjs/loading-indicator/indicator.js.map +1 -0
- package/cache-dir/commonjs/loading-indicator/style.js +103 -0
- package/cache-dir/commonjs/loading-indicator/style.js.map +1 -0
- package/cache-dir/commonjs/navigation.js +260 -0
- package/cache-dir/commonjs/navigation.js.map +1 -0
- package/cache-dir/commonjs/normalize-page-path.js +22 -0
- package/cache-dir/commonjs/normalize-page-path.js.map +1 -0
- package/cache-dir/commonjs/page-renderer.js +59 -0
- package/cache-dir/commonjs/page-renderer.js.map +1 -0
- package/cache-dir/commonjs/pages.json +1 -0
- package/cache-dir/commonjs/polyfill-entry.js +7 -0
- package/cache-dir/commonjs/polyfill-entry.js.map +1 -0
- package/cache-dir/commonjs/prefetch.js +67 -0
- package/cache-dir/commonjs/prefetch.js.map +1 -0
- package/cache-dir/commonjs/production-app.js +256 -0
- package/cache-dir/commonjs/production-app.js.map +1 -0
- package/cache-dir/commonjs/public-page-renderer-dev.js +26 -0
- package/cache-dir/commonjs/public-page-renderer-dev.js.map +1 -0
- package/cache-dir/commonjs/public-page-renderer-prod.js +30 -0
- package/cache-dir/commonjs/public-page-renderer-prod.js.map +1 -0
- package/cache-dir/commonjs/public-page-renderer.js +11 -0
- package/cache-dir/commonjs/public-page-renderer.js.map +1 -0
- package/cache-dir/commonjs/query-result-store.js +160 -0
- package/cache-dir/commonjs/query-result-store.js.map +1 -0
- package/cache-dir/commonjs/react-dom-utils.js +34 -0
- package/cache-dir/commonjs/react-dom-utils.js.map +1 -0
- package/cache-dir/commonjs/react-lifecycles-compat.js +4 -0
- package/cache-dir/commonjs/react-lifecycles-compat.js.map +1 -0
- package/cache-dir/commonjs/redirect-utils.js +25 -0
- package/cache-dir/commonjs/redirect-utils.js.map +1 -0
- package/cache-dir/commonjs/redirects.json +1 -0
- package/cache-dir/commonjs/register-service-worker.js +66 -0
- package/cache-dir/commonjs/register-service-worker.js.map +1 -0
- package/cache-dir/commonjs/root.js +105 -0
- package/cache-dir/commonjs/root.js.map +1 -0
- package/cache-dir/commonjs/route-announcer-props.js +24 -0
- package/cache-dir/commonjs/route-announcer-props.js.map +1 -0
- package/cache-dir/commonjs/server-utils/writable-as-promise.js +42 -0
- package/cache-dir/commonjs/server-utils/writable-as-promise.js.map +1 -0
- package/cache-dir/commonjs/shadow-portal.js +36 -0
- package/cache-dir/commonjs/shadow-portal.js.map +1 -0
- package/cache-dir/commonjs/slice/context.js +15 -0
- package/cache-dir/commonjs/slice/context.js.map +1 -0
- package/cache-dir/commonjs/slice/inline-slice.js +34 -0
- package/cache-dir/commonjs/slice/inline-slice.js.map +1 -0
- package/cache-dir/commonjs/slice/server-slice-renderer.js +29 -0
- package/cache-dir/commonjs/slice/server-slice-renderer.js.map +1 -0
- package/cache-dir/commonjs/slice/server-slice.js +54 -0
- package/cache-dir/commonjs/slice/server-slice.js.map +1 -0
- package/cache-dir/commonjs/slice.js +124 -0
- package/cache-dir/commonjs/slice.js.map +1 -0
- package/cache-dir/commonjs/socketIo.js +62 -0
- package/cache-dir/commonjs/socketIo.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/child_process.js +8 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/child_process.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/fs.js +7 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/fs.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/http.js +9 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/http.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/http2.js +7 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/http2.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/https.js +9 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/https.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/tracking-unsafe-module-wrapper.js +55 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/tracking-unsafe-module-wrapper.js.map +1 -0
- package/cache-dir/commonjs/ssr-develop-static-entry.js +366 -0
- package/cache-dir/commonjs/ssr-develop-static-entry.js.map +1 -0
- package/cache-dir/commonjs/static-entry.js +544 -0
- package/cache-dir/commonjs/static-entry.js.map +1 -0
- package/cache-dir/commonjs/static-query.js +74 -0
- package/cache-dir/commonjs/static-query.js.map +1 -0
- package/cache-dir/commonjs/strip-prefix.js +22 -0
- package/cache-dir/commonjs/strip-prefix.js.map +1 -0
- package/cache-dir/context-utils.js +29 -0
- package/cache-dir/create-content-digest-browser-shim.js +1 -0
- package/cache-dir/css-to-object.js +19 -0
- package/cache-dir/debug-log.js +13 -0
- package/cache-dir/default-html.js +36 -0
- package/cache-dir/dev-loader.js +280 -0
- package/cache-dir/develop-static-entry.js +129 -0
- package/cache-dir/dummy.js +2 -0
- package/cache-dir/emitter.js +4 -0
- package/cache-dir/ensure-resources.js +119 -0
- package/cache-dir/error-overlay-handler.js +36 -0
- package/cache-dir/fast-refresh-overlay/components/accordion.js +83 -0
- package/cache-dir/fast-refresh-overlay/components/build-error.js +46 -0
- package/cache-dir/fast-refresh-overlay/components/code-frame.js +38 -0
- package/cache-dir/fast-refresh-overlay/components/dev-ssr-error.js +66 -0
- package/cache-dir/fast-refresh-overlay/components/error-boundary.js +28 -0
- package/cache-dir/fast-refresh-overlay/components/getserverdata-error.js +53 -0
- package/cache-dir/fast-refresh-overlay/components/graphql-errors.js +100 -0
- package/cache-dir/fast-refresh-overlay/components/hooks.js +102 -0
- package/cache-dir/fast-refresh-overlay/components/overlay.js +143 -0
- package/cache-dir/fast-refresh-overlay/components/runtime-errors.js +139 -0
- package/cache-dir/fast-refresh-overlay/components/use-id.js +56 -0
- package/cache-dir/fast-refresh-overlay/helpers/focus-trap.js +3561 -0
- package/cache-dir/fast-refresh-overlay/helpers/keys.js +80 -0
- package/cache-dir/fast-refresh-overlay/helpers/lock-body.js +52 -0
- package/cache-dir/fast-refresh-overlay/helpers/match.js +42 -0
- package/cache-dir/fast-refresh-overlay/index.js +147 -0
- package/cache-dir/fast-refresh-overlay/style.js +413 -0
- package/cache-dir/fast-refresh-overlay/utils.js +81 -0
- package/cache-dir/find-path.js +160 -0
- package/cache-dir/gatsby-browser-entry.js +27 -0
- package/cache-dir/head/components/fire-callback-in-effect.js +12 -0
- package/cache-dir/head/components/head-components.js +86 -0
- package/cache-dir/head/constants.js +15 -0
- package/cache-dir/head/head-export-handler-for-browser.js +170 -0
- package/cache-dir/head/head-export-handler-for-ssr.js +237 -0
- package/cache-dir/head/utils.js +287 -0
- package/cache-dir/loader.js +977 -0
- package/cache-dir/loading-indicator/index.js +19 -0
- package/cache-dir/loading-indicator/indicator.js +65 -0
- package/cache-dir/loading-indicator/style.js +99 -0
- package/cache-dir/navigation.js +257 -0
- package/cache-dir/normalize-page-path.js +17 -0
- package/cache-dir/page-renderer.js +59 -0
- package/cache-dir/page-ssr/index.d.ts +76 -0
- package/cache-dir/pages.json +1 -0
- package/cache-dir/polyfill-entry.js +5 -0
- package/cache-dir/prefetch.js +80 -0
- package/cache-dir/production-app.js +340 -0
- package/cache-dir/public-page-renderer-dev.js +21 -0
- package/cache-dir/public-page-renderer-prod.js +25 -0
- package/cache-dir/public-page-renderer.js +9 -0
- package/cache-dir/query-engine/index.d.ts +31 -0
- package/cache-dir/query-result-store.js +197 -0
- package/cache-dir/react-dom-utils.js +38 -0
- package/cache-dir/react-lifecycles-compat.js +1 -0
- package/cache-dir/redirect-utils.js +22 -0
- package/cache-dir/redirects.json +1 -0
- package/cache-dir/register-service-worker.js +64 -0
- package/cache-dir/root.js +147 -0
- package/cache-dir/route-announcer-props.js +18 -0
- package/cache-dir/server-utils/writable-as-promise.js +41 -0
- package/cache-dir/shadow-portal.js +28 -0
- package/cache-dir/slice/context.js +13 -0
- package/cache-dir/slice/inline-slice.js +34 -0
- package/cache-dir/slice/server-slice-renderer.js +28 -0
- package/cache-dir/slice/server-slice.js +52 -0
- package/cache-dir/slice.js +158 -0
- package/cache-dir/socketIo.js +58 -0
- package/cache-dir/ssr-builtin-trackers/child_process.js +4 -0
- package/cache-dir/ssr-builtin-trackers/fs.js +3 -0
- package/cache-dir/ssr-builtin-trackers/http.js +3 -0
- package/cache-dir/ssr-builtin-trackers/http2.js +3 -0
- package/cache-dir/ssr-builtin-trackers/https.js +3 -0
- package/cache-dir/ssr-builtin-trackers/tracking-unsafe-module-wrapper.js +64 -0
- package/cache-dir/ssr-develop-static-entry.js +428 -0
- package/cache-dir/static-entry.js +594 -0
- package/cache-dir/static-query.js +91 -0
- package/cache-dir/strip-prefix.js +20 -0
- package/changes.json +454 -0
- package/cli.js +3 -0
- package/dist/bin/gatsby.js +5 -0
- package/dist/bin/gatsby.js.map +1 -0
- package/dist/bootstrap/__mocks__/get-config/ts/gatsby-config.d.ts +3 -0
- package/dist/bootstrap/__mocks__/resolve-module-exports.d.ts +1 -0
- package/dist/bootstrap/create-graphql-runner.d.ts +10 -0
- package/dist/bootstrap/create-graphql-runner.js +71 -0
- package/dist/bootstrap/create-graphql-runner.js.map +1 -0
- package/dist/bootstrap/get-config-file.d.ts +4 -0
- package/dist/bootstrap/get-config-file.js +152 -0
- package/dist/bootstrap/get-config-file.js.map +1 -0
- package/dist/bootstrap/index.d.ts +12 -0
- package/dist/bootstrap/index.js +56 -0
- package/dist/bootstrap/index.js.map +1 -0
- package/dist/bootstrap/load-config/index.d.ts +7 -0
- package/dist/bootstrap/load-config/index.js +73 -0
- package/dist/bootstrap/load-config/index.js.map +1 -0
- package/dist/bootstrap/load-plugins/index.d.ts +3 -0
- package/dist/bootstrap/load-plugins/index.js +79 -0
- package/dist/bootstrap/load-plugins/index.js.map +1 -0
- package/dist/bootstrap/load-plugins/load-internal-plugins.d.ts +2 -0
- package/dist/bootstrap/load-plugins/load-internal-plugins.js +105 -0
- package/dist/bootstrap/load-plugins/load-internal-plugins.js.map +1 -0
- package/dist/bootstrap/load-plugins/process-plugin.d.ts +2 -0
- package/dist/bootstrap/load-plugins/process-plugin.js +81 -0
- package/dist/bootstrap/load-plugins/process-plugin.js.map +1 -0
- package/dist/bootstrap/load-plugins/resolve-plugin.d.ts +13 -0
- package/dist/bootstrap/load-plugins/resolve-plugin.js +75 -0
- package/dist/bootstrap/load-plugins/resolve-plugin.js.map +1 -0
- package/dist/bootstrap/load-plugins/types.d.ts +48 -0
- package/dist/bootstrap/load-plugins/types.js +4 -0
- package/dist/bootstrap/load-plugins/types.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/check-local-plugin.d.ts +8 -0
- package/dist/bootstrap/load-plugins/utils/check-local-plugin.js +38 -0
- package/dist/bootstrap/load-plugins/utils/check-local-plugin.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/create-hash.d.ts +1 -0
- package/dist/bootstrap/load-plugins/utils/create-hash.js +20 -0
- package/dist/bootstrap/load-plugins/utils/create-hash.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/create-id.d.ts +10 -0
- package/dist/bootstrap/load-plugins/utils/create-id.js +16 -0
- package/dist/bootstrap/load-plugins/utils/create-id.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/flatten-plugins.d.ts +2 -0
- package/dist/bootstrap/load-plugins/utils/flatten-plugins.js +41 -0
- package/dist/bootstrap/load-plugins/utils/flatten-plugins.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/get-api.d.ts +12 -0
- package/dist/bootstrap/load-plugins/utils/get-api.js +12 -0
- package/dist/bootstrap/load-plugins/utils/get-api.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/normalize.d.ts +5 -0
- package/dist/bootstrap/load-plugins/utils/normalize.js +33 -0
- package/dist/bootstrap/load-plugins/utils/normalize.js.map +1 -0
- package/dist/bootstrap/load-plugins/validate.d.ts +41 -0
- package/dist/bootstrap/load-plugins/validate.js +369 -0
- package/dist/bootstrap/load-plugins/validate.js.map +1 -0
- package/dist/bootstrap/load-themes/index.d.ts +17 -0
- package/dist/bootstrap/load-themes/index.js +186 -0
- package/dist/bootstrap/load-themes/index.js.map +1 -0
- package/dist/bootstrap/log-line-function.d.ts +0 -0
- package/dist/bootstrap/log-line-function.js +19 -0
- package/dist/bootstrap/log-line-function.js.map +1 -0
- package/dist/bootstrap/prefer-default.d.ts +1 -0
- package/dist/bootstrap/prefer-default.js +7 -0
- package/dist/bootstrap/prefer-default.js.map +1 -0
- package/dist/bootstrap/redirects-writer.d.ts +2 -0
- package/dist/bootstrap/redirects-writer.js +59 -0
- package/dist/bootstrap/redirects-writer.js.map +1 -0
- package/dist/bootstrap/remove-stale-jobs.d.ts +2 -0
- package/dist/bootstrap/remove-stale-jobs.js +31 -0
- package/dist/bootstrap/remove-stale-jobs.js.map +1 -0
- package/dist/bootstrap/requires-writer.d.ts +11 -0
- package/dist/bootstrap/requires-writer.js +260 -0
- package/dist/bootstrap/requires-writer.js.map +1 -0
- package/dist/bootstrap/resolve-js-file-path.d.ts +14 -0
- package/dist/bootstrap/resolve-js-file-path.js +58 -0
- package/dist/bootstrap/resolve-js-file-path.js.map +1 -0
- package/dist/bootstrap/resolve-module-exports.d.ts +20 -0
- package/dist/bootstrap/resolve-module-exports.js +188 -0
- package/dist/bootstrap/resolve-module-exports.js.map +1 -0
- package/dist/bootstrap/schema-hot-reloader.d.ts +3 -0
- package/dist/bootstrap/schema-hot-reloader.js +60 -0
- package/dist/bootstrap/schema-hot-reloader.js.map +1 -0
- package/dist/cache/cache-fs.d.ts +1 -0
- package/dist/cache/cache-fs.js +270 -0
- package/dist/cache/cache-fs.js.map +1 -0
- package/dist/cache/json-file-store.d.ts +8 -0
- package/dist/cache/json-file-store.js +144 -0
- package/dist/cache/json-file-store.js.map +1 -0
- package/dist/cache/wrap-callback.d.ts +0 -0
- package/dist/cache/wrap-callback.js +49 -0
- package/dist/cache/wrap-callback.js.map +1 -0
- package/dist/commands/build-html.d.ts +69 -0
- package/dist/commands/build-html.js +652 -0
- package/dist/commands/build-html.js.map +1 -0
- package/dist/commands/build-javascript.d.ts +4 -0
- package/dist/commands/build-javascript.js +18 -0
- package/dist/commands/build-javascript.js.map +1 -0
- package/dist/commands/build-utils.d.ts +8 -0
- package/dist/commands/build-utils.js +186 -0
- package/dist/commands/build-utils.js.map +1 -0
- package/dist/commands/build.d.ts +1 -0
- package/dist/commands/build.js +505 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/clean.d.ts +1 -0
- package/dist/commands/clean.js +29 -0
- package/dist/commands/clean.js.map +1 -0
- package/dist/commands/develop-process.d.ts +1 -0
- package/dist/commands/develop-process.js +120 -0
- package/dist/commands/develop-process.js.map +1 -0
- package/dist/commands/develop-static.d.ts +3 -0
- package/dist/commands/develop-static.js +22 -0
- package/dist/commands/develop-static.js.map +1 -0
- package/dist/commands/develop.d.ts +2 -0
- package/dist/commands/develop.js +273 -0
- package/dist/commands/develop.js.map +1 -0
- package/dist/commands/feedback.d.ts +1 -0
- package/dist/commands/feedback.js +17 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/repl.d.ts +1 -0
- package/dist/commands/repl.js +58 -0
- package/dist/commands/repl.js.map +1 -0
- package/dist/commands/serve.d.ts +1 -0
- package/dist/commands/serve.js +282 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/types.d.ts +54 -0
- package/dist/commands/types.js +23 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +7 -0
- package/dist/constants.js.map +1 -0
- package/dist/datastore/common/iterable.d.ts +51 -0
- package/dist/datastore/common/iterable.js +217 -0
- package/dist/datastore/common/iterable.js.map +1 -0
- package/dist/datastore/common/query.d.ts +69 -0
- package/dist/datastore/common/query.js +219 -0
- package/dist/datastore/common/query.js.map +1 -0
- package/dist/datastore/datastore.d.ts +2 -0
- package/dist/datastore/datastore.js +23 -0
- package/dist/datastore/datastore.js.map +1 -0
- package/dist/datastore/in-memory/in-memory-datastore.d.ts +2 -0
- package/dist/datastore/in-memory/in-memory-datastore.js +75 -0
- package/dist/datastore/in-memory/in-memory-datastore.js.map +1 -0
- package/dist/datastore/in-memory/indexing.d.ts +80 -0
- package/dist/datastore/in-memory/indexing.js +994 -0
- package/dist/datastore/in-memory/indexing.js.map +1 -0
- package/dist/datastore/in-memory/run-fast-filters.d.ts +27 -0
- package/dist/datastore/in-memory/run-fast-filters.js +276 -0
- package/dist/datastore/in-memory/run-fast-filters.js.map +1 -0
- package/dist/datastore/index.d.ts +20 -0
- package/dist/datastore/index.js +34 -0
- package/dist/datastore/index.js.map +1 -0
- package/dist/datastore/lmdb/lmdb-datastore.d.ts +14 -0
- package/dist/datastore/lmdb/lmdb-datastore.js +261 -0
- package/dist/datastore/lmdb/lmdb-datastore.js.map +1 -0
- package/dist/datastore/lmdb/query/common.d.ts +23 -0
- package/dist/datastore/lmdb/query/common.js +127 -0
- package/dist/datastore/lmdb/query/common.js.map +1 -0
- package/dist/datastore/lmdb/query/create-index.d.ts +25 -0
- package/dist/datastore/lmdb/query/create-index.js +239 -0
- package/dist/datastore/lmdb/query/create-index.js.map +1 -0
- package/dist/datastore/lmdb/query/filter-using-index.d.ts +43 -0
- package/dist/datastore/lmdb/query/filter-using-index.js +577 -0
- package/dist/datastore/lmdb/query/filter-using-index.js.map +1 -0
- package/dist/datastore/lmdb/query/run-query.d.ts +9 -0
- package/dist/datastore/lmdb/query/run-query.js +285 -0
- package/dist/datastore/lmdb/query/run-query.js.map +1 -0
- package/dist/datastore/lmdb/query/suggest-index.d.ts +15 -0
- package/dist/datastore/lmdb/query/suggest-index.js +93 -0
- package/dist/datastore/lmdb/query/suggest-index.js.map +1 -0
- package/dist/datastore/lmdb/updates/nodes-by-type.d.ts +3 -0
- package/dist/datastore/lmdb/updates/nodes-by-type.js +21 -0
- package/dist/datastore/lmdb/updates/nodes-by-type.js.map +1 -0
- package/dist/datastore/lmdb/updates/nodes.d.ts +5 -0
- package/dist/datastore/lmdb/updates/nodes.js +33 -0
- package/dist/datastore/lmdb/updates/nodes.js.map +1 -0
- package/dist/datastore/types.d.ts +47 -0
- package/dist/datastore/types.js +4 -0
- package/dist/datastore/types.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/gatsby-node.js +42 -0
- package/dist/internal-plugins/bundle-optimisations/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/index.js +3 -0
- package/dist/internal-plugins/bundle-optimisations/index.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/package.json +10 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/fetch.js +4 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/fetch.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/no-op.js +3 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/no-op.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js +4 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/whatwg-fetch.js +6 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/whatwg-fetch.js.map +1 -0
- package/dist/internal-plugins/dev-404-page/gatsby-node.js +30 -0
- package/dist/internal-plugins/dev-404-page/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/dev-404-page/index.js +3 -0
- package/dist/internal-plugins/dev-404-page/index.js.map +1 -0
- package/dist/internal-plugins/dev-404-page/package.json +11 -0
- package/dist/internal-plugins/dev-404-page/raw_dev-404-page.js +262 -0
- package/dist/internal-plugins/functions/api-function-webpack-loader.d.ts +3 -0
- package/dist/internal-plugins/functions/api-function-webpack-loader.js +74 -0
- package/dist/internal-plugins/functions/api-function-webpack-loader.js.map +1 -0
- package/dist/internal-plugins/functions/config.d.ts +20 -0
- package/dist/internal-plugins/functions/config.js +96 -0
- package/dist/internal-plugins/functions/config.js.map +1 -0
- package/dist/internal-plugins/functions/gatsby-node.d.ts +3 -0
- package/dist/internal-plugins/functions/gatsby-node.js +452 -0
- package/dist/internal-plugins/functions/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/functions/index.js +3 -0
- package/dist/internal-plugins/functions/index.js.map +1 -0
- package/dist/internal-plugins/functions/middleware.d.ts +11 -0
- package/dist/internal-plugins/functions/middleware.js +160 -0
- package/dist/internal-plugins/functions/middleware.js.map +1 -0
- package/dist/internal-plugins/functions/package.json +11 -0
- package/dist/internal-plugins/internal-data-bridge/gatsby-node.js +191 -0
- package/dist/internal-plugins/internal-data-bridge/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/internal-data-bridge/index.js +3 -0
- package/dist/internal-plugins/internal-data-bridge/index.js.map +1 -0
- package/dist/internal-plugins/internal-data-bridge/package.json +11 -0
- package/dist/internal-plugins/load-babel-config/gatsby-node.js +37 -0
- package/dist/internal-plugins/load-babel-config/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/load-babel-config/index.js +3 -0
- package/dist/internal-plugins/load-babel-config/index.js.map +1 -0
- package/dist/internal-plugins/load-babel-config/package.json +11 -0
- package/dist/internal-plugins/partytown/gatsby-browser.js +23 -0
- package/dist/internal-plugins/partytown/gatsby-browser.js.map +1 -0
- package/dist/internal-plugins/partytown/gatsby-node.d.ts +2 -0
- package/dist/internal-plugins/partytown/gatsby-node.js +60 -0
- package/dist/internal-plugins/partytown/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/partytown/gatsby-ssr.js +39 -0
- package/dist/internal-plugins/partytown/gatsby-ssr.js.map +1 -0
- package/dist/internal-plugins/partytown/index.js +3 -0
- package/dist/internal-plugins/partytown/index.js.map +1 -0
- package/dist/internal-plugins/partytown/package.json +12 -0
- package/dist/internal-plugins/partytown/proxy.d.ts +3 -0
- package/dist/internal-plugins/partytown/proxy.js +26 -0
- package/dist/internal-plugins/partytown/proxy.js.map +1 -0
- package/dist/internal-plugins/partytown/utils/get-forwards.d.ts +2 -0
- package/dist/internal-plugins/partytown/utils/get-forwards.js +8 -0
- package/dist/internal-plugins/partytown/utils/get-forwards.js.map +1 -0
- package/dist/internal-plugins/partytown/utils/inject-partytown-snippet.d.ts +2 -0
- package/dist/internal-plugins/partytown/utils/inject-partytown-snippet.js +28 -0
- package/dist/internal-plugins/partytown/utils/inject-partytown-snippet.js.map +1 -0
- package/dist/internal-plugins/prod-404-500/gatsby-node.js +50 -0
- package/dist/internal-plugins/prod-404-500/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/prod-404-500/index.js +3 -0
- package/dist/internal-plugins/prod-404-500/index.js.map +1 -0
- package/dist/internal-plugins/prod-404-500/package.json +11 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/create-page.js +31 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/create-page.js.map +1 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/gatsby-node.js +31 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/index.js +273 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/index.js.map +1 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/package.json +11 -0
- package/dist/internal.d.ts +5 -0
- package/dist/internal.js +34 -0
- package/dist/internal.js.map +1 -0
- package/dist/joi-schemas/joi.d.ts +5 -0
- package/dist/joi-schemas/joi.js +122 -0
- package/dist/joi-schemas/joi.js.map +1 -0
- package/dist/query/error-parser.d.ts +19 -0
- package/dist/query/error-parser.js +163 -0
- package/dist/query/error-parser.js.map +1 -0
- package/dist/query/file-parser.js +584 -0
- package/dist/query/file-parser.js.map +1 -0
- package/dist/query/graphql-errors-codeframe.d.ts +1 -0
- package/dist/query/graphql-errors-codeframe.js +20 -0
- package/dist/query/graphql-errors-codeframe.js.map +1 -0
- package/dist/query/graphql-errors.js +278 -0
- package/dist/query/graphql-errors.js.map +1 -0
- package/dist/query/graphql-runner.d.ts +39 -0
- package/dist/query/graphql-runner.js +221 -0
- package/dist/query/graphql-runner.js.map +1 -0
- package/dist/query/graphql-span-tracer.d.ts +19 -0
- package/dist/query/graphql-span-tracer.js +63 -0
- package/dist/query/graphql-span-tracer.js.map +1 -0
- package/dist/query/index.d.ts +32 -0
- package/dist/query/index.js +301 -0
- package/dist/query/index.js.map +1 -0
- package/dist/query/query-compiler.js +433 -0
- package/dist/query/query-compiler.js.map +1 -0
- package/dist/query/query-runner.d.ts +13 -0
- package/dist/query/query-runner.js +176 -0
- package/dist/query/query-runner.js.map +1 -0
- package/dist/query/query-watcher.d.ts +17 -0
- package/dist/query/query-watcher.js +250 -0
- package/dist/query/query-watcher.js.map +1 -0
- package/dist/query/transform-document.d.ts +6 -0
- package/dist/query/transform-document.js +131 -0
- package/dist/query/transform-document.js.map +1 -0
- package/dist/query/types.d.ts +35 -0
- package/dist/query/types.js +4 -0
- package/dist/query/types.js.map +1 -0
- package/dist/query/utils.d.ts +4 -0
- package/dist/query/utils.js +20 -0
- package/dist/query/utils.js.map +1 -0
- package/dist/redux/actions/add-page-dependency.d.ts +7 -0
- package/dist/redux/actions/add-page-dependency.js +52 -0
- package/dist/redux/actions/add-page-dependency.js.map +1 -0
- package/dist/redux/actions/index.d.ts +16 -0
- package/dist/redux/actions/index.js +21 -0
- package/dist/redux/actions/index.js.map +1 -0
- package/dist/redux/actions/internal.d.ts +124 -0
- package/dist/redux/actions/internal.js +394 -0
- package/dist/redux/actions/internal.js.map +1 -0
- package/dist/redux/actions/public.js +1354 -0
- package/dist/redux/actions/public.js.map +1 -0
- package/dist/redux/actions/restricted.d.ts +332 -0
- package/dist/redux/actions/restricted.js +521 -0
- package/dist/redux/actions/restricted.js.map +1 -0
- package/dist/redux/index.d.ts +20 -0
- package/dist/redux/index.js +125 -0
- package/dist/redux/index.js.map +1 -0
- package/dist/redux/persist.d.ts +5 -0
- package/dist/redux/persist.js +191 -0
- package/dist/redux/persist.js.map +1 -0
- package/dist/redux/plugin-runner.d.ts +1 -0
- package/dist/redux/plugin-runner.js +45 -0
- package/dist/redux/plugin-runner.js.map +1 -0
- package/dist/redux/reducers/adapter.d.ts +6 -0
- package/dist/redux/reducers/adapter.js +22 -0
- package/dist/redux/reducers/adapter.js.map +1 -0
- package/dist/redux/reducers/babelrc.d.ts +9 -0
- package/dist/redux/reducers/babelrc.js +104 -0
- package/dist/redux/reducers/babelrc.js.map +1 -0
- package/dist/redux/reducers/components-using-slices.d.ts +2 -0
- package/dist/redux/reducers/components-using-slices.js +15 -0
- package/dist/redux/reducers/components-using-slices.js.map +1 -0
- package/dist/redux/reducers/components.d.ts +2 -0
- package/dist/redux/reducers/components.js +104 -0
- package/dist/redux/reducers/components.js.map +1 -0
- package/dist/redux/reducers/config.d.ts +2 -0
- package/dist/redux/reducers/config.js +16 -0
- package/dist/redux/reducers/config.js.map +1 -0
- package/dist/redux/reducers/definitions.d.ts +2 -0
- package/dist/redux/reducers/definitions.js +14 -0
- package/dist/redux/reducers/definitions.js.map +1 -0
- package/dist/redux/reducers/flattened-plugins.d.ts +17 -0
- package/dist/redux/reducers/flattened-plugins.js +14 -0
- package/dist/redux/reducers/flattened-plugins.js.map +1 -0
- package/dist/redux/reducers/functions.d.ts +2 -0
- package/dist/redux/reducers/functions.js +14 -0
- package/dist/redux/reducers/functions.js.map +1 -0
- package/dist/redux/reducers/html.d.ts +25 -0
- package/dist/redux/reducers/html.js +384 -0
- package/dist/redux/reducers/html.js.map +1 -0
- package/dist/redux/reducers/index.d.ts +45 -0
- package/dist/redux/reducers/index.js +86 -0
- package/dist/redux/reducers/index.js.map +1 -0
- package/dist/redux/reducers/inference-metadata.d.ts +7 -0
- package/dist/redux/reducers/inference-metadata.js +174 -0
- package/dist/redux/reducers/inference-metadata.js.map +1 -0
- package/dist/redux/reducers/jobs.d.ts +5 -0
- package/dist/redux/reducers/jobs.js +65 -0
- package/dist/redux/reducers/jobs.js.map +1 -0
- package/dist/redux/reducers/jobsv2.d.ts +6 -0
- package/dist/redux/reducers/jobsv2.js +88 -0
- package/dist/redux/reducers/jobsv2.js.map +1 -0
- package/dist/redux/reducers/last-action.d.ts +2 -0
- package/dist/redux/reducers/last-action.js +7 -0
- package/dist/redux/reducers/last-action.js.map +1 -0
- package/dist/redux/reducers/node-manifest.d.ts +2 -0
- package/dist/redux/reducers/node-manifest.js +58 -0
- package/dist/redux/reducers/node-manifest.js.map +1 -0
- package/dist/redux/reducers/nodes-by-type.d.ts +2 -0
- package/dist/redux/reducers/nodes-by-type.js +53 -0
- package/dist/redux/reducers/nodes-by-type.js.map +1 -0
- package/dist/redux/reducers/nodes-touched.d.ts +3 -0
- package/dist/redux/reducers/nodes-touched.js +18 -0
- package/dist/redux/reducers/nodes-touched.js.map +1 -0
- package/dist/redux/reducers/nodes.d.ts +2 -0
- package/dist/redux/reducers/nodes.js +30 -0
- package/dist/redux/reducers/nodes.js.map +1 -0
- package/dist/redux/reducers/page-data-stats.d.ts +2 -0
- package/dist/redux/reducers/page-data-stats.js +15 -0
- package/dist/redux/reducers/page-data-stats.js.map +1 -0
- package/dist/redux/reducers/pages.d.ts +2 -0
- package/dist/redux/reducers/pages.js +43 -0
- package/dist/redux/reducers/pages.js.map +1 -0
- package/dist/redux/reducers/pending-page-data-writes.d.ts +5 -0
- package/dist/redux/reducers/pending-page-data-writes.js +66 -0
- package/dist/redux/reducers/pending-page-data-writes.js.map +1 -0
- package/dist/redux/reducers/program.d.ts +2 -0
- package/dist/redux/reducers/program.js +62 -0
- package/dist/redux/reducers/program.js.map +1 -0
- package/dist/redux/reducers/queries.d.ts +26 -0
- package/dist/redux/reducers/queries.js +403 -0
- package/dist/redux/reducers/queries.js.map +1 -0
- package/dist/redux/reducers/redirects.d.ts +2 -0
- package/dist/redux/reducers/redirects.js +39 -0
- package/dist/redux/reducers/redirects.js.map +1 -0
- package/dist/redux/reducers/remote-file-allowed-urls.d.ts +2 -0
- package/dist/redux/reducers/remote-file-allowed-urls.js +19 -0
- package/dist/redux/reducers/remote-file-allowed-urls.js.map +1 -0
- package/dist/redux/reducers/resolved-nodes.d.ts +2 -0
- package/dist/redux/reducers/resolved-nodes.js +45 -0
- package/dist/redux/reducers/resolved-nodes.js.map +1 -0
- package/dist/redux/reducers/schema-customization.d.ts +23 -0
- package/dist/redux/reducers/schema-customization.js +103 -0
- package/dist/redux/reducers/schema-customization.js.map +1 -0
- package/dist/redux/reducers/schema.d.ts +3 -0
- package/dist/redux/reducers/schema.js +17 -0
- package/dist/redux/reducers/schema.js.map +1 -0
- package/dist/redux/reducers/set-request-headers.d.ts +7 -0
- package/dist/redux/reducers/set-request-headers.js +24 -0
- package/dist/redux/reducers/set-request-headers.js.map +1 -0
- package/dist/redux/reducers/slices-by-template.d.ts +2 -0
- package/dist/redux/reducers/slices-by-template.js +16 -0
- package/dist/redux/reducers/slices-by-template.js.map +1 -0
- package/dist/redux/reducers/slices.d.ts +2 -0
- package/dist/redux/reducers/slices.js +22 -0
- package/dist/redux/reducers/slices.js.map +1 -0
- package/dist/redux/reducers/stateful-source-plugins.d.ts +5 -0
- package/dist/redux/reducers/stateful-source-plugins.js +20 -0
- package/dist/redux/reducers/stateful-source-plugins.js.map +1 -0
- package/dist/redux/reducers/static-queries-by-template.d.ts +2 -0
- package/dist/redux/reducers/static-queries-by-template.js +19 -0
- package/dist/redux/reducers/static-queries-by-template.js.map +1 -0
- package/dist/redux/reducers/static-query-components.d.ts +2 -0
- package/dist/redux/reducers/static-query-components.js +18 -0
- package/dist/redux/reducers/static-query-components.js.map +1 -0
- package/dist/redux/reducers/status.d.ts +7 -0
- package/dist/redux/reducers/status.js +57 -0
- package/dist/redux/reducers/status.js.map +1 -0
- package/dist/redux/reducers/telemetry.d.ts +2 -0
- package/dist/redux/reducers/telemetry.js +46 -0
- package/dist/redux/reducers/telemetry.js.map +1 -0
- package/dist/redux/reducers/type-owners.d.ts +5 -0
- package/dist/redux/reducers/type-owners.js +102 -0
- package/dist/redux/reducers/type-owners.js.map +1 -0
- package/dist/redux/reducers/visited-page.d.ts +2 -0
- package/dist/redux/reducers/visited-page.js +31 -0
- package/dist/redux/reducers/visited-page.js.map +1 -0
- package/dist/redux/reducers/webpack-compilation-hash.d.ts +2 -0
- package/dist/redux/reducers/webpack-compilation-hash.js +14 -0
- package/dist/redux/reducers/webpack-compilation-hash.js.map +1 -0
- package/dist/redux/reducers/webpack.d.ts +2 -0
- package/dist/redux/reducers/webpack.js +27 -0
- package/dist/redux/reducers/webpack.js.map +1 -0
- package/dist/redux/save-state.js +19 -0
- package/dist/redux/save-state.js.map +1 -0
- package/dist/redux/types.d.ts +1337 -0
- package/dist/redux/types.js +326 -0
- package/dist/redux/types.js.map +1 -0
- package/dist/schema/context.d.ts +14 -0
- package/dist/schema/context.js +38 -0
- package/dist/schema/context.js.map +1 -0
- package/dist/schema/extensions/index.js +205 -0
- package/dist/schema/extensions/index.js.map +1 -0
- package/dist/schema/graphql-engine/bootstrap.d.ts +2 -0
- package/dist/schema/graphql-engine/bootstrap.js +12 -0
- package/dist/schema/graphql-engine/bootstrap.js.map +1 -0
- package/dist/schema/graphql-engine/bundle-webpack.d.ts +5 -0
- package/dist/schema/graphql-engine/bundle-webpack.js +446 -0
- package/dist/schema/graphql-engine/bundle-webpack.js.map +1 -0
- package/dist/schema/graphql-engine/entry.d.ts +23 -0
- package/dist/schema/graphql-engine/entry.js +204 -0
- package/dist/schema/graphql-engine/entry.js.map +1 -0
- package/dist/schema/graphql-engine/lmdb-bundling-patch.d.ts +1 -0
- package/dist/schema/graphql-engine/lmdb-bundling-patch.js +72 -0
- package/dist/schema/graphql-engine/lmdb-bundling-patch.js.map +1 -0
- package/dist/schema/graphql-engine/platform-and-arch-check.d.ts +0 -0
- package/dist/schema/graphql-engine/platform-and-arch-check.js +6 -0
- package/dist/schema/graphql-engine/platform-and-arch-check.js.map +1 -0
- package/dist/schema/graphql-engine/print-plugins.d.ts +2 -0
- package/dist/schema/graphql-engine/print-plugins.js +145 -0
- package/dist/schema/graphql-engine/print-plugins.js.map +1 -0
- package/dist/schema/graphql-engine/sharp-bundling-patch.d.ts +1 -0
- package/dist/schema/graphql-engine/sharp-bundling-patch.js +8 -0
- package/dist/schema/graphql-engine/sharp-bundling-patch.js.map +1 -0
- package/dist/schema/graphql-engine/shims/gatsby-sharp.js +10 -0
- package/dist/schema/graphql-engine/shims/gatsby-sharp.js.map +1 -0
- package/dist/schema/graphql-engine/shims/no-op-module.js +3 -0
- package/dist/schema/graphql-engine/shims/no-op-module.js.map +1 -0
- package/dist/schema/graphql-engine/shims/ts-node.js +17 -0
- package/dist/schema/graphql-engine/shims/ts-node.js.map +1 -0
- package/dist/schema/graphql-engine/standalone-regenerate.d.ts +2 -0
- package/dist/schema/graphql-engine/standalone-regenerate.js +73 -0
- package/dist/schema/graphql-engine/standalone-regenerate.js.map +1 -0
- package/dist/schema/index.js +189 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/infer/add-inferred-fields.js +413 -0
- package/dist/schema/infer/add-inferred-fields.js.map +1 -0
- package/dist/schema/infer/build-example-data.d.ts +5 -0
- package/dist/schema/infer/build-example-data.js +199 -0
- package/dist/schema/infer/build-example-data.js.map +1 -0
- package/dist/schema/infer/index.js +121 -0
- package/dist/schema/infer/index.js.map +1 -0
- package/dist/schema/infer/inference-metadata.d.ts +72 -0
- package/dist/schema/infer/inference-metadata.js +280 -0
- package/dist/schema/infer/inference-metadata.js.map +1 -0
- package/dist/schema/infer/is-file.d.ts +1 -0
- package/dist/schema/infer/is-file.js +65 -0
- package/dist/schema/infer/is-file.js.map +1 -0
- package/dist/schema/infer/type-conflict-reporter.d.ts +28 -0
- package/dist/schema/infer/type-conflict-reporter.js +104 -0
- package/dist/schema/infer/type-conflict-reporter.js.map +1 -0
- package/dist/schema/node-model.js +784 -0
- package/dist/schema/node-model.js.map +1 -0
- package/dist/schema/print.d.ts +20 -0
- package/dist/schema/print.js +279 -0
- package/dist/schema/print.js.map +1 -0
- package/dist/schema/resolvers.d.ts +40 -0
- package/dist/schema/resolvers.js +569 -0
- package/dist/schema/resolvers.js.map +1 -0
- package/dist/schema/schema-composer.d.ts +3 -0
- package/dist/schema/schema-composer.js +31 -0
- package/dist/schema/schema-composer.js.map +1 -0
- package/dist/schema/schema.js +1295 -0
- package/dist/schema/schema.js.map +1 -0
- package/dist/schema/type-definitions.d.ts +47 -0
- package/dist/schema/type-definitions.js +4 -0
- package/dist/schema/type-definitions.js.map +1 -0
- package/dist/schema/types/built-in-types.d.ts +5 -0
- package/dist/schema/types/built-in-types.js +139 -0
- package/dist/schema/types/built-in-types.js.map +1 -0
- package/dist/schema/types/date.d.ts +37 -0
- package/dist/schema/types/date.js +225 -0
- package/dist/schema/types/date.js.map +1 -0
- package/dist/schema/types/derived-types.d.ts +45 -0
- package/dist/schema/types/derived-types.js +108 -0
- package/dist/schema/types/derived-types.js.map +1 -0
- package/dist/schema/types/filter.d.ts +12 -0
- package/dist/schema/types/filter.js +105 -0
- package/dist/schema/types/filter.js.map +1 -0
- package/dist/schema/types/media.d.ts +2 -0
- package/dist/schema/types/media.js +10 -0
- package/dist/schema/types/media.js.map +1 -0
- package/dist/schema/types/node-interface.d.ts +14 -0
- package/dist/schema/types/node-interface.js +103 -0
- package/dist/schema/types/node-interface.js.map +1 -0
- package/dist/schema/types/pagination.d.ts +16 -0
- package/dist/schema/types/pagination.js +198 -0
- package/dist/schema/types/pagination.js.map +1 -0
- package/dist/schema/types/remote-file-interface.d.ts +3 -0
- package/dist/schema/types/remote-file-interface.js +34 -0
- package/dist/schema/types/remote-file-interface.js.map +1 -0
- package/dist/schema/types/sort.d.ts +24 -0
- package/dist/schema/types/sort.js +178 -0
- package/dist/schema/types/sort.js.map +1 -0
- package/dist/schema/types/type-builders.d.ts +36 -0
- package/dist/schema/types/type-builders.js +61 -0
- package/dist/schema/types/type-builders.js.map +1 -0
- package/dist/schema/types/type-defs.js +86 -0
- package/dist/schema/types/type-defs.js.map +1 -0
- package/dist/schema/types/utils.d.ts +33 -0
- package/dist/schema/types/utils.js +153 -0
- package/dist/schema/types/utils.js.map +1 -0
- package/dist/schema/utils.d.ts +28 -0
- package/dist/schema/utils.js +149 -0
- package/dist/schema/utils.js.map +1 -0
- package/dist/services/build-schema.d.ts +2 -0
- package/dist/services/build-schema.js +24 -0
- package/dist/services/build-schema.js.map +1 -0
- package/dist/services/calculate-dirty-queries.d.ts +5 -0
- package/dist/services/calculate-dirty-queries.js +44 -0
- package/dist/services/calculate-dirty-queries.js.map +1 -0
- package/dist/services/create-pages.d.ts +5 -0
- package/dist/services/create-pages.js +108 -0
- package/dist/services/create-pages.js.map +1 -0
- package/dist/services/customize-schema.d.ts +2 -0
- package/dist/services/customize-schema.js +26 -0
- package/dist/services/customize-schema.js.map +1 -0
- package/dist/services/extract-queries.d.ts +2 -0
- package/dist/services/extract-queries.js +24 -0
- package/dist/services/extract-queries.js.map +1 -0
- package/dist/services/graphql-typegen.d.ts +2 -0
- package/dist/services/graphql-typegen.js +46 -0
- package/dist/services/graphql-typegen.js.map +1 -0
- package/dist/services/index.d.ts +19 -0
- package/dist/services/index.js +68 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/initialize.d.ts +14 -0
- package/dist/services/initialize.js +519 -0
- package/dist/services/initialize.js.map +1 -0
- package/dist/services/listen-for-mutations.d.ts +2 -0
- package/dist/services/listen-for-mutations.js +59 -0
- package/dist/services/listen-for-mutations.js.map +1 -0
- package/dist/services/listen-to-webpack.d.ts +3 -0
- package/dist/services/listen-to-webpack.js +17 -0
- package/dist/services/listen-to-webpack.js.map +1 -0
- package/dist/services/post-bootstrap.d.ts +2 -0
- package/dist/services/post-bootstrap.js +29 -0
- package/dist/services/post-bootstrap.js.map +1 -0
- package/dist/services/recompile.d.ts +3 -0
- package/dist/services/recompile.js +67 -0
- package/dist/services/recompile.js.map +1 -0
- package/dist/services/run-mutation-batch.d.ts +2 -0
- package/dist/services/run-mutation-batch.js +12 -0
- package/dist/services/run-mutation-batch.js.map +1 -0
- package/dist/services/run-page-queries.d.ts +2 -0
- package/dist/services/run-page-queries.js +38 -0
- package/dist/services/run-page-queries.js.map +1 -0
- package/dist/services/run-slice-queries.d.ts +2 -0
- package/dist/services/run-slice-queries.js +40 -0
- package/dist/services/run-slice-queries.js.map +1 -0
- package/dist/services/run-static-queries.d.ts +2 -0
- package/dist/services/run-static-queries.js +38 -0
- package/dist/services/run-static-queries.js.map +1 -0
- package/dist/services/source-nodes.d.ts +5 -0
- package/dist/services/source-nodes.js +47 -0
- package/dist/services/source-nodes.js.map +1 -0
- package/dist/services/start-webpack-server.d.ts +9 -0
- package/dist/services/start-webpack-server.js +103 -0
- package/dist/services/start-webpack-server.js.map +1 -0
- package/dist/services/types.d.ts +53 -0
- package/dist/services/types.js +4 -0
- package/dist/services/types.js.map +1 -0
- package/dist/services/write-out-redirects.d.ts +2 -0
- package/dist/services/write-out-redirects.js +20 -0
- package/dist/services/write-out-redirects.js.map +1 -0
- package/dist/services/write-out-requires.d.ts +2 -0
- package/dist/services/write-out-requires.js +27 -0
- package/dist/services/write-out-requires.js.map +1 -0
- package/dist/state-machines/data-layer/actions.d.ts +11 -0
- package/dist/state-machines/data-layer/actions.js +38 -0
- package/dist/state-machines/data-layer/actions.js.map +1 -0
- package/dist/state-machines/data-layer/index.d.ts +24 -0
- package/dist/state-machines/data-layer/index.js +152 -0
- package/dist/state-machines/data-layer/index.js.map +1 -0
- package/dist/state-machines/data-layer/services.d.ts +3 -0
- package/dist/state-machines/data-layer/services.js +14 -0
- package/dist/state-machines/data-layer/services.js.map +1 -0
- package/dist/state-machines/data-layer/types.d.ts +27 -0
- package/dist/state-machines/data-layer/types.js +4 -0
- package/dist/state-machines/data-layer/types.js.map +1 -0
- package/dist/state-machines/develop/actions.d.ts +68 -0
- package/dist/state-machines/develop/actions.js +259 -0
- package/dist/state-machines/develop/actions.js.map +1 -0
- package/dist/state-machines/develop/index.d.ts +5 -0
- package/dist/state-machines/develop/index.js +372 -0
- package/dist/state-machines/develop/index.js.map +1 -0
- package/dist/state-machines/develop/services.d.ts +3 -0
- package/dist/state-machines/develop/services.js +22 -0
- package/dist/state-machines/develop/services.js.map +1 -0
- package/dist/state-machines/index.d.ts +7 -0
- package/dist/state-machines/index.js +21 -0
- package/dist/state-machines/index.js.map +1 -0
- package/dist/state-machines/query-running/actions.d.ts +9 -0
- package/dist/state-machines/query-running/actions.js +55 -0
- package/dist/state-machines/query-running/actions.js.map +1 -0
- package/dist/state-machines/query-running/index.d.ts +7 -0
- package/dist/state-machines/query-running/index.js +142 -0
- package/dist/state-machines/query-running/index.js.map +1 -0
- package/dist/state-machines/query-running/services.d.ts +3 -0
- package/dist/state-machines/query-running/services.js +17 -0
- package/dist/state-machines/query-running/services.js.map +1 -0
- package/dist/state-machines/query-running/types.d.ts +26 -0
- package/dist/state-machines/query-running/types.js +4 -0
- package/dist/state-machines/query-running/types.js.map +1 -0
- package/dist/state-machines/waiting/actions.d.ts +11 -0
- package/dist/state-machines/waiting/actions.js +36 -0
- package/dist/state-machines/waiting/actions.js.map +1 -0
- package/dist/state-machines/waiting/index.d.ts +12 -0
- package/dist/state-machines/waiting/index.js +145 -0
- package/dist/state-machines/waiting/index.js.map +1 -0
- package/dist/state-machines/waiting/services.d.ts +3 -0
- package/dist/state-machines/waiting/services.js +10 -0
- package/dist/state-machines/waiting/services.js.map +1 -0
- package/dist/state-machines/waiting/types.d.ts +12 -0
- package/dist/state-machines/waiting/types.js +4 -0
- package/dist/state-machines/waiting/types.js.map +1 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/adapter/constants.d.ts +5 -0
- package/dist/utils/adapter/constants.js +31 -0
- package/dist/utils/adapter/constants.js.map +1 -0
- package/dist/utils/adapter/create-headers.d.ts +10 -0
- package/dist/utils/adapter/create-headers.js +94 -0
- package/dist/utils/adapter/create-headers.js.map +1 -0
- package/dist/utils/adapter/get-route-path.d.ts +3 -0
- package/dist/utils/adapter/get-route-path.js +22 -0
- package/dist/utils/adapter/get-route-path.js.map +1 -0
- package/dist/utils/adapter/init.d.ts +3 -0
- package/dist/utils/adapter/init.js +183 -0
- package/dist/utils/adapter/init.js.map +1 -0
- package/dist/utils/adapter/manager.d.ts +9 -0
- package/dist/utils/adapter/manager.js +554 -0
- package/dist/utils/adapter/manager.js.map +1 -0
- package/dist/utils/adapter/no-op-manager.d.ts +2 -0
- package/dist/utils/adapter/no-op-manager.js +18 -0
- package/dist/utils/adapter/no-op-manager.js.map +1 -0
- package/dist/utils/adapter/types.d.ts +282 -0
- package/dist/utils/adapter/types.js +4 -0
- package/dist/utils/adapter/types.js.map +1 -0
- package/dist/utils/api-browser-docs.d.ts +272 -0
- package/dist/utils/api-browser-docs.js +318 -0
- package/dist/utils/api-browser-docs.js.map +1 -0
- package/dist/utils/api-node-docs.d.ts +470 -0
- package/dist/utils/api-node-docs.js +519 -0
- package/dist/utils/api-node-docs.js.map +1 -0
- package/dist/utils/api-node-helpers-docs.js +322 -0
- package/dist/utils/api-node-helpers-docs.js.map +1 -0
- package/dist/utils/api-runner-error-parser.d.ts +5 -0
- package/dist/utils/api-runner-error-parser.js +63 -0
- package/dist/utils/api-runner-error-parser.js.map +1 -0
- package/dist/utils/api-runner-node.js +663 -0
- package/dist/utils/api-runner-node.js.map +1 -0
- package/dist/utils/app-data.d.ts +2 -0
- package/dist/utils/app-data.js +15 -0
- package/dist/utils/app-data.js.map +1 -0
- package/dist/utils/assert-store.d.ts +2 -0
- package/dist/utils/assert-store.js +12 -0
- package/dist/utils/assert-store.js.map +1 -0
- package/dist/utils/babel/babel-module-exports-helpers.d.ts +22 -0
- package/dist/utils/babel/babel-module-exports-helpers.js +48 -0
- package/dist/utils/babel/babel-module-exports-helpers.js.map +1 -0
- package/dist/utils/babel/babel-plugin-add-slice-placeholder-location.d.ts +10 -0
- package/dist/utils/babel/babel-plugin-add-slice-placeholder-location.js +48 -0
- package/dist/utils/babel/babel-plugin-add-slice-placeholder-location.js.map +1 -0
- package/dist/utils/babel/babel-plugin-remove-api.d.ts +5 -0
- package/dist/utils/babel/babel-plugin-remove-api.js +148 -0
- package/dist/utils/babel/babel-plugin-remove-api.js.map +1 -0
- package/dist/utils/babel/find-slices.d.ts +8 -0
- package/dist/utils/babel/find-slices.js +68 -0
- package/dist/utils/babel/find-slices.js.map +1 -0
- package/dist/utils/babel-loader-helpers.d.ts +19 -0
- package/dist/utils/babel-loader-helpers.js +158 -0
- package/dist/utils/babel-loader-helpers.js.map +1 -0
- package/dist/utils/babel-loader.d.ts +8 -0
- package/dist/utils/babel-loader.js +158 -0
- package/dist/utils/babel-loader.js.map +1 -0
- package/dist/utils/babel-parse-to-ast.d.ts +4 -0
- package/dist/utils/babel-parse-to-ast.js +34 -0
- package/dist/utils/babel-parse-to-ast.js.map +1 -0
- package/dist/utils/batcher.d.ts +15 -0
- package/dist/utils/batcher.js +46 -0
- package/dist/utils/batcher.js.map +1 -0
- package/dist/utils/browserslist.d.ts +2 -0
- package/dist/utils/browserslist.js +38 -0
- package/dist/utils/browserslist.js.map +1 -0
- package/dist/utils/cache-lmdb.d.ts +19 -0
- package/dist/utils/cache-lmdb.js +88 -0
- package/dist/utils/cache-lmdb.js.map +1 -0
- package/dist/utils/cache.d.ts +17 -0
- package/dist/utils/cache.js +77 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/call-deferred-api.d.ts +8 -0
- package/dist/utils/call-deferred-api.js +35 -0
- package/dist/utils/call-deferred-api.js.map +1 -0
- package/dist/utils/changed-pages.d.ts +6 -0
- package/dist/utils/changed-pages.js +45 -0
- package/dist/utils/changed-pages.js.map +1 -0
- package/dist/utils/clear-require-cache.d.ts +1 -0
- package/dist/utils/clear-require-cache.js +24 -0
- package/dist/utils/clear-require-cache.js.map +1 -0
- package/dist/utils/client-assets-for-template.d.ts +9 -0
- package/dist/utils/client-assets-for-template.js +141 -0
- package/dist/utils/client-assets-for-template.js.map +1 -0
- package/dist/utils/create-node-id.d.ts +24 -0
- package/dist/utils/create-node-id.js +67 -0
- package/dist/utils/create-node-id.js.map +1 -0
- package/dist/utils/create-schema-customization.d.ts +6 -0
- package/dist/utils/create-schema-customization.js +25 -0
- package/dist/utils/create-schema-customization.js.map +1 -0
- package/dist/utils/detect-node-mutations.d.ts +4 -0
- package/dist/utils/detect-node-mutations.js +134 -0
- package/dist/utils/detect-node-mutations.js.map +1 -0
- package/dist/utils/detect-port-in-use-and-prompt.d.ts +1 -0
- package/dist/utils/detect-port-in-use-and-prompt.js +31 -0
- package/dist/utils/detect-port-in-use-and-prompt.js.map +1 -0
- package/dist/utils/dev-ssr/parse-error.d.ts +22 -0
- package/dist/utils/dev-ssr/parse-error.js +119 -0
- package/dist/utils/dev-ssr/parse-error.js.map +1 -0
- package/dist/utils/dev-ssr/render-dev-html-child.d.ts +13 -0
- package/dist/utils/dev-ssr/render-dev-html-child.js +47 -0
- package/dist/utils/dev-ssr/render-dev-html-child.js.map +1 -0
- package/dist/utils/dev-ssr/render-dev-html.d.ts +23 -0
- package/dist/utils/dev-ssr/render-dev-html.js +227 -0
- package/dist/utils/dev-ssr/render-dev-html.js.map +1 -0
- package/dist/utils/develop-preload-headers.d.ts +7 -0
- package/dist/utils/develop-preload-headers.js +64 -0
- package/dist/utils/develop-preload-headers.js.map +1 -0
- package/dist/utils/did-you-mean.d.ts +3 -0
- package/dist/utils/did-you-mean.js +21 -0
- package/dist/utils/did-you-mean.js.map +1 -0
- package/dist/utils/engine-context.d.ts +5 -0
- package/dist/utils/engine-context.js +19 -0
- package/dist/utils/engine-context.js.map +1 -0
- package/dist/utils/engines-fs-provider.d.ts +9 -0
- package/dist/utils/engines-fs-provider.js +24 -0
- package/dist/utils/engines-fs-provider.js.map +1 -0
- package/dist/utils/engines-helpers.d.ts +10 -0
- package/dist/utils/engines-helpers.js +48 -0
- package/dist/utils/engines-helpers.js.map +1 -0
- package/dist/utils/ensure-file-content.d.ts +1 -0
- package/dist/utils/ensure-file-content.js +19 -0
- package/dist/utils/ensure-file-content.js.map +1 -0
- package/dist/utils/eslint/required.js +10 -0
- package/dist/utils/eslint/required.js.map +1 -0
- package/dist/utils/eslint-config.d.ts +3 -0
- package/dist/utils/eslint-config.js +136 -0
- package/dist/utils/eslint-config.js.map +1 -0
- package/dist/utils/eslint-rules/limited-exports-page-templates.d.ts +1 -0
- package/dist/utils/eslint-rules/limited-exports-page-templates.js +183 -0
- package/dist/utils/eslint-rules/limited-exports-page-templates.js.map +1 -0
- package/dist/utils/eslint-rules/no-anonymous-exports-page-templates.d.ts +1 -0
- package/dist/utils/eslint-rules/no-anonymous-exports-page-templates.js +75 -0
- package/dist/utils/eslint-rules/no-anonymous-exports-page-templates.js.map +1 -0
- package/dist/utils/eslint-rules-helpers.d.ts +4 -0
- package/dist/utils/eslint-rules-helpers.js +22 -0
- package/dist/utils/eslint-rules-helpers.js.map +1 -0
- package/dist/utils/express-middlewares.d.ts +4 -0
- package/dist/utils/express-middlewares.js +57 -0
- package/dist/utils/express-middlewares.js.map +1 -0
- package/dist/utils/extract-undefined-global.d.ts +4 -0
- package/dist/utils/extract-undefined-global.js +15 -0
- package/dist/utils/extract-undefined-global.js.map +1 -0
- package/dist/utils/fast-refresh-module.d.ts +22 -0
- package/dist/utils/fast-refresh-module.js +53 -0
- package/dist/utils/fast-refresh-module.js.map +1 -0
- package/dist/utils/feedback.d.ts +5 -0
- package/dist/utils/feedback.js +159 -0
- package/dist/utils/feedback.js.map +1 -0
- package/dist/utils/find-page-by-path.d.ts +2 -0
- package/dist/utils/find-page-by-path.js +96 -0
- package/dist/utils/find-page-by-path.js.map +1 -0
- package/dist/utils/flags.d.ts +41 -0
- package/dist/utils/flags.js +92 -0
- package/dist/utils/flags.js.map +1 -0
- package/dist/utils/gatsby-cloud-config.d.ts +4 -0
- package/dist/utils/gatsby-cloud-config.js +15 -0
- package/dist/utils/gatsby-cloud-config.js.map +1 -0
- package/dist/utils/gatsby-dependents.d.ts +8 -0
- package/dist/utils/gatsby-dependents.js +51 -0
- package/dist/utils/gatsby-dependents.js.map +1 -0
- package/dist/utils/gatsby-webpack-stats-extractor.d.ts +7 -0
- package/dist/utils/gatsby-webpack-stats-extractor.js +136 -0
- package/dist/utils/gatsby-webpack-stats-extractor.js.map +1 -0
- package/dist/utils/gatsby-webpack-virtual-modules.d.ts +6 -0
- package/dist/utils/gatsby-webpack-virtual-modules.js +45 -0
- package/dist/utils/gatsby-webpack-virtual-modules.js.map +1 -0
- package/dist/utils/get-cache.d.ts +2 -0
- package/dist/utils/get-cache.js +18 -0
- package/dist/utils/get-cache.js.map +1 -0
- package/dist/utils/get-latest-gatsby-files.d.ts +8 -0
- package/dist/utils/get-latest-gatsby-files.js +93 -0
- package/dist/utils/get-latest-gatsby-files.js.map +1 -0
- package/dist/utils/get-page-data.d.ts +3 -0
- package/dist/utils/get-page-data.js +88 -0
- package/dist/utils/get-page-data.js.map +1 -0
- package/dist/utils/get-public-path.d.ts +5 -0
- package/dist/utils/get-public-path.js +19 -0
- package/dist/utils/get-public-path.js.map +1 -0
- package/dist/utils/get-server-data.d.ts +19 -0
- package/dist/utils/get-server-data.js +29 -0
- package/dist/utils/get-server-data.js.map +1 -0
- package/dist/utils/get-ssl-cert.d.ts +9 -0
- package/dist/utils/get-ssl-cert.js +95 -0
- package/dist/utils/get-ssl-cert.js.map +1 -0
- package/dist/utils/get-static-dir.d.ts +12 -0
- package/dist/utils/get-static-dir.js +60 -0
- package/dist/utils/get-static-dir.js.map +1 -0
- package/dist/utils/get-value-at.d.ts +1 -0
- package/dist/utils/get-value-at.js +22 -0
- package/dist/utils/get-value-at.js.map +1 -0
- package/dist/utils/graphql-typegen/file-writes.d.ts +5 -0
- package/dist/utils/graphql-typegen/file-writes.js +63 -0
- package/dist/utils/graphql-typegen/file-writes.js.map +1 -0
- package/dist/utils/graphql-typegen/ts-codegen.d.ts +5 -0
- package/dist/utils/graphql-typegen/ts-codegen.js +136 -0
- package/dist/utils/graphql-typegen/ts-codegen.js.map +1 -0
- package/dist/utils/graphql-typegen/utils.d.ts +11 -0
- package/dist/utils/graphql-typegen/utils.js +70 -0
- package/dist/utils/graphql-typegen/utils.js.map +1 -0
- package/dist/utils/handle-flags.d.ts +8 -0
- package/dist/utils/handle-flags.js +212 -0
- package/dist/utils/handle-flags.js.map +1 -0
- package/dist/utils/import-gatsby-plugin.d.ts +11 -0
- package/dist/utils/import-gatsby-plugin.js +40 -0
- package/dist/utils/import-gatsby-plugin.js.map +1 -0
- package/dist/utils/is-32-bit-integer.d.ts +1 -0
- package/dist/utils/is-32-bit-integer.js +8 -0
- package/dist/utils/is-32-bit-integer.js.map +1 -0
- package/dist/utils/is-near-match.d.ts +1 -0
- package/dist/utils/is-near-match.js +10 -0
- package/dist/utils/is-near-match.js.map +1 -0
- package/dist/utils/jobs/manager.d.ts +34 -0
- package/dist/utils/jobs/manager.js +313 -0
- package/dist/utils/jobs/manager.js.map +1 -0
- package/dist/utils/jobs/types.d.ts +63 -0
- package/dist/utils/jobs/types.js +32 -0
- package/dist/utils/jobs/types.js.map +1 -0
- package/dist/utils/jobs/worker-messaging.d.ts +10 -0
- package/dist/utils/jobs/worker-messaging.js +114 -0
- package/dist/utils/jobs/worker-messaging.js.map +1 -0
- package/dist/utils/js-chunk-names.d.ts +1 -0
- package/dist/utils/js-chunk-names.js +72 -0
- package/dist/utils/js-chunk-names.js.map +1 -0
- package/dist/utils/loading-indicator.d.ts +3 -0
- package/dist/utils/loading-indicator.js +44 -0
- package/dist/utils/loading-indicator.js.map +1 -0
- package/dist/utils/local-eslint-config-finder.d.ts +1 -0
- package/dist/utils/local-eslint-config-finder.js +31 -0
- package/dist/utils/local-eslint-config-finder.js.map +1 -0
- package/dist/utils/merge-gatsby-config.d.ts +28 -0
- package/dist/utils/merge-gatsby-config.js +43 -0
- package/dist/utils/merge-gatsby-config.js.map +1 -0
- package/dist/utils/mett.d.ts +10 -0
- package/dist/utils/mett.js +42 -0
- package/dist/utils/mett.js.map +1 -0
- package/dist/utils/module-resolver.d.ts +2 -0
- package/dist/utils/module-resolver.js +24 -0
- package/dist/utils/module-resolver.js.map +1 -0
- package/dist/utils/node-manifest.d.ts +46 -0
- package/dist/utils/node-manifest.js +367 -0
- package/dist/utils/node-manifest.js.map +1 -0
- package/dist/utils/nodes.d.ts +13 -0
- package/dist/utils/nodes.js +62 -0
- package/dist/utils/nodes.js.map +1 -0
- package/dist/utils/normalize-path.d.ts +2 -0
- package/dist/utils/normalize-path.js +11 -0
- package/dist/utils/normalize-path.js.map +1 -0
- package/dist/utils/page-data-helpers.d.ts +23 -0
- package/dist/utils/page-data-helpers.js +76 -0
- package/dist/utils/page-data-helpers.js.map +1 -0
- package/dist/utils/page-data.d.ts +39 -0
- package/dist/utils/page-data.js +366 -0
- package/dist/utils/page-data.js.map +1 -0
- package/dist/utils/page-mode.d.ts +18 -0
- package/dist/utils/page-mode.js +124 -0
- package/dist/utils/page-mode.js.map +1 -0
- package/dist/utils/page-ssr-module/bundle-webpack.d.ts +18 -0
- package/dist/utils/page-ssr-module/bundle-webpack.js +209 -0
- package/dist/utils/page-ssr-module/bundle-webpack.js.map +1 -0
- package/dist/utils/page-ssr-module/entry.d.ts +61 -0
- package/dist/utils/page-ssr-module/entry.js +344 -0
- package/dist/utils/page-ssr-module/entry.js.map +1 -0
- package/dist/utils/page-ssr-module/lambda.d.ts +3 -0
- package/dist/utils/page-ssr-module/lambda.js +401 -0
- package/dist/utils/page-ssr-module/lambda.js.map +1 -0
- package/dist/utils/parcel/compile-gatsby-files.d.ts +26 -0
- package/dist/utils/parcel/compile-gatsby-files.js +271 -0
- package/dist/utils/parcel/compile-gatsby-files.js.map +1 -0
- package/dist/utils/path.d.ts +5 -0
- package/dist/utils/path.js +55 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/prepare-regex.d.ts +1 -0
- package/dist/utils/prepare-regex.js +13 -0
- package/dist/utils/prepare-regex.js.map +1 -0
- package/dist/utils/prepare-urls.d.ts +7 -0
- package/dist/utils/prepare-urls.js +58 -0
- package/dist/utils/prepare-urls.js.map +1 -0
- package/dist/utils/print-instructions.d.ts +2 -0
- package/dist/utils/print-instructions.js +42 -0
- package/dist/utils/print-instructions.js.map +1 -0
- package/dist/utils/rank-route.d.ts +1 -0
- package/dist/utils/rank-route.js +26 -0
- package/dist/utils/rank-route.js.map +1 -0
- package/dist/utils/reach-router-add-basecontext-export-loader.d.ts +1 -0
- package/dist/utils/reach-router-add-basecontext-export-loader.js +23 -0
- package/dist/utils/reach-router-add-basecontext-export-loader.js.map +1 -0
- package/dist/utils/report-once.d.ts +1 -0
- package/dist/utils/report-once.js +17 -0
- package/dist/utils/report-once.js.map +1 -0
- package/dist/utils/sanitize-node.d.ts +12 -0
- package/dist/utils/sanitize-node.js +87 -0
- package/dist/utils/sanitize-node.js.map +1 -0
- package/dist/utils/show-experiment-notice.d.ts +6 -0
- package/dist/utils/show-experiment-notice.js +51 -0
- package/dist/utils/show-experiment-notice.js.map +1 -0
- package/dist/utils/slices/stitching.d.ts +4 -0
- package/dist/utils/slices/stitching.js +92 -0
- package/dist/utils/slices/stitching.js.map +1 -0
- package/dist/utils/slices.d.ts +2 -0
- package/dist/utils/slices.js +9 -0
- package/dist/utils/slices.js.map +1 -0
- package/dist/utils/source-nodes-api-runner.d.ts +8 -0
- package/dist/utils/source-nodes-api-runner.js +23 -0
- package/dist/utils/source-nodes-api-runner.js.map +1 -0
- package/dist/utils/source-nodes.d.ts +11 -0
- package/dist/utils/source-nodes.js +150 -0
- package/dist/utils/source-nodes.js.map +1 -0
- package/dist/utils/stack-trace-utils.d.ts +24 -0
- package/dist/utils/stack-trace-utils.js +113 -0
- package/dist/utils/stack-trace-utils.js.map +1 -0
- package/dist/utils/start-server.d.ts +22 -0
- package/dist/utils/start-server.js +722 -0
- package/dist/utils/start-server.js.map +1 -0
- package/dist/utils/state-machine-logging.d.ts +4 -0
- package/dist/utils/state-machine-logging.js +47 -0
- package/dist/utils/state-machine-logging.js.map +1 -0
- package/dist/utils/static-query-utils.d.ts +13 -0
- package/dist/utils/static-query-utils.js +57 -0
- package/dist/utils/static-query-utils.js.map +1 -0
- package/dist/utils/test-import-error.d.ts +1 -0
- package/dist/utils/test-import-error.js +18 -0
- package/dist/utils/test-import-error.js.map +1 -0
- package/dist/utils/tracer/index.d.ts +12 -0
- package/dist/utils/tracer/index.js +42 -0
- package/dist/utils/tracer/index.js.map +1 -0
- package/dist/utils/tracer/jaeger-local.d.ts +4 -0
- package/dist/utils/tracer/jaeger-local.js +32 -0
- package/dist/utils/tracer/jaeger-local.js.map +1 -0
- package/dist/utils/tracer/zipkin-local.d.ts +11 -0
- package/dist/utils/tracer/zipkin-local.js +87 -0
- package/dist/utils/tracer/zipkin-local.js.map +1 -0
- package/dist/utils/tracer/zipkin-types.d.js +14 -0
- package/dist/utils/tracer/zipkin-types.d.js.map +1 -0
- package/dist/utils/validate-component.d.ts +23 -0
- package/dist/utils/validate-component.js +99 -0
- package/dist/utils/validate-component.js.map +1 -0
- package/dist/utils/validate-engines/child.d.ts +1 -0
- package/dist/utils/validate-engines/child.js +74 -0
- package/dist/utils/validate-engines/child.js.map +1 -0
- package/dist/utils/validate-engines/index.d.ts +2 -0
- package/dist/utils/validate-engines/index.js +48 -0
- package/dist/utils/validate-engines/index.js.map +1 -0
- package/dist/utils/wait-until-jobs-complete.d.ts +2 -0
- package/dist/utils/wait-until-jobs-complete.js +30 -0
- package/dist/utils/wait-until-jobs-complete.js.map +1 -0
- package/dist/utils/webpack/bundle.d.ts +9 -0
- package/dist/utils/webpack/bundle.js +41 -0
- package/dist/utils/webpack/bundle.js.map +1 -0
- package/dist/utils/webpack/get-ssr-chunk-hashes.d.ts +9 -0
- package/dist/utils/webpack/get-ssr-chunk-hashes.js +55 -0
- package/dist/utils/webpack/get-ssr-chunk-hashes.js.map +1 -0
- package/dist/utils/webpack/loaders/client-components-requires-writer-loader.d.ts +1 -0
- package/dist/utils/webpack/loaders/client-components-requires-writer-loader.js +22 -0
- package/dist/utils/webpack/loaders/client-components-requires-writer-loader.js.map +1 -0
- package/dist/utils/webpack/loaders/partial-hydration-reference-loader.d.ts +1 -0
- package/dist/utils/webpack/loaders/partial-hydration-reference-loader.js +127 -0
- package/dist/utils/webpack/loaders/partial-hydration-reference-loader.js.map +1 -0
- package/dist/utils/webpack/loaders/webpack-remove-exports-loader.d.ts +1 -0
- package/dist/utils/webpack/loaders/webpack-remove-exports-loader.js +40 -0
- package/dist/utils/webpack/loaders/webpack-remove-exports-loader.js.map +1 -0
- package/dist/utils/webpack/plugins/cache-folder-resolver.d.ts +25 -0
- package/dist/utils/webpack/plugins/cache-folder-resolver.js +111 -0
- package/dist/utils/webpack/plugins/cache-folder-resolver.js.map +1 -0
- package/dist/utils/webpack/plugins/corejs-resolver.d.ts +12 -0
- package/dist/utils/webpack/plugins/corejs-resolver.js +66 -0
- package/dist/utils/webpack/plugins/corejs-resolver.js.map +1 -0
- package/dist/utils/webpack/plugins/force-css-hmr-for-edge-cases.d.ts +22 -0
- package/dist/utils/webpack/plugins/force-css-hmr-for-edge-cases.js +88 -0
- package/dist/utils/webpack/plugins/force-css-hmr-for-edge-cases.js.map +1 -0
- package/dist/utils/webpack/plugins/partial-hydration.d.ts +26 -0
- package/dist/utils/webpack/plugins/partial-hydration.js +362 -0
- package/dist/utils/webpack/plugins/partial-hydration.js.map +1 -0
- package/dist/utils/webpack/plugins/static-query-mapper.d.ts +13 -0
- package/dist/utils/webpack/plugins/static-query-mapper.js +235 -0
- package/dist/utils/webpack/plugins/static-query-mapper.js.map +1 -0
- package/dist/utils/webpack/plugins/webpack-logging.d.ts +12 -0
- package/dist/utils/webpack/plugins/webpack-logging.js +51 -0
- package/dist/utils/webpack/plugins/webpack-logging.js.map +1 -0
- package/dist/utils/webpack/utils/create-normalized-module-key.d.ts +12 -0
- package/dist/utils/webpack/utils/create-normalized-module-key.js +25 -0
- package/dist/utils/webpack/utils/create-normalized-module-key.js.map +1 -0
- package/dist/utils/webpack/utils/is-file-inside-compilations.d.ts +7 -0
- package/dist/utils/webpack/utils/is-file-inside-compilations.js +37 -0
- package/dist/utils/webpack/utils/is-file-inside-compilations.js.map +1 -0
- package/dist/utils/webpack-error-utils.d.ts +24 -0
- package/dist/utils/webpack-error-utils.js +112 -0
- package/dist/utils/webpack-error-utils.js.map +1 -0
- package/dist/utils/webpack-plugins.d.ts +46 -0
- package/dist/utils/webpack-plugins.js +61 -0
- package/dist/utils/webpack-plugins.js.map +1 -0
- package/dist/utils/webpack-status.d.ts +3 -0
- package/dist/utils/webpack-status.js +21 -0
- package/dist/utils/webpack-status.js.map +1 -0
- package/dist/utils/webpack-utils.d.ts +121 -0
- package/dist/utils/webpack-utils.js +574 -0
- package/dist/utils/webpack-utils.js.map +1 -0
- package/dist/utils/webpack.config.js +804 -0
- package/dist/utils/webpack.config.js.map +1 -0
- package/dist/utils/websocket-manager.d.ts +39 -0
- package/dist/utils/websocket-manager.js +183 -0
- package/dist/utils/websocket-manager.js.map +1 -0
- package/dist/utils/worker/child/index.d.ts +5 -0
- package/dist/utils/worker/child/index.js +35 -0
- package/dist/utils/worker/child/index.js.map +1 -0
- package/dist/utils/worker/child/load-config-and-plugins.d.ts +2 -0
- package/dist/utils/worker/child/load-config-and-plugins.js +28 -0
- package/dist/utils/worker/child/load-config-and-plugins.js.map +1 -0
- package/dist/utils/worker/child/queries.d.ts +7 -0
- package/dist/utils/worker/child/queries.js +84 -0
- package/dist/utils/worker/child/queries.js.map +1 -0
- package/dist/utils/worker/child/render-html.d.ts +49 -0
- package/dist/utils/worker/child/render-html.js +562 -0
- package/dist/utils/worker/child/render-html.js.map +1 -0
- package/dist/utils/worker/child/schema.d.ts +2 -0
- package/dist/utils/worker/child/schema.js +41 -0
- package/dist/utils/worker/child/schema.js.map +1 -0
- package/dist/utils/worker/child/state.d.ts +2 -0
- package/dist/utils/worker/child/state.js +13 -0
- package/dist/utils/worker/child/state.js.map +1 -0
- package/dist/utils/worker/messaging.d.ts +16 -0
- package/dist/utils/worker/messaging.js +9 -0
- package/dist/utils/worker/messaging.js.map +1 -0
- package/dist/utils/worker/pool.d.ts +10 -0
- package/dist/utils/worker/pool.js +122 -0
- package/dist/utils/worker/pool.js.map +1 -0
- package/dist/utils/worker/reporter.d.ts +3 -0
- package/dist/utils/worker/reporter.js +26 -0
- package/dist/utils/worker/reporter.js.map +1 -0
- package/dist/utils/worker/types.d.ts +3 -0
- package/dist/utils/worker/types.js +4 -0
- package/dist/utils/worker/types.js.map +1 -0
- package/graphql.d.ts +2 -0
- package/graphql.js +6 -0
- package/index.d.ts +1906 -0
- package/internal.d.ts +4 -0
- package/internal.js +5 -0
- package/ipc.json +3 -0
- package/package.json +744 -0
- package/reporter.d.ts +4 -0
- package/reporter.js +3 -0
- package/scripts/postinstall.js +7 -0
- package/utils.js +1 -0
- package/webpack.d.ts +3 -0
- package/webpack.js +3 -0
|
@@ -0,0 +1,722 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.startServer = startServer;
|
|
6
|
+
var _webpackHotMiddleware = _interopRequireDefault(require("@gatsbyjs/webpack-hot-middleware"));
|
|
7
|
+
var _webpackDevMiddleware = _interopRequireDefault(require("webpack-dev-middleware"));
|
|
8
|
+
var _got = _interopRequireDefault(require("got"));
|
|
9
|
+
var _webpack = _interopRequireDefault(require("webpack"));
|
|
10
|
+
var _express = _interopRequireDefault(require("express"));
|
|
11
|
+
var _compression = _interopRequireDefault(require("compression"));
|
|
12
|
+
var _express2 = require("graphql-http/lib/use/express");
|
|
13
|
+
var _gatsbyGraphiqlExplorer = _interopRequireDefault(require("gatsby-graphiql-explorer"));
|
|
14
|
+
var _graphql = require("graphql");
|
|
15
|
+
var _gatsbyCoreUtils = require("gatsby-core-utils");
|
|
16
|
+
var _http = _interopRequireDefault(require("http"));
|
|
17
|
+
var _https = _interopRequireDefault(require("https"));
|
|
18
|
+
var _cors = _interopRequireDefault(require("cors"));
|
|
19
|
+
var _launchEditor = _interopRequireDefault(require("react-dev-utils/launchEditor"));
|
|
20
|
+
var _codeFrame = require("@babel/code-frame");
|
|
21
|
+
var fs = _interopRequireWildcard(require("fs-extra"));
|
|
22
|
+
var _path = require("../utils/path");
|
|
23
|
+
var _webpack2 = _interopRequireDefault(require("../utils/webpack.config"));
|
|
24
|
+
var _redux = require("../redux");
|
|
25
|
+
var _reporter = _interopRequireDefault(require("gatsby-cli/lib/reporter"));
|
|
26
|
+
var WorkerPool = _interopRequireWildcard(require("../utils/worker/pool"));
|
|
27
|
+
var _developStatic = require("../commands/develop-static");
|
|
28
|
+
var _context = _interopRequireDefault(require("../schema/context"));
|
|
29
|
+
var _websocketManager = require("../utils/websocket-manager");
|
|
30
|
+
var _pageData = require("./page-data");
|
|
31
|
+
var _getPageData = require("./get-page-data");
|
|
32
|
+
var _findPageByPath = require("./find-page-by-path");
|
|
33
|
+
var _apiRunnerNode = _interopRequireDefault(require("../utils/api-runner-node"));
|
|
34
|
+
var path = _interopRequireWildcard(require("path"));
|
|
35
|
+
var _types = require("../commands/types");
|
|
36
|
+
var _stackTraceUtils = require("./stack-trace-utils");
|
|
37
|
+
var _developPreloadHeaders = require("./develop-preload-headers");
|
|
38
|
+
var _loadingIndicator = require("./loading-indicator");
|
|
39
|
+
var _renderDevHtml = require("./dev-ssr/render-dev-html");
|
|
40
|
+
var _getServerData = require("./get-server-data");
|
|
41
|
+
var _constants = require("../constants");
|
|
42
|
+
var _pageMode = require("./page-mode");
|
|
43
|
+
var _expressMiddlewares = require("./express-middlewares");
|
|
44
|
+
var _polyfillRemoteFile = require("gatsby-plugin-utils/polyfill-remote-file");
|
|
45
|
+
var _isFileInsideCompilations = require("./webpack/utils/is-file-inside-compilations");
|
|
46
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
47
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
48
|
+
async function startServer(program, app, workerPool = WorkerPool.create()) {
|
|
49
|
+
const directory = program.directory;
|
|
50
|
+
const PAGE_RENDERER_PATH = path.join(program.directory, _constants.ROUTES_DIRECTORY, `render-page.js`);
|
|
51
|
+
const webpackActivity = _reporter.default.activityTimer(`Building development bundle`, {
|
|
52
|
+
id: `webpack-develop`
|
|
53
|
+
});
|
|
54
|
+
webpackActivity.start();
|
|
55
|
+
|
|
56
|
+
// loading indicator
|
|
57
|
+
// write virtual module always to not fail webpack compilation, but only add express route handlers when
|
|
58
|
+
// query on demand is enabled and loading indicator is not disabled
|
|
59
|
+
(0, _loadingIndicator.writeVirtualLoadingIndicatorModule)();
|
|
60
|
+
|
|
61
|
+
// Remove the following when merging GATSBY_EXPERIMENTAL_DEV_SSR
|
|
62
|
+
const directoryPath = (0, _path.withBasePath)(directory);
|
|
63
|
+
const {
|
|
64
|
+
buildRenderer,
|
|
65
|
+
doBuildPages
|
|
66
|
+
} = require(`../commands/build-html`);
|
|
67
|
+
const createIndexHtml = async activity => {
|
|
68
|
+
try {
|
|
69
|
+
const {
|
|
70
|
+
rendererPath,
|
|
71
|
+
close
|
|
72
|
+
} = await buildRenderer(program, _types.Stage.DevelopHTML, activity.span);
|
|
73
|
+
await doBuildPages(rendererPath, [`/`], activity, workerPool, _types.Stage.DevelopHTML);
|
|
74
|
+
// close the compiler
|
|
75
|
+
await close();
|
|
76
|
+
} catch (err) {
|
|
77
|
+
if (err.name !== `WebpackError`) {
|
|
78
|
+
_reporter.default.panic(err);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
_reporter.default.panic(_reporter.default.stripIndent`
|
|
82
|
+
There was an error compiling the html.js component for the development server.
|
|
83
|
+
See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html
|
|
84
|
+
`, err);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const indexHTMLActivity = _reporter.default.phantomActivity(`building index.html`, {});
|
|
88
|
+
let pageRenderer;
|
|
89
|
+
if (process.env.GATSBY_EXPERIMENTAL_DEV_SSR) {
|
|
90
|
+
const {
|
|
91
|
+
buildRenderer
|
|
92
|
+
} = require(`../commands/build-html`);
|
|
93
|
+
pageRenderer = (await buildRenderer(program, _types.Stage.DevelopHTML)).rendererPath;
|
|
94
|
+
const {
|
|
95
|
+
initDevWorkerPool
|
|
96
|
+
} = require(`./dev-ssr/render-dev-html`);
|
|
97
|
+
initDevWorkerPool();
|
|
98
|
+
} else {
|
|
99
|
+
indexHTMLActivity.start();
|
|
100
|
+
await createIndexHtml(indexHTMLActivity);
|
|
101
|
+
indexHTMLActivity.end();
|
|
102
|
+
}
|
|
103
|
+
const devConfig = await (0, _webpack2.default)(program, directory, _types.Stage.Develop, program.port, {
|
|
104
|
+
parentSpan: webpackActivity.span
|
|
105
|
+
});
|
|
106
|
+
const compiler = (0, _webpack.default)(devConfig);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Set up the express app.
|
|
110
|
+
**/
|
|
111
|
+
app.use((0, _compression.default)());
|
|
112
|
+
app.use((0, _webpackHotMiddleware.default)(compiler, {
|
|
113
|
+
log: false,
|
|
114
|
+
path: `/__webpack_hmr`,
|
|
115
|
+
heartbeat: 10 * 1000
|
|
116
|
+
}));
|
|
117
|
+
app.use((0, _cors.default)());
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Pattern matching all endpoints with graphql or graphiql with 1 or more leading underscores
|
|
121
|
+
*/
|
|
122
|
+
const graphqlEndpoint = `/_+graphi?ql`;
|
|
123
|
+
(0, _gatsbyGraphiqlExplorer.default)(app, {
|
|
124
|
+
graphqlEndpoint,
|
|
125
|
+
getFragments: function getFragments() {
|
|
126
|
+
const fragments = [];
|
|
127
|
+
for (const def of _redux.store.getState().definitions.values()) {
|
|
128
|
+
if (def.def.kind === _graphql.Kind.FRAGMENT_DEFINITION) {
|
|
129
|
+
fragments.push(def.def);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return fragments;
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
app.use(graphqlEndpoint, (0, _express2.createHandler)({
|
|
136
|
+
schema() {
|
|
137
|
+
return _redux.store.getState().schema;
|
|
138
|
+
},
|
|
139
|
+
context() {
|
|
140
|
+
return (0, _context.default)({
|
|
141
|
+
schema: _redux.store.getState().schema,
|
|
142
|
+
schemaComposer: _redux.store.getState().schemaCustomization.composer,
|
|
143
|
+
context: {},
|
|
144
|
+
customContext: _redux.store.getState().schemaCustomization.context
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
onOperation(_req, _args, result) {
|
|
148
|
+
if (result.errors) {
|
|
149
|
+
result.errors = result.errors.map(err => ({
|
|
150
|
+
...err.toJSON(),
|
|
151
|
+
extensions: {
|
|
152
|
+
stack: err.stack ? err.stack.split(`\n`) : []
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
155
|
+
}
|
|
156
|
+
result.extensions = {
|
|
157
|
+
enableRefresh: process.env.ENABLE_GATSBY_REFRESH_ENDPOINT,
|
|
158
|
+
refreshToken: process.env.GATSBY_REFRESH_TOKEN
|
|
159
|
+
};
|
|
160
|
+
return result;
|
|
161
|
+
}
|
|
162
|
+
}));
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Refresh external data sources.
|
|
166
|
+
* This behavior is disabled by default, but the ENABLE_GATSBY_REFRESH_ENDPOINT env var enables it
|
|
167
|
+
* If no GATSBY_REFRESH_TOKEN env var is available, then no Authorization header is required
|
|
168
|
+
**/
|
|
169
|
+
const REFRESH_ENDPOINT = `/__refresh`;
|
|
170
|
+
const refresh = async (req, pluginName) => {
|
|
171
|
+
global.__GATSBY.buildId = _gatsbyCoreUtils.uuid.v4();
|
|
172
|
+
_redux.emitter.emit(`WEBHOOK_RECEIVED`, {
|
|
173
|
+
webhookBody: req.body,
|
|
174
|
+
pluginName
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
app.post(`${REFRESH_ENDPOINT}/:plugin_name?`, _express.default.json(), (req, res) => {
|
|
178
|
+
const pluginName = req.params[`plugin_name`];
|
|
179
|
+
const enableRefresh = process.env.ENABLE_GATSBY_REFRESH_ENDPOINT;
|
|
180
|
+
const refreshToken = process.env.GATSBY_REFRESH_TOKEN;
|
|
181
|
+
const authorizedRefresh = !refreshToken || req.headers.authorization === refreshToken;
|
|
182
|
+
if (enableRefresh && authorizedRefresh) {
|
|
183
|
+
refresh(req, pluginName);
|
|
184
|
+
res.status(200);
|
|
185
|
+
res.setHeader(`content-type`, `application/json`);
|
|
186
|
+
} else {
|
|
187
|
+
res.status(authorizedRefresh ? 404 : 403);
|
|
188
|
+
res.json({
|
|
189
|
+
error: enableRefresh ? `Authorization failed. Make sure you add authorization header to your refresh requests` : `Refresh endpoint is not enabled. Run gatsby with "ENABLE_GATSBY_REFRESH_ENDPOINT=true" environment variable set.`,
|
|
190
|
+
isEnabled: !!process.env.ENABLE_GATSBY_REFRESH_ENDPOINT
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
res.end();
|
|
194
|
+
});
|
|
195
|
+
app.get(`/__open-stack-frame-in-editor`, (req, res) => {
|
|
196
|
+
if (req.query.fileName) {
|
|
197
|
+
const fileName = path.resolve(process.cwd(), req.query.fileName);
|
|
198
|
+
const lineNumber = parseInt(req.query.lineNumber, 10);
|
|
199
|
+
(0, _launchEditor.default)(fileName, isNaN(lineNumber) ? 1 : lineNumber);
|
|
200
|
+
}
|
|
201
|
+
res.end();
|
|
202
|
+
});
|
|
203
|
+
(0, _polyfillRemoteFile.addImageRoutes)(app, _redux.store);
|
|
204
|
+
const webpackDevMiddlewareInstance = (0, _webpackDevMiddleware.default)(compiler, {
|
|
205
|
+
publicPath: devConfig.output.publicPath,
|
|
206
|
+
stats: `errors-only`,
|
|
207
|
+
serverSideRender: true
|
|
208
|
+
});
|
|
209
|
+
app.use(webpackDevMiddlewareInstance);
|
|
210
|
+
app.get(`/page-data/:pagePath(*)/page-data.json`, async (req, res, next) => {
|
|
211
|
+
const requestedPagePath = req.params.pagePath;
|
|
212
|
+
if (!requestedPagePath) {
|
|
213
|
+
next();
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
const potentialPagePath = (0, _pageData.reverseFixedPagePath)(requestedPagePath);
|
|
217
|
+
const page = (0, _findPageByPath.findPageByPath)(_redux.store.getState(), potentialPagePath, false);
|
|
218
|
+
if (page) {
|
|
219
|
+
try {
|
|
220
|
+
let serverDataPromise = Promise.resolve({});
|
|
221
|
+
const pageMode = (0, _pageMode.getPageMode)(page);
|
|
222
|
+
if (pageMode === `SSR`) {
|
|
223
|
+
const renderer = require(PAGE_RENDERER_PATH);
|
|
224
|
+
const componentInstance = await renderer.getPageChunk(page);
|
|
225
|
+
serverDataPromise = (0, _getServerData.getServerData)(req, page, potentialPagePath, componentInstance).catch(error => error);
|
|
226
|
+
}
|
|
227
|
+
let pageData;
|
|
228
|
+
// TODO move to query-engine
|
|
229
|
+
if (process.env.GATSBY_QUERY_ON_DEMAND) {
|
|
230
|
+
pageData = await (0, _getPageData.getPageData)(page.path);
|
|
231
|
+
} else {
|
|
232
|
+
pageData = await (0, _pageData.readPageData)(path.join(_redux.store.getState().program.directory, `public`), page.path);
|
|
233
|
+
}
|
|
234
|
+
let statusCode = 200;
|
|
235
|
+
if (pageMode === `SSR`) {
|
|
236
|
+
try {
|
|
237
|
+
const result = await serverDataPromise;
|
|
238
|
+
if (result instanceof Error) {
|
|
239
|
+
throw result;
|
|
240
|
+
}
|
|
241
|
+
if (result.headers) {
|
|
242
|
+
for (const [name, value] of Object.entries(result.headers)) {
|
|
243
|
+
res.setHeader(name, value);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
if (result.status) {
|
|
247
|
+
statusCode = result.status;
|
|
248
|
+
}
|
|
249
|
+
pageData.result.serverData = result.props;
|
|
250
|
+
pageData.getServerDataError = null;
|
|
251
|
+
} catch (error) {
|
|
252
|
+
const structuredError = _reporter.default.panicOnBuild({
|
|
253
|
+
id: `95315`,
|
|
254
|
+
context: {
|
|
255
|
+
sourceMessage: error.message,
|
|
256
|
+
pagePath: requestedPagePath,
|
|
257
|
+
potentialPagePath
|
|
258
|
+
},
|
|
259
|
+
error
|
|
260
|
+
});
|
|
261
|
+
// Use page-data.json file instead of emitting via websockets as this makes it easier
|
|
262
|
+
// to only display the relevant error + clearing of the error
|
|
263
|
+
// The query-result-store reacts to this
|
|
264
|
+
pageData.getServerDataError = structuredError;
|
|
265
|
+
}
|
|
266
|
+
pageData.path = page.matchPath ? `/${potentialPagePath}` : page.path;
|
|
267
|
+
} else {
|
|
268
|
+
// When user removes getServerData function, Gatsby browser runtime still has cached version of page-data.
|
|
269
|
+
// Send `null` to always reset cached serverData:
|
|
270
|
+
pageData.result.serverData = null;
|
|
271
|
+
}
|
|
272
|
+
res.status(statusCode).send(pageData);
|
|
273
|
+
return;
|
|
274
|
+
} catch (e) {
|
|
275
|
+
_reporter.default.error(`Error loading a result for the page query in "${requestedPagePath}" / "${potentialPagePath}". Query was not run and no cached result was found.`, e);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
res.status(404).send({
|
|
279
|
+
path: potentialPagePath
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
app.get(`/__original-stack-frame`, (req, res) => {
|
|
283
|
+
var _req$query, _sourceLine, _sourceColumn;
|
|
284
|
+
const emptyResponse = {
|
|
285
|
+
codeFrame: `No codeFrame could be generated`,
|
|
286
|
+
sourcePosition: null,
|
|
287
|
+
sourceContent: null
|
|
288
|
+
};
|
|
289
|
+
let sourceContent;
|
|
290
|
+
let sourceLine;
|
|
291
|
+
let sourceColumn;
|
|
292
|
+
let sourceEndLine;
|
|
293
|
+
let sourceEndColumn;
|
|
294
|
+
let sourcePosition;
|
|
295
|
+
if ((_req$query = req.query) !== null && _req$query !== void 0 && _req$query.skipSourceMap) {
|
|
296
|
+
var _req$query2, _res$locals, _res$locals$webpack, _res$locals$webpack$d, _res$locals$webpack$d2, _req$query3;
|
|
297
|
+
if (!((_req$query2 = req.query) !== null && _req$query2 !== void 0 && _req$query2.moduleId)) {
|
|
298
|
+
res.json(emptyResponse);
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
const absolutePath = path.resolve(_redux.store.getState().program.directory, req.query.moduleId);
|
|
302
|
+
const compilation = (_res$locals = res.locals) === null || _res$locals === void 0 ? void 0 : (_res$locals$webpack = _res$locals.webpack) === null || _res$locals$webpack === void 0 ? void 0 : (_res$locals$webpack$d = _res$locals$webpack.devMiddleware) === null || _res$locals$webpack$d === void 0 ? void 0 : (_res$locals$webpack$d2 = _res$locals$webpack$d.stats) === null || _res$locals$webpack$d2 === void 0 ? void 0 : _res$locals$webpack$d2.compilation;
|
|
303
|
+
if (!compilation) {
|
|
304
|
+
res.json(emptyResponse);
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
if (!(0, _isFileInsideCompilations.isFileInsideCompilations)(absolutePath, compilation)) {
|
|
308
|
+
res.json(emptyResponse);
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
try {
|
|
312
|
+
sourceContent = fs.readFileSync(absolutePath, `utf-8`);
|
|
313
|
+
} catch (e) {
|
|
314
|
+
res.json(emptyResponse);
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if ((_req$query3 = req.query) !== null && _req$query3 !== void 0 && _req$query3.lineNumber) {
|
|
318
|
+
try {
|
|
319
|
+
var _req$query4, _req$query5, _req$query6;
|
|
320
|
+
sourceLine = parseInt(req.query.lineNumber, 10);
|
|
321
|
+
if ((_req$query4 = req.query) !== null && _req$query4 !== void 0 && _req$query4.endLineNumber) {
|
|
322
|
+
sourceEndLine = parseInt(req.query.endLineNumber, 10);
|
|
323
|
+
}
|
|
324
|
+
if ((_req$query5 = req.query) !== null && _req$query5 !== void 0 && _req$query5.columnNumber) {
|
|
325
|
+
sourceColumn = parseInt(req.query.columnNumber, 10);
|
|
326
|
+
}
|
|
327
|
+
if ((_req$query6 = req.query) !== null && _req$query6 !== void 0 && _req$query6.endColumnNumber) {
|
|
328
|
+
sourceEndColumn = parseInt(req.query.endColumnNumber, 10);
|
|
329
|
+
}
|
|
330
|
+
} catch {
|
|
331
|
+
// failed to get line/column, we should still try to show the code frame
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
sourcePosition = {
|
|
335
|
+
line: sourceLine,
|
|
336
|
+
column: sourceColumn
|
|
337
|
+
};
|
|
338
|
+
} else {
|
|
339
|
+
var _res$locals2, _res$locals2$webpack, _res$locals2$webpack$, _res$locals2$webpack$2, _req$query7, _ref, _req$query8, _ref2, _req$query9, _compilation$codeGene, _compilation$codeGene2, _sourcePosition, _sourcePosition2;
|
|
340
|
+
const compilation = (_res$locals2 = res.locals) === null || _res$locals2 === void 0 ? void 0 : (_res$locals2$webpack = _res$locals2.webpack) === null || _res$locals2$webpack === void 0 ? void 0 : (_res$locals2$webpack$ = _res$locals2$webpack.devMiddleware) === null || _res$locals2$webpack$ === void 0 ? void 0 : (_res$locals2$webpack$2 = _res$locals2$webpack$.stats) === null || _res$locals2$webpack$2 === void 0 ? void 0 : _res$locals2$webpack$2.compilation;
|
|
341
|
+
if (!compilation) {
|
|
342
|
+
res.json(emptyResponse);
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const moduleId = (_req$query7 = req.query) === null || _req$query7 === void 0 ? void 0 : _req$query7.moduleId;
|
|
346
|
+
const lineNumber = parseInt((_ref = (_req$query8 = req.query) === null || _req$query8 === void 0 ? void 0 : _req$query8.lineNumber) !== null && _ref !== void 0 ? _ref : 1, 10);
|
|
347
|
+
const columnNumber = parseInt((_ref2 = (_req$query9 = req.query) === null || _req$query9 === void 0 ? void 0 : _req$query9.columnNumber) !== null && _ref2 !== void 0 ? _ref2 : 1, 10);
|
|
348
|
+
let fileModule;
|
|
349
|
+
for (const module of compilation.modules) {
|
|
350
|
+
const moduleIdentifier = compilation.chunkGraph.getModuleId(module);
|
|
351
|
+
if (moduleIdentifier === moduleId) {
|
|
352
|
+
fileModule = module;
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
if (!fileModule) {
|
|
357
|
+
res.json(emptyResponse);
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// We need the internal webpack file that is used in the bundle, not the module source.
|
|
362
|
+
// It doesn't have the correct sourceMap.
|
|
363
|
+
const webpackSource = compilation === null || compilation === void 0 ? void 0 : (_compilation$codeGene = compilation.codeGenerationResults) === null || _compilation$codeGene === void 0 ? void 0 : (_compilation$codeGene2 = _compilation$codeGene.get(fileModule)) === null || _compilation$codeGene2 === void 0 ? void 0 : _compilation$codeGene2.sources.get(`javascript`);
|
|
364
|
+
const sourceMap = webpackSource === null || webpackSource === void 0 ? void 0 : webpackSource.map();
|
|
365
|
+
if (!sourceMap) {
|
|
366
|
+
res.json(emptyResponse);
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
const position = {
|
|
370
|
+
line: lineNumber,
|
|
371
|
+
column: columnNumber
|
|
372
|
+
};
|
|
373
|
+
const result = (0, _stackTraceUtils.findOriginalSourcePositionAndContent)(sourceMap, position);
|
|
374
|
+
sourcePosition = result === null || result === void 0 ? void 0 : result.sourcePosition;
|
|
375
|
+
sourceLine = (_sourcePosition = sourcePosition) === null || _sourcePosition === void 0 ? void 0 : _sourcePosition.line;
|
|
376
|
+
sourceColumn = (_sourcePosition2 = sourcePosition) === null || _sourcePosition2 === void 0 ? void 0 : _sourcePosition2.column;
|
|
377
|
+
sourceContent = result === null || result === void 0 ? void 0 : result.sourceContent;
|
|
378
|
+
if (!sourceContent || !sourceLine) {
|
|
379
|
+
res.json(emptyResponse);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
const codeFrame = (0, _codeFrame.codeFrameColumns)(sourceContent, {
|
|
384
|
+
start: {
|
|
385
|
+
line: (_sourceLine = sourceLine) !== null && _sourceLine !== void 0 ? _sourceLine : 0,
|
|
386
|
+
column: (_sourceColumn = sourceColumn) !== null && _sourceColumn !== void 0 ? _sourceColumn : 0
|
|
387
|
+
},
|
|
388
|
+
end: sourceEndLine ? {
|
|
389
|
+
line: sourceEndLine,
|
|
390
|
+
column: sourceEndColumn
|
|
391
|
+
} : undefined
|
|
392
|
+
}, {
|
|
393
|
+
highlightCode: true
|
|
394
|
+
});
|
|
395
|
+
res.json({
|
|
396
|
+
codeFrame,
|
|
397
|
+
sourcePosition,
|
|
398
|
+
sourceContent
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
app.get(`/__file-code-frame`, async (req, res) => {
|
|
402
|
+
var _req$query10, _req$query11, _req$query12, _res$locals3, _res$locals3$webpack, _res$locals3$webpack$, _res$locals3$webpack$2;
|
|
403
|
+
const emptyResponse = {
|
|
404
|
+
codeFrame: `No codeFrame could be generated`,
|
|
405
|
+
sourcePosition: null,
|
|
406
|
+
sourceContent: null
|
|
407
|
+
};
|
|
408
|
+
const filePath = (_req$query10 = req.query) === null || _req$query10 === void 0 ? void 0 : _req$query10.filePath;
|
|
409
|
+
const lineNumber = parseInt((_req$query11 = req.query) === null || _req$query11 === void 0 ? void 0 : _req$query11.lineNumber, 10);
|
|
410
|
+
const columnNumber = parseInt((_req$query12 = req.query) === null || _req$query12 === void 0 ? void 0 : _req$query12.columnNumber, 10);
|
|
411
|
+
if (!filePath) {
|
|
412
|
+
res.json(emptyResponse);
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
const absolutePath = path.resolve(_redux.store.getState().program.directory, filePath);
|
|
416
|
+
const compilation = (_res$locals3 = res.locals) === null || _res$locals3 === void 0 ? void 0 : (_res$locals3$webpack = _res$locals3.webpack) === null || _res$locals3$webpack === void 0 ? void 0 : (_res$locals3$webpack$ = _res$locals3$webpack.devMiddleware) === null || _res$locals3$webpack$ === void 0 ? void 0 : (_res$locals3$webpack$2 = _res$locals3$webpack$.stats) === null || _res$locals3$webpack$2 === void 0 ? void 0 : _res$locals3$webpack$2.compilation;
|
|
417
|
+
if (!compilation) {
|
|
418
|
+
res.json(emptyResponse);
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
if (!(0, _isFileInsideCompilations.isFileInsideCompilations)(absolutePath, compilation)) {
|
|
422
|
+
res.json(emptyResponse);
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
const sourceContent = await fs.readFile(absolutePath, `utf-8`);
|
|
426
|
+
const codeFrame = (0, _codeFrame.codeFrameColumns)(sourceContent, {
|
|
427
|
+
start: {
|
|
428
|
+
line: lineNumber,
|
|
429
|
+
column: columnNumber !== null && columnNumber !== void 0 ? columnNumber : 0
|
|
430
|
+
}
|
|
431
|
+
}, {
|
|
432
|
+
highlightCode: true
|
|
433
|
+
});
|
|
434
|
+
res.json({
|
|
435
|
+
codeFrame
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
// Expose access to app for advanced use cases
|
|
440
|
+
const {
|
|
441
|
+
developMiddleware
|
|
442
|
+
} = _redux.store.getState().config;
|
|
443
|
+
if (developMiddleware) {
|
|
444
|
+
developMiddleware(app);
|
|
445
|
+
}
|
|
446
|
+
const {
|
|
447
|
+
proxy,
|
|
448
|
+
trailingSlash
|
|
449
|
+
} = _redux.store.getState().config;
|
|
450
|
+
app.use((0, _expressMiddlewares.configureTrailingSlash)(() => _redux.store.getState(), trailingSlash));
|
|
451
|
+
|
|
452
|
+
// Disable directory indexing i.e. serving index.html from a directory.
|
|
453
|
+
// This can lead to serving stale html files during development.
|
|
454
|
+
//
|
|
455
|
+
// We serve by default an empty index.html that sets up the dev environment.
|
|
456
|
+
app.use((0, _developStatic.developStatic)(`public`, {
|
|
457
|
+
index: false
|
|
458
|
+
}));
|
|
459
|
+
|
|
460
|
+
// Set up API proxy.
|
|
461
|
+
if (proxy) {
|
|
462
|
+
proxy.forEach(({
|
|
463
|
+
prefix,
|
|
464
|
+
url
|
|
465
|
+
}) => {
|
|
466
|
+
app.use(`${prefix}/*`, (req, res) => {
|
|
467
|
+
const proxiedUrl = url + req.originalUrl;
|
|
468
|
+
const {
|
|
469
|
+
// remove `host` from copied headers
|
|
470
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
471
|
+
headers: {
|
|
472
|
+
host,
|
|
473
|
+
...headers
|
|
474
|
+
},
|
|
475
|
+
method
|
|
476
|
+
} = req;
|
|
477
|
+
req.pipe(_got.default.stream(proxiedUrl, {
|
|
478
|
+
headers,
|
|
479
|
+
method: method,
|
|
480
|
+
decompress: false
|
|
481
|
+
}).on(`response`, response => res.writeHead(response.statusCode || 200, response.headers)).on(`error`, (err, _, response) => {
|
|
482
|
+
if (response) {
|
|
483
|
+
res.writeHead(response.statusCode || 400, response.headers);
|
|
484
|
+
} else {
|
|
485
|
+
const message = `Error when trying to proxy request "${req.originalUrl}" to "${proxiedUrl}"`;
|
|
486
|
+
_reporter.default.error(message, err);
|
|
487
|
+
res.sendStatus(500);
|
|
488
|
+
}
|
|
489
|
+
})).pipe(res);
|
|
490
|
+
});
|
|
491
|
+
}, (0, _cors.default)());
|
|
492
|
+
}
|
|
493
|
+
await (0, _apiRunnerNode.default)(`onCreateDevServer`, {
|
|
494
|
+
app,
|
|
495
|
+
deferNodeMutation: true
|
|
496
|
+
});
|
|
497
|
+
|
|
498
|
+
// In case nothing before handled hot-update - send 404.
|
|
499
|
+
// This fixes "Unexpected token < in JSON at position 0" runtime
|
|
500
|
+
// errors after restarting development server and
|
|
501
|
+
// cause automatic hard refresh in the browser.
|
|
502
|
+
app.use(/.*\.hot-update\.json$/i, (_, res) => {
|
|
503
|
+
res.status(404).end();
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
// Render an HTML page and serve it.
|
|
507
|
+
if (process.env.GATSBY_EXPERIMENTAL_DEV_SSR) {
|
|
508
|
+
app.get(`*`, async (req, res, next) => {
|
|
509
|
+
const pathObj = (0, _findPageByPath.findPageByPath)(_redux.store.getState(), decodeURI(req.path));
|
|
510
|
+
if (!pathObj) {
|
|
511
|
+
return next();
|
|
512
|
+
}
|
|
513
|
+
const allowTimedFallback = !req.headers[`x-gatsby-wait-for-dev-ssr`];
|
|
514
|
+
await (0, _developPreloadHeaders.appendPreloadHeaders)(pathObj.path, res);
|
|
515
|
+
const htmlActivity = _reporter.default.phantomActivity(`building HTML for path`, {});
|
|
516
|
+
htmlActivity.start();
|
|
517
|
+
try {
|
|
518
|
+
const {
|
|
519
|
+
html: renderResponse,
|
|
520
|
+
serverData
|
|
521
|
+
} = await (0, _renderDevHtml.renderDevHTML)({
|
|
522
|
+
path: pathObj.path,
|
|
523
|
+
page: pathObj,
|
|
524
|
+
skipSsr: Object.prototype.hasOwnProperty.call(req.query, `skip-ssr`),
|
|
525
|
+
store: _redux.store,
|
|
526
|
+
allowTimedFallback,
|
|
527
|
+
htmlComponentRendererPath: PAGE_RENDERER_PATH,
|
|
528
|
+
directory: program.directory,
|
|
529
|
+
req
|
|
530
|
+
});
|
|
531
|
+
if (serverData !== null && serverData !== void 0 && serverData.headers) {
|
|
532
|
+
for (const [name, value] of Object.entries(serverData.headers)) {
|
|
533
|
+
res.setHeader(name, value);
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
let statusCode = 200;
|
|
537
|
+
if (serverData !== null && serverData !== void 0 && serverData.status) {
|
|
538
|
+
statusCode = serverData.status;
|
|
539
|
+
}
|
|
540
|
+
res.status(statusCode).send(renderResponse);
|
|
541
|
+
} catch (error) {
|
|
542
|
+
// The page errored but couldn't read the page component.
|
|
543
|
+
// This is a race condition when a page is deleted but its requested
|
|
544
|
+
// immediately after before anything can recompile.
|
|
545
|
+
if (error === `404 page`) {
|
|
546
|
+
return next();
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
// renderDevHTML throws an error with these information
|
|
550
|
+
const lineNumber = error === null || error === void 0 ? void 0 : error.line;
|
|
551
|
+
const columnNumber = error === null || error === void 0 ? void 0 : error.column;
|
|
552
|
+
const filePath = error === null || error === void 0 ? void 0 : error.filename;
|
|
553
|
+
const sourceContent = error === null || error === void 0 ? void 0 : error.sourceContent;
|
|
554
|
+
_reporter.default.error({
|
|
555
|
+
id: `11614`,
|
|
556
|
+
context: {
|
|
557
|
+
path: pathObj.path,
|
|
558
|
+
filePath: filePath,
|
|
559
|
+
line: lineNumber,
|
|
560
|
+
column: columnNumber
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
const emptyResponse = {
|
|
564
|
+
codeFrame: `No codeFrame could be generated`,
|
|
565
|
+
sourcePosition: null,
|
|
566
|
+
sourceContent: null
|
|
567
|
+
};
|
|
568
|
+
if (!sourceContent || !lineNumber) {
|
|
569
|
+
res.json(emptyResponse);
|
|
570
|
+
return null;
|
|
571
|
+
}
|
|
572
|
+
const codeFrame = (0, _codeFrame.codeFrameColumns)(sourceContent, {
|
|
573
|
+
start: {
|
|
574
|
+
line: lineNumber,
|
|
575
|
+
column: columnNumber !== null && columnNumber !== void 0 ? columnNumber : 0
|
|
576
|
+
}
|
|
577
|
+
}, {
|
|
578
|
+
highlightCode: true
|
|
579
|
+
});
|
|
580
|
+
const message = {
|
|
581
|
+
codeFrame,
|
|
582
|
+
source: filePath,
|
|
583
|
+
line: lineNumber,
|
|
584
|
+
column: columnNumber !== null && columnNumber !== void 0 ? columnNumber : 0,
|
|
585
|
+
sourceMessage: error === null || error === void 0 ? void 0 : error.message,
|
|
586
|
+
stack: error === null || error === void 0 ? void 0 : error.stack
|
|
587
|
+
};
|
|
588
|
+
try {
|
|
589
|
+
// Generate a shell for client-only content -- for the error overlay
|
|
590
|
+
const {
|
|
591
|
+
html: clientOnlyShell
|
|
592
|
+
} = await (0, _renderDevHtml.renderDevHTML)({
|
|
593
|
+
path: pathObj.path,
|
|
594
|
+
page: pathObj,
|
|
595
|
+
skipSsr: true,
|
|
596
|
+
store: _redux.store,
|
|
597
|
+
error: message,
|
|
598
|
+
htmlComponentRendererPath: PAGE_RENDERER_PATH,
|
|
599
|
+
directory: program.directory,
|
|
600
|
+
req,
|
|
601
|
+
allowTimedFallback
|
|
602
|
+
});
|
|
603
|
+
res.send(clientOnlyShell);
|
|
604
|
+
} catch (e) {
|
|
605
|
+
_reporter.default.error({
|
|
606
|
+
id: `11616`,
|
|
607
|
+
context: {
|
|
608
|
+
sourceMessage: e.message
|
|
609
|
+
},
|
|
610
|
+
filePath: e.filename,
|
|
611
|
+
location: {
|
|
612
|
+
start: {
|
|
613
|
+
line: e.line,
|
|
614
|
+
column: e.column
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
});
|
|
618
|
+
const minimalHTML = `<head><title>Failed to Server Render (SSR)</title></head><body><h1>Failed to Server Render (SSR)</h1><h2>Error message:</h2><p>${e.message}</p><h2>File:</h2><p>${e.filename}:${e.line}:${e.column}</p><h2>Stack:</h2><pre><code>${e.stack}</code></pre></body>`;
|
|
619
|
+
res.send(minimalHTML).status(500);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
htmlActivity.end();
|
|
623
|
+
return null;
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
if (process.env.GATSBY_QUERY_ON_DEMAND && process.env.GATSBY_QUERY_ON_DEMAND_LOADING_INDICATOR === `true`) {
|
|
627
|
+
(0, _loadingIndicator.routeLoadingIndicatorRequests)(app);
|
|
628
|
+
}
|
|
629
|
+
app.use(async (req, res) => {
|
|
630
|
+
// in this catch-all block we don't support POST so we should 404
|
|
631
|
+
if (req.method === `POST`) {
|
|
632
|
+
res.status(404).end();
|
|
633
|
+
return;
|
|
634
|
+
}
|
|
635
|
+
const fullUrl = req.protocol + `://` + req.get(`host`) + req.originalUrl;
|
|
636
|
+
// This isn't used in development.
|
|
637
|
+
if (fullUrl.endsWith(`app-data.json`)) {
|
|
638
|
+
res.json({
|
|
639
|
+
webpackCompilationHash: `123`
|
|
640
|
+
});
|
|
641
|
+
// If this gets here, it's a non-existent file so just send back 404.
|
|
642
|
+
} else if (fullUrl.endsWith(`.json`)) {
|
|
643
|
+
res.json({}).status(404);
|
|
644
|
+
} else {
|
|
645
|
+
await (0, _developPreloadHeaders.appendPreloadHeaders)(req.path, res);
|
|
646
|
+
if (process.env.GATSBY_EXPERIMENTAL_DEV_SSR) {
|
|
647
|
+
try {
|
|
648
|
+
const allowTimedFallback = !req.headers[`x-gatsby-wait-for-dev-ssr`];
|
|
649
|
+
const {
|
|
650
|
+
html: renderResponse
|
|
651
|
+
} = await (0, _renderDevHtml.renderDevHTML)({
|
|
652
|
+
path: `/dev-404-page/`,
|
|
653
|
+
// Let renderDevHTML figure it out.
|
|
654
|
+
page: undefined,
|
|
655
|
+
store: _redux.store,
|
|
656
|
+
htmlComponentRendererPath: pageRenderer,
|
|
657
|
+
directory: program.directory,
|
|
658
|
+
req,
|
|
659
|
+
allowTimedFallback
|
|
660
|
+
});
|
|
661
|
+
res.status(404).send(renderResponse);
|
|
662
|
+
} catch (e) {
|
|
663
|
+
_reporter.default.error({
|
|
664
|
+
id: `11615`,
|
|
665
|
+
context: {
|
|
666
|
+
sourceMessage: e.message
|
|
667
|
+
},
|
|
668
|
+
filePath: e.filename,
|
|
669
|
+
location: {
|
|
670
|
+
start: {
|
|
671
|
+
line: e.line,
|
|
672
|
+
column: e.column
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
res.send(e).status(500);
|
|
677
|
+
}
|
|
678
|
+
} else {
|
|
679
|
+
const potentialPagePath = (0, _pageData.reverseFixedPagePath)(decodeURI(req.path));
|
|
680
|
+
const page = (0, _findPageByPath.findPageByPath)(_redux.store.getState(), potentialPagePath, false);
|
|
681
|
+
|
|
682
|
+
// When we can't find a page we send 404
|
|
683
|
+
if (!page) {
|
|
684
|
+
res.status(404);
|
|
685
|
+
}
|
|
686
|
+
res.sendFile(directoryPath(`.cache/develop-html/index.html`), err => {
|
|
687
|
+
if (err) {
|
|
688
|
+
res.status(500).end();
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Set up the HTTP server and socket.io.
|
|
697
|
+
**/
|
|
698
|
+
const server = program.ssl ? new _https.default.Server(program.ssl, app) : new _http.default.Server(app);
|
|
699
|
+
const socket = _websocketManager.websocketManager.init({
|
|
700
|
+
server
|
|
701
|
+
});
|
|
702
|
+
const listener = server.listen(program.port, program.host);
|
|
703
|
+
if (!process.env.GATSBY_EXPERIMENTAL_DEV_SSR) {
|
|
704
|
+
const chokidar = require(`chokidar`);
|
|
705
|
+
// Register watcher that rebuilds index.html every time html.js changes.
|
|
706
|
+
const watchGlobs = [`src/html.js`, `plugins/**/gatsby-ssr.js`].map(path => (0, _gatsbyCoreUtils.slash)(directoryPath(path)));
|
|
707
|
+
chokidar.watch(watchGlobs).on(`change`, async () => {
|
|
708
|
+
await createIndexHtml(indexHTMLActivity);
|
|
709
|
+
// eslint-disable-next-line no-unused-expressions
|
|
710
|
+
socket === null || socket === void 0 ? void 0 : socket.to(`clients`).emit(`reload`);
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
return {
|
|
714
|
+
compiler,
|
|
715
|
+
listener,
|
|
716
|
+
webpackActivity,
|
|
717
|
+
websocketManager: _websocketManager.websocketManager,
|
|
718
|
+
workerPool,
|
|
719
|
+
webpackWatching: webpackDevMiddlewareInstance.context.watching
|
|
720
|
+
};
|
|
721
|
+
}
|
|
722
|
+
//# sourceMappingURL=start-server.js.map
|