@depup/gatsby 5.16.1-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +142 -0
- package/adapters.js +31 -0
- package/apis.json +73 -0
- package/cache-dir/.eslintrc.json +10 -0
- package/cache-dir/api-runner-browser-plugins.js +14 -0
- package/cache-dir/api-runner-browser.js +52 -0
- package/cache-dir/api-runner-ssr.js +88 -0
- package/cache-dir/api-ssr-docs.js +207 -0
- package/cache-dir/app.js +249 -0
- package/cache-dir/blank.css +0 -0
- package/cache-dir/commonjs/api-runner-browser-plugins.js +17 -0
- package/cache-dir/commonjs/api-runner-browser-plugins.js.map +1 -0
- package/cache-dir/commonjs/api-runner-browser.js +49 -0
- package/cache-dir/commonjs/api-runner-browser.js.map +1 -0
- package/cache-dir/commonjs/api-runner-ssr.js +88 -0
- package/cache-dir/commonjs/api-runner-ssr.js.map +1 -0
- package/cache-dir/commonjs/api-ssr-docs.js +210 -0
- package/cache-dir/commonjs/api-ssr-docs.js.map +1 -0
- package/cache-dir/commonjs/app.js +197 -0
- package/cache-dir/commonjs/app.js.map +1 -0
- package/cache-dir/commonjs/context-utils.js +25 -0
- package/cache-dir/commonjs/context-utils.js.map +1 -0
- package/cache-dir/commonjs/create-content-digest-browser-shim.js +4 -0
- package/cache-dir/commonjs/create-content-digest-browser-shim.js.map +1 -0
- package/cache-dir/commonjs/css-to-object.js +21 -0
- package/cache-dir/commonjs/css-to-object.js.map +1 -0
- package/cache-dir/commonjs/debug-log.js +11 -0
- package/cache-dir/commonjs/debug-log.js.map +1 -0
- package/cache-dir/commonjs/default-html.js +33 -0
- package/cache-dir/commonjs/default-html.js.map +1 -0
- package/cache-dir/commonjs/dev-loader.js +247 -0
- package/cache-dir/commonjs/dev-loader.js.map +1 -0
- package/cache-dir/commonjs/develop-static-entry.js +129 -0
- package/cache-dir/commonjs/develop-static-entry.js.map +1 -0
- package/cache-dir/commonjs/dummy.js +8 -0
- package/cache-dir/commonjs/dummy.js.map +1 -0
- package/cache-dir/commonjs/emitter.js +10 -0
- package/cache-dir/commonjs/emitter.js.map +1 -0
- package/cache-dir/commonjs/ensure-resources.js +107 -0
- package/cache-dir/commonjs/ensure-resources.js.map +1 -0
- package/cache-dir/commonjs/error-overlay-handler.js +35 -0
- package/cache-dir/commonjs/error-overlay-handler.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/accordion.js +80 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/accordion.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/build-error.js +44 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/build-error.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/code-frame.js +38 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/code-frame.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/dev-ssr-error.js +52 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/dev-ssr-error.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/error-boundary.js +31 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/error-boundary.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/getserverdata-error.js +47 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/getserverdata-error.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/graphql-errors.js +77 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/graphql-errors.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/hooks.js +93 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/hooks.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/overlay.js +147 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/overlay.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/runtime-errors.js +110 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/runtime-errors.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/use-id.js +50 -0
- package/cache-dir/commonjs/fast-refresh-overlay/components/use-id.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/focus-trap.js +2879 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/focus-trap.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/keys.js +84 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/keys.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/lock-body.js +48 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/lock-body.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/match.js +44 -0
- package/cache-dir/commonjs/fast-refresh-overlay/helpers/match.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/index.js +182 -0
- package/cache-dir/commonjs/fast-refresh-overlay/index.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/style.js +418 -0
- package/cache-dir/commonjs/fast-refresh-overlay/style.js.map +1 -0
- package/cache-dir/commonjs/fast-refresh-overlay/utils.js +75 -0
- package/cache-dir/commonjs/fast-refresh-overlay/utils.js.map +1 -0
- package/cache-dir/commonjs/find-path.js +145 -0
- package/cache-dir/commonjs/find-path.js.map +1 -0
- package/cache-dir/commonjs/gatsby-browser-entry.js +52 -0
- package/cache-dir/commonjs/gatsby-browser-entry.js.map +1 -0
- package/cache-dir/commonjs/head/components/fire-callback-in-effect.js +18 -0
- package/cache-dir/commonjs/head/components/fire-callback-in-effect.js.map +1 -0
- package/cache-dir/commonjs/head/components/head-components.js +72 -0
- package/cache-dir/commonjs/head/components/head-components.js.map +1 -0
- package/cache-dir/commonjs/head/constants.js +13 -0
- package/cache-dir/commonjs/head/constants.js.map +1 -0
- package/cache-dir/commonjs/head/head-export-handler-for-browser.js +144 -0
- package/cache-dir/commonjs/head/head-export-handler-for-browser.js.map +1 -0
- package/cache-dir/commonjs/head/head-export-handler-for-ssr.js +225 -0
- package/cache-dir/commonjs/head/head-export-handler-for-ssr.js.map +1 -0
- package/cache-dir/commonjs/head/utils.js +264 -0
- package/cache-dir/commonjs/head/utils.js.map +1 -0
- package/cache-dir/commonjs/loader.js +861 -0
- package/cache-dir/commonjs/loader.js.map +1 -0
- package/cache-dir/commonjs/loading-indicator/index.js +25 -0
- package/cache-dir/commonjs/loading-indicator/index.js.map +1 -0
- package/cache-dir/commonjs/loading-indicator/indicator.js +63 -0
- package/cache-dir/commonjs/loading-indicator/indicator.js.map +1 -0
- package/cache-dir/commonjs/loading-indicator/style.js +103 -0
- package/cache-dir/commonjs/loading-indicator/style.js.map +1 -0
- package/cache-dir/commonjs/navigation.js +260 -0
- package/cache-dir/commonjs/navigation.js.map +1 -0
- package/cache-dir/commonjs/normalize-page-path.js +22 -0
- package/cache-dir/commonjs/normalize-page-path.js.map +1 -0
- package/cache-dir/commonjs/page-renderer.js +59 -0
- package/cache-dir/commonjs/page-renderer.js.map +1 -0
- package/cache-dir/commonjs/pages.json +1 -0
- package/cache-dir/commonjs/polyfill-entry.js +7 -0
- package/cache-dir/commonjs/polyfill-entry.js.map +1 -0
- package/cache-dir/commonjs/prefetch.js +67 -0
- package/cache-dir/commonjs/prefetch.js.map +1 -0
- package/cache-dir/commonjs/production-app.js +256 -0
- package/cache-dir/commonjs/production-app.js.map +1 -0
- package/cache-dir/commonjs/public-page-renderer-dev.js +26 -0
- package/cache-dir/commonjs/public-page-renderer-dev.js.map +1 -0
- package/cache-dir/commonjs/public-page-renderer-prod.js +30 -0
- package/cache-dir/commonjs/public-page-renderer-prod.js.map +1 -0
- package/cache-dir/commonjs/public-page-renderer.js +11 -0
- package/cache-dir/commonjs/public-page-renderer.js.map +1 -0
- package/cache-dir/commonjs/query-result-store.js +160 -0
- package/cache-dir/commonjs/query-result-store.js.map +1 -0
- package/cache-dir/commonjs/react-dom-utils.js +34 -0
- package/cache-dir/commonjs/react-dom-utils.js.map +1 -0
- package/cache-dir/commonjs/react-lifecycles-compat.js +4 -0
- package/cache-dir/commonjs/react-lifecycles-compat.js.map +1 -0
- package/cache-dir/commonjs/redirect-utils.js +25 -0
- package/cache-dir/commonjs/redirect-utils.js.map +1 -0
- package/cache-dir/commonjs/redirects.json +1 -0
- package/cache-dir/commonjs/register-service-worker.js +66 -0
- package/cache-dir/commonjs/register-service-worker.js.map +1 -0
- package/cache-dir/commonjs/root.js +105 -0
- package/cache-dir/commonjs/root.js.map +1 -0
- package/cache-dir/commonjs/route-announcer-props.js +24 -0
- package/cache-dir/commonjs/route-announcer-props.js.map +1 -0
- package/cache-dir/commonjs/server-utils/writable-as-promise.js +42 -0
- package/cache-dir/commonjs/server-utils/writable-as-promise.js.map +1 -0
- package/cache-dir/commonjs/shadow-portal.js +36 -0
- package/cache-dir/commonjs/shadow-portal.js.map +1 -0
- package/cache-dir/commonjs/slice/context.js +15 -0
- package/cache-dir/commonjs/slice/context.js.map +1 -0
- package/cache-dir/commonjs/slice/inline-slice.js +34 -0
- package/cache-dir/commonjs/slice/inline-slice.js.map +1 -0
- package/cache-dir/commonjs/slice/server-slice-renderer.js +29 -0
- package/cache-dir/commonjs/slice/server-slice-renderer.js.map +1 -0
- package/cache-dir/commonjs/slice/server-slice.js +54 -0
- package/cache-dir/commonjs/slice/server-slice.js.map +1 -0
- package/cache-dir/commonjs/slice.js +124 -0
- package/cache-dir/commonjs/slice.js.map +1 -0
- package/cache-dir/commonjs/socketIo.js +62 -0
- package/cache-dir/commonjs/socketIo.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/child_process.js +8 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/child_process.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/fs.js +7 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/fs.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/http.js +9 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/http.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/http2.js +7 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/http2.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/https.js +9 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/https.js.map +1 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/tracking-unsafe-module-wrapper.js +55 -0
- package/cache-dir/commonjs/ssr-builtin-trackers/tracking-unsafe-module-wrapper.js.map +1 -0
- package/cache-dir/commonjs/ssr-develop-static-entry.js +366 -0
- package/cache-dir/commonjs/ssr-develop-static-entry.js.map +1 -0
- package/cache-dir/commonjs/static-entry.js +544 -0
- package/cache-dir/commonjs/static-entry.js.map +1 -0
- package/cache-dir/commonjs/static-query.js +74 -0
- package/cache-dir/commonjs/static-query.js.map +1 -0
- package/cache-dir/commonjs/strip-prefix.js +22 -0
- package/cache-dir/commonjs/strip-prefix.js.map +1 -0
- package/cache-dir/context-utils.js +29 -0
- package/cache-dir/create-content-digest-browser-shim.js +1 -0
- package/cache-dir/css-to-object.js +19 -0
- package/cache-dir/debug-log.js +13 -0
- package/cache-dir/default-html.js +36 -0
- package/cache-dir/dev-loader.js +280 -0
- package/cache-dir/develop-static-entry.js +129 -0
- package/cache-dir/dummy.js +2 -0
- package/cache-dir/emitter.js +4 -0
- package/cache-dir/ensure-resources.js +119 -0
- package/cache-dir/error-overlay-handler.js +36 -0
- package/cache-dir/fast-refresh-overlay/components/accordion.js +83 -0
- package/cache-dir/fast-refresh-overlay/components/build-error.js +46 -0
- package/cache-dir/fast-refresh-overlay/components/code-frame.js +38 -0
- package/cache-dir/fast-refresh-overlay/components/dev-ssr-error.js +66 -0
- package/cache-dir/fast-refresh-overlay/components/error-boundary.js +28 -0
- package/cache-dir/fast-refresh-overlay/components/getserverdata-error.js +53 -0
- package/cache-dir/fast-refresh-overlay/components/graphql-errors.js +100 -0
- package/cache-dir/fast-refresh-overlay/components/hooks.js +102 -0
- package/cache-dir/fast-refresh-overlay/components/overlay.js +143 -0
- package/cache-dir/fast-refresh-overlay/components/runtime-errors.js +139 -0
- package/cache-dir/fast-refresh-overlay/components/use-id.js +56 -0
- package/cache-dir/fast-refresh-overlay/helpers/focus-trap.js +3561 -0
- package/cache-dir/fast-refresh-overlay/helpers/keys.js +80 -0
- package/cache-dir/fast-refresh-overlay/helpers/lock-body.js +52 -0
- package/cache-dir/fast-refresh-overlay/helpers/match.js +42 -0
- package/cache-dir/fast-refresh-overlay/index.js +147 -0
- package/cache-dir/fast-refresh-overlay/style.js +413 -0
- package/cache-dir/fast-refresh-overlay/utils.js +81 -0
- package/cache-dir/find-path.js +160 -0
- package/cache-dir/gatsby-browser-entry.js +27 -0
- package/cache-dir/head/components/fire-callback-in-effect.js +12 -0
- package/cache-dir/head/components/head-components.js +86 -0
- package/cache-dir/head/constants.js +15 -0
- package/cache-dir/head/head-export-handler-for-browser.js +170 -0
- package/cache-dir/head/head-export-handler-for-ssr.js +237 -0
- package/cache-dir/head/utils.js +287 -0
- package/cache-dir/loader.js +977 -0
- package/cache-dir/loading-indicator/index.js +19 -0
- package/cache-dir/loading-indicator/indicator.js +65 -0
- package/cache-dir/loading-indicator/style.js +99 -0
- package/cache-dir/navigation.js +257 -0
- package/cache-dir/normalize-page-path.js +17 -0
- package/cache-dir/page-renderer.js +59 -0
- package/cache-dir/page-ssr/index.d.ts +76 -0
- package/cache-dir/pages.json +1 -0
- package/cache-dir/polyfill-entry.js +5 -0
- package/cache-dir/prefetch.js +80 -0
- package/cache-dir/production-app.js +340 -0
- package/cache-dir/public-page-renderer-dev.js +21 -0
- package/cache-dir/public-page-renderer-prod.js +25 -0
- package/cache-dir/public-page-renderer.js +9 -0
- package/cache-dir/query-engine/index.d.ts +31 -0
- package/cache-dir/query-result-store.js +197 -0
- package/cache-dir/react-dom-utils.js +38 -0
- package/cache-dir/react-lifecycles-compat.js +1 -0
- package/cache-dir/redirect-utils.js +22 -0
- package/cache-dir/redirects.json +1 -0
- package/cache-dir/register-service-worker.js +64 -0
- package/cache-dir/root.js +147 -0
- package/cache-dir/route-announcer-props.js +18 -0
- package/cache-dir/server-utils/writable-as-promise.js +41 -0
- package/cache-dir/shadow-portal.js +28 -0
- package/cache-dir/slice/context.js +13 -0
- package/cache-dir/slice/inline-slice.js +34 -0
- package/cache-dir/slice/server-slice-renderer.js +28 -0
- package/cache-dir/slice/server-slice.js +52 -0
- package/cache-dir/slice.js +158 -0
- package/cache-dir/socketIo.js +58 -0
- package/cache-dir/ssr-builtin-trackers/child_process.js +4 -0
- package/cache-dir/ssr-builtin-trackers/fs.js +3 -0
- package/cache-dir/ssr-builtin-trackers/http.js +3 -0
- package/cache-dir/ssr-builtin-trackers/http2.js +3 -0
- package/cache-dir/ssr-builtin-trackers/https.js +3 -0
- package/cache-dir/ssr-builtin-trackers/tracking-unsafe-module-wrapper.js +64 -0
- package/cache-dir/ssr-develop-static-entry.js +428 -0
- package/cache-dir/static-entry.js +594 -0
- package/cache-dir/static-query.js +91 -0
- package/cache-dir/strip-prefix.js +20 -0
- package/changes.json +454 -0
- package/cli.js +3 -0
- package/dist/bin/gatsby.js +5 -0
- package/dist/bin/gatsby.js.map +1 -0
- package/dist/bootstrap/__mocks__/get-config/ts/gatsby-config.d.ts +3 -0
- package/dist/bootstrap/__mocks__/resolve-module-exports.d.ts +1 -0
- package/dist/bootstrap/create-graphql-runner.d.ts +10 -0
- package/dist/bootstrap/create-graphql-runner.js +71 -0
- package/dist/bootstrap/create-graphql-runner.js.map +1 -0
- package/dist/bootstrap/get-config-file.d.ts +4 -0
- package/dist/bootstrap/get-config-file.js +152 -0
- package/dist/bootstrap/get-config-file.js.map +1 -0
- package/dist/bootstrap/index.d.ts +12 -0
- package/dist/bootstrap/index.js +56 -0
- package/dist/bootstrap/index.js.map +1 -0
- package/dist/bootstrap/load-config/index.d.ts +7 -0
- package/dist/bootstrap/load-config/index.js +73 -0
- package/dist/bootstrap/load-config/index.js.map +1 -0
- package/dist/bootstrap/load-plugins/index.d.ts +3 -0
- package/dist/bootstrap/load-plugins/index.js +79 -0
- package/dist/bootstrap/load-plugins/index.js.map +1 -0
- package/dist/bootstrap/load-plugins/load-internal-plugins.d.ts +2 -0
- package/dist/bootstrap/load-plugins/load-internal-plugins.js +105 -0
- package/dist/bootstrap/load-plugins/load-internal-plugins.js.map +1 -0
- package/dist/bootstrap/load-plugins/process-plugin.d.ts +2 -0
- package/dist/bootstrap/load-plugins/process-plugin.js +81 -0
- package/dist/bootstrap/load-plugins/process-plugin.js.map +1 -0
- package/dist/bootstrap/load-plugins/resolve-plugin.d.ts +13 -0
- package/dist/bootstrap/load-plugins/resolve-plugin.js +75 -0
- package/dist/bootstrap/load-plugins/resolve-plugin.js.map +1 -0
- package/dist/bootstrap/load-plugins/types.d.ts +48 -0
- package/dist/bootstrap/load-plugins/types.js +4 -0
- package/dist/bootstrap/load-plugins/types.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/check-local-plugin.d.ts +8 -0
- package/dist/bootstrap/load-plugins/utils/check-local-plugin.js +38 -0
- package/dist/bootstrap/load-plugins/utils/check-local-plugin.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/create-hash.d.ts +1 -0
- package/dist/bootstrap/load-plugins/utils/create-hash.js +20 -0
- package/dist/bootstrap/load-plugins/utils/create-hash.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/create-id.d.ts +10 -0
- package/dist/bootstrap/load-plugins/utils/create-id.js +16 -0
- package/dist/bootstrap/load-plugins/utils/create-id.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/flatten-plugins.d.ts +2 -0
- package/dist/bootstrap/load-plugins/utils/flatten-plugins.js +41 -0
- package/dist/bootstrap/load-plugins/utils/flatten-plugins.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/get-api.d.ts +12 -0
- package/dist/bootstrap/load-plugins/utils/get-api.js +12 -0
- package/dist/bootstrap/load-plugins/utils/get-api.js.map +1 -0
- package/dist/bootstrap/load-plugins/utils/normalize.d.ts +5 -0
- package/dist/bootstrap/load-plugins/utils/normalize.js +33 -0
- package/dist/bootstrap/load-plugins/utils/normalize.js.map +1 -0
- package/dist/bootstrap/load-plugins/validate.d.ts +41 -0
- package/dist/bootstrap/load-plugins/validate.js +369 -0
- package/dist/bootstrap/load-plugins/validate.js.map +1 -0
- package/dist/bootstrap/load-themes/index.d.ts +17 -0
- package/dist/bootstrap/load-themes/index.js +186 -0
- package/dist/bootstrap/load-themes/index.js.map +1 -0
- package/dist/bootstrap/log-line-function.d.ts +0 -0
- package/dist/bootstrap/log-line-function.js +19 -0
- package/dist/bootstrap/log-line-function.js.map +1 -0
- package/dist/bootstrap/prefer-default.d.ts +1 -0
- package/dist/bootstrap/prefer-default.js +7 -0
- package/dist/bootstrap/prefer-default.js.map +1 -0
- package/dist/bootstrap/redirects-writer.d.ts +2 -0
- package/dist/bootstrap/redirects-writer.js +59 -0
- package/dist/bootstrap/redirects-writer.js.map +1 -0
- package/dist/bootstrap/remove-stale-jobs.d.ts +2 -0
- package/dist/bootstrap/remove-stale-jobs.js +31 -0
- package/dist/bootstrap/remove-stale-jobs.js.map +1 -0
- package/dist/bootstrap/requires-writer.d.ts +11 -0
- package/dist/bootstrap/requires-writer.js +260 -0
- package/dist/bootstrap/requires-writer.js.map +1 -0
- package/dist/bootstrap/resolve-js-file-path.d.ts +14 -0
- package/dist/bootstrap/resolve-js-file-path.js +58 -0
- package/dist/bootstrap/resolve-js-file-path.js.map +1 -0
- package/dist/bootstrap/resolve-module-exports.d.ts +20 -0
- package/dist/bootstrap/resolve-module-exports.js +188 -0
- package/dist/bootstrap/resolve-module-exports.js.map +1 -0
- package/dist/bootstrap/schema-hot-reloader.d.ts +3 -0
- package/dist/bootstrap/schema-hot-reloader.js +60 -0
- package/dist/bootstrap/schema-hot-reloader.js.map +1 -0
- package/dist/cache/cache-fs.d.ts +1 -0
- package/dist/cache/cache-fs.js +270 -0
- package/dist/cache/cache-fs.js.map +1 -0
- package/dist/cache/json-file-store.d.ts +8 -0
- package/dist/cache/json-file-store.js +144 -0
- package/dist/cache/json-file-store.js.map +1 -0
- package/dist/cache/wrap-callback.d.ts +0 -0
- package/dist/cache/wrap-callback.js +49 -0
- package/dist/cache/wrap-callback.js.map +1 -0
- package/dist/commands/build-html.d.ts +69 -0
- package/dist/commands/build-html.js +652 -0
- package/dist/commands/build-html.js.map +1 -0
- package/dist/commands/build-javascript.d.ts +4 -0
- package/dist/commands/build-javascript.js +18 -0
- package/dist/commands/build-javascript.js.map +1 -0
- package/dist/commands/build-utils.d.ts +8 -0
- package/dist/commands/build-utils.js +186 -0
- package/dist/commands/build-utils.js.map +1 -0
- package/dist/commands/build.d.ts +1 -0
- package/dist/commands/build.js +505 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/clean.d.ts +1 -0
- package/dist/commands/clean.js +29 -0
- package/dist/commands/clean.js.map +1 -0
- package/dist/commands/develop-process.d.ts +1 -0
- package/dist/commands/develop-process.js +120 -0
- package/dist/commands/develop-process.js.map +1 -0
- package/dist/commands/develop-static.d.ts +3 -0
- package/dist/commands/develop-static.js +22 -0
- package/dist/commands/develop-static.js.map +1 -0
- package/dist/commands/develop.d.ts +2 -0
- package/dist/commands/develop.js +273 -0
- package/dist/commands/develop.js.map +1 -0
- package/dist/commands/feedback.d.ts +1 -0
- package/dist/commands/feedback.js +17 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/repl.d.ts +1 -0
- package/dist/commands/repl.js +58 -0
- package/dist/commands/repl.js.map +1 -0
- package/dist/commands/serve.d.ts +1 -0
- package/dist/commands/serve.js +282 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/types.d.ts +54 -0
- package/dist/commands/types.js +23 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +7 -0
- package/dist/constants.js.map +1 -0
- package/dist/datastore/common/iterable.d.ts +51 -0
- package/dist/datastore/common/iterable.js +217 -0
- package/dist/datastore/common/iterable.js.map +1 -0
- package/dist/datastore/common/query.d.ts +69 -0
- package/dist/datastore/common/query.js +219 -0
- package/dist/datastore/common/query.js.map +1 -0
- package/dist/datastore/datastore.d.ts +2 -0
- package/dist/datastore/datastore.js +23 -0
- package/dist/datastore/datastore.js.map +1 -0
- package/dist/datastore/in-memory/in-memory-datastore.d.ts +2 -0
- package/dist/datastore/in-memory/in-memory-datastore.js +75 -0
- package/dist/datastore/in-memory/in-memory-datastore.js.map +1 -0
- package/dist/datastore/in-memory/indexing.d.ts +80 -0
- package/dist/datastore/in-memory/indexing.js +994 -0
- package/dist/datastore/in-memory/indexing.js.map +1 -0
- package/dist/datastore/in-memory/run-fast-filters.d.ts +27 -0
- package/dist/datastore/in-memory/run-fast-filters.js +276 -0
- package/dist/datastore/in-memory/run-fast-filters.js.map +1 -0
- package/dist/datastore/index.d.ts +20 -0
- package/dist/datastore/index.js +34 -0
- package/dist/datastore/index.js.map +1 -0
- package/dist/datastore/lmdb/lmdb-datastore.d.ts +14 -0
- package/dist/datastore/lmdb/lmdb-datastore.js +261 -0
- package/dist/datastore/lmdb/lmdb-datastore.js.map +1 -0
- package/dist/datastore/lmdb/query/common.d.ts +23 -0
- package/dist/datastore/lmdb/query/common.js +127 -0
- package/dist/datastore/lmdb/query/common.js.map +1 -0
- package/dist/datastore/lmdb/query/create-index.d.ts +25 -0
- package/dist/datastore/lmdb/query/create-index.js +239 -0
- package/dist/datastore/lmdb/query/create-index.js.map +1 -0
- package/dist/datastore/lmdb/query/filter-using-index.d.ts +43 -0
- package/dist/datastore/lmdb/query/filter-using-index.js +577 -0
- package/dist/datastore/lmdb/query/filter-using-index.js.map +1 -0
- package/dist/datastore/lmdb/query/run-query.d.ts +9 -0
- package/dist/datastore/lmdb/query/run-query.js +285 -0
- package/dist/datastore/lmdb/query/run-query.js.map +1 -0
- package/dist/datastore/lmdb/query/suggest-index.d.ts +15 -0
- package/dist/datastore/lmdb/query/suggest-index.js +93 -0
- package/dist/datastore/lmdb/query/suggest-index.js.map +1 -0
- package/dist/datastore/lmdb/updates/nodes-by-type.d.ts +3 -0
- package/dist/datastore/lmdb/updates/nodes-by-type.js +21 -0
- package/dist/datastore/lmdb/updates/nodes-by-type.js.map +1 -0
- package/dist/datastore/lmdb/updates/nodes.d.ts +5 -0
- package/dist/datastore/lmdb/updates/nodes.js +33 -0
- package/dist/datastore/lmdb/updates/nodes.js.map +1 -0
- package/dist/datastore/types.d.ts +47 -0
- package/dist/datastore/types.js +4 -0
- package/dist/datastore/types.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/gatsby-node.js +42 -0
- package/dist/internal-plugins/bundle-optimisations/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/index.js +3 -0
- package/dist/internal-plugins/bundle-optimisations/index.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/package.json +10 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/fetch.js +4 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/fetch.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/no-op.js +3 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/no-op.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js +4 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/object-assign.js.map +1 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/whatwg-fetch.js +6 -0
- package/dist/internal-plugins/bundle-optimisations/polyfills/whatwg-fetch.js.map +1 -0
- package/dist/internal-plugins/dev-404-page/gatsby-node.js +30 -0
- package/dist/internal-plugins/dev-404-page/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/dev-404-page/index.js +3 -0
- package/dist/internal-plugins/dev-404-page/index.js.map +1 -0
- package/dist/internal-plugins/dev-404-page/package.json +11 -0
- package/dist/internal-plugins/dev-404-page/raw_dev-404-page.js +262 -0
- package/dist/internal-plugins/functions/api-function-webpack-loader.d.ts +3 -0
- package/dist/internal-plugins/functions/api-function-webpack-loader.js +74 -0
- package/dist/internal-plugins/functions/api-function-webpack-loader.js.map +1 -0
- package/dist/internal-plugins/functions/config.d.ts +20 -0
- package/dist/internal-plugins/functions/config.js +96 -0
- package/dist/internal-plugins/functions/config.js.map +1 -0
- package/dist/internal-plugins/functions/gatsby-node.d.ts +3 -0
- package/dist/internal-plugins/functions/gatsby-node.js +452 -0
- package/dist/internal-plugins/functions/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/functions/index.js +3 -0
- package/dist/internal-plugins/functions/index.js.map +1 -0
- package/dist/internal-plugins/functions/middleware.d.ts +11 -0
- package/dist/internal-plugins/functions/middleware.js +160 -0
- package/dist/internal-plugins/functions/middleware.js.map +1 -0
- package/dist/internal-plugins/functions/package.json +11 -0
- package/dist/internal-plugins/internal-data-bridge/gatsby-node.js +191 -0
- package/dist/internal-plugins/internal-data-bridge/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/internal-data-bridge/index.js +3 -0
- package/dist/internal-plugins/internal-data-bridge/index.js.map +1 -0
- package/dist/internal-plugins/internal-data-bridge/package.json +11 -0
- package/dist/internal-plugins/load-babel-config/gatsby-node.js +37 -0
- package/dist/internal-plugins/load-babel-config/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/load-babel-config/index.js +3 -0
- package/dist/internal-plugins/load-babel-config/index.js.map +1 -0
- package/dist/internal-plugins/load-babel-config/package.json +11 -0
- package/dist/internal-plugins/partytown/gatsby-browser.js +23 -0
- package/dist/internal-plugins/partytown/gatsby-browser.js.map +1 -0
- package/dist/internal-plugins/partytown/gatsby-node.d.ts +2 -0
- package/dist/internal-plugins/partytown/gatsby-node.js +60 -0
- package/dist/internal-plugins/partytown/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/partytown/gatsby-ssr.js +39 -0
- package/dist/internal-plugins/partytown/gatsby-ssr.js.map +1 -0
- package/dist/internal-plugins/partytown/index.js +3 -0
- package/dist/internal-plugins/partytown/index.js.map +1 -0
- package/dist/internal-plugins/partytown/package.json +12 -0
- package/dist/internal-plugins/partytown/proxy.d.ts +3 -0
- package/dist/internal-plugins/partytown/proxy.js +26 -0
- package/dist/internal-plugins/partytown/proxy.js.map +1 -0
- package/dist/internal-plugins/partytown/utils/get-forwards.d.ts +2 -0
- package/dist/internal-plugins/partytown/utils/get-forwards.js +8 -0
- package/dist/internal-plugins/partytown/utils/get-forwards.js.map +1 -0
- package/dist/internal-plugins/partytown/utils/inject-partytown-snippet.d.ts +2 -0
- package/dist/internal-plugins/partytown/utils/inject-partytown-snippet.js +28 -0
- package/dist/internal-plugins/partytown/utils/inject-partytown-snippet.js.map +1 -0
- package/dist/internal-plugins/prod-404-500/gatsby-node.js +50 -0
- package/dist/internal-plugins/prod-404-500/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/prod-404-500/index.js +3 -0
- package/dist/internal-plugins/prod-404-500/index.js.map +1 -0
- package/dist/internal-plugins/prod-404-500/package.json +11 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/create-page.js +31 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/create-page.js.map +1 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/gatsby-node.js +31 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/gatsby-node.js.map +1 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/index.js +273 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/index.js.map +1 -0
- package/dist/internal-plugins/webpack-theme-component-shadowing/package.json +11 -0
- package/dist/internal.d.ts +5 -0
- package/dist/internal.js +34 -0
- package/dist/internal.js.map +1 -0
- package/dist/joi-schemas/joi.d.ts +5 -0
- package/dist/joi-schemas/joi.js +122 -0
- package/dist/joi-schemas/joi.js.map +1 -0
- package/dist/query/error-parser.d.ts +19 -0
- package/dist/query/error-parser.js +163 -0
- package/dist/query/error-parser.js.map +1 -0
- package/dist/query/file-parser.js +584 -0
- package/dist/query/file-parser.js.map +1 -0
- package/dist/query/graphql-errors-codeframe.d.ts +1 -0
- package/dist/query/graphql-errors-codeframe.js +20 -0
- package/dist/query/graphql-errors-codeframe.js.map +1 -0
- package/dist/query/graphql-errors.js +278 -0
- package/dist/query/graphql-errors.js.map +1 -0
- package/dist/query/graphql-runner.d.ts +39 -0
- package/dist/query/graphql-runner.js +221 -0
- package/dist/query/graphql-runner.js.map +1 -0
- package/dist/query/graphql-span-tracer.d.ts +19 -0
- package/dist/query/graphql-span-tracer.js +63 -0
- package/dist/query/graphql-span-tracer.js.map +1 -0
- package/dist/query/index.d.ts +32 -0
- package/dist/query/index.js +301 -0
- package/dist/query/index.js.map +1 -0
- package/dist/query/query-compiler.js +433 -0
- package/dist/query/query-compiler.js.map +1 -0
- package/dist/query/query-runner.d.ts +13 -0
- package/dist/query/query-runner.js +176 -0
- package/dist/query/query-runner.js.map +1 -0
- package/dist/query/query-watcher.d.ts +17 -0
- package/dist/query/query-watcher.js +250 -0
- package/dist/query/query-watcher.js.map +1 -0
- package/dist/query/transform-document.d.ts +6 -0
- package/dist/query/transform-document.js +131 -0
- package/dist/query/transform-document.js.map +1 -0
- package/dist/query/types.d.ts +35 -0
- package/dist/query/types.js +4 -0
- package/dist/query/types.js.map +1 -0
- package/dist/query/utils.d.ts +4 -0
- package/dist/query/utils.js +20 -0
- package/dist/query/utils.js.map +1 -0
- package/dist/redux/actions/add-page-dependency.d.ts +7 -0
- package/dist/redux/actions/add-page-dependency.js +52 -0
- package/dist/redux/actions/add-page-dependency.js.map +1 -0
- package/dist/redux/actions/index.d.ts +16 -0
- package/dist/redux/actions/index.js +21 -0
- package/dist/redux/actions/index.js.map +1 -0
- package/dist/redux/actions/internal.d.ts +124 -0
- package/dist/redux/actions/internal.js +394 -0
- package/dist/redux/actions/internal.js.map +1 -0
- package/dist/redux/actions/public.js +1354 -0
- package/dist/redux/actions/public.js.map +1 -0
- package/dist/redux/actions/restricted.d.ts +332 -0
- package/dist/redux/actions/restricted.js +521 -0
- package/dist/redux/actions/restricted.js.map +1 -0
- package/dist/redux/index.d.ts +20 -0
- package/dist/redux/index.js +125 -0
- package/dist/redux/index.js.map +1 -0
- package/dist/redux/persist.d.ts +5 -0
- package/dist/redux/persist.js +191 -0
- package/dist/redux/persist.js.map +1 -0
- package/dist/redux/plugin-runner.d.ts +1 -0
- package/dist/redux/plugin-runner.js +45 -0
- package/dist/redux/plugin-runner.js.map +1 -0
- package/dist/redux/reducers/adapter.d.ts +6 -0
- package/dist/redux/reducers/adapter.js +22 -0
- package/dist/redux/reducers/adapter.js.map +1 -0
- package/dist/redux/reducers/babelrc.d.ts +9 -0
- package/dist/redux/reducers/babelrc.js +104 -0
- package/dist/redux/reducers/babelrc.js.map +1 -0
- package/dist/redux/reducers/components-using-slices.d.ts +2 -0
- package/dist/redux/reducers/components-using-slices.js +15 -0
- package/dist/redux/reducers/components-using-slices.js.map +1 -0
- package/dist/redux/reducers/components.d.ts +2 -0
- package/dist/redux/reducers/components.js +104 -0
- package/dist/redux/reducers/components.js.map +1 -0
- package/dist/redux/reducers/config.d.ts +2 -0
- package/dist/redux/reducers/config.js +16 -0
- package/dist/redux/reducers/config.js.map +1 -0
- package/dist/redux/reducers/definitions.d.ts +2 -0
- package/dist/redux/reducers/definitions.js +14 -0
- package/dist/redux/reducers/definitions.js.map +1 -0
- package/dist/redux/reducers/flattened-plugins.d.ts +17 -0
- package/dist/redux/reducers/flattened-plugins.js +14 -0
- package/dist/redux/reducers/flattened-plugins.js.map +1 -0
- package/dist/redux/reducers/functions.d.ts +2 -0
- package/dist/redux/reducers/functions.js +14 -0
- package/dist/redux/reducers/functions.js.map +1 -0
- package/dist/redux/reducers/html.d.ts +25 -0
- package/dist/redux/reducers/html.js +384 -0
- package/dist/redux/reducers/html.js.map +1 -0
- package/dist/redux/reducers/index.d.ts +45 -0
- package/dist/redux/reducers/index.js +86 -0
- package/dist/redux/reducers/index.js.map +1 -0
- package/dist/redux/reducers/inference-metadata.d.ts +7 -0
- package/dist/redux/reducers/inference-metadata.js +174 -0
- package/dist/redux/reducers/inference-metadata.js.map +1 -0
- package/dist/redux/reducers/jobs.d.ts +5 -0
- package/dist/redux/reducers/jobs.js +65 -0
- package/dist/redux/reducers/jobs.js.map +1 -0
- package/dist/redux/reducers/jobsv2.d.ts +6 -0
- package/dist/redux/reducers/jobsv2.js +88 -0
- package/dist/redux/reducers/jobsv2.js.map +1 -0
- package/dist/redux/reducers/last-action.d.ts +2 -0
- package/dist/redux/reducers/last-action.js +7 -0
- package/dist/redux/reducers/last-action.js.map +1 -0
- package/dist/redux/reducers/node-manifest.d.ts +2 -0
- package/dist/redux/reducers/node-manifest.js +58 -0
- package/dist/redux/reducers/node-manifest.js.map +1 -0
- package/dist/redux/reducers/nodes-by-type.d.ts +2 -0
- package/dist/redux/reducers/nodes-by-type.js +53 -0
- package/dist/redux/reducers/nodes-by-type.js.map +1 -0
- package/dist/redux/reducers/nodes-touched.d.ts +3 -0
- package/dist/redux/reducers/nodes-touched.js +18 -0
- package/dist/redux/reducers/nodes-touched.js.map +1 -0
- package/dist/redux/reducers/nodes.d.ts +2 -0
- package/dist/redux/reducers/nodes.js +30 -0
- package/dist/redux/reducers/nodes.js.map +1 -0
- package/dist/redux/reducers/page-data-stats.d.ts +2 -0
- package/dist/redux/reducers/page-data-stats.js +15 -0
- package/dist/redux/reducers/page-data-stats.js.map +1 -0
- package/dist/redux/reducers/pages.d.ts +2 -0
- package/dist/redux/reducers/pages.js +43 -0
- package/dist/redux/reducers/pages.js.map +1 -0
- package/dist/redux/reducers/pending-page-data-writes.d.ts +5 -0
- package/dist/redux/reducers/pending-page-data-writes.js +66 -0
- package/dist/redux/reducers/pending-page-data-writes.js.map +1 -0
- package/dist/redux/reducers/program.d.ts +2 -0
- package/dist/redux/reducers/program.js +62 -0
- package/dist/redux/reducers/program.js.map +1 -0
- package/dist/redux/reducers/queries.d.ts +26 -0
- package/dist/redux/reducers/queries.js +403 -0
- package/dist/redux/reducers/queries.js.map +1 -0
- package/dist/redux/reducers/redirects.d.ts +2 -0
- package/dist/redux/reducers/redirects.js +39 -0
- package/dist/redux/reducers/redirects.js.map +1 -0
- package/dist/redux/reducers/remote-file-allowed-urls.d.ts +2 -0
- package/dist/redux/reducers/remote-file-allowed-urls.js +19 -0
- package/dist/redux/reducers/remote-file-allowed-urls.js.map +1 -0
- package/dist/redux/reducers/resolved-nodes.d.ts +2 -0
- package/dist/redux/reducers/resolved-nodes.js +45 -0
- package/dist/redux/reducers/resolved-nodes.js.map +1 -0
- package/dist/redux/reducers/schema-customization.d.ts +23 -0
- package/dist/redux/reducers/schema-customization.js +103 -0
- package/dist/redux/reducers/schema-customization.js.map +1 -0
- package/dist/redux/reducers/schema.d.ts +3 -0
- package/dist/redux/reducers/schema.js +17 -0
- package/dist/redux/reducers/schema.js.map +1 -0
- package/dist/redux/reducers/set-request-headers.d.ts +7 -0
- package/dist/redux/reducers/set-request-headers.js +24 -0
- package/dist/redux/reducers/set-request-headers.js.map +1 -0
- package/dist/redux/reducers/slices-by-template.d.ts +2 -0
- package/dist/redux/reducers/slices-by-template.js +16 -0
- package/dist/redux/reducers/slices-by-template.js.map +1 -0
- package/dist/redux/reducers/slices.d.ts +2 -0
- package/dist/redux/reducers/slices.js +22 -0
- package/dist/redux/reducers/slices.js.map +1 -0
- package/dist/redux/reducers/stateful-source-plugins.d.ts +5 -0
- package/dist/redux/reducers/stateful-source-plugins.js +20 -0
- package/dist/redux/reducers/stateful-source-plugins.js.map +1 -0
- package/dist/redux/reducers/static-queries-by-template.d.ts +2 -0
- package/dist/redux/reducers/static-queries-by-template.js +19 -0
- package/dist/redux/reducers/static-queries-by-template.js.map +1 -0
- package/dist/redux/reducers/static-query-components.d.ts +2 -0
- package/dist/redux/reducers/static-query-components.js +18 -0
- package/dist/redux/reducers/static-query-components.js.map +1 -0
- package/dist/redux/reducers/status.d.ts +7 -0
- package/dist/redux/reducers/status.js +57 -0
- package/dist/redux/reducers/status.js.map +1 -0
- package/dist/redux/reducers/telemetry.d.ts +2 -0
- package/dist/redux/reducers/telemetry.js +46 -0
- package/dist/redux/reducers/telemetry.js.map +1 -0
- package/dist/redux/reducers/type-owners.d.ts +5 -0
- package/dist/redux/reducers/type-owners.js +102 -0
- package/dist/redux/reducers/type-owners.js.map +1 -0
- package/dist/redux/reducers/visited-page.d.ts +2 -0
- package/dist/redux/reducers/visited-page.js +31 -0
- package/dist/redux/reducers/visited-page.js.map +1 -0
- package/dist/redux/reducers/webpack-compilation-hash.d.ts +2 -0
- package/dist/redux/reducers/webpack-compilation-hash.js +14 -0
- package/dist/redux/reducers/webpack-compilation-hash.js.map +1 -0
- package/dist/redux/reducers/webpack.d.ts +2 -0
- package/dist/redux/reducers/webpack.js +27 -0
- package/dist/redux/reducers/webpack.js.map +1 -0
- package/dist/redux/save-state.js +19 -0
- package/dist/redux/save-state.js.map +1 -0
- package/dist/redux/types.d.ts +1337 -0
- package/dist/redux/types.js +326 -0
- package/dist/redux/types.js.map +1 -0
- package/dist/schema/context.d.ts +14 -0
- package/dist/schema/context.js +38 -0
- package/dist/schema/context.js.map +1 -0
- package/dist/schema/extensions/index.js +205 -0
- package/dist/schema/extensions/index.js.map +1 -0
- package/dist/schema/graphql-engine/bootstrap.d.ts +2 -0
- package/dist/schema/graphql-engine/bootstrap.js +12 -0
- package/dist/schema/graphql-engine/bootstrap.js.map +1 -0
- package/dist/schema/graphql-engine/bundle-webpack.d.ts +5 -0
- package/dist/schema/graphql-engine/bundle-webpack.js +446 -0
- package/dist/schema/graphql-engine/bundle-webpack.js.map +1 -0
- package/dist/schema/graphql-engine/entry.d.ts +23 -0
- package/dist/schema/graphql-engine/entry.js +204 -0
- package/dist/schema/graphql-engine/entry.js.map +1 -0
- package/dist/schema/graphql-engine/lmdb-bundling-patch.d.ts +1 -0
- package/dist/schema/graphql-engine/lmdb-bundling-patch.js +72 -0
- package/dist/schema/graphql-engine/lmdb-bundling-patch.js.map +1 -0
- package/dist/schema/graphql-engine/platform-and-arch-check.d.ts +0 -0
- package/dist/schema/graphql-engine/platform-and-arch-check.js +6 -0
- package/dist/schema/graphql-engine/platform-and-arch-check.js.map +1 -0
- package/dist/schema/graphql-engine/print-plugins.d.ts +2 -0
- package/dist/schema/graphql-engine/print-plugins.js +145 -0
- package/dist/schema/graphql-engine/print-plugins.js.map +1 -0
- package/dist/schema/graphql-engine/sharp-bundling-patch.d.ts +1 -0
- package/dist/schema/graphql-engine/sharp-bundling-patch.js +8 -0
- package/dist/schema/graphql-engine/sharp-bundling-patch.js.map +1 -0
- package/dist/schema/graphql-engine/shims/gatsby-sharp.js +10 -0
- package/dist/schema/graphql-engine/shims/gatsby-sharp.js.map +1 -0
- package/dist/schema/graphql-engine/shims/no-op-module.js +3 -0
- package/dist/schema/graphql-engine/shims/no-op-module.js.map +1 -0
- package/dist/schema/graphql-engine/shims/ts-node.js +17 -0
- package/dist/schema/graphql-engine/shims/ts-node.js.map +1 -0
- package/dist/schema/graphql-engine/standalone-regenerate.d.ts +2 -0
- package/dist/schema/graphql-engine/standalone-regenerate.js +73 -0
- package/dist/schema/graphql-engine/standalone-regenerate.js.map +1 -0
- package/dist/schema/index.js +189 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/schema/infer/add-inferred-fields.js +413 -0
- package/dist/schema/infer/add-inferred-fields.js.map +1 -0
- package/dist/schema/infer/build-example-data.d.ts +5 -0
- package/dist/schema/infer/build-example-data.js +199 -0
- package/dist/schema/infer/build-example-data.js.map +1 -0
- package/dist/schema/infer/index.js +121 -0
- package/dist/schema/infer/index.js.map +1 -0
- package/dist/schema/infer/inference-metadata.d.ts +72 -0
- package/dist/schema/infer/inference-metadata.js +280 -0
- package/dist/schema/infer/inference-metadata.js.map +1 -0
- package/dist/schema/infer/is-file.d.ts +1 -0
- package/dist/schema/infer/is-file.js +65 -0
- package/dist/schema/infer/is-file.js.map +1 -0
- package/dist/schema/infer/type-conflict-reporter.d.ts +28 -0
- package/dist/schema/infer/type-conflict-reporter.js +104 -0
- package/dist/schema/infer/type-conflict-reporter.js.map +1 -0
- package/dist/schema/node-model.js +784 -0
- package/dist/schema/node-model.js.map +1 -0
- package/dist/schema/print.d.ts +20 -0
- package/dist/schema/print.js +279 -0
- package/dist/schema/print.js.map +1 -0
- package/dist/schema/resolvers.d.ts +40 -0
- package/dist/schema/resolvers.js +569 -0
- package/dist/schema/resolvers.js.map +1 -0
- package/dist/schema/schema-composer.d.ts +3 -0
- package/dist/schema/schema-composer.js +31 -0
- package/dist/schema/schema-composer.js.map +1 -0
- package/dist/schema/schema.js +1295 -0
- package/dist/schema/schema.js.map +1 -0
- package/dist/schema/type-definitions.d.ts +47 -0
- package/dist/schema/type-definitions.js +4 -0
- package/dist/schema/type-definitions.js.map +1 -0
- package/dist/schema/types/built-in-types.d.ts +5 -0
- package/dist/schema/types/built-in-types.js +139 -0
- package/dist/schema/types/built-in-types.js.map +1 -0
- package/dist/schema/types/date.d.ts +37 -0
- package/dist/schema/types/date.js +225 -0
- package/dist/schema/types/date.js.map +1 -0
- package/dist/schema/types/derived-types.d.ts +45 -0
- package/dist/schema/types/derived-types.js +108 -0
- package/dist/schema/types/derived-types.js.map +1 -0
- package/dist/schema/types/filter.d.ts +12 -0
- package/dist/schema/types/filter.js +105 -0
- package/dist/schema/types/filter.js.map +1 -0
- package/dist/schema/types/media.d.ts +2 -0
- package/dist/schema/types/media.js +10 -0
- package/dist/schema/types/media.js.map +1 -0
- package/dist/schema/types/node-interface.d.ts +14 -0
- package/dist/schema/types/node-interface.js +103 -0
- package/dist/schema/types/node-interface.js.map +1 -0
- package/dist/schema/types/pagination.d.ts +16 -0
- package/dist/schema/types/pagination.js +198 -0
- package/dist/schema/types/pagination.js.map +1 -0
- package/dist/schema/types/remote-file-interface.d.ts +3 -0
- package/dist/schema/types/remote-file-interface.js +34 -0
- package/dist/schema/types/remote-file-interface.js.map +1 -0
- package/dist/schema/types/sort.d.ts +24 -0
- package/dist/schema/types/sort.js +178 -0
- package/dist/schema/types/sort.js.map +1 -0
- package/dist/schema/types/type-builders.d.ts +36 -0
- package/dist/schema/types/type-builders.js +61 -0
- package/dist/schema/types/type-builders.js.map +1 -0
- package/dist/schema/types/type-defs.js +86 -0
- package/dist/schema/types/type-defs.js.map +1 -0
- package/dist/schema/types/utils.d.ts +33 -0
- package/dist/schema/types/utils.js +153 -0
- package/dist/schema/types/utils.js.map +1 -0
- package/dist/schema/utils.d.ts +28 -0
- package/dist/schema/utils.js +149 -0
- package/dist/schema/utils.js.map +1 -0
- package/dist/services/build-schema.d.ts +2 -0
- package/dist/services/build-schema.js +24 -0
- package/dist/services/build-schema.js.map +1 -0
- package/dist/services/calculate-dirty-queries.d.ts +5 -0
- package/dist/services/calculate-dirty-queries.js +44 -0
- package/dist/services/calculate-dirty-queries.js.map +1 -0
- package/dist/services/create-pages.d.ts +5 -0
- package/dist/services/create-pages.js +108 -0
- package/dist/services/create-pages.js.map +1 -0
- package/dist/services/customize-schema.d.ts +2 -0
- package/dist/services/customize-schema.js +26 -0
- package/dist/services/customize-schema.js.map +1 -0
- package/dist/services/extract-queries.d.ts +2 -0
- package/dist/services/extract-queries.js +24 -0
- package/dist/services/extract-queries.js.map +1 -0
- package/dist/services/graphql-typegen.d.ts +2 -0
- package/dist/services/graphql-typegen.js +46 -0
- package/dist/services/graphql-typegen.js.map +1 -0
- package/dist/services/index.d.ts +19 -0
- package/dist/services/index.js +68 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/initialize.d.ts +14 -0
- package/dist/services/initialize.js +519 -0
- package/dist/services/initialize.js.map +1 -0
- package/dist/services/listen-for-mutations.d.ts +2 -0
- package/dist/services/listen-for-mutations.js +59 -0
- package/dist/services/listen-for-mutations.js.map +1 -0
- package/dist/services/listen-to-webpack.d.ts +3 -0
- package/dist/services/listen-to-webpack.js +17 -0
- package/dist/services/listen-to-webpack.js.map +1 -0
- package/dist/services/post-bootstrap.d.ts +2 -0
- package/dist/services/post-bootstrap.js +29 -0
- package/dist/services/post-bootstrap.js.map +1 -0
- package/dist/services/recompile.d.ts +3 -0
- package/dist/services/recompile.js +67 -0
- package/dist/services/recompile.js.map +1 -0
- package/dist/services/run-mutation-batch.d.ts +2 -0
- package/dist/services/run-mutation-batch.js +12 -0
- package/dist/services/run-mutation-batch.js.map +1 -0
- package/dist/services/run-page-queries.d.ts +2 -0
- package/dist/services/run-page-queries.js +38 -0
- package/dist/services/run-page-queries.js.map +1 -0
- package/dist/services/run-slice-queries.d.ts +2 -0
- package/dist/services/run-slice-queries.js +40 -0
- package/dist/services/run-slice-queries.js.map +1 -0
- package/dist/services/run-static-queries.d.ts +2 -0
- package/dist/services/run-static-queries.js +38 -0
- package/dist/services/run-static-queries.js.map +1 -0
- package/dist/services/source-nodes.d.ts +5 -0
- package/dist/services/source-nodes.js +47 -0
- package/dist/services/source-nodes.js.map +1 -0
- package/dist/services/start-webpack-server.d.ts +9 -0
- package/dist/services/start-webpack-server.js +103 -0
- package/dist/services/start-webpack-server.js.map +1 -0
- package/dist/services/types.d.ts +53 -0
- package/dist/services/types.js +4 -0
- package/dist/services/types.js.map +1 -0
- package/dist/services/write-out-redirects.d.ts +2 -0
- package/dist/services/write-out-redirects.js +20 -0
- package/dist/services/write-out-redirects.js.map +1 -0
- package/dist/services/write-out-requires.d.ts +2 -0
- package/dist/services/write-out-requires.js +27 -0
- package/dist/services/write-out-requires.js.map +1 -0
- package/dist/state-machines/data-layer/actions.d.ts +11 -0
- package/dist/state-machines/data-layer/actions.js +38 -0
- package/dist/state-machines/data-layer/actions.js.map +1 -0
- package/dist/state-machines/data-layer/index.d.ts +24 -0
- package/dist/state-machines/data-layer/index.js +152 -0
- package/dist/state-machines/data-layer/index.js.map +1 -0
- package/dist/state-machines/data-layer/services.d.ts +3 -0
- package/dist/state-machines/data-layer/services.js +14 -0
- package/dist/state-machines/data-layer/services.js.map +1 -0
- package/dist/state-machines/data-layer/types.d.ts +27 -0
- package/dist/state-machines/data-layer/types.js +4 -0
- package/dist/state-machines/data-layer/types.js.map +1 -0
- package/dist/state-machines/develop/actions.d.ts +68 -0
- package/dist/state-machines/develop/actions.js +259 -0
- package/dist/state-machines/develop/actions.js.map +1 -0
- package/dist/state-machines/develop/index.d.ts +5 -0
- package/dist/state-machines/develop/index.js +372 -0
- package/dist/state-machines/develop/index.js.map +1 -0
- package/dist/state-machines/develop/services.d.ts +3 -0
- package/dist/state-machines/develop/services.js +22 -0
- package/dist/state-machines/develop/services.js.map +1 -0
- package/dist/state-machines/index.d.ts +7 -0
- package/dist/state-machines/index.js +21 -0
- package/dist/state-machines/index.js.map +1 -0
- package/dist/state-machines/query-running/actions.d.ts +9 -0
- package/dist/state-machines/query-running/actions.js +55 -0
- package/dist/state-machines/query-running/actions.js.map +1 -0
- package/dist/state-machines/query-running/index.d.ts +7 -0
- package/dist/state-machines/query-running/index.js +142 -0
- package/dist/state-machines/query-running/index.js.map +1 -0
- package/dist/state-machines/query-running/services.d.ts +3 -0
- package/dist/state-machines/query-running/services.js +17 -0
- package/dist/state-machines/query-running/services.js.map +1 -0
- package/dist/state-machines/query-running/types.d.ts +26 -0
- package/dist/state-machines/query-running/types.js +4 -0
- package/dist/state-machines/query-running/types.js.map +1 -0
- package/dist/state-machines/waiting/actions.d.ts +11 -0
- package/dist/state-machines/waiting/actions.js +36 -0
- package/dist/state-machines/waiting/actions.js.map +1 -0
- package/dist/state-machines/waiting/index.d.ts +12 -0
- package/dist/state-machines/waiting/index.js +145 -0
- package/dist/state-machines/waiting/index.js.map +1 -0
- package/dist/state-machines/waiting/services.d.ts +3 -0
- package/dist/state-machines/waiting/services.js +10 -0
- package/dist/state-machines/waiting/services.js.map +1 -0
- package/dist/state-machines/waiting/types.d.ts +12 -0
- package/dist/state-machines/waiting/types.js +4 -0
- package/dist/state-machines/waiting/types.js.map +1 -0
- package/dist/types.d.ts +9 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/adapter/constants.d.ts +5 -0
- package/dist/utils/adapter/constants.js +31 -0
- package/dist/utils/adapter/constants.js.map +1 -0
- package/dist/utils/adapter/create-headers.d.ts +10 -0
- package/dist/utils/adapter/create-headers.js +94 -0
- package/dist/utils/adapter/create-headers.js.map +1 -0
- package/dist/utils/adapter/get-route-path.d.ts +3 -0
- package/dist/utils/adapter/get-route-path.js +22 -0
- package/dist/utils/adapter/get-route-path.js.map +1 -0
- package/dist/utils/adapter/init.d.ts +3 -0
- package/dist/utils/adapter/init.js +183 -0
- package/dist/utils/adapter/init.js.map +1 -0
- package/dist/utils/adapter/manager.d.ts +9 -0
- package/dist/utils/adapter/manager.js +554 -0
- package/dist/utils/adapter/manager.js.map +1 -0
- package/dist/utils/adapter/no-op-manager.d.ts +2 -0
- package/dist/utils/adapter/no-op-manager.js +18 -0
- package/dist/utils/adapter/no-op-manager.js.map +1 -0
- package/dist/utils/adapter/types.d.ts +282 -0
- package/dist/utils/adapter/types.js +4 -0
- package/dist/utils/adapter/types.js.map +1 -0
- package/dist/utils/api-browser-docs.d.ts +272 -0
- package/dist/utils/api-browser-docs.js +318 -0
- package/dist/utils/api-browser-docs.js.map +1 -0
- package/dist/utils/api-node-docs.d.ts +470 -0
- package/dist/utils/api-node-docs.js +519 -0
- package/dist/utils/api-node-docs.js.map +1 -0
- package/dist/utils/api-node-helpers-docs.js +322 -0
- package/dist/utils/api-node-helpers-docs.js.map +1 -0
- package/dist/utils/api-runner-error-parser.d.ts +5 -0
- package/dist/utils/api-runner-error-parser.js +63 -0
- package/dist/utils/api-runner-error-parser.js.map +1 -0
- package/dist/utils/api-runner-node.js +663 -0
- package/dist/utils/api-runner-node.js.map +1 -0
- package/dist/utils/app-data.d.ts +2 -0
- package/dist/utils/app-data.js +15 -0
- package/dist/utils/app-data.js.map +1 -0
- package/dist/utils/assert-store.d.ts +2 -0
- package/dist/utils/assert-store.js +12 -0
- package/dist/utils/assert-store.js.map +1 -0
- package/dist/utils/babel/babel-module-exports-helpers.d.ts +22 -0
- package/dist/utils/babel/babel-module-exports-helpers.js +48 -0
- package/dist/utils/babel/babel-module-exports-helpers.js.map +1 -0
- package/dist/utils/babel/babel-plugin-add-slice-placeholder-location.d.ts +10 -0
- package/dist/utils/babel/babel-plugin-add-slice-placeholder-location.js +48 -0
- package/dist/utils/babel/babel-plugin-add-slice-placeholder-location.js.map +1 -0
- package/dist/utils/babel/babel-plugin-remove-api.d.ts +5 -0
- package/dist/utils/babel/babel-plugin-remove-api.js +148 -0
- package/dist/utils/babel/babel-plugin-remove-api.js.map +1 -0
- package/dist/utils/babel/find-slices.d.ts +8 -0
- package/dist/utils/babel/find-slices.js +68 -0
- package/dist/utils/babel/find-slices.js.map +1 -0
- package/dist/utils/babel-loader-helpers.d.ts +19 -0
- package/dist/utils/babel-loader-helpers.js +158 -0
- package/dist/utils/babel-loader-helpers.js.map +1 -0
- package/dist/utils/babel-loader.d.ts +8 -0
- package/dist/utils/babel-loader.js +158 -0
- package/dist/utils/babel-loader.js.map +1 -0
- package/dist/utils/babel-parse-to-ast.d.ts +4 -0
- package/dist/utils/babel-parse-to-ast.js +34 -0
- package/dist/utils/babel-parse-to-ast.js.map +1 -0
- package/dist/utils/batcher.d.ts +15 -0
- package/dist/utils/batcher.js +46 -0
- package/dist/utils/batcher.js.map +1 -0
- package/dist/utils/browserslist.d.ts +2 -0
- package/dist/utils/browserslist.js +38 -0
- package/dist/utils/browserslist.js.map +1 -0
- package/dist/utils/cache-lmdb.d.ts +19 -0
- package/dist/utils/cache-lmdb.js +88 -0
- package/dist/utils/cache-lmdb.js.map +1 -0
- package/dist/utils/cache.d.ts +17 -0
- package/dist/utils/cache.js +77 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/call-deferred-api.d.ts +8 -0
- package/dist/utils/call-deferred-api.js +35 -0
- package/dist/utils/call-deferred-api.js.map +1 -0
- package/dist/utils/changed-pages.d.ts +6 -0
- package/dist/utils/changed-pages.js +45 -0
- package/dist/utils/changed-pages.js.map +1 -0
- package/dist/utils/clear-require-cache.d.ts +1 -0
- package/dist/utils/clear-require-cache.js +24 -0
- package/dist/utils/clear-require-cache.js.map +1 -0
- package/dist/utils/client-assets-for-template.d.ts +9 -0
- package/dist/utils/client-assets-for-template.js +141 -0
- package/dist/utils/client-assets-for-template.js.map +1 -0
- package/dist/utils/create-node-id.d.ts +24 -0
- package/dist/utils/create-node-id.js +67 -0
- package/dist/utils/create-node-id.js.map +1 -0
- package/dist/utils/create-schema-customization.d.ts +6 -0
- package/dist/utils/create-schema-customization.js +25 -0
- package/dist/utils/create-schema-customization.js.map +1 -0
- package/dist/utils/detect-node-mutations.d.ts +4 -0
- package/dist/utils/detect-node-mutations.js +134 -0
- package/dist/utils/detect-node-mutations.js.map +1 -0
- package/dist/utils/detect-port-in-use-and-prompt.d.ts +1 -0
- package/dist/utils/detect-port-in-use-and-prompt.js +31 -0
- package/dist/utils/detect-port-in-use-and-prompt.js.map +1 -0
- package/dist/utils/dev-ssr/parse-error.d.ts +22 -0
- package/dist/utils/dev-ssr/parse-error.js +119 -0
- package/dist/utils/dev-ssr/parse-error.js.map +1 -0
- package/dist/utils/dev-ssr/render-dev-html-child.d.ts +13 -0
- package/dist/utils/dev-ssr/render-dev-html-child.js +47 -0
- package/dist/utils/dev-ssr/render-dev-html-child.js.map +1 -0
- package/dist/utils/dev-ssr/render-dev-html.d.ts +23 -0
- package/dist/utils/dev-ssr/render-dev-html.js +227 -0
- package/dist/utils/dev-ssr/render-dev-html.js.map +1 -0
- package/dist/utils/develop-preload-headers.d.ts +7 -0
- package/dist/utils/develop-preload-headers.js +64 -0
- package/dist/utils/develop-preload-headers.js.map +1 -0
- package/dist/utils/did-you-mean.d.ts +3 -0
- package/dist/utils/did-you-mean.js +21 -0
- package/dist/utils/did-you-mean.js.map +1 -0
- package/dist/utils/engine-context.d.ts +5 -0
- package/dist/utils/engine-context.js +19 -0
- package/dist/utils/engine-context.js.map +1 -0
- package/dist/utils/engines-fs-provider.d.ts +9 -0
- package/dist/utils/engines-fs-provider.js +24 -0
- package/dist/utils/engines-fs-provider.js.map +1 -0
- package/dist/utils/engines-helpers.d.ts +10 -0
- package/dist/utils/engines-helpers.js +48 -0
- package/dist/utils/engines-helpers.js.map +1 -0
- package/dist/utils/ensure-file-content.d.ts +1 -0
- package/dist/utils/ensure-file-content.js +19 -0
- package/dist/utils/ensure-file-content.js.map +1 -0
- package/dist/utils/eslint/required.js +10 -0
- package/dist/utils/eslint/required.js.map +1 -0
- package/dist/utils/eslint-config.d.ts +3 -0
- package/dist/utils/eslint-config.js +136 -0
- package/dist/utils/eslint-config.js.map +1 -0
- package/dist/utils/eslint-rules/limited-exports-page-templates.d.ts +1 -0
- package/dist/utils/eslint-rules/limited-exports-page-templates.js +183 -0
- package/dist/utils/eslint-rules/limited-exports-page-templates.js.map +1 -0
- package/dist/utils/eslint-rules/no-anonymous-exports-page-templates.d.ts +1 -0
- package/dist/utils/eslint-rules/no-anonymous-exports-page-templates.js +75 -0
- package/dist/utils/eslint-rules/no-anonymous-exports-page-templates.js.map +1 -0
- package/dist/utils/eslint-rules-helpers.d.ts +4 -0
- package/dist/utils/eslint-rules-helpers.js +22 -0
- package/dist/utils/eslint-rules-helpers.js.map +1 -0
- package/dist/utils/express-middlewares.d.ts +4 -0
- package/dist/utils/express-middlewares.js +57 -0
- package/dist/utils/express-middlewares.js.map +1 -0
- package/dist/utils/extract-undefined-global.d.ts +4 -0
- package/dist/utils/extract-undefined-global.js +15 -0
- package/dist/utils/extract-undefined-global.js.map +1 -0
- package/dist/utils/fast-refresh-module.d.ts +22 -0
- package/dist/utils/fast-refresh-module.js +53 -0
- package/dist/utils/fast-refresh-module.js.map +1 -0
- package/dist/utils/feedback.d.ts +5 -0
- package/dist/utils/feedback.js +159 -0
- package/dist/utils/feedback.js.map +1 -0
- package/dist/utils/find-page-by-path.d.ts +2 -0
- package/dist/utils/find-page-by-path.js +96 -0
- package/dist/utils/find-page-by-path.js.map +1 -0
- package/dist/utils/flags.d.ts +41 -0
- package/dist/utils/flags.js +92 -0
- package/dist/utils/flags.js.map +1 -0
- package/dist/utils/gatsby-cloud-config.d.ts +4 -0
- package/dist/utils/gatsby-cloud-config.js +15 -0
- package/dist/utils/gatsby-cloud-config.js.map +1 -0
- package/dist/utils/gatsby-dependents.d.ts +8 -0
- package/dist/utils/gatsby-dependents.js +51 -0
- package/dist/utils/gatsby-dependents.js.map +1 -0
- package/dist/utils/gatsby-webpack-stats-extractor.d.ts +7 -0
- package/dist/utils/gatsby-webpack-stats-extractor.js +136 -0
- package/dist/utils/gatsby-webpack-stats-extractor.js.map +1 -0
- package/dist/utils/gatsby-webpack-virtual-modules.d.ts +6 -0
- package/dist/utils/gatsby-webpack-virtual-modules.js +45 -0
- package/dist/utils/gatsby-webpack-virtual-modules.js.map +1 -0
- package/dist/utils/get-cache.d.ts +2 -0
- package/dist/utils/get-cache.js +18 -0
- package/dist/utils/get-cache.js.map +1 -0
- package/dist/utils/get-latest-gatsby-files.d.ts +8 -0
- package/dist/utils/get-latest-gatsby-files.js +93 -0
- package/dist/utils/get-latest-gatsby-files.js.map +1 -0
- package/dist/utils/get-page-data.d.ts +3 -0
- package/dist/utils/get-page-data.js +88 -0
- package/dist/utils/get-page-data.js.map +1 -0
- package/dist/utils/get-public-path.d.ts +5 -0
- package/dist/utils/get-public-path.js +19 -0
- package/dist/utils/get-public-path.js.map +1 -0
- package/dist/utils/get-server-data.d.ts +19 -0
- package/dist/utils/get-server-data.js +29 -0
- package/dist/utils/get-server-data.js.map +1 -0
- package/dist/utils/get-ssl-cert.d.ts +9 -0
- package/dist/utils/get-ssl-cert.js +95 -0
- package/dist/utils/get-ssl-cert.js.map +1 -0
- package/dist/utils/get-static-dir.d.ts +12 -0
- package/dist/utils/get-static-dir.js +60 -0
- package/dist/utils/get-static-dir.js.map +1 -0
- package/dist/utils/get-value-at.d.ts +1 -0
- package/dist/utils/get-value-at.js +22 -0
- package/dist/utils/get-value-at.js.map +1 -0
- package/dist/utils/graphql-typegen/file-writes.d.ts +5 -0
- package/dist/utils/graphql-typegen/file-writes.js +63 -0
- package/dist/utils/graphql-typegen/file-writes.js.map +1 -0
- package/dist/utils/graphql-typegen/ts-codegen.d.ts +5 -0
- package/dist/utils/graphql-typegen/ts-codegen.js +136 -0
- package/dist/utils/graphql-typegen/ts-codegen.js.map +1 -0
- package/dist/utils/graphql-typegen/utils.d.ts +11 -0
- package/dist/utils/graphql-typegen/utils.js +70 -0
- package/dist/utils/graphql-typegen/utils.js.map +1 -0
- package/dist/utils/handle-flags.d.ts +8 -0
- package/dist/utils/handle-flags.js +212 -0
- package/dist/utils/handle-flags.js.map +1 -0
- package/dist/utils/import-gatsby-plugin.d.ts +11 -0
- package/dist/utils/import-gatsby-plugin.js +40 -0
- package/dist/utils/import-gatsby-plugin.js.map +1 -0
- package/dist/utils/is-32-bit-integer.d.ts +1 -0
- package/dist/utils/is-32-bit-integer.js +8 -0
- package/dist/utils/is-32-bit-integer.js.map +1 -0
- package/dist/utils/is-near-match.d.ts +1 -0
- package/dist/utils/is-near-match.js +10 -0
- package/dist/utils/is-near-match.js.map +1 -0
- package/dist/utils/jobs/manager.d.ts +34 -0
- package/dist/utils/jobs/manager.js +313 -0
- package/dist/utils/jobs/manager.js.map +1 -0
- package/dist/utils/jobs/types.d.ts +63 -0
- package/dist/utils/jobs/types.js +32 -0
- package/dist/utils/jobs/types.js.map +1 -0
- package/dist/utils/jobs/worker-messaging.d.ts +10 -0
- package/dist/utils/jobs/worker-messaging.js +114 -0
- package/dist/utils/jobs/worker-messaging.js.map +1 -0
- package/dist/utils/js-chunk-names.d.ts +1 -0
- package/dist/utils/js-chunk-names.js +72 -0
- package/dist/utils/js-chunk-names.js.map +1 -0
- package/dist/utils/loading-indicator.d.ts +3 -0
- package/dist/utils/loading-indicator.js +44 -0
- package/dist/utils/loading-indicator.js.map +1 -0
- package/dist/utils/local-eslint-config-finder.d.ts +1 -0
- package/dist/utils/local-eslint-config-finder.js +31 -0
- package/dist/utils/local-eslint-config-finder.js.map +1 -0
- package/dist/utils/merge-gatsby-config.d.ts +28 -0
- package/dist/utils/merge-gatsby-config.js +43 -0
- package/dist/utils/merge-gatsby-config.js.map +1 -0
- package/dist/utils/mett.d.ts +10 -0
- package/dist/utils/mett.js +42 -0
- package/dist/utils/mett.js.map +1 -0
- package/dist/utils/module-resolver.d.ts +2 -0
- package/dist/utils/module-resolver.js +24 -0
- package/dist/utils/module-resolver.js.map +1 -0
- package/dist/utils/node-manifest.d.ts +46 -0
- package/dist/utils/node-manifest.js +367 -0
- package/dist/utils/node-manifest.js.map +1 -0
- package/dist/utils/nodes.d.ts +13 -0
- package/dist/utils/nodes.js +62 -0
- package/dist/utils/nodes.js.map +1 -0
- package/dist/utils/normalize-path.d.ts +2 -0
- package/dist/utils/normalize-path.js +11 -0
- package/dist/utils/normalize-path.js.map +1 -0
- package/dist/utils/page-data-helpers.d.ts +23 -0
- package/dist/utils/page-data-helpers.js +76 -0
- package/dist/utils/page-data-helpers.js.map +1 -0
- package/dist/utils/page-data.d.ts +39 -0
- package/dist/utils/page-data.js +366 -0
- package/dist/utils/page-data.js.map +1 -0
- package/dist/utils/page-mode.d.ts +18 -0
- package/dist/utils/page-mode.js +124 -0
- package/dist/utils/page-mode.js.map +1 -0
- package/dist/utils/page-ssr-module/bundle-webpack.d.ts +18 -0
- package/dist/utils/page-ssr-module/bundle-webpack.js +209 -0
- package/dist/utils/page-ssr-module/bundle-webpack.js.map +1 -0
- package/dist/utils/page-ssr-module/entry.d.ts +61 -0
- package/dist/utils/page-ssr-module/entry.js +344 -0
- package/dist/utils/page-ssr-module/entry.js.map +1 -0
- package/dist/utils/page-ssr-module/lambda.d.ts +3 -0
- package/dist/utils/page-ssr-module/lambda.js +401 -0
- package/dist/utils/page-ssr-module/lambda.js.map +1 -0
- package/dist/utils/parcel/compile-gatsby-files.d.ts +26 -0
- package/dist/utils/parcel/compile-gatsby-files.js +271 -0
- package/dist/utils/parcel/compile-gatsby-files.js.map +1 -0
- package/dist/utils/path.d.ts +5 -0
- package/dist/utils/path.js +55 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/prepare-regex.d.ts +1 -0
- package/dist/utils/prepare-regex.js +13 -0
- package/dist/utils/prepare-regex.js.map +1 -0
- package/dist/utils/prepare-urls.d.ts +7 -0
- package/dist/utils/prepare-urls.js +58 -0
- package/dist/utils/prepare-urls.js.map +1 -0
- package/dist/utils/print-instructions.d.ts +2 -0
- package/dist/utils/print-instructions.js +42 -0
- package/dist/utils/print-instructions.js.map +1 -0
- package/dist/utils/rank-route.d.ts +1 -0
- package/dist/utils/rank-route.js +26 -0
- package/dist/utils/rank-route.js.map +1 -0
- package/dist/utils/reach-router-add-basecontext-export-loader.d.ts +1 -0
- package/dist/utils/reach-router-add-basecontext-export-loader.js +23 -0
- package/dist/utils/reach-router-add-basecontext-export-loader.js.map +1 -0
- package/dist/utils/report-once.d.ts +1 -0
- package/dist/utils/report-once.js +17 -0
- package/dist/utils/report-once.js.map +1 -0
- package/dist/utils/sanitize-node.d.ts +12 -0
- package/dist/utils/sanitize-node.js +87 -0
- package/dist/utils/sanitize-node.js.map +1 -0
- package/dist/utils/show-experiment-notice.d.ts +6 -0
- package/dist/utils/show-experiment-notice.js +51 -0
- package/dist/utils/show-experiment-notice.js.map +1 -0
- package/dist/utils/slices/stitching.d.ts +4 -0
- package/dist/utils/slices/stitching.js +92 -0
- package/dist/utils/slices/stitching.js.map +1 -0
- package/dist/utils/slices.d.ts +2 -0
- package/dist/utils/slices.js +9 -0
- package/dist/utils/slices.js.map +1 -0
- package/dist/utils/source-nodes-api-runner.d.ts +8 -0
- package/dist/utils/source-nodes-api-runner.js +23 -0
- package/dist/utils/source-nodes-api-runner.js.map +1 -0
- package/dist/utils/source-nodes.d.ts +11 -0
- package/dist/utils/source-nodes.js +150 -0
- package/dist/utils/source-nodes.js.map +1 -0
- package/dist/utils/stack-trace-utils.d.ts +24 -0
- package/dist/utils/stack-trace-utils.js +113 -0
- package/dist/utils/stack-trace-utils.js.map +1 -0
- package/dist/utils/start-server.d.ts +22 -0
- package/dist/utils/start-server.js +722 -0
- package/dist/utils/start-server.js.map +1 -0
- package/dist/utils/state-machine-logging.d.ts +4 -0
- package/dist/utils/state-machine-logging.js +47 -0
- package/dist/utils/state-machine-logging.js.map +1 -0
- package/dist/utils/static-query-utils.d.ts +13 -0
- package/dist/utils/static-query-utils.js +57 -0
- package/dist/utils/static-query-utils.js.map +1 -0
- package/dist/utils/test-import-error.d.ts +1 -0
- package/dist/utils/test-import-error.js +18 -0
- package/dist/utils/test-import-error.js.map +1 -0
- package/dist/utils/tracer/index.d.ts +12 -0
- package/dist/utils/tracer/index.js +42 -0
- package/dist/utils/tracer/index.js.map +1 -0
- package/dist/utils/tracer/jaeger-local.d.ts +4 -0
- package/dist/utils/tracer/jaeger-local.js +32 -0
- package/dist/utils/tracer/jaeger-local.js.map +1 -0
- package/dist/utils/tracer/zipkin-local.d.ts +11 -0
- package/dist/utils/tracer/zipkin-local.js +87 -0
- package/dist/utils/tracer/zipkin-local.js.map +1 -0
- package/dist/utils/tracer/zipkin-types.d.js +14 -0
- package/dist/utils/tracer/zipkin-types.d.js.map +1 -0
- package/dist/utils/validate-component.d.ts +23 -0
- package/dist/utils/validate-component.js +99 -0
- package/dist/utils/validate-component.js.map +1 -0
- package/dist/utils/validate-engines/child.d.ts +1 -0
- package/dist/utils/validate-engines/child.js +74 -0
- package/dist/utils/validate-engines/child.js.map +1 -0
- package/dist/utils/validate-engines/index.d.ts +2 -0
- package/dist/utils/validate-engines/index.js +48 -0
- package/dist/utils/validate-engines/index.js.map +1 -0
- package/dist/utils/wait-until-jobs-complete.d.ts +2 -0
- package/dist/utils/wait-until-jobs-complete.js +30 -0
- package/dist/utils/wait-until-jobs-complete.js.map +1 -0
- package/dist/utils/webpack/bundle.d.ts +9 -0
- package/dist/utils/webpack/bundle.js +41 -0
- package/dist/utils/webpack/bundle.js.map +1 -0
- package/dist/utils/webpack/get-ssr-chunk-hashes.d.ts +9 -0
- package/dist/utils/webpack/get-ssr-chunk-hashes.js +55 -0
- package/dist/utils/webpack/get-ssr-chunk-hashes.js.map +1 -0
- package/dist/utils/webpack/loaders/client-components-requires-writer-loader.d.ts +1 -0
- package/dist/utils/webpack/loaders/client-components-requires-writer-loader.js +22 -0
- package/dist/utils/webpack/loaders/client-components-requires-writer-loader.js.map +1 -0
- package/dist/utils/webpack/loaders/partial-hydration-reference-loader.d.ts +1 -0
- package/dist/utils/webpack/loaders/partial-hydration-reference-loader.js +127 -0
- package/dist/utils/webpack/loaders/partial-hydration-reference-loader.js.map +1 -0
- package/dist/utils/webpack/loaders/webpack-remove-exports-loader.d.ts +1 -0
- package/dist/utils/webpack/loaders/webpack-remove-exports-loader.js +40 -0
- package/dist/utils/webpack/loaders/webpack-remove-exports-loader.js.map +1 -0
- package/dist/utils/webpack/plugins/cache-folder-resolver.d.ts +25 -0
- package/dist/utils/webpack/plugins/cache-folder-resolver.js +111 -0
- package/dist/utils/webpack/plugins/cache-folder-resolver.js.map +1 -0
- package/dist/utils/webpack/plugins/corejs-resolver.d.ts +12 -0
- package/dist/utils/webpack/plugins/corejs-resolver.js +66 -0
- package/dist/utils/webpack/plugins/corejs-resolver.js.map +1 -0
- package/dist/utils/webpack/plugins/force-css-hmr-for-edge-cases.d.ts +22 -0
- package/dist/utils/webpack/plugins/force-css-hmr-for-edge-cases.js +88 -0
- package/dist/utils/webpack/plugins/force-css-hmr-for-edge-cases.js.map +1 -0
- package/dist/utils/webpack/plugins/partial-hydration.d.ts +26 -0
- package/dist/utils/webpack/plugins/partial-hydration.js +362 -0
- package/dist/utils/webpack/plugins/partial-hydration.js.map +1 -0
- package/dist/utils/webpack/plugins/static-query-mapper.d.ts +13 -0
- package/dist/utils/webpack/plugins/static-query-mapper.js +235 -0
- package/dist/utils/webpack/plugins/static-query-mapper.js.map +1 -0
- package/dist/utils/webpack/plugins/webpack-logging.d.ts +12 -0
- package/dist/utils/webpack/plugins/webpack-logging.js +51 -0
- package/dist/utils/webpack/plugins/webpack-logging.js.map +1 -0
- package/dist/utils/webpack/utils/create-normalized-module-key.d.ts +12 -0
- package/dist/utils/webpack/utils/create-normalized-module-key.js +25 -0
- package/dist/utils/webpack/utils/create-normalized-module-key.js.map +1 -0
- package/dist/utils/webpack/utils/is-file-inside-compilations.d.ts +7 -0
- package/dist/utils/webpack/utils/is-file-inside-compilations.js +37 -0
- package/dist/utils/webpack/utils/is-file-inside-compilations.js.map +1 -0
- package/dist/utils/webpack-error-utils.d.ts +24 -0
- package/dist/utils/webpack-error-utils.js +112 -0
- package/dist/utils/webpack-error-utils.js.map +1 -0
- package/dist/utils/webpack-plugins.d.ts +46 -0
- package/dist/utils/webpack-plugins.js +61 -0
- package/dist/utils/webpack-plugins.js.map +1 -0
- package/dist/utils/webpack-status.d.ts +3 -0
- package/dist/utils/webpack-status.js +21 -0
- package/dist/utils/webpack-status.js.map +1 -0
- package/dist/utils/webpack-utils.d.ts +121 -0
- package/dist/utils/webpack-utils.js +574 -0
- package/dist/utils/webpack-utils.js.map +1 -0
- package/dist/utils/webpack.config.js +804 -0
- package/dist/utils/webpack.config.js.map +1 -0
- package/dist/utils/websocket-manager.d.ts +39 -0
- package/dist/utils/websocket-manager.js +183 -0
- package/dist/utils/websocket-manager.js.map +1 -0
- package/dist/utils/worker/child/index.d.ts +5 -0
- package/dist/utils/worker/child/index.js +35 -0
- package/dist/utils/worker/child/index.js.map +1 -0
- package/dist/utils/worker/child/load-config-and-plugins.d.ts +2 -0
- package/dist/utils/worker/child/load-config-and-plugins.js +28 -0
- package/dist/utils/worker/child/load-config-and-plugins.js.map +1 -0
- package/dist/utils/worker/child/queries.d.ts +7 -0
- package/dist/utils/worker/child/queries.js +84 -0
- package/dist/utils/worker/child/queries.js.map +1 -0
- package/dist/utils/worker/child/render-html.d.ts +49 -0
- package/dist/utils/worker/child/render-html.js +562 -0
- package/dist/utils/worker/child/render-html.js.map +1 -0
- package/dist/utils/worker/child/schema.d.ts +2 -0
- package/dist/utils/worker/child/schema.js +41 -0
- package/dist/utils/worker/child/schema.js.map +1 -0
- package/dist/utils/worker/child/state.d.ts +2 -0
- package/dist/utils/worker/child/state.js +13 -0
- package/dist/utils/worker/child/state.js.map +1 -0
- package/dist/utils/worker/messaging.d.ts +16 -0
- package/dist/utils/worker/messaging.js +9 -0
- package/dist/utils/worker/messaging.js.map +1 -0
- package/dist/utils/worker/pool.d.ts +10 -0
- package/dist/utils/worker/pool.js +122 -0
- package/dist/utils/worker/pool.js.map +1 -0
- package/dist/utils/worker/reporter.d.ts +3 -0
- package/dist/utils/worker/reporter.js +26 -0
- package/dist/utils/worker/reporter.js.map +1 -0
- package/dist/utils/worker/types.d.ts +3 -0
- package/dist/utils/worker/types.js +4 -0
- package/dist/utils/worker/types.js.map +1 -0
- package/graphql.d.ts +2 -0
- package/graphql.js +6 -0
- package/index.d.ts +1906 -0
- package/internal.d.ts +4 -0
- package/internal.js +5 -0
- package/ipc.json +3 -0
- package/package.json +744 -0
- package/reporter.d.ts +4 -0
- package/reporter.js +3 -0
- package/scripts/postinstall.js +7 -0
- package/utils.js +1 -0
- package/webpack.d.ts +3 -0
- package/webpack.js +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache-lmdb.js","names":["cacheDbFile","process","env","NODE_ENV","FORCE_TEST_DATABASE_ID","JEST_WORKER_ID","dbPath","path","join","global","__GATSBY","root","cwd","getAlreadyOpenedStore","globalThis","__GATSBY_OPEN_ROOT_LMDBS","Map","get","GatsbyCacheLmdb","constructor","name","encoding","directory","cache","init","fs","ensureDirSync","getStore","rootDb","open","compression","maxDbs","set","getDb","db","openDB","key","value","put","del","remove","resetCache","store","close","delete","emptyDir"],"sources":["../../src/utils/cache-lmdb.ts"],"sourcesContent":["import { open, RootDatabase, Database, DatabaseOptions } from \"lmdb\"\nimport * as fs from \"fs-extra\"\nimport * as path from \"path\"\n\n// Since the regular GatsbyCache saves to \"caches\" this should be \"caches-lmdb\"\nconst cacheDbFile =\n process.env.NODE_ENV === `test`\n ? `caches-lmdb-${\n // FORCE_TEST_DATABASE_ID will be set if this gets executed in worker context\n // when running jest tests. JEST_WORKER_ID will be set when this gets executed directly\n // in test context (jest will use jest-worker internally).\n process.env.FORCE_TEST_DATABASE_ID ?? process.env.JEST_WORKER_ID\n }`\n : `caches-lmdb`\n\nconst dbPath = path.join(\n global.__GATSBY?.root || process.cwd(),\n `.cache/${cacheDbFile}`\n)\n\nfunction getAlreadyOpenedStore(): RootDatabase | undefined {\n if (!globalThis.__GATSBY_OPEN_ROOT_LMDBS) {\n globalThis.__GATSBY_OPEN_ROOT_LMDBS = new Map()\n }\n return globalThis.__GATSBY_OPEN_ROOT_LMDBS.get(dbPath)\n}\n\nexport default class GatsbyCacheLmdb {\n private db: Database | undefined\n private encoding: DatabaseOptions[\"encoding\"]\n public readonly name: string\n // Needed for plugins that want to write data to the cache directory\n public readonly directory: string\n // TODO: remove `.cache` in v4. This is compat mode - cache-manager cache implementation\n // expose internal cache that gives access to `.del` function that wasn't available in public\n // cache interface (gatsby-plugin-sharp use it to clear no longer needed data)\n public readonly cache: GatsbyCacheLmdb\n\n constructor({\n name = `db`,\n encoding = `json`,\n }: {\n name: string\n encoding?: DatabaseOptions[\"encoding\"]\n }) {\n this.name = name\n this.encoding = encoding\n this.directory = path.join(process.cwd(), `.cache/caches/${name}`)\n this.cache = this\n }\n\n init(): GatsbyCacheLmdb {\n fs.ensureDirSync(this.directory)\n return this\n }\n\n private static getStore(): RootDatabase {\n let rootDb = getAlreadyOpenedStore()\n if (rootDb) {\n return rootDb\n }\n\n rootDb = open({\n name: `root`,\n path: dbPath,\n compression: true,\n maxDbs: 200,\n })\n\n globalThis.__GATSBY_OPEN_ROOT_LMDBS.set(dbPath, rootDb)\n\n return rootDb\n }\n\n private getDb(): Database {\n if (!this.db) {\n this.db = GatsbyCacheLmdb.getStore().openDB({\n name: this.name,\n encoding: this.encoding,\n })\n }\n return this.db\n }\n\n async get<T = unknown>(key): Promise<T | undefined> {\n return this.getDb().get(key)\n }\n\n async set<T>(key: string, value: T): Promise<T | undefined> {\n await this.getDb().put(key, value)\n return value\n }\n\n async del(key: string): Promise<void> {\n return this.getDb().remove(key) as unknown as Promise<void>\n }\n}\n\nexport async function resetCache(): Promise<void> {\n const store = getAlreadyOpenedStore()\n if (store) {\n await store.close()\n globalThis.__GATSBY_OPEN_ROOT_LMDBS.delete(dbPath)\n }\n\n await fs.emptyDir(dbPath)\n}\n"],"mappings":";;;;;AAAA;AACA;AACA;AAA4B;AAAA;AAAA;AAE5B;AACA,MAAMA,WAAW,GACfC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAM,MAAK,GAC1B;AACC;AACA;AACA;AAAA,yBACAF,OAAO,CAACC,GAAG,CAACE,sBAAsB,yEAAIH,OAAO,CAACC,GAAG,CAACG,cACnD,EAAC,GACD,aAAY;AAEnB,MAAMC,MAAM,GAAGC,IAAI,CAACC,IAAI,CACtB,qBAAAC,MAAM,CAACC,QAAQ,qDAAf,iBAAiBC,IAAI,KAAIV,OAAO,CAACW,GAAG,EAAE,EACrC,UAASZ,WAAY,EAAC,CACxB;AAED,SAASa,qBAAqB,GAA6B;EACzD,IAAI,CAACC,UAAU,CAACC,wBAAwB,EAAE;IACxCD,UAAU,CAACC,wBAAwB,GAAG,IAAIC,GAAG,EAAE;EACjD;EACA,OAAOF,UAAU,CAACC,wBAAwB,CAACE,GAAG,CAACX,MAAM,CAAC;AACxD;AAEe,MAAMY,eAAe,CAAC;EAInC;;EAEA;EACA;EACA;;EAGAC,WAAW,CAAC;IACVC,IAAI,GAAI,IAAG;IACXC,QAAQ,GAAI;EAId,CAAC,EAAE;IACD,IAAI,CAACD,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,SAAS,GAAGf,IAAI,CAACC,IAAI,CAACP,OAAO,CAACW,GAAG,EAAE,EAAG,iBAAgBQ,IAAK,EAAC,CAAC;IAClE,IAAI,CAACG,KAAK,GAAG,IAAI;EACnB;EAEAC,IAAI,GAAoB;IACtBC,EAAE,CAACC,aAAa,CAAC,IAAI,CAACJ,SAAS,CAAC;IAChC,OAAO,IAAI;EACb;EAEA,OAAeK,QAAQ,GAAiB;IACtC,IAAIC,MAAM,GAAGf,qBAAqB,EAAE;IACpC,IAAIe,MAAM,EAAE;MACV,OAAOA,MAAM;IACf;IAEAA,MAAM,GAAG,IAAAC,UAAI,EAAC;MACZT,IAAI,EAAG,MAAK;MACZb,IAAI,EAAED,MAAM;MACZwB,WAAW,EAAE,IAAI;MACjBC,MAAM,EAAE;IACV,CAAC,CAAC;IAEFjB,UAAU,CAACC,wBAAwB,CAACiB,GAAG,CAAC1B,MAAM,EAAEsB,MAAM,CAAC;IAEvD,OAAOA,MAAM;EACf;EAEQK,KAAK,GAAa;IACxB,IAAI,CAAC,IAAI,CAACC,EAAE,EAAE;MACZ,IAAI,CAACA,EAAE,GAAGhB,eAAe,CAACS,QAAQ,EAAE,CAACQ,MAAM,CAAC;QAC1Cf,IAAI,EAAE,IAAI,CAACA,IAAI;QACfC,QAAQ,EAAE,IAAI,CAACA;MACjB,CAAC,CAAC;IACJ;IACA,OAAO,IAAI,CAACa,EAAE;EAChB;EAEA,MAAMjB,GAAG,CAAcmB,GAAG,EAA0B;IAClD,OAAO,IAAI,CAACH,KAAK,EAAE,CAAChB,GAAG,CAACmB,GAAG,CAAC;EAC9B;EAEA,MAAMJ,GAAG,CAAII,GAAW,EAAEC,KAAQ,EAA0B;IAC1D,MAAM,IAAI,CAACJ,KAAK,EAAE,CAACK,GAAG,CAACF,GAAG,EAAEC,KAAK,CAAC;IAClC,OAAOA,KAAK;EACd;EAEA,MAAME,GAAG,CAACH,GAAW,EAAiB;IACpC,OAAO,IAAI,CAACH,KAAK,EAAE,CAACO,MAAM,CAACJ,GAAG,CAAC;EACjC;AACF;AAAC;AAEM,eAAeK,UAAU,GAAkB;EAChD,MAAMC,KAAK,GAAG7B,qBAAqB,EAAE;EACrC,IAAI6B,KAAK,EAAE;IACT,MAAMA,KAAK,CAACC,KAAK,EAAE;IACnB7B,UAAU,CAACC,wBAAwB,CAAC6B,MAAM,CAACtC,MAAM,CAAC;EACpD;EAEA,MAAMmB,EAAE,CAACoB,QAAQ,CAACvC,MAAM,CAAC;AAC3B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Store, CachingConfig, MultiCache } from "cache-manager";
|
|
2
|
+
interface ICacheProperties {
|
|
3
|
+
name?: string;
|
|
4
|
+
store?: Store;
|
|
5
|
+
}
|
|
6
|
+
export default class GatsbyCache {
|
|
7
|
+
name: string;
|
|
8
|
+
store: Store;
|
|
9
|
+
directory: string;
|
|
10
|
+
cache?: MultiCache;
|
|
11
|
+
constructor({ name, store }?: ICacheProperties);
|
|
12
|
+
init(): GatsbyCache;
|
|
13
|
+
get<T = unknown>(key: any): Promise<T | undefined>;
|
|
14
|
+
set<T>(key: string, value: T, args?: CachingConfig): Promise<T | undefined>;
|
|
15
|
+
del(key: string): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.default = void 0;
|
|
6
|
+
var _cacheManager = _interopRequireDefault(require("cache-manager"));
|
|
7
|
+
var _fsExtra = _interopRequireDefault(require("fs-extra"));
|
|
8
|
+
var fsStore = _interopRequireWildcard(require("../cache/cache-fs"));
|
|
9
|
+
var _path = _interopRequireDefault(require("path"));
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
12
|
+
const MAX_CACHE_SIZE = 250;
|
|
13
|
+
const TTL = Number.MAX_SAFE_INTEGER;
|
|
14
|
+
class GatsbyCache {
|
|
15
|
+
// TODO: remove `.cache` in v4. This is compat mode - cache-manager cache implementation
|
|
16
|
+
// expose internal cache that gives access to `.del` function that wasn't available in public
|
|
17
|
+
// cache interface (gatsby-plugin-sharp use it to clear no longer needed data)
|
|
18
|
+
|
|
19
|
+
// @ts-ignore - set & get types are missing from fsStore?
|
|
20
|
+
constructor({
|
|
21
|
+
name = `db`,
|
|
22
|
+
store = fsStore
|
|
23
|
+
} = {}) {
|
|
24
|
+
var _global$__GATSBY$root, _global$__GATSBY;
|
|
25
|
+
this.name = name;
|
|
26
|
+
this.store = store;
|
|
27
|
+
this.directory = _path.default.join((_global$__GATSBY$root = (_global$__GATSBY = global.__GATSBY) === null || _global$__GATSBY === void 0 ? void 0 : _global$__GATSBY.root) !== null && _global$__GATSBY$root !== void 0 ? _global$__GATSBY$root : process.cwd(), `.cache`, `caches`, name);
|
|
28
|
+
}
|
|
29
|
+
init() {
|
|
30
|
+
_fsExtra.default.ensureDirSync(this.directory);
|
|
31
|
+
const configs = [{
|
|
32
|
+
store: `memory`,
|
|
33
|
+
max: MAX_CACHE_SIZE,
|
|
34
|
+
ttl: TTL
|
|
35
|
+
}, {
|
|
36
|
+
store: this.store,
|
|
37
|
+
ttl: TTL,
|
|
38
|
+
options: {
|
|
39
|
+
path: this.directory,
|
|
40
|
+
ttl: TTL
|
|
41
|
+
}
|
|
42
|
+
}];
|
|
43
|
+
const caches = configs.map(cache => _cacheManager.default.caching(cache));
|
|
44
|
+
this.cache = _cacheManager.default.multiCaching(caches);
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
async get(key) {
|
|
48
|
+
return new Promise(resolve => {
|
|
49
|
+
if (!this.cache) {
|
|
50
|
+
throw new Error(`GatsbyCache wasn't initialised yet, please run the init method first`);
|
|
51
|
+
}
|
|
52
|
+
this.cache.get(key, (err, res) => {
|
|
53
|
+
resolve(err ? undefined : res);
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async set(key, value, args = {
|
|
58
|
+
ttl: TTL
|
|
59
|
+
}) {
|
|
60
|
+
return new Promise(resolve => {
|
|
61
|
+
if (!this.cache) {
|
|
62
|
+
throw new Error(`GatsbyCache wasn't initialised yet, please run the init method first`);
|
|
63
|
+
}
|
|
64
|
+
this.cache.set(key, value, args, err => {
|
|
65
|
+
resolve(err ? undefined : value);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
async del(key) {
|
|
70
|
+
if (!this.cache) {
|
|
71
|
+
throw new Error(`GatsbyCache wasn't initialised yet, please run the init method first`);
|
|
72
|
+
}
|
|
73
|
+
return this.cache.del(key);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.default = GatsbyCache;
|
|
77
|
+
//# sourceMappingURL=cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.js","names":["MAX_CACHE_SIZE","TTL","Number","MAX_SAFE_INTEGER","GatsbyCache","constructor","name","store","fsStore","directory","path","join","global","__GATSBY","root","process","cwd","init","fs","ensureDirSync","configs","max","ttl","options","caches","map","cache","manager","caching","multiCaching","get","key","Promise","resolve","Error","err","res","undefined","set","value","args","del"],"sources":["../../src/utils/cache.ts"],"sourcesContent":["import manager, {\n Store,\n StoreConfig,\n CachingConfig,\n MultiCache,\n} from \"cache-manager\"\nimport fs from \"fs-extra\"\nimport * as fsStore from \"../cache/cache-fs\"\nimport path from \"path\"\n\nconst MAX_CACHE_SIZE = 250\nconst TTL = Number.MAX_SAFE_INTEGER\n\ninterface ICacheProperties {\n name?: string\n store?: Store\n}\n\nexport default class GatsbyCache {\n public name: string\n public store: Store\n public directory: string\n // TODO: remove `.cache` in v4. This is compat mode - cache-manager cache implementation\n // expose internal cache that gives access to `.del` function that wasn't available in public\n // cache interface (gatsby-plugin-sharp use it to clear no longer needed data)\n public cache?: MultiCache\n\n // @ts-ignore - set & get types are missing from fsStore?\n constructor({ name = `db`, store = fsStore }: ICacheProperties = {}) {\n this.name = name\n this.store = store\n this.directory = path.join(\n global.__GATSBY?.root ?? process.cwd(),\n `.cache`,\n `caches`,\n name\n )\n }\n\n init(): GatsbyCache {\n fs.ensureDirSync(this.directory)\n\n const configs: Array<StoreConfig> = [\n {\n store: `memory`,\n max: MAX_CACHE_SIZE,\n ttl: TTL,\n },\n {\n store: this.store,\n ttl: TTL,\n options: {\n path: this.directory,\n ttl: TTL,\n },\n },\n ]\n\n const caches = configs.map(cache => manager.caching(cache))\n\n this.cache = manager.multiCaching(caches)\n\n return this\n }\n\n async get<T = unknown>(key): Promise<T | undefined> {\n return new Promise(resolve => {\n if (!this.cache) {\n throw new Error(\n `GatsbyCache wasn't initialised yet, please run the init method first`\n )\n }\n this.cache.get<T>(key, (err, res) => {\n resolve(err ? undefined : res)\n })\n })\n }\n\n async set<T>(\n key: string,\n value: T,\n args: CachingConfig = { ttl: TTL }\n ): Promise<T | undefined> {\n return new Promise(resolve => {\n if (!this.cache) {\n throw new Error(\n `GatsbyCache wasn't initialised yet, please run the init method first`\n )\n }\n this.cache.set(key, value, args, err => {\n resolve(err ? undefined : value)\n })\n })\n }\n\n async del(key: string): Promise<void> {\n if (!this.cache) {\n throw new Error(\n `GatsbyCache wasn't initialised yet, please run the init method first`\n )\n }\n\n return this.cache.del(key)\n }\n}\n"],"mappings":";;;;;AAAA;AAMA;AACA;AACA;AAAuB;AAAA;AAEvB,MAAMA,cAAc,GAAG,GAAG;AAC1B,MAAMC,GAAG,GAAGC,MAAM,CAACC,gBAAgB;AAOpB,MAAMC,WAAW,CAAC;EAI/B;EACA;EACA;;EAGA;EACAC,WAAW,CAAC;IAAEC,IAAI,GAAI,IAAG;IAAEC,KAAK,GAAGC;EAA0B,CAAC,GAAG,CAAC,CAAC,EAAE;IAAA;IACnE,IAAI,CAACF,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACE,SAAS,GAAGC,aAAI,CAACC,IAAI,8CACxBC,MAAM,CAACC,QAAQ,qDAAf,iBAAiBC,IAAI,yEAAIC,OAAO,CAACC,GAAG,EAAE,EACrC,QAAO,EACP,QAAO,EACRV,IAAI,CACL;EACH;EAEAW,IAAI,GAAgB;IAClBC,gBAAE,CAACC,aAAa,CAAC,IAAI,CAACV,SAAS,CAAC;IAEhC,MAAMW,OAA2B,GAAG,CAClC;MACEb,KAAK,EAAG,QAAO;MACfc,GAAG,EAAErB,cAAc;MACnBsB,GAAG,EAAErB;IACP,CAAC,EACD;MACEM,KAAK,EAAE,IAAI,CAACA,KAAK;MACjBe,GAAG,EAAErB,GAAG;MACRsB,OAAO,EAAE;QACPb,IAAI,EAAE,IAAI,CAACD,SAAS;QACpBa,GAAG,EAAErB;MACP;IACF,CAAC,CACF;IAED,MAAMuB,MAAM,GAAGJ,OAAO,CAACK,GAAG,CAACC,KAAK,IAAIC,qBAAO,CAACC,OAAO,CAACF,KAAK,CAAC,CAAC;IAE3D,IAAI,CAACA,KAAK,GAAGC,qBAAO,CAACE,YAAY,CAACL,MAAM,CAAC;IAEzC,OAAO,IAAI;EACb;EAEA,MAAMM,GAAG,CAAcC,GAAG,EAA0B;IAClD,OAAO,IAAIC,OAAO,CAACC,OAAO,IAAI;MAC5B,IAAI,CAAC,IAAI,CAACP,KAAK,EAAE;QACf,MAAM,IAAIQ,KAAK,CACZ,sEAAqE,CACvE;MACH;MACA,IAAI,CAACR,KAAK,CAACI,GAAG,CAAIC,GAAG,EAAE,CAACI,GAAG,EAAEC,GAAG,KAAK;QACnCH,OAAO,CAACE,GAAG,GAAGE,SAAS,GAAGD,GAAG,CAAC;MAChC,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;EAEA,MAAME,GAAG,CACPP,GAAW,EACXQ,KAAQ,EACRC,IAAmB,GAAG;IAAElB,GAAG,EAAErB;EAAI,CAAC,EACV;IACxB,OAAO,IAAI+B,OAAO,CAACC,OAAO,IAAI;MAC5B,IAAI,CAAC,IAAI,CAACP,KAAK,EAAE;QACf,MAAM,IAAIQ,KAAK,CACZ,sEAAqE,CACvE;MACH;MACA,IAAI,CAACR,KAAK,CAACY,GAAG,CAACP,GAAG,EAAEQ,KAAK,EAAEC,IAAI,EAAEL,GAAG,IAAI;QACtCF,OAAO,CAACE,GAAG,GAAGE,SAAS,GAAGE,KAAK,CAAC;MAClC,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;EAEA,MAAME,GAAG,CAACV,GAAW,EAAiB;IACpC,IAAI,CAAC,IAAI,CAACL,KAAK,EAAE;MACf,MAAM,IAAIQ,KAAK,CACZ,sEAAqE,CACvE;IACH;IAEA,OAAO,IAAI,CAACR,KAAK,CAACe,GAAG,CAACV,GAAG,CAAC;EAC5B;AACF;AAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Store } from "redux";
|
|
2
|
+
import { IMutationAction } from "../services";
|
|
3
|
+
/**
|
|
4
|
+
* These are the deferred redux actions sent from api-runner-node
|
|
5
|
+
* They may include a `resolve` prop (if they are createNode actions).
|
|
6
|
+
* If so, we resolve the promise when we're done
|
|
7
|
+
*/
|
|
8
|
+
export declare const callRealApi: (event: IMutationAction, store?: Store) => void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.callRealApi = void 0;
|
|
6
|
+
var _assertStore = require("./assert-store");
|
|
7
|
+
var _actions = require("../redux/actions");
|
|
8
|
+
var _reporter = _interopRequireDefault(require("gatsby-cli/lib/reporter"));
|
|
9
|
+
/**
|
|
10
|
+
* These are the deferred redux actions sent from api-runner-node
|
|
11
|
+
* They may include a `resolve` prop (if they are createNode actions).
|
|
12
|
+
* If so, we resolve the promise when we're done
|
|
13
|
+
*/
|
|
14
|
+
const callRealApi = (event, store) => {
|
|
15
|
+
(0, _assertStore.assertStore)(store);
|
|
16
|
+
const {
|
|
17
|
+
type,
|
|
18
|
+
payload,
|
|
19
|
+
resolve
|
|
20
|
+
} = event;
|
|
21
|
+
if (type in _actions.actions) {
|
|
22
|
+
// If this is a createNode action then this will be a thunk.
|
|
23
|
+
// No worries, we just dispatch it like any other
|
|
24
|
+
const action = _actions.actions[type](...payload);
|
|
25
|
+
const result = store.dispatch(action);
|
|
26
|
+
// Somebody may be waiting for this
|
|
27
|
+
if (resolve) {
|
|
28
|
+
resolve(result);
|
|
29
|
+
}
|
|
30
|
+
} else {
|
|
31
|
+
_reporter.default.log(`Could not dispatch unknown action "${type}`);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.callRealApi = callRealApi;
|
|
35
|
+
//# sourceMappingURL=call-deferred-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-deferred-api.js","names":["callRealApi","event","store","assertStore","type","payload","resolve","actions","action","result","dispatch","reporter","log"],"sources":["../../src/utils/call-deferred-api.ts"],"sourcesContent":["import { assertStore } from \"./assert-store\"\nimport { Store } from \"redux\"\nimport { IMutationAction } from \"../services\"\nimport { actions } from \"../redux/actions\"\nimport reporter from \"gatsby-cli/lib/reporter\"\n/**\n * These are the deferred redux actions sent from api-runner-node\n * They may include a `resolve` prop (if they are createNode actions).\n * If so, we resolve the promise when we're done\n */\nexport const callRealApi = (event: IMutationAction, store?: Store): void => {\n assertStore(store)\n const { type, payload, resolve } = event\n if (type in actions) {\n // If this is a createNode action then this will be a thunk.\n // No worries, we just dispatch it like any other\n const action = actions[type](...payload)\n const result = store.dispatch(action)\n // Somebody may be waiting for this\n if (resolve) {\n resolve(result)\n }\n } else {\n reporter.log(`Could not dispatch unknown action \"${type}`)\n }\n}\n"],"mappings":";;;;;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,WAAW,GAAG,CAACC,KAAsB,EAAEC,KAAa,KAAW;EAC1E,IAAAC,wBAAW,EAACD,KAAK,CAAC;EAClB,MAAM;IAAEE,IAAI;IAAEC,OAAO;IAAEC;EAAQ,CAAC,GAAGL,KAAK;EACxC,IAAIG,IAAI,IAAIG,gBAAO,EAAE;IACnB;IACA;IACA,MAAMC,MAAM,GAAGD,gBAAO,CAACH,IAAI,CAAC,CAAC,GAAGC,OAAO,CAAC;IACxC,MAAMI,MAAM,GAAGP,KAAK,CAACQ,QAAQ,CAACF,MAAM,CAAC;IACrC;IACA,IAAIF,OAAO,EAAE;MACXA,OAAO,CAACG,MAAM,CAAC;IACjB;EACF,CAAC,MAAM;IACLE,iBAAQ,CAACC,GAAG,CAAE,sCAAqCR,IAAK,EAAC,CAAC;EAC5D;AACF,CAAC;AAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IGatsbyPage } from "../redux/types";
|
|
2
|
+
export declare function deleteUntouchedPages(currentPages: Map<string, IGatsbyPage>, timeBeforeApisRan: number, shouldRunCreatePagesStatefully: boolean): Array<string>;
|
|
3
|
+
export declare function findChangedPages(oldPages: Map<string, IGatsbyPage>, currentPages: Map<string, IGatsbyPage>): {
|
|
4
|
+
changedPages: Array<string>;
|
|
5
|
+
deletedPages: Array<string>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.deleteUntouchedPages = deleteUntouchedPages;
|
|
6
|
+
exports.findChangedPages = findChangedPages;
|
|
7
|
+
var _isEqualWith2 = _interopRequireDefault(require("lodash/isEqualWith"));
|
|
8
|
+
var _actions = require("../redux/actions");
|
|
9
|
+
var _redux = require("../redux");
|
|
10
|
+
const {
|
|
11
|
+
deletePage
|
|
12
|
+
} = _actions.actions;
|
|
13
|
+
function deleteUntouchedPages(currentPages, timeBeforeApisRan, shouldRunCreatePagesStatefully) {
|
|
14
|
+
const deletedPages = [];
|
|
15
|
+
|
|
16
|
+
// Delete pages that weren't updated when running createPages.
|
|
17
|
+
currentPages.forEach(page => {
|
|
18
|
+
if ((shouldRunCreatePagesStatefully || !page.isCreatedByStatefulCreatePages) && page.updatedAt < timeBeforeApisRan) {
|
|
19
|
+
_redux.store.dispatch(deletePage(page));
|
|
20
|
+
deletedPages.push(page.path, `/page-data${page.path}`);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return deletedPages;
|
|
24
|
+
}
|
|
25
|
+
function findChangedPages(oldPages, currentPages) {
|
|
26
|
+
const changedPages = [];
|
|
27
|
+
const compareWithoutUpdated = (_left, _right, key) => key === `updatedAt` || undefined;
|
|
28
|
+
currentPages.forEach((newPage, path) => {
|
|
29
|
+
const oldPage = oldPages.get(path);
|
|
30
|
+
if (!oldPage || !(0, _isEqualWith2.default)(newPage, oldPage, compareWithoutUpdated)) {
|
|
31
|
+
changedPages.push(path);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const deletedPages = [];
|
|
35
|
+
oldPages.forEach((_page, key) => {
|
|
36
|
+
if (!currentPages.has(key)) {
|
|
37
|
+
deletedPages.push(key);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
return {
|
|
41
|
+
changedPages,
|
|
42
|
+
deletedPages
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=changed-pages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changed-pages.js","names":["deletePage","actions","deleteUntouchedPages","currentPages","timeBeforeApisRan","shouldRunCreatePagesStatefully","deletedPages","forEach","page","isCreatedByStatefulCreatePages","updatedAt","store","dispatch","push","path","findChangedPages","oldPages","changedPages","compareWithoutUpdated","_left","_right","key","undefined","newPage","oldPage","get","_page","has"],"sources":["../../src/utils/changed-pages.ts"],"sourcesContent":["import { actions } from \"../redux/actions\"\nimport { store } from \"../redux\"\nconst { deletePage } = actions\nimport { isEqualWith } from \"lodash\"\nimport { IGatsbyPage } from \"../redux/types\"\nimport type { IsEqualCustomizer } from \"lodash\"\n\nexport function deleteUntouchedPages(\n currentPages: Map<string, IGatsbyPage>,\n timeBeforeApisRan: number,\n shouldRunCreatePagesStatefully: boolean\n): Array<string> {\n const deletedPages: Array<string> = []\n\n // Delete pages that weren't updated when running createPages.\n currentPages.forEach(page => {\n if (\n (shouldRunCreatePagesStatefully ||\n !page.isCreatedByStatefulCreatePages) &&\n page.updatedAt < timeBeforeApisRan\n ) {\n store.dispatch(deletePage(page))\n deletedPages.push(page.path, `/page-data${page.path}`)\n }\n })\n return deletedPages\n}\n\nexport function findChangedPages(\n oldPages: Map<string, IGatsbyPage>,\n currentPages: Map<string, IGatsbyPage>\n): {\n changedPages: Array<string>\n deletedPages: Array<string>\n} {\n const changedPages: Array<string> = []\n\n const compareWithoutUpdated: IsEqualCustomizer = (_left, _right, key) =>\n key === `updatedAt` || undefined\n\n currentPages.forEach((newPage, path) => {\n const oldPage = oldPages.get(path)\n if (!oldPage || !isEqualWith(newPage, oldPage, compareWithoutUpdated)) {\n changedPages.push(path)\n }\n })\n const deletedPages: Array<string> = []\n oldPages.forEach((_page, key) => {\n if (!currentPages.has(key)) {\n deletedPages.push(key)\n }\n })\n\n return { changedPages, deletedPages }\n}\n"],"mappings":";;;;;;;AAAA;AACA;AACA,MAAM;EAAEA;AAAW,CAAC,GAAGC,gBAAO;AAKvB,SAASC,oBAAoB,CAClCC,YAAsC,EACtCC,iBAAyB,EACzBC,8BAAuC,EACxB;EACf,MAAMC,YAA2B,GAAG,EAAE;;EAEtC;EACAH,YAAY,CAACI,OAAO,CAACC,IAAI,IAAI;IAC3B,IACE,CAACH,8BAA8B,IAC7B,CAACG,IAAI,CAACC,8BAA8B,KACtCD,IAAI,CAACE,SAAS,GAAGN,iBAAiB,EAClC;MACAO,YAAK,CAACC,QAAQ,CAACZ,UAAU,CAACQ,IAAI,CAAC,CAAC;MAChCF,YAAY,CAACO,IAAI,CAACL,IAAI,CAACM,IAAI,EAAG,aAAYN,IAAI,CAACM,IAAK,EAAC,CAAC;IACxD;EACF,CAAC,CAAC;EACF,OAAOR,YAAY;AACrB;AAEO,SAASS,gBAAgB,CAC9BC,QAAkC,EAClCb,YAAsC,EAItC;EACA,MAAMc,YAA2B,GAAG,EAAE;EAEtC,MAAMC,qBAAwC,GAAG,CAACC,KAAK,EAAEC,MAAM,EAAEC,GAAG,KAClEA,GAAG,KAAM,WAAU,IAAIC,SAAS;EAElCnB,YAAY,CAACI,OAAO,CAAC,CAACgB,OAAO,EAAET,IAAI,KAAK;IACtC,MAAMU,OAAO,GAAGR,QAAQ,CAACS,GAAG,CAACX,IAAI,CAAC;IAClC,IAAI,CAACU,OAAO,IAAI,CAAC,2BAAYD,OAAO,EAAEC,OAAO,EAAEN,qBAAqB,CAAC,EAAE;MACrED,YAAY,CAACJ,IAAI,CAACC,IAAI,CAAC;IACzB;EACF,CAAC,CAAC;EACF,MAAMR,YAA2B,GAAG,EAAE;EACtCU,QAAQ,CAACT,OAAO,CAAC,CAACmB,KAAK,EAAEL,GAAG,KAAK;IAC/B,IAAI,CAAClB,YAAY,CAACwB,GAAG,CAACN,GAAG,CAAC,EAAE;MAC1Bf,YAAY,CAACO,IAAI,CAACQ,GAAG,CAAC;IACxB;EACF,CAAC,CAAC;EAEF,OAAO;IAAEJ,YAAY;IAAEX;EAAa,CAAC;AACvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function clearRequireCacheRecursively(module: string, ignoreNodeModules?: boolean): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.clearRequireCacheRecursively = clearRequireCacheRecursively;
|
|
5
|
+
function clearRequireCacheRecursively(module, ignoreNodeModules = true) {
|
|
6
|
+
const resolvedModule = require.resolve(module);
|
|
7
|
+
const cacheEntry = require.cache[resolvedModule];
|
|
8
|
+
if (!cacheEntry) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
if (ignoreNodeModules && resolvedModule.includes(`node_modules`)) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
delete require.cache[resolvedModule];
|
|
15
|
+
const parent = cacheEntry.parent;
|
|
16
|
+
if (parent) {
|
|
17
|
+
const index = parent.children.findIndex(c => c.filename === resolvedModule);
|
|
18
|
+
if (index !== -1) {
|
|
19
|
+
parent.children.splice(index, 1);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
cacheEntry.children.forEach(module => clearRequireCacheRecursively(module.filename, ignoreNodeModules));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=clear-require-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clear-require-cache.js","names":["clearRequireCacheRecursively","module","ignoreNodeModules","resolvedModule","require","resolve","cacheEntry","cache","includes","parent","index","children","findIndex","c","filename","splice","forEach"],"sources":["../../src/utils/clear-require-cache.ts"],"sourcesContent":["export function clearRequireCacheRecursively(\n module: string,\n ignoreNodeModules: boolean = true\n): void {\n const resolvedModule = require.resolve(module)\n const cacheEntry = require.cache[resolvedModule]\n if (!cacheEntry) {\n return\n }\n if (ignoreNodeModules && resolvedModule.includes(`node_modules`)) {\n return\n }\n delete require.cache[resolvedModule]\n\n const parent = cacheEntry.parent\n if (parent) {\n const index = parent.children.findIndex(c => c.filename === resolvedModule)\n if (index !== -1) {\n parent.children.splice(index, 1)\n }\n }\n cacheEntry.children.forEach(module =>\n clearRequireCacheRecursively(module.filename, ignoreNodeModules)\n )\n}\n"],"mappings":";;;;AAAO,SAASA,4BAA4B,CAC1CC,MAAc,EACdC,iBAA0B,GAAG,IAAI,EAC3B;EACN,MAAMC,cAAc,GAAGC,OAAO,CAACC,OAAO,CAACJ,MAAM,CAAC;EAC9C,MAAMK,UAAU,GAAGF,OAAO,CAACG,KAAK,CAACJ,cAAc,CAAC;EAChD,IAAI,CAACG,UAAU,EAAE;IACf;EACF;EACA,IAAIJ,iBAAiB,IAAIC,cAAc,CAACK,QAAQ,CAAE,cAAa,CAAC,EAAE;IAChE;EACF;EACA,OAAOJ,OAAO,CAACG,KAAK,CAACJ,cAAc,CAAC;EAEpC,MAAMM,MAAM,GAAGH,UAAU,CAACG,MAAM;EAChC,IAAIA,MAAM,EAAE;IACV,MAAMC,KAAK,GAAGD,MAAM,CAACE,QAAQ,CAACC,SAAS,CAACC,CAAC,IAAIA,CAAC,CAACC,QAAQ,KAAKX,cAAc,CAAC;IAC3E,IAAIO,KAAK,KAAK,CAAC,CAAC,EAAE;MAChBD,MAAM,CAACE,QAAQ,CAACI,MAAM,CAACL,KAAK,EAAE,CAAC,CAAC;IAClC;EACF;EACAJ,UAAU,CAACK,QAAQ,CAACK,OAAO,CAACf,MAAM,IAChCD,4BAA4B,CAACC,MAAM,CAACa,QAAQ,EAAEZ,iBAAiB,CAAC,CACjE;AACH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface IScriptsAndStyles {
|
|
2
|
+
scripts: Array<any>;
|
|
3
|
+
styles: Array<any>;
|
|
4
|
+
reversedStyles: Array<any>;
|
|
5
|
+
reversedScripts: Array<any>;
|
|
6
|
+
}
|
|
7
|
+
export declare function readWebpackStats(publicDir: string): Promise<any>;
|
|
8
|
+
export declare function getScriptsAndStylesForTemplate(componentChunkName: any, webpackStats: any): Promise<IScriptsAndStyles>;
|
|
9
|
+
export declare function clearCache(): void;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.clearCache = clearCache;
|
|
5
|
+
exports.getScriptsAndStylesForTemplate = getScriptsAndStylesForTemplate;
|
|
6
|
+
exports.readWebpackStats = readWebpackStats;
|
|
7
|
+
var path = _interopRequireWildcard(require("path"));
|
|
8
|
+
var fs = _interopRequireWildcard(require("fs-extra"));
|
|
9
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
10
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
|
+
// we want to force posix-style joins, so Windows doesn't produce backslashes for urls
|
|
12
|
+
const {
|
|
13
|
+
join
|
|
14
|
+
} = path.posix;
|
|
15
|
+
const inlineCssPromiseCache = new Map();
|
|
16
|
+
async function readWebpackStats(publicDir) {
|
|
17
|
+
const filePath = join(publicDir, `webpack.stats.json`);
|
|
18
|
+
const rawPageData = await fs.readFile(filePath, `utf-8`);
|
|
19
|
+
return JSON.parse(rawPageData);
|
|
20
|
+
}
|
|
21
|
+
async function getScriptsAndStylesForTemplate(componentChunkName, webpackStats) {
|
|
22
|
+
const uniqScripts = new Map();
|
|
23
|
+
const uniqStyles = new Map();
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Add script or style to correct bucket. Make sure those are unique (no duplicates) and that "preload" will win over any other "rel"
|
|
27
|
+
*/
|
|
28
|
+
function handleAsset(name, rel, shouldGenerateLink = false) {
|
|
29
|
+
let uniqueAssetsMap;
|
|
30
|
+
|
|
31
|
+
// pick correct map depending on asset type
|
|
32
|
+
if (name.endsWith(`.js`)) {
|
|
33
|
+
uniqueAssetsMap = uniqScripts;
|
|
34
|
+
} else if (name.endsWith(`.css`)) {
|
|
35
|
+
uniqueAssetsMap = uniqStyles;
|
|
36
|
+
}
|
|
37
|
+
if (uniqueAssetsMap) {
|
|
38
|
+
const existingAsset = uniqueAssetsMap.get(name);
|
|
39
|
+
if (existingAsset && rel === `preload` && existingAsset.rel !== `preload`) {
|
|
40
|
+
// if we already track this asset, but it's not preload - make sure we make it preload
|
|
41
|
+
// as it has higher priority
|
|
42
|
+
existingAsset.rel = `preload`;
|
|
43
|
+
} else if (!existingAsset) {
|
|
44
|
+
uniqueAssetsMap.set(name, {
|
|
45
|
+
name,
|
|
46
|
+
rel,
|
|
47
|
+
shouldGenerateLink
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Pick up scripts and styles that are used by a template using webpack.stats.json
|
|
54
|
+
for (const chunkName of [`app`, componentChunkName]) {
|
|
55
|
+
let assets = webpackStats.assetsByChunkName[chunkName];
|
|
56
|
+
if (!assets) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Remove JS asset for templates
|
|
61
|
+
if (chunkName !== `app`) {
|
|
62
|
+
assets = assets.filter(asset => !asset.endsWith(`.js`));
|
|
63
|
+
}
|
|
64
|
+
for (const asset of assets) {
|
|
65
|
+
if (asset === `/`) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
handleAsset(asset, `preload`);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Handling for webpack magic comments, for example:
|
|
72
|
+
// import(/* webpackChunkName: "<chunk_name>", webpackPrefetch: true */ `<path_to_module>`)
|
|
73
|
+
// Shape of webpackStats.childAssetsByChunkName:
|
|
74
|
+
// {
|
|
75
|
+
// childAssetsByChunkName: {
|
|
76
|
+
// <name_of_top_level_chunk>: {
|
|
77
|
+
// prefetch: [
|
|
78
|
+
// "<chunk_name>-<chunk_hash>.js",
|
|
79
|
+
// ]
|
|
80
|
+
// }
|
|
81
|
+
// }
|
|
82
|
+
// }
|
|
83
|
+
|
|
84
|
+
const childAssets = webpackStats.childAssetsByChunkName[chunkName];
|
|
85
|
+
if (!childAssets) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
for (let [rel, assets] of Object.entries(childAssets)) {
|
|
89
|
+
// Remove JS asset for templates(magic comments)
|
|
90
|
+
if (chunkName !== `app`) {
|
|
91
|
+
// @ts-ignore TS doesn't like that assets is not typed and especially that it doesn't know that it's Iterable
|
|
92
|
+
assets = assets.filter(asset => !asset.endsWith(`.js`));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// @ts-ignore TS doesn't like that assets is not typed and especially that it doesn't know that it's Iterable
|
|
96
|
+
for (const asset of assets) {
|
|
97
|
+
// Use shouldGenerateLink to determines if we should append link for magic comment asset(preload|prefetch) to head
|
|
98
|
+
const shouldGenerateLink = chunkName == `app` ? true : false;
|
|
99
|
+
handleAsset(asset, rel, shouldGenerateLink);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// create scripts array, making sure "preload" scripts have priority
|
|
105
|
+
const scripts = [];
|
|
106
|
+
for (const scriptAsset of uniqScripts.values()) {
|
|
107
|
+
if (scriptAsset.rel === `preload`) {
|
|
108
|
+
// give priority to preload
|
|
109
|
+
scripts.unshift(scriptAsset);
|
|
110
|
+
} else {
|
|
111
|
+
scripts.push(scriptAsset);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// create styles array, making sure "preload" styles have priority and that we read .css content for non-prefetch "rel"s for inlining
|
|
116
|
+
const styles = [];
|
|
117
|
+
for (const styleAsset of uniqStyles.values()) {
|
|
118
|
+
if (styleAsset.rel !== `prefetch`) {
|
|
119
|
+
let getInlineCssPromise = inlineCssPromiseCache.get(styleAsset.name);
|
|
120
|
+
if (!getInlineCssPromise) {
|
|
121
|
+
getInlineCssPromise = fs.readFile(join(process.cwd(), `public`, styleAsset.name), `utf-8`);
|
|
122
|
+
inlineCssPromiseCache.set(styleAsset.name, getInlineCssPromise);
|
|
123
|
+
}
|
|
124
|
+
styleAsset.content = await getInlineCssPromise;
|
|
125
|
+
}
|
|
126
|
+
if (styleAsset.rel === `preload`) {
|
|
127
|
+
// give priority to preload
|
|
128
|
+
styles.unshift(styleAsset);
|
|
129
|
+
} else {
|
|
130
|
+
styles.push(styleAsset);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return {
|
|
134
|
+
scripts,
|
|
135
|
+
styles,
|
|
136
|
+
reversedStyles: styles.slice(0).reverse(),
|
|
137
|
+
reversedScripts: scripts.slice(0).reverse()
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function clearCache() {}
|
|
141
|
+
//# sourceMappingURL=client-assets-for-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-assets-for-template.js","names":["join","path","posix","inlineCssPromiseCache","Map","readWebpackStats","publicDir","filePath","rawPageData","fs","readFile","JSON","parse","getScriptsAndStylesForTemplate","componentChunkName","webpackStats","uniqScripts","uniqStyles","handleAsset","name","rel","shouldGenerateLink","uniqueAssetsMap","endsWith","existingAsset","get","set","chunkName","assets","assetsByChunkName","filter","asset","childAssets","childAssetsByChunkName","Object","entries","scripts","scriptAsset","values","unshift","push","styles","styleAsset","getInlineCssPromise","process","cwd","content","reversedStyles","slice","reverse","reversedScripts","clearCache"],"sources":["../../src/utils/client-assets-for-template.ts"],"sourcesContent":["import * as path from \"path\"\nimport * as fs from \"fs-extra\"\n\n// we want to force posix-style joins, so Windows doesn't produce backslashes for urls\nconst { join } = path.posix\n\nexport interface IScriptsAndStyles {\n scripts: Array<any>\n styles: Array<any>\n reversedStyles: Array<any>\n reversedScripts: Array<any>\n}\n\ninterface IChunk {\n name: string\n rel: string\n content?: string\n shouldGenerateLink?: boolean\n}\n\nconst inlineCssPromiseCache = new Map<string, Promise<string>>()\n\nexport async function readWebpackStats(publicDir: string): Promise<any> {\n const filePath = join(publicDir, `webpack.stats.json`)\n const rawPageData = await fs.readFile(filePath, `utf-8`)\n\n return JSON.parse(rawPageData)\n}\n\nexport async function getScriptsAndStylesForTemplate(\n componentChunkName,\n webpackStats\n): Promise<IScriptsAndStyles> {\n const uniqScripts = new Map<string, IChunk>()\n const uniqStyles = new Map<string, IChunk>()\n\n /**\n * Add script or style to correct bucket. Make sure those are unique (no duplicates) and that \"preload\" will win over any other \"rel\"\n */\n function handleAsset(\n name: string,\n rel: string,\n shouldGenerateLink: boolean = false\n ): void {\n let uniqueAssetsMap: Map<string, IChunk> | undefined\n\n // pick correct map depending on asset type\n if (name.endsWith(`.js`)) {\n uniqueAssetsMap = uniqScripts\n } else if (name.endsWith(`.css`)) {\n uniqueAssetsMap = uniqStyles\n }\n\n if (uniqueAssetsMap) {\n const existingAsset = uniqueAssetsMap.get(name)\n\n if (\n existingAsset &&\n rel === `preload` &&\n existingAsset.rel !== `preload`\n ) {\n // if we already track this asset, but it's not preload - make sure we make it preload\n // as it has higher priority\n existingAsset.rel = `preload`\n } else if (!existingAsset) {\n uniqueAssetsMap.set(name, { name, rel, shouldGenerateLink })\n }\n }\n }\n\n // Pick up scripts and styles that are used by a template using webpack.stats.json\n for (const chunkName of [`app`, componentChunkName]) {\n let assets = webpackStats.assetsByChunkName[chunkName]\n\n if (!assets) {\n continue\n }\n\n // Remove JS asset for templates\n if (chunkName !== `app`) {\n assets = assets.filter(asset => !asset.endsWith(`.js`))\n }\n\n for (const asset of assets) {\n if (asset === `/`) {\n continue\n }\n\n handleAsset(asset, `preload`)\n }\n\n // Handling for webpack magic comments, for example:\n // import(/* webpackChunkName: \"<chunk_name>\", webpackPrefetch: true */ `<path_to_module>`)\n // Shape of webpackStats.childAssetsByChunkName:\n // {\n // childAssetsByChunkName: {\n // <name_of_top_level_chunk>: {\n // prefetch: [\n // \"<chunk_name>-<chunk_hash>.js\",\n // ]\n // }\n // }\n // }\n\n const childAssets = webpackStats.childAssetsByChunkName[chunkName]\n if (!childAssets) {\n continue\n }\n\n for (let [rel, assets] of Object.entries(childAssets)) {\n // Remove JS asset for templates(magic comments)\n if (chunkName !== `app`) {\n // @ts-ignore TS doesn't like that assets is not typed and especially that it doesn't know that it's Iterable\n assets = assets.filter(asset => !asset.endsWith(`.js`))\n }\n\n // @ts-ignore TS doesn't like that assets is not typed and especially that it doesn't know that it's Iterable\n for (const asset of assets) {\n // Use shouldGenerateLink to determines if we should append link for magic comment asset(preload|prefetch) to head\n const shouldGenerateLink = chunkName == `app` ? true : false\n handleAsset(asset, rel, shouldGenerateLink)\n }\n }\n }\n\n // create scripts array, making sure \"preload\" scripts have priority\n const scripts: Array<IChunk> = []\n for (const scriptAsset of uniqScripts.values()) {\n if (scriptAsset.rel === `preload`) {\n // give priority to preload\n scripts.unshift(scriptAsset)\n } else {\n scripts.push(scriptAsset)\n }\n }\n\n // create styles array, making sure \"preload\" styles have priority and that we read .css content for non-prefetch \"rel\"s for inlining\n const styles: Array<IChunk> = []\n for (const styleAsset of uniqStyles.values()) {\n if (styleAsset.rel !== `prefetch`) {\n let getInlineCssPromise = inlineCssPromiseCache.get(styleAsset.name)\n if (!getInlineCssPromise) {\n getInlineCssPromise = fs.readFile(\n join(process.cwd(), `public`, styleAsset.name),\n `utf-8`\n )\n\n inlineCssPromiseCache.set(\n styleAsset.name,\n getInlineCssPromise as Promise<string>\n )\n }\n\n styleAsset.content = await getInlineCssPromise\n }\n\n if (styleAsset.rel === `preload`) {\n // give priority to preload\n styles.unshift(styleAsset)\n } else {\n styles.push(styleAsset)\n }\n }\n\n return {\n scripts,\n styles,\n reversedStyles: styles.slice(0).reverse(),\n reversedScripts: scripts.slice(0).reverse(),\n }\n}\n\nexport function clearCache(): void {}\n"],"mappings":";;;;;;AAAA;AACA;AAA8B;AAAA;AAE9B;AACA,MAAM;EAAEA;AAAK,CAAC,GAAGC,IAAI,CAACC,KAAK;AAgB3B,MAAMC,qBAAqB,GAAG,IAAIC,GAAG,EAA2B;AAEzD,eAAeC,gBAAgB,CAACC,SAAiB,EAAgB;EACtE,MAAMC,QAAQ,GAAGP,IAAI,CAACM,SAAS,EAAG,oBAAmB,CAAC;EACtD,MAAME,WAAW,GAAG,MAAMC,EAAE,CAACC,QAAQ,CAACH,QAAQ,EAAG,OAAM,CAAC;EAExD,OAAOI,IAAI,CAACC,KAAK,CAACJ,WAAW,CAAC;AAChC;AAEO,eAAeK,8BAA8B,CAClDC,kBAAkB,EAClBC,YAAY,EACgB;EAC5B,MAAMC,WAAW,GAAG,IAAIZ,GAAG,EAAkB;EAC7C,MAAMa,UAAU,GAAG,IAAIb,GAAG,EAAkB;;EAE5C;AACF;AACA;EACE,SAASc,WAAW,CAClBC,IAAY,EACZC,GAAW,EACXC,kBAA2B,GAAG,KAAK,EAC7B;IACN,IAAIC,eAAgD;;IAEpD;IACA,IAAIH,IAAI,CAACI,QAAQ,CAAE,KAAI,CAAC,EAAE;MACxBD,eAAe,GAAGN,WAAW;IAC/B,CAAC,MAAM,IAAIG,IAAI,CAACI,QAAQ,CAAE,MAAK,CAAC,EAAE;MAChCD,eAAe,GAAGL,UAAU;IAC9B;IAEA,IAAIK,eAAe,EAAE;MACnB,MAAME,aAAa,GAAGF,eAAe,CAACG,GAAG,CAACN,IAAI,CAAC;MAE/C,IACEK,aAAa,IACbJ,GAAG,KAAM,SAAQ,IACjBI,aAAa,CAACJ,GAAG,KAAM,SAAQ,EAC/B;QACA;QACA;QACAI,aAAa,CAACJ,GAAG,GAAI,SAAQ;MAC/B,CAAC,MAAM,IAAI,CAACI,aAAa,EAAE;QACzBF,eAAe,CAACI,GAAG,CAACP,IAAI,EAAE;UAAEA,IAAI;UAAEC,GAAG;UAAEC;QAAmB,CAAC,CAAC;MAC9D;IACF;EACF;;EAEA;EACA,KAAK,MAAMM,SAAS,IAAI,CAAE,KAAI,EAAEb,kBAAkB,CAAC,EAAE;IACnD,IAAIc,MAAM,GAAGb,YAAY,CAACc,iBAAiB,CAACF,SAAS,CAAC;IAEtD,IAAI,CAACC,MAAM,EAAE;MACX;IACF;;IAEA;IACA,IAAID,SAAS,KAAM,KAAI,EAAE;MACvBC,MAAM,GAAGA,MAAM,CAACE,MAAM,CAACC,KAAK,IAAI,CAACA,KAAK,CAACR,QAAQ,CAAE,KAAI,CAAC,CAAC;IACzD;IAEA,KAAK,MAAMQ,KAAK,IAAIH,MAAM,EAAE;MAC1B,IAAIG,KAAK,KAAM,GAAE,EAAE;QACjB;MACF;MAEAb,WAAW,CAACa,KAAK,EAAG,SAAQ,CAAC;IAC/B;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;IAEA,MAAMC,WAAW,GAAGjB,YAAY,CAACkB,sBAAsB,CAACN,SAAS,CAAC;IAClE,IAAI,CAACK,WAAW,EAAE;MAChB;IACF;IAEA,KAAK,IAAI,CAACZ,GAAG,EAAEQ,MAAM,CAAC,IAAIM,MAAM,CAACC,OAAO,CAACH,WAAW,CAAC,EAAE;MACrD;MACA,IAAIL,SAAS,KAAM,KAAI,EAAE;QACvB;QACAC,MAAM,GAAGA,MAAM,CAACE,MAAM,CAACC,KAAK,IAAI,CAACA,KAAK,CAACR,QAAQ,CAAE,KAAI,CAAC,CAAC;MACzD;;MAEA;MACA,KAAK,MAAMQ,KAAK,IAAIH,MAAM,EAAE;QAC1B;QACA,MAAMP,kBAAkB,GAAGM,SAAS,IAAK,KAAI,GAAG,IAAI,GAAG,KAAK;QAC5DT,WAAW,CAACa,KAAK,EAAEX,GAAG,EAAEC,kBAAkB,CAAC;MAC7C;IACF;EACF;;EAEA;EACA,MAAMe,OAAsB,GAAG,EAAE;EACjC,KAAK,MAAMC,WAAW,IAAIrB,WAAW,CAACsB,MAAM,EAAE,EAAE;IAC9C,IAAID,WAAW,CAACjB,GAAG,KAAM,SAAQ,EAAE;MACjC;MACAgB,OAAO,CAACG,OAAO,CAACF,WAAW,CAAC;IAC9B,CAAC,MAAM;MACLD,OAAO,CAACI,IAAI,CAACH,WAAW,CAAC;IAC3B;EACF;;EAEA;EACA,MAAMI,MAAqB,GAAG,EAAE;EAChC,KAAK,MAAMC,UAAU,IAAIzB,UAAU,CAACqB,MAAM,EAAE,EAAE;IAC5C,IAAII,UAAU,CAACtB,GAAG,KAAM,UAAS,EAAE;MACjC,IAAIuB,mBAAmB,GAAGxC,qBAAqB,CAACsB,GAAG,CAACiB,UAAU,CAACvB,IAAI,CAAC;MACpE,IAAI,CAACwB,mBAAmB,EAAE;QACxBA,mBAAmB,GAAGlC,EAAE,CAACC,QAAQ,CAC/BV,IAAI,CAAC4C,OAAO,CAACC,GAAG,EAAE,EAAG,QAAO,EAAEH,UAAU,CAACvB,IAAI,CAAC,EAC7C,OAAM,CACR;QAEDhB,qBAAqB,CAACuB,GAAG,CACvBgB,UAAU,CAACvB,IAAI,EACfwB,mBAAmB,CACpB;MACH;MAEAD,UAAU,CAACI,OAAO,GAAG,MAAMH,mBAAmB;IAChD;IAEA,IAAID,UAAU,CAACtB,GAAG,KAAM,SAAQ,EAAE;MAChC;MACAqB,MAAM,CAACF,OAAO,CAACG,UAAU,CAAC;IAC5B,CAAC,MAAM;MACLD,MAAM,CAACD,IAAI,CAACE,UAAU,CAAC;IACzB;EACF;EAEA,OAAO;IACLN,OAAO;IACPK,MAAM;IACNM,cAAc,EAAEN,MAAM,CAACO,KAAK,CAAC,CAAC,CAAC,CAACC,OAAO,EAAE;IACzCC,eAAe,EAAEd,OAAO,CAACY,KAAK,CAAC,CAAC,CAAC,CAACC,OAAO;EAC3C,CAAC;AACH;AAEO,SAASE,UAAU,GAAS,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate a unique id that is consistent, deterministic, and fast while resulting in predictably short hashes.
|
|
3
|
+
*
|
|
4
|
+
* Some characteristics for this id:
|
|
5
|
+
*
|
|
6
|
+
* - The value of the `id` should not mean anything (it is "ours")
|
|
7
|
+
* - The value does not need to be encrypted
|
|
8
|
+
* - The value must be unique within our system (as little collision risk as possible on small ascii inputs)
|
|
9
|
+
* - The value needs to be deterministic (same input always results in same output)
|
|
10
|
+
* - The conversion needs to be fast
|
|
11
|
+
* - The result should be predictably short as it may be used in urls
|
|
12
|
+
*
|
|
13
|
+
* High level this step is meant to prevent people from using our `id` to have meaning in their site and it's meant
|
|
14
|
+
* to make sure the id ends up being short, whatever the input size was.
|
|
15
|
+
*
|
|
16
|
+
* Note: UUID is relatively slow because it calls into the native crypto library to generate SHA-1 hashes.
|
|
17
|
+
* We do need the low collision rate of SHA-1 so we use a local (global) cache to speed up repetitive calls
|
|
18
|
+
*
|
|
19
|
+
* @param {String | Number} id - A string of arbitrary length
|
|
20
|
+
* @param {String} namespace - Namespace to use for UUID
|
|
21
|
+
*
|
|
22
|
+
* @return {String} - UUID
|
|
23
|
+
*/
|
|
24
|
+
export declare function createNodeId(id: string | number, namespace: string): string;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.createNodeId = createNodeId;
|
|
6
|
+
var _uuid = require("uuid");
|
|
7
|
+
var _reporter = _interopRequireDefault(require("gatsby-cli/lib/reporter"));
|
|
8
|
+
const seedConstant = `638f7a53-c567-4eca-8fc1-b23efb1cfb2b`;
|
|
9
|
+
|
|
10
|
+
// This cache prevents duplicate calls to uuid which is relevant for certain cases
|
|
11
|
+
const unprefixedCache = new Map();
|
|
12
|
+
// ns -> name -> uuid
|
|
13
|
+
const namespacedCache = new Map([[``, unprefixedCache]]);
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Generate a unique id that is consistent, deterministic, and fast while resulting in predictably short hashes.
|
|
17
|
+
*
|
|
18
|
+
* Some characteristics for this id:
|
|
19
|
+
*
|
|
20
|
+
* - The value of the `id` should not mean anything (it is "ours")
|
|
21
|
+
* - The value does not need to be encrypted
|
|
22
|
+
* - The value must be unique within our system (as little collision risk as possible on small ascii inputs)
|
|
23
|
+
* - The value needs to be deterministic (same input always results in same output)
|
|
24
|
+
* - The conversion needs to be fast
|
|
25
|
+
* - The result should be predictably short as it may be used in urls
|
|
26
|
+
*
|
|
27
|
+
* High level this step is meant to prevent people from using our `id` to have meaning in their site and it's meant
|
|
28
|
+
* to make sure the id ends up being short, whatever the input size was.
|
|
29
|
+
*
|
|
30
|
+
* Note: UUID is relatively slow because it calls into the native crypto library to generate SHA-1 hashes.
|
|
31
|
+
* We do need the low collision rate of SHA-1 so we use a local (global) cache to speed up repetitive calls
|
|
32
|
+
*
|
|
33
|
+
* @param {String | Number} id - A string of arbitrary length
|
|
34
|
+
* @param {String} namespace - Namespace to use for UUID
|
|
35
|
+
*
|
|
36
|
+
* @return {String} - UUID
|
|
37
|
+
*/
|
|
38
|
+
function createNodeId(id, namespace) {
|
|
39
|
+
if (typeof id === `number`) {
|
|
40
|
+
id = id.toString();
|
|
41
|
+
} else if (typeof id !== `string`) {
|
|
42
|
+
_reporter.default.panic(`The \`id\` parameter passed to createNodeId must be a String or Number (got ${typeof id})`);
|
|
43
|
+
} else if (typeof namespace !== `string`) {
|
|
44
|
+
_reporter.default.panic(`The \`namespace\` parameter passed to createNodeId must be a String (got ${typeof namespace})`);
|
|
45
|
+
}
|
|
46
|
+
let nsHash = unprefixedCache.get(namespace);
|
|
47
|
+
if (!nsHash) {
|
|
48
|
+
nsHash = (0, _uuid.v5)(namespace, seedConstant);
|
|
49
|
+
unprefixedCache.set(namespace, nsHash);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Calling uuid is relatively expensive because it calls into crypto for sha1.
|
|
53
|
+
// We use a local map to cache calls with the same ns+id pair, which helps a lot.
|
|
54
|
+
let nsCache = namespacedCache.get(namespace);
|
|
55
|
+
if (!nsCache) {
|
|
56
|
+
nsCache = new Map();
|
|
57
|
+
namespacedCache.set(namespace, nsCache);
|
|
58
|
+
}
|
|
59
|
+
let hash = nsCache.get(id);
|
|
60
|
+
if (hash) {
|
|
61
|
+
return hash;
|
|
62
|
+
}
|
|
63
|
+
hash = (0, _uuid.v5)(id, nsHash);
|
|
64
|
+
nsCache.set(id, hash);
|
|
65
|
+
return hash;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=create-node-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-node-id.js","names":["seedConstant","unprefixedCache","Map","namespacedCache","createNodeId","id","namespace","toString","report","panic","nsHash","get","uuidv5","set","nsCache","hash"],"sources":["../../src/utils/create-node-id.ts"],"sourcesContent":["import { v5 as uuidv5 } from \"uuid\"\nimport report from \"gatsby-cli/lib/reporter\"\n\nconst seedConstant = `638f7a53-c567-4eca-8fc1-b23efb1cfb2b`\n\n// This cache prevents duplicate calls to uuid which is relevant for certain cases\nconst unprefixedCache: Map<string, string> = new Map()\n// ns -> name -> uuid\nconst namespacedCache: Map<string, Map<string, string>> = new Map([\n [``, unprefixedCache],\n])\n\n/**\n * Generate a unique id that is consistent, deterministic, and fast while resulting in predictably short hashes.\n *\n * Some characteristics for this id:\n *\n * - The value of the `id` should not mean anything (it is \"ours\")\n * - The value does not need to be encrypted\n * - The value must be unique within our system (as little collision risk as possible on small ascii inputs)\n * - The value needs to be deterministic (same input always results in same output)\n * - The conversion needs to be fast\n * - The result should be predictably short as it may be used in urls\n *\n * High level this step is meant to prevent people from using our `id` to have meaning in their site and it's meant\n * to make sure the id ends up being short, whatever the input size was.\n *\n * Note: UUID is relatively slow because it calls into the native crypto library to generate SHA-1 hashes.\n * We do need the low collision rate of SHA-1 so we use a local (global) cache to speed up repetitive calls\n *\n * @param {String | Number} id - A string of arbitrary length\n * @param {String} namespace - Namespace to use for UUID\n *\n * @return {String} - UUID\n */\nexport function createNodeId(id: string | number, namespace: string): string {\n if (typeof id === `number`) {\n id = id.toString()\n } else if (typeof id !== `string`) {\n report.panic(\n `The \\`id\\` parameter passed to createNodeId must be a String or Number (got ${typeof id})`\n )\n } else if (typeof namespace !== `string`) {\n report.panic(\n `The \\`namespace\\` parameter passed to createNodeId must be a String (got ${typeof namespace})`\n )\n }\n\n let nsHash = unprefixedCache.get(namespace)\n if (!nsHash) {\n nsHash = uuidv5(namespace, seedConstant) as string\n unprefixedCache.set(namespace, nsHash)\n }\n\n // Calling uuid is relatively expensive because it calls into crypto for sha1.\n // We use a local map to cache calls with the same ns+id pair, which helps a lot.\n let nsCache = namespacedCache.get(namespace)\n if (!nsCache) {\n nsCache = new Map()\n namespacedCache.set(namespace, nsCache)\n }\n\n let hash = nsCache.get(id)\n if (hash) {\n return hash\n }\n\n hash = uuidv5(id, nsHash) as string\n nsCache.set(id, hash)\n return hash\n}\n"],"mappings":";;;;;AAAA;AACA;AAEA,MAAMA,YAAY,GAAI,sCAAqC;;AAE3D;AACA,MAAMC,eAAoC,GAAG,IAAIC,GAAG,EAAE;AACtD;AACA,MAAMC,eAAiD,GAAG,IAAID,GAAG,CAAC,CAChE,CAAE,EAAC,EAAED,eAAe,CAAC,CACtB,CAAC;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,YAAY,CAACC,EAAmB,EAAEC,SAAiB,EAAU;EAC3E,IAAI,OAAOD,EAAE,KAAM,QAAO,EAAE;IAC1BA,EAAE,GAAGA,EAAE,CAACE,QAAQ,EAAE;EACpB,CAAC,MAAM,IAAI,OAAOF,EAAE,KAAM,QAAO,EAAE;IACjCG,iBAAM,CAACC,KAAK,CACT,+EAA8E,OAAOJ,EAAG,GAAE,CAC5F;EACH,CAAC,MAAM,IAAI,OAAOC,SAAS,KAAM,QAAO,EAAE;IACxCE,iBAAM,CAACC,KAAK,CACT,4EAA2E,OAAOH,SAAU,GAAE,CAChG;EACH;EAEA,IAAII,MAAM,GAAGT,eAAe,CAACU,GAAG,CAACL,SAAS,CAAC;EAC3C,IAAI,CAACI,MAAM,EAAE;IACXA,MAAM,GAAG,IAAAE,QAAM,EAACN,SAAS,EAAEN,YAAY,CAAW;IAClDC,eAAe,CAACY,GAAG,CAACP,SAAS,EAAEI,MAAM,CAAC;EACxC;;EAEA;EACA;EACA,IAAII,OAAO,GAAGX,eAAe,CAACQ,GAAG,CAACL,SAAS,CAAC;EAC5C,IAAI,CAACQ,OAAO,EAAE;IACZA,OAAO,GAAG,IAAIZ,GAAG,EAAE;IACnBC,eAAe,CAACU,GAAG,CAACP,SAAS,EAAEQ,OAAO,CAAC;EACzC;EAEA,IAAIC,IAAI,GAAGD,OAAO,CAACH,GAAG,CAACN,EAAE,CAAC;EAC1B,IAAIU,IAAI,EAAE;IACR,OAAOA,IAAI;EACb;EAEAA,IAAI,GAAG,IAAAH,QAAM,EAACP,EAAE,EAAEK,MAAM,CAAW;EACnCI,OAAO,CAACD,GAAG,CAACR,EAAE,EAAEU,IAAI,CAAC;EACrB,OAAOA,IAAI;AACb"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.createSchemaCustomization = void 0;
|
|
6
|
+
var _apiRunnerNode = _interopRequireDefault(require("./api-runner-node"));
|
|
7
|
+
var _redux = require("../redux");
|
|
8
|
+
const createSchemaCustomization = async ({
|
|
9
|
+
refresh = false,
|
|
10
|
+
parentSpan,
|
|
11
|
+
deferNodeMutation
|
|
12
|
+
}) => {
|
|
13
|
+
if (refresh) {
|
|
14
|
+
_redux.store.dispatch({
|
|
15
|
+
type: `CLEAR_SCHEMA_CUSTOMIZATION`
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
await (0, _apiRunnerNode.default)(`createSchemaCustomization`, {
|
|
19
|
+
parentSpan,
|
|
20
|
+
deferNodeMutation,
|
|
21
|
+
traceId: !refresh ? `initial-createSchemaCustomization` : `refresh-createSchemaCustomization`
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.createSchemaCustomization = createSchemaCustomization;
|
|
25
|
+
//# sourceMappingURL=create-schema-customization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-schema-customization.js","names":["createSchemaCustomization","refresh","parentSpan","deferNodeMutation","store","dispatch","type","apiRunnerNode","traceId"],"sources":["../../src/utils/create-schema-customization.ts"],"sourcesContent":["import apiRunnerNode from \"./api-runner-node\"\nimport { store } from \"../redux\"\nimport { Span } from \"opentracing\"\n\nexport const createSchemaCustomization = async ({\n refresh = false,\n parentSpan,\n deferNodeMutation,\n}: {\n refresh?: boolean\n parentSpan?: Span\n deferNodeMutation?: boolean\n}): Promise<void> => {\n if (refresh) {\n store.dispatch({ type: `CLEAR_SCHEMA_CUSTOMIZATION` })\n }\n await apiRunnerNode(`createSchemaCustomization`, {\n parentSpan,\n deferNodeMutation,\n traceId: !refresh\n ? `initial-createSchemaCustomization`\n : `refresh-createSchemaCustomization`,\n })\n}\n"],"mappings":";;;;;AAAA;AACA;AAGO,MAAMA,yBAAyB,GAAG,OAAO;EAC9CC,OAAO,GAAG,KAAK;EACfC,UAAU;EACVC;AAKF,CAAC,KAAoB;EACnB,IAAIF,OAAO,EAAE;IACXG,YAAK,CAACC,QAAQ,CAAC;MAAEC,IAAI,EAAG;IAA4B,CAAC,CAAC;EACxD;EACA,MAAM,IAAAC,sBAAa,EAAE,2BAA0B,EAAE;IAC/CL,UAAU;IACVC,iBAAiB;IACjBK,OAAO,EAAE,CAACP,OAAO,GACZ,mCAAkC,GAClC;EACP,CAAC,CAAC;AACJ,CAAC;AAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IGatsbyNode } from "../redux/types";
|
|
2
|
+
export declare function enableNodeMutationsDetection(): void;
|
|
3
|
+
export declare function wrapNode<T extends IGatsbyNode | undefined>(node: T): T;
|
|
4
|
+
export declare function wrapNodes<T extends Array<IGatsbyNode> | undefined>(nodes: T): T;
|