@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,452 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.onCreateDevServer = onCreateDevServer;
|
|
6
|
+
exports.onPreBootstrap = onPreBootstrap;
|
|
7
|
+
var _unionBy2 = _interopRequireDefault(require("lodash/unionBy"));
|
|
8
|
+
var _kebabCase2 = _interopRequireDefault(require("lodash/kebabCase"));
|
|
9
|
+
var _union2 = _interopRequireDefault(require("lodash/union"));
|
|
10
|
+
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
11
|
+
var _glob = _interopRequireDefault(require("glob"));
|
|
12
|
+
var _path2 = _interopRequireDefault(require("path"));
|
|
13
|
+
var _webpack = _interopRequireDefault(require("webpack"));
|
|
14
|
+
var _gatsbyCoreUtils = require("gatsby-core-utils");
|
|
15
|
+
var _formatWebpackMessages = _interopRequireDefault(require("react-dev-utils/formatWebpackMessages"));
|
|
16
|
+
var _dotenv = _interopRequireDefault(require("dotenv"));
|
|
17
|
+
var _chokidar = _interopRequireDefault(require("chokidar"));
|
|
18
|
+
var _webpackErrorUtils = require("../../utils/webpack-error-utils");
|
|
19
|
+
var _actions = require("../../redux/actions");
|
|
20
|
+
var _middleware = require("./middleware");
|
|
21
|
+
var _module = _interopRequireDefault(require("module"));
|
|
22
|
+
const isProductionEnv = process.env.gatsby_executing_command !== `develop`;
|
|
23
|
+
// During development, we lazily compile functions only when they're requested.
|
|
24
|
+
// Here we keep track of which functions have been requested so are "active"
|
|
25
|
+
const activeDevelopmentFunctions = new Set();
|
|
26
|
+
let activeEntries = {};
|
|
27
|
+
async function ensureFunctionIsCompiled(functionObj, compiledFunctionsDir) {
|
|
28
|
+
// stat the compiled function. If it's there, then return.
|
|
29
|
+
let compiledFileExists = false;
|
|
30
|
+
try {
|
|
31
|
+
compiledFileExists = !!(await _fsExtra.default.stat(functionObj.absoluteCompiledFilePath));
|
|
32
|
+
} catch (e) {
|
|
33
|
+
// ignore
|
|
34
|
+
}
|
|
35
|
+
if (compiledFileExists) {
|
|
36
|
+
return;
|
|
37
|
+
} else {
|
|
38
|
+
// Otherwise, restart webpack by touching the file and watch for the file to be
|
|
39
|
+
// compiled.
|
|
40
|
+
const time = new Date();
|
|
41
|
+
_fsExtra.default.utimesSync(functionObj.originalAbsoluteFilePath, time, time);
|
|
42
|
+
await new Promise(resolve => {
|
|
43
|
+
const watcher = _chokidar.default
|
|
44
|
+
// Watch the root of the compiled function directory in .cache as chokidar
|
|
45
|
+
// can't watch files in directories that don't yet exist.
|
|
46
|
+
.watch(compiledFunctionsDir).on(`add`, async _path => {
|
|
47
|
+
if (_path === functionObj.absoluteCompiledFilePath) {
|
|
48
|
+
await watcher.close();
|
|
49
|
+
resolve(null);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Create glob type w/ glob, plugin name, root path
|
|
57
|
+
const createGlobArray = (siteDirectoryPath, plugins) => {
|
|
58
|
+
const globs = [];
|
|
59
|
+
function globIgnorePatterns(root, pluginName) {
|
|
60
|
+
const nestedFolder = pluginName ? `/${pluginName}/**/` : `/**/`;
|
|
61
|
+
return [`${root}/src/api${nestedFolder}__tests__/**/*.+(js|ts)`,
|
|
62
|
+
// Jest tests
|
|
63
|
+
`${root}/src/api${nestedFolder}+(*.)+(spec|test).+(js|ts)`, `${root}/src/api${nestedFolder}+(*.)+(d).ts` // .d.ts files
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Add the default site src/api directory.
|
|
68
|
+
globs.push({
|
|
69
|
+
globPattern: `${siteDirectoryPath}/src/api/**/*.{js,ts}`,
|
|
70
|
+
ignorePattern: globIgnorePatterns(siteDirectoryPath),
|
|
71
|
+
rootPath: _path2.default.join(siteDirectoryPath, `src/api`),
|
|
72
|
+
pluginName: `default-site-plugin`
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Add each plugin
|
|
76
|
+
plugins.forEach(plugin => {
|
|
77
|
+
// Ignore the "default" site plugin (aka the src tree) as we're
|
|
78
|
+
// already watching that.
|
|
79
|
+
if (plugin.name === `default-site-plugin`) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
// Ignore any plugins we include by default. In the very unlikely case
|
|
83
|
+
// we want to ship default functions, we'll special case add them. In the
|
|
84
|
+
// meantime, we'll avoid extra FS IO.
|
|
85
|
+
if (plugin.resolve.includes(`internal-plugin`)) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (plugin.resolve.includes(`gatsby-plugin-typescript`)) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (plugin.resolve.includes(`gatsby-plugin-page-creator`)) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const glob = {
|
|
95
|
+
globPattern: `${plugin.resolve}/src/api/${plugin.name}/**/*.{js,ts}`,
|
|
96
|
+
ignorePattern: globIgnorePatterns(plugin.resolve, plugin.name),
|
|
97
|
+
rootPath: _path2.default.join(plugin.resolve, `src/api`),
|
|
98
|
+
pluginName: plugin.name
|
|
99
|
+
};
|
|
100
|
+
globs.push(glob);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// Only return unique paths
|
|
104
|
+
return (0, _union2.default)(globs);
|
|
105
|
+
};
|
|
106
|
+
async function globAsync(pattern, options = {}) {
|
|
107
|
+
return await new Promise((resolve, reject) => {
|
|
108
|
+
(0, _glob.default)(pattern, options, (err, files) => {
|
|
109
|
+
if (err) {
|
|
110
|
+
reject(err);
|
|
111
|
+
} else {
|
|
112
|
+
resolve(files);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
const createWebpackConfig = async ({
|
|
118
|
+
siteDirectoryPath,
|
|
119
|
+
store,
|
|
120
|
+
reporter
|
|
121
|
+
}) => {
|
|
122
|
+
const compiledFunctionsDir = _path2.default.join(siteDirectoryPath, `.cache`, `functions`);
|
|
123
|
+
const globs = createGlobArray(siteDirectoryPath, store.getState().flattenedPlugins);
|
|
124
|
+
const seenFunctionIds = new Set();
|
|
125
|
+
// Glob and return object with relative/absolute paths + which plugin
|
|
126
|
+
// they belong to.
|
|
127
|
+
const allFunctions = await Promise.all(globs.map(async glob => {
|
|
128
|
+
const knownFunctions = [];
|
|
129
|
+
const files = await globAsync(glob.globPattern, {
|
|
130
|
+
ignore: glob.ignorePattern
|
|
131
|
+
});
|
|
132
|
+
files.map(file => {
|
|
133
|
+
const originalAbsoluteFilePath = file;
|
|
134
|
+
const originalRelativeFilePath = _path2.default.relative(glob.rootPath, file);
|
|
135
|
+
const {
|
|
136
|
+
dir,
|
|
137
|
+
name
|
|
138
|
+
} = _path2.default.parse(originalRelativeFilePath);
|
|
139
|
+
// Ignore the original extension as all compiled functions now end with js.
|
|
140
|
+
const compiledFunctionName = _path2.default.join(dir, name + `.js`);
|
|
141
|
+
const compiledPath = _path2.default.join(compiledFunctionsDir, compiledFunctionName);
|
|
142
|
+
const finalName = (0, _gatsbyCoreUtils.urlResolve)(dir, name === `index` ? `` : name);
|
|
143
|
+
|
|
144
|
+
// functionId should have only alphanumeric characters and dashes
|
|
145
|
+
const functionIdBase = (0, _kebabCase2.default)(compiledFunctionName).replace(/[^a-zA-Z0-9-]/g, `-`);
|
|
146
|
+
let functionId = functionIdBase;
|
|
147
|
+
if (seenFunctionIds.has(functionId)) {
|
|
148
|
+
let counter = 2;
|
|
149
|
+
do {
|
|
150
|
+
functionId = `${functionIdBase}-${counter}`;
|
|
151
|
+
counter++;
|
|
152
|
+
} while (seenFunctionIds.has(functionId));
|
|
153
|
+
}
|
|
154
|
+
knownFunctions.push({
|
|
155
|
+
functionRoute: finalName,
|
|
156
|
+
pluginName: glob.pluginName,
|
|
157
|
+
originalAbsoluteFilePath,
|
|
158
|
+
originalRelativeFilePath,
|
|
159
|
+
relativeCompiledFilePath: compiledFunctionName,
|
|
160
|
+
absoluteCompiledFilePath: compiledPath,
|
|
161
|
+
matchPath: (0, _gatsbyCoreUtils.getMatchPath)(finalName),
|
|
162
|
+
functionId
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
return knownFunctions;
|
|
166
|
+
}));
|
|
167
|
+
|
|
168
|
+
// Combine functions by the route name so that functions in the default
|
|
169
|
+
// functions directory can override the plugin's implementations.
|
|
170
|
+
// @ts-ignore - Seems like a TS bug: https://github.com/microsoft/TypeScript/issues/28010#issuecomment-713484584
|
|
171
|
+
const knownFunctions = (0, _unionBy2.default)(...allFunctions, func => func.functionRoute);
|
|
172
|
+
store.dispatch(_actions.internalActions.setFunctions(knownFunctions));
|
|
173
|
+
|
|
174
|
+
// Write out manifest for use by `gatsby serve` and plugins
|
|
175
|
+
_fsExtra.default.writeFileSync(_path2.default.join(compiledFunctionsDir, `manifest.json`), JSON.stringify(knownFunctions, null, 4));
|
|
176
|
+
const {
|
|
177
|
+
config: {
|
|
178
|
+
pathPrefix
|
|
179
|
+
},
|
|
180
|
+
program
|
|
181
|
+
} = store.getState();
|
|
182
|
+
|
|
183
|
+
// Load environment variables from process.env.* and .env.* files.
|
|
184
|
+
// Logic is shared with webpack.config.js
|
|
185
|
+
|
|
186
|
+
// node env should be DEVELOPMENT | PRODUCTION as these are commonly used in node land
|
|
187
|
+
const nodeEnv = process.env.NODE_ENV || `development`;
|
|
188
|
+
// config env is dependent on the env that it's run, this can be anything from staging-production
|
|
189
|
+
// this allows you to set use different .env environments or conditions in gatsby files
|
|
190
|
+
const configEnv = process.env.GATSBY_ACTIVE_ENV || nodeEnv;
|
|
191
|
+
const envFile = _path2.default.join(siteDirectoryPath, `./.env.${configEnv}`);
|
|
192
|
+
let parsed = {};
|
|
193
|
+
try {
|
|
194
|
+
parsed = _dotenv.default.parse(_fsExtra.default.readFileSync(envFile, {
|
|
195
|
+
encoding: `utf8`
|
|
196
|
+
}));
|
|
197
|
+
} catch (err) {
|
|
198
|
+
if (err.code !== `ENOENT`) {
|
|
199
|
+
reporter.error(`There was a problem processing the .env file (${envFile})`, err);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
const envObject = Object.keys(parsed).reduce((acc, key) => {
|
|
203
|
+
acc[key] = JSON.stringify(parsed[key]);
|
|
204
|
+
return acc;
|
|
205
|
+
}, {});
|
|
206
|
+
const varsFromProcessEnv = Object.keys(process.env).reduce((acc, key) => {
|
|
207
|
+
acc[key] = JSON.stringify(process.env[key]);
|
|
208
|
+
return acc;
|
|
209
|
+
}, {});
|
|
210
|
+
|
|
211
|
+
// Don't allow overwriting of NODE_ENV, PUBLIC_DIR as to not break gatsby things
|
|
212
|
+
envObject.NODE_ENV = JSON.stringify(nodeEnv);
|
|
213
|
+
envObject.PUBLIC_DIR = JSON.stringify(`${siteDirectoryPath}/public`);
|
|
214
|
+
const mergedEnvVars = Object.assign(envObject, varsFromProcessEnv);
|
|
215
|
+
const processEnvVars = Object.keys(mergedEnvVars).reduce((acc, key) => {
|
|
216
|
+
acc[`process.env.${key}`] = mergedEnvVars[key];
|
|
217
|
+
return acc;
|
|
218
|
+
}, {
|
|
219
|
+
"process.env": `({})`
|
|
220
|
+
});
|
|
221
|
+
const entries = {};
|
|
222
|
+
const precompileDevFunctions = isProductionEnv || process.env.GATSBY_PRECOMPILE_DEVELOP_FUNCTIONS === `true` || process.env.GATSBY_PRECOMPILE_DEVELOP_FUNCTIONS === `1`;
|
|
223
|
+
const functionsList = precompileDevFunctions ? knownFunctions : activeDevelopmentFunctions;
|
|
224
|
+
functionsList.forEach(functionObj => {
|
|
225
|
+
var _functionObj$matchPat;
|
|
226
|
+
// Get path without the extension (as it could be ts or js)
|
|
227
|
+
const parsedFile = _path2.default.parse(functionObj.originalRelativeFilePath);
|
|
228
|
+
const compiledNameWithoutExtension = _path2.default.join(parsedFile.dir, parsedFile.name);
|
|
229
|
+
let entryToTheFunction = functionObj.originalAbsoluteFilePath;
|
|
230
|
+
// we wrap user defined function with our preamble that handles matchPath as well as body parsing
|
|
231
|
+
// see api-function-webpack-loader.ts for more info
|
|
232
|
+
entryToTheFunction += `?matchPath=` + ((_functionObj$matchPat = functionObj.matchPath) !== null && _functionObj$matchPat !== void 0 ? _functionObj$matchPat : ``);
|
|
233
|
+
entries[compiledNameWithoutExtension] = entryToTheFunction;
|
|
234
|
+
});
|
|
235
|
+
activeEntries = entries;
|
|
236
|
+
const stage = isProductionEnv ? `functions-production` : `functions-development`;
|
|
237
|
+
const gatsbyPluginTSRequire = _module.default.createRequire(require.resolve(`gatsby-plugin-typescript`));
|
|
238
|
+
return {
|
|
239
|
+
entry: entries,
|
|
240
|
+
output: {
|
|
241
|
+
path: compiledFunctionsDir,
|
|
242
|
+
filename: `[name].js`,
|
|
243
|
+
libraryTarget: `commonjs2`
|
|
244
|
+
},
|
|
245
|
+
target: `node`,
|
|
246
|
+
// Minification is expensive and not as helpful for serverless functions.
|
|
247
|
+
optimization: {
|
|
248
|
+
minimize: false
|
|
249
|
+
},
|
|
250
|
+
// Resolve files ending with .ts and the default extensions of .js, .json, .wasm
|
|
251
|
+
resolve: {
|
|
252
|
+
extensions: [`.ts`, `...`]
|
|
253
|
+
},
|
|
254
|
+
// Have webpack save its cache to the .cache/webpack directory
|
|
255
|
+
cache: {
|
|
256
|
+
type: `filesystem`,
|
|
257
|
+
name: stage,
|
|
258
|
+
cacheLocation: _path2.default.join(siteDirectoryPath, `.cache`, `webpack`, `stage-` + stage)
|
|
259
|
+
},
|
|
260
|
+
mode: isProductionEnv ? `production` : `development`,
|
|
261
|
+
// watch: !isProductionEnv,
|
|
262
|
+
module: {
|
|
263
|
+
rules: [
|
|
264
|
+
// Webpack expects extensions when importing ESM modules as that's what the spec describes.
|
|
265
|
+
// Not all libraries have adapted so we don't enforce its behaviour
|
|
266
|
+
// @see https://github.com/webpack/webpack/issues/11467
|
|
267
|
+
{
|
|
268
|
+
test: /\.[tj]sx?$/,
|
|
269
|
+
resourceQuery: /matchPath/,
|
|
270
|
+
use: {
|
|
271
|
+
loader: require.resolve(`./api-function-webpack-loader`)
|
|
272
|
+
}
|
|
273
|
+
}, {
|
|
274
|
+
test: /\.mjs$/i,
|
|
275
|
+
resolve: {
|
|
276
|
+
byDependency: {
|
|
277
|
+
esm: {
|
|
278
|
+
fullySpecified: false
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}, {
|
|
283
|
+
test: /\.js$/i,
|
|
284
|
+
descriptionData: {
|
|
285
|
+
type: `module`
|
|
286
|
+
},
|
|
287
|
+
resolve: {
|
|
288
|
+
byDependency: {
|
|
289
|
+
esm: {
|
|
290
|
+
fullySpecified: false
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
use: {
|
|
295
|
+
loader: require.resolve(`babel-loader`),
|
|
296
|
+
options: {
|
|
297
|
+
presets: [gatsbyPluginTSRequire.resolve(`@babel/preset-typescript`)]
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}, {
|
|
301
|
+
test: [/.js$/, /.ts$/],
|
|
302
|
+
exclude: /node_modules/,
|
|
303
|
+
use: {
|
|
304
|
+
loader: require.resolve(`babel-loader`),
|
|
305
|
+
options: {
|
|
306
|
+
presets: [gatsbyPluginTSRequire.resolve(`@babel/preset-typescript`)]
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}]
|
|
310
|
+
},
|
|
311
|
+
plugins: [new _webpack.default.DefinePlugin({
|
|
312
|
+
PREFIX_TO_STRIP: JSON.stringify(program.prefixPaths ? pathPrefix === null || pathPrefix === void 0 ? void 0 : pathPrefix.replace(/(^\/+|\/+$)/g, ``) : ``),
|
|
313
|
+
...processEnvVars
|
|
314
|
+
}), new _webpack.default.IgnorePlugin({
|
|
315
|
+
checkResource(resource) {
|
|
316
|
+
if (resource === `lmdb`) {
|
|
317
|
+
reporter.warn(`LMDB and other modules with native dependencies are not supported in Gatsby Functions.\nIf you are importing utils from \`gatsby-core-utils\`, make sure to import from a specific module (for example \`gatsby-core-utils/create-content-digest\`).`);
|
|
318
|
+
return true;
|
|
319
|
+
}
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
})]
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
let isFirstBuild = true;
|
|
326
|
+
async function onPreBootstrap({
|
|
327
|
+
reporter,
|
|
328
|
+
store,
|
|
329
|
+
parentSpan
|
|
330
|
+
}) {
|
|
331
|
+
const activity = reporter.activityTimer(`Compiling Gatsby Functions`, {
|
|
332
|
+
parentSpan
|
|
333
|
+
});
|
|
334
|
+
activity.start();
|
|
335
|
+
const {
|
|
336
|
+
program: {
|
|
337
|
+
directory: siteDirectoryPath
|
|
338
|
+
}
|
|
339
|
+
} = store.getState();
|
|
340
|
+
const compiledFunctionsDir = _path2.default.join(siteDirectoryPath, `.cache`, `functions`);
|
|
341
|
+
await _fsExtra.default.ensureDir(compiledFunctionsDir);
|
|
342
|
+
await _fsExtra.default.emptyDir(compiledFunctionsDir);
|
|
343
|
+
try {
|
|
344
|
+
// We do this ungainly thing as we need to make accessible
|
|
345
|
+
// the resolve/reject functions to our shared callback function
|
|
346
|
+
// eslint-disable-next-line
|
|
347
|
+
await new Promise(async (resolve, reject) => {
|
|
348
|
+
const config = await createWebpackConfig({
|
|
349
|
+
siteDirectoryPath,
|
|
350
|
+
store,
|
|
351
|
+
reporter
|
|
352
|
+
});
|
|
353
|
+
function callback(err, stats) {
|
|
354
|
+
const rawMessages = stats === null || stats === void 0 ? void 0 : stats.toJson({
|
|
355
|
+
all: false,
|
|
356
|
+
warnings: true,
|
|
357
|
+
errors: true
|
|
358
|
+
});
|
|
359
|
+
if (rawMessages !== null && rawMessages !== void 0 && rawMessages.warnings && rawMessages.warnings.length > 0) {
|
|
360
|
+
(0, _webpackErrorUtils.reportWebpackWarnings)(rawMessages.warnings, reporter);
|
|
361
|
+
}
|
|
362
|
+
if (err) return reject(err);
|
|
363
|
+
const errors = (stats === null || stats === void 0 ? void 0 : stats.compilation.errors) || [];
|
|
364
|
+
|
|
365
|
+
// If there's errors, reject in production and print to the console
|
|
366
|
+
// in development.
|
|
367
|
+
if (isProductionEnv) {
|
|
368
|
+
if (errors.length > 0) return reject(errors);
|
|
369
|
+
} else {
|
|
370
|
+
const formatted = (0, _formatWebpackMessages.default)({
|
|
371
|
+
errors: rawMessages !== null && rawMessages !== void 0 && rawMessages.errors ? rawMessages.errors.map(e => e.message) : [],
|
|
372
|
+
warnings: []
|
|
373
|
+
});
|
|
374
|
+
reporter.error(formatted.errors);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
// Log success in dev
|
|
378
|
+
if (!isProductionEnv) {
|
|
379
|
+
if (isFirstBuild) {
|
|
380
|
+
isFirstBuild = false;
|
|
381
|
+
} else {
|
|
382
|
+
reporter.success(`Re-building functions`);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
return resolve(null);
|
|
386
|
+
}
|
|
387
|
+
if (isProductionEnv) {
|
|
388
|
+
(0, _webpack.default)(config).run(callback);
|
|
389
|
+
} else {
|
|
390
|
+
// When in watch mode, you call things differently
|
|
391
|
+
let compiler = (0, _webpack.default)(config).watch({}, callback);
|
|
392
|
+
const globs = createGlobArray(siteDirectoryPath, store.getState().flattenedPlugins);
|
|
393
|
+
|
|
394
|
+
// Watch for env files to change and restart the webpack watcher.
|
|
395
|
+
_chokidar.default.watch([`${siteDirectoryPath}/.env*`, ...globs.map(glob => glob.globPattern)], {
|
|
396
|
+
ignoreInitial: true
|
|
397
|
+
}).on(`all`, async (event, path) => {
|
|
398
|
+
// Ignore change events from the API directory for functions we're
|
|
399
|
+
// already watching.
|
|
400
|
+
if (event === `change` && Object.values(activeEntries).includes(path) && path.includes(`/src/api/`)) {
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
reporter.log(`Restarting function watcher due to change to "${path}"`);
|
|
404
|
+
|
|
405
|
+
// Otherwise, restart the watcher
|
|
406
|
+
compiler.close(async () => {
|
|
407
|
+
const config = await createWebpackConfig({
|
|
408
|
+
siteDirectoryPath,
|
|
409
|
+
store,
|
|
410
|
+
reporter
|
|
411
|
+
});
|
|
412
|
+
compiler = (0, _webpack.default)(config).watch({}, callback);
|
|
413
|
+
});
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
} catch (error) {
|
|
418
|
+
activity.panic({
|
|
419
|
+
id: `11332`,
|
|
420
|
+
error,
|
|
421
|
+
context: {}
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
activity.end();
|
|
425
|
+
}
|
|
426
|
+
async function onCreateDevServer({
|
|
427
|
+
reporter,
|
|
428
|
+
app,
|
|
429
|
+
store
|
|
430
|
+
}) {
|
|
431
|
+
reporter.verbose(`Attaching functions to development server`);
|
|
432
|
+
const {
|
|
433
|
+
program: {
|
|
434
|
+
directory: siteDirectoryPath
|
|
435
|
+
}
|
|
436
|
+
} = store.getState();
|
|
437
|
+
const compiledFunctionsDir = _path2.default.join(siteDirectoryPath, `.cache`, `functions`);
|
|
438
|
+
app.use(`/api/*`, ...(0, _middleware.functionMiddlewares)({
|
|
439
|
+
getFunctions() {
|
|
440
|
+
const {
|
|
441
|
+
functions
|
|
442
|
+
} = store.getState();
|
|
443
|
+
return functions;
|
|
444
|
+
},
|
|
445
|
+
async prepareFn(functionObj) {
|
|
446
|
+
activeDevelopmentFunctions.add(functionObj);
|
|
447
|
+
await ensureFunctionIsCompiled(functionObj, compiledFunctionsDir);
|
|
448
|
+
},
|
|
449
|
+
showDebugMessageInResponse: true
|
|
450
|
+
}));
|
|
451
|
+
}
|
|
452
|
+
//# sourceMappingURL=gatsby-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gatsby-node.js","names":["isProductionEnv","process","env","gatsby_executing_command","activeDevelopmentFunctions","Set","activeEntries","ensureFunctionIsCompiled","functionObj","compiledFunctionsDir","compiledFileExists","fs","stat","absoluteCompiledFilePath","e","time","Date","utimesSync","originalAbsoluteFilePath","Promise","resolve","watcher","chokidar","watch","on","_path","close","createGlobArray","siteDirectoryPath","plugins","globs","globIgnorePatterns","root","pluginName","nestedFolder","push","globPattern","ignorePattern","rootPath","path","join","forEach","plugin","name","includes","glob","globAsync","pattern","options","reject","err","files","createWebpackConfig","store","reporter","getState","flattenedPlugins","seenFunctionIds","allFunctions","all","map","knownFunctions","ignore","file","originalRelativeFilePath","relative","dir","parse","compiledFunctionName","compiledPath","finalName","urlResolve","functionIdBase","replace","functionId","has","counter","functionRoute","relativeCompiledFilePath","matchPath","getMatchPath","func","dispatch","internalActions","setFunctions","writeFileSync","JSON","stringify","config","pathPrefix","program","nodeEnv","NODE_ENV","configEnv","GATSBY_ACTIVE_ENV","envFile","parsed","dotenv","readFileSync","encoding","code","error","envObject","Object","keys","reduce","acc","key","varsFromProcessEnv","PUBLIC_DIR","mergedEnvVars","assign","processEnvVars","entries","precompileDevFunctions","GATSBY_PRECOMPILE_DEVELOP_FUNCTIONS","functionsList","parsedFile","compiledNameWithoutExtension","entryToTheFunction","stage","gatsbyPluginTSRequire","mod","createRequire","require","entry","output","filename","libraryTarget","target","optimization","minimize","extensions","cache","type","cacheLocation","mode","module","rules","test","resourceQuery","use","loader","byDependency","esm","fullySpecified","descriptionData","presets","exclude","webpack","DefinePlugin","PREFIX_TO_STRIP","prefixPaths","IgnorePlugin","checkResource","resource","warn","isFirstBuild","onPreBootstrap","parentSpan","activity","activityTimer","start","directory","ensureDir","emptyDir","callback","stats","rawMessages","toJson","warnings","errors","length","reportWebpackWarnings","compilation","formatted","formatWebpackMessages","message","success","run","compiler","ignoreInitial","event","values","log","panic","id","context","end","onCreateDevServer","app","verbose","functionMiddlewares","getFunctions","functions","prepareFn","add","showDebugMessageInResponse"],"sources":["../../../src/internal-plugins/functions/gatsby-node.ts"],"sourcesContent":["import fs from \"fs-extra\"\nimport glob from \"glob\"\nimport path from \"path\"\nimport webpack from \"webpack\"\nimport _ from \"lodash\"\nimport { getMatchPath, urlResolve } from \"gatsby-core-utils\"\nimport { CreateDevServerArgs, ParentSpanPluginArgs } from \"gatsby\"\nimport formatWebpackMessages from \"react-dev-utils/formatWebpackMessages\"\nimport dotenv from \"dotenv\"\nimport chokidar from \"chokidar\"\nimport { reportWebpackWarnings } from \"../../utils/webpack-error-utils\"\nimport { internalActions } from \"../../redux/actions\"\nimport { IGatsbyFunction } from \"../../redux/types\"\nimport { functionMiddlewares } from \"./middleware\"\nimport mod from \"module\"\n\nconst isProductionEnv = process.env.gatsby_executing_command !== `develop`\n\ninterface IGlobPattern {\n /** The plugin that owns this namespace **/\n pluginName: string\n /** The root path to the functions **/\n rootPath: string\n /** The glob pattern **/\n globPattern: string\n /** The glob ignore pattern */\n ignorePattern: Array<string>\n}\n\n// During development, we lazily compile functions only when they're requested.\n// Here we keep track of which functions have been requested so are \"active\"\nconst activeDevelopmentFunctions = new Set<IGatsbyFunction>()\nlet activeEntries = {}\n\nasync function ensureFunctionIsCompiled(\n functionObj: IGatsbyFunction,\n compiledFunctionsDir: string\n): Promise<any> {\n // stat the compiled function. If it's there, then return.\n let compiledFileExists = false\n try {\n compiledFileExists = !!(await fs.stat(functionObj.absoluteCompiledFilePath))\n } catch (e) {\n // ignore\n }\n if (compiledFileExists) {\n return\n } else {\n // Otherwise, restart webpack by touching the file and watch for the file to be\n // compiled.\n const time = new Date()\n fs.utimesSync(functionObj.originalAbsoluteFilePath, time, time)\n await new Promise(resolve => {\n const watcher = chokidar\n // Watch the root of the compiled function directory in .cache as chokidar\n // can't watch files in directories that don't yet exist.\n .watch(compiledFunctionsDir)\n .on(`add`, async _path => {\n if (_path === functionObj.absoluteCompiledFilePath) {\n await watcher.close()\n\n resolve(null)\n }\n })\n })\n }\n}\n\n// Create glob type w/ glob, plugin name, root path\nconst createGlobArray = (siteDirectoryPath, plugins): Array<IGlobPattern> => {\n const globs: Array<IGlobPattern> = []\n\n function globIgnorePatterns(\n root: string,\n pluginName?: string\n ): Array<string> {\n const nestedFolder = pluginName ? `/${pluginName}/**/` : `/**/`\n\n return [\n `${root}/src/api${nestedFolder}__tests__/**/*.+(js|ts)`, // Jest tests\n `${root}/src/api${nestedFolder}+(*.)+(spec|test).+(js|ts)`,\n `${root}/src/api${nestedFolder}+(*.)+(d).ts`, // .d.ts files\n ]\n }\n\n // Add the default site src/api directory.\n globs.push({\n globPattern: `${siteDirectoryPath}/src/api/**/*.{js,ts}`,\n ignorePattern: globIgnorePatterns(siteDirectoryPath),\n rootPath: path.join(siteDirectoryPath, `src/api`),\n pluginName: `default-site-plugin`,\n })\n\n // Add each plugin\n plugins.forEach(plugin => {\n // Ignore the \"default\" site plugin (aka the src tree) as we're\n // already watching that.\n if (plugin.name === `default-site-plugin`) {\n return\n }\n // Ignore any plugins we include by default. In the very unlikely case\n // we want to ship default functions, we'll special case add them. In the\n // meantime, we'll avoid extra FS IO.\n if (plugin.resolve.includes(`internal-plugin`)) {\n return\n }\n if (plugin.resolve.includes(`gatsby-plugin-typescript`)) {\n return\n }\n if (plugin.resolve.includes(`gatsby-plugin-page-creator`)) {\n return\n }\n\n const glob = {\n globPattern: `${plugin.resolve}/src/api/${plugin.name}/**/*.{js,ts}`,\n ignorePattern: globIgnorePatterns(plugin.resolve, plugin.name),\n rootPath: path.join(plugin.resolve, `src/api`),\n pluginName: plugin.name,\n } as IGlobPattern\n globs.push(glob)\n })\n\n // Only return unique paths\n return _.union(globs)\n}\n\nasync function globAsync(\n pattern: string,\n options: glob.IOptions = {}\n): Promise<Array<string>> {\n return await new Promise((resolve, reject) => {\n glob(pattern, options, (err, files) => {\n if (err) {\n reject(err)\n } else {\n resolve(files)\n }\n })\n })\n}\n\nconst createWebpackConfig = async ({\n siteDirectoryPath,\n store,\n reporter,\n}): Promise<webpack.Configuration> => {\n const compiledFunctionsDir = path.join(\n siteDirectoryPath,\n `.cache`,\n `functions`\n )\n\n const globs = createGlobArray(\n siteDirectoryPath,\n store.getState().flattenedPlugins\n )\n\n const seenFunctionIds = new Set<string>()\n // Glob and return object with relative/absolute paths + which plugin\n // they belong to.\n const allFunctions = await Promise.all(\n globs.map(async (glob): Promise<Array<IGatsbyFunction>> => {\n const knownFunctions: Array<IGatsbyFunction> = []\n const files = await globAsync(glob.globPattern, {\n ignore: glob.ignorePattern,\n })\n files.map(file => {\n const originalAbsoluteFilePath = file\n const originalRelativeFilePath = path.relative(glob.rootPath, file)\n\n const { dir, name } = path.parse(originalRelativeFilePath)\n // Ignore the original extension as all compiled functions now end with js.\n const compiledFunctionName = path.join(dir, name + `.js`)\n const compiledPath = path.join(\n compiledFunctionsDir,\n compiledFunctionName\n )\n const finalName = urlResolve(dir, name === `index` ? `` : name)\n\n // functionId should have only alphanumeric characters and dashes\n const functionIdBase = _.kebabCase(compiledFunctionName).replace(\n /[^a-zA-Z0-9-]/g,\n `-`\n )\n\n let functionId = functionIdBase\n\n if (seenFunctionIds.has(functionId)) {\n let counter = 2\n do {\n functionId = `${functionIdBase}-${counter}`\n counter++\n } while (seenFunctionIds.has(functionId))\n }\n\n knownFunctions.push({\n functionRoute: finalName,\n pluginName: glob.pluginName,\n originalAbsoluteFilePath,\n originalRelativeFilePath,\n relativeCompiledFilePath: compiledFunctionName,\n absoluteCompiledFilePath: compiledPath,\n matchPath: getMatchPath(finalName),\n functionId,\n })\n })\n\n return knownFunctions\n })\n )\n\n // Combine functions by the route name so that functions in the default\n // functions directory can override the plugin's implementations.\n // @ts-ignore - Seems like a TS bug: https://github.com/microsoft/TypeScript/issues/28010#issuecomment-713484584\n const knownFunctions = _.unionBy(...allFunctions, func => func.functionRoute)\n\n store.dispatch(internalActions.setFunctions(knownFunctions))\n\n // Write out manifest for use by `gatsby serve` and plugins\n fs.writeFileSync(\n path.join(compiledFunctionsDir, `manifest.json`),\n JSON.stringify(knownFunctions, null, 4)\n )\n\n const {\n config: { pathPrefix },\n program,\n } = store.getState()\n\n // Load environment variables from process.env.* and .env.* files.\n // Logic is shared with webpack.config.js\n\n // node env should be DEVELOPMENT | PRODUCTION as these are commonly used in node land\n const nodeEnv = process.env.NODE_ENV || `development`\n // config env is dependent on the env that it's run, this can be anything from staging-production\n // this allows you to set use different .env environments or conditions in gatsby files\n const configEnv = process.env.GATSBY_ACTIVE_ENV || nodeEnv\n const envFile = path.join(siteDirectoryPath, `./.env.${configEnv}`)\n let parsed = {}\n try {\n parsed = dotenv.parse(fs.readFileSync(envFile, { encoding: `utf8` }))\n } catch (err) {\n if (err.code !== `ENOENT`) {\n reporter.error(\n `There was a problem processing the .env file (${envFile})`,\n err\n )\n }\n }\n\n const envObject = Object.keys(parsed).reduce((acc, key) => {\n acc[key] = JSON.stringify(parsed[key])\n return acc\n }, {} as Record<string, string>)\n\n const varsFromProcessEnv = Object.keys(process.env).reduce((acc, key) => {\n acc[key] = JSON.stringify(process.env[key])\n return acc\n }, {} as Record<string, string>)\n\n // Don't allow overwriting of NODE_ENV, PUBLIC_DIR as to not break gatsby things\n envObject.NODE_ENV = JSON.stringify(nodeEnv)\n envObject.PUBLIC_DIR = JSON.stringify(`${siteDirectoryPath}/public`)\n\n const mergedEnvVars = Object.assign(envObject, varsFromProcessEnv)\n\n const processEnvVars = Object.keys(mergedEnvVars).reduce(\n (acc, key) => {\n acc[`process.env.${key}`] = mergedEnvVars[key]\n return acc\n },\n {\n \"process.env\": `({})`,\n }\n )\n\n const entries = {}\n\n const precompileDevFunctions =\n isProductionEnv ||\n process.env.GATSBY_PRECOMPILE_DEVELOP_FUNCTIONS === `true` ||\n process.env.GATSBY_PRECOMPILE_DEVELOP_FUNCTIONS === `1`\n\n const functionsList = precompileDevFunctions\n ? knownFunctions\n : activeDevelopmentFunctions\n\n functionsList.forEach(functionObj => {\n // Get path without the extension (as it could be ts or js)\n const parsedFile = path.parse(functionObj.originalRelativeFilePath)\n const compiledNameWithoutExtension = path.join(\n parsedFile.dir,\n parsedFile.name\n )\n\n let entryToTheFunction = functionObj.originalAbsoluteFilePath\n // we wrap user defined function with our preamble that handles matchPath as well as body parsing\n // see api-function-webpack-loader.ts for more info\n entryToTheFunction += `?matchPath=` + (functionObj.matchPath ?? ``)\n entries[compiledNameWithoutExtension] = entryToTheFunction\n })\n\n activeEntries = entries\n\n const stage = isProductionEnv\n ? `functions-production`\n : `functions-development`\n\n const gatsbyPluginTSRequire = mod.createRequire(\n require.resolve(`gatsby-plugin-typescript`)\n )\n\n return {\n entry: entries,\n output: {\n path: compiledFunctionsDir,\n filename: `[name].js`,\n libraryTarget: `commonjs2`,\n },\n target: `node`,\n\n // Minification is expensive and not as helpful for serverless functions.\n optimization: {\n minimize: false,\n },\n\n // Resolve files ending with .ts and the default extensions of .js, .json, .wasm\n resolve: {\n extensions: [`.ts`, `...`],\n },\n\n // Have webpack save its cache to the .cache/webpack directory\n cache: {\n type: `filesystem`,\n name: stage,\n cacheLocation: path.join(\n siteDirectoryPath,\n `.cache`,\n `webpack`,\n `stage-` + stage\n ),\n },\n\n mode: isProductionEnv ? `production` : `development`,\n // watch: !isProductionEnv,\n module: {\n rules: [\n // Webpack expects extensions when importing ESM modules as that's what the spec describes.\n // Not all libraries have adapted so we don't enforce its behaviour\n // @see https://github.com/webpack/webpack/issues/11467\n {\n test: /\\.[tj]sx?$/,\n resourceQuery: /matchPath/,\n use: {\n loader: require.resolve(`./api-function-webpack-loader`),\n },\n },\n {\n test: /\\.mjs$/i,\n resolve: {\n byDependency: {\n esm: {\n fullySpecified: false,\n },\n },\n },\n },\n {\n test: /\\.js$/i,\n descriptionData: {\n type: `module`,\n },\n resolve: {\n byDependency: {\n esm: {\n fullySpecified: false,\n },\n },\n },\n use: {\n loader: require.resolve(`babel-loader`),\n options: {\n presets: [\n gatsbyPluginTSRequire.resolve(`@babel/preset-typescript`),\n ],\n },\n },\n },\n {\n test: [/.js$/, /.ts$/],\n exclude: /node_modules/,\n use: {\n loader: require.resolve(`babel-loader`),\n options: {\n presets: [\n gatsbyPluginTSRequire.resolve(`@babel/preset-typescript`),\n ],\n },\n },\n },\n ],\n },\n plugins: [\n new webpack.DefinePlugin({\n PREFIX_TO_STRIP: JSON.stringify(\n program.prefixPaths ? pathPrefix?.replace(/(^\\/+|\\/+$)/g, ``) : ``\n ),\n ...processEnvVars,\n }),\n new webpack.IgnorePlugin({\n checkResource(resource): boolean {\n if (resource === `lmdb`) {\n reporter.warn(\n `LMDB and other modules with native dependencies are not supported in Gatsby Functions.\\nIf you are importing utils from \\`gatsby-core-utils\\`, make sure to import from a specific module (for example \\`gatsby-core-utils/create-content-digest\\`).`\n )\n return true\n }\n return false\n },\n }),\n ],\n }\n}\n\nlet isFirstBuild = true\nexport async function onPreBootstrap({\n reporter,\n store,\n parentSpan,\n}: ParentSpanPluginArgs): Promise<void> {\n const activity = reporter.activityTimer(`Compiling Gatsby Functions`, {\n parentSpan,\n })\n activity.start()\n\n const {\n program: { directory: siteDirectoryPath },\n } = store.getState()\n\n const compiledFunctionsDir = path.join(\n siteDirectoryPath,\n `.cache`,\n `functions`\n )\n\n await fs.ensureDir(compiledFunctionsDir)\n await fs.emptyDir(compiledFunctionsDir)\n\n try {\n // We do this ungainly thing as we need to make accessible\n // the resolve/reject functions to our shared callback function\n // eslint-disable-next-line\n await new Promise<any>(async (resolve, reject) => {\n const config = await createWebpackConfig({\n siteDirectoryPath,\n store,\n reporter,\n })\n\n function callback(err, stats?: webpack.Stats): void {\n const rawMessages = stats?.toJson({\n all: false,\n warnings: true,\n errors: true,\n })\n if (rawMessages?.warnings && rawMessages.warnings.length > 0) {\n reportWebpackWarnings(rawMessages.warnings, reporter)\n }\n\n if (err) return reject(err)\n const errors = stats?.compilation.errors || []\n\n // If there's errors, reject in production and print to the console\n // in development.\n if (isProductionEnv) {\n if (errors.length > 0) return reject(errors)\n } else {\n const formatted = formatWebpackMessages({\n errors: rawMessages?.errors\n ? rawMessages.errors.map(e => e.message)\n : [],\n warnings: [],\n })\n reporter.error(formatted.errors)\n }\n\n // Log success in dev\n if (!isProductionEnv) {\n if (isFirstBuild) {\n isFirstBuild = false\n } else {\n reporter.success(`Re-building functions`)\n }\n }\n\n return resolve(null)\n }\n\n if (isProductionEnv) {\n webpack(config).run(callback)\n } else {\n // When in watch mode, you call things differently\n let compiler = webpack(config).watch({}, callback)\n\n const globs = createGlobArray(\n siteDirectoryPath,\n store.getState().flattenedPlugins\n )\n\n // Watch for env files to change and restart the webpack watcher.\n chokidar\n .watch(\n [\n `${siteDirectoryPath}/.env*`,\n ...globs.map(glob => glob.globPattern),\n ],\n { ignoreInitial: true }\n )\n .on(`all`, async (event, path) => {\n // Ignore change events from the API directory for functions we're\n // already watching.\n if (\n event === `change` &&\n Object.values(activeEntries).includes(path) &&\n path.includes(`/src/api/`)\n ) {\n return\n }\n\n reporter.log(\n `Restarting function watcher due to change to \"${path}\"`\n )\n\n // Otherwise, restart the watcher\n compiler.close(async () => {\n const config = await createWebpackConfig({\n siteDirectoryPath,\n store,\n reporter,\n })\n compiler = webpack(config).watch({}, callback)\n })\n })\n }\n })\n } catch (error) {\n activity.panic({\n id: `11332`,\n error,\n context: {},\n })\n }\n\n activity.end()\n}\n\nexport async function onCreateDevServer({\n reporter,\n app,\n store,\n}: CreateDevServerArgs): Promise<void> {\n reporter.verbose(`Attaching functions to development server`)\n\n const {\n program: { directory: siteDirectoryPath },\n } = store.getState()\n\n const compiledFunctionsDir = path.join(\n siteDirectoryPath,\n `.cache`,\n `functions`\n )\n\n app.use(\n `/api/*`,\n ...functionMiddlewares({\n getFunctions(): Array<IGatsbyFunction> {\n const { functions }: { functions: Array<IGatsbyFunction> } =\n store.getState()\n return functions\n },\n async prepareFn(functionObj: IGatsbyFunction): Promise<void> {\n activeDevelopmentFunctions.add(functionObj)\n await ensureFunctionIsCompiled(functionObj, compiledFunctionsDir)\n },\n showDebugMessageInResponse: true,\n })\n )\n}\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA,MAAMA,eAAe,GAAGC,OAAO,CAACC,GAAG,CAACC,wBAAwB,KAAM,SAAQ;AAa1E;AACA;AACA,MAAMC,0BAA0B,GAAG,IAAIC,GAAG,EAAmB;AAC7D,IAAIC,aAAa,GAAG,CAAC,CAAC;AAEtB,eAAeC,wBAAwB,CACrCC,WAA4B,EAC5BC,oBAA4B,EACd;EACd;EACA,IAAIC,kBAAkB,GAAG,KAAK;EAC9B,IAAI;IACFA,kBAAkB,GAAG,CAAC,EAAE,MAAMC,gBAAE,CAACC,IAAI,CAACJ,WAAW,CAACK,wBAAwB,CAAC,CAAC;EAC9E,CAAC,CAAC,OAAOC,CAAC,EAAE;IACV;EAAA;EAEF,IAAIJ,kBAAkB,EAAE;IACtB;EACF,CAAC,MAAM;IACL;IACA;IACA,MAAMK,IAAI,GAAG,IAAIC,IAAI,EAAE;IACvBL,gBAAE,CAACM,UAAU,CAACT,WAAW,CAACU,wBAAwB,EAAEH,IAAI,EAAEA,IAAI,CAAC;IAC/D,MAAM,IAAII,OAAO,CAACC,OAAO,IAAI;MAC3B,MAAMC,OAAO,GAAGC;MACd;MACA;MAAA,CACCC,KAAK,CAACd,oBAAoB,CAAC,CAC3Be,EAAE,CAAE,KAAI,EAAE,MAAMC,KAAK,IAAI;QACxB,IAAIA,KAAK,KAAKjB,WAAW,CAACK,wBAAwB,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QAAQ;EACRwI,GAAG;EACHzI;AACmB,CAAC,EAAiB;EACrCC,QAAQ,CAACyI,OAAO,CAAE,2CAA0C,CAAC;EAE7D,MAAM;IACJrG,OAAO,EAAE;MAAEyE,SAAS,EAAEvI;IAAkB;EAC1C,CAAC,GAAGyB,KAAK,CAACE,QAAQ,EAAE;EAEpB,MAAM9C,oBAAoB,GAAG8B,cAAI,CAACC,IAAI,CACpCZ,iBAAiB,EAChB,QAAO,EACP,WAAU,CACZ;EAEDkK,GAAG,CAACjD,GAAG,CACJ,QAAO,EACR,GAAG,IAAAmD,+BAAmB,EAAC;IACrBC,YAAY,GAA2B;MACrC,MAAM;QAAEC;MAAiD,CAAC,GACxD7I,KAAK,CAACE,QAAQ,EAAE;MAClB,OAAO2I,SAAS;IAClB,CAAC;IACD,MAAMC,SAAS,CAAC3L,WAA4B,EAAiB;MAC3DJ,0BAA0B,CAACgM,GAAG,CAAC5L,WAAW,CAAC;MAC3C,MAAMD,wBAAwB,CAACC,WAAW,EAAEC,oBAAoB,CAAC;IACnE,CAAC;IACD4L,0BAA0B,EAAE;EAC9B,CAAC,CAAC,CACH;AACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/internal-plugins/functions/index.js"],"sourcesContent":["// noop\n"],"mappings":"AAAA;AAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RequestHandler } from "express";
|
|
2
|
+
import { IAPIFunctionWarning } from "./config";
|
|
3
|
+
import type { IGatsbyFunction } from "../../redux/types";
|
|
4
|
+
interface ICreateMiddlewareConfig {
|
|
5
|
+
getFunctions: () => Array<IGatsbyFunction>;
|
|
6
|
+
prepareFn?: (functionObj: IGatsbyFunction) => Promise<void> | void;
|
|
7
|
+
showDebugMessageInResponse?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function printConfigWarnings(warnings: Array<IAPIFunctionWarning>, functionObj: IGatsbyFunction): void;
|
|
10
|
+
export declare function functionMiddlewares(middlewareConfig: ICreateMiddlewareConfig): Array<RequestHandler>;
|
|
11
|
+
export {};
|