@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,367 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.foundPageByToLogIds = void 0;
|
|
6
|
+
exports.processNodeManifest = processNodeManifest;
|
|
7
|
+
exports.processNodeManifests = processNodeManifests;
|
|
8
|
+
exports.warnAboutNodeManifestMappingProblems = warnAboutNodeManifestMappingProblems;
|
|
9
|
+
var _datastore = require("./../datastore");
|
|
10
|
+
var _reporter = _interopRequireDefault(require("gatsby-cli/lib/reporter"));
|
|
11
|
+
var _redux = require("../redux/");
|
|
12
|
+
var _actions = require("../redux/actions");
|
|
13
|
+
var _path = _interopRequireDefault(require("path"));
|
|
14
|
+
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
15
|
+
var _fastq = _interopRequireDefault(require("fastq"));
|
|
16
|
+
function getNodeManifestFileLimit() {
|
|
17
|
+
const defaultLimit = 10000;
|
|
18
|
+
const overrideLimit = process.env.NODE_MANIFEST_FILE_LIMIT && Number(process.env.NODE_MANIFEST_FILE_LIMIT);
|
|
19
|
+
return overrideLimit || defaultLimit;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* This defines a limit to the number number of node manifest files that will be written to disk
|
|
23
|
+
*/
|
|
24
|
+
const NODE_MANIFEST_FILE_LIMIT = getNodeManifestFileLimit();
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Finds a final built page by nodeId or by node.slug as a fallback.
|
|
28
|
+
*
|
|
29
|
+
* Note that this function wont work properly in `gatsby develop`
|
|
30
|
+
* since develop no longer runs all page queries when creating pages.
|
|
31
|
+
* We use the node id to query mapping to find the right page but
|
|
32
|
+
* this mapping only exists once you've visited a page in your browser.
|
|
33
|
+
* When this fn is being used for routing to previews the user wont necessarily have
|
|
34
|
+
* visited the page in the browser yet.
|
|
35
|
+
*/
|
|
36
|
+
async function findPageOwnedByNode({
|
|
37
|
+
nodeId,
|
|
38
|
+
fullNode,
|
|
39
|
+
slug
|
|
40
|
+
}) {
|
|
41
|
+
var _fullNode$internal, _byNode$get, _byNode$get$values, _byNode$get$values$ne, _byConnection$get, _byConnection$get$val, _byConnection$get$val2, _pagePath;
|
|
42
|
+
const state = _redux.store.getState();
|
|
43
|
+
const {
|
|
44
|
+
pages,
|
|
45
|
+
staticQueryComponents
|
|
46
|
+
} = state;
|
|
47
|
+
const {
|
|
48
|
+
byNode,
|
|
49
|
+
byConnection,
|
|
50
|
+
trackedComponents
|
|
51
|
+
} = state.queries;
|
|
52
|
+
const nodeType = fullNode === null || fullNode === void 0 ? void 0 : (_fullNode$internal = fullNode.internal) === null || _fullNode$internal === void 0 ? void 0 : _fullNode$internal.type;
|
|
53
|
+
const firstPagePathWithNodeAsDataDependency = // the first page found in node id to page query path tracking
|
|
54
|
+
byNode === null || byNode === void 0 ? void 0 : (_byNode$get = byNode.get(nodeId)) === null || _byNode$get === void 0 ? void 0 : (_byNode$get$values = _byNode$get.values()) === null || _byNode$get$values === void 0 ? void 0 : (_byNode$get$values$ne = _byNode$get$values.next()) === null || _byNode$get$values$ne === void 0 ? void 0 : _byNode$get$values$ne.value;
|
|
55
|
+
const firstPagePathWithNodeInGraphQLListField = // the first page that queries for a list of this node type.
|
|
56
|
+
// we don't currently store a list of node ids for connection fields to queries
|
|
57
|
+
// we just store the query id or page path mapped to the connected GraphQL typename.
|
|
58
|
+
byConnection === null || byConnection === void 0 ? void 0 : (_byConnection$get = byConnection.get(nodeType)) === null || _byConnection$get === void 0 ? void 0 : (_byConnection$get$val = _byConnection$get.values()) === null || _byConnection$get$val === void 0 ? void 0 : (_byConnection$get$val2 = _byConnection$get$val.next()) === null || _byConnection$get$val2 === void 0 ? void 0 : _byConnection$get$val2.value;
|
|
59
|
+
let pagePath = firstPagePathWithNodeAsDataDependency || firstPagePathWithNodeInGraphQLListField;
|
|
60
|
+
|
|
61
|
+
// for static queries, we can only find the first page using that static query
|
|
62
|
+
// the reason we would find `sq--` here is because byConnection (above) can return a page path or a static query ID (which starts with `sq--`)
|
|
63
|
+
if ((_pagePath = pagePath) !== null && _pagePath !== void 0 && _pagePath.startsWith(`sq--`)) {
|
|
64
|
+
var _staticQueryComponent, _trackedComponents$ge, _trackedComponents$ge2, _trackedComponents$ge3, _trackedComponents$ge4;
|
|
65
|
+
const staticQueryComponentPath = staticQueryComponents === null || staticQueryComponents === void 0 ? void 0 : (_staticQueryComponent = staticQueryComponents.get(pagePath)) === null || _staticQueryComponent === void 0 ? void 0 : _staticQueryComponent.componentPath;
|
|
66
|
+
const firstPagePathUsingStaticQueryComponent = staticQueryComponentPath ? trackedComponents === null || trackedComponents === void 0 ? void 0 : (_trackedComponents$ge = trackedComponents.get(staticQueryComponentPath)) === null || _trackedComponents$ge === void 0 ? void 0 : (_trackedComponents$ge2 = _trackedComponents$ge.pages) === null || _trackedComponents$ge2 === void 0 ? void 0 : (_trackedComponents$ge3 = _trackedComponents$ge2.values()) === null || _trackedComponents$ge3 === void 0 ? void 0 : (_trackedComponents$ge4 = _trackedComponents$ge3.next()) === null || _trackedComponents$ge4 === void 0 ? void 0 : _trackedComponents$ge4.value : null;
|
|
67
|
+
pagePath = firstPagePathUsingStaticQueryComponent;
|
|
68
|
+
}
|
|
69
|
+
let foundPageBy = pagePath ? `queryTracking` : `none`;
|
|
70
|
+
if (pages) {
|
|
71
|
+
let ownerPagePath;
|
|
72
|
+
let foundOwnerNodeId = false;
|
|
73
|
+
|
|
74
|
+
// for each page this nodeId is queried in
|
|
75
|
+
for (const pageObject of pages.values()) {
|
|
76
|
+
var _fullPage$context, _fullPage$context2;
|
|
77
|
+
// if we haven't found a page with this nodeId
|
|
78
|
+
// set as page.ownerNodeId then run this logic.
|
|
79
|
+
// this condition is on foundOwnerNodeId instead of ownerPagePath
|
|
80
|
+
// in case we find a page with the nodeId in page.context.id/context.slug
|
|
81
|
+
// and then later in the loop there's a page with this nodeId
|
|
82
|
+
// set on page.ownerNodeId.
|
|
83
|
+
// We always want to prefer ownerPagePath over context.id/context.slug
|
|
84
|
+
if (foundOwnerNodeId) {
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
const path = pageObject.path;
|
|
88
|
+
const fullPage = pages.get(path);
|
|
89
|
+
foundOwnerNodeId = (fullPage === null || fullPage === void 0 ? void 0 : fullPage.ownerNodeId) === nodeId;
|
|
90
|
+
const foundPageIdInContext = (fullPage === null || fullPage === void 0 ? void 0 : (_fullPage$context = fullPage.context) === null || _fullPage$context === void 0 ? void 0 : _fullPage$context.id) === nodeId;
|
|
91
|
+
|
|
92
|
+
// querying by node.slug in GraphQL queries is common enough that we can search for it as a fallback after ownerNodeId, filesystem routes, and context.id
|
|
93
|
+
const foundPageSlugInContext = slug && (fullPage === null || fullPage === void 0 ? void 0 : (_fullPage$context2 = fullPage.context) === null || _fullPage$context2 === void 0 ? void 0 : _fullPage$context2.slug) === slug;
|
|
94
|
+
if (foundOwnerNodeId) {
|
|
95
|
+
foundPageBy = `ownerNodeId`;
|
|
96
|
+
} else if (foundPageIdInContext && fullPage) {
|
|
97
|
+
var _getNode;
|
|
98
|
+
const pageCreatedByPluginName = (_getNode = (0, _datastore.getNode)(fullPage.pluginCreatorId)) === null || _getNode === void 0 ? void 0 : _getNode.name;
|
|
99
|
+
const pageCreatedByFilesystemPlugin = pageCreatedByPluginName === `gatsby-plugin-page-creator`;
|
|
100
|
+
foundPageBy = pageCreatedByFilesystemPlugin ? `filesystem-route-api` : `context.id`;
|
|
101
|
+
} else if (foundPageSlugInContext && fullPage) {
|
|
102
|
+
foundPageBy = `context.slug`;
|
|
103
|
+
}
|
|
104
|
+
if (fullPage && (
|
|
105
|
+
// first check for the ownerNodeId on the page. this is
|
|
106
|
+
// the defacto owner. Can't get more specific than this
|
|
107
|
+
foundOwnerNodeId ||
|
|
108
|
+
// if there's no specified owner look to see if
|
|
109
|
+
// pageContext has an `id` variable which matches our
|
|
110
|
+
// nodeId. Using an "id" as a variable in queries is common
|
|
111
|
+
// and if we don't have an owner this is a better guess
|
|
112
|
+
// of an owner than grabbing the first page query we find
|
|
113
|
+
// that's mapped to this node id.
|
|
114
|
+
// this also makes this work with the filesystem Route API without
|
|
115
|
+
// changing that API.
|
|
116
|
+
foundPageIdInContext || foundPageSlugInContext)) {
|
|
117
|
+
// save this path to use in our manifest!
|
|
118
|
+
ownerPagePath = fullPage.path;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (ownerPagePath) {
|
|
122
|
+
pagePath = ownerPagePath;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
page: {
|
|
127
|
+
path: pagePath || null
|
|
128
|
+
},
|
|
129
|
+
foundPageBy
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// these id's correspond to error id's in
|
|
134
|
+
// packages/gatsby-cli/src/structured-errors/error-map.ts
|
|
135
|
+
const foundPageByToLogIds = {
|
|
136
|
+
none: `11801`,
|
|
137
|
+
[`context.id`]: `11802`,
|
|
138
|
+
[`context.slug`]: `11805`,
|
|
139
|
+
queryTracking: `11803`,
|
|
140
|
+
[`filesystem-route-api`]: `success`,
|
|
141
|
+
ownerNodeId: `success`
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Takes in some info about a node manifest and the page we did or didn't find for it, then warns and returns the warning string
|
|
146
|
+
*/
|
|
147
|
+
exports.foundPageByToLogIds = foundPageByToLogIds;
|
|
148
|
+
function warnAboutNodeManifestMappingProblems({
|
|
149
|
+
inputManifest,
|
|
150
|
+
pagePath,
|
|
151
|
+
foundPageBy,
|
|
152
|
+
verbose
|
|
153
|
+
}) {
|
|
154
|
+
let logId;
|
|
155
|
+
switch (foundPageBy) {
|
|
156
|
+
case `none`:
|
|
157
|
+
case `context.id`:
|
|
158
|
+
case `context.slug`:
|
|
159
|
+
case `queryTracking`:
|
|
160
|
+
{
|
|
161
|
+
logId = foundPageByToLogIds[foundPageBy];
|
|
162
|
+
if (verbose) {
|
|
163
|
+
_reporter.default.error({
|
|
164
|
+
id: logId,
|
|
165
|
+
context: {
|
|
166
|
+
inputManifest,
|
|
167
|
+
pagePath
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
case `filesystem-route-api`:
|
|
174
|
+
case `ownerNodeId`:
|
|
175
|
+
logId = `success`;
|
|
176
|
+
break;
|
|
177
|
+
default:
|
|
178
|
+
{
|
|
179
|
+
throw Error(`Node Manifest mapping is in an impossible state`);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return {
|
|
183
|
+
logId
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Prepares and then writes out an individual node manifest file to be used for routing to previews. Manifest files are added via the public unstable_createNodeManifest action
|
|
189
|
+
*/
|
|
190
|
+
async function processNodeManifest(inputManifest, listOfUniqueErrorIds, nodeManifestPagePathMap, verboseLogs, previouslyWrittenNodeManifests) {
|
|
191
|
+
const nodeId = inputManifest.node.id;
|
|
192
|
+
const fullNode = (0, _datastore.getNode)(nodeId);
|
|
193
|
+
const noNodeWarningId = `11804`;
|
|
194
|
+
if (!fullNode) {
|
|
195
|
+
if (verboseLogs) {
|
|
196
|
+
_reporter.default.error({
|
|
197
|
+
id: noNodeWarningId,
|
|
198
|
+
context: {
|
|
199
|
+
pluginName: inputManifest.pluginName,
|
|
200
|
+
nodeId
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
} else {
|
|
204
|
+
listOfUniqueErrorIds.add(noNodeWarningId);
|
|
205
|
+
}
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// map the node to a page that was created
|
|
210
|
+
const {
|
|
211
|
+
page: nodeManifestPage,
|
|
212
|
+
foundPageBy
|
|
213
|
+
} = await findPageOwnedByNode({
|
|
214
|
+
nodeId,
|
|
215
|
+
fullNode,
|
|
216
|
+
// querying by node.slug in GraphQL queries is common enough that we can search for it as a fallback after ownerNodeId, filesystem routes, and context.id
|
|
217
|
+
slug: fullNode === null || fullNode === void 0 ? void 0 : fullNode.slug
|
|
218
|
+
});
|
|
219
|
+
const nodeManifestMappingProblemsContext = {
|
|
220
|
+
inputManifest,
|
|
221
|
+
pagePath: nodeManifestPage.path,
|
|
222
|
+
foundPageBy,
|
|
223
|
+
verbose: verboseLogs
|
|
224
|
+
};
|
|
225
|
+
if (verboseLogs) {
|
|
226
|
+
warnAboutNodeManifestMappingProblems(nodeManifestMappingProblemsContext);
|
|
227
|
+
} else {
|
|
228
|
+
const {
|
|
229
|
+
logId
|
|
230
|
+
} = warnAboutNodeManifestMappingProblems(nodeManifestMappingProblemsContext);
|
|
231
|
+
if (logId !== `success`) {
|
|
232
|
+
listOfUniqueErrorIds.add(logId);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
const finalManifest = {
|
|
236
|
+
node: inputManifest.node,
|
|
237
|
+
page: nodeManifestPage,
|
|
238
|
+
foundPageBy
|
|
239
|
+
};
|
|
240
|
+
const gatsbySiteDirectory = _redux.store.getState().program.directory;
|
|
241
|
+
let fileNameBase = inputManifest.manifestId;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Windows has a handful of special/reserved characters that are not valid in a file path
|
|
245
|
+
* @reference https://superuser.com/questions/358855/what-characters-are-safe-in-cross-platform-file-names-for-linux-windows-and-os
|
|
246
|
+
*
|
|
247
|
+
* The two exceptions to the list linked above are
|
|
248
|
+
* - the colon that is part of the hard disk partition name at the beginning of a file path (i.e. C:)
|
|
249
|
+
* - backslashes. We don't want to replace backslashes because those are used to delineate what the actual file path is
|
|
250
|
+
*
|
|
251
|
+
* During local development, node manifests can be written to disk but are generally unused as they are only used
|
|
252
|
+
* for Content Sync which runs in Gatsby Cloud. Gatsby cloud is a Linux environment in which these special chars are valid in
|
|
253
|
+
* filepaths. To avoid errors on Windows, we replace all instances of the special chars in the filepath (with the exception of the
|
|
254
|
+
* hard disk partition name) with "-" to ensure that local Windows development setups do not break when attempting
|
|
255
|
+
* to write one of these manifests to disk.
|
|
256
|
+
*/
|
|
257
|
+
if (process.platform === `win32`) {
|
|
258
|
+
fileNameBase = fileNameBase.replace(/:|\/|\*|\?|"|<|>|\||\\/g, `-`);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// write out the manifest file
|
|
262
|
+
const manifestFilePath = _path.default.join(gatsbySiteDirectory, `public`, `__node-manifests`, inputManifest.pluginName, `${fileNameBase}.json`);
|
|
263
|
+
const manifestFileDir = _path.default.dirname(manifestFilePath);
|
|
264
|
+
await _fsExtra.default.ensureDir(manifestFileDir);
|
|
265
|
+
const previouslyWrittenNodeManifest = await previouslyWrittenNodeManifests.get(inputManifest.manifestId);
|
|
266
|
+
|
|
267
|
+
// write a manifest if we don't currently have one written for this ID
|
|
268
|
+
// or if we can replace the written one with a manifest that has found a page
|
|
269
|
+
// NOTE: We still want to write out a manifest if foundPageBy is "none", this helps with error messaging
|
|
270
|
+
// But we prefer to write a manifest that has a foundPageBy that is NOT "none"
|
|
271
|
+
const shouldWriteManifest = !previouslyWrittenNodeManifest || (previouslyWrittenNodeManifest === null || previouslyWrittenNodeManifest === void 0 ? void 0 : previouslyWrittenNodeManifest.foundPageBy) === `none` && finalManifest.foundPageBy !== `none`;
|
|
272
|
+
if (shouldWriteManifest) {
|
|
273
|
+
const writePromise = _fsExtra.default.writeJSON(manifestFilePath, finalManifest);
|
|
274
|
+
|
|
275
|
+
// This prevents two manifests from writing to the same file at the same time
|
|
276
|
+
previouslyWrittenNodeManifests.set(inputManifest.manifestId, new Promise(resolve => {
|
|
277
|
+
writePromise.then(() => {
|
|
278
|
+
resolve(finalManifest);
|
|
279
|
+
});
|
|
280
|
+
}));
|
|
281
|
+
await writePromise;
|
|
282
|
+
}
|
|
283
|
+
if (shouldWriteManifest && verboseLogs) {
|
|
284
|
+
_reporter.default.info(`Plugin ${inputManifest.pluginName} created a manifest with the id ${fileNameBase}`);
|
|
285
|
+
} else if (verboseLogs) {
|
|
286
|
+
_reporter.default.info(`Plugin ${inputManifest.pluginName} created a manifest with the id ${fileNameBase} but it was not written to disk because it was already written to disk previously.`);
|
|
287
|
+
}
|
|
288
|
+
if (nodeManifestPage.path) {
|
|
289
|
+
nodeManifestPagePathMap.set(nodeManifestPage.path, fileNameBase);
|
|
290
|
+
}
|
|
291
|
+
return finalManifest;
|
|
292
|
+
}
|
|
293
|
+
function nodeManifestSortComparerAscendingUpdatedAt(a, b) {
|
|
294
|
+
/**
|
|
295
|
+
* Prioritize node manifests that have an updatedAtUTC so that manifests known to be
|
|
296
|
+
* newest are written to disk first. If neither have an updatedAtUTC, there isn't
|
|
297
|
+
* anything to sort
|
|
298
|
+
*/
|
|
299
|
+
if (!a.updatedAtUTC && !b.updatedAtUTC) {
|
|
300
|
+
return 0;
|
|
301
|
+
}
|
|
302
|
+
if (!a.updatedAtUTC) {
|
|
303
|
+
return 1;
|
|
304
|
+
}
|
|
305
|
+
if (!b.updatedAtUTC) {
|
|
306
|
+
return -1;
|
|
307
|
+
}
|
|
308
|
+
return Date.parse(a.updatedAtUTC) - Date.parse(b.updatedAtUTC);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Grabs all pending node manifests, processes them, writes them to disk,
|
|
313
|
+
* and then removes them from the store.
|
|
314
|
+
* Manifest files are added via the public unstable_createNodeManifest action in sourceNodes
|
|
315
|
+
*/
|
|
316
|
+
async function processNodeManifests() {
|
|
317
|
+
const verboseLogs = process.env.gatsby_log_level === `verbose` || process.env.VERBOSE_NODE_MANIFEST === `true`;
|
|
318
|
+
const startTime = Date.now();
|
|
319
|
+
let {
|
|
320
|
+
nodeManifests
|
|
321
|
+
} = _redux.store.getState();
|
|
322
|
+
const totalManifests = nodeManifests.length;
|
|
323
|
+
if (totalManifests === 0) {
|
|
324
|
+
return null;
|
|
325
|
+
}
|
|
326
|
+
let totalProcessedManifests = 0;
|
|
327
|
+
let totalFailedManifests = 0;
|
|
328
|
+
const nodeManifestPagePathMap = new Map();
|
|
329
|
+
const listOfUniqueErrorIds = new Set();
|
|
330
|
+
const previouslyWrittenNodeManifests = new Map();
|
|
331
|
+
async function processNodeManifestTask(manifest, cb) {
|
|
332
|
+
const processedManifest = await processNodeManifest(manifest, listOfUniqueErrorIds, nodeManifestPagePathMap, verboseLogs, previouslyWrittenNodeManifests);
|
|
333
|
+
if (processedManifest) {
|
|
334
|
+
totalProcessedManifests++;
|
|
335
|
+
} else {
|
|
336
|
+
totalFailedManifests++;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// `setImmediate` below is a workaround against stack overflow
|
|
340
|
+
// occurring when there are many manifests
|
|
341
|
+
setImmediate(() => cb(null, true));
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
const processNodeManifestQueue = (0, _fastq.default)(processNodeManifestTask, 25);
|
|
345
|
+
if (totalManifests > NODE_MANIFEST_FILE_LIMIT) {
|
|
346
|
+
nodeManifests = [...nodeManifests];
|
|
347
|
+
nodeManifests.sort(nodeManifestSortComparerAscendingUpdatedAt);
|
|
348
|
+
nodeManifests = nodeManifests.slice(0, NODE_MANIFEST_FILE_LIMIT);
|
|
349
|
+
}
|
|
350
|
+
for (const manifest of nodeManifests) {
|
|
351
|
+
processNodeManifestQueue.push(manifest, () => {});
|
|
352
|
+
}
|
|
353
|
+
if (!processNodeManifestQueue.idle()) {
|
|
354
|
+
await new Promise(resolve => {
|
|
355
|
+
processNodeManifestQueue.drain = resolve;
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
const pluralize = length => length > 1 || length === 0 ? `s` : ``;
|
|
359
|
+
const endTime = Date.now();
|
|
360
|
+
_reporter.default.info(`Wrote out ${totalProcessedManifests} node page manifest file${pluralize(totalProcessedManifests)} in ${endTime - startTime} ms. ${totalFailedManifests > 0 ? `. ${totalFailedManifests} manifest${pluralize(totalFailedManifests)} couldn't be processed.` : ``}`);
|
|
361
|
+
_reporter.default.info((!verboseLogs && listOfUniqueErrorIds.size > 0 ? `unstable_createNodeManifest produced warnings [${[...listOfUniqueErrorIds].join(`, `)}]. ` : ``) + `To see full warning messages set process.env.VERBOSE_NODE_MANIFEST to "true".\nVisit https://gatsby.dev/nodemanifest for more info on Node Manifests.`);
|
|
362
|
+
|
|
363
|
+
// clean up all pending manifests from the store
|
|
364
|
+
_redux.store.dispatch(_actions.internalActions.deleteNodeManifests());
|
|
365
|
+
return nodeManifestPagePathMap;
|
|
366
|
+
}
|
|
367
|
+
//# sourceMappingURL=node-manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-manifest.js","names":["getNodeManifestFileLimit","defaultLimit","overrideLimit","process","env","NODE_MANIFEST_FILE_LIMIT","Number","findPageOwnedByNode","nodeId","fullNode","slug","state","store","getState","pages","staticQueryComponents","byNode","byConnection","trackedComponents","queries","nodeType","internal","type","firstPagePathWithNodeAsDataDependency","get","values","next","value","firstPagePathWithNodeInGraphQLListField","pagePath","startsWith","staticQueryComponentPath","componentPath","firstPagePathUsingStaticQueryComponent","foundPageBy","ownerPagePath","foundOwnerNodeId","pageObject","path","fullPage","ownerNodeId","foundPageIdInContext","context","id","foundPageSlugInContext","pageCreatedByPluginName","getNode","pluginCreatorId","name","pageCreatedByFilesystemPlugin","page","foundPageByToLogIds","none","queryTracking","warnAboutNodeManifestMappingProblems","inputManifest","verbose","logId","reporter","error","Error","processNodeManifest","listOfUniqueErrorIds","nodeManifestPagePathMap","verboseLogs","previouslyWrittenNodeManifests","node","noNodeWarningId","pluginName","add","nodeManifestPage","nodeManifestMappingProblemsContext","finalManifest","gatsbySiteDirectory","program","directory","fileNameBase","manifestId","platform","replace","manifestFilePath","join","manifestFileDir","dirname","fs","ensureDir","previouslyWrittenNodeManifest","shouldWriteManifest","writePromise","writeJSON","set","Promise","resolve","then","info","nodeManifestSortComparerAscendingUpdatedAt","a","b","updatedAtUTC","Date","parse","processNodeManifests","gatsby_log_level","VERBOSE_NODE_MANIFEST","startTime","now","nodeManifests","totalManifests","length","totalProcessedManifests","totalFailedManifests","Map","Set","processNodeManifestTask","manifest","cb","processedManifest","setImmediate","processNodeManifestQueue","fastq","sort","slice","push","idle","drain","pluralize","endTime","size","dispatch","internalActions","deleteNodeManifests"],"sources":["../../src/utils/node-manifest.ts"],"sourcesContent":["import type { ErrorId } from \"gatsby-cli/lib/structured-errors/error-map\"\nimport { getNode } from \"./../datastore\"\nimport { IGatsbyNode, IGatsbyPage, INodeManifest } from \"./../redux/types\"\nimport reporter from \"gatsby-cli/lib/reporter\"\nimport { store } from \"../redux/\"\nimport { internalActions } from \"../redux/actions\"\nimport path from \"path\"\nimport fs from \"fs-extra\"\nimport fastq from \"fastq\"\n\ninterface INodeManifestPage {\n path?: string\n}\n\n/**\n * This it the output after processing calls to the public unstable_createNodeManifest action\n */\ninterface INodeManifestOut {\n page: INodeManifestPage\n node: {\n id: string\n }\n foundPageBy: FoundPageBy\n}\n\ntype FoundPageBy =\n | `ownerNodeId`\n | `filesystem-route-api`\n // for these three we warn to use ownerNodeId instead\n | `context.id`\n | `context.slug`\n | `queryTracking`\n | `none`\n\ntype PreviouslyWrittenNodeManifests = Map<string, Promise<INodeManifestOut>>\n\nfunction getNodeManifestFileLimit(): number {\n const defaultLimit = 10000\n\n const overrideLimit =\n process.env.NODE_MANIFEST_FILE_LIMIT &&\n Number(process.env.NODE_MANIFEST_FILE_LIMIT)\n\n return overrideLimit || defaultLimit\n}\n/**\n * This defines a limit to the number number of node manifest files that will be written to disk\n */\nconst NODE_MANIFEST_FILE_LIMIT = getNodeManifestFileLimit()\n\n/**\n * Finds a final built page by nodeId or by node.slug as a fallback.\n *\n * Note that this function wont work properly in `gatsby develop`\n * since develop no longer runs all page queries when creating pages.\n * We use the node id to query mapping to find the right page but\n * this mapping only exists once you've visited a page in your browser.\n * When this fn is being used for routing to previews the user wont necessarily have\n * visited the page in the browser yet.\n */\nasync function findPageOwnedByNode({\n nodeId,\n fullNode,\n slug,\n}: {\n nodeId: string\n fullNode: IGatsbyNode\n slug?: string\n}): Promise<{\n page: INodeManifestPage\n foundPageBy: FoundPageBy\n}> {\n const state = store.getState()\n const { pages, staticQueryComponents } = state\n const { byNode, byConnection, trackedComponents } = state.queries\n\n const nodeType = fullNode?.internal?.type\n\n const firstPagePathWithNodeAsDataDependency =\n // the first page found in node id to page query path tracking\n byNode?.get(nodeId)?.values()?.next()?.value\n\n const firstPagePathWithNodeInGraphQLListField =\n // the first page that queries for a list of this node type.\n // we don't currently store a list of node ids for connection fields to queries\n // we just store the query id or page path mapped to the connected GraphQL typename.\n byConnection?.get(nodeType)?.values()?.next()?.value\n\n let pagePath =\n firstPagePathWithNodeAsDataDependency ||\n firstPagePathWithNodeInGraphQLListField\n\n // for static queries, we can only find the first page using that static query\n // the reason we would find `sq--` here is because byConnection (above) can return a page path or a static query ID (which starts with `sq--`)\n if (pagePath?.startsWith(`sq--`)) {\n const staticQueryComponentPath =\n staticQueryComponents?.get(pagePath)?.componentPath\n\n const firstPagePathUsingStaticQueryComponent: string | null =\n staticQueryComponentPath\n ? trackedComponents\n ?.get(staticQueryComponentPath)\n ?.pages?.values()\n ?.next()?.value\n : null\n\n pagePath = firstPagePathUsingStaticQueryComponent\n }\n\n let foundPageBy: FoundPageBy = pagePath ? `queryTracking` : `none`\n\n if (pages) {\n let ownerPagePath: string | undefined\n let foundOwnerNodeId = false\n\n // for each page this nodeId is queried in\n for (const pageObject of pages.values()) {\n // if we haven't found a page with this nodeId\n // set as page.ownerNodeId then run this logic.\n // this condition is on foundOwnerNodeId instead of ownerPagePath\n // in case we find a page with the nodeId in page.context.id/context.slug\n // and then later in the loop there's a page with this nodeId\n // set on page.ownerNodeId.\n // We always want to prefer ownerPagePath over context.id/context.slug\n if (foundOwnerNodeId) {\n break\n }\n\n const path = pageObject.path\n\n const fullPage: IGatsbyPage | undefined = pages.get(path)\n\n foundOwnerNodeId = fullPage?.ownerNodeId === nodeId\n\n const foundPageIdInContext = fullPage?.context?.id === nodeId\n\n // querying by node.slug in GraphQL queries is common enough that we can search for it as a fallback after ownerNodeId, filesystem routes, and context.id\n const foundPageSlugInContext = slug && fullPage?.context?.slug === slug\n\n if (foundOwnerNodeId) {\n foundPageBy = `ownerNodeId`\n } else if (foundPageIdInContext && fullPage) {\n const pageCreatedByPluginName = getNode(fullPage.pluginCreatorId)?.name\n\n const pageCreatedByFilesystemPlugin =\n pageCreatedByPluginName === `gatsby-plugin-page-creator`\n\n foundPageBy = pageCreatedByFilesystemPlugin\n ? `filesystem-route-api`\n : `context.id`\n } else if (foundPageSlugInContext && fullPage) {\n foundPageBy = `context.slug`\n }\n\n if (\n fullPage &&\n // first check for the ownerNodeId on the page. this is\n // the defacto owner. Can't get more specific than this\n (foundOwnerNodeId ||\n // if there's no specified owner look to see if\n // pageContext has an `id` variable which matches our\n // nodeId. Using an \"id\" as a variable in queries is common\n // and if we don't have an owner this is a better guess\n // of an owner than grabbing the first page query we find\n // that's mapped to this node id.\n // this also makes this work with the filesystem Route API without\n // changing that API.\n foundPageIdInContext ||\n foundPageSlugInContext)\n ) {\n // save this path to use in our manifest!\n ownerPagePath = fullPage.path\n }\n }\n\n if (ownerPagePath) {\n pagePath = ownerPagePath\n }\n }\n\n return {\n page: {\n path: pagePath || null,\n },\n foundPageBy,\n }\n}\n\n// these id's correspond to error id's in\n// packages/gatsby-cli/src/structured-errors/error-map.ts\nexport const foundPageByToLogIds = {\n none: `11801`,\n [`context.id`]: `11802`,\n [`context.slug`]: `11805`,\n queryTracking: `11803`,\n [`filesystem-route-api`]: `success`,\n ownerNodeId: `success`,\n}\n\n/**\n * Takes in some info about a node manifest and the page we did or didn't find for it, then warns and returns the warning string\n */\nexport function warnAboutNodeManifestMappingProblems({\n inputManifest,\n pagePath,\n foundPageBy,\n verbose,\n}: {\n inputManifest: INodeManifest\n pagePath?: string\n foundPageBy: FoundPageBy\n verbose: boolean\n}): { logId: string } {\n let logId: ErrorId | `success`\n\n switch (foundPageBy) {\n case `none`:\n case `context.id`:\n case `context.slug`:\n case `queryTracking`: {\n logId = foundPageByToLogIds[foundPageBy]\n if (verbose) {\n reporter.error({\n id: logId,\n context: {\n inputManifest,\n pagePath,\n },\n })\n }\n break\n }\n\n case `filesystem-route-api`:\n case `ownerNodeId`:\n logId = `success`\n break\n\n default: {\n throw Error(`Node Manifest mapping is in an impossible state`)\n }\n }\n\n return {\n logId,\n }\n}\n\n/**\n * Prepares and then writes out an individual node manifest file to be used for routing to previews. Manifest files are added via the public unstable_createNodeManifest action\n */\nexport async function processNodeManifest(\n inputManifest: INodeManifest,\n listOfUniqueErrorIds: Set<string>,\n nodeManifestPagePathMap: Map<string, string>,\n verboseLogs: boolean,\n previouslyWrittenNodeManifests: PreviouslyWrittenNodeManifests\n): Promise<null | INodeManifestOut> {\n const nodeId = inputManifest.node.id\n const fullNode = getNode(nodeId)\n const noNodeWarningId = `11804`\n\n if (!fullNode) {\n if (verboseLogs) {\n reporter.error({\n id: noNodeWarningId,\n context: {\n pluginName: inputManifest.pluginName,\n nodeId,\n },\n })\n } else {\n listOfUniqueErrorIds.add(noNodeWarningId)\n }\n\n return null\n }\n\n // map the node to a page that was created\n const { page: nodeManifestPage, foundPageBy } = await findPageOwnedByNode({\n nodeId,\n fullNode,\n // querying by node.slug in GraphQL queries is common enough that we can search for it as a fallback after ownerNodeId, filesystem routes, and context.id\n slug: fullNode?.slug as string,\n })\n\n const nodeManifestMappingProblemsContext = {\n inputManifest,\n pagePath: nodeManifestPage.path,\n foundPageBy,\n verbose: verboseLogs,\n }\n\n if (verboseLogs) {\n warnAboutNodeManifestMappingProblems(nodeManifestMappingProblemsContext)\n } else {\n const { logId } = warnAboutNodeManifestMappingProblems(\n nodeManifestMappingProblemsContext\n )\n\n if (logId !== `success`) {\n listOfUniqueErrorIds.add(logId)\n }\n }\n\n const finalManifest: INodeManifestOut = {\n node: inputManifest.node,\n page: nodeManifestPage,\n foundPageBy,\n }\n\n const gatsbySiteDirectory = store.getState().program.directory\n\n let fileNameBase = inputManifest.manifestId\n\n /**\n * Windows has a handful of special/reserved characters that are not valid in a file path\n * @reference https://superuser.com/questions/358855/what-characters-are-safe-in-cross-platform-file-names-for-linux-windows-and-os\n *\n * The two exceptions to the list linked above are\n * - the colon that is part of the hard disk partition name at the beginning of a file path (i.e. C:)\n * - backslashes. We don't want to replace backslashes because those are used to delineate what the actual file path is\n *\n * During local development, node manifests can be written to disk but are generally unused as they are only used\n * for Content Sync which runs in Gatsby Cloud. Gatsby cloud is a Linux environment in which these special chars are valid in\n * filepaths. To avoid errors on Windows, we replace all instances of the special chars in the filepath (with the exception of the\n * hard disk partition name) with \"-\" to ensure that local Windows development setups do not break when attempting\n * to write one of these manifests to disk.\n */\n if (process.platform === `win32`) {\n fileNameBase = fileNameBase.replace(/:|\\/|\\*|\\?|\"|<|>|\\||\\\\/g, `-`)\n }\n\n // write out the manifest file\n const manifestFilePath = path.join(\n gatsbySiteDirectory,\n `public`,\n `__node-manifests`,\n inputManifest.pluginName,\n `${fileNameBase}.json`\n )\n\n const manifestFileDir = path.dirname(manifestFilePath)\n\n await fs.ensureDir(manifestFileDir)\n\n const previouslyWrittenNodeManifest =\n await previouslyWrittenNodeManifests.get(inputManifest.manifestId)\n\n // write a manifest if we don't currently have one written for this ID\n // or if we can replace the written one with a manifest that has found a page\n // NOTE: We still want to write out a manifest if foundPageBy is \"none\", this helps with error messaging\n // But we prefer to write a manifest that has a foundPageBy that is NOT \"none\"\n const shouldWriteManifest =\n !previouslyWrittenNodeManifest ||\n (previouslyWrittenNodeManifest?.foundPageBy === `none` &&\n finalManifest.foundPageBy !== `none`)\n\n if (shouldWriteManifest) {\n const writePromise = fs.writeJSON(manifestFilePath, finalManifest)\n\n // This prevents two manifests from writing to the same file at the same time\n previouslyWrittenNodeManifests.set(\n inputManifest.manifestId,\n new Promise(resolve => {\n writePromise.then(() => {\n resolve(finalManifest)\n })\n })\n )\n\n await writePromise\n }\n\n if (shouldWriteManifest && verboseLogs) {\n reporter.info(\n `Plugin ${inputManifest.pluginName} created a manifest with the id ${fileNameBase}`\n )\n } else if (verboseLogs) {\n reporter.info(\n `Plugin ${inputManifest.pluginName} created a manifest with the id ${fileNameBase} but it was not written to disk because it was already written to disk previously.`\n )\n }\n\n if (nodeManifestPage.path) {\n nodeManifestPagePathMap.set(nodeManifestPage.path, fileNameBase)\n }\n\n return finalManifest\n}\n\nfunction nodeManifestSortComparerAscendingUpdatedAt(a, b): number {\n /**\n * Prioritize node manifests that have an updatedAtUTC so that manifests known to be\n * newest are written to disk first. If neither have an updatedAtUTC, there isn't\n * anything to sort\n */\n if (!a.updatedAtUTC && !b.updatedAtUTC) {\n return 0\n }\n\n if (!a.updatedAtUTC) {\n return 1\n }\n\n if (!b.updatedAtUTC) {\n return -1\n }\n\n return Date.parse(a.updatedAtUTC) - Date.parse(b.updatedAtUTC)\n}\n\n/**\n * Grabs all pending node manifests, processes them, writes them to disk,\n * and then removes them from the store.\n * Manifest files are added via the public unstable_createNodeManifest action in sourceNodes\n */\nexport async function processNodeManifests(): Promise<Map<\n string,\n string\n> | null> {\n const verboseLogs =\n process.env.gatsby_log_level === `verbose` ||\n process.env.VERBOSE_NODE_MANIFEST === `true`\n\n const startTime = Date.now()\n let { nodeManifests } = store.getState()\n\n const totalManifests = nodeManifests.length\n\n if (totalManifests === 0) {\n return null\n }\n\n let totalProcessedManifests = 0\n let totalFailedManifests = 0\n const nodeManifestPagePathMap: Map<string, string> = new Map()\n const listOfUniqueErrorIds: Set<string> = new Set()\n const previouslyWrittenNodeManifests: PreviouslyWrittenNodeManifests =\n new Map()\n\n async function processNodeManifestTask(\n manifest: INodeManifest,\n cb: fastq.done<any>\n ): Promise<void> {\n const processedManifest = await processNodeManifest(\n manifest,\n listOfUniqueErrorIds,\n nodeManifestPagePathMap,\n verboseLogs,\n previouslyWrittenNodeManifests\n )\n\n if (processedManifest) {\n totalProcessedManifests++\n } else {\n totalFailedManifests++\n }\n\n // `setImmediate` below is a workaround against stack overflow\n // occurring when there are many manifests\n setImmediate(() => cb(null, true))\n return\n }\n\n const processNodeManifestQueue = fastq(processNodeManifestTask, 25)\n\n if (totalManifests > NODE_MANIFEST_FILE_LIMIT) {\n nodeManifests = [...nodeManifests]\n nodeManifests.sort(nodeManifestSortComparerAscendingUpdatedAt)\n nodeManifests = nodeManifests.slice(0, NODE_MANIFEST_FILE_LIMIT)\n }\n\n for (const manifest of nodeManifests) {\n processNodeManifestQueue.push(manifest, () => {})\n }\n\n if (!processNodeManifestQueue.idle()) {\n await new Promise(resolve => {\n processNodeManifestQueue.drain = resolve as () => unknown\n })\n }\n\n const pluralize = (length: number): string =>\n length > 1 || length === 0 ? `s` : ``\n\n const endTime = Date.now()\n\n reporter.info(\n `Wrote out ${totalProcessedManifests} node page manifest file${pluralize(\n totalProcessedManifests\n )} in ${endTime - startTime} ms. ${\n totalFailedManifests > 0\n ? `. ${totalFailedManifests} manifest${pluralize(\n totalFailedManifests\n )} couldn't be processed.`\n : ``\n }`\n )\n\n reporter.info(\n (!verboseLogs && listOfUniqueErrorIds.size > 0\n ? `unstable_createNodeManifest produced warnings [${[\n ...listOfUniqueErrorIds,\n ].join(`, `)}]. `\n : ``) +\n `To see full warning messages set process.env.VERBOSE_NODE_MANIFEST to \"true\".\\nVisit https://gatsby.dev/nodemanifest for more info on Node Manifests.`\n )\n\n // clean up all pending manifests from the store\n store.dispatch(internalActions.deleteNodeManifests())\n return nodeManifestPagePathMap\n}\n"],"mappings":";;;;;;;;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AA4BA,SAASA,wBAAwB,GAAW;EAC1C,MAAMC,YAAY,GAAG,KAAK;EAE1B,MAAMC,aAAa,GACjBC,OAAO,CAACC,GAAG,CAACC,wBAAwB,IACpCC,MAAM,CAACH,OAAO,CAACC,GAAG,CAACC,wBAAwB,CAAC;EAE9C,OAAOH,aAAa,IAAID,YAAY;AACtC;AACA;AACA;AACA;AACA,MAAMI,wBAAwB,GAAGL,wBAAwB,EAAE;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeO,mBAAmB,CAAC;EACjCC,MAAM;EACNC,QAAQ;EACRC;AAKF,CAAC,EAGE;EAAA;EACD,MAAMC,KAAK,GAAGC,YAAK,CAACC,QAAQ,EAAE;EAC9B,MAAM;IAAEC,KAAK;IAAEC;EAAsB,CAAC,GAAGJ,KAAK;EAC9C,MAAM;IAAEK,MAAM;IAAEC,YAAY;IAAEC;EAAkB,CAAC,GAAGP,KAAK,CAACQ,OAAO;EAEjE,MAAMC,QAAQ,GAAGX,QAAQ,aAARA,QAAQ,6CAARA,QAAQ,CAAEY,QAAQ,uDAAlB,mBAAoBC,IAAI;EAEzC,MAAMC,qCAAqC,GACzC;EACAP,MAAM,aAANA,MAAM,sCAANA,MAAM,CAAEQ,GAAG,CAAChB,MAAM,CAAC,sEAAnB,YAAqBiB,MAAM,EAAE,gFAA7B,mBAA+BC,IAAI,EAAE,0DAArC,sBAAuCC,KAAK;EAE9C,MAAMC,uCAAuC,GAC3C;EACA;EACA;EACAX,YAAY,aAAZA,YAAY,4CAAZA,YAAY,CAAEO,GAAG,CAACJ,QAAQ,C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+1,13 @@
|
|
|
1
|
+
import { IGatsbyNode } from "../redux/types";
|
|
2
|
+
/**
|
|
3
|
+
* Determine if node has changed.
|
|
4
|
+
*/
|
|
5
|
+
export declare const hasNodeChanged: (id: string, digest: string) => boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Get node and save path dependency.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getNodeAndSavePathDependency: (id: string, path: string) => IGatsbyNode | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Get content for a node from the plugin that created it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function loadNodeContent(node: IGatsbyNode): Promise<string>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.hasNodeChanged = exports.getNodeAndSavePathDependency = void 0;
|
|
5
|
+
exports.loadNodeContent = loadNodeContent;
|
|
6
|
+
var _addPageDependency = require("../redux/actions/add-page-dependency");
|
|
7
|
+
var _datastore = require("../datastore");
|
|
8
|
+
var _redux = require("../redux");
|
|
9
|
+
/**
|
|
10
|
+
* Determine if node has changed.
|
|
11
|
+
*/
|
|
12
|
+
const hasNodeChanged = (id, digest) => {
|
|
13
|
+
const node = (0, _datastore.getNode)(id);
|
|
14
|
+
if (!node) {
|
|
15
|
+
return true;
|
|
16
|
+
} else {
|
|
17
|
+
return node.internal.contentDigest !== digest;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Get node and save path dependency.
|
|
23
|
+
*/
|
|
24
|
+
exports.hasNodeChanged = hasNodeChanged;
|
|
25
|
+
const getNodeAndSavePathDependency = (id, path) => {
|
|
26
|
+
const node = (0, _datastore.getNode)(id);
|
|
27
|
+
if (!node) {
|
|
28
|
+
console.error(`getNodeAndSavePathDependency failed for node id: ${id} as it was not found in cache`);
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
(0, _addPageDependency.createPageDependency)({
|
|
32
|
+
path,
|
|
33
|
+
nodeId: id
|
|
34
|
+
});
|
|
35
|
+
return node;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get content for a node from the plugin that created it.
|
|
40
|
+
*/
|
|
41
|
+
exports.getNodeAndSavePathDependency = getNodeAndSavePathDependency;
|
|
42
|
+
async function loadNodeContent(node) {
|
|
43
|
+
if (typeof node.internal.content === `string`) {
|
|
44
|
+
return node.internal.content;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Load plugin's loader function
|
|
48
|
+
const plugin = _redux.store.getState().flattenedPlugins.find(plug => plug.name === node.internal.owner);
|
|
49
|
+
if (!plugin) {
|
|
50
|
+
throw new Error(`Could not find owner plugin of node for loadNodeContent with owner \`${node.internal.owner}\``);
|
|
51
|
+
}
|
|
52
|
+
const {
|
|
53
|
+
loadNodeContent
|
|
54
|
+
} = require(plugin.resolve);
|
|
55
|
+
if (!loadNodeContent) {
|
|
56
|
+
throw new Error(`Could not find function loadNodeContent for plugin ${plugin.name}`);
|
|
57
|
+
}
|
|
58
|
+
const content = await loadNodeContent(node);
|
|
59
|
+
node.internal.content = content;
|
|
60
|
+
return content;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=nodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodes.js","names":["hasNodeChanged","id","digest","node","getNode","internal","contentDigest","getNodeAndSavePathDependency","path","console","error","undefined","createPageDependency","nodeId","loadNodeContent","content","plugin","store","getState","flattenedPlugins","find","plug","name","owner","Error","require","resolve"],"sources":["../../src/utils/nodes.ts"],"sourcesContent":["import { createPageDependency } from \"../redux/actions/add-page-dependency\"\nimport { getNode } from \"../datastore\"\nimport { IGatsbyNode } from \"../redux/types\"\nimport { store } from \"../redux\"\n\n/**\n * Determine if node has changed.\n */\nexport const hasNodeChanged = (id: string, digest: string): boolean => {\n const node = getNode(id)\n if (!node) {\n return true\n } else {\n return node.internal.contentDigest !== digest\n }\n}\n\n/**\n * Get node and save path dependency.\n */\nexport const getNodeAndSavePathDependency = (\n id: string,\n path: string\n): IGatsbyNode | undefined => {\n const node = getNode(id)\n\n if (!node) {\n console.error(\n `getNodeAndSavePathDependency failed for node id: ${id} as it was not found in cache`\n )\n return undefined\n }\n\n createPageDependency({ path, nodeId: id })\n return node\n}\n\n/**\n * Get content for a node from the plugin that created it.\n */\nexport async function loadNodeContent(node: IGatsbyNode): Promise<string> {\n if (typeof node.internal.content === `string`) {\n return node.internal.content\n }\n\n // Load plugin's loader function\n const plugin = store\n .getState()\n .flattenedPlugins.find(plug => plug.name === node.internal.owner)\n\n if (!plugin) {\n throw new Error(\n `Could not find owner plugin of node for loadNodeContent with owner \\`${node.internal.owner}\\``\n )\n }\n\n const { loadNodeContent } = require(plugin.resolve)\n\n if (!loadNodeContent) {\n throw new Error(\n `Could not find function loadNodeContent for plugin ${plugin.name}`\n )\n }\n\n const content = await loadNodeContent(node)\n\n node.internal.content = content\n\n return content\n}\n"],"mappings":";;;;;AAAA;AACA;AAEA;AAEA;AACA;AACA;AACO,MAAMA,cAAc,GAAG,CAACC,EAAU,EAAEC,MAAc,KAAc;EACrE,MAAMC,IAAI,GAAG,IAAAC,kBAAO,EAACH,EAAE,CAAC;EACxB,IAAI,CAACE,IAAI,EAAE;IACT,OAAO,IAAI;EACb,CAAC,MAAM;IACL,OAAOA,IAAI,CAACE,QAAQ,CAACC,aAAa,KAAKJ,MAAM;EAC/C;AACF,CAAC;;AAED;AACA;AACA;AAFA;AAGO,MAAMK,4BAA4B,GAAG,CAC1CN,EAAU,EACVO,IAAY,KACgB;EAC5B,MAAML,IAAI,GAAG,IAAAC,kBAAO,EAACH,EAAE,CAAC;EAExB,IAAI,CAACE,IAAI,EAAE;IACTM,OAAO,CAACC,KAAK,CACV,oDAAmDT,EAAG,+BAA8B,CACtF;IACD,OAAOU,SAAS;EAClB;EAEA,IAAAC,uCAAoB,EAAC;IAAEJ,IAAI;IAAEK,MAAM,EAAEZ;EAAG,CAAC,CAAC;EAC1C,OAAOE,IAAI;AACb,CAAC;;AAED;AACA;AACA;AAFA;AAGO,eAAeW,eAAe,CAACX,IAAiB,EAAmB;EACxE,IAAI,OAAOA,IAAI,CAACE,QAAQ,CAACU,OAAO,KAAM,QAAO,EAAE;IAC7C,OAAOZ,IAAI,CAACE,QAAQ,CAACU,OAAO;EAC9B;;EAEA;EACA,MAAMC,MAAM,GAAGC,YAAK,CACjBC,QAAQ,EAAE,CACVC,gBAAgB,CAACC,IAAI,CAACC,IAAI,IAAIA,IAAI,CAACC,IAAI,KAAKnB,IAAI,CAACE,QAAQ,CAACkB,KAAK,CAAC;EAEnE,IAAI,CAACP,MAAM,EAAE;IACX,MAAM,IAAIQ,KAAK,CACZ,wEAAuErB,IAAI,CAACE,QAAQ,CAACkB,KAAM,IAAG,CAChG;EACH;EAEA,MAAM;IAAET;EAAgB,CAAC,GAAGW,OAAO,CAACT,MAAM,CAACU,OAAO,CAAC;EAEnD,IAAI,CAACZ,eAAe,EAAE;IACpB,MAAM,IAAIU,KAAK,CACZ,sDAAqDR,MAAM,CAACM,IAAK,EAAC,CACpE;EACH;EAEA,MAAMP,OAAO,GAAG,MAAMD,eAAe,CAACX,IAAI,CAAC;EAE3CA,IAAI,CAACE,QAAQ,CAACU,OAAO,GAAGA,OAAO;EAE/B,OAAOA,OAAO;AAChB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
var _normalizePath = _interopRequireDefault(require("normalize-path"));
|
|
7
|
+
var _memoizee = _interopRequireDefault(require("memoizee"));
|
|
8
|
+
const normalize = (0, _memoizee.default)(_normalizePath.default);
|
|
9
|
+
var _default = normalize;
|
|
10
|
+
exports.default = _default;
|
|
11
|
+
//# sourceMappingURL=normalize-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-path.js","names":["normalize","memoize","_normalize"],"sources":["../../src/utils/normalize-path.ts"],"sourcesContent":["import _normalize from \"normalize-path\"\nimport memoize from \"memoizee\"\n\nconst normalize = memoize(_normalize)\n\nexport default normalize\n"],"mappings":";;;;;AAAA;AACA;AAEA,MAAMA,SAAS,GAAG,IAAAC,iBAAO,EAACC,sBAAU,CAAC;AAAA,eAEtBF,SAAS;AAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { IStructuredError } from "gatsby-cli/src/structured-errors/types";
|
|
3
|
+
import { IGatsbyPage, IGatsbyState } from "../redux/types";
|
|
4
|
+
import { ICollectedSlices } from "./babel/find-slices";
|
|
5
|
+
interface IPageDataBase {
|
|
6
|
+
componentChunkName: IGatsbyPage["componentChunkName"];
|
|
7
|
+
matchPath: IGatsbyPage["matchPath"];
|
|
8
|
+
path: IGatsbyPage["path"];
|
|
9
|
+
staticQueryHashes: Array<string>;
|
|
10
|
+
getServerDataError?: IStructuredError | Array<IStructuredError> | null;
|
|
11
|
+
manifestId?: string;
|
|
12
|
+
}
|
|
13
|
+
export type IPageDataInput = IPageDataBase & {
|
|
14
|
+
slices: Record<string, string>;
|
|
15
|
+
componentPath: string;
|
|
16
|
+
};
|
|
17
|
+
export type IPageData = IPageDataBase & {
|
|
18
|
+
slicesMap: Record<string, string>;
|
|
19
|
+
};
|
|
20
|
+
export declare function constructPageDataString({ componentChunkName, componentPath, matchPath, path: pagePath, staticQueryHashes, manifestId, slices: overrideSlices, }: IPageDataInput, result: string | Buffer, slicesUsedByTemplates: Map<string, ICollectedSlices>, slices: IGatsbyState["slices"]): string;
|
|
21
|
+
export declare function reverseFixedPagePath(pageDataRequestPath: string): string;
|
|
22
|
+
export declare function getPagePathFromPageDataPath(pageDataPath: string): string | null;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.constructPageDataString = constructPageDataString;
|
|
6
|
+
exports.getPagePathFromPageDataPath = getPagePathFromPageDataPath;
|
|
7
|
+
exports.reverseFixedPagePath = reverseFixedPagePath;
|
|
8
|
+
var _reporter = _interopRequireDefault(require("gatsby-cli/lib/reporter"));
|
|
9
|
+
function traverseSlicesUsedByTemplates(pagePath, componentPath, overrideSlices, slicesUsedByTemplates, slices, formattedSlices = {}, handledSlices = new Set()) {
|
|
10
|
+
if (handledSlices.has(componentPath)) {
|
|
11
|
+
return null;
|
|
12
|
+
} else {
|
|
13
|
+
handledSlices.add(componentPath);
|
|
14
|
+
}
|
|
15
|
+
const slicesUsedByComponent = slicesUsedByTemplates.get(componentPath);
|
|
16
|
+
if (!slicesUsedByComponent) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
for (const [sliceSlot, sliceConf] of Object.entries(slicesUsedByComponent)) {
|
|
20
|
+
let concreteSliceForSliceSlot = sliceSlot;
|
|
21
|
+
if (overrideSlices && overrideSlices[sliceSlot]) {
|
|
22
|
+
concreteSliceForSliceSlot = overrideSlices[sliceSlot];
|
|
23
|
+
}
|
|
24
|
+
const slice = slices.get(concreteSliceForSliceSlot);
|
|
25
|
+
if (!slice) {
|
|
26
|
+
if (sliceConf.allowEmpty) {
|
|
27
|
+
continue;
|
|
28
|
+
} else {
|
|
29
|
+
const message = `Could not find slice "${concreteSliceForSliceSlot}" used by page "${pagePath}". ` + `Please check your createPages in your gatsby-node to verify this ` + `is the correct name or set allowEmpty to true.`;
|
|
30
|
+
_reporter.default.panicOnBuild(new Error(message));
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
formattedSlices[sliceSlot] = concreteSliceForSliceSlot;
|
|
35
|
+
|
|
36
|
+
// recursively repeat for found slice to find all nested slices
|
|
37
|
+
traverseSlicesUsedByTemplates(pagePath, slice.componentPath, overrideSlices, slicesUsedByTemplates, slices, formattedSlices, handledSlices);
|
|
38
|
+
}
|
|
39
|
+
return formattedSlices;
|
|
40
|
+
}
|
|
41
|
+
function constructPageDataString({
|
|
42
|
+
componentChunkName,
|
|
43
|
+
componentPath,
|
|
44
|
+
matchPath,
|
|
45
|
+
path: pagePath,
|
|
46
|
+
staticQueryHashes,
|
|
47
|
+
manifestId,
|
|
48
|
+
slices: overrideSlices
|
|
49
|
+
}, result, slicesUsedByTemplates, slices) {
|
|
50
|
+
let body = `{` + `"componentChunkName":"${componentChunkName}",` + (pagePath ? `"path":${JSON.stringify(pagePath)},` : ``) + `"result":${result},` + `"staticQueryHashes":${JSON.stringify(staticQueryHashes)}`;
|
|
51
|
+
if ("5" === `5` && process.env.GATSBY_SLICES) {
|
|
52
|
+
const formattedSlices = traverseSlicesUsedByTemplates(pagePath, componentPath, overrideSlices, slicesUsedByTemplates, slices);
|
|
53
|
+
if (formattedSlices) {
|
|
54
|
+
body += `,"slicesMap":${JSON.stringify(formattedSlices)}`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (matchPath) {
|
|
58
|
+
body += `,"matchPath":"${matchPath}"`;
|
|
59
|
+
}
|
|
60
|
+
if (manifestId) {
|
|
61
|
+
body += `,"manifestId":"${manifestId}"`;
|
|
62
|
+
}
|
|
63
|
+
body += `}`;
|
|
64
|
+
return body;
|
|
65
|
+
}
|
|
66
|
+
function reverseFixedPagePath(pageDataRequestPath) {
|
|
67
|
+
return pageDataRequestPath === `index` ? `/` : pageDataRequestPath;
|
|
68
|
+
}
|
|
69
|
+
function getPagePathFromPageDataPath(pageDataPath) {
|
|
70
|
+
const matches = pageDataPath.matchAll(/^\/?page-data\/(.+)\/page-data.json$/gm);
|
|
71
|
+
for (const [, requestedPagePath] of matches) {
|
|
72
|
+
return reverseFixedPagePath(requestedPagePath);
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=page-data-helpers.js.map
|