@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 @@
|
|
|
1
|
+
{"version":3,"file":"gatsby-ssr.js","names":["onRenderBody","pathname","setHeadComponents","collectedScripts","collectedScriptsByPage","get","length","forwards","getForwards","__html","partytownSnippet","forward","delete"],"sources":["../../../src/internal-plugins/partytown/gatsby-ssr.tsx"],"sourcesContent":["import React from \"react\"\nimport { collectedScriptsByPage } from \"gatsby-script\"\nimport { getForwards } from \"./utils/get-forwards\"\nimport { partytownSnippet } from \"@builder.io/partytown/integration\"\nimport type { GatsbySSR } from \"gatsby\"\n\nexport const onRenderBody: GatsbySSR[`onRenderBody`] = ({\n pathname,\n setHeadComponents,\n}) => {\n const collectedScripts = collectedScriptsByPage.get(pathname)\n\n if (!collectedScripts?.length) {\n return\n }\n\n const forwards = getForwards(collectedScripts)\n\n // Adapted from https://github.com/BuilderIO/partytown/blob/main/src/react/snippet.tsx to only include SSR logic\n setHeadComponents([\n <script\n key=\"partytown\"\n data-partytown=\"\"\n suppressHydrationWarning={true}\n dangerouslySetInnerHTML={{\n __html: `\n ${partytownSnippet({ forward: forwards })}\n document.currentScript.dataset.partytown=\"\"\n `,\n }}\n />,\n ])\n\n // Clear scripts after we've used them to avoid leaky behavior\n collectedScriptsByPage.delete(pathname)\n}\n"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AAGO,MAAMA,YAAuC,GAAG,CAAC;EACtDC,QAAQ;EACRC;AACF,CAAC,KAAK;EACJ,MAAMC,gBAAgB,GAAGC,oCAAsB,CAACC,GAAG,CAACJ,QAAQ,CAAC;EAE7D,IAAI,EAACE,gBAAgB,aAAhBA,gBAAgB,eAAhBA,gBAAgB,CAAEG,MAAM,GAAE;IAC7B;EACF;EAEA,MAAMC,QAAQ,GAAG,IAAAC,wBAAW,EAACL,gBAAgB,CAAC;;EAE9C;EACAD,iBAAiB,CAAC,cAChB;IACE,GAAG,EAAC,WAAW;IACf,kBAAe,EAAE;IACjB,wBAAwB,EAAE,IAAK;IAC/B,uBAAuB,EAAE;MACvBO,MAAM,EAAG;AACjB,YAAY,IAAAC,6BAAgB,EAAC;QAAEC,OAAO,EAAEJ;MAAS,CAAC,CAAE;AACpD;AACA;IACM;EAAE,EACF,CACH,CAAC;;EAEF;EACAH,oCAAsB,CAACQ,MAAM,CAACX,QAAQ,CAAC;AACzC,CAAC;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/internal-plugins/partytown/index.js"],"sourcesContent":["// noop\n"],"mappings":"AAAA;AAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"private": true,
|
|
3
|
+
"name": "partytown",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Internal plugin that handles Partytown setup",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
10
|
+
"author": "Ty Hopp <ty.hopp@gatsbyjs.com>",
|
|
11
|
+
"license": "MIT"
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.partytownProxy = partytownProxy;
|
|
6
|
+
exports.thirdPartyProxyPath = void 0;
|
|
7
|
+
var _expressHttpProxy = _interopRequireDefault(require("express-http-proxy"));
|
|
8
|
+
const thirdPartyProxyPath = `/__third-party-proxy`;
|
|
9
|
+
exports.thirdPartyProxyPath = thirdPartyProxyPath;
|
|
10
|
+
function partytownProxy(partytownProxiedURLs) {
|
|
11
|
+
return (0, _expressHttpProxy.default)(req => new URL(req.query.url).origin, {
|
|
12
|
+
filter: req => partytownProxiedURLs.some(url => {
|
|
13
|
+
var _req$query;
|
|
14
|
+
return ((_req$query = req.query) === null || _req$query === void 0 ? void 0 : _req$query.url) === url;
|
|
15
|
+
}),
|
|
16
|
+
proxyReqPathResolver: req => {
|
|
17
|
+
var _req$query2;
|
|
18
|
+
const {
|
|
19
|
+
pathname = ``,
|
|
20
|
+
search = ``
|
|
21
|
+
} = new URL((_req$query2 = req.query) === null || _req$query2 === void 0 ? void 0 : _req$query2.url);
|
|
22
|
+
return pathname + search;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=proxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.js","names":["thirdPartyProxyPath","partytownProxy","partytownProxiedURLs","proxy","req","URL","query","url","origin","filter","some","proxyReqPathResolver","pathname","search"],"sources":["../../../src/internal-plugins/partytown/proxy.ts"],"sourcesContent":["import proxy from \"express-http-proxy\"\nimport type { RequestHandler } from \"express\"\n\nexport const thirdPartyProxyPath = `/__third-party-proxy`\n\nexport function partytownProxy(\n partytownProxiedURLs: Array<string>\n): RequestHandler {\n return proxy(req => new URL(req.query.url as string).origin as string, {\n filter: req => partytownProxiedURLs.some(url => req.query?.url === url),\n proxyReqPathResolver: req => {\n const { pathname = ``, search = `` } = new URL(req.query?.url as string)\n return pathname + search\n },\n })\n}\n"],"mappings":";;;;;;AAAA;AAGO,MAAMA,mBAAmB,GAAI,sBAAqB;AAAA;AAElD,SAASC,cAAc,CAC5BC,oBAAmC,EACnB;EAChB,OAAO,IAAAC,yBAAK,EAACC,GAAG,IAAI,IAAIC,GAAG,CAACD,GAAG,CAACE,KAAK,CAACC,GAAG,CAAW,CAACC,MAAgB,EAAE;IACrEC,MAAM,EAAEL,GAAG,IAAIF,oBAAoB,CAACQ,IAAI,CAACH,GAAG;MAAA;MAAA,OAAI,eAAAH,GAAG,CAACE,KAAK,+CAAT,WAAWC,GAAG,MAAKA,GAAG;IAAA,EAAC;IACvEI,oBAAoB,EAAEP,GAAG,IAAI;MAAA;MAC3B,MAAM;QAAEQ,QAAQ,GAAI,EAAC;QAAEC,MAAM,GAAI;MAAE,CAAC,GAAG,IAAIR,GAAG,gBAACD,GAAG,CAACE,KAAK,gDAAT,YAAWC,GAAG,CAAW;MACxE,OAAOK,QAAQ,GAAGC,MAAM;IAC1B;EACF,CAAC,CAAC;AACJ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.getForwards = getForwards;
|
|
5
|
+
function getForwards(collectedScripts) {
|
|
6
|
+
return collectedScripts === null || collectedScripts === void 0 ? void 0 : collectedScripts.flatMap(script => (script === null || script === void 0 ? void 0 : script.forward) || []);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=get-forwards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-forwards.js","names":["getForwards","collectedScripts","flatMap","script","forward"],"sources":["../../../../src/internal-plugins/partytown/utils/get-forwards.ts"],"sourcesContent":["import type { ScriptProps } from \"gatsby-script\"\n\nexport function getForwards(\n collectedScripts: Array<ScriptProps>\n): Array<string> {\n return collectedScripts?.flatMap(\n (script: ScriptProps) => script?.forward || []\n )\n}\n"],"mappings":";;;;AAEO,SAASA,WAAW,CACzBC,gBAAoC,EACrB;EACf,OAAOA,gBAAgB,aAAhBA,gBAAgB,uBAAhBA,gBAAgB,CAAEC,OAAO,CAC7BC,MAAmB,IAAK,CAAAA,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEC,OAAO,KAAI,EAAE,CAC/C;AACH"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.injectPartytownSnippet = injectPartytownSnippet;
|
|
5
|
+
var _integration = require("@builder.io/partytown/integration");
|
|
6
|
+
var _getForwards = require("./get-forwards");
|
|
7
|
+
// Adapted from https://github.com/BuilderIO/partytown/blob/main/src/react/snippet.tsx to only include CSR logic
|
|
8
|
+
function injectPartytownSnippet(collectedScripts) {
|
|
9
|
+
if (!collectedScripts.length) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const existingSnippet = document.querySelector(`script[data-partytown]`);
|
|
13
|
+
const existingSandbox = document.querySelector(`iframe[src*="~partytown/partytown-sandbox-sw"]`);
|
|
14
|
+
if (existingSnippet) {
|
|
15
|
+
existingSnippet.remove();
|
|
16
|
+
}
|
|
17
|
+
if (existingSandbox) {
|
|
18
|
+
existingSandbox.remove();
|
|
19
|
+
}
|
|
20
|
+
const forwards = (0, _getForwards.getForwards)(collectedScripts);
|
|
21
|
+
const snippet = document.createElement(`script`);
|
|
22
|
+
snippet.dataset.partytown = ``;
|
|
23
|
+
snippet.innerHTML = (0, _integration.partytownSnippet)({
|
|
24
|
+
forward: forwards
|
|
25
|
+
});
|
|
26
|
+
document.head.appendChild(snippet);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=inject-partytown-snippet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject-partytown-snippet.js","names":["injectPartytownSnippet","collectedScripts","length","existingSnippet","document","querySelector","existingSandbox","remove","forwards","getForwards","snippet","createElement","dataset","partytown","innerHTML","partytownSnippet","forward","head","appendChild"],"sources":["../../../../src/internal-plugins/partytown/utils/inject-partytown-snippet.ts"],"sourcesContent":["import { partytownSnippet } from \"@builder.io/partytown/integration\"\nimport { ScriptProps } from \"gatsby-script\"\nimport { getForwards } from \"./get-forwards\"\n\n// Adapted from https://github.com/BuilderIO/partytown/blob/main/src/react/snippet.tsx to only include CSR logic\nexport function injectPartytownSnippet(\n collectedScripts: Array<ScriptProps>\n): void {\n if (!collectedScripts.length) {\n return\n }\n\n const existingSnippet = document.querySelector(`script[data-partytown]`)\n const existingSandbox = document.querySelector(\n `iframe[src*=\"~partytown/partytown-sandbox-sw\"]`\n )\n\n if (existingSnippet) {\n existingSnippet.remove()\n }\n\n if (existingSandbox) {\n existingSandbox.remove()\n }\n\n const forwards = getForwards(collectedScripts)\n\n const snippet = document.createElement(`script`)\n snippet.dataset.partytown = ``\n snippet.innerHTML = partytownSnippet({ forward: forwards })\n document.head.appendChild(snippet)\n}\n"],"mappings":";;;;AAAA;AAEA;AAEA;AACO,SAASA,sBAAsB,CACpCC,gBAAoC,EAC9B;EACN,IAAI,CAACA,gBAAgB,CAACC,MAAM,EAAE;IAC5B;EACF;EAEA,MAAMC,eAAe,GAAGC,QAAQ,CAACC,aAAa,CAAE,wBAAuB,CAAC;EACxE,MAAMC,eAAe,GAAGF,QAAQ,CAACC,aAAa,CAC3C,gDAA+C,CACjD;EAED,IAAIF,eAAe,EAAE;IACnBA,eAAe,CAACI,MAAM,EAAE;EAC1B;EAEA,IAAID,eAAe,EAAE;IACnBA,eAAe,CAACC,MAAM,EAAE;EAC1B;EAEA,MAAMC,QAAQ,GAAG,IAAAC,wBAAW,EAACR,gBAAgB,CAAC;EAE9C,MAAMS,OAAO,GAAGN,QAAQ,CAACO,aAAa,CAAE,QAAO,CAAC;EAChDD,OAAO,CAACE,OAAO,CAACC,SAAS,GAAI,EAAC;EAC9BH,OAAO,CAACI,SAAS,GAAG,IAAAC,6BAAgB,EAAC;IAAEC,OAAO,EAAER;EAAS,CAAC,CAAC;EAC3DJ,QAAQ,CAACa,IAAI,CAACC,WAAW,CAACR,OAAO,CAAC;AACpC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const isEqual = require(`lodash/isEqual`);
|
|
4
|
+
const {
|
|
5
|
+
emitter,
|
|
6
|
+
store
|
|
7
|
+
} = require(`../../redux`);
|
|
8
|
+
const {
|
|
9
|
+
actions
|
|
10
|
+
} = require(`../../redux/actions`);
|
|
11
|
+
const originalStatusPageByStatus = {};
|
|
12
|
+
const originalStatusPageByPath = {};
|
|
13
|
+
emitter.on(`CREATE_PAGE`, action => {
|
|
14
|
+
// Copy /404/ to /404.html and /500/ to /500.html. Many static site hosts expect
|
|
15
|
+
// site 404 pages to be named this. In addition, with Rendering Engines there might
|
|
16
|
+
// be runtime errors which would fallback to "/500.html" page.
|
|
17
|
+
// https://www.gatsbyjs.com/docs/how-to/adding-common-features/add-404-page/
|
|
18
|
+
const result = /^\/?(404|500)\/?$/.exec(action.payload.path);
|
|
19
|
+
if (result && result.length > 1) {
|
|
20
|
+
const status = result[1];
|
|
21
|
+
const originalPage = originalStatusPageByStatus[status];
|
|
22
|
+
const pageToStore = {
|
|
23
|
+
path: action.payload.path,
|
|
24
|
+
component: action.payload.component,
|
|
25
|
+
context: action.payload.context,
|
|
26
|
+
slices: action.payload.slices,
|
|
27
|
+
status
|
|
28
|
+
};
|
|
29
|
+
if (!originalPage || !isEqual(originalPage, pageToStore)) {
|
|
30
|
+
originalStatusPageByStatus[status] = pageToStore;
|
|
31
|
+
originalStatusPageByPath[action.payload.path] = pageToStore;
|
|
32
|
+
store.dispatch(actions.createPage({
|
|
33
|
+
...pageToStore,
|
|
34
|
+
path: `/${status}.html`
|
|
35
|
+
}, action.plugin, action));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
emitter.on(`DELETE_PAGE`, action => {
|
|
40
|
+
const storedPage = originalStatusPageByPath[action.payload.path];
|
|
41
|
+
if (storedPage) {
|
|
42
|
+
store.dispatch(actions.deletePage({
|
|
43
|
+
...storedPage,
|
|
44
|
+
path: `/${storedPage.status}.html`
|
|
45
|
+
}));
|
|
46
|
+
originalStatusPageByPath[action.payload.path] = null;
|
|
47
|
+
originalStatusPageByStatus[storedPage.status] = null;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=gatsby-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gatsby-node.js","names":["isEqual","require","emitter","store","actions","originalStatusPageByStatus","originalStatusPageByPath","on","action","result","exec","payload","path","length","status","originalPage","pageToStore","component","context","slices","dispatch","createPage","plugin","storedPage","deletePage"],"sources":["../../../src/internal-plugins/prod-404-500/gatsby-node.js"],"sourcesContent":["const isEqual = require(`lodash/isEqual`)\n\nconst { emitter, store } = require(`../../redux`)\nconst { actions } = require(`../../redux/actions`)\n\nconst originalStatusPageByStatus = {}\nconst originalStatusPageByPath = {}\n\nemitter.on(`CREATE_PAGE`, action => {\n // Copy /404/ to /404.html and /500/ to /500.html. Many static site hosts expect\n // site 404 pages to be named this. In addition, with Rendering Engines there might\n // be runtime errors which would fallback to \"/500.html\" page.\n // https://www.gatsbyjs.com/docs/how-to/adding-common-features/add-404-page/\n const result = /^\\/?(404|500)\\/?$/.exec(action.payload.path)\n if (result && result.length > 1) {\n const status = result[1]\n\n const originalPage = originalStatusPageByStatus[status]\n\n const pageToStore = {\n path: action.payload.path,\n component: action.payload.component,\n context: action.payload.context,\n slices: action.payload.slices,\n status,\n }\n\n if (!originalPage || !isEqual(originalPage, pageToStore)) {\n originalStatusPageByStatus[status] = pageToStore\n originalStatusPageByPath[action.payload.path] = pageToStore\n\n store.dispatch(\n actions.createPage(\n {\n ...pageToStore,\n path: `/${status}.html`,\n },\n action.plugin,\n action\n )\n )\n }\n }\n})\n\nemitter.on(`DELETE_PAGE`, action => {\n const storedPage = originalStatusPageByPath[action.payload.path]\n if (storedPage) {\n store.dispatch(\n actions.deletePage({\n ...storedPage,\n path: `/${storedPage.status}.html`,\n })\n )\n originalStatusPageByPath[action.payload.path] = null\n originalStatusPageByStatus[storedPage.status] = null\n }\n})\n"],"mappings":";;AAAA,MAAMA,OAAO,GAAGC,OAAO,CAAE,gBAAe,CAAC;AAEzC,MAAM;EAAEC,OAAO;EAAEC;AAAM,CAAC,GAAGF,OAAO,CAAE,aAAY,CAAC;AACjD,MAAM;EAAEG;AAAQ,CAAC,GAAGH,OAAO,CAAE,qBAAoB,CAAC;AAElD,MAAMI,0BAA0B,GAAG,CAAC,CAAC;AACrC,MAAMC,wBAAwB,GAAG,CAAC,CAAC;AAEnCJ,OAAO,CAACK,EAAE,CAAE,aAAY,EAAEC,MAAM,IAAI;EAClC;EACA;EACA;EACA;EACA,MAAMC,MAAM,GAAG,mBAAmB,CAACC,IAAI,CAACF,MAAM,CAACG,OAAO,CAACC,IAAI,CAAC;EAC5D,IAAIH,MAAM,IAAIA,MAAM,CAACI,MAAM,GAAG,CAAC,EAAE;IAC/B,MAAMC,MAAM,GAAGL,MAAM,CAAC,CAAC,CAAC;IAExB,MAAMM,YAAY,GAAGV,0BAA0B,CAACS,MAAM,CAAC;IAEvD,MAAME,WAAW,GAAG;MAClBJ,IAAI,EAAEJ,MAAM,CAACG,OAAO,CAACC,IAAI;MACzBK,SAAS,EAAET,MAAM,CAACG,OAAO,CAACM,SAAS;MACnCC,OAAO,EAAEV,MAAM,CAACG,OAAO,CAACO,OAAO;MAC/BC,MAAM,EAAEX,MAAM,CAACG,OAAO,CAACQ,MAAM;MAC7BL;IACF,CAAC;IAED,IAAI,CAACC,YAAY,IAAI,CAACf,OAAO,CAACe,YAAY,EAAEC,WAAW,CAAC,EAAE;MACxDX,0BAA0B,CAACS,MAAM,CAAC,GAAGE,WAAW;MAChDV,wBAAwB,CAACE,MAAM,CAACG,OAAO,CAACC,IAAI,CAAC,GAAGI,WAAW;MAE3Db,KAAK,CAACiB,QAAQ,CACZhB,OAAO,CAACiB,UAAU,CAChB;QACE,GAAGL,WAAW;QACdJ,IAAI,EAAG,IAAGE,MAAO;MACnB,CAAC,EACDN,MAAM,CAACc,MAAM,EACbd,MAAM,CACP,CACF;IACH;EACF;AACF,CAAC,CAAC;AAEFN,OAAO,CAACK,EAAE,CAAE,aAAY,EAAEC,MAAM,IAAI;EAClC,MAAMe,UAAU,GAAGjB,wBAAwB,CAACE,MAAM,CAACG,OAAO,CAACC,IAAI,CAAC;EAChE,IAAIW,UAAU,EAAE;IACdpB,KAAK,CAACiB,QAAQ,CACZhB,OAAO,CAACoB,UAAU,CAAC;MACjB,GAAGD,UAAU;MACbX,IAAI,EAAG,IAAGW,UAAU,CAACT,MAAO;IAC9B,CAAC,CAAC,CACH;IACDR,wBAAwB,CAACE,MAAM,CAACG,OAAO,CAACC,IAAI,CAAC,GAAG,IAAI;IACpDP,0BAA0B,CAACkB,UAAU,CAACT,MAAM,CAAC,GAAG,IAAI;EACtD;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/internal-plugins/prod-404-500/index.js"],"sourcesContent":["// noop\n"],"mappings":"AAAA;AAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "prod-404-500",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Internal plugin to detect various flavors of 404 pages and ensure there's a 404.html path created as well to ensure compatibility with static hosts",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
|
|
10
|
+
"license": "MIT"
|
|
11
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const GatsbyThemeComponentShadowingResolverPlugin = require(`.`);
|
|
4
|
+
const {
|
|
5
|
+
store
|
|
6
|
+
} = require(`../../redux`);
|
|
7
|
+
module.exports = function (pageComponent) {
|
|
8
|
+
const shadowingPlugin = new GatsbyThemeComponentShadowingResolverPlugin({
|
|
9
|
+
extensions: store.getState().program.extensions,
|
|
10
|
+
themes: store.getState().flattenedPlugins.map(aPlugin => {
|
|
11
|
+
return {
|
|
12
|
+
themeDir: aPlugin.pluginFilepath,
|
|
13
|
+
themeName: aPlugin.name
|
|
14
|
+
};
|
|
15
|
+
}),
|
|
16
|
+
projectRoot: store.getState().program.directory
|
|
17
|
+
});
|
|
18
|
+
const [theme, component] = shadowingPlugin.getThemeAndComponent(pageComponent);
|
|
19
|
+
if (theme) {
|
|
20
|
+
const componentPath = shadowingPlugin.resolveComponentPath({
|
|
21
|
+
theme,
|
|
22
|
+
component,
|
|
23
|
+
originalRequestComponent: pageComponent
|
|
24
|
+
});
|
|
25
|
+
if (componentPath) {
|
|
26
|
+
return componentPath;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=create-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-page.js","names":["GatsbyThemeComponentShadowingResolverPlugin","require","store","module","exports","pageComponent","shadowingPlugin","extensions","getState","program","themes","flattenedPlugins","map","aPlugin","themeDir","pluginFilepath","themeName","name","projectRoot","directory","theme","component","getThemeAndComponent","componentPath","resolveComponentPath","originalRequestComponent"],"sources":["../../../src/internal-plugins/webpack-theme-component-shadowing/create-page.js"],"sourcesContent":["const GatsbyThemeComponentShadowingResolverPlugin = require(`.`)\nconst { store } = require(`../../redux`)\n\nmodule.exports = function (pageComponent) {\n const shadowingPlugin = new GatsbyThemeComponentShadowingResolverPlugin({\n extensions: store.getState().program.extensions,\n themes: store.getState().flattenedPlugins.map(aPlugin => {\n return {\n themeDir: aPlugin.pluginFilepath,\n themeName: aPlugin.name,\n }\n }),\n projectRoot: store.getState().program.directory,\n })\n const [theme, component] = shadowingPlugin.getThemeAndComponent(pageComponent)\n\n if (theme) {\n const componentPath = shadowingPlugin.resolveComponentPath({\n theme,\n component,\n originalRequestComponent: pageComponent,\n })\n if (componentPath) {\n return componentPath\n }\n }\n return false\n}\n"],"mappings":";;AAAA,MAAMA,2CAA2C,GAAGC,OAAO,CAAE,GAAE,CAAC;AAChE,MAAM;EAAEC;AAAM,CAAC,GAAGD,OAAO,CAAE,aAAY,CAAC;AAExCE,MAAM,CAACC,OAAO,GAAG,UAAUC,aAAa,EAAE;EACxC,MAAMC,eAAe,GAAG,IAAIN,2CAA2C,CAAC;IACtEO,UAAU,EAAEL,KAAK,CAACM,QAAQ,EAAE,CAACC,OAAO,CAACF,UAAU;IAC/CG,MAAM,EAAER,KAAK,CAACM,QAAQ,EAAE,CAACG,gBAAgB,CAACC,GAAG,CAACC,OAAO,IAAI;MACvD,OAAO;QACLC,QAAQ,EAAED,OAAO,CAACE,cAAc;QAChCC,SAAS,EAAEH,OAAO,CAACI;MACrB,CAAC;IACH,CAAC,CAAC;IACFC,WAAW,EAAEhB,KAAK,CAACM,QAAQ,EAAE,CAACC,OAAO,CAACU;EACxC,CAAC,CAAC;EACF,MAAM,CAACC,KAAK,EAAEC,SAAS,CAAC,GAAGf,eAAe,CAACgB,oBAAoB,CAACjB,aAAa,CAAC;EAE9E,IAAIe,KAAK,EAAE;IACT,MAAMG,aAAa,GAAGjB,eAAe,CAACkB,oBAAoB,CAAC;MACzDJ,KAAK;MACLC,SAAS;MACTI,wBAAwB,EAAEpB;IAC5B,CAAC,CAAC;IACF,IAAIkB,aAAa,EAAE;MACjB,OAAOA,aAAa;IACtB;EACF;EACA,OAAO,KAAK;AACd,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const GatsbyThemeComponentShadowingResolverPlugin = require(`.`);
|
|
4
|
+
exports.onCreateWebpackConfig = ({
|
|
5
|
+
store,
|
|
6
|
+
stage,
|
|
7
|
+
getConfig,
|
|
8
|
+
rules,
|
|
9
|
+
loaders,
|
|
10
|
+
actions
|
|
11
|
+
}, pluginOptions) => {
|
|
12
|
+
const {
|
|
13
|
+
flattenedPlugins,
|
|
14
|
+
program
|
|
15
|
+
} = store.getState();
|
|
16
|
+
actions.setWebpackConfig({
|
|
17
|
+
resolve: {
|
|
18
|
+
plugins: [new GatsbyThemeComponentShadowingResolverPlugin({
|
|
19
|
+
extensions: program.extensions,
|
|
20
|
+
themes: flattenedPlugins.map(plugin => {
|
|
21
|
+
return {
|
|
22
|
+
themeDir: plugin.pluginFilepath,
|
|
23
|
+
themeName: plugin.name
|
|
24
|
+
};
|
|
25
|
+
}),
|
|
26
|
+
projectRoot: program.directory
|
|
27
|
+
})]
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=gatsby-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gatsby-node.js","names":["GatsbyThemeComponentShadowingResolverPlugin","require","exports","onCreateWebpackConfig","store","stage","getConfig","rules","loaders","actions","pluginOptions","flattenedPlugins","program","getState","setWebpackConfig","resolve","plugins","extensions","themes","map","plugin","themeDir","pluginFilepath","themeName","name","projectRoot","directory"],"sources":["../../../src/internal-plugins/webpack-theme-component-shadowing/gatsby-node.js"],"sourcesContent":["const GatsbyThemeComponentShadowingResolverPlugin = require(`.`)\n\nexports.onCreateWebpackConfig = (\n { store, stage, getConfig, rules, loaders, actions },\n pluginOptions\n) => {\n const { flattenedPlugins, program } = store.getState()\n\n actions.setWebpackConfig({\n resolve: {\n plugins: [\n new GatsbyThemeComponentShadowingResolverPlugin({\n extensions: program.extensions,\n themes: flattenedPlugins.map(plugin => {\n return {\n themeDir: plugin.pluginFilepath,\n themeName: plugin.name,\n }\n }),\n projectRoot: program.directory,\n }),\n ],\n },\n })\n}\n"],"mappings":";;AAAA,MAAMA,2CAA2C,GAAGC,OAAO,CAAE,GAAE,CAAC;AAEhEC,OAAO,CAACC,qBAAqB,GAAG,CAC9B;EAAEC,KAAK;EAAEC,KAAK;EAAEC,SAAS;EAAEC,KAAK;EAAEC,OAAO;EAAEC;AAAQ,CAAC,EACpDC,aAAa,KACV;EACH,MAAM;IAAEC,gBAAgB;IAAEC;EAAQ,CAAC,GAAGR,KAAK,CAACS,QAAQ,EAAE;EAEtDJ,OAAO,CAACK,gBAAgB,CAAC;IACvBC,OAAO,EAAE;MACPC,OAAO,EAAE,CACP,IAAIhB,2CAA2C,CAAC;QAC9CiB,UAAU,EAAEL,OAAO,CAACK,UAAU;QAC9BC,MAAM,EAAEP,gBAAgB,CAACQ,GAAG,CAACC,MAAM,IAAI;UACrC,OAAO;YACLC,QAAQ,EAAED,MAAM,CAACE,cAAc;YAC/BC,SAAS,EAAEH,MAAM,CAACI;UACpB,CAAC;QACH,CAAC,CAAC;QACFC,WAAW,EAAEb,OAAO,CAACc;MACvB,CAAC,CAAC;IAEN;EACF,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const path = require(`path`);
|
|
4
|
+
const debug = require(`debug`)(`gatsby:component-shadowing`);
|
|
5
|
+
const fs = require(`fs`);
|
|
6
|
+
const _ = require(`lodash`);
|
|
7
|
+
const {
|
|
8
|
+
splitComponentPath
|
|
9
|
+
} = require(`gatsby-core-utils`);
|
|
10
|
+
|
|
11
|
+
// A file can be shadowed by a file of the same extension, or a file of a
|
|
12
|
+
// "compatible" file extension; two files extensions are compatible if they both
|
|
13
|
+
// belongs to the same "category". For example, a .JS file (that is code), may
|
|
14
|
+
// be shadowed by a .TS file or a .JSX file (both are code), but not by a .CSS
|
|
15
|
+
// file (that is a stylesheet) or a .PNG file (that is an image). The following
|
|
16
|
+
// list establish to which category a given file extension belongs. Note that if
|
|
17
|
+
// a file is not present in this list, then it can only be shadowed by a file
|
|
18
|
+
// of the same extension.
|
|
19
|
+
|
|
20
|
+
// FIXME: Determine how this list can be extended by user/plugins
|
|
21
|
+
const DEFAULT_FILE_EXTENSIONS_CATEGORIES = {
|
|
22
|
+
// Code formats
|
|
23
|
+
js: `code`,
|
|
24
|
+
jsx: `code`,
|
|
25
|
+
ts: `code`,
|
|
26
|
+
tsx: `code`,
|
|
27
|
+
cjs: `code`,
|
|
28
|
+
mjs: `code`,
|
|
29
|
+
mts: `code`,
|
|
30
|
+
coffee: `code`,
|
|
31
|
+
// JSON-like data formats
|
|
32
|
+
json: `json`,
|
|
33
|
+
yaml: `json`,
|
|
34
|
+
yml: `json`,
|
|
35
|
+
// Stylesheets formats
|
|
36
|
+
css: `stylesheet`,
|
|
37
|
+
sass: `stylesheet`,
|
|
38
|
+
scss: `stylesheet`,
|
|
39
|
+
less: `stylesheet`,
|
|
40
|
+
"css.js": `stylesheet`,
|
|
41
|
+
// Images formats
|
|
42
|
+
jpeg: `image`,
|
|
43
|
+
jpg: `image`,
|
|
44
|
+
jfif: `image`,
|
|
45
|
+
png: `image`,
|
|
46
|
+
tiff: `image`,
|
|
47
|
+
webp: `image`,
|
|
48
|
+
avif: `image`,
|
|
49
|
+
gif: `image`,
|
|
50
|
+
// Fonts
|
|
51
|
+
woff: `font`,
|
|
52
|
+
woff2: `font`
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
// TO-DO:
|
|
56
|
+
// - implement ability to add/remove shadowed modules from the webpack chain as file are being created/deleted
|
|
57
|
+
// ( https://github.com/gatsbyjs/gatsby/issues/11456 ):
|
|
58
|
+
// - this will also need to add memo invalidation for page template shadowing:
|
|
59
|
+
// see memoized `shadowCreatePagePath` function used in `createPage` action creator.
|
|
60
|
+
|
|
61
|
+
module.exports = class GatsbyThemeComponentShadowingResolverPlugin {
|
|
62
|
+
constructor({
|
|
63
|
+
projectRoot,
|
|
64
|
+
themes,
|
|
65
|
+
extensions,
|
|
66
|
+
extensionsCategory
|
|
67
|
+
}) {
|
|
68
|
+
debug(`themes list`, themes.map(({
|
|
69
|
+
themeName
|
|
70
|
+
}) => themeName));
|
|
71
|
+
this.themes = themes;
|
|
72
|
+
this.projectRoot = projectRoot;
|
|
73
|
+
this.extensions = extensions !== null && extensions !== void 0 ? extensions : [];
|
|
74
|
+
this.extensionsCategory = {
|
|
75
|
+
...DEFAULT_FILE_EXTENSIONS_CATEGORIES,
|
|
76
|
+
...extensionsCategory
|
|
77
|
+
};
|
|
78
|
+
this.additionalShadowExtensions = this.buildAdditionalShadowExtensions();
|
|
79
|
+
}
|
|
80
|
+
buildAdditionalShadowExtensions() {
|
|
81
|
+
const extensionsByCategory = _.groupBy(this.extensions, ext => this.extensionsCategory[ext.substring(1)] || `undefined`);
|
|
82
|
+
const additionalExtensions = [];
|
|
83
|
+
for (const [category, exts] of Object.entries(extensionsByCategory)) {
|
|
84
|
+
if (category === `undefined`) continue;
|
|
85
|
+
for (const ext of exts) {
|
|
86
|
+
additionalExtensions.push({
|
|
87
|
+
key: ext,
|
|
88
|
+
value: exts
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Sort extensions in reverse length order, so that something such as
|
|
94
|
+
// ".css.js" get caught before ".js"
|
|
95
|
+
return additionalExtensions.sort(({
|
|
96
|
+
key: a
|
|
97
|
+
}, {
|
|
98
|
+
key: b
|
|
99
|
+
}) => a.length <= b.length);
|
|
100
|
+
}
|
|
101
|
+
apply(resolver) {
|
|
102
|
+
// This hook is executed very early and captures the original file name
|
|
103
|
+
resolver.getHook(`resolve`).tapAsync(`GatsbyThemeComponentShadowingResolverPlugin`, (request, stack, callback) => {
|
|
104
|
+
if (!request._gatsbyThemeShadowingOriginalRequestPath) {
|
|
105
|
+
request._gatsbyThemeShadowingOriginalRequestPath = request.request;
|
|
106
|
+
}
|
|
107
|
+
return callback();
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
// This is where the magic really happens
|
|
111
|
+
resolver.getHook(`before-resolved`).tapAsync(`GatsbyThemeComponentShadowingResolverPlugin`, (request, stack, callback) => {
|
|
112
|
+
const [theme, component] = this.getThemeAndComponent(request.path);
|
|
113
|
+
if (!theme) {
|
|
114
|
+
return callback();
|
|
115
|
+
}
|
|
116
|
+
if (
|
|
117
|
+
/**
|
|
118
|
+
* if someone adds
|
|
119
|
+
* ```
|
|
120
|
+
* modules: [path.resolve(__dirname, /src'), 'node_modules'],
|
|
121
|
+
* ```
|
|
122
|
+
* to the webpack config, `issuer` is `null`, so we skip this check.
|
|
123
|
+
* note that it's probably a bad idea in general to set `modules`
|
|
124
|
+
* like this in a theme, but we also shouldn't artificially break
|
|
125
|
+
* people that do.
|
|
126
|
+
*/
|
|
127
|
+
request.context.issuer &&
|
|
128
|
+
/**
|
|
129
|
+
* An issuer is the file making the require request. It can
|
|
130
|
+
* be in a user's site or a theme. If the issuer is requesting
|
|
131
|
+
* a path in the shadow chain that it participates in, then we
|
|
132
|
+
* will let the request through as normal. Otherwise, we
|
|
133
|
+
* engage the shadowing algorithm.
|
|
134
|
+
*/
|
|
135
|
+
this.requestPathIsIssuerShadowPath({
|
|
136
|
+
component,
|
|
137
|
+
theme,
|
|
138
|
+
issuerPath: request.context.issuer,
|
|
139
|
+
userSiteDir: this.projectRoot
|
|
140
|
+
})) {
|
|
141
|
+
return callback();
|
|
142
|
+
}
|
|
143
|
+
const originalRequestPath = request._gatsbyThemeShadowingOriginalRequestPath;
|
|
144
|
+
const originalRequestComponent = path.basename(originalRequestPath);
|
|
145
|
+
|
|
146
|
+
// This is the shadowing algorithm.
|
|
147
|
+
const builtComponentPath = this.resolveComponentPath({
|
|
148
|
+
theme,
|
|
149
|
+
component,
|
|
150
|
+
originalRequestComponent
|
|
151
|
+
});
|
|
152
|
+
if (builtComponentPath) {
|
|
153
|
+
return resolver.doResolve(resolver.hooks.describedRelative, {
|
|
154
|
+
...request,
|
|
155
|
+
path: builtComponentPath
|
|
156
|
+
}, null, {}, callback);
|
|
157
|
+
} else {
|
|
158
|
+
return callback();
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// check the user's project and the theme files
|
|
164
|
+
resolveComponentPath({
|
|
165
|
+
theme,
|
|
166
|
+
component: originalComponent,
|
|
167
|
+
originalRequestComponent
|
|
168
|
+
}) {
|
|
169
|
+
const [component, content] = splitComponentPath(originalComponent);
|
|
170
|
+
|
|
171
|
+
// don't include matching theme in possible shadowing paths
|
|
172
|
+
const themes = this.themes.filter(({
|
|
173
|
+
themeName
|
|
174
|
+
}) => themeName !== theme.themeName);
|
|
175
|
+
const themesArray = [path.join(this.projectRoot, `src`, theme.themeName)].concat(themes.reverse().map(({
|
|
176
|
+
themeDir
|
|
177
|
+
}) => path.join(themeDir, `src`, theme.themeName)));
|
|
178
|
+
const acceptableShadowFileNames = this.getAcceptableShadowFileNames(path.basename(component), originalRequestComponent);
|
|
179
|
+
for (const theme of themesArray) {
|
|
180
|
+
const possibleComponentPath = path.join(theme, component);
|
|
181
|
+
debug(`possibleComponentPath`, possibleComponentPath);
|
|
182
|
+
let dir;
|
|
183
|
+
try {
|
|
184
|
+
// we use fs/path instead of require.resolve to work with
|
|
185
|
+
// TypeScript and alternate syntaxes
|
|
186
|
+
dir = fs.readdirSync(path.dirname(possibleComponentPath));
|
|
187
|
+
} catch (e) {
|
|
188
|
+
continue;
|
|
189
|
+
}
|
|
190
|
+
const existsDir = dir.map(filepath => path.basename(filepath));
|
|
191
|
+
|
|
192
|
+
// if no exact path, search for extension
|
|
193
|
+
const matchingShadowFile = acceptableShadowFileNames.find(shadowFile => existsDir.includes(shadowFile));
|
|
194
|
+
if (matchingShadowFile) {
|
|
195
|
+
const shadowPath = path.join(path.dirname(possibleComponentPath), matchingShadowFile);
|
|
196
|
+
if (content) {
|
|
197
|
+
return `${shadowPath}?__contentFilePath=${content}`;
|
|
198
|
+
}
|
|
199
|
+
return shadowPath;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
getThemeAndComponent(filepath) {
|
|
205
|
+
// find out which theme's src/components dir we're requiring from
|
|
206
|
+
const allMatchingThemes = this.themes.filter(({
|
|
207
|
+
themeDir
|
|
208
|
+
}) => filepath.startsWith(path.join(themeDir, `src`)));
|
|
209
|
+
|
|
210
|
+
// The same theme can be included twice in the themes list causing multiple
|
|
211
|
+
// matches. This case should only be counted as a single match for that theme.
|
|
212
|
+
const matchingThemes = _.uniqBy(allMatchingThemes, `themeName`);
|
|
213
|
+
|
|
214
|
+
// 0 matching themes happens a lot for paths we don't want to handle
|
|
215
|
+
// > 1 matching theme means we have a path like
|
|
216
|
+
// `gatsby-theme-blog/src/components/gatsby-theme-something/src/components`
|
|
217
|
+
if (matchingThemes.length > 1) {
|
|
218
|
+
throw new Error(`Gatsby can't differentiate between themes ${matchingThemes.map(theme => theme.themeName).join(` and `)} for path ${filepath}`);
|
|
219
|
+
}
|
|
220
|
+
if (matchingThemes.length === 0) {
|
|
221
|
+
return [null, null];
|
|
222
|
+
}
|
|
223
|
+
const theme = matchingThemes[0];
|
|
224
|
+
|
|
225
|
+
// get the location of the component relative to its theme's src/
|
|
226
|
+
const [, component] = filepath.split(path.join(theme.themeDir, `src`));
|
|
227
|
+
return [theme, component];
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// given a theme name, return all of the possible shadow locations
|
|
231
|
+
getBaseShadowDirsForThemes(theme) {
|
|
232
|
+
return Array.from(this.themes).reverse().map(({
|
|
233
|
+
themeName,
|
|
234
|
+
themeDir
|
|
235
|
+
}) => {
|
|
236
|
+
if (themeName === theme) {
|
|
237
|
+
return path.join(themeDir, `src`);
|
|
238
|
+
} else {
|
|
239
|
+
return path.join(themeDir, `src`, theme);
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
requestPathIsIssuerShadowPath({
|
|
244
|
+
theme,
|
|
245
|
+
component,
|
|
246
|
+
issuerPath,
|
|
247
|
+
userSiteDir
|
|
248
|
+
}) {
|
|
249
|
+
if (!theme || !component) {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// get list of potential shadow locations
|
|
254
|
+
const shadowFiles = this.getBaseShadowDirsForThemes(theme.themeName).concat(path.join(userSiteDir, `src`, theme.themeName)).map(dir => path.join(dir, component)).flatMap(comp => this.getAcceptableShadowFileNames(comp));
|
|
255
|
+
|
|
256
|
+
// if the issuer is requesting a path that is a potential shadow path of itself
|
|
257
|
+
return shadowFiles.includes(issuerPath);
|
|
258
|
+
}
|
|
259
|
+
getAcceptableShadowFileNames(componentName, originalRequestComponent) {
|
|
260
|
+
const matchingEntry = this.additionalShadowExtensions.find(entry => componentName.endsWith(entry.key));
|
|
261
|
+
let additionalNames = [];
|
|
262
|
+
if (matchingEntry) {
|
|
263
|
+
const baseName = componentName.slice(0, -matchingEntry.key.length);
|
|
264
|
+
additionalNames = matchingEntry.value.map(ext => `${baseName}${ext}`);
|
|
265
|
+
}
|
|
266
|
+
let legacyAdditionalNames = [];
|
|
267
|
+
if (originalRequestComponent) {
|
|
268
|
+
legacyAdditionalNames = this.extensions.map(ext => `${originalRequestComponent}${ext}`);
|
|
269
|
+
}
|
|
270
|
+
return _.uniq([componentName, ...additionalNames, ...legacyAdditionalNames]);
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["path","require","debug","fs","_","splitComponentPath","DEFAULT_FILE_EXTENSIONS_CATEGORIES","js","jsx","ts","tsx","cjs","mjs","mts","coffee","json","yaml","yml","css","sass","scss","less","jpeg","jpg","jfif","png","tiff","webp","avif","gif","woff","woff2","module","exports","GatsbyThemeComponentShadowingResolverPlugin","constructor","projectRoot","themes","extensions","extensionsCategory","map","themeName","additionalShadowExtensions","buildAdditionalShadowExtensions","extensionsByCategory","groupBy","ext","substring","additionalExtensions","category","exts","Object","entries","push","key","value","sort","a","b","length","apply","resolver","getHook","tapAsync","request","stack","callback","_gatsbyThemeShadowingOriginalRequestPath","theme","component","getThemeAndComponent","context","issuer","requestPathIsIssuerShadowPath","issuerPath","userSiteDir","originalRequestPath","originalRequestComponent","basename","builtComponentPath","resolveComponentPath","doResolve","hooks","describedRelative","originalComponent","content","filter","themesArray","join","concat","reverse","themeDir","acceptableShadowFileNames","getAcceptableShadowFileNames","possibleComponentPath","dir","readdirSync","dirname","e","existsDir","filepath","matchingShadowFile","find","shadowFile","includes","shadowPath","allMatchingThemes","startsWith","matchingThemes","uniqBy","Error","split","getBaseShadowDirsForThemes","Array","from","shadowFiles","flatMap","comp","componentName","matchingEntry","entry","endsWith","additionalNames","baseName","slice","legacyAdditionalNames","uniq"],"sources":["../../../src/internal-plugins/webpack-theme-component-shadowing/index.js"],"sourcesContent":["const path = require(`path`)\nconst debug = require(`debug`)(`gatsby:component-shadowing`)\nconst fs = require(`fs`)\nconst _ = require(`lodash`)\nconst { splitComponentPath } = require(`gatsby-core-utils`)\n\n// A file can be shadowed by a file of the same extension, or a file of a\n// \"compatible\" file extension; two files extensions are compatible if they both\n// belongs to the same \"category\". For example, a .JS file (that is code), may\n// be shadowed by a .TS file or a .JSX file (both are code), but not by a .CSS\n// file (that is a stylesheet) or a .PNG file (that is an image). The following\n// list establish to which category a given file extension belongs. Note that if\n// a file is not present in this list, then it can only be shadowed by a file\n// of the same extension.\n\n// FIXME: Determine how this list can be extended by user/plugins\nconst DEFAULT_FILE_EXTENSIONS_CATEGORIES = {\n // Code formats\n js: `code`,\n jsx: `code`,\n ts: `code`,\n tsx: `code`,\n cjs: `code`,\n mjs: `code`,\n mts: `code`,\n coffee: `code`,\n\n // JSON-like data formats\n json: `json`,\n yaml: `json`,\n yml: `json`,\n\n // Stylesheets formats\n css: `stylesheet`,\n sass: `stylesheet`,\n scss: `stylesheet`,\n less: `stylesheet`,\n \"css.js\": `stylesheet`,\n\n // Images formats\n jpeg: `image`,\n jpg: `image`,\n jfif: `image`,\n png: `image`,\n tiff: `image`,\n webp: `image`,\n avif: `image`,\n gif: `image`,\n\n // Fonts\n woff: `font`,\n woff2: `font`,\n}\n\n// TO-DO:\n// - implement ability to add/remove shadowed modules from the webpack chain as file are being created/deleted\n// ( https://github.com/gatsbyjs/gatsby/issues/11456 ):\n// - this will also need to add memo invalidation for page template shadowing:\n// see memoized `shadowCreatePagePath` function used in `createPage` action creator.\n\nmodule.exports = class GatsbyThemeComponentShadowingResolverPlugin {\n constructor({ projectRoot, themes, extensions, extensionsCategory }) {\n debug(\n `themes list`,\n themes.map(({ themeName }) => themeName)\n )\n this.themes = themes\n this.projectRoot = projectRoot\n\n this.extensions = extensions ?? []\n this.extensionsCategory = {\n ...DEFAULT_FILE_EXTENSIONS_CATEGORIES,\n ...extensionsCategory,\n }\n this.additionalShadowExtensions = this.buildAdditionalShadowExtensions()\n }\n\n buildAdditionalShadowExtensions() {\n const extensionsByCategory = _.groupBy(\n this.extensions,\n ext => this.extensionsCategory[ext.substring(1)] || `undefined`\n )\n\n const additionalExtensions = []\n for (const [category, exts] of Object.entries(extensionsByCategory)) {\n if (category === `undefined`) continue\n for (const ext of exts) {\n additionalExtensions.push({ key: ext, value: exts })\n }\n }\n\n // Sort extensions in reverse length order, so that something such as\n // \".css.js\" get caught before \".js\"\n return additionalExtensions.sort(\n ({ key: a }, { key: b }) => a.length <= b.length\n )\n }\n\n apply(resolver) {\n // This hook is executed very early and captures the original file name\n resolver\n .getHook(`resolve`)\n .tapAsync(\n `GatsbyThemeComponentShadowingResolverPlugin`,\n (request, stack, callback) => {\n if (!request._gatsbyThemeShadowingOriginalRequestPath) {\n request._gatsbyThemeShadowingOriginalRequestPath = request.request\n }\n return callback()\n }\n )\n\n // This is where the magic really happens\n resolver\n .getHook(`before-resolved`)\n .tapAsync(\n `GatsbyThemeComponentShadowingResolverPlugin`,\n (request, stack, callback) => {\n const [theme, component] = this.getThemeAndComponent(request.path)\n if (!theme) {\n return callback()\n }\n\n if (\n /**\n * if someone adds\n * ```\n * modules: [path.resolve(__dirname, /src'), 'node_modules'],\n * ```\n * to the webpack config, `issuer` is `null`, so we skip this check.\n * note that it's probably a bad idea in general to set `modules`\n * like this in a theme, but we also shouldn't artificially break\n * people that do.\n */\n request.context.issuer &&\n /**\n * An issuer is the file making the require request. It can\n * be in a user's site or a theme. If the issuer is requesting\n * a path in the shadow chain that it participates in, then we\n * will let the request through as normal. Otherwise, we\n * engage the shadowing algorithm.\n */\n this.requestPathIsIssuerShadowPath({\n component,\n theme,\n issuerPath: request.context.issuer,\n userSiteDir: this.projectRoot,\n })\n ) {\n return callback()\n }\n\n const originalRequestPath =\n request._gatsbyThemeShadowingOriginalRequestPath\n const originalRequestComponent = path.basename(originalRequestPath)\n\n // This is the shadowing algorithm.\n const builtComponentPath = this.resolveComponentPath({\n theme,\n component,\n originalRequestComponent,\n })\n\n if (builtComponentPath) {\n return resolver.doResolve(\n resolver.hooks.describedRelative,\n { ...request, path: builtComponentPath },\n null,\n {},\n callback\n )\n } else {\n return callback()\n }\n }\n )\n }\n\n // check the user's project and the theme files\n resolveComponentPath({\n theme,\n component: originalComponent,\n originalRequestComponent,\n }) {\n const [component, content] = splitComponentPath(originalComponent)\n\n // don't include matching theme in possible shadowing paths\n const themes = this.themes.filter(\n ({ themeName }) => themeName !== theme.themeName\n )\n\n const themesArray = [\n path.join(this.projectRoot, `src`, theme.themeName),\n ].concat(\n themes\n .reverse()\n .map(({ themeDir }) => path.join(themeDir, `src`, theme.themeName))\n )\n\n const acceptableShadowFileNames = this.getAcceptableShadowFileNames(\n path.basename(component),\n originalRequestComponent\n )\n\n for (const theme of themesArray) {\n const possibleComponentPath = path.join(theme, component)\n debug(`possibleComponentPath`, possibleComponentPath)\n\n let dir\n try {\n // we use fs/path instead of require.resolve to work with\n // TypeScript and alternate syntaxes\n dir = fs.readdirSync(path.dirname(possibleComponentPath))\n } catch (e) {\n continue\n }\n const existsDir = dir.map(filepath => path.basename(filepath))\n\n // if no exact path, search for extension\n const matchingShadowFile = acceptableShadowFileNames.find(shadowFile =>\n existsDir.includes(shadowFile)\n )\n if (matchingShadowFile) {\n const shadowPath = path.join(\n path.dirname(possibleComponentPath),\n matchingShadowFile\n )\n\n if (content) {\n return `${shadowPath}?__contentFilePath=${content}`\n }\n\n return shadowPath\n }\n }\n return null\n }\n\n getThemeAndComponent(filepath) {\n // find out which theme's src/components dir we're requiring from\n const allMatchingThemes = this.themes.filter(({ themeDir }) =>\n filepath.startsWith(path.join(themeDir, `src`))\n )\n\n // The same theme can be included twice in the themes list causing multiple\n // matches. This case should only be counted as a single match for that theme.\n const matchingThemes = _.uniqBy(allMatchingThemes, `themeName`)\n\n // 0 matching themes happens a lot for paths we don't want to handle\n // > 1 matching theme means we have a path like\n // `gatsby-theme-blog/src/components/gatsby-theme-something/src/components`\n if (matchingThemes.length > 1) {\n throw new Error(\n `Gatsby can't differentiate between themes ${matchingThemes\n .map(theme => theme.themeName)\n .join(` and `)} for path ${filepath}`\n )\n }\n\n if (matchingThemes.length === 0) {\n return [null, null]\n }\n\n const theme = matchingThemes[0]\n\n // get the location of the component relative to its theme's src/\n const [, component] = filepath.split(path.join(theme.themeDir, `src`))\n\n return [theme, component]\n }\n\n // given a theme name, return all of the possible shadow locations\n getBaseShadowDirsForThemes(theme) {\n return Array.from(this.themes)\n .reverse()\n .map(({ themeName, themeDir }) => {\n if (themeName === theme) {\n return path.join(themeDir, `src`)\n } else {\n return path.join(themeDir, `src`, theme)\n }\n })\n }\n\n requestPathIsIssuerShadowPath({ theme, component, issuerPath, userSiteDir }) {\n if (!theme || !component) {\n return false\n }\n\n // get list of potential shadow locations\n const shadowFiles = this.getBaseShadowDirsForThemes(theme.themeName)\n .concat(path.join(userSiteDir, `src`, theme.themeName))\n .map(dir => path.join(dir, component))\n .flatMap(comp => this.getAcceptableShadowFileNames(comp))\n\n // if the issuer is requesting a path that is a potential shadow path of itself\n return shadowFiles.includes(issuerPath)\n }\n\n getAcceptableShadowFileNames(componentName, originalRequestComponent) {\n const matchingEntry = this.additionalShadowExtensions.find(entry =>\n componentName.endsWith(entry.key)\n )\n\n let additionalNames = []\n if (matchingEntry) {\n const baseName = componentName.slice(0, -matchingEntry.key.length)\n additionalNames = matchingEntry.value.map(ext => `${baseName}${ext}`)\n }\n\n let legacyAdditionalNames = []\n if (originalRequestComponent) {\n legacyAdditionalNames = this.extensions.map(\n ext => `${originalRequestComponent}${ext}`\n )\n }\n\n return _.uniq([componentName, ...additionalNames, ...legacyAdditionalNames])\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "webpack-theme-component-shadowing",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "An internal Gatsby plugin which handles configuring webpack to ensure theme components fall back from the user's site to theme modules.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"author": "Chris Biscardi <chris@christopherbiscardi.com>",
|
|
10
|
+
"license": "MIT"
|
|
11
|
+
}
|