@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,369 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.collatePluginAPIs = collatePluginAPIs;
|
|
6
|
+
exports.handleBadExports = handleBadExports;
|
|
7
|
+
exports.handleMultipleReplaceRenderers = void 0;
|
|
8
|
+
exports.validateConfigPluginsOptions = validateConfigPluginsOptions;
|
|
9
|
+
exports.warnOnIncompatiblePeerDependency = warnOnIncompatiblePeerDependency;
|
|
10
|
+
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
11
|
+
var _intersection2 = _interopRequireDefault(require("lodash/intersection"));
|
|
12
|
+
var _toPairs2 = _interopRequireDefault(require("lodash/toPairs"));
|
|
13
|
+
var _difference2 = _interopRequireDefault(require("lodash/difference"));
|
|
14
|
+
var _path = _interopRequireDefault(require("path"));
|
|
15
|
+
var semver = _interopRequireWildcard(require("semver"));
|
|
16
|
+
var stringSimilarity = _interopRequireWildcard(require("string-similarity"));
|
|
17
|
+
var _package = require("gatsby/package.json");
|
|
18
|
+
var _reporter = _interopRequireDefault(require("gatsby-cli/lib/reporter"));
|
|
19
|
+
var _gatsbyPluginUtils = require("gatsby-plugin-utils");
|
|
20
|
+
var _commonTags = require("common-tags");
|
|
21
|
+
var _gatsbyWorker = require("gatsby-worker");
|
|
22
|
+
var _resolveModuleExports = require("../resolve-module-exports");
|
|
23
|
+
var _getLatestGatsbyFiles = require("../../utils/get-latest-gatsby-files");
|
|
24
|
+
var _resolvePlugin = require("./resolve-plugin");
|
|
25
|
+
var _preferDefault = require("../prefer-default");
|
|
26
|
+
var _importGatsbyPlugin = require("../../utils/import-gatsby-plugin");
|
|
27
|
+
var _resolveJsFilePath = require("../resolve-js-file-path");
|
|
28
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
30
|
+
const getGatsbyUpgradeVersion = entries => entries.reduce((version, entry) => {
|
|
31
|
+
if (entry.api && entry.api.version) {
|
|
32
|
+
return semver.gt(entry.api.version, version || `0.0.0`) ? entry.api.version : version;
|
|
33
|
+
}
|
|
34
|
+
return version;
|
|
35
|
+
}, ``);
|
|
36
|
+
|
|
37
|
+
// Given a plugin object, an array of the API names it exports and an
|
|
38
|
+
// array of valid API names, return an array of invalid API exports.
|
|
39
|
+
function getBadExports(plugin, pluginAPIKeys, apis) {
|
|
40
|
+
let badExports = [];
|
|
41
|
+
// Discover any exports from plugins which are not "known"
|
|
42
|
+
badExports = badExports.concat((0, _difference2.default)(pluginAPIKeys, apis).map(e => {
|
|
43
|
+
return {
|
|
44
|
+
exportName: e,
|
|
45
|
+
pluginName: plugin.name,
|
|
46
|
+
pluginVersion: plugin.version
|
|
47
|
+
};
|
|
48
|
+
}));
|
|
49
|
+
return badExports;
|
|
50
|
+
}
|
|
51
|
+
function getErrorContext(badExports, exportType, currentAPIs, latestAPIs) {
|
|
52
|
+
const entries = badExports.map(ex => {
|
|
53
|
+
return {
|
|
54
|
+
...ex,
|
|
55
|
+
api: latestAPIs[exportType][ex.exportName]
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
const gatsbyUpgradeVersion = getGatsbyUpgradeVersion(entries);
|
|
59
|
+
const errors = [];
|
|
60
|
+
const fixes = gatsbyUpgradeVersion ? [`npm install gatsby@^${gatsbyUpgradeVersion}`] : [];
|
|
61
|
+
entries.forEach(entry => {
|
|
62
|
+
const similarities = stringSimilarity.findBestMatch(entry.exportName, currentAPIs[exportType]);
|
|
63
|
+
const isDefaultPlugin = entry.pluginName == `default-site-plugin`;
|
|
64
|
+
const message = entry.api ? entry.api.version ? `was introduced in gatsby@${entry.api.version}` : `is not available in your version of Gatsby` : `is not a known API`;
|
|
65
|
+
if (isDefaultPlugin) {
|
|
66
|
+
errors.push(`- Your local gatsby-${exportType}.js is using the API "${entry.exportName}" which ${message}.`);
|
|
67
|
+
} else {
|
|
68
|
+
errors.push(`- The plugin ${entry.pluginName}@${entry.pluginVersion} is using the API "${entry.exportName}" which ${message}.`);
|
|
69
|
+
}
|
|
70
|
+
if (similarities.bestMatch.rating > 0.5) {
|
|
71
|
+
fixes.push(`Rename "${entry.exportName}" -> "${similarities.bestMatch.target}"`);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return {
|
|
75
|
+
errors,
|
|
76
|
+
entries,
|
|
77
|
+
exportType,
|
|
78
|
+
fixes,
|
|
79
|
+
// note: this is a fallback if gatsby-cli is not updated with structured error
|
|
80
|
+
sourceMessage: [`Your plugins must export known APIs from their gatsby-node.js.`].concat(errors).concat(fixes.length > 0 ? [`\n`, `Some of the following may help fix the error(s):`, ...fixes] : []).filter(Boolean).join(`\n`)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
async function handleBadExports({
|
|
84
|
+
currentAPIs,
|
|
85
|
+
badExports
|
|
86
|
+
}) {
|
|
87
|
+
const hasBadExports = Object.keys(badExports).find(api => badExports[api].length > 0);
|
|
88
|
+
if (hasBadExports) {
|
|
89
|
+
const latestAPIs = await (0, _getLatestGatsbyFiles.getLatestAPIs)();
|
|
90
|
+
// Output error messages for all bad exports
|
|
91
|
+
(0, _toPairs2.default)(badExports).forEach(badItem => {
|
|
92
|
+
const [exportType, entries] = badItem;
|
|
93
|
+
if (entries.length > 0) {
|
|
94
|
+
const context = getErrorContext(entries, exportType, currentAPIs, latestAPIs);
|
|
95
|
+
_reporter.default.error({
|
|
96
|
+
id: `11329`,
|
|
97
|
+
context
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const addModuleImportAndValidateOptions = (rootDir, incErrors) => async value => {
|
|
104
|
+
for (const plugin of value) {
|
|
105
|
+
if (plugin.modulePath) {
|
|
106
|
+
const importedModule = await import((0, _resolveJsFilePath.maybeAddFileProtocol)(plugin.modulePath));
|
|
107
|
+
const pluginModule = (0, _preferDefault.preferDefault)(importedModule);
|
|
108
|
+
plugin.module = pluginModule;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
const {
|
|
112
|
+
errors: subErrors,
|
|
113
|
+
plugins: subPlugins
|
|
114
|
+
} = await validatePluginsOptions(value, rootDir);
|
|
115
|
+
incErrors(subErrors);
|
|
116
|
+
return subPlugins;
|
|
117
|
+
};
|
|
118
|
+
async function validatePluginsOptions(plugins, rootDir) {
|
|
119
|
+
let errors = 0;
|
|
120
|
+
const newPlugins = await Promise.all(plugins.map(async plugin => {
|
|
121
|
+
let gatsbyNode;
|
|
122
|
+
try {
|
|
123
|
+
const resolvedPlugin = (0, _resolvePlugin.resolvePlugin)(plugin, rootDir);
|
|
124
|
+
gatsbyNode = await (0, _importGatsbyPlugin.importGatsbyPlugin)(resolvedPlugin, `gatsby-node`);
|
|
125
|
+
} catch (err) {
|
|
126
|
+
gatsbyNode = {};
|
|
127
|
+
}
|
|
128
|
+
if (!gatsbyNode.pluginOptionsSchema) return plugin;
|
|
129
|
+
const subPluginPaths = new Set();
|
|
130
|
+
let optionsSchema = gatsbyNode.pluginOptionsSchema({
|
|
131
|
+
Joi: _gatsbyPluginUtils.Joi.extend(joi => {
|
|
132
|
+
return {
|
|
133
|
+
type: `subPlugins`,
|
|
134
|
+
base: joi.array().items(joi.alternatives(joi.string(), joi.object({
|
|
135
|
+
resolve: _gatsbyPluginUtils.Joi.string(),
|
|
136
|
+
options: _gatsbyPluginUtils.Joi.object({}).unknown(true)
|
|
137
|
+
}))).custom((arrayValue, helpers) => {
|
|
138
|
+
const entry = helpers.schema._flags.entry;
|
|
139
|
+
return arrayValue.map(value => {
|
|
140
|
+
if (typeof value === `string`) {
|
|
141
|
+
value = {
|
|
142
|
+
resolve: value
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
const resolvedPlugin = (0, _resolvePlugin.resolvePlugin)(value, rootDir);
|
|
147
|
+
const modulePath = require.resolve(`${resolvedPlugin.resolve}${entry ? `/${entry}` : ``}`);
|
|
148
|
+
value.modulePath = modulePath;
|
|
149
|
+
const normalizedPath = helpers.state.path.map((key, index) => {
|
|
150
|
+
// if subplugin is part of an array - swap concrete index key with `[]`
|
|
151
|
+
if (typeof key === `number` && Array.isArray(helpers.state.ancestors[helpers.state.path.length - index - 1])) {
|
|
152
|
+
if (index !== helpers.state.path.length - 1) {
|
|
153
|
+
throw new Error(`No support for arrays not at the end of path`);
|
|
154
|
+
}
|
|
155
|
+
return `[]`;
|
|
156
|
+
}
|
|
157
|
+
return key;
|
|
158
|
+
}).join(`.`);
|
|
159
|
+
subPluginPaths.add(normalizedPath);
|
|
160
|
+
} catch (err) {
|
|
161
|
+
console.log(err);
|
|
162
|
+
}
|
|
163
|
+
return value;
|
|
164
|
+
});
|
|
165
|
+
}, `Gatsby specific subplugin validation`).default([]).external(addModuleImportAndValidateOptions(rootDir, inc => {
|
|
166
|
+
errors += inc;
|
|
167
|
+
}), `add module key to subplugin`),
|
|
168
|
+
args: (schema, args) => {
|
|
169
|
+
if (args !== null && args !== void 0 && args.entry && schema && typeof schema === `object` && schema.$_setFlag) {
|
|
170
|
+
return schema.$_setFlag(`entry`, args.entry, {
|
|
171
|
+
clone: true
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
return schema;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
})
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// If rootDir and plugin.parentDir are the same, i.e. if this is a plugin a user configured in their gatsby-config.js (and not a sub-theme that added it), this will be ""
|
|
181
|
+
// Otherwise, this will contain (and show) the relative path
|
|
182
|
+
const configDir = plugin.parentDir && rootDir && _path.default.relative(rootDir, plugin.parentDir) || null;
|
|
183
|
+
if (!_gatsbyPluginUtils.Joi.isSchema(optionsSchema) || optionsSchema.type !== `object`) {
|
|
184
|
+
// Validate correct usage of pluginOptionsSchema
|
|
185
|
+
_reporter.default.warn(`Plugin "${plugin.resolve}" has an invalid options schema so we cannot verify your configuration for it.`);
|
|
186
|
+
return plugin;
|
|
187
|
+
}
|
|
188
|
+
try {
|
|
189
|
+
var _plugin$options;
|
|
190
|
+
if (!optionsSchema.describe().keys.plugins) {
|
|
191
|
+
// All plugins have "plugins: []"" added to their options in load.ts, even if they
|
|
192
|
+
// do not have subplugins. We add plugins to the schema if it does not exist already
|
|
193
|
+
// to make sure they pass validation.
|
|
194
|
+
optionsSchema = optionsSchema.append({
|
|
195
|
+
plugins: _gatsbyPluginUtils.Joi.array().length(0)
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
const {
|
|
199
|
+
value,
|
|
200
|
+
warning
|
|
201
|
+
} = await (0, _gatsbyPluginUtils.validateOptionsSchema)(optionsSchema, plugin.options || {});
|
|
202
|
+
plugin.options = value;
|
|
203
|
+
|
|
204
|
+
// Handle unknown key warnings
|
|
205
|
+
const validationWarnings = warning === null || warning === void 0 ? void 0 : warning.details;
|
|
206
|
+
if ((validationWarnings === null || validationWarnings === void 0 ? void 0 : validationWarnings.length) > 0) {
|
|
207
|
+
_reporter.default.warn((0, _commonTags.stripIndent)(`
|
|
208
|
+
Warning: there are unknown plugin options for "${plugin.resolve}"${configDir ? `, configured by ${configDir}` : ``}: ${validationWarnings.map(error => error.path.join(`.`)).join(`, `)}
|
|
209
|
+
Please open an issue at https://ghub.io/${plugin.resolve} if you believe this option is valid.
|
|
210
|
+
`));
|
|
211
|
+
// We do not increment errors++ here as we do not want to process.exit if there are only warnings
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Validate subplugins if they weren't handled already
|
|
215
|
+
if (!subPluginPaths.has(`plugins`) && (_plugin$options = plugin.options) !== null && _plugin$options !== void 0 && _plugin$options.plugins) {
|
|
216
|
+
const {
|
|
217
|
+
errors: subErrors,
|
|
218
|
+
plugins: subPlugins
|
|
219
|
+
} = await validatePluginsOptions(plugin.options.plugins, rootDir);
|
|
220
|
+
plugin.options.plugins = subPlugins;
|
|
221
|
+
if (subPlugins.length > 0) {
|
|
222
|
+
subPluginPaths.add(`plugins`);
|
|
223
|
+
}
|
|
224
|
+
errors += subErrors;
|
|
225
|
+
}
|
|
226
|
+
if (subPluginPaths.size > 0) {
|
|
227
|
+
plugin.subPluginPaths = Array.from(subPluginPaths);
|
|
228
|
+
}
|
|
229
|
+
} catch (error) {
|
|
230
|
+
if (error instanceof _gatsbyPluginUtils.Joi.ValidationError) {
|
|
231
|
+
const validationErrors = error.details;
|
|
232
|
+
if (validationErrors.length > 0) {
|
|
233
|
+
_reporter.default.error({
|
|
234
|
+
id: `11331`,
|
|
235
|
+
context: {
|
|
236
|
+
configDir,
|
|
237
|
+
validationErrors,
|
|
238
|
+
pluginName: plugin.resolve
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
errors++;
|
|
242
|
+
}
|
|
243
|
+
return plugin;
|
|
244
|
+
}
|
|
245
|
+
throw error;
|
|
246
|
+
}
|
|
247
|
+
return plugin;
|
|
248
|
+
}));
|
|
249
|
+
return {
|
|
250
|
+
errors,
|
|
251
|
+
plugins: newPlugins
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
async function validateConfigPluginsOptions(config = {}, rootDir) {
|
|
255
|
+
if (!config.plugins) return;
|
|
256
|
+
const {
|
|
257
|
+
errors,
|
|
258
|
+
plugins
|
|
259
|
+
} = await validatePluginsOptions(config.plugins, rootDir);
|
|
260
|
+
config.plugins = plugins;
|
|
261
|
+
if (errors > 0) {
|
|
262
|
+
process.exit(1);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Identify which APIs each plugin exports
|
|
268
|
+
*/
|
|
269
|
+
async function collatePluginAPIs({
|
|
270
|
+
currentAPIs,
|
|
271
|
+
flattenedPlugins,
|
|
272
|
+
rootDir
|
|
273
|
+
}) {
|
|
274
|
+
// Get a list of bad exports
|
|
275
|
+
const badExports = {
|
|
276
|
+
node: [],
|
|
277
|
+
browser: [],
|
|
278
|
+
ssr: []
|
|
279
|
+
};
|
|
280
|
+
for (const plugin of flattenedPlugins) {
|
|
281
|
+
var _plugin$resolvedCompi;
|
|
282
|
+
plugin.nodeAPIs = [];
|
|
283
|
+
plugin.browserAPIs = [];
|
|
284
|
+
plugin.ssrAPIs = [];
|
|
285
|
+
|
|
286
|
+
// Discover which APIs this plugin implements and store an array against
|
|
287
|
+
// the plugin node itself *and* in an API to plugins map for faster lookups
|
|
288
|
+
// later.
|
|
289
|
+
const pluginNodeExports = await (0, _resolveModuleExports.resolveModuleExports)((_plugin$resolvedCompi = plugin.resolvedCompiledGatsbyNode) !== null && _plugin$resolvedCompi !== void 0 ? _plugin$resolvedCompi : `${plugin.resolve}/gatsby-node`, {
|
|
290
|
+
mode: `import`,
|
|
291
|
+
rootDir
|
|
292
|
+
});
|
|
293
|
+
const pluginBrowserExports = await (0, _resolveModuleExports.resolveModuleExports)(`${plugin.resolve}/gatsby-browser`, {
|
|
294
|
+
rootDir
|
|
295
|
+
});
|
|
296
|
+
const pluginSSRExports = await (0, _resolveModuleExports.resolveModuleExports)(`${plugin.resolve}/gatsby-ssr`, {
|
|
297
|
+
rootDir
|
|
298
|
+
});
|
|
299
|
+
if (pluginNodeExports.length > 0) {
|
|
300
|
+
plugin.nodeAPIs = (0, _intersection2.default)(pluginNodeExports, currentAPIs.node);
|
|
301
|
+
badExports.node = badExports.node.concat(getBadExports(plugin, pluginNodeExports, currentAPIs.node)); // Collate any bad exports
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if (pluginBrowserExports.length > 0) {
|
|
305
|
+
plugin.browserAPIs = (0, _intersection2.default)(pluginBrowserExports, currentAPIs.browser);
|
|
306
|
+
badExports.browser = badExports.browser.concat(getBadExports(plugin, pluginBrowserExports, currentAPIs.browser)); // Collate any bad exports
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
if (pluginSSRExports.length > 0) {
|
|
310
|
+
plugin.ssrAPIs = (0, _intersection2.default)(pluginSSRExports, currentAPIs.ssr);
|
|
311
|
+
badExports.ssr = badExports.ssr.concat(getBadExports(plugin, pluginSSRExports, currentAPIs.ssr)); // Collate any bad exports
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return {
|
|
316
|
+
flattenedPlugins: flattenedPlugins,
|
|
317
|
+
badExports
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
const handleMultipleReplaceRenderers = ({
|
|
321
|
+
flattenedPlugins
|
|
322
|
+
}) => {
|
|
323
|
+
// multiple replaceRenderers may cause problems at build time
|
|
324
|
+
const rendererPlugins = flattenedPlugins.filter(plugin => plugin.ssrAPIs.includes(`replaceRenderer`)).map(plugin => plugin.name);
|
|
325
|
+
if (rendererPlugins.length > 1) {
|
|
326
|
+
if (rendererPlugins.includes(`default-site-plugin`)) {
|
|
327
|
+
_reporter.default.warn(`replaceRenderer API found in these plugins:`);
|
|
328
|
+
_reporter.default.warn(rendererPlugins.join(`, `));
|
|
329
|
+
_reporter.default.warn(`This might be an error, see: https://www.gatsbyjs.com/docs/debugging-replace-renderer-api/`);
|
|
330
|
+
} else {
|
|
331
|
+
console.log(``);
|
|
332
|
+
_reporter.default.error(`Gatsby's replaceRenderer API is implemented by multiple plugins:`);
|
|
333
|
+
_reporter.default.error(rendererPlugins.join(`, `));
|
|
334
|
+
_reporter.default.error(`This will break your build`);
|
|
335
|
+
_reporter.default.error(`See: https://www.gatsbyjs.com/docs/debugging-replace-renderer-api/`);
|
|
336
|
+
if (process.env.NODE_ENV === `production`) process.exit(1);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// Now update plugin list so only final replaceRenderer will run
|
|
340
|
+
const ignorable = rendererPlugins.slice(0, -1);
|
|
341
|
+
|
|
342
|
+
// For each plugin in ignorable, set a skipSSR flag to true
|
|
343
|
+
// This prevents apiRunnerSSR() from attempting to run it later
|
|
344
|
+
const messages = [];
|
|
345
|
+
flattenedPlugins.forEach((fp, i) => {
|
|
346
|
+
if (ignorable.includes(fp.name)) {
|
|
347
|
+
messages.push(`Duplicate replaceRenderer found, skipping gatsby-ssr.js for plugin: ${fp.name}`);
|
|
348
|
+
flattenedPlugins[i].skipSSR = true;
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
if (messages.length > 0) {
|
|
352
|
+
console.log(``);
|
|
353
|
+
messages.forEach(m => _reporter.default.warn(m));
|
|
354
|
+
console.log(``);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return flattenedPlugins;
|
|
358
|
+
};
|
|
359
|
+
exports.handleMultipleReplaceRenderers = handleMultipleReplaceRenderers;
|
|
360
|
+
function warnOnIncompatiblePeerDependency(name, packageJSON) {
|
|
361
|
+
// Note: In the future the peer dependency should be enforced for all plugins.
|
|
362
|
+
const gatsbyPeerDependency = (0, _get2.default)(packageJSON, `peerDependencies.gatsby`);
|
|
363
|
+
if (!_gatsbyWorker.isWorker && gatsbyPeerDependency && !semver.satisfies(_package.version, gatsbyPeerDependency, {
|
|
364
|
+
includePrerelease: true
|
|
365
|
+
})) {
|
|
366
|
+
_reporter.default.warn(`Plugin ${name} is not compatible with your gatsby version ${_package.version} - It requires gatsby@${gatsbyPeerDependency}`);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","names":["getGatsbyUpgradeVersion","entries","reduce","version","entry","api","semver","gt","getBadExports","plugin","pluginAPIKeys","apis","badExports","concat","map","e","exportName","pluginName","name","pluginVersion","getErrorContext","exportType","currentAPIs","latestAPIs","ex","gatsbyUpgradeVersion","errors","fixes","forEach","similarities","stringSimilarity","findBestMatch","isDefaultPlugin","message","push","bestMatch","rating","target","sourceMessage","length","filter","Boolean","join","handleBadExports","hasBadExports","Object","keys","find","getLatestAPIs","badItem","context","reporter","error","id","addModuleImportAndValidateOptions","rootDir","incErrors","value","modulePath","importedModule","maybeAddFileProtocol","pluginModule","preferDefault","module","subErrors","plugins","subPlugins","validatePluginsOptions","newPlugins","Promise","all","gatsbyNode","resolvedPlugin","resolvePlugin","importGatsbyPlugin","err","pluginOptionsSchema","subPluginPaths","Set","optionsSchema","Joi","extend","joi","type","base","array","items","alternatives","string","object","resolve","options","unknown","custom","arrayValue","helpers","schema","_flags","require","normalizedPath","state","path","key","index","Array","isArray","ancestors","Error","add","console","log","default","external","inc","args","$_setFlag","clone","configDir","parentDir","relative","isSchema","warn","describe","append","warning","validateOptionsSchema","validationWarnings","details","stripIndent","has","size","from","ValidationError","validationErrors","validateConfigPluginsOptions","config","process","exit","collatePluginAPIs","flattenedPlugins","node","browser","ssr","nodeAPIs","browserAPIs","ssrAPIs","pluginNodeExports","resolveModuleExports","resolvedCompiledGatsbyNode","mode","pluginBrowserExports","pluginSSRExports","handleMultipleReplaceRenderers","rendererPlugins","includes","env","NODE_ENV","ignorable","slice","messages","fp","i","skipSSR","m","warnOnIncompatiblePeerDependency","packageJSON","gatsbyPeerDependency","isWorker","satisfies","gatsbyVersion","includePrerelease"],"sources":["../../../src/bootstrap/load-plugins/validate.ts"],"sourcesContent":["import _ from \"lodash\"\nimport path from \"path\"\nimport * as semver from \"semver\"\nimport * as stringSimilarity from \"string-similarity\"\nimport { version as gatsbyVersion } from \"gatsby/package.json\"\nimport reporter from \"gatsby-cli/lib/reporter\"\nimport { validateOptionsSchema, Joi } from \"gatsby-plugin-utils\"\nimport { IPluginRefObject } from \"gatsby-plugin-utils/dist/types\"\nimport { stripIndent } from \"common-tags\"\nimport { isWorker } from \"gatsby-worker\"\nimport { resolveModuleExports } from \"../resolve-module-exports\"\nimport { getLatestAPIs } from \"../../utils/get-latest-gatsby-files\"\nimport { GatsbyNode, PackageJson } from \"../../../\"\nimport {\n IPluginInfo,\n IFlattenedPlugin,\n IPluginInfoOptions,\n ISiteConfig,\n} from \"./types\"\nimport { resolvePlugin } from \"./resolve-plugin\"\nimport { preferDefault } from \"../prefer-default\"\nimport { importGatsbyPlugin } from \"../../utils/import-gatsby-plugin\"\nimport { maybeAddFileProtocol } from \"../resolve-js-file-path\"\n\ninterface IApi {\n version?: string\n}\n\nexport interface IEntry {\n exportName: string\n pluginName: string\n pluginVersion: string\n api?: IApi\n}\n\nexport type ExportType = \"node\" | \"browser\" | \"ssr\"\n\ntype IEntryMap = {\n [exportType in ExportType]: Array<IEntry>\n}\n\nexport type ICurrentAPIs = {\n [exportType in ExportType]: Array<string>\n}\n\nconst getGatsbyUpgradeVersion = (entries: ReadonlyArray<IEntry>): string =>\n entries.reduce((version, entry) => {\n if (entry.api && entry.api.version) {\n return semver.gt(entry.api.version, version || `0.0.0`)\n ? entry.api.version\n : version\n }\n return version\n }, ``)\n\n// Given a plugin object, an array of the API names it exports and an\n// array of valid API names, return an array of invalid API exports.\nfunction getBadExports(\n plugin: IPluginInfo,\n pluginAPIKeys: ReadonlyArray<string>,\n apis: ReadonlyArray<string>\n): Array<IEntry> {\n let badExports: Array<IEntry> = []\n // Discover any exports from plugins which are not \"known\"\n badExports = badExports.concat(\n _.difference(pluginAPIKeys, apis).map(e => {\n return {\n exportName: e,\n pluginName: plugin.name,\n pluginVersion: plugin.version,\n }\n })\n )\n return badExports\n}\n\nfunction getErrorContext(\n badExports: Array<IEntry>,\n exportType: ExportType,\n currentAPIs: ICurrentAPIs,\n latestAPIs: { [exportType in ExportType]: { [exportName: string]: IApi } }\n): {\n errors: Array<string>\n entries: Array<IEntry>\n exportType: ExportType\n fixes: Array<string>\n sourceMessage: string\n} {\n const entries = badExports.map(ex => {\n return {\n ...ex,\n api: latestAPIs[exportType][ex.exportName],\n }\n })\n\n const gatsbyUpgradeVersion = getGatsbyUpgradeVersion(entries)\n const errors: Array<string> = []\n const fixes = gatsbyUpgradeVersion\n ? [`npm install gatsby@^${gatsbyUpgradeVersion}`]\n : []\n\n entries.forEach(entry => {\n const similarities = stringSimilarity.findBestMatch(\n entry.exportName,\n currentAPIs[exportType]\n )\n const isDefaultPlugin = entry.pluginName == `default-site-plugin`\n\n const message = entry.api\n ? entry.api.version\n ? `was introduced in gatsby@${entry.api.version}`\n : `is not available in your version of Gatsby`\n : `is not a known API`\n\n if (isDefaultPlugin) {\n errors.push(\n `- Your local gatsby-${exportType}.js is using the API \"${entry.exportName}\" which ${message}.`\n )\n } else {\n errors.push(\n `- The plugin ${entry.pluginName}@${entry.pluginVersion} is using the API \"${entry.exportName}\" which ${message}.`\n )\n }\n\n if (similarities.bestMatch.rating > 0.5) {\n fixes.push(\n `Rename \"${entry.exportName}\" -> \"${similarities.bestMatch.target}\"`\n )\n }\n })\n\n return {\n errors,\n entries,\n exportType,\n fixes,\n // note: this is a fallback if gatsby-cli is not updated with structured error\n sourceMessage: [\n `Your plugins must export known APIs from their gatsby-node.js.`,\n ]\n .concat(errors)\n .concat(\n fixes.length > 0\n ? [`\\n`, `Some of the following may help fix the error(s):`, ...fixes]\n : []\n )\n .filter(Boolean)\n .join(`\\n`),\n }\n}\n\nexport async function handleBadExports({\n currentAPIs,\n badExports,\n}: {\n currentAPIs: ICurrentAPIs\n badExports: { [api in ExportType]: Array<IEntry> }\n}): Promise<void> {\n const hasBadExports = Object.keys(badExports).find(\n api => badExports[api].length > 0\n )\n if (hasBadExports) {\n const latestAPIs = await getLatestAPIs()\n // Output error messages for all bad exports\n _.toPairs(badExports).forEach(badItem => {\n const [exportType, entries] = badItem\n if (entries.length > 0) {\n const context = getErrorContext(\n entries,\n exportType as keyof typeof badExports,\n currentAPIs,\n latestAPIs\n )\n reporter.error({\n id: `11329`,\n context,\n })\n }\n })\n }\n}\n\nconst addModuleImportAndValidateOptions =\n (rootDir: string, incErrors: (inc: number) => void) =>\n async (value: Array<IPluginRefObject>): Promise<Array<IPluginRefObject>> => {\n for (const plugin of value) {\n if (plugin.modulePath) {\n const importedModule = await import(\n maybeAddFileProtocol(plugin.modulePath)\n )\n const pluginModule = preferDefault(importedModule)\n plugin.module = pluginModule\n }\n }\n\n const { errors: subErrors, plugins: subPlugins } =\n await validatePluginsOptions(value as Array<IPluginRefObject>, rootDir)\n\n incErrors(subErrors)\n return subPlugins\n }\n\nasync function validatePluginsOptions(\n plugins: Array<IPluginRefObject>,\n rootDir: string\n): Promise<{\n errors: number\n plugins: Array<IPluginRefObject>\n}> {\n let errors = 0\n const newPlugins = await Promise.all(\n plugins.map(async plugin => {\n let gatsbyNode\n try {\n const resolvedPlugin = resolvePlugin(plugin, rootDir)\n gatsbyNode = await importGatsbyPlugin(resolvedPlugin, `gatsby-node`)\n } catch (err) {\n gatsbyNode = {}\n }\n\n if (!gatsbyNode.pluginOptionsSchema) return plugin\n\n const subPluginPaths = new Set<string>()\n\n let optionsSchema = (\n gatsbyNode.pluginOptionsSchema as Exclude<\n GatsbyNode[\"pluginOptionsSchema\"],\n undefined\n >\n )({\n Joi: Joi.extend(joi => {\n return {\n type: `subPlugins`,\n base: joi\n .array()\n .items(\n joi.alternatives(\n joi.string(),\n joi.object({\n resolve: Joi.string(),\n options: Joi.object({}).unknown(true),\n })\n )\n )\n .custom((arrayValue, helpers) => {\n const entry = helpers.schema._flags.entry\n return arrayValue.map(value => {\n if (typeof value === `string`) {\n value = { resolve: value }\n }\n\n try {\n const resolvedPlugin = resolvePlugin(value, rootDir)\n const modulePath = require.resolve(\n `${resolvedPlugin.resolve}${entry ? `/${entry}` : ``}`\n )\n value.modulePath = modulePath\n\n const normalizedPath = helpers.state.path\n .map((key, index) => {\n // if subplugin is part of an array - swap concrete index key with `[]`\n if (\n typeof key === `number` &&\n Array.isArray(\n helpers.state.ancestors[\n helpers.state.path.length - index - 1\n ]\n )\n ) {\n if (index !== helpers.state.path.length - 1) {\n throw new Error(\n `No support for arrays not at the end of path`\n )\n }\n return `[]`\n }\n\n return key\n })\n .join(`.`)\n\n subPluginPaths.add(normalizedPath)\n } catch (err) {\n console.log(err)\n }\n\n return value\n })\n }, `Gatsby specific subplugin validation`)\n .default([])\n .external(\n addModuleImportAndValidateOptions(\n rootDir,\n (inc: number): void => {\n errors += inc\n }\n ),\n `add module key to subplugin`\n ),\n args: (schema: any, args: any): any => {\n if (\n args?.entry &&\n schema &&\n typeof schema === `object` &&\n schema.$_setFlag\n ) {\n return schema.$_setFlag(`entry`, args.entry, { clone: true })\n }\n return schema\n },\n }\n }),\n })\n\n // If rootDir and plugin.parentDir are the same, i.e. if this is a plugin a user configured in their gatsby-config.js (and not a sub-theme that added it), this will be \"\"\n // Otherwise, this will contain (and show) the relative path\n const configDir =\n (plugin.parentDir &&\n rootDir &&\n path.relative(rootDir, plugin.parentDir)) ||\n null\n\n if (!Joi.isSchema(optionsSchema) || optionsSchema.type !== `object`) {\n // Validate correct usage of pluginOptionsSchema\n reporter.warn(\n `Plugin \"${plugin.resolve}\" has an invalid options schema so we cannot verify your configuration for it.`\n )\n return plugin\n }\n\n try {\n if (!optionsSchema.describe().keys.plugins) {\n // All plugins have \"plugins: []\"\" added to their options in load.ts, even if they\n // do not have subplugins. We add plugins to the schema if it does not exist already\n // to make sure they pass validation.\n optionsSchema = optionsSchema.append({\n plugins: Joi.array().length(0),\n })\n }\n\n const { value, warning } = await validateOptionsSchema(\n optionsSchema,\n (plugin.options as IPluginInfoOptions) || {}\n )\n\n plugin.options = value\n\n // Handle unknown key warnings\n const validationWarnings = warning?.details\n\n if (validationWarnings?.length > 0) {\n reporter.warn(\n stripIndent(`\n Warning: there are unknown plugin options for \"${plugin.resolve}\"${\n configDir ? `, configured by ${configDir}` : ``\n }: ${validationWarnings\n .map(error => error.path.join(`.`))\n .join(`, `)}\n Please open an issue at https://ghub.io/${\n plugin.resolve\n } if you believe this option is valid.\n `)\n )\n // We do not increment errors++ here as we do not want to process.exit if there are only warnings\n }\n\n // Validate subplugins if they weren't handled already\n if (!subPluginPaths.has(`plugins`) && plugin.options?.plugins) {\n const { errors: subErrors, plugins: subPlugins } =\n await validatePluginsOptions(\n plugin.options.plugins as Array<IPluginRefObject>,\n rootDir\n )\n plugin.options.plugins = subPlugins\n if (subPlugins.length > 0) {\n subPluginPaths.add(`plugins`)\n }\n errors += subErrors\n }\n if (subPluginPaths.size > 0) {\n plugin.subPluginPaths = Array.from(subPluginPaths)\n }\n } catch (error) {\n if (error instanceof Joi.ValidationError) {\n const validationErrors = error.details\n if (validationErrors.length > 0) {\n reporter.error({\n id: `11331`,\n context: {\n configDir,\n validationErrors,\n pluginName: plugin.resolve,\n },\n })\n errors++\n }\n return plugin\n }\n\n throw error\n }\n\n return plugin\n })\n )\n return { errors, plugins: newPlugins }\n}\n\nexport async function validateConfigPluginsOptions(\n config: ISiteConfig = {},\n rootDir: string\n): Promise<void> {\n if (!config.plugins) return\n\n const { errors, plugins } = await validatePluginsOptions(\n config.plugins,\n rootDir\n )\n\n config.plugins = plugins\n\n if (errors > 0) {\n process.exit(1)\n }\n}\n\n/**\n * Identify which APIs each plugin exports\n */\nexport async function collatePluginAPIs({\n currentAPIs,\n flattenedPlugins,\n rootDir,\n}: {\n currentAPIs: ICurrentAPIs\n flattenedPlugins: Array<IPluginInfo & Partial<IFlattenedPlugin>>\n rootDir: string\n}): Promise<{\n flattenedPlugins: Array<IFlattenedPlugin>\n badExports: IEntryMap\n}> {\n // Get a list of bad exports\n const badExports: IEntryMap = {\n node: [],\n browser: [],\n ssr: [],\n }\n\n for (const plugin of flattenedPlugins) {\n plugin.nodeAPIs = []\n plugin.browserAPIs = []\n plugin.ssrAPIs = []\n\n // Discover which APIs this plugin implements and store an array against\n // the plugin node itself *and* in an API to plugins map for faster lookups\n // later.\n const pluginNodeExports = await resolveModuleExports(\n plugin.resolvedCompiledGatsbyNode ?? `${plugin.resolve}/gatsby-node`,\n {\n mode: `import`,\n rootDir,\n }\n )\n const pluginBrowserExports = await resolveModuleExports(\n `${plugin.resolve}/gatsby-browser`,\n {\n rootDir,\n }\n )\n const pluginSSRExports = await resolveModuleExports(\n `${plugin.resolve}/gatsby-ssr`,\n { rootDir }\n )\n\n if (pluginNodeExports.length > 0) {\n plugin.nodeAPIs = _.intersection(pluginNodeExports, currentAPIs.node)\n badExports.node = badExports.node.concat(\n getBadExports(plugin, pluginNodeExports, currentAPIs.node)\n ) // Collate any bad exports\n }\n\n if (pluginBrowserExports.length > 0) {\n plugin.browserAPIs = _.intersection(\n pluginBrowserExports,\n currentAPIs.browser\n )\n badExports.browser = badExports.browser.concat(\n getBadExports(plugin, pluginBrowserExports, currentAPIs.browser)\n ) // Collate any bad exports\n }\n\n if (pluginSSRExports.length > 0) {\n plugin.ssrAPIs = _.intersection(pluginSSRExports, currentAPIs.ssr)\n badExports.ssr = badExports.ssr.concat(\n getBadExports(plugin, pluginSSRExports, currentAPIs.ssr)\n ) // Collate any bad exports\n }\n }\n\n return {\n flattenedPlugins: flattenedPlugins as Array<IFlattenedPlugin>,\n badExports,\n }\n}\n\nexport const handleMultipleReplaceRenderers = ({\n flattenedPlugins,\n}: {\n flattenedPlugins: Array<IFlattenedPlugin>\n}): Array<IFlattenedPlugin> => {\n // multiple replaceRenderers may cause problems at build time\n const rendererPlugins = flattenedPlugins\n .filter(plugin => plugin.ssrAPIs.includes(`replaceRenderer`))\n .map(plugin => plugin.name)\n if (rendererPlugins.length > 1) {\n if (rendererPlugins.includes(`default-site-plugin`)) {\n reporter.warn(`replaceRenderer API found in these plugins:`)\n reporter.warn(rendererPlugins.join(`, `))\n reporter.warn(\n `This might be an error, see: https://www.gatsbyjs.com/docs/debugging-replace-renderer-api/`\n )\n } else {\n console.log(``)\n reporter.error(\n `Gatsby's replaceRenderer API is implemented by multiple plugins:`\n )\n reporter.error(rendererPlugins.join(`, `))\n reporter.error(`This will break your build`)\n reporter.error(\n `See: https://www.gatsbyjs.com/docs/debugging-replace-renderer-api/`\n )\n if (process.env.NODE_ENV === `production`) process.exit(1)\n }\n\n // Now update plugin list so only final replaceRenderer will run\n const ignorable = rendererPlugins.slice(0, -1)\n\n // For each plugin in ignorable, set a skipSSR flag to true\n // This prevents apiRunnerSSR() from attempting to run it later\n const messages: Array<string> = []\n flattenedPlugins.forEach((fp, i) => {\n if (ignorable.includes(fp.name)) {\n messages.push(\n `Duplicate replaceRenderer found, skipping gatsby-ssr.js for plugin: ${fp.name}`\n )\n flattenedPlugins[i].skipSSR = true\n }\n })\n if (messages.length > 0) {\n console.log(``)\n messages.forEach(m => reporter.warn(m))\n console.log(``)\n }\n }\n\n return flattenedPlugins\n}\n\nexport function warnOnIncompatiblePeerDependency(\n name: string,\n packageJSON: PackageJson\n): void {\n // Note: In the future the peer dependency should be enforced for all plugins.\n const gatsbyPeerDependency = _.get(packageJSON, `peerDependencies.gatsby`)\n if (\n !isWorker &&\n gatsbyPeerDependency &&\n !semver.satisfies(gatsbyVersion, gatsbyPeerDependency, {\n includePrerelease: true,\n })\n ) {\n reporter.warn(\n `Plugin ${name} is not compatible with your gatsby version ${gatsbyVersion} - It requires gatsby@${gatsbyPeerDependency}`\n )\n }\n}\n"],"mappings":";;;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAA8D;AAAA;AAuB9D,MAAMA,uBAAuB,GAAIC,OAA8B,IAC7DA,OAAO,CAACC,MAAM,CAAC,CAACC,OAAO,EAAEC,KAAK,KAAK;EACjC,IAAIA,KAAK,CAACC,GAAG,IAAID,KAAK,CAACC,GAAG,CAACF,OAAO,EAAE;IAClC,OAAOG,MAAM,CAACC,EAAE,CAACH,KAAK,CAACC,GAAG,CAACF,OAAO,EAAEA,OAAO,IAAK,OAAM,CAAC,GACnDC,KAAK,CAACC,GAAG,CAACF,OAAO,GACjBA,OAAO;EACb;EACA,OAAOA,OAAO;AAChB,CAAC,EAAG,EAAC,CAAC;;AAER;AACA;AACA,SAASK,aAAa,CACpBC,MAAmB,EACnBC,aAAoC,EACpCC,IAA2B,EACZ;EACf,IAAIC,UAAyB,GAAG,EAAE;EAClC;EACAA,UAAU,GAAGA,UAAU,CAACC,MAAM,CAC5B,0BAAaH,aAAa,EAAEC,IAAI,CAAC,CAACG,GAAG,CAACC,CAAC,IAAI;IACzC,OAAO;MACLC,UAAU,EAAED,CAAC;MACbE,UAAU,EAAER,MAAM,CAACS,IAAI;MACvBC,aAAa,EAAEV,MAAM,CAACN;IACxB,CAAC;EACH,CAAC,CAAC,CACH;EACD,OAAOS,UAAU;AACnB;AAEA,SAASQ,eAAe,CACtBR,UAAyB,EACzBS,UAAsB,EACtBC,WAAyB,EACzBC,UAA0E,EAO1E;EACA,MAAM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UAASvG,IAAK,+CAA8CuJ,gBAAc,yBAAwBH,oBAAqB,EAAC,CAC1H;EACH;AACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IGatsbyConfigInput, PluginEntry } from "../../utils/merge-gatsby-config";
|
|
2
|
+
interface IThemeObj {
|
|
3
|
+
themeName: string;
|
|
4
|
+
themeConfig: IGatsbyConfigInput;
|
|
5
|
+
themeDir: string;
|
|
6
|
+
themeSpec: PluginEntry;
|
|
7
|
+
parentDir: string;
|
|
8
|
+
configFilePath?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function loadThemes(config: IGatsbyConfigInput, { configFilePath, rootDir }: {
|
|
11
|
+
configFilePath: string;
|
|
12
|
+
rootDir: string;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
config: IGatsbyConfigInput;
|
|
15
|
+
themes: Array<IThemeObj>;
|
|
16
|
+
}>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.loadThemes = loadThemes;
|
|
6
|
+
var _uniqWith2 = _interopRequireDefault(require("lodash/uniqWith"));
|
|
7
|
+
var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
|
|
8
|
+
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
|
9
|
+
var _flattenDeep2 = _interopRequireDefault(require("lodash/flattenDeep"));
|
|
10
|
+
var _gatsbyCoreUtils = require("gatsby-core-utils");
|
|
11
|
+
var path = _interopRequireWildcard(require("path"));
|
|
12
|
+
var _mergeGatsbyConfig = require("../../utils/merge-gatsby-config");
|
|
13
|
+
var _bluebird = require("bluebird");
|
|
14
|
+
var _debug = _interopRequireDefault(require("debug"));
|
|
15
|
+
var _preferDefault = require("../prefer-default");
|
|
16
|
+
var _getConfigFile = require("../get-config-file");
|
|
17
|
+
var _resolvePlugin = require("../load-plugins/resolve-plugin");
|
|
18
|
+
var _reporter = _interopRequireDefault(require("gatsby-cli/lib/reporter"));
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
const debug = (0, _debug.default)(`gatsby:load-themes`);
|
|
22
|
+
// get the gatsby-config file for a theme
|
|
23
|
+
const resolveTheme = async (themeSpec, configFileThatDeclaredTheme, isMainConfig = false, rootDir) => {
|
|
24
|
+
const themeName = typeof themeSpec === `string` ? themeSpec : themeSpec.resolve;
|
|
25
|
+
let themeDir;
|
|
26
|
+
try {
|
|
27
|
+
const scopedRequire = (0, _gatsbyCoreUtils.createRequireFromPath)(`${rootDir}/:internal:`);
|
|
28
|
+
// theme is an node-resolvable module
|
|
29
|
+
themeDir = path.dirname(scopedRequire.resolve(themeName));
|
|
30
|
+
} catch (e) {
|
|
31
|
+
let pathToLocalTheme;
|
|
32
|
+
|
|
33
|
+
// only try to look for local theme in main site
|
|
34
|
+
// local themes nested in other themes is potential source of problems:
|
|
35
|
+
// because those are not hosted by npm, there is potential for multiple
|
|
36
|
+
// local themes with same name that do different things and name being
|
|
37
|
+
// main identifier that Gatsby uses right now, it's safer not to support it for now.
|
|
38
|
+
if (isMainConfig) {
|
|
39
|
+
pathToLocalTheme = path.join(rootDir, `plugins`, themeName);
|
|
40
|
+
// is a local plugin OR it doesn't exist
|
|
41
|
+
try {
|
|
42
|
+
const {
|
|
43
|
+
resolve
|
|
44
|
+
} = (0, _resolvePlugin.resolvePlugin)(themeName, rootDir);
|
|
45
|
+
themeDir = resolve;
|
|
46
|
+
} catch (localErr) {
|
|
47
|
+
_reporter.default.panic(`Failed to resolve ${themeName}`, localErr);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (!themeDir) {
|
|
51
|
+
const nodeResolutionPaths = module.paths.map(p => path.join(p, themeName));
|
|
52
|
+
_reporter.default.panic({
|
|
53
|
+
id: `10226`,
|
|
54
|
+
context: {
|
|
55
|
+
themeName,
|
|
56
|
+
configFilePath: configFileThatDeclaredTheme,
|
|
57
|
+
pathToLocalTheme,
|
|
58
|
+
nodeResolutionPaths
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const {
|
|
64
|
+
configModule,
|
|
65
|
+
configFilePath
|
|
66
|
+
} = await (0, _getConfigFile.getConfigFile)(themeDir, `gatsby-config`);
|
|
67
|
+
const theme = (0, _preferDefault.preferDefault)(configModule);
|
|
68
|
+
|
|
69
|
+
// if theme is a function, call it with the themeConfig
|
|
70
|
+
const themeConfig = (0, _isFunction2.default)(theme) ? theme(typeof themeSpec === `string` ? {} : themeSpec.options) : theme;
|
|
71
|
+
return {
|
|
72
|
+
themeName,
|
|
73
|
+
themeConfig,
|
|
74
|
+
themeSpec,
|
|
75
|
+
themeDir,
|
|
76
|
+
parentDir: rootDir,
|
|
77
|
+
configFilePath
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// single iteration of a recursive function that resolve parent themes
|
|
82
|
+
// It's recursive because we support child themes declaring parents and
|
|
83
|
+
// have to resolve all the way `up the tree` of parent/children relationships
|
|
84
|
+
//
|
|
85
|
+
// Theoretically, there could be an infinite loop here but in practice there is
|
|
86
|
+
// no use case for a loop so I expect that to only happen if someone is very
|
|
87
|
+
// off track and creating their own set of themes
|
|
88
|
+
const processTheme = ({
|
|
89
|
+
themeName,
|
|
90
|
+
themeConfig,
|
|
91
|
+
themeSpec,
|
|
92
|
+
themeDir,
|
|
93
|
+
configFilePath
|
|
94
|
+
}, {
|
|
95
|
+
rootDir
|
|
96
|
+
}) => {
|
|
97
|
+
const themesList = themeConfig && themeConfig.plugins;
|
|
98
|
+
// Gatsby themes don't have to specify a gatsby-config.js (they might only use gatsby-node, etc)
|
|
99
|
+
// in this case they're technically plugins, but we should support it anyway
|
|
100
|
+
// because we can't guarantee which files theme creators create first
|
|
101
|
+
if (themeConfig && themesList) {
|
|
102
|
+
// for every parent theme a theme defines, resolve the parent's
|
|
103
|
+
// gatsby config and return it in order [parentA, parentB, child]
|
|
104
|
+
return (0, _bluebird.mapSeries)(themesList, async spec => {
|
|
105
|
+
const themeObj = await resolveTheme(spec, configFilePath, false, themeDir);
|
|
106
|
+
return processTheme(themeObj, {
|
|
107
|
+
rootDir: themeDir
|
|
108
|
+
});
|
|
109
|
+
}).then(arr => (0, _flattenDeep2.default)(arr.concat([{
|
|
110
|
+
themeName,
|
|
111
|
+
themeConfig,
|
|
112
|
+
themeSpec,
|
|
113
|
+
themeDir,
|
|
114
|
+
parentDir: rootDir
|
|
115
|
+
}])));
|
|
116
|
+
} else {
|
|
117
|
+
// if a theme doesn't define additional themes, return the original theme
|
|
118
|
+
return Promise.resolve([{
|
|
119
|
+
themeName,
|
|
120
|
+
themeConfig,
|
|
121
|
+
themeSpec,
|
|
122
|
+
themeDir,
|
|
123
|
+
parentDir: rootDir
|
|
124
|
+
}]);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
function normalizePluginEntry(plugin, parentDir) {
|
|
128
|
+
return {
|
|
129
|
+
resolve: typeof plugin === `string` ? plugin : plugin.resolve,
|
|
130
|
+
options: typeof plugin === `string` ? {} : plugin.options || {},
|
|
131
|
+
parentDir
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
async function loadThemes(config, {
|
|
135
|
+
configFilePath,
|
|
136
|
+
rootDir
|
|
137
|
+
}) {
|
|
138
|
+
const themesA = await (0, _bluebird.mapSeries)(config.plugins || [], async themeSpec => {
|
|
139
|
+
const themeObj = await resolveTheme(themeSpec, configFilePath, true, rootDir);
|
|
140
|
+
return processTheme(themeObj, {
|
|
141
|
+
rootDir
|
|
142
|
+
});
|
|
143
|
+
}).then(arr => (0, _flattenDeep2.default)(arr));
|
|
144
|
+
|
|
145
|
+
// log out flattened themes list to aid in debugging
|
|
146
|
+
debug(themesA);
|
|
147
|
+
|
|
148
|
+
// map over each theme, adding the theme itself to the plugins
|
|
149
|
+
// list in the config for the theme. This enables the usage of
|
|
150
|
+
// gatsby-node, etc in themes.
|
|
151
|
+
return (0, _bluebird.mapSeries)(themesA, ({
|
|
152
|
+
themeName,
|
|
153
|
+
themeConfig = {},
|
|
154
|
+
themeSpec,
|
|
155
|
+
themeDir,
|
|
156
|
+
parentDir
|
|
157
|
+
}) => {
|
|
158
|
+
return {
|
|
159
|
+
...themeConfig,
|
|
160
|
+
plugins: [...(themeConfig.plugins || []).map(plugin => normalizePluginEntry(plugin, themeDir)),
|
|
161
|
+
// theme plugin is last so it's gatsby-node, etc can override it's declared plugins, like a normal site.
|
|
162
|
+
{
|
|
163
|
+
resolve: themeName,
|
|
164
|
+
options: typeof themeSpec === `string` ? {} : themeSpec.options,
|
|
165
|
+
parentDir
|
|
166
|
+
}]
|
|
167
|
+
};
|
|
168
|
+
})
|
|
169
|
+
/**
|
|
170
|
+
* themes resolve to a gatsby-config, so here we merge all of the configs
|
|
171
|
+
* into a single config, making sure to maintain the order in which
|
|
172
|
+
* they were defined so that later configs, like the user's site and
|
|
173
|
+
* children, can override functionality in earlier themes.
|
|
174
|
+
*/.reduce(_mergeGatsbyConfig.mergeGatsbyConfig, {}).then(newConfig => {
|
|
175
|
+
const mergedConfig = (0, _mergeGatsbyConfig.mergeGatsbyConfig)(newConfig, {
|
|
176
|
+
...config,
|
|
177
|
+
plugins: [...(config.plugins || []).map(plugin => normalizePluginEntry(plugin, rootDir))]
|
|
178
|
+
});
|
|
179
|
+
mergedConfig.plugins = (0, _uniqWith2.default)(mergedConfig.plugins, _isEqual2.default);
|
|
180
|
+
return {
|
|
181
|
+
config: mergedConfig,
|
|
182
|
+
themes: themesA
|
|
183
|
+
};
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=index.js.map
|