@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,584 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
var _traverse = _interopRequireDefault(require("@babel/traverse"));
|
|
7
|
+
var t = _interopRequireWildcard(require("@babel/types"));
|
|
8
|
+
var _findSlices = require("../utils/babel/find-slices");
|
|
9
|
+
var _babelParseToAst = require("../utils/babel-parse-to-ast");
|
|
10
|
+
var _codeFrame = require("@babel/code-frame");
|
|
11
|
+
var _gatsbyCoreUtils = require("gatsby-core-utils");
|
|
12
|
+
var _errorParser = require("./error-parser");
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
/* eslint-disable no-unused-expressions */const fs = require(`fs-extra`);
|
|
16
|
+
const crypto = require(`crypto`);
|
|
17
|
+
const _ = require(`lodash`);
|
|
18
|
+
const slugify = require(`slugify`);
|
|
19
|
+
|
|
20
|
+
// Traverse is a es6 module...
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
getGraphQLTag,
|
|
24
|
+
StringInterpolationNotAllowedError,
|
|
25
|
+
EmptyGraphQLTagError,
|
|
26
|
+
GraphQLSyntaxError,
|
|
27
|
+
ExportIsNotAsyncError,
|
|
28
|
+
isWithinConfigExport
|
|
29
|
+
} = require(`babel-plugin-remove-graphql-queries`);
|
|
30
|
+
const report = require(`gatsby-cli/lib/reporter`);
|
|
31
|
+
const apiRunnerNode = require(`../utils/api-runner-node`);
|
|
32
|
+
const {
|
|
33
|
+
actions
|
|
34
|
+
} = require(`../redux/actions`);
|
|
35
|
+
const {
|
|
36
|
+
store
|
|
37
|
+
} = require(`../redux`);
|
|
38
|
+
/**
|
|
39
|
+
* Add autogenerated query name if it wasn't defined by user.
|
|
40
|
+
*/
|
|
41
|
+
const generateQueryName = ({
|
|
42
|
+
def,
|
|
43
|
+
hash,
|
|
44
|
+
file,
|
|
45
|
+
queryType
|
|
46
|
+
}) => {
|
|
47
|
+
if (!def.name || !def.name.value) {
|
|
48
|
+
const slugified = slugify(file, {
|
|
49
|
+
replacement: ` `,
|
|
50
|
+
lower: false
|
|
51
|
+
});
|
|
52
|
+
def.name = {
|
|
53
|
+
value: `${_.camelCase(`${queryType}-${slugified}-${hash}`)}`,
|
|
54
|
+
kind: `Name`
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return def;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// taken from `babel-plugin-remove-graphql-queries`, in the future import from
|
|
61
|
+
// there
|
|
62
|
+
function followVariableDeclarations(binding) {
|
|
63
|
+
var _binding$path, _node$init;
|
|
64
|
+
const node = binding === null || binding === void 0 ? void 0 : (_binding$path = binding.path) === null || _binding$path === void 0 ? void 0 : _binding$path.node;
|
|
65
|
+
if ((node === null || node === void 0 ? void 0 : node.type) === `VariableDeclarator` && (node === null || node === void 0 ? void 0 : node.id.type) === `Identifier` && (node === null || node === void 0 ? void 0 : (_node$init = node.init) === null || _node$init === void 0 ? void 0 : _node$init.type) === `Identifier`) {
|
|
66
|
+
return followVariableDeclarations(binding.path.scope.getBinding(node.init.name));
|
|
67
|
+
}
|
|
68
|
+
return binding;
|
|
69
|
+
}
|
|
70
|
+
function referencesGatsby(path, callee, calleeName) {
|
|
71
|
+
// This works for es6 imports
|
|
72
|
+
if (callee.referencesImport(`gatsby`, ``)) {
|
|
73
|
+
return true;
|
|
74
|
+
} else {
|
|
75
|
+
var _declaration$path$nod;
|
|
76
|
+
// This finds where userStaticQuery was declared and then checks
|
|
77
|
+
// if it is a "require" and "gatsby" is the argument.
|
|
78
|
+
const declaration = path.scope.getBinding(calleeName);
|
|
79
|
+
if (declaration && ((_declaration$path$nod = declaration.path.node.init) === null || _declaration$path$nod === void 0 ? void 0 : _declaration$path$nod.callee.name) === `require` && declaration.path.node.init.arguments[0].value === `gatsby`) {
|
|
80
|
+
return true;
|
|
81
|
+
} else {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
function isUseStaticQuery(path) {
|
|
87
|
+
const callee = path.node.callee;
|
|
88
|
+
if (callee.type === `MemberExpression`) {
|
|
89
|
+
const property = callee.property;
|
|
90
|
+
if (property.name === `useStaticQuery`) {
|
|
91
|
+
var _path$node;
|
|
92
|
+
return referencesGatsby(path, path.get(`callee`).get(`object`), (_path$node = path.node) === null || _path$node === void 0 ? void 0 : _path$node.callee.object.name);
|
|
93
|
+
}
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
if (callee.name === `useStaticQuery`) {
|
|
97
|
+
var _path$node2;
|
|
98
|
+
return referencesGatsby(path, path.get(`callee`), (_path$node2 = path.node) === null || _path$node2 === void 0 ? void 0 : _path$node2.callee.name);
|
|
99
|
+
}
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
const warnForUnknownQueryVariable = (varName, file, usageFunction) => report.warn(`\nWe were unable to find the declaration of variable "${varName}", which you passed as the "query" prop into the ${usageFunction} declaration in "${file}".
|
|
103
|
+
|
|
104
|
+
Perhaps the variable name has a typo?
|
|
105
|
+
|
|
106
|
+
Also note that we are currently unable to use queries defined in files other than the file where the ${usageFunction} is defined. If you're attempting to import the query, please move it into "${file}". If being able to import queries from another file is an important capability for you, we invite your help fixing it.\n`);
|
|
107
|
+
async function parseToAst(filePath, fileStr, {
|
|
108
|
+
parentSpan,
|
|
109
|
+
addError
|
|
110
|
+
} = {}) {
|
|
111
|
+
let ast;
|
|
112
|
+
|
|
113
|
+
// Since gatsby-plugin-mdx v4, we are using the resourceQuery feature of webpack's loaders to inject a content file into a page component.
|
|
114
|
+
const cleanFilePath = (0, _gatsbyCoreUtils.getPathToLayoutComponent)(filePath);
|
|
115
|
+
|
|
116
|
+
// Preprocess and attempt to parse source; return an AST if we can, log an
|
|
117
|
+
// error if we can't.
|
|
118
|
+
const transpiled = await apiRunnerNode(`preprocessSource`, {
|
|
119
|
+
filename: cleanFilePath,
|
|
120
|
+
contents: fileStr,
|
|
121
|
+
parentSpan
|
|
122
|
+
});
|
|
123
|
+
if (transpiled && transpiled.length) {
|
|
124
|
+
for (const item of transpiled) {
|
|
125
|
+
try {
|
|
126
|
+
const tmp = (0, _babelParseToAst.babelParseToAst)(item, cleanFilePath);
|
|
127
|
+
ast = tmp;
|
|
128
|
+
break;
|
|
129
|
+
} catch (error) {
|
|
130
|
+
// We emit the actual error below if every transpiled variant fails to parse
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (ast === undefined) {
|
|
134
|
+
addError({
|
|
135
|
+
id: `85912`,
|
|
136
|
+
filePath: cleanFilePath,
|
|
137
|
+
context: {
|
|
138
|
+
filePath
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
store.dispatch(actions.queryExtractionGraphQLError({
|
|
142
|
+
componentPath: cleanFilePath
|
|
143
|
+
}));
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
try {
|
|
148
|
+
ast = (0, _babelParseToAst.babelParseToAst)(fileStr, cleanFilePath);
|
|
149
|
+
} catch (error) {
|
|
150
|
+
store.dispatch(actions.queryExtractionBabelError({
|
|
151
|
+
componentPath: cleanFilePath,
|
|
152
|
+
error
|
|
153
|
+
}));
|
|
154
|
+
addError({
|
|
155
|
+
id: `85911`,
|
|
156
|
+
filePath: cleanFilePath,
|
|
157
|
+
context: {
|
|
158
|
+
filePath: cleanFilePath
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return ast;
|
|
165
|
+
}
|
|
166
|
+
const panicOnGlobalTag = file => report.panicOnBuild(`Using the global \`graphql\` tag for Gatsby's queries isn't supported as of v3.\n` + `Import it instead like: import { graphql } from 'gatsby' in file:\n` + file);
|
|
167
|
+
// Adapted from gatsby/src/utils/babel/babel-plugin-remove-api
|
|
168
|
+
function findApiExport(ast, api) {
|
|
169
|
+
let hasExport = false;
|
|
170
|
+
const apiToFind = api !== null && api !== void 0 ? api : ``;
|
|
171
|
+
(0, _traverse.default)(ast, {
|
|
172
|
+
ExportNamedDeclaration(path) {
|
|
173
|
+
const declaration = path.node.declaration;
|
|
174
|
+
if (t.isExportNamedDeclaration(path.node) && !hasExport) {
|
|
175
|
+
hasExport = path.node.specifiers.some(specifier => t.isExportSpecifier(specifier) && t.isIdentifier(specifier.exported) && specifier.exported.name === apiToFind);
|
|
176
|
+
}
|
|
177
|
+
let apiToCheck;
|
|
178
|
+
if (t.isFunctionDeclaration(declaration) && declaration.id) {
|
|
179
|
+
apiToCheck = declaration.id.name;
|
|
180
|
+
}
|
|
181
|
+
if (t.isVariableDeclaration(declaration) && t.isIdentifier(declaration.declarations[0].id)) {
|
|
182
|
+
apiToCheck = declaration.declarations[0].id.name;
|
|
183
|
+
}
|
|
184
|
+
if (apiToCheck && apiToCheck === apiToFind) {
|
|
185
|
+
hasExport = true;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
return hasExport;
|
|
190
|
+
}
|
|
191
|
+
async function findGraphQLTags(file, ast, {
|
|
192
|
+
parentSpan,
|
|
193
|
+
addError
|
|
194
|
+
} = {}) {
|
|
195
|
+
const documents = [];
|
|
196
|
+
if (!ast) {
|
|
197
|
+
return documents;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* A map of graphql documents to unique locations.
|
|
202
|
+
*
|
|
203
|
+
* A graphql document's unique location is made of:
|
|
204
|
+
*
|
|
205
|
+
* - the location of the graphql template literal that contains the document, and
|
|
206
|
+
* - the document's location within the graphql template literal
|
|
207
|
+
*
|
|
208
|
+
* This is used to prevent returning duplicated documents.
|
|
209
|
+
*/
|
|
210
|
+
const documentLocations = new WeakMap();
|
|
211
|
+
const extractStaticQuery = (taggedTemplateExpressPath, isHook = false) => {
|
|
212
|
+
const {
|
|
213
|
+
ast: gqlAst,
|
|
214
|
+
text,
|
|
215
|
+
hash,
|
|
216
|
+
isGlobal
|
|
217
|
+
} = getGraphQLTag(taggedTemplateExpressPath);
|
|
218
|
+
if (!gqlAst) return;
|
|
219
|
+
if (isGlobal) {
|
|
220
|
+
panicOnGlobalTag(file);
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
gqlAst.definitions.forEach(def => {
|
|
224
|
+
generateQueryName({
|
|
225
|
+
def,
|
|
226
|
+
hash,
|
|
227
|
+
file,
|
|
228
|
+
queryType: `static`
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
let templateLoc;
|
|
232
|
+
taggedTemplateExpressPath.traverse({
|
|
233
|
+
TemplateElement(templateElementPath) {
|
|
234
|
+
templateLoc = templateElementPath.node.loc;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
const docInFile = {
|
|
238
|
+
filePath: file,
|
|
239
|
+
doc: gqlAst,
|
|
240
|
+
text: text,
|
|
241
|
+
hash: hash,
|
|
242
|
+
isStaticQuery: true,
|
|
243
|
+
isConfigQuery: false,
|
|
244
|
+
isHook,
|
|
245
|
+
templateLoc
|
|
246
|
+
};
|
|
247
|
+
documentLocations.set(docInFile, `${taggedTemplateExpressPath.node.start}-${gqlAst.loc.start}`);
|
|
248
|
+
documents.push(docInFile);
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// Look for queries in <StaticQuery /> elements.
|
|
252
|
+
(0, _traverse.default)(ast, {
|
|
253
|
+
JSXElement(path) {
|
|
254
|
+
if (path.node.openingElement.name.name !== `StaticQuery`) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// astexplorer.com link I (@kyleamathews) used when prototyping this algorithm
|
|
259
|
+
// https://astexplorer.net/#/gist/ab5d71c0f08f287fbb840bf1dd8b85ff/2f188345d8e5a4152fe7c96f0d52dbcc6e9da466
|
|
260
|
+
path.traverse({
|
|
261
|
+
JSXAttribute(jsxPath) {
|
|
262
|
+
if (jsxPath.node.name.name !== `query`) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
jsxPath.traverse({
|
|
266
|
+
// Assume the query is inline in the component and extract that.
|
|
267
|
+
TaggedTemplateExpression(templatePath) {
|
|
268
|
+
extractStaticQuery(templatePath);
|
|
269
|
+
},
|
|
270
|
+
// Also see if it's a variable that's passed in as a prop
|
|
271
|
+
// and if it is, go find it.
|
|
272
|
+
Identifier(identifierPath) {
|
|
273
|
+
if (identifierPath.node.name !== `graphql`) {
|
|
274
|
+
const varName = identifierPath.node.name;
|
|
275
|
+
let found = false;
|
|
276
|
+
(0, _traverse.default)(ast, {
|
|
277
|
+
VariableDeclarator(varPath) {
|
|
278
|
+
if (varPath.node.id.name === varName && varPath.node.init.type === `TaggedTemplateExpression`) {
|
|
279
|
+
varPath.traverse({
|
|
280
|
+
TaggedTemplateExpression(templatePath) {
|
|
281
|
+
found = true;
|
|
282
|
+
extractStaticQuery(templatePath);
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
if (!found) {
|
|
289
|
+
warnForUnknownQueryVariable(varName, file, `<StaticQuery>`);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
// Look for queries in useStaticQuery hooks.
|
|
301
|
+
(0, _traverse.default)(ast, {
|
|
302
|
+
CallExpression(hookPath) {
|
|
303
|
+
if (!isUseStaticQuery(hookPath)) return;
|
|
304
|
+
const firstArg = hookPath.get(`arguments`)[0];
|
|
305
|
+
|
|
306
|
+
// Assume the query is inline in the component and extract that.
|
|
307
|
+
if (firstArg.isTaggedTemplateExpression()) {
|
|
308
|
+
extractStaticQuery(firstArg, true);
|
|
309
|
+
// Also see if it's a variable that's passed in as a prop
|
|
310
|
+
// and if it is, go find it.
|
|
311
|
+
} else if (firstArg.isIdentifier()) {
|
|
312
|
+
if (firstArg.node.name !== `graphql` && firstArg.node.name !== `useStaticQuery`) {
|
|
313
|
+
const varName = firstArg.node.name;
|
|
314
|
+
let found = false;
|
|
315
|
+
(0, _traverse.default)(ast, {
|
|
316
|
+
VariableDeclarator(varPath) {
|
|
317
|
+
if (varPath.node.id.name === varName && varPath.node.init.type === `TaggedTemplateExpression`) {
|
|
318
|
+
varPath.traverse({
|
|
319
|
+
TaggedTemplateExpression(templatePath) {
|
|
320
|
+
found = true;
|
|
321
|
+
extractStaticQuery(templatePath, true);
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
if (!found) {
|
|
328
|
+
warnForUnknownQueryVariable(varName, file, `useStaticQuery`);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
function TaggedTemplateExpression(innerPath) {
|
|
335
|
+
const {
|
|
336
|
+
ast: gqlAst,
|
|
337
|
+
isGlobal,
|
|
338
|
+
hash,
|
|
339
|
+
text
|
|
340
|
+
} = getGraphQLTag(innerPath);
|
|
341
|
+
if (!gqlAst) return;
|
|
342
|
+
if (isGlobal) {
|
|
343
|
+
panicOnGlobalTag(file);
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
const isConfigQuery = isWithinConfigExport(innerPath);
|
|
347
|
+
gqlAst.definitions.forEach(def => {
|
|
348
|
+
generateQueryName({
|
|
349
|
+
def,
|
|
350
|
+
hash,
|
|
351
|
+
file,
|
|
352
|
+
queryType: isConfigQuery ? `config` : `page`
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
let templateLoc;
|
|
356
|
+
innerPath.traverse({
|
|
357
|
+
TemplateElement(templateElementPath) {
|
|
358
|
+
templateLoc = templateElementPath.node.loc;
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
const docInFile = {
|
|
362
|
+
filePath: file,
|
|
363
|
+
doc: gqlAst,
|
|
364
|
+
text: text,
|
|
365
|
+
hash: hash,
|
|
366
|
+
isStaticQuery: false,
|
|
367
|
+
isConfigQuery,
|
|
368
|
+
isHook: false,
|
|
369
|
+
templateLoc
|
|
370
|
+
};
|
|
371
|
+
documentLocations.set(docInFile, `${innerPath.node.start}-${gqlAst.loc.start}`);
|
|
372
|
+
documents.push(docInFile);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// When a component has a StaticQuery we scan all of its exports and follow those exported variables
|
|
376
|
+
// to determine if they lead to this static query (via tagged template literal)
|
|
377
|
+
(0, _traverse.default)(ast, {
|
|
378
|
+
ExportNamedDeclaration(path, state) {
|
|
379
|
+
// Skipping the edge case of re-exporting (i.e. "export { bar } from 'Bar'")
|
|
380
|
+
// (it is handled elsewhere for queries, see usages of warnForUnknownQueryVariable)
|
|
381
|
+
if (path.node.source) {
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
path.traverse({
|
|
385
|
+
TaggedTemplateExpression,
|
|
386
|
+
ExportSpecifier(path) {
|
|
387
|
+
var _binding$path2;
|
|
388
|
+
const binding = followVariableDeclarations(path.scope.getBinding(path.node.local.name));
|
|
389
|
+
binding === null || binding === void 0 ? void 0 : (_binding$path2 = binding.path) === null || _binding$path2 === void 0 ? void 0 : _binding$path2.traverse({
|
|
390
|
+
TaggedTemplateExpression
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
// Remove duplicate queries
|
|
398
|
+
const uniqueQueries = _.uniqBy(documents, q => documentLocations.get(q));
|
|
399
|
+
return uniqueQueries;
|
|
400
|
+
}
|
|
401
|
+
const cache = {};
|
|
402
|
+
class FileParser {
|
|
403
|
+
constructor({
|
|
404
|
+
parentSpan
|
|
405
|
+
} = {}) {
|
|
406
|
+
this.parentSpan = parentSpan;
|
|
407
|
+
}
|
|
408
|
+
async parseFile(file, addError) {
|
|
409
|
+
let text;
|
|
410
|
+
const cleanFilepath = (0, _gatsbyCoreUtils.getPathToLayoutComponent)(file);
|
|
411
|
+
try {
|
|
412
|
+
text = await fs.readFile(cleanFilepath, `utf8`);
|
|
413
|
+
} catch (err) {
|
|
414
|
+
addError({
|
|
415
|
+
id: `85913`,
|
|
416
|
+
filePath: file,
|
|
417
|
+
context: {
|
|
418
|
+
filePath: file
|
|
419
|
+
},
|
|
420
|
+
error: err
|
|
421
|
+
});
|
|
422
|
+
store.dispatch(actions.queryExtractionGraphQLError({
|
|
423
|
+
componentPath: file
|
|
424
|
+
}));
|
|
425
|
+
return null;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// We do a quick check so we can exit early if this is a file we're not interested in.
|
|
429
|
+
// We only process files that include the APIs below
|
|
430
|
+
if (!text.includes(`graphql`) && !text.includes(`gatsby-plugin-image`) && !text.includes(`getServerData`) && !text.includes(`config`) && !text.includes(`Slice`) && !text.includes(`Head`)) {
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
433
|
+
const hash = await (0, _gatsbyCoreUtils.md5)(file + text);
|
|
434
|
+
try {
|
|
435
|
+
if (!cache[hash]) {
|
|
436
|
+
const ast = await parseToAst(file, text, {
|
|
437
|
+
parentSpan: this.parentSpan,
|
|
438
|
+
addError
|
|
439
|
+
});
|
|
440
|
+
cache[hash] = {
|
|
441
|
+
astDefinitions: await findGraphQLTags(file, ast, {
|
|
442
|
+
parentSpan: this.parentSpan,
|
|
443
|
+
addError
|
|
444
|
+
}),
|
|
445
|
+
serverData: findApiExport(ast, `getServerData`),
|
|
446
|
+
config: findApiExport(ast, `config`),
|
|
447
|
+
Head: findApiExport(ast, `Head`),
|
|
448
|
+
pageSlices: (0, _findSlices.collectSlices)(ast, file)
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
const {
|
|
452
|
+
astDefinitions,
|
|
453
|
+
serverData,
|
|
454
|
+
config,
|
|
455
|
+
Head,
|
|
456
|
+
pageSlices
|
|
457
|
+
} = cache[hash];
|
|
458
|
+
|
|
459
|
+
// Note: we should dispatch this action even when getServerData is not found
|
|
460
|
+
// (maybe it was set before, so now we need to reset renderMode from SSR to the default one)
|
|
461
|
+
store.dispatch({
|
|
462
|
+
type: `SET_COMPONENT_FEATURES`,
|
|
463
|
+
payload: {
|
|
464
|
+
componentPath: file,
|
|
465
|
+
serverData,
|
|
466
|
+
config,
|
|
467
|
+
Head
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
|
|
471
|
+
// If any AST definitions were extracted, report success.
|
|
472
|
+
// This can mean there is none or there was a babel error when
|
|
473
|
+
// we tried to extract the graphql AST.
|
|
474
|
+
if (astDefinitions.length > 0) {
|
|
475
|
+
store.dispatch(actions.queryExtractedBabelSuccess({
|
|
476
|
+
componentPath: file
|
|
477
|
+
}));
|
|
478
|
+
}
|
|
479
|
+
return {
|
|
480
|
+
astDefinitions,
|
|
481
|
+
pageSlices
|
|
482
|
+
};
|
|
483
|
+
} catch (err) {
|
|
484
|
+
// default error
|
|
485
|
+
let structuredError = {
|
|
486
|
+
id: `85915`,
|
|
487
|
+
context: {
|
|
488
|
+
filePath: file
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
if (err instanceof StringInterpolationNotAllowedError) {
|
|
492
|
+
const location = {
|
|
493
|
+
start: err.interpolationStart,
|
|
494
|
+
end: err.interpolationEnd
|
|
495
|
+
};
|
|
496
|
+
structuredError = {
|
|
497
|
+
id: `85916`,
|
|
498
|
+
location,
|
|
499
|
+
context: {
|
|
500
|
+
codeFrame: (0, _codeFrame.codeFrameColumns)(text, location, {
|
|
501
|
+
highlightCode: process.env.FORCE_COLOR !== `0`
|
|
502
|
+
})
|
|
503
|
+
}
|
|
504
|
+
};
|
|
505
|
+
} else if (err instanceof EmptyGraphQLTagError) {
|
|
506
|
+
const location = err.templateLoc ? {
|
|
507
|
+
start: err.templateLoc.start,
|
|
508
|
+
end: err.templateLoc.end
|
|
509
|
+
} : null;
|
|
510
|
+
structuredError = {
|
|
511
|
+
id: `85917`,
|
|
512
|
+
location,
|
|
513
|
+
context: {
|
|
514
|
+
codeFrame: location ? (0, _codeFrame.codeFrameColumns)(text, location, {
|
|
515
|
+
highlightCode: process.env.FORCE_COLOR !== `0`
|
|
516
|
+
}) : null
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
} else if (err instanceof GraphQLSyntaxError) {
|
|
520
|
+
const location = {
|
|
521
|
+
start: (0, _errorParser.locInGraphQlToLocInFile)(err.templateLoc, err.originalError.locations[0])
|
|
522
|
+
};
|
|
523
|
+
structuredError = {
|
|
524
|
+
id: `85918`,
|
|
525
|
+
location,
|
|
526
|
+
context: {
|
|
527
|
+
codeFrame: location ? (0, _codeFrame.codeFrameColumns)(text, location, {
|
|
528
|
+
highlightCode: process.env.FORCE_COLOR !== `0`,
|
|
529
|
+
message: err.originalError.message
|
|
530
|
+
}) : null,
|
|
531
|
+
sourceMessage: err.originalError.message
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
} else if (err instanceof ExportIsNotAsyncError) {
|
|
535
|
+
const location = {
|
|
536
|
+
start: err.exportStart,
|
|
537
|
+
end: err.exportStart
|
|
538
|
+
};
|
|
539
|
+
structuredError = {
|
|
540
|
+
id: `85929`,
|
|
541
|
+
location,
|
|
542
|
+
context: {
|
|
543
|
+
exportName: err.exportName,
|
|
544
|
+
codeFrame: (0, _codeFrame.codeFrameColumns)(text, location, {
|
|
545
|
+
highlightCode: process.env.FORCE_COLOR !== `0`
|
|
546
|
+
})
|
|
547
|
+
}
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
addError({
|
|
551
|
+
...structuredError,
|
|
552
|
+
filePath: file
|
|
553
|
+
});
|
|
554
|
+
store.dispatch(actions.queryExtractionGraphQLError({
|
|
555
|
+
componentPath: file
|
|
556
|
+
}));
|
|
557
|
+
return null;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
async parseFiles(files, addError) {
|
|
561
|
+
const documents = [];
|
|
562
|
+
const pageSliceUsage = new Map();
|
|
563
|
+
return Promise.all(files.map(file => this.parseFile(file, addError).then(results => {
|
|
564
|
+
if (results) {
|
|
565
|
+
const {
|
|
566
|
+
astDefinitions,
|
|
567
|
+
pageSlices
|
|
568
|
+
} = results;
|
|
569
|
+
documents.push(...(astDefinitions || []));
|
|
570
|
+
if (pageSlices) {
|
|
571
|
+
pageSliceUsage.set(file, pageSlices);
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}))).then(() => {
|
|
575
|
+
store.dispatch({
|
|
576
|
+
type: `SET_COMPONENTS_USING_PAGE_SLICES`,
|
|
577
|
+
payload: pageSliceUsage
|
|
578
|
+
});
|
|
579
|
+
return documents;
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
exports.default = FileParser;
|
|
584
|
+
//# sourceMappingURL=file-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-parser.js","names":["fs","require","crypto","_","slugify","getGraphQLTag","StringInterpolationNotAllowedError","EmptyGraphQLTagError","GraphQLSyntaxError","ExportIsNotAsyncError","isWithinConfigExport","report","apiRunnerNode","actions","store","generateQueryName","def","hash","file","queryType","name","value","slugified","replacement","lower","camelCase","kind","followVariableDeclarations","binding","node","path","type","id","init","scope","getBinding","referencesGatsby","callee","calleeName","referencesImport","declaration","arguments","isUseStaticQuery","property","get","object","warnForUnknownQueryVariable","varName","usageFunction","warn","parseToAst","filePath","fileStr","parentSpan","addError","ast","cleanFilePath","getPathToLayoutComponent","transpiled","filename","contents","length","item","tmp","babelParseToAst","error","undefined","context","dispatch","queryExtractionGraphQLError","componentPath","queryExtractionBabelError","panicOnGlobalTag","panicOnBuild","findApiExport","api","hasExport","apiToFind","traverse","ExportNamedDeclaration","t","isExportNamedDeclaration","specifiers","some","specifier","isExportSpecifier","isIdentifier","exported","apiToCheck","isFunctionDeclaration","isVariableDeclaration","declarations","findGraphQLTags","documents","documentLocations","WeakMap","extractStaticQuery","taggedTemplateExpressPath","isHook","gqlAst","text","isGlobal","definitions","forEach","templateLoc","TemplateElement","templateElementPath","loc","docInFile","doc","isStaticQuery","isConfigQuery","set","start","push","JSXElement","openingElement","JSXAttribute","jsxPath","TaggedTemplateExpression","templatePath","Identifier","identifierPath","found","VariableDeclarator","varPath","CallExpression","hookPath","firstArg","isTaggedTemplateExpression","innerPath","state","source","ExportSpecifier","local","uniqueQueries","uniqBy","q","cache","FileParser","constructor","parseFile","cleanFilepath","readFile","err","includes","md5","astDefinitions","serverData","config","Head","pageSlices","collectSlices","payload","queryExtractedBabelSuccess","structuredError","location","interpolationStart","end","interpolationEnd","codeFrame","codeFrameColumns","highlightCode","process","env","FORCE_COLOR","locInGraphQlToLocInFile","originalError","locations","message","sourceMessage","exportStart","exportName","parseFiles","files","pageSliceUsage","Map","Promise","all","map","then","results"],"sources":["../../src/query/file-parser.js"],"sourcesContent":["/* eslint-disable no-unused-expressions */\n// @flow\nconst fs = require(`fs-extra`)\nconst crypto = require(`crypto`)\nconst _ = require(`lodash`)\nconst slugify = require(`slugify`)\n\n// Traverse is a es6 module...\nimport traverse from \"@babel/traverse\"\nimport * as t from \"@babel/types\"\nconst {\n getGraphQLTag,\n StringInterpolationNotAllowedError,\n EmptyGraphQLTagError,\n GraphQLSyntaxError,\n ExportIsNotAsyncError,\n isWithinConfigExport,\n} = require(`babel-plugin-remove-graphql-queries`)\nimport { collectSlices } from \"../utils/babel/find-slices\"\n\nconst report = require(`gatsby-cli/lib/reporter`)\n\nimport type { DocumentNode } from \"graphql\"\nimport { babelParseToAst } from \"../utils/babel-parse-to-ast\"\nimport { codeFrameColumns } from \"@babel/code-frame\"\nimport { getPathToLayoutComponent, md5 } from \"gatsby-core-utils\"\n\nconst apiRunnerNode = require(`../utils/api-runner-node`)\nconst { actions } = require(`../redux/actions`)\nconst { store } = require(`../redux`)\nimport { locInGraphQlToLocInFile } from \"./error-parser\"\n/**\n * Add autogenerated query name if it wasn't defined by user.\n */\nconst generateQueryName = ({ def, hash, file, queryType }) => {\n if (!def.name || !def.name.value) {\n const slugified = slugify(file, {\n replacement: ` `,\n lower: false,\n })\n def.name = {\n value: `${_.camelCase(`${queryType}-${slugified}-${hash}`)}`,\n kind: `Name`,\n }\n }\n return def\n}\n\n// taken from `babel-plugin-remove-graphql-queries`, in the future import from\n// there\nfunction followVariableDeclarations(binding) {\n const node = binding?.path?.node\n if (\n node?.type === `VariableDeclarator` &&\n node?.id.type === `Identifier` &&\n node?.init?.type === `Identifier`\n ) {\n return followVariableDeclarations(\n binding.path.scope.getBinding(node.init.name)\n )\n }\n return binding\n}\n\nfunction referencesGatsby(path, callee, calleeName) {\n // This works for es6 imports\n if (callee.referencesImport(`gatsby`, ``)) {\n return true\n } else {\n // This finds where userStaticQuery was declared and then checks\n // if it is a \"require\" and \"gatsby\" is the argument.\n const declaration = path.scope.getBinding(calleeName)\n if (\n declaration &&\n declaration.path.node.init?.callee.name === `require` &&\n declaration.path.node.init.arguments[0].value === `gatsby`\n ) {\n return true\n } else {\n return false\n }\n }\n}\n\nfunction isUseStaticQuery(path) {\n const callee = path.node.callee\n if (callee.type === `MemberExpression`) {\n const property = callee.property\n if (property.name === `useStaticQuery`) {\n return referencesGatsby(\n path,\n path.get(`callee`).get(`object`),\n path.node?.callee.object.name\n )\n }\n return false\n }\n if (callee.name === `useStaticQuery`) {\n return referencesGatsby(path, path.get(`callee`), path.node?.callee.name)\n }\n return false\n}\n\nconst warnForUnknownQueryVariable = (varName, file, usageFunction) =>\n report.warn(\n `\\nWe were unable to find the declaration of variable \"${varName}\", which you passed as the \"query\" prop into the ${usageFunction} declaration in \"${file}\".\n\nPerhaps the variable name has a typo?\n\nAlso note that we are currently unable to use queries defined in files other than the file where the ${usageFunction} is defined. If you're attempting to import the query, please move it into \"${file}\". If being able to import queries from another file is an important capability for you, we invite your help fixing it.\\n`\n )\n\nasync function parseToAst(filePath, fileStr, { parentSpan, addError } = {}) {\n let ast\n\n // Since gatsby-plugin-mdx v4, we are using the resourceQuery feature of webpack's loaders to inject a content file into a page component.\n const cleanFilePath = getPathToLayoutComponent(filePath)\n\n // Preprocess and attempt to parse source; return an AST if we can, log an\n // error if we can't.\n const transpiled = await apiRunnerNode(`preprocessSource`, {\n filename: cleanFilePath,\n contents: fileStr,\n parentSpan,\n })\n\n if (transpiled && transpiled.length) {\n for (const item of transpiled) {\n try {\n const tmp = babelParseToAst(item, cleanFilePath)\n ast = tmp\n break\n } catch (error) {\n // We emit the actual error below if every transpiled variant fails to parse\n }\n }\n if (ast === undefined) {\n addError({\n id: `85912`,\n filePath: cleanFilePath,\n context: {\n filePath,\n },\n })\n store.dispatch(\n actions.queryExtractionGraphQLError({\n componentPath: cleanFilePath,\n })\n )\n\n return null\n }\n } else {\n try {\n ast = babelParseToAst(fileStr, cleanFilePath)\n } catch (error) {\n store.dispatch(\n actions.queryExtractionBabelError({\n componentPath: cleanFilePath,\n error,\n })\n )\n\n addError({\n id: `85911`,\n filePath: cleanFilePath,\n context: {\n filePath: cleanFilePath,\n },\n })\n\n return null\n }\n }\n\n return ast\n}\n\nconst panicOnGlobalTag = file =>\n report.panicOnBuild(\n `Using the global \\`graphql\\` tag for Gatsby's queries isn't supported as of v3.\\n` +\n `Import it instead like: import { graphql } from 'gatsby' in file:\\n` +\n file\n )\n\ntype GraphQLDocumentInFile = {\n filePath: string,\n doc: DocumentNode,\n templateLoc: string,\n text: string,\n hash: string,\n isHook: boolean,\n isStaticQuery: boolean,\n}\n\n// Adapted from gatsby/src/utils/babel/babel-plugin-remove-api\nfunction findApiExport(ast, api) {\n let hasExport = false\n const apiToFind = api ?? ``\n\n traverse(ast, {\n ExportNamedDeclaration(path) {\n const declaration = path.node.declaration\n\n if (t.isExportNamedDeclaration(path.node) && !hasExport) {\n hasExport = path.node.specifiers.some(\n specifier =>\n t.isExportSpecifier(specifier) &&\n t.isIdentifier(specifier.exported) &&\n specifier.exported.name === apiToFind\n )\n }\n\n let apiToCheck\n if (t.isFunctionDeclaration(declaration) && declaration.id) {\n apiToCheck = declaration.id.name\n }\n\n if (\n t.isVariableDeclaration(declaration) &&\n t.isIdentifier(declaration.declarations[0].id)\n ) {\n apiToCheck = declaration.declarations[0].id.name\n }\n\n if (apiToCheck && apiToCheck === apiToFind) {\n hasExport = true\n }\n },\n })\n\n return hasExport\n}\n\nasync function findGraphQLTags(\n file,\n ast,\n { parentSpan, addError } = {}\n): Promise<Array<GraphQLDocumentInFile>> {\n const documents = []\n if (!ast) {\n return documents\n }\n\n /**\n * A map of graphql documents to unique locations.\n *\n * A graphql document's unique location is made of:\n *\n * - the location of the graphql template literal that contains the document, and\n * - the document's location within the graphql template literal\n *\n * This is used to prevent returning duplicated documents.\n */\n const documentLocations = new WeakMap()\n\n const extractStaticQuery = (taggedTemplateExpressPath, isHook = false) => {\n const {\n ast: gqlAst,\n text,\n hash,\n isGlobal,\n } = getGraphQLTag(taggedTemplateExpressPath)\n if (!gqlAst) return\n\n if (isGlobal) {\n panicOnGlobalTag(file)\n return\n }\n\n gqlAst.definitions.forEach(def => {\n generateQueryName({\n def,\n hash,\n file,\n queryType: `static`,\n })\n })\n\n let templateLoc\n\n taggedTemplateExpressPath.traverse({\n TemplateElement(templateElementPath) {\n templateLoc = templateElementPath.node.loc\n },\n })\n\n const docInFile = {\n filePath: file,\n doc: gqlAst,\n text: text,\n hash: hash,\n isStaticQuery: true,\n isConfigQuery: false,\n isHook,\n templateLoc,\n }\n\n documentLocations.set(\n docInFile,\n `${taggedTemplateExpressPath.node.start}-${gqlAst.loc.start}`\n )\n\n documents.push(docInFile)\n }\n\n // Look for queries in <StaticQuery /> elements.\n traverse(ast, {\n JSXElement(path) {\n if (path.node.openingElement.name.name !== `StaticQuery`) {\n return\n }\n\n // astexplorer.com link I (@kyleamathews) used when prototyping this algorithm\n // https://astexplorer.net/#/gist/ab5d71c0f08f287fbb840bf1dd8b85ff/2f188345d8e5a4152fe7c96f0d52dbcc6e9da466\n path.traverse({\n JSXAttribute(jsxPath) {\n if (jsxPath.node.name.name !== `query`) {\n return\n }\n jsxPath.traverse({\n // Assume the query is inline in the component and extract that.\n TaggedTemplateExpression(templatePath) {\n extractStaticQuery(templatePath)\n },\n // Also see if it's a variable that's passed in as a prop\n // and if it is, go find it.\n Identifier(identifierPath) {\n if (identifierPath.node.name !== `graphql`) {\n const varName = identifierPath.node.name\n let found = false\n traverse(ast, {\n VariableDeclarator(varPath) {\n if (\n varPath.node.id.name === varName &&\n varPath.node.init.type === `TaggedTemplateExpression`\n ) {\n varPath.traverse({\n TaggedTemplateExpression(templatePath) {\n found = true\n extractStaticQuery(templatePath)\n },\n })\n }\n },\n })\n if (!found) {\n warnForUnknownQueryVariable(varName, file, `<StaticQuery>`)\n }\n }\n },\n })\n },\n })\n return\n },\n })\n\n // Look for queries in useStaticQuery hooks.\n traverse(ast, {\n CallExpression(hookPath) {\n if (!isUseStaticQuery(hookPath)) return\n\n const firstArg = hookPath.get(`arguments`)[0]\n\n // Assume the query is inline in the component and extract that.\n if (firstArg.isTaggedTemplateExpression()) {\n extractStaticQuery(firstArg, true)\n // Also see if it's a variable that's passed in as a prop\n // and if it is, go find it.\n } else if (firstArg.isIdentifier()) {\n if (\n firstArg.node.name !== `graphql` &&\n firstArg.node.name !== `useStaticQuery`\n ) {\n const varName = firstArg.node.name\n let found = false\n traverse(ast, {\n VariableDeclarator(varPath) {\n if (\n varPath.node.id.name === varName &&\n varPath.node.init.type === `TaggedTemplateExpression`\n ) {\n varPath.traverse({\n TaggedTemplateExpression(templatePath) {\n found = true\n extractStaticQuery(templatePath, true)\n },\n })\n }\n },\n })\n if (!found) {\n warnForUnknownQueryVariable(varName, file, `useStaticQuery`)\n }\n }\n }\n },\n })\n\n function TaggedTemplateExpression(innerPath) {\n const { ast: gqlAst, isGlobal, hash, text } = getGraphQLTag(innerPath)\n if (!gqlAst) return\n\n if (isGlobal) {\n panicOnGlobalTag(file)\n return\n }\n\n const isConfigQuery = isWithinConfigExport(innerPath)\n\n gqlAst.definitions.forEach(def => {\n generateQueryName({\n def,\n hash,\n file,\n queryType: isConfigQuery ? `config` : `page`,\n })\n })\n\n let templateLoc\n innerPath.traverse({\n TemplateElement(templateElementPath) {\n templateLoc = templateElementPath.node.loc\n },\n })\n\n const docInFile = {\n filePath: file,\n doc: gqlAst,\n text: text,\n hash: hash,\n isStaticQuery: false,\n isConfigQuery,\n isHook: false,\n templateLoc,\n }\n\n documentLocations.set(\n docInFile,\n `${innerPath.node.start}-${gqlAst.loc.start}`\n )\n\n documents.push(docInFile)\n }\n\n // When a component has a StaticQuery we scan all of its exports and follow those exported variables\n // to determine if they lead to this static query (via tagged template literal)\n traverse(ast, {\n ExportNamedDeclaration(path, state) {\n // Skipping the edge case of re-exporting (i.e. \"export { bar } from 'Bar'\")\n // (it is handled elsewhere for queries, see usages of warnForUnknownQueryVariable)\n if (path.node.source) {\n return\n }\n path.traverse({\n TaggedTemplateExpression,\n ExportSpecifier(path) {\n const binding = followVariableDeclarations(\n path.scope.getBinding(path.node.local.name)\n )\n binding?.path?.traverse({ TaggedTemplateExpression })\n },\n })\n },\n })\n\n // Remove duplicate queries\n const uniqueQueries = _.uniqBy(documents, q => documentLocations.get(q))\n\n return uniqueQueries\n}\n\ntype CollectedSlice = {\n name: string,\n allowEmpty: boolean,\n}\n\nconst cache = {}\n\nexport default class FileParser {\n constructor({ parentSpan } = {}) {\n this.parentSpan = parentSpan\n }\n\n async parseFile(\n file: string,\n addError\n ): Promise<{\n astDefinitions: ?Array<GraphQLDocumentInFile>,\n pageSlices: { [key: string]: CollectedSlice } | null,\n }> {\n let text\n const cleanFilepath = getPathToLayoutComponent(file)\n try {\n text = await fs.readFile(cleanFilepath, `utf8`)\n } catch (err) {\n addError({\n id: `85913`,\n filePath: file,\n context: {\n filePath: file,\n },\n error: err,\n })\n\n store.dispatch(\n actions.queryExtractionGraphQLError({\n componentPath: file,\n })\n )\n return null\n }\n\n // We do a quick check so we can exit early if this is a file we're not interested in.\n // We only process files that include the APIs below\n if (\n !text.includes(`graphql`) &&\n !text.includes(`gatsby-plugin-image`) &&\n !text.includes(`getServerData`) &&\n !text.includes(`config`) &&\n !text.includes(`Slice`) &&\n !text.includes(`Head`)\n ) {\n return null\n }\n\n const hash = await md5(file + text)\n\n try {\n if (!cache[hash]) {\n const ast = await parseToAst(file, text, {\n parentSpan: this.parentSpan,\n addError,\n })\n\n cache[hash] = {\n astDefinitions: await findGraphQLTags(file, ast, {\n parentSpan: this.parentSpan,\n addError,\n }),\n serverData: findApiExport(ast, `getServerData`),\n config: findApiExport(ast, `config`),\n Head: findApiExport(ast, `Head`),\n pageSlices: collectSlices(ast, file),\n }\n }\n const { astDefinitions, serverData, config, Head, pageSlices } =\n cache[hash]\n\n // Note: we should dispatch this action even when getServerData is not found\n // (maybe it was set before, so now we need to reset renderMode from SSR to the default one)\n store.dispatch({\n type: `SET_COMPONENT_FEATURES`,\n payload: {\n componentPath: file,\n serverData,\n config,\n Head,\n },\n })\n\n // If any AST definitions were extracted, report success.\n // This can mean there is none or there was a babel error when\n // we tried to extract the graphql AST.\n if (astDefinitions.length > 0) {\n store.dispatch(\n actions.queryExtractedBabelSuccess({\n componentPath: file,\n })\n )\n }\n\n return { astDefinitions, pageSlices }\n } catch (err) {\n // default error\n let structuredError = {\n id: `85915`,\n context: {\n filePath: file,\n },\n }\n\n if (err instanceof StringInterpolationNotAllowedError) {\n const location = {\n start: err.interpolationStart,\n end: err.interpolationEnd,\n }\n structuredError = {\n id: `85916`,\n location,\n context: {\n codeFrame: codeFrameColumns(text, location, {\n highlightCode: process.env.FORCE_COLOR !== `0`,\n }),\n },\n }\n } else if (err instanceof EmptyGraphQLTagError) {\n const location = err.templateLoc\n ? {\n start: err.templateLoc.start,\n end: err.templateLoc.end,\n }\n : null\n\n structuredError = {\n id: `85917`,\n location,\n context: {\n codeFrame: location\n ? codeFrameColumns(text, location, {\n highlightCode: process.env.FORCE_COLOR !== `0`,\n })\n : null,\n },\n }\n } else if (err instanceof GraphQLSyntaxError) {\n const location = {\n start: locInGraphQlToLocInFile(\n err.templateLoc,\n err.originalError.locations[0]\n ),\n }\n\n structuredError = {\n id: `85918`,\n location,\n context: {\n codeFrame: location\n ? codeFrameColumns(text, location, {\n highlightCode: process.env.FORCE_COLOR !== `0`,\n message: err.originalError.message,\n })\n : null,\n sourceMessage: err.originalError.message,\n },\n }\n } else if (err instanceof ExportIsNotAsyncError) {\n const location = {\n start: err.exportStart,\n end: err.exportStart,\n }\n structuredError = {\n id: `85929`,\n location,\n context: {\n exportName: err.exportName,\n codeFrame: codeFrameColumns(text, location, {\n highlightCode: process.env.FORCE_COLOR !== `0`,\n }),\n },\n }\n }\n\n addError({\n ...structuredError,\n filePath: file,\n })\n\n store.dispatch(\n actions.queryExtractionGraphQLError({\n componentPath: file,\n })\n )\n return null\n }\n }\n\n async parseFiles(\n files: Array<string>,\n addError\n ): Promise<Array<GraphQLDocumentInFile>> {\n const documents = []\n const pageSliceUsage = new Map()\n\n return Promise.all(\n files.map(file =>\n this.parseFile(file, addError).then(results => {\n if (results) {\n const { astDefinitions, pageSlices } = results\n documents.push(...(astDefinitions || []))\n if (pageSlices) {\n pageSliceUsage.set(file, pageSlices)\n }\n }\n })\n )\n ).then(() => {\n store.dispatch({\n type: `SET_COMPONENTS_USING_PAGE_SLICES`,\n payload: pageSliceUsage,\n })\n\n return documents\n })\n }\n}\n"],"mappings":";;;;;AAQA;AACA;AASA;AAKA;AACA;AACA;AAKA;AAAwD;AAAA;AA9BxD,0CAEA,MAAMA,EAAE,GAAGC,OAAO,CAAE,UAAS,CAAC;AAC9B,MAAMC,MAAM,GAAGD,OAAO,CAAE,QAAO,CAAC;AAChC,MAAME,CAAC,GAAGF,OAAO,CAAE,QAAO,CAAC;AAC3B,MAAMG,OAAO,GAAGH,OAAO,CAAE,SAAQ,CAAC;;AAElC;;AAGA,MAAM;EACJI,aAAa;EACbC,kCAAkC;EAClCC,oBAAoB;EACpBC,kBAAkB;EAClBC,qBAAqB;EACrBC;AACF,CAAC,GAAGT,OAAO,CAAE,qCAAoC,CAAC;AAGlD,MAAMU,MAAM,GAAGV,OAAO,CAAE,yBAAwB,CAAC;AAOjD,MAAMW,aAAa,GAAGX,OAAO,CAAE,0BAAyB,CAAC;AAC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