@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,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.clearValidationCache = clearValidationCache;
|
|
6
|
+
exports.validateComponent = validateComponent;
|
|
7
|
+
var _path = _interopRequireDefault(require("path"));
|
|
8
|
+
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
9
|
+
var _parseComponentPath = require("gatsby-core-utils/parse-component-path");
|
|
10
|
+
const validationCache = new Set();
|
|
11
|
+
const isNotTestEnv = process.env.NODE_ENV !== `test`;
|
|
12
|
+
const isProductionEnv = process.env.NODE_ENV === `production`;
|
|
13
|
+
function validateComponent(args) {
|
|
14
|
+
const {
|
|
15
|
+
input,
|
|
16
|
+
pluginName,
|
|
17
|
+
errorIdMap
|
|
18
|
+
} = args || {};
|
|
19
|
+
|
|
20
|
+
// No component path passed
|
|
21
|
+
if (!(input !== null && input !== void 0 && input.component)) {
|
|
22
|
+
return {
|
|
23
|
+
error: {
|
|
24
|
+
id: errorIdMap.noPath,
|
|
25
|
+
context: {
|
|
26
|
+
pluginName,
|
|
27
|
+
input
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const componentPath = (0, _parseComponentPath.getPathToLayoutComponent)(input === null || input === void 0 ? void 0 : input.component);
|
|
33
|
+
const errorContext = {
|
|
34
|
+
input,
|
|
35
|
+
pluginName,
|
|
36
|
+
componentPath
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// Component path already validated in previous pass
|
|
40
|
+
if (validationCache.has(componentPath)) {
|
|
41
|
+
return {};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Component path must be absolute
|
|
45
|
+
if (!_path.default.isAbsolute(componentPath)) {
|
|
46
|
+
return {
|
|
47
|
+
error: {
|
|
48
|
+
id: errorIdMap.notAbsolute,
|
|
49
|
+
context: errorContext
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Component path must exist
|
|
55
|
+
if (isNotTestEnv) {
|
|
56
|
+
if (!_fsExtra.default.existsSync(componentPath)) {
|
|
57
|
+
return {
|
|
58
|
+
error: {
|
|
59
|
+
id: errorIdMap.doesNotExist,
|
|
60
|
+
context: errorContext
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (!componentPath.includes(`/.cache/`) && isProductionEnv) {
|
|
66
|
+
const fileContent = _fsExtra.default.readFileSync(componentPath, `utf-8`);
|
|
67
|
+
|
|
68
|
+
// Component must not be empty
|
|
69
|
+
if (fileContent === ``) {
|
|
70
|
+
return {
|
|
71
|
+
error: {
|
|
72
|
+
id: errorIdMap.empty,
|
|
73
|
+
context: errorContext
|
|
74
|
+
},
|
|
75
|
+
panicOnBuild: true
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Component must have a default export
|
|
80
|
+
if ([`.js`, `.jsx`, `.ts`, `.tsx`].includes(_path.default.extname(componentPath))) {
|
|
81
|
+
const includesDefaultExport = fileContent.includes(`export default`) || fileContent.includes(`module.exports`) || fileContent.includes(`exports.default`) || fileContent.includes(`exports["default"]`) || fileContent.match(/export \{.* as default.*\}/s) || fileContent.match(/export \{\s*default\s*\}/s);
|
|
82
|
+
if (!includesDefaultExport) {
|
|
83
|
+
return {
|
|
84
|
+
error: {
|
|
85
|
+
id: errorIdMap.noDefaultExport,
|
|
86
|
+
context: errorContext
|
|
87
|
+
},
|
|
88
|
+
panicOnBuild: true
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
validationCache.add(componentPath);
|
|
94
|
+
return {};
|
|
95
|
+
}
|
|
96
|
+
function clearValidationCache() {
|
|
97
|
+
validationCache.clear();
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=validate-component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-component.js","names":["validationCache","Set","isNotTestEnv","process","env","NODE_ENV","isProductionEnv","validateComponent","args","input","pluginName","errorIdMap","component","error","id","noPath","context","componentPath","getPathToLayoutComponent","errorContext","has","path","isAbsolute","notAbsolute","fs","existsSync","doesNotExist","includes","fileContent","readFileSync","empty","panicOnBuild","extname","includesDefaultExport","match","noDefaultExport","add","clearValidationCache","clear"],"sources":["../../src/utils/validate-component.ts"],"sourcesContent":["import path from \"path\"\nimport fs from \"fs-extra\"\nimport { getPathToLayoutComponent } from \"gatsby-core-utils/parse-component-path\"\nimport { IPageInput as ICreatePageInput } from \"../redux/actions/public\"\nimport { ICreateSliceInput } from \"../redux/actions/restricted\"\n\nconst validationCache = new Set<string>()\n\ninterface IErrorMeta {\n id: string\n context: Record<string, unknown>\n}\n\ninterface IErrorIdMap {\n noPath: string\n notAbsolute: string\n doesNotExist: string\n empty: string\n noDefaultExport: string\n}\n\nconst isNotTestEnv = process.env.NODE_ENV !== `test`\nconst isProductionEnv = process.env.NODE_ENV === `production`\n\nexport function validateComponent(args: {\n input: ICreatePageInput | ICreateSliceInput\n pluginName: string\n errorIdMap: IErrorIdMap\n}): { error?: IErrorMeta; panicOnBuild?: boolean } {\n const { input, pluginName, errorIdMap } = args || {}\n\n // No component path passed\n if (!input?.component) {\n return {\n error: {\n id: errorIdMap.noPath,\n context: {\n pluginName,\n input,\n },\n },\n }\n }\n\n const componentPath = getPathToLayoutComponent(input?.component)\n\n const errorContext = {\n input,\n pluginName,\n componentPath,\n }\n\n // Component path already validated in previous pass\n if (validationCache.has(componentPath)) {\n return {}\n }\n\n // Component path must be absolute\n if (!path.isAbsolute(componentPath)) {\n return {\n error: {\n id: errorIdMap.notAbsolute,\n context: errorContext,\n },\n }\n }\n\n // Component path must exist\n if (isNotTestEnv) {\n if (!fs.existsSync(componentPath)) {\n return {\n error: {\n id: errorIdMap.doesNotExist,\n context: errorContext,\n },\n }\n }\n }\n\n if (!componentPath.includes(`/.cache/`) && isProductionEnv) {\n const fileContent = fs.readFileSync(componentPath, `utf-8`)\n\n // Component must not be empty\n if (fileContent === ``) {\n return {\n error: {\n id: errorIdMap.empty,\n context: errorContext,\n },\n panicOnBuild: true,\n }\n }\n\n // Component must have a default export\n if ([`.js`, `.jsx`, `.ts`, `.tsx`].includes(path.extname(componentPath))) {\n const includesDefaultExport =\n fileContent.includes(`export default`) ||\n fileContent.includes(`module.exports`) ||\n fileContent.includes(`exports.default`) ||\n fileContent.includes(`exports[\"default\"]`) ||\n fileContent.match(/export \\{.* as default.*\\}/s) ||\n fileContent.match(/export \\{\\s*default\\s*\\}/s)\n\n if (!includesDefaultExport) {\n return {\n error: {\n id: errorIdMap.noDefaultExport,\n context: errorContext,\n },\n panicOnBuild: true,\n }\n }\n }\n }\n\n validationCache.add(componentPath)\n return {}\n}\n\nexport function clearValidationCache(): void {\n validationCache.clear()\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function validate(directory: string): Promise<void>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.validate = validate;
|
|
6
|
+
var _module = _interopRequireDefault(require("module"));
|
|
7
|
+
var path = _interopRequireWildcard(require("path"));
|
|
8
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
9
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
|
+
// @ts-ignore TS doesn't like accessing `_load`
|
|
11
|
+
const originalModuleLoad = _module.default._load;
|
|
12
|
+
class EngineValidationError extends Error {
|
|
13
|
+
constructor({
|
|
14
|
+
request,
|
|
15
|
+
relativeToRoot,
|
|
16
|
+
parent
|
|
17
|
+
}) {
|
|
18
|
+
super(`Generated engines use disallowed import "${request}". Only allowed imports are to Node.js builtin modules or engines internals.`);
|
|
19
|
+
this.request = request;
|
|
20
|
+
this.relativeToRoot = relativeToRoot;
|
|
21
|
+
this.parentPath = parent.filename;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async function validate(directory) {
|
|
25
|
+
// intercept module loading and validate no unexpected imports are happening
|
|
26
|
+
// @ts-ignore TS doesn't like accessing `_load`
|
|
27
|
+
_module.default._load = (request, parent, isMain) => {
|
|
28
|
+
// Allow all node builtins
|
|
29
|
+
if (_module.default.builtinModules.includes(request)) {
|
|
30
|
+
return originalModuleLoad(request, parent, isMain);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Allow imports to modules in engines directory.
|
|
34
|
+
// For example: importing ".cache/page-ssr/routes/render-page" from
|
|
35
|
+
// page-ssr engine should be allowed as it is part of engine.
|
|
36
|
+
const allowedPrefixes = [path.join(`.cache`, `query-engine`), path.join(`.cache`, `page-ssr`)];
|
|
37
|
+
const localRequire = _module.default.createRequire(parent.filename);
|
|
38
|
+
const absPath = localRequire.resolve(request);
|
|
39
|
+
const relativeToRoot = path.relative(directory, absPath);
|
|
40
|
+
for (const allowedPrefix of allowedPrefixes) {
|
|
41
|
+
if (relativeToRoot.startsWith(allowedPrefix)) {
|
|
42
|
+
return originalModuleLoad(request, parent, isMain);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// We throw on anything that is not allowed
|
|
47
|
+
// Runtime might have try/catch for it and continue to work
|
|
48
|
+
// (for example`msgpackr` have fallback if native `msgpack-extract` can't be loaded)
|
|
49
|
+
// and we don't fail validation in those cases because error we throw will be handled.
|
|
50
|
+
// We do want to fail validation if there is no fallback
|
|
51
|
+
throw new EngineValidationError({
|
|
52
|
+
request,
|
|
53
|
+
relativeToRoot,
|
|
54
|
+
parent
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// workaround for gatsby-worker issue:
|
|
59
|
+
// gatsby-worker gets bundled in engines and it will auto-init "child" module
|
|
60
|
+
// if GATSBY_WORKER_MODULE_PATH env var is set. To prevent this we just unset
|
|
61
|
+
// env var so it's falsy.
|
|
62
|
+
process.env.GATSBY_WORKER_MODULE_PATH = ``;
|
|
63
|
+
|
|
64
|
+
// import engines, initiate them, if there is any error thrown it will be handled in parent process
|
|
65
|
+
const {
|
|
66
|
+
GraphQLEngine
|
|
67
|
+
} = require(path.join(directory, `.cache`, `query-engine`));
|
|
68
|
+
require(path.join(directory, `.cache`, `page-ssr`));
|
|
69
|
+
const graphqlEngine = new GraphQLEngine({
|
|
70
|
+
dbPath: path.join(directory, `.cache`, `data`, `datastore`)
|
|
71
|
+
});
|
|
72
|
+
await graphqlEngine.ready();
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=child.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"child.js","names":["originalModuleLoad","mod","_load","EngineValidationError","Error","constructor","request","relativeToRoot","parent","parentPath","filename","validate","directory","isMain","builtinModules","includes","allowedPrefixes","path","join","localRequire","createRequire","absPath","resolve","relative","allowedPrefix","startsWith","process","env","GATSBY_WORKER_MODULE_PATH","GraphQLEngine","require","graphqlEngine","dbPath","ready"],"sources":["../../../src/utils/validate-engines/child.ts"],"sourcesContent":["import mod from \"module\"\nimport * as path from \"path\"\n\n// @ts-ignore TS doesn't like accessing `_load`\nconst originalModuleLoad = mod._load\n\nclass EngineValidationError extends Error {\n request: string\n relativeToRoot: string\n parentPath: string\n\n constructor({\n request,\n relativeToRoot,\n parent,\n }: {\n request: string\n relativeToRoot: string\n parent: mod\n }) {\n super(\n `Generated engines use disallowed import \"${request}\". Only allowed imports are to Node.js builtin modules or engines internals.`\n )\n this.request = request\n this.relativeToRoot = relativeToRoot\n this.parentPath = parent.filename\n }\n}\n\nexport async function validate(directory: string): Promise<void> {\n // intercept module loading and validate no unexpected imports are happening\n // @ts-ignore TS doesn't like accessing `_load`\n mod._load = (request: string, parent: mod, isMain: boolean): any => {\n // Allow all node builtins\n if (mod.builtinModules.includes(request)) {\n return originalModuleLoad(request, parent, isMain)\n }\n\n // Allow imports to modules in engines directory.\n // For example: importing \".cache/page-ssr/routes/render-page\" from\n // page-ssr engine should be allowed as it is part of engine.\n const allowedPrefixes = [\n path.join(`.cache`, `query-engine`),\n path.join(`.cache`, `page-ssr`),\n ]\n const localRequire = mod.createRequire(parent.filename)\n const absPath = localRequire.resolve(request)\n const relativeToRoot = path.relative(directory, absPath)\n for (const allowedPrefix of allowedPrefixes) {\n if (relativeToRoot.startsWith(allowedPrefix)) {\n return originalModuleLoad(request, parent, isMain)\n }\n }\n\n // We throw on anything that is not allowed\n // Runtime might have try/catch for it and continue to work\n // (for example`msgpackr` have fallback if native `msgpack-extract` can't be loaded)\n // and we don't fail validation in those cases because error we throw will be handled.\n // We do want to fail validation if there is no fallback\n throw new EngineValidationError({ request, relativeToRoot, parent })\n }\n\n // workaround for gatsby-worker issue:\n // gatsby-worker gets bundled in engines and it will auto-init \"child\" module\n // if GATSBY_WORKER_MODULE_PATH env var is set. To prevent this we just unset\n // env var so it's falsy.\n process.env.GATSBY_WORKER_MODULE_PATH = ``\n\n // import engines, initiate them, if there is any error thrown it will be handled in parent process\n const { GraphQLEngine } = require(path.join(\n directory,\n `.cache`,\n `query-engine`\n ))\n require(path.join(directory, `.cache`, `page-ssr`))\n const graphqlEngine = new GraphQLEngine({\n dbPath: path.join(directory, `.cache`, `data`, `datastore`),\n })\n await graphqlEngine.ready()\n}\n"],"mappings":";;;;;AAAA;AACA;AAA4B;AAAA;AAE5B;AACA,MAAMA,kBAAkB,GAAGC,eAAG,CAACC,KAAK;AAEpC,MAAMC,qBAAqB,SAASC,KAAK,CAAC;EAKxCC,WAAW,CAAC;IACVC,OAAO;IACPC,cAAc;IACdC;EAKF,CAAC,EAAE;IACD,KAAK,CACF,4CAA2CF,OAAQ,8EAA6E,CAClI;IACD,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACC,cAAc,GAAGA,cAAc;IACpC,IAAI,CAACE,UAAU,GAAGD,MAAM,CAACE,QAAQ;EACnC;AACF;AAEO,eAAeC,QAAQ,CAACC,SAAiB,EAAiB;EAC/D;EACA;EACAX,eAAG,CAACC,KAAK,GAAG,CAACI,OAAe,EAAEE,MAAW,EAAEK,MAAe,KAAU;IAClE;IACA,IAAIZ,eAAG,CAACa,cAAc,CAACC,QAAQ,CAACT,OAAO,CAAC,EAAE;MACxC,OAAON,kBAAkB,CAACM,OAAO,EAAEE,MAAM,EAAEK,MAAM,CAAC;IACpD;;IAEA;IACA;IACA;IACA,MAAMG,eAAe,GAAG,CACtBC,IAAI,CAACC,IAAI,CAAE,QAAO,EAAG,cAAa,CAAC,EACnCD,IAAI,CAACC,IAAI,CAAE,QAAO,EAAG,UAAS,CAAC,CAChC;IACD,MAAMC,YAAY,GAAGlB,eAAG,CAACmB,aAAa,CAACZ,MAAM,CAACE,QAAQ,CAAC;IACvD,MAAMW,OAAO,GAAGF,YAAY,CAACG,OAAO,CAAChB,OAAO,CAAC;IAC7C,MAAMC,cAAc,GAAGU,IAAI,CAACM,QAAQ,CAACX,SAAS,EAAES,OAAO,CAAC;IACxD,KAAK,MAAMG,aAAa,IAAIR,eAAe,EAAE;MAC3C,IAAIT,cAAc,CAACkB,UAAU,CAACD,aAAa,CAAC,EAAE;QAC5C,OAAOxB,kBAAkB,CAACM,OAAO,EAAEE,MAAM,EAAEK,MAAM,CAAC;MACpD;IACF;;IAEA;IACA;IACA;IACA;IACA;IACA,MAAM,IAAIV,qBAAqB,CAAC;MAAEG,OAAO;MAAEC,cAAc;MAAEC;IAAO,CAAC,CAAC;EACtE,CAAC;;EAED;EACA;EACA;EACA;EACAkB,OAAO,CAACC,GAAG,CAACC,yBAAyB,GAAI,EAAC;;EAE1C;EACA,MAAM;IAAEC;EAAc,CAAC,GAAGC,OAAO,CAACb,IAAI,CAACC,IAAI,CACzCN,SAAS,EACR,QAAO,EACP,cAAa,CACf,CAAC;EACFkB,OAAO,CAACb,IAAI,CAACC,IAAI,CAACN,SAAS,EAAG,QAAO,EAAG,UAAS,CAAC,CAAC;EACnD,MAAMmB,aAAa,GAAG,IAAIF,aAAa,CAAC;IACtCG,MAAM,EAAEf,IAAI,CAACC,IAAI,CAACN,SAAS,EAAG,QAAO,EAAG,MAAK,EAAG,WAAU;EAC5D,CAAC,CAAC;EACF,MAAMmB,aAAa,CAACE,KAAK,EAAE;AAC7B"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.validateEnginesWithActivity = validateEnginesWithActivity;
|
|
6
|
+
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
|
7
|
+
var _reporter = _interopRequireDefault(require("gatsby-cli/lib/reporter"));
|
|
8
|
+
var _gatsbyWorker = require("gatsby-worker");
|
|
9
|
+
var _enginesHelpers = require("../engines-helpers");
|
|
10
|
+
async function validateEnginesWithActivity(directory, buildSpan) {
|
|
11
|
+
if (!(0, _isEqual2.default)((0, _enginesHelpers.getCurrentPlatformAndTarget)(), (0, _enginesHelpers.getFunctionsTargetPlatformAndTarget)())) {
|
|
12
|
+
_reporter.default.info(`Skipping Rendering Engines validation as they are build for different platform and/or architecture`);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const validateEnginesActivity = _reporter.default.activityTimer(`Validating Rendering Engines`, {
|
|
16
|
+
parentSpan: buildSpan
|
|
17
|
+
});
|
|
18
|
+
validateEnginesActivity.start();
|
|
19
|
+
try {
|
|
20
|
+
await validateEngines(directory);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
validateEnginesActivity.panic({
|
|
23
|
+
id: `98001`,
|
|
24
|
+
context: {},
|
|
25
|
+
error
|
|
26
|
+
});
|
|
27
|
+
} finally {
|
|
28
|
+
validateEnginesActivity.end();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async function validateEngines(directory) {
|
|
32
|
+
const worker = new _gatsbyWorker.WorkerPool(require.resolve(`./child`), {
|
|
33
|
+
numWorkers: 1,
|
|
34
|
+
env: {
|
|
35
|
+
// Do not "inherit" this env var for validation,
|
|
36
|
+
// as otherwise validation will fail on any imports
|
|
37
|
+
// that OpenTracing config might make
|
|
38
|
+
GATSBY_OPEN_TRACING_CONFIG_FILE: ``
|
|
39
|
+
},
|
|
40
|
+
silent: true
|
|
41
|
+
});
|
|
42
|
+
try {
|
|
43
|
+
await worker.single.validate(directory);
|
|
44
|
+
} finally {
|
|
45
|
+
worker.end();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["validateEnginesWithActivity","directory","buildSpan","getCurrentPlatformAndTarget","getFunctionsTargetPlatformAndTarget","reporter","info","validateEnginesActivity","activityTimer","parentSpan","start","validateEngines","error","panic","id","context","end","worker","WorkerPool","require","resolve","numWorkers","env","GATSBY_OPEN_TRACING_CONFIG_FILE","silent","single","validate"],"sources":["../../../src/utils/validate-engines/index.ts"],"sourcesContent":["import reporter from \"gatsby-cli/lib/reporter\"\nimport { WorkerPool } from \"gatsby-worker\"\nimport { isEqual } from \"lodash\"\nimport type { Span } from \"opentracing\"\nimport {\n getCurrentPlatformAndTarget,\n getFunctionsTargetPlatformAndTarget,\n} from \"../engines-helpers\"\n\nexport async function validateEnginesWithActivity(\n directory: string,\n buildSpan?: Span\n): Promise<void> {\n if (\n !isEqual(\n getCurrentPlatformAndTarget(),\n getFunctionsTargetPlatformAndTarget()\n )\n ) {\n reporter.info(\n `Skipping Rendering Engines validation as they are build for different platform and/or architecture`\n )\n return\n }\n\n const validateEnginesActivity = reporter.activityTimer(\n `Validating Rendering Engines`,\n {\n parentSpan: buildSpan,\n }\n )\n validateEnginesActivity.start()\n try {\n await validateEngines(directory)\n } catch (error) {\n validateEnginesActivity.panic({ id: `98001`, context: {}, error })\n } finally {\n validateEnginesActivity.end()\n }\n}\n\nasync function validateEngines(directory: string): Promise<void> {\n const worker = new WorkerPool<typeof import(\"./child\")>(\n require.resolve(`./child`),\n {\n numWorkers: 1,\n env: {\n // Do not \"inherit\" this env var for validation,\n // as otherwise validation will fail on any imports\n // that OpenTracing config might make\n GATSBY_OPEN_TRACING_CONFIG_FILE: ``,\n },\n silent: true,\n }\n )\n\n try {\n await worker.single.validate(directory)\n } finally {\n worker.end()\n }\n}\n"],"mappings":";;;;;;AAAA;AACA;AAGA;AAKO,eAAeA,2BAA2B,CAC/CC,SAAiB,EACjBC,SAAgB,EACD;EACf,IACE,CAAC,uBACC,IAAAC,2CAA2B,GAAE,EAC7B,IAAAC,mDAAmC,GAAE,CACtC,EACD;IACAC,iBAAQ,CAACC,IAAI,CACV,oGAAmG,CACrG;IACD;EACF;EAEA,MAAMC,uBAAuB,GAAGF,iBAAQ,CAACG,aAAa,CACnD,8BAA6B,EAC9B;IACEC,UAAU,EAAEP;EACd,CAAC,CACF;EACDK,uBAAuB,CAACG,KAAK,EAAE;EAC/B,IAAI;IACF,MAAMC,eAAe,CAACV,SAAS,CAAC;EAClC,CAAC,CAAC,OAAOW,KAAK,EAAE;IACdL,uBAAuB,CAACM,KAAK,CAAC;MAAEC,EAAE,EAAG,OAAM;MAAEC,OAAO,EAAE,CAAC,CAAC;MAAEH;IAAM,CAAC,CAAC;EACpE,CAAC,SAAS;IACRL,uBAAuB,CAACS,GAAG,EAAE;EAC/B;AACF;AAEA,eAAeL,eAAe,CAACV,SAAiB,EAAiB;EAC/D,MAAMgB,MAAM,GAAG,IAAIC,wBAAU,CAC3BC,OAAO,CAACC,OAAO,CAAE,SAAQ,CAAC,EAC1B;IACEC,UAAU,EAAE,CAAC;IACbC,GAAG,EAAE;MACH;MACA;MACA;MACAC,+BAA+B,EAAG;IACpC,CAAC;IACDC,MAAM,EAAE;EACV,CAAC,CACF;EAED,IAAI;IACF,MAAMP,MAAM,CAACQ,MAAM,CAACC,QAAQ,CAACzB,SAAS,CAAC;EACzC,CAAC,SAAS;IACRgB,MAAM,CAACD,GAAG,EAAE;EACd;AACF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.waitJobsByRequest = waitJobsByRequest;
|
|
5
|
+
exports.waitUntilAllJobsComplete = void 0;
|
|
6
|
+
var _redux = require("../redux");
|
|
7
|
+
var _manager = require("./jobs/manager");
|
|
8
|
+
async function waitJobsV1() {
|
|
9
|
+
return new Promise(resolve => {
|
|
10
|
+
const onEndJob = () => {
|
|
11
|
+
if (_redux.store.getState().jobs.active.length === 0) {
|
|
12
|
+
resolve();
|
|
13
|
+
_redux.emitter.off(`END_JOB`, onEndJob);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
_redux.emitter.on(`END_JOB`, onEndJob);
|
|
17
|
+
onEndJob();
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
const waitUntilAllJobsComplete = () => Promise.all([waitJobsV1(), (0, _manager.waitUntilAllJobsComplete)()]).then();
|
|
21
|
+
exports.waitUntilAllJobsComplete = waitUntilAllJobsComplete;
|
|
22
|
+
async function waitJobsByRequest(requestId) {
|
|
23
|
+
var _jobs$jobsByRequest$g, _jobs$jobsByRequest$g2;
|
|
24
|
+
const jobs = _redux.store.getState().jobsV2;
|
|
25
|
+
const jobDigests = new Set([...((_jobs$jobsByRequest$g = jobs.jobsByRequest.get(requestId)) !== null && _jobs$jobsByRequest$g !== void 0 ? _jobs$jobsByRequest$g : []), ...((_jobs$jobsByRequest$g2 = jobs.jobsByRequest.get(``)) !== null && _jobs$jobsByRequest$g2 !== void 0 ? _jobs$jobsByRequest$g2 : []) // wait for jobs without requestId just in case
|
|
26
|
+
]);
|
|
27
|
+
|
|
28
|
+
await Promise.all([waitJobsV1(), (0, _manager.waitJobs)(jobDigests)]);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=wait-until-jobs-complete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wait-until-jobs-complete.js","names":["waitJobsV1","Promise","resolve","onEndJob","store","getState","jobs","active","length","emitter","off","on","waitUntilAllJobsComplete","all","waitUntilAllJobsV2Complete","then","waitJobsByRequest","requestId","jobsV2","jobDigests","Set","jobsByRequest","get","waitJobsV2"],"sources":["../../src/utils/wait-until-jobs-complete.ts"],"sourcesContent":["import { emitter, store } from \"../redux\"\n\nimport {\n waitJobs as waitJobsV2,\n waitUntilAllJobsComplete as waitUntilAllJobsV2Complete,\n} from \"./jobs/manager\"\n\nasync function waitJobsV1(): Promise<void> {\n return new Promise<void>(resolve => {\n const onEndJob = (): void => {\n if (store.getState().jobs.active.length === 0) {\n resolve()\n emitter.off(`END_JOB`, onEndJob)\n }\n }\n\n emitter.on(`END_JOB`, onEndJob)\n onEndJob()\n })\n}\n\nexport const waitUntilAllJobsComplete = (): Promise<void> =>\n Promise.all([waitJobsV1(), waitUntilAllJobsV2Complete()]).then()\n\nexport async function waitJobsByRequest(requestId: string): Promise<void> {\n const jobs = store.getState().jobsV2\n const jobDigests = new Set([\n ...(jobs.jobsByRequest.get(requestId) ?? []),\n ...(jobs.jobsByRequest.get(``) ?? []), // wait for jobs without requestId just in case\n ])\n await Promise.all([waitJobsV1(), waitJobsV2(jobDigests)])\n}\n"],"mappings":";;;;;AAAA;AAEA;AAKA,eAAeA,UAAU,GAAkB;EACzC,OAAO,IAAIC,OAAO,CAAOC,OAAO,IAAI;IAClC,MAAMC,QAAQ,GAAG,MAAY;MAC3B,IAAIC,YAAK,CAACC,QAAQ,EAAE,CAACC,IAAI,CAACC,MAAM,CAACC,MAAM,KAAK,CAAC,EAAE;QAC7CN,OAAO,EAAE;QACTO,cAAO,CAACC,GAAG,CAAE,SAAQ,EAAEP,QAAQ,CAAC;MAClC;IACF,CAAC;IAEDM,cAAO,CAACE,EAAE,CAAE,SAAQ,EAAER,QAAQ,CAAC;IAC/BA,QAAQ,EAAE;EACZ,CAAC,CAAC;AACJ;AAEO,MAAMS,wBAAwB,GAAG,MACtCX,OAAO,CAACY,GAAG,CAAC,CAACb,UAAU,EAAE,EAAE,IAAAc,iCAA0B,GAAE,CAAC,CAAC,CAACC,IAAI,EAAE;AAAA;AAE3D,eAAeC,iBAAiB,CAACC,SAAiB,EAAiB;EAAA;EACxE,MAAMX,IAAI,GAAGF,YAAK,CAACC,QAAQ,EAAE,CAACa,MAAM;EACpC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAAC,CACzB,6BAAId,IAAI,CAACe,aAAa,CAACC,GAAG,CAACL,SAAS,CAAC,yEAAI,EAAE,CAAC,EAC5C,8BAAIX,IAAI,CAACe,aAAa,CAACC,GAAG,CAAE,EAAC,CAAC,2EAAI,EAAE,CAAC,CAAE;EAAA,CACxC,CAAC;;EACF,MAAMrB,OAAO,CAACY,GAAG,CAAC,CAACb,UAAU,EAAE,EAAE,IAAAuB,iBAAU,EAACJ,UAAU,CAAC,CAAC,CAAC;AAC3D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import webpack from "webpack";
|
|
2
|
+
export declare function build(webpackConfig: webpack.Configuration): Promise<{
|
|
3
|
+
stats: webpack.Stats;
|
|
4
|
+
close: () => Promise<void>;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function watch(webpackConfig: webpack.Configuration, onWatch: (err: Error | webpack.WebpackError | undefined | null, stats: webpack.Stats | undefined) => void, watchOptions?: webpack.Watching["watchOptions"]): {
|
|
7
|
+
watcher: webpack.Watching;
|
|
8
|
+
close: () => Promise<void>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.build = build;
|
|
6
|
+
exports.watch = watch;
|
|
7
|
+
var _webpack = _interopRequireDefault(require("webpack"));
|
|
8
|
+
function build(webpackConfig) {
|
|
9
|
+
const compiler = (0, _webpack.default)(webpackConfig);
|
|
10
|
+
return new Promise((resolve, reject) => {
|
|
11
|
+
compiler.run((err, stats) => {
|
|
12
|
+
// stats can only be empty when an error occurs. Adding it to the if makes typescript happy.
|
|
13
|
+
if (err || !stats) {
|
|
14
|
+
return compiler.close(() => {
|
|
15
|
+
reject(err);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
if (stats.hasErrors()) {
|
|
19
|
+
return compiler.close(() => {
|
|
20
|
+
reject(stats.compilation.errors);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return resolve({
|
|
24
|
+
stats,
|
|
25
|
+
close: () => new Promise((resolve, reject) => compiler.close(err => err ? reject(err) : resolve()))
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function watch(webpackConfig, onWatch, watchOptions = {}) {
|
|
31
|
+
const compiler = (0, _webpack.default)(webpackConfig);
|
|
32
|
+
const watcher = compiler.watch(watchOptions, (err, stats) => {
|
|
33
|
+
// this runs multiple times
|
|
34
|
+
onWatch(err, stats);
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
watcher,
|
|
38
|
+
close: () => new Promise((resolve, reject) => watcher.close(err => err ? reject(err) : resolve()))
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=bundle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle.js","names":["build","webpackConfig","compiler","webpack","Promise","resolve","reject","run","err","stats","close","hasErrors","compilation","errors","watch","onWatch","watchOptions","watcher"],"sources":["../../../src/utils/webpack/bundle.ts"],"sourcesContent":["import webpack from \"webpack\"\n\nexport function build(webpackConfig: webpack.Configuration): Promise<{\n stats: webpack.Stats\n close: () => Promise<void>\n}> {\n const compiler = webpack(webpackConfig)\n\n return new Promise((resolve, reject) => {\n compiler.run((err, stats) => {\n // stats can only be empty when an error occurs. Adding it to the if makes typescript happy.\n if (err || !stats) {\n return compiler.close(() => {\n reject(err)\n })\n }\n\n if (stats.hasErrors()) {\n return compiler.close(() => {\n reject(stats.compilation.errors)\n })\n }\n\n return resolve({\n stats,\n close: (): Promise<void> =>\n new Promise((resolve, reject) =>\n compiler.close(err => (err ? reject(err) : resolve()))\n ),\n })\n })\n })\n}\n\nexport function watch(\n webpackConfig: webpack.Configuration,\n onWatch: (\n err: Error | webpack.WebpackError | undefined | null,\n stats: webpack.Stats | undefined\n ) => void,\n watchOptions: webpack.Watching[\"watchOptions\"] = {}\n): {\n watcher: webpack.Watching\n close: () => Promise<void>\n} {\n const compiler = webpack(webpackConfig)\n\n const watcher = compiler.watch(watchOptions, (err, stats) => {\n // this runs multiple times\n onWatch(err, stats)\n })\n\n return {\n watcher,\n close: (): Promise<void> =>\n new Promise((resolve, reject) =>\n watcher.close(err => (err ? reject(err) : resolve()))\n ),\n }\n}\n"],"mappings":";;;;;;AAAA;AAEO,SAASA,KAAK,CAACC,aAAoC,EAGvD;EACD,MAAMC,QAAQ,GAAG,IAAAC,gBAAO,EAACF,aAAa,CAAC;EAEvC,OAAO,IAAIG,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;IACtCJ,QAAQ,CAACK,GAAG,CAAC,CAACC,GAAG,EAAEC,KAAK,KAAK;MAC3B;MACA,IAAID,GAAG,IAAI,CAACC,KAAK,EAAE;QACjB,OAAOP,QAAQ,CAACQ,KAAK,CAAC,MAAM;UAC1BJ,MAAM,CAACE,GAAG,CAAC;QACb,CAAC,CAAC;MACJ;MAEA,IAAIC,KAAK,CAACE,SAAS,EAAE,EAAE;QACrB,OAAOT,QAAQ,CAACQ,KAAK,CAAC,MAAM;UAC1BJ,MAAM,CAACG,KAAK,CAACG,WAAW,CAACC,MAAM,CAAC;QAClC,CAAC,CAAC;MACJ;MAEA,OAAOR,OAAO,CAAC;QACbI,KAAK;QACLC,KAAK,EAAE,MACL,IAAIN,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAC1BJ,QAAQ,CAACQ,KAAK,CAACF,GAAG,IAAKA,GAAG,GAAGF,MAAM,CAACE,GAAG,CAAC,GAAGH,OAAO,EAAG,CAAC;MAE5D,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ;AAEO,SAASS,KAAK,CACnBb,aAAoC,EACpCc,OAGS,EACTC,YAA8C,GAAG,CAAC,CAAC,EAInD;EACA,MAAMd,QAAQ,GAAG,IAAAC,gBAAO,EAACF,aAAa,CAAC;EAEvC,MAAMgB,OAAO,GAAGf,QAAQ,CAACY,KAAK,CAACE,YAAY,EAAE,CAACR,GAAG,EAAEC,KAAK,KAAK;IAC3D;IACAM,OAAO,CAACP,GAAG,EAAEC,KAAK,CAAC;EACrB,CAAC,CAAC;EAEF,OAAO;IACLQ,OAAO;IACPP,KAAK,EAAE,MACL,IAAIN,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAC1BW,OAAO,CAACP,KAAK,CAACF,GAAG,IAAKA,GAAG,GAAGF,MAAM,CAACE,GAAG,CAAC,GAAGH,OAAO,EAAG,CAAC;EAE3D,CAAC;AACH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type webpack from "webpack";
|
|
2
|
+
import type { IGatsbyState } from "../../internal";
|
|
3
|
+
export declare function getSSRChunkHashes({ stats, components, }: {
|
|
4
|
+
stats: webpack.Stats;
|
|
5
|
+
components: IGatsbyState["components"];
|
|
6
|
+
}): {
|
|
7
|
+
templateHashes: Record<string, string>;
|
|
8
|
+
renderPageHash: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.getSSRChunkHashes = getSSRChunkHashes;
|
|
5
|
+
function getHashes(chunkGroup, compilation, hashes = [], visitedChunkGroups = new Set()) {
|
|
6
|
+
if (visitedChunkGroups.has(chunkGroup)) {
|
|
7
|
+
return hashes;
|
|
8
|
+
}
|
|
9
|
+
visitedChunkGroups.add(chunkGroup);
|
|
10
|
+
for (const chunk of chunkGroup.chunks) {
|
|
11
|
+
if (!chunk.hash) {
|
|
12
|
+
throw new Error(`Invariant: [generating template hashes] Chunk doesn't have hash`);
|
|
13
|
+
}
|
|
14
|
+
hashes.push(chunk.hash);
|
|
15
|
+
}
|
|
16
|
+
for (const childChunkGroup of chunkGroup.childrenIterable) {
|
|
17
|
+
const isNotImportedByAsyncRequires = childChunkGroup.origins.every(origin => !origin.module || !origin.module.identifier().includes(`async-requires`));
|
|
18
|
+
if (isNotImportedByAsyncRequires) {
|
|
19
|
+
getHashes(childChunkGroup, compilation, hashes, visitedChunkGroups);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return hashes;
|
|
23
|
+
}
|
|
24
|
+
function getSSRChunkHashes({
|
|
25
|
+
stats,
|
|
26
|
+
components
|
|
27
|
+
}) {
|
|
28
|
+
const templateHashes = {};
|
|
29
|
+
const componentChunkNameToTemplatePath = {};
|
|
30
|
+
let renderPageHash = ``;
|
|
31
|
+
components.forEach(component => {
|
|
32
|
+
componentChunkNameToTemplatePath[component.componentChunkName] = component.componentPath;
|
|
33
|
+
});
|
|
34
|
+
for (const chunkGroup of stats.compilation.chunkGroups) {
|
|
35
|
+
if (chunkGroup.name) {
|
|
36
|
+
const concenatedChunksByName = getHashes(chunkGroup, stats.compilation).join(`--`);
|
|
37
|
+
if (chunkGroup.name !== `render-page`) {
|
|
38
|
+
const templatePath = componentChunkNameToTemplatePath[chunkGroup.name];
|
|
39
|
+
if (!templatePath) {
|
|
40
|
+
// additional chunk group can be created by lazy imports
|
|
41
|
+
// we handle them by handling children chunk groups on top level ones
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
templateHashes[templatePath] = concenatedChunksByName;
|
|
45
|
+
} else {
|
|
46
|
+
renderPageHash = concenatedChunksByName;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
templateHashes,
|
|
52
|
+
renderPageHash
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=get-ssr-chunk-hashes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-ssr-chunk-hashes.js","names":["getHashes","chunkGroup","compilation","hashes","visitedChunkGroups","Set","has","add","chunk","chunks","hash","Error","push","childChunkGroup","childrenIterable","isNotImportedByAsyncRequires","origins","every","origin","module","identifier","includes","getSSRChunkHashes","stats","components","templateHashes","componentChunkNameToTemplatePath","renderPageHash","forEach","component","componentChunkName","componentPath","chunkGroups","name","concenatedChunksByName","join","templatePath"],"sources":["../../../src/utils/webpack/get-ssr-chunk-hashes.ts"],"sourcesContent":["import type webpack from \"webpack\"\nimport type { IGatsbyState } from \"../../internal\"\n\ntype ChunkGroup = webpack.Compilation[\"chunkGroups\"][0]\n\nfunction getHashes(\n chunkGroup: ChunkGroup,\n compilation: webpack.Compilation,\n hashes: Array<string> = [],\n visitedChunkGroups: Set<ChunkGroup> = new Set()\n): Array<string> {\n if (visitedChunkGroups.has(chunkGroup)) {\n return hashes\n }\n visitedChunkGroups.add(chunkGroup)\n\n for (const chunk of chunkGroup.chunks) {\n if (!chunk.hash) {\n throw new Error(\n `Invariant: [generating template hashes] Chunk doesn't have hash`\n )\n }\n hashes.push(chunk.hash)\n }\n\n for (const childChunkGroup of chunkGroup.childrenIterable) {\n const isNotImportedByAsyncRequires = childChunkGroup.origins.every(\n origin =>\n !origin.module || !origin.module.identifier().includes(`async-requires`)\n )\n\n if (isNotImportedByAsyncRequires) {\n getHashes(childChunkGroup, compilation, hashes, visitedChunkGroups)\n }\n }\n\n return hashes\n}\n\nexport function getSSRChunkHashes({\n stats,\n components,\n}: {\n stats: webpack.Stats\n components: IGatsbyState[\"components\"]\n}): {\n templateHashes: Record<string, string>\n renderPageHash: string\n} {\n const templateHashes: Record<string, string> = {}\n const componentChunkNameToTemplatePath: Record<string, string> = {}\n let renderPageHash = ``\n\n components.forEach(component => {\n componentChunkNameToTemplatePath[component.componentChunkName] =\n component.componentPath\n })\n\n for (const chunkGroup of stats.compilation.chunkGroups) {\n if (chunkGroup.name) {\n const concenatedChunksByName = getHashes(\n chunkGroup,\n stats.compilation\n ).join(`--`)\n\n if (chunkGroup.name !== `render-page`) {\n const templatePath = componentChunkNameToTemplatePath[chunkGroup.name]\n if (!templatePath) {\n // additional chunk group can be created by lazy imports\n // we handle them by handling children chunk groups on top level ones\n continue\n }\n templateHashes[templatePath] = concenatedChunksByName\n } else {\n renderPageHash = concenatedChunksByName\n }\n }\n }\n\n return { templateHashes, renderPageHash }\n}\n"],"mappings":";;;;AAKA,SAASA,SAAS,CAChBC,UAAsB,EACtBC,WAAgC,EAChCC,MAAqB,GAAG,EAAE,EAC1BC,kBAAmC,GAAG,IAAIC,GAAG,EAAE,EAChC;EACf,IAAID,kBAAkB,CAACE,GAAG,CAACL,UAAU,CAAC,EAAE;IACtC,OAAOE,MAAM;EACf;EACAC,kBAAkB,CAACG,GAAG,CAACN,UAAU,CAAC;EAElC,KAAK,MAAMO,KAAK,IAAIP,UAAU,CAACQ,MAAM,EAAE;IACrC,IAAI,CAACD,KAAK,CAACE,IAAI,EAAE;MACf,MAAM,IAAIC,KAAK,CACZ,iEAAgE,CAClE;IACH;IACAR,MAAM,CAACS,IAAI,CAACJ,KAAK,CAACE,IAAI,CAAC;EACzB;EAEA,KAAK,MAAMG,eAAe,IAAIZ,UAAU,CAACa,gBAAgB,EAAE;IACzD,MAAMC,4BAA4B,GAAGF,eAAe,CAACG,OAAO,CAACC,KAAK,CAChEC,MAAM,IACJ,CAACA,MAAM,CAACC,MAAM,IAAI,CAACD,MAAM,CAACC,MAAM,CAACC,UAAU,EAAE,CAACC,QAAQ,CAAE,gBAAe,CAAC,CAC3E;IAED,IAAIN,4BAA4B,EAAE;MAChCf,SAAS,CAACa,eAAe,EAAEX,WAAW,EAAEC,MAAM,EAAEC,kBAAkB,CAAC;IACrE;EACF;EAEA,OAAOD,MAAM;AACf;AAEO,SAASmB,iBAAiB,CAAC;EAChCC,KAAK;EACLC;AAIF,CAAC,EAGC;EACA,MAAMC,cAAsC,GAAG,CAAC,CAAC;EACjD,MAAMC,gCAAwD,GAAG,CAAC,CAAC;EACnE,IAAIC,cAAc,GAAI,EAAC;EAEvBH,UAAU,CAACI,OAAO,CAACC,SAAS,IAAI;IAC9BH,gCAAgC,CAACG,SAAS,CAACC,kBAAkB,CAAC,GAC5DD,SAAS,CAACE,aAAa;EAC3B,CAAC,CAAC;EAEF,KAAK,MAAM9B,UAAU,IAAIsB,KAAK,CAACrB,WAAW,CAAC8B,WAAW,EAAE;IACtD,IAAI/B,UAAU,CAACgC,IAAI,EAAE;MACnB,MAAMC,sBAAsB,GAAGlC,SAAS,CACtCC,UAAU,EACVsB,KAAK,CAACrB,WAAW,CAClB,CAACiC,IAAI,CAAE,IAAG,CAAC;MAEZ,IAAIlC,UAAU,CAACgC,IAAI,KAAM,aAAY,EAAE;QACrC,MAAMG,YAAY,GAAGV,gCAAgC,CAACzB,UAAU,CAACgC,IAAI,CAAC;QACtE,IAAI,CAACG,YAAY,EAAE;UACjB;UACA;UACA;QACF;QACAX,cAAc,CAACW,YAAY,CAAC,GAAGF,sBAAsB;MACvD,CAAC,MAAM;QACLP,cAAc,GAAGO,sBAAsB;MACzC;IACF;EACF;EAEA,OAAO;IAAET,cAAc;IAAEE;EAAe,CAAC;AAC3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
const Template = require(`webpack/lib/Template`);
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Loader that creates virtual file with imports to client components
|
|
8
|
+
*/
|
|
9
|
+
module.exports = function virtual() {
|
|
10
|
+
const {
|
|
11
|
+
modules
|
|
12
|
+
} = this.getOptions();
|
|
13
|
+
const requests = modules.split(`,`);
|
|
14
|
+
const code = requests.filter(Boolean)
|
|
15
|
+
// Filter out css files on the server
|
|
16
|
+
.map(request => {
|
|
17
|
+
const chunkName = Template.toPath(request);
|
|
18
|
+
return `import(/* webpackChunkName: "${chunkName}" */ ${JSON.stringify(request)})`;
|
|
19
|
+
}).join(`;\n`);
|
|
20
|
+
return code;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=client-components-requires-writer-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-components-requires-writer-loader.js","names":["Template","require","module","exports","virtual","modules","getOptions","requests","split","code","filter","Boolean","map","request","chunkName","toPath","JSON","stringify","join"],"sources":["../../../../src/utils/webpack/loaders/client-components-requires-writer-loader.ts"],"sourcesContent":["import { LoaderContext } from \"webpack\"\n\nconst Template = require(`webpack/lib/Template`)\n\n/**\n * Loader that creates virtual file with imports to client components\n */\nmodule.exports = function virtual(\n this: LoaderContext<{\n modules: string\n }>\n): string {\n const { modules } = this.getOptions()\n\n const requests = modules.split(`,`)\n\n const code = requests\n .filter(Boolean)\n // Filter out css files on the server\n .map(request => {\n const chunkName = Template.toPath(request)\n\n return `import(/* webpackChunkName: \"${chunkName}\" */ ${JSON.stringify(\n request\n )})`\n })\n .join(`;\\n`)\n\n return code\n}\n"],"mappings":";;;AAEA,MAAMA,QAAQ,GAAGC,OAAO,CAAE,sBAAqB,CAAC;;AAEhD;AACA;AACA;AACAC,MAAM,CAACC,OAAO,GAAG,SAASC,OAAO,GAIvB;EACR,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAI,CAACC,UAAU,EAAE;EAErC,MAAMC,QAAQ,GAAGF,OAAO,CAACG,KAAK,CAAE,GAAE,CAAC;EAEnC,MAAMC,IAAI,GAAGF,QAAQ,CAClBG,MAAM,CAACC,OAAO;EACf;EAAA,CACCC,GAAG,CAACC,OAAO,IAAI;IACd,MAAMC,SAAS,GAAGd,QAAQ,CAACe,MAAM,CAACF,OAAO,CAAC;IAE1C,OAAQ,gCAA+BC,SAAU,QAAOE,IAAI,CAACC,SAAS,CACpEJ,OAAO,CACP,GAAE;EACN,CAAC,CAAC,CACDK,IAAI,CAAE,KAAI,CAAC;EAEd,OAAOT,IAAI;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _acornLoose = require("acorn-loose");
|
|
4
|
+
var _acornWalk = require("acorn-walk");
|
|
5
|
+
var _createNormalizedModuleKey = require("../utils/create-normalized-module-key");
|
|
6
|
+
/* eslint-disable @babel/no-invalid-this */
|
|
7
|
+
|
|
8
|
+
function createNamedReference(name, normalizedModuleKey) {
|
|
9
|
+
return `export const ${name} = {
|
|
10
|
+
$$typeof: Symbol.for('react.module.reference'),
|
|
11
|
+
filepath: '${normalizedModuleKey}',
|
|
12
|
+
name: '${name}'
|
|
13
|
+
}`;
|
|
14
|
+
}
|
|
15
|
+
function createDefaultReference(name, normalizedModuleKey) {
|
|
16
|
+
return `export default {
|
|
17
|
+
$$typeof: Symbol.for('react.module.reference'),
|
|
18
|
+
filepath: '${normalizedModuleKey}',
|
|
19
|
+
name: '${name}'
|
|
20
|
+
}`;
|
|
21
|
+
}
|
|
22
|
+
const partialHydrationReferenceLoader = async function partialHydrationReferenceLoader(content) {
|
|
23
|
+
if (!content.includes(`use client`)) {
|
|
24
|
+
return content;
|
|
25
|
+
}
|
|
26
|
+
const references = [];
|
|
27
|
+
let hasClientExportDirective = false;
|
|
28
|
+
const normalizedModuleKey = (0, _createNormalizedModuleKey.createNormalizedModuleKey)(this.resourcePath, this.rootContext);
|
|
29
|
+
(0, _acornWalk.simple)((0, _acornLoose.parse)(content, {
|
|
30
|
+
ecmaVersion: 2020,
|
|
31
|
+
sourceType: `module`
|
|
32
|
+
}), {
|
|
33
|
+
ExpressionStatement(plainAcornNode) {
|
|
34
|
+
const node = plainAcornNode;
|
|
35
|
+
if (node.directive === `use client`) {
|
|
36
|
+
hasClientExportDirective = true;
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
ExportNamedDeclaration(plainAcornNode) {
|
|
40
|
+
var _node$declaration, _node$declaration$id;
|
|
41
|
+
const node = plainAcornNode;
|
|
42
|
+
if (!hasClientExportDirective) return;
|
|
43
|
+
|
|
44
|
+
// Handle cases shown in `fixtures/esm-declaration.js`
|
|
45
|
+
switch (node === null || node === void 0 ? void 0 : (_node$declaration = node.declaration) === null || _node$declaration === void 0 ? void 0 : _node$declaration.type) {
|
|
46
|
+
case `VariableDeclaration`:
|
|
47
|
+
for (const {
|
|
48
|
+
id
|
|
49
|
+
} of node.declaration.declarations || []) {
|
|
50
|
+
if (id.type === `Identifier` && id.name) {
|
|
51
|
+
references.push(createNamedReference(id.name, normalizedModuleKey));
|
|
52
|
+
}
|
|
53
|
+
if (id.type === `ObjectPattern`) {
|
|
54
|
+
// @ts-ignore Wrong type
|
|
55
|
+
for (const {
|
|
56
|
+
value
|
|
57
|
+
} of id.properties) {
|
|
58
|
+
if (value.type === `Identifier` && value.name) {
|
|
59
|
+
references.push(createNamedReference(value.name, normalizedModuleKey));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (id.type === `ArrayPattern`) {
|
|
64
|
+
for (const element of id.elements || []) {
|
|
65
|
+
if ((element === null || element === void 0 ? void 0 : element.type) === `Identifier` && element.name) {
|
|
66
|
+
references.push(createNamedReference(element.name, normalizedModuleKey));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
break;
|
|
72
|
+
case `FunctionDeclaration`:
|
|
73
|
+
case `ClassDeclaration`:
|
|
74
|
+
if (((_node$declaration$id = node.declaration.id) === null || _node$declaration$id === void 0 ? void 0 : _node$declaration$id.type) === `Identifier` && node.declaration.id.name) {
|
|
75
|
+
references.push(createNamedReference(node.declaration.id.name, normalizedModuleKey));
|
|
76
|
+
}
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Handle cases shown in `fixtures/esm-list.js`
|
|
81
|
+
if (node.specifiers.length) {
|
|
82
|
+
for (const specifier of node.specifiers) {
|
|
83
|
+
if (specifier.type === `ExportSpecifier` && specifier.exported.type === `Identifier` && specifier.exported.name) {
|
|
84
|
+
if (specifier.exported.name === `default`) {
|
|
85
|
+
references.push(createDefaultReference(`default`, normalizedModuleKey));
|
|
86
|
+
} else {
|
|
87
|
+
references.push(createNamedReference(specifier.exported.name, normalizedModuleKey));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
ExportDefaultDeclaration(plainAcornNode) {
|
|
94
|
+
const node = plainAcornNode;
|
|
95
|
+
if (!hasClientExportDirective) return;
|
|
96
|
+
switch (node.declaration.type) {
|
|
97
|
+
// Handle cases shown in `fixtures/esm-default-expression.js`
|
|
98
|
+
case `Identifier`:
|
|
99
|
+
if (node.declaration.name) {
|
|
100
|
+
references.push(createDefaultReference(`default`, normalizedModuleKey));
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
case `FunctionDeclaration`:
|
|
104
|
+
case `ClassDeclaration`:
|
|
105
|
+
references.push(createDefaultReference(`default`, normalizedModuleKey));
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
// TODO: Explore how to only walk top level tokens
|
|
110
|
+
AssignmentExpression(plainAcornNode) {
|
|
111
|
+
var _left$object, _left$object2, _left$property, _left$property2;
|
|
112
|
+
const node = plainAcornNode;
|
|
113
|
+
const {
|
|
114
|
+
left
|
|
115
|
+
} = node;
|
|
116
|
+
if (!hasClientExportDirective) return;
|
|
117
|
+
|
|
118
|
+
// Handle cases shown in `fixtures/cjs-exports.js`
|
|
119
|
+
if ((left === null || left === void 0 ? void 0 : left.type) === `MemberExpression` && (left === null || left === void 0 ? void 0 : (_left$object = left.object) === null || _left$object === void 0 ? void 0 : _left$object.type) === `Identifier` && ((_left$object2 = left.object) === null || _left$object2 === void 0 ? void 0 : _left$object2.name) === `exports` && (left === null || left === void 0 ? void 0 : (_left$property = left.property) === null || _left$property === void 0 ? void 0 : _left$property.type) === `Identifier` && (_left$property2 = left.property) !== null && _left$property2 !== void 0 && _left$property2.name) {
|
|
120
|
+
references.push(createNamedReference(left.property.name, normalizedModuleKey));
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
return hasClientExportDirective ? references.join(`\n`) : content;
|
|
125
|
+
};
|
|
126
|
+
module.exports = partialHydrationReferenceLoader;
|
|
127
|
+
//# sourceMappingURL=partial-hydration-reference-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial-hydration-reference-loader.js","names":["createNamedReference","name","normalizedModuleKey","createDefaultReference","partialHydrationReferenceLoader","content","includes","references","hasClientExportDirective","createNormalizedModuleKey","resourcePath","rootContext","walk","parse","ecmaVersion","sourceType","ExpressionStatement","plainAcornNode","node","directive","ExportNamedDeclaration","declaration","type","id","declarations","push","value","properties","element","elements","specifiers","length","specifier","exported","ExportDefaultDeclaration","AssignmentExpression","left","object","property","join","module","exports"],"sources":["../../../../src/utils/webpack/loaders/partial-hydration-reference-loader.ts"],"sourcesContent":["/* eslint-disable @babel/no-invalid-this */\nimport { parse } from \"acorn-loose\"\nimport { simple as walk } from \"acorn-walk\"\nimport type { LoaderDefinitionFunction } from \"webpack\"\nimport type { Node } from \"acorn-loose\"\nimport type {\n ExportNamedDeclaration,\n ExportDefaultDeclaration,\n AssignmentExpression,\n Directive,\n} from \"estree\"\nimport { createNormalizedModuleKey } from \"../utils/create-normalized-module-key\"\n\nfunction createNamedReference(\n name: string,\n normalizedModuleKey: string\n): string {\n return `export const ${name} = {\n $$typeof: Symbol.for('react.module.reference'),\n filepath: '${normalizedModuleKey}',\n name: '${name}'\n }`\n}\n\nfunction createDefaultReference(\n name: string,\n normalizedModuleKey: string\n): string {\n return `export default {\n $$typeof: Symbol.for('react.module.reference'),\n filepath: '${normalizedModuleKey}',\n name: '${name}'\n }`\n}\n\nconst partialHydrationReferenceLoader: LoaderDefinitionFunction<\n Record<string, unknown>\n> = async function partialHydrationReferenceLoader(content) {\n if (!content.includes(`use client`)) {\n return content\n }\n\n const references: Array<string> = []\n let hasClientExportDirective = false\n\n const normalizedModuleKey = createNormalizedModuleKey(\n this.resourcePath,\n this.rootContext\n )\n\n walk(parse(content, { ecmaVersion: 2020, sourceType: `module` }), {\n ExpressionStatement(plainAcornNode: Node) {\n const node = plainAcornNode as unknown as Directive\n\n if (node.directive === `use client`) {\n hasClientExportDirective = true\n }\n },\n ExportNamedDeclaration(plainAcornNode: Node) {\n const node = plainAcornNode as unknown as ExportNamedDeclaration\n\n if (!hasClientExportDirective) return\n\n // Handle cases shown in `fixtures/esm-declaration.js`\n switch (node?.declaration?.type) {\n case `VariableDeclaration`:\n for (const { id } of node.declaration.declarations || []) {\n if (id.type === `Identifier` && id.name) {\n references.push(\n createNamedReference(id.name, normalizedModuleKey)\n )\n }\n\n if (id.type === `ObjectPattern`) {\n // @ts-ignore Wrong type\n for (const { value } of id.properties) {\n if (value.type === `Identifier` && value.name) {\n references.push(\n createNamedReference(value.name, normalizedModuleKey)\n )\n }\n }\n }\n\n if (id.type === `ArrayPattern`) {\n for (const element of id.elements || []) {\n if (element?.type === `Identifier` && element.name) {\n references.push(\n createNamedReference(element.name, normalizedModuleKey)\n )\n }\n }\n }\n }\n break\n case `FunctionDeclaration`:\n case `ClassDeclaration`:\n if (\n node.declaration.id?.type === `Identifier` &&\n node.declaration.id.name\n ) {\n references.push(\n createNamedReference(\n node.declaration.id.name,\n normalizedModuleKey\n )\n )\n }\n break\n }\n\n // Handle cases shown in `fixtures/esm-list.js`\n if (node.specifiers.length) {\n for (const specifier of node.specifiers) {\n if (\n specifier.type === `ExportSpecifier` &&\n specifier.exported.type === `Identifier` &&\n specifier.exported.name\n ) {\n if (specifier.exported.name === `default`) {\n references.push(\n createDefaultReference(`default`, normalizedModuleKey)\n )\n } else {\n references.push(\n createNamedReference(\n specifier.exported.name,\n normalizedModuleKey\n )\n )\n }\n }\n }\n }\n },\n ExportDefaultDeclaration(plainAcornNode: Node) {\n const node = plainAcornNode as unknown as ExportDefaultDeclaration\n\n if (!hasClientExportDirective) return\n\n switch (node.declaration.type) {\n // Handle cases shown in `fixtures/esm-default-expression.js`\n case `Identifier`:\n if (node.declaration.name) {\n references.push(\n createDefaultReference(`default`, normalizedModuleKey)\n )\n }\n break\n case `FunctionDeclaration`:\n case `ClassDeclaration`:\n references.push(\n createDefaultReference(`default`, normalizedModuleKey)\n )\n break\n }\n },\n // TODO: Explore how to only walk top level tokens\n AssignmentExpression(plainAcornNode) {\n const node = plainAcornNode as unknown as AssignmentExpression\n const { left } = node\n\n if (!hasClientExportDirective) return\n\n // Handle cases shown in `fixtures/cjs-exports.js`\n if (\n left?.type === `MemberExpression` &&\n left?.object?.type === `Identifier` &&\n left.object?.name === `exports` &&\n left?.property?.type === `Identifier` &&\n left.property?.name\n ) {\n references.push(\n createNamedReference(left.property.name, normalizedModuleKey)\n )\n }\n },\n })\n\n return hasClientExportDirective ? references.join(`\\n`) : content\n}\n\nmodule.exports = partialHydrationReferenceLoader\n"],"mappings":"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"}
|