astro 5.16.5 → 6.0.0-alpha.1
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/{astro.js → bin/astro.mjs} +7 -8
- package/client.d.ts +19 -45
- package/components/ClientRouter.astro +0 -5
- package/components/Code.astro +2 -2
- package/components/Image.astro +2 -2
- package/components/Picture.astro +1 -1
- package/dist/actions/consts.d.ts +2 -5
- package/dist/actions/consts.js +4 -8
- package/dist/actions/integration.js +2 -4
- package/dist/actions/runtime/client.d.ts +84 -3
- package/dist/actions/runtime/client.js +238 -7
- package/dist/actions/runtime/entrypoints/client.d.ts +7 -0
- package/dist/actions/runtime/entrypoints/client.js +91 -0
- package/dist/actions/runtime/entrypoints/route.d.ts +2 -0
- package/dist/actions/runtime/{route.js → entrypoints/route.js} +1 -1
- package/dist/actions/runtime/entrypoints/server.d.ts +6 -0
- package/dist/actions/runtime/entrypoints/server.js +33 -0
- package/dist/actions/runtime/server.d.ts +11 -29
- package/dist/actions/runtime/server.js +162 -82
- package/dist/actions/runtime/types.d.ts +64 -0
- package/dist/actions/runtime/types.js +0 -0
- package/dist/actions/utils.d.ts +2 -2
- package/dist/actions/utils.js +2 -2
- package/dist/actions/vite-plugin-actions.js +18 -21
- package/dist/assets/build/generate.d.ts +2 -2
- package/dist/assets/build/generate.js +11 -9
- package/dist/assets/build/remote.js +4 -14
- package/dist/assets/endpoint/config.js +2 -2
- package/dist/assets/endpoint/dev.js +7 -6
- package/dist/assets/fonts/config.d.ts +86 -174
- package/dist/assets/fonts/config.js +15 -17
- package/dist/assets/fonts/infra/dev-remote-font-provider-mod-resolver.d.ts +3 -3
- package/dist/assets/fonts/infra/dev-remote-font-provider-mod-resolver.js +4 -4
- package/dist/assets/fonts/types.d.ts +1 -1
- package/dist/assets/fonts/vite-plugin-fonts.js +6 -3
- package/dist/assets/services/sharp.js +5 -6
- package/dist/assets/utils/index.d.ts +0 -6
- package/dist/assets/utils/index.js +0 -9
- package/dist/assets/utils/{transformToPath.d.ts → node.d.ts} +15 -1
- package/dist/assets/utils/{node/emitAsset.js → node.js} +34 -56
- package/dist/assets/vite-plugin-assets.js +9 -14
- package/dist/cli/index.js +0 -2
- package/dist/cli/infra/build-time-astro-version-provider.js +1 -1
- package/dist/cli/preferences/index.js +5 -1
- package/dist/config/index.js +11 -16
- package/dist/container/index.d.ts +0 -1
- package/dist/container/index.js +19 -14
- package/dist/container/pipeline.d.ts +2 -1
- package/dist/container/pipeline.js +4 -11
- package/dist/content/config.d.ts +34 -40
- package/dist/content/config.js +17 -13
- package/dist/content/content-layer.js +14 -21
- package/dist/content/data-store.d.ts +0 -2
- package/dist/content/loaders/errors.d.ts +3 -3
- package/dist/content/loaders/errors.js +5 -2
- package/dist/content/loaders/glob.d.ts +0 -5
- package/dist/content/loaders/glob.js +3 -30
- package/dist/content/loaders/types.d.ts +11 -4
- package/dist/content/mutable-data-store.js +1 -14
- package/dist/content/runtime-assets.d.ts +4 -4
- package/dist/content/runtime-assets.js +4 -7
- package/dist/content/runtime.d.ts +35 -73
- package/dist/content/runtime.js +63 -231
- package/dist/content/server-listeners.js +25 -88
- package/dist/content/types-generator.d.ts +1 -6
- package/dist/content/types-generator.js +87 -156
- package/dist/content/utils.d.ts +47 -412
- package/dist/content/utils.js +88 -203
- package/dist/content/vite-plugin-content-assets.d.ts +12 -4
- package/dist/content/vite-plugin-content-assets.js +100 -56
- package/dist/content/vite-plugin-content-imports.js +10 -8
- package/dist/content/vite-plugin-content-virtual-mod.js +13 -131
- package/dist/core/app/app.d.ts +5 -0
- package/dist/core/app/app.js +13 -0
- package/dist/core/app/base.d.ts +132 -0
- package/dist/core/app/base.js +448 -0
- package/dist/core/app/common.d.ts +6 -2
- package/dist/core/app/common.js +60 -33
- package/dist/core/app/dev/app.d.ts +15 -0
- package/dist/core/app/dev/app.js +86 -0
- package/dist/core/app/dev/pipeline.d.ts +13 -0
- package/dist/core/app/dev/pipeline.js +123 -0
- package/dist/core/app/entrypoint.d.ts +2 -0
- package/dist/core/app/entrypoint.js +15 -0
- package/dist/core/app/index.d.ts +7 -114
- package/dist/core/app/index.js +20 -557
- package/dist/core/app/logging.d.ts +3 -0
- package/dist/core/app/logging.js +11 -0
- package/dist/core/app/manifest.d.ts +9 -0
- package/dist/core/app/manifest.js +107 -0
- package/dist/core/app/middlewares.js +1 -1
- package/dist/core/app/node.d.ts +2 -8
- package/dist/core/app/node.js +8 -9
- package/dist/core/app/pipeline.d.ts +6 -5
- package/dist/core/app/pipeline.js +65 -49
- package/dist/core/app/types.d.ts +58 -22
- package/dist/core/app/validate-forwarded-headers.d.ts +16 -0
- package/dist/core/app/validate-forwarded-headers.js +60 -0
- package/dist/core/base-pipeline.d.ts +22 -14
- package/dist/core/base-pipeline.js +54 -6
- package/dist/core/build/app.d.ts +13 -0
- package/dist/core/build/app.js +38 -0
- package/dist/core/build/common.d.ts +1 -1
- package/dist/core/build/common.js +2 -2
- package/dist/core/build/generate.d.ts +1 -1
- package/dist/core/build/generate.js +95 -204
- package/dist/core/build/graph.js +2 -2
- package/dist/core/build/index.js +11 -19
- package/dist/core/build/internal.d.ts +3 -29
- package/dist/core/build/internal.js +1 -45
- package/dist/core/build/pipeline.d.ts +15 -26
- package/dist/core/build/pipeline.js +106 -170
- package/dist/core/build/plugins/index.d.ts +4 -2
- package/dist/core/build/plugins/index.js +17 -23
- package/dist/core/build/plugins/plugin-analyzer.d.ts +2 -2
- package/dist/core/build/plugins/plugin-analyzer.js +5 -13
- package/dist/core/build/plugins/plugin-component-entry.d.ts +7 -2
- package/dist/core/build/plugins/plugin-component-entry.js +5 -13
- package/dist/core/build/plugins/plugin-css.d.ts +2 -2
- package/dist/core/build/plugins/plugin-css.js +86 -41
- package/dist/core/build/plugins/plugin-internals.d.ts +2 -2
- package/dist/core/build/plugins/plugin-internals.js +24 -18
- package/dist/core/build/plugins/plugin-manifest.d.ts +33 -5
- package/dist/core/build/plugins/plugin-manifest.js +89 -131
- package/dist/core/build/plugins/plugin-middleware.d.ts +2 -2
- package/dist/core/build/plugins/plugin-middleware.js +5 -7
- package/dist/core/build/plugins/plugin-noop.d.ts +3 -0
- package/dist/core/build/plugins/plugin-noop.js +29 -0
- package/dist/core/build/plugins/plugin-prerender.d.ts +2 -2
- package/dist/core/build/plugins/plugin-prerender.js +7 -64
- package/dist/core/build/plugins/plugin-scripts.d.ts +5 -2
- package/dist/core/build/plugins/plugin-scripts.js +5 -13
- package/dist/core/build/plugins/plugin-ssr.d.ts +2 -2
- package/dist/core/build/plugins/plugin-ssr.js +60 -132
- package/dist/core/build/plugins/util.d.ts +1 -25
- package/dist/core/build/plugins/util.js +0 -47
- package/dist/core/build/runtime.d.ts +26 -0
- package/dist/core/build/runtime.js +45 -0
- package/dist/core/build/static-build.d.ts +2 -2
- package/dist/core/build/static-build.js +180 -154
- package/dist/core/build/types.d.ts +1 -2
- package/dist/core/build/util.d.ts +0 -1
- package/dist/core/build/util.js +0 -7
- package/dist/core/compile/compile.d.ts +2 -3
- package/dist/core/compile/compile.js +2 -4
- package/dist/core/config/config.js +2 -2
- package/dist/core/config/index.d.ts +0 -1
- package/dist/core/config/index.js +0 -2
- package/dist/core/config/schemas/base.d.ts +330 -1463
- package/dist/core/config/schemas/base.js +40 -56
- package/dist/core/config/schemas/refined.d.ts +2 -2
- package/dist/core/config/schemas/refined.js +8 -1
- package/dist/core/config/schemas/relative.d.ts +607 -1737
- package/dist/core/config/schemas/relative.js +4 -4
- package/dist/core/config/settings.d.ts +3 -3
- package/dist/core/config/settings.js +5 -6
- package/dist/core/config/validate.js +13 -2
- package/dist/core/config/vite-load.js +12 -3
- package/dist/core/constants.d.ts +12 -0
- package/dist/core/constants.js +22 -1
- package/dist/core/create-vite.d.ts +2 -6
- package/dist/core/create-vite.js +36 -47
- package/dist/core/csp/common.d.ts +1 -1
- package/dist/core/csp/common.js +1 -1
- package/dist/core/csp/config.d.ts +8 -4
- package/dist/core/csp/config.js +1 -1
- package/dist/core/dev/container.js +13 -9
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/dev/restart.js +15 -6
- package/dist/core/errors/dev/runtime.d.ts +6 -0
- package/dist/core/errors/dev/runtime.js +27 -0
- package/dist/core/errors/dev/vite.js +2 -19
- package/dist/core/errors/errors-data.d.ts +85 -57
- package/dist/core/errors/errors-data.js +40 -28
- package/dist/core/errors/errors.d.ts +3 -3
- package/dist/core/errors/errors.js +1 -1
- package/dist/core/errors/overlay.js +1 -1
- package/dist/core/errors/zod-error-map.d.ts +2 -2
- package/dist/core/errors/zod-error-map.js +26 -24
- package/dist/core/messages.d.ts +2 -2
- package/dist/core/messages.js +2 -2
- package/dist/core/middleware/callMiddleware.js +1 -1
- package/dist/core/middleware/defineMiddleware.d.ts +2 -0
- package/dist/core/middleware/defineMiddleware.js +6 -0
- package/dist/core/middleware/index.d.ts +4 -4
- package/dist/core/middleware/index.js +6 -12
- package/dist/core/middleware/sequence.js +4 -4
- package/dist/core/middleware/vite-plugin.d.ts +1 -1
- package/dist/core/middleware/vite-plugin.js +18 -7
- package/dist/core/module-loader/index.d.ts +2 -2
- package/dist/core/module-loader/index.js +1 -1
- package/dist/core/module-loader/{loader.d.ts → runner.d.ts} +6 -17
- package/dist/core/module-loader/{loader.js → runner.js} +3 -0
- package/dist/core/module-loader/vite.d.ts +3 -2
- package/dist/core/module-loader/vite.js +17 -13
- package/dist/core/preview/index.js +20 -5
- package/dist/core/preview/static-preview-server.js +1 -0
- package/dist/core/redirects/component.js +1 -2
- package/dist/core/redirects/index.d.ts +0 -1
- package/dist/core/redirects/index.js +1 -3
- package/dist/core/redirects/render.js +5 -2
- package/dist/core/render/paginate.d.ts +1 -1
- package/dist/core/render/paginate.js +8 -6
- package/dist/core/render/params-and-props.d.ts +2 -0
- package/dist/core/render/params-and-props.js +19 -7
- package/dist/core/render/route-cache.d.ts +3 -3
- package/dist/core/render/route-cache.js +7 -7
- package/dist/core/render-context.d.ts +9 -7
- package/dist/core/render-context.js +46 -47
- package/dist/core/routing/astro-designed-error-pages.js +2 -2
- package/dist/core/routing/default.js +1 -1
- package/dist/core/routing/helpers.d.ts +22 -0
- package/dist/core/routing/helpers.js +25 -0
- package/dist/core/routing/index.d.ts +1 -1
- package/dist/core/routing/index.js +2 -2
- package/dist/core/routing/manifest/create.d.ts +6 -1
- package/dist/core/routing/manifest/create.js +9 -13
- package/dist/core/routing/manifest/generator.d.ts +3 -1
- package/dist/core/routing/params.d.ts +2 -1
- package/dist/core/routing/params.js +8 -8
- package/dist/core/routing/validation.d.ts +1 -2
- package/dist/core/routing/validation.js +2 -18
- package/dist/core/server-islands/endpoint.d.ts +1 -2
- package/dist/core/server-islands/endpoint.js +5 -4
- package/dist/core/server-islands/vite-plugin-server-islands.d.ts +1 -1
- package/dist/core/server-islands/vite-plugin-server-islands.js +89 -44
- package/dist/core/session/vite-plugin.d.ts +6 -0
- package/dist/core/session/vite-plugin.js +53 -0
- package/dist/core/session.d.ts +4 -2
- package/dist/core/session.js +8 -48
- package/dist/core/sync/index.d.ts +2 -5
- package/dist/core/sync/index.js +19 -34
- package/dist/core/util.d.ts +2 -2
- package/dist/core/util.js +3 -3
- package/dist/entrypoints/legacy.d.ts +2 -0
- package/dist/entrypoints/legacy.js +12 -0
- package/dist/entrypoints/prerender.d.ts +4 -0
- package/dist/entrypoints/prerender.js +7 -0
- package/dist/env/env-loader.d.ts +0 -1
- package/dist/env/env-loader.js +4 -17
- package/dist/env/schema.d.ts +21 -251
- package/dist/env/schema.js +6 -3
- package/dist/env/vite-plugin-env.js +3 -2
- package/dist/env/vite-plugin-import-meta-env.js +3 -2
- package/dist/environments.d.ts +3 -0
- package/dist/environments.js +11 -0
- package/dist/events/error.d.ts +2 -2
- package/dist/i18n/index.d.ts +2 -2
- package/dist/i18n/index.js +0 -3
- package/dist/i18n/utils.d.ts +1 -6
- package/dist/i18n/utils.js +1 -63
- package/dist/i18n/vite-plugin-i18n.d.ts +0 -5
- package/dist/i18n/vite-plugin-i18n.js +1 -22
- package/dist/integrations/hooks.d.ts +2 -3
- package/dist/integrations/hooks.js +9 -33
- package/dist/manifest/serialized.d.ts +9 -0
- package/dist/manifest/serialized.js +144 -0
- package/dist/manifest/virtual-module.d.ts +1 -4
- package/dist/manifest/virtual-module.js +77 -80
- package/dist/preferences/index.d.ts +1 -2
- package/dist/prefetch/index.d.ts +0 -10
- package/dist/prefetch/index.js +1 -1
- package/dist/prerender/routing.d.ts +5 -7
- package/dist/prerender/routing.js +6 -17
- package/dist/runtime/server/astro-global.d.ts +2 -2
- package/dist/runtime/server/astro-global.js +86 -24
- package/dist/runtime/server/render/server-islands.js +2 -2
- package/dist/runtime/server/transition.d.ts +1 -0
- package/dist/transitions/events.d.ts +7 -0
- package/dist/transitions/router.js +7 -3
- package/dist/transitions/vite-plugin-transitions.js +1 -4
- package/dist/types/astro.d.ts +10 -8
- package/dist/types/public/common.d.ts +1 -3
- package/dist/types/public/config.d.ts +364 -415
- package/dist/types/public/context.d.ts +21 -52
- package/dist/types/public/index.d.ts +2 -1
- package/dist/types/public/integrations.d.ts +23 -18
- package/dist/types/public/internal.d.ts +3 -18
- package/dist/types/public/preview.d.ts +6 -0
- package/dist/virtual-modules/i18n.d.ts +10 -2
- package/dist/virtual-modules/i18n.js +16 -7
- package/dist/virtual-modules/live-config.d.ts +1 -3
- package/dist/virtual-modules/live-config.js +1 -5
- package/dist/virtual-modules/middleware.d.ts +2 -1
- package/dist/virtual-modules/middleware.js +2 -1
- package/dist/vite-plugin-adapter-config/index.js +3 -2
- package/dist/vite-plugin-app/app.d.ts +47 -0
- package/dist/vite-plugin-app/app.js +410 -0
- package/dist/vite-plugin-app/createAstroServerApp.d.ts +8 -0
- package/dist/vite-plugin-app/createAstroServerApp.js +56 -0
- package/dist/vite-plugin-app/index.d.ts +3 -0
- package/dist/vite-plugin-app/index.js +16 -0
- package/dist/{vite-plugin-astro-server → vite-plugin-app}/pipeline.d.ts +5 -7
- package/dist/vite-plugin-app/pipeline.js +166 -0
- package/dist/vite-plugin-astro/index.js +11 -13
- package/dist/vite-plugin-astro-server/controller.d.ts +1 -1
- package/dist/vite-plugin-astro-server/error.d.ts +3 -4
- package/dist/vite-plugin-astro-server/error.js +2 -5
- package/dist/vite-plugin-astro-server/index.d.ts +1 -2
- package/dist/vite-plugin-astro-server/index.js +6 -4
- package/dist/vite-plugin-astro-server/metadata.js +1 -1
- package/dist/vite-plugin-astro-server/plugin.d.ts +4 -7
- package/dist/vite-plugin-astro-server/plugin.js +53 -96
- package/dist/vite-plugin-astro-server/server-state.d.ts +1 -1
- package/dist/vite-plugin-astro-server/util.d.ts +0 -2
- package/dist/vite-plugin-astro-server/util.js +1 -2
- package/dist/vite-plugin-astro-server/vite.d.ts +2 -2
- package/dist/vite-plugin-astro-server/vite.js +7 -7
- package/dist/vite-plugin-config-alias/index.js +40 -32
- package/dist/vite-plugin-css/index.d.ts +18 -0
- package/dist/vite-plugin-css/index.js +134 -0
- package/dist/vite-plugin-css/util.d.ts +5 -0
- package/dist/vite-plugin-css/util.js +8 -0
- package/dist/vite-plugin-environment/index.d.ts +15 -0
- package/dist/vite-plugin-environment/index.js +77 -0
- package/dist/vite-plugin-head/index.d.ts +1 -2
- package/dist/vite-plugin-head/index.js +42 -58
- package/dist/vite-plugin-hmr-reload/index.js +2 -1
- package/dist/vite-plugin-markdown/index.js +0 -1
- package/dist/vite-plugin-pages/const.d.ts +2 -0
- package/dist/vite-plugin-pages/const.js +6 -0
- package/dist/vite-plugin-pages/index.d.ts +2 -0
- package/dist/vite-plugin-pages/index.js +7 -0
- package/dist/vite-plugin-pages/page.d.ts +7 -0
- package/dist/vite-plugin-pages/page.js +48 -0
- package/dist/vite-plugin-pages/pages.d.ts +8 -0
- package/dist/vite-plugin-pages/pages.js +57 -0
- package/dist/vite-plugin-pages/util.d.ts +8 -0
- package/dist/vite-plugin-pages/util.js +15 -0
- package/dist/vite-plugin-renderers/index.d.ts +9 -0
- package/dist/vite-plugin-renderers/index.js +40 -0
- package/dist/vite-plugin-routes/index.d.ts +14 -0
- package/dist/vite-plugin-routes/index.js +177 -0
- package/dist/vite-plugin-scripts/index.js +2 -6
- package/dist/vite-plugin-scripts/page-ssr.js +3 -2
- package/dist/zod.d.ts +2 -2
- package/dist/zod.js +2 -2
- package/package.json +14 -15
- package/templates/content/module.mjs +9 -63
- package/templates/content/types.d.ts +32 -78
- package/types/actions.d.ts +1 -5
- package/types/content.d.ts +9 -11
- package/types/transitions.d.ts +25 -0
- package/dist/actions/loadActions.d.ts +0 -8
- package/dist/actions/loadActions.js +0 -13
- package/dist/actions/runtime/route.d.ts +0 -2
- package/dist/actions/runtime/shared.d.ts +0 -60
- package/dist/actions/runtime/shared.js +0 -296
- package/dist/actions/runtime/utils.d.ts +0 -31
- package/dist/actions/runtime/utils.js +0 -16
- package/dist/actions/runtime/virtual.d.ts +0 -4
- package/dist/actions/runtime/virtual.js +0 -127
- package/dist/assets/utils/node/emitAsset.d.ts +0 -29
- package/dist/assets/utils/transformToPath.js +0 -32
- package/dist/config/vite-plugin-content-listen.d.ts +0 -17
- package/dist/config/vite-plugin-content-listen.js +0 -26
- package/dist/container/polyfill.d.ts +0 -1
- package/dist/container/polyfill.js +0 -2
- package/dist/core/build/css-asset-name.d.ts +0 -9
- package/dist/core/build/css-asset-name.js +0 -89
- package/dist/core/build/plugin.d.ts +0 -43
- package/dist/core/build/plugin.js +0 -61
- package/dist/core/build/plugins/plugin-actions.d.ts +0 -4
- package/dist/core/build/plugins/plugin-actions.js +0 -16
- package/dist/core/build/plugins/plugin-chunks.d.ts +0 -2
- package/dist/core/build/plugins/plugin-chunks.js +0 -33
- package/dist/core/build/plugins/plugin-pages.d.ts +0 -6
- package/dist/core/build/plugins/plugin-pages.js +0 -66
- package/dist/core/build/plugins/plugin-renderers.d.ts +0 -5
- package/dist/core/build/plugins/plugin-renderers.js +0 -54
- package/dist/core/middleware/loadMiddleware.d.ts +0 -7
- package/dist/core/middleware/loadMiddleware.js +0 -14
- package/dist/core/polyfill.d.ts +0 -5
- package/dist/core/polyfill.js +0 -17
- package/dist/core/redirects/helpers.d.ts +0 -7
- package/dist/core/redirects/helpers.js +0 -10
- package/dist/core/routing/manifest/serialization.d.ts +0 -5
- package/dist/core/routing/manifest/serialization.js +0 -37
- package/dist/prerender/metadata.d.ts +0 -8
- package/dist/prerender/metadata.js +0 -18
- package/dist/vite-plugin-astro-postprocess/index.d.ts +0 -2
- package/dist/vite-plugin-astro-postprocess/index.js +0 -48
- package/dist/vite-plugin-astro-server/css.d.ts +0 -13
- package/dist/vite-plugin-astro-server/css.js +0 -48
- package/dist/vite-plugin-astro-server/pipeline.js +0 -166
- package/dist/vite-plugin-astro-server/request.d.ts +0 -14
- package/dist/vite-plugin-astro-server/request.js +0 -73
- package/dist/vite-plugin-astro-server/route.d.ts +0 -25
- package/dist/vite-plugin-astro-server/route.js +0 -283
- package/dist/vite-plugin-scanner/index.d.ts +0 -10
- package/dist/vite-plugin-scanner/index.js +0 -87
- package/dist/vite-plugin-ssr-manifest/index.d.ts +0 -2
- package/dist/vite-plugin-ssr-manifest/index.js +0 -26
package/dist/content/utils.d.ts
CHANGED
|
@@ -1,420 +1,66 @@
|
|
|
1
1
|
import fsMod from 'node:fs';
|
|
2
2
|
import type { PluginContext } from 'rollup';
|
|
3
|
-
import type {
|
|
4
|
-
import
|
|
3
|
+
import type { RunnableDevEnvironment } from 'vite';
|
|
4
|
+
import * as z from 'zod/v4';
|
|
5
5
|
import type { Logger } from '../core/logger/core.js';
|
|
6
6
|
import type { AstroSettings } from '../types/astro.js';
|
|
7
7
|
import type { AstroConfig } from '../types/public/config.js';
|
|
8
8
|
import type { ContentEntryType, DataEntryType } from '../types/public/content.js';
|
|
9
9
|
import { type CONTENT_FLAGS } from './consts.js';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* This is used internally to resolve entry imports when using `getEntry()`.
|
|
13
|
-
* @see `templates/content/module.mjs`
|
|
14
|
-
*/
|
|
15
|
-
export type ContentLookupMap = {
|
|
16
|
-
[collectionName: string]: {
|
|
17
|
-
type: 'content' | 'data';
|
|
18
|
-
entries: {
|
|
19
|
-
[lookupId: string]: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export declare const loaderReturnSchema: z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
10
|
+
import type { LoaderContext } from './loaders/types.js';
|
|
11
|
+
export declare const loaderReturnSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
24
12
|
id: z.ZodString;
|
|
25
|
-
},
|
|
26
|
-
id: z.ZodString;
|
|
27
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
28
|
-
id: z.ZodString;
|
|
29
|
-
}, z.ZodTypeAny, "passthrough">>, "many">, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
30
|
-
id: z.ZodOptional<z.ZodString>;
|
|
31
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
13
|
+
}, z.core.$loose>>, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
32
14
|
id: z.ZodOptional<z.ZodString>;
|
|
33
|
-
}, z.
|
|
34
|
-
|
|
35
|
-
}, z.ZodTypeAny, "passthrough">>>]>;
|
|
36
|
-
declare const collectionConfigParser: z.ZodUnion<[z.ZodObject<{
|
|
37
|
-
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"content">>>;
|
|
38
|
-
schema: z.ZodOptional<z.ZodAny>;
|
|
39
|
-
}, "strip", z.ZodTypeAny, {
|
|
40
|
-
type: "content";
|
|
41
|
-
schema?: any;
|
|
42
|
-
}, {
|
|
43
|
-
type?: "content" | undefined;
|
|
44
|
-
schema?: any;
|
|
45
|
-
}>, z.ZodObject<{
|
|
46
|
-
type: z.ZodLiteral<"data">;
|
|
47
|
-
schema: z.ZodOptional<z.ZodAny>;
|
|
48
|
-
}, "strip", z.ZodTypeAny, {
|
|
49
|
-
type: "data";
|
|
50
|
-
schema?: any;
|
|
51
|
-
}, {
|
|
52
|
-
type: "data";
|
|
53
|
-
schema?: any;
|
|
54
|
-
}>, z.ZodObject<{
|
|
15
|
+
}, z.core.$loose>>]>;
|
|
16
|
+
declare const collectionConfigParser: z.ZodUnion<readonly [z.ZodObject<{
|
|
55
17
|
type: z.ZodLiteral<"content_layer">;
|
|
56
18
|
schema: z.ZodOptional<z.ZodAny>;
|
|
57
|
-
loader: z.ZodUnion<[z.ZodFunction<z.
|
|
19
|
+
loader: z.ZodUnion<readonly [z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>, z.ZodObject<{
|
|
58
20
|
name: z.ZodString;
|
|
59
|
-
load: z.ZodFunction<z.ZodTuple<[z.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
generateDigest: (args_0: any) => unknown;
|
|
74
|
-
config?: any;
|
|
75
|
-
meta?: any;
|
|
76
|
-
logger?: any;
|
|
77
|
-
watcher?: any;
|
|
78
|
-
parseData?: any;
|
|
79
|
-
store?: any;
|
|
80
|
-
entryTypes?: any;
|
|
81
|
-
renderMarkdown?: any;
|
|
82
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
83
|
-
}, {
|
|
84
|
-
collection: string;
|
|
85
|
-
generateDigest: (args_0: any) => unknown;
|
|
86
|
-
config?: any;
|
|
87
|
-
meta?: any;
|
|
88
|
-
logger?: any;
|
|
89
|
-
watcher?: any;
|
|
90
|
-
parseData?: any;
|
|
91
|
-
store?: any;
|
|
92
|
-
entryTypes?: any;
|
|
93
|
-
renderMarkdown?: any;
|
|
94
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
95
|
-
}>], null>, z.ZodUnknown>;
|
|
96
|
-
schema: z.ZodOptional<z.ZodAny>;
|
|
97
|
-
render: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodUnknown>>;
|
|
98
|
-
}, "strip", z.ZodTypeAny, {
|
|
99
|
-
name: string;
|
|
100
|
-
load: (args_0: {
|
|
101
|
-
collection: string;
|
|
102
|
-
generateDigest: (args_0: any) => unknown;
|
|
103
|
-
config?: any;
|
|
104
|
-
meta?: any;
|
|
105
|
-
logger?: any;
|
|
106
|
-
watcher?: any;
|
|
107
|
-
parseData?: any;
|
|
108
|
-
store?: any;
|
|
109
|
-
entryTypes?: any;
|
|
110
|
-
renderMarkdown?: any;
|
|
111
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
112
|
-
}) => unknown;
|
|
113
|
-
schema?: any;
|
|
114
|
-
render?: ((args_0: any) => unknown) | undefined;
|
|
115
|
-
}, {
|
|
116
|
-
name: string;
|
|
117
|
-
load: (args_0: {
|
|
118
|
-
collection: string;
|
|
119
|
-
generateDigest: (args_0: any) => unknown;
|
|
120
|
-
config?: any;
|
|
121
|
-
meta?: any;
|
|
122
|
-
logger?: any;
|
|
123
|
-
watcher?: any;
|
|
124
|
-
parseData?: any;
|
|
125
|
-
store?: any;
|
|
126
|
-
entryTypes?: any;
|
|
127
|
-
renderMarkdown?: any;
|
|
128
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
129
|
-
}) => unknown;
|
|
130
|
-
schema?: any;
|
|
131
|
-
render?: ((args_0: any) => unknown) | undefined;
|
|
132
|
-
}>]>;
|
|
133
|
-
/** deprecated */
|
|
134
|
-
_legacy: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
-
}, "strip", z.ZodTypeAny, {
|
|
136
|
-
type: "content_layer";
|
|
137
|
-
loader: ((...args: unknown[]) => unknown) | {
|
|
138
|
-
name: string;
|
|
139
|
-
load: (args_0: {
|
|
140
|
-
collection: string;
|
|
141
|
-
generateDigest: (args_0: any) => unknown;
|
|
142
|
-
config?: any;
|
|
143
|
-
meta?: any;
|
|
144
|
-
logger?: any;
|
|
145
|
-
watcher?: any;
|
|
146
|
-
parseData?: any;
|
|
147
|
-
store?: any;
|
|
148
|
-
entryTypes?: any;
|
|
149
|
-
renderMarkdown?: any;
|
|
150
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
151
|
-
}) => unknown;
|
|
152
|
-
schema?: any;
|
|
153
|
-
render?: ((args_0: any) => unknown) | undefined;
|
|
154
|
-
};
|
|
155
|
-
schema?: any;
|
|
156
|
-
_legacy?: boolean | undefined;
|
|
157
|
-
}, {
|
|
158
|
-
type: "content_layer";
|
|
159
|
-
loader: ((...args: unknown[]) => unknown) | {
|
|
160
|
-
name: string;
|
|
161
|
-
load: (args_0: {
|
|
162
|
-
collection: string;
|
|
163
|
-
generateDigest: (args_0: any) => unknown;
|
|
164
|
-
config?: any;
|
|
165
|
-
meta?: any;
|
|
166
|
-
logger?: any;
|
|
167
|
-
watcher?: any;
|
|
168
|
-
parseData?: any;
|
|
169
|
-
store?: any;
|
|
170
|
-
entryTypes?: any;
|
|
171
|
-
renderMarkdown?: any;
|
|
172
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
173
|
-
}) => unknown;
|
|
174
|
-
schema?: any;
|
|
175
|
-
render?: ((args_0: any) => unknown) | undefined;
|
|
176
|
-
};
|
|
177
|
-
schema?: any;
|
|
178
|
-
_legacy?: boolean | undefined;
|
|
179
|
-
}>, z.ZodObject<{
|
|
21
|
+
load: z.ZodFunction<z.ZodTuple<readonly [z.ZodCustom<LoaderContext, LoaderContext>], null>, z.ZodCustom<void | {
|
|
22
|
+
schema?: any;
|
|
23
|
+
types?: string;
|
|
24
|
+
}, void | {
|
|
25
|
+
schema?: any;
|
|
26
|
+
types?: string;
|
|
27
|
+
}>>;
|
|
28
|
+
schema: z.ZodOptional<z.ZodPipe<z.ZodAny, z.ZodTransform<any, any>>>;
|
|
29
|
+
createSchema: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
|
|
30
|
+
schema: z.ZodCustom<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
31
|
+
types: z.ZodString;
|
|
32
|
+
}, z.core.$strip>>>>;
|
|
33
|
+
}, z.core.$strip>]>;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
180
35
|
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"live">>>;
|
|
181
36
|
schema: z.ZodOptional<z.ZodAny>;
|
|
182
|
-
loader: z.ZodFunction<z.
|
|
183
|
-
},
|
|
184
|
-
type: "live";
|
|
185
|
-
loader: (...args: unknown[]) => unknown;
|
|
186
|
-
schema?: any;
|
|
187
|
-
}, {
|
|
188
|
-
loader: (...args: unknown[]) => unknown;
|
|
189
|
-
type?: "live" | undefined;
|
|
190
|
-
schema?: any;
|
|
191
|
-
}>]>;
|
|
37
|
+
loader: z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
38
|
+
}, z.core.$strip>]>;
|
|
192
39
|
declare const contentConfigParser: z.ZodObject<{
|
|
193
|
-
collections: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
194
|
-
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"content">>>;
|
|
195
|
-
schema: z.ZodOptional<z.ZodAny>;
|
|
196
|
-
}, "strip", z.ZodTypeAny, {
|
|
197
|
-
type: "content";
|
|
198
|
-
schema?: any;
|
|
199
|
-
}, {
|
|
200
|
-
type?: "content" | undefined;
|
|
201
|
-
schema?: any;
|
|
202
|
-
}>, z.ZodObject<{
|
|
203
|
-
type: z.ZodLiteral<"data">;
|
|
204
|
-
schema: z.ZodOptional<z.ZodAny>;
|
|
205
|
-
}, "strip", z.ZodTypeAny, {
|
|
206
|
-
type: "data";
|
|
207
|
-
schema?: any;
|
|
208
|
-
}, {
|
|
209
|
-
type: "data";
|
|
210
|
-
schema?: any;
|
|
211
|
-
}>, z.ZodObject<{
|
|
40
|
+
collections: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
212
41
|
type: z.ZodLiteral<"content_layer">;
|
|
213
42
|
schema: z.ZodOptional<z.ZodAny>;
|
|
214
|
-
loader: z.ZodUnion<[z.ZodFunction<z.
|
|
43
|
+
loader: z.ZodUnion<readonly [z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>, z.ZodObject<{
|
|
215
44
|
name: z.ZodString;
|
|
216
|
-
load: z.ZodFunction<z.ZodTuple<[z.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
generateDigest: (args_0: any) => unknown;
|
|
231
|
-
config?: any;
|
|
232
|
-
meta?: any;
|
|
233
|
-
logger?: any;
|
|
234
|
-
watcher?: any;
|
|
235
|
-
parseData?: any;
|
|
236
|
-
store?: any;
|
|
237
|
-
entryTypes?: any;
|
|
238
|
-
renderMarkdown?: any;
|
|
239
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
240
|
-
}, {
|
|
241
|
-
collection: string;
|
|
242
|
-
generateDigest: (args_0: any) => unknown;
|
|
243
|
-
config?: any;
|
|
244
|
-
meta?: any;
|
|
245
|
-
logger?: any;
|
|
246
|
-
watcher?: any;
|
|
247
|
-
parseData?: any;
|
|
248
|
-
store?: any;
|
|
249
|
-
entryTypes?: any;
|
|
250
|
-
renderMarkdown?: any;
|
|
251
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
252
|
-
}>], null>, z.ZodUnknown>;
|
|
253
|
-
schema: z.ZodOptional<z.ZodAny>;
|
|
254
|
-
render: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodUnknown>>;
|
|
255
|
-
}, "strip", z.ZodTypeAny, {
|
|
256
|
-
name: string;
|
|
257
|
-
load: (args_0: {
|
|
258
|
-
collection: string;
|
|
259
|
-
generateDigest: (args_0: any) => unknown;
|
|
260
|
-
config?: any;
|
|
261
|
-
meta?: any;
|
|
262
|
-
logger?: any;
|
|
263
|
-
watcher?: any;
|
|
264
|
-
parseData?: any;
|
|
265
|
-
store?: any;
|
|
266
|
-
entryTypes?: any;
|
|
267
|
-
renderMarkdown?: any;
|
|
268
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
269
|
-
}) => unknown;
|
|
270
|
-
schema?: any;
|
|
271
|
-
render?: ((args_0: any) => unknown) | undefined;
|
|
272
|
-
}, {
|
|
273
|
-
name: string;
|
|
274
|
-
load: (args_0: {
|
|
275
|
-
collection: string;
|
|
276
|
-
generateDigest: (args_0: any) => unknown;
|
|
277
|
-
config?: any;
|
|
278
|
-
meta?: any;
|
|
279
|
-
logger?: any;
|
|
280
|
-
watcher?: any;
|
|
281
|
-
parseData?: any;
|
|
282
|
-
store?: any;
|
|
283
|
-
entryTypes?: any;
|
|
284
|
-
renderMarkdown?: any;
|
|
285
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
286
|
-
}) => unknown;
|
|
287
|
-
schema?: any;
|
|
288
|
-
render?: ((args_0: any) => unknown) | undefined;
|
|
289
|
-
}>]>;
|
|
290
|
-
/** deprecated */
|
|
291
|
-
_legacy: z.ZodOptional<z.ZodBoolean>;
|
|
292
|
-
}, "strip", z.ZodTypeAny, {
|
|
293
|
-
type: "content_layer";
|
|
294
|
-
loader: ((...args: unknown[]) => unknown) | {
|
|
295
|
-
name: string;
|
|
296
|
-
load: (args_0: {
|
|
297
|
-
collection: string;
|
|
298
|
-
generateDigest: (args_0: any) => unknown;
|
|
299
|
-
config?: any;
|
|
300
|
-
meta?: any;
|
|
301
|
-
logger?: any;
|
|
302
|
-
watcher?: any;
|
|
303
|
-
parseData?: any;
|
|
304
|
-
store?: any;
|
|
305
|
-
entryTypes?: any;
|
|
306
|
-
renderMarkdown?: any;
|
|
307
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
308
|
-
}) => unknown;
|
|
309
|
-
schema?: any;
|
|
310
|
-
render?: ((args_0: any) => unknown) | undefined;
|
|
311
|
-
};
|
|
312
|
-
schema?: any;
|
|
313
|
-
_legacy?: boolean | undefined;
|
|
314
|
-
}, {
|
|
315
|
-
type: "content_layer";
|
|
316
|
-
loader: ((...args: unknown[]) => unknown) | {
|
|
317
|
-
name: string;
|
|
318
|
-
load: (args_0: {
|
|
319
|
-
collection: string;
|
|
320
|
-
generateDigest: (args_0: any) => unknown;
|
|
321
|
-
config?: any;
|
|
322
|
-
meta?: any;
|
|
323
|
-
logger?: any;
|
|
324
|
-
watcher?: any;
|
|
325
|
-
parseData?: any;
|
|
326
|
-
store?: any;
|
|
327
|
-
entryTypes?: any;
|
|
328
|
-
renderMarkdown?: any;
|
|
329
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
330
|
-
}) => unknown;
|
|
331
|
-
schema?: any;
|
|
332
|
-
render?: ((args_0: any) => unknown) | undefined;
|
|
333
|
-
};
|
|
334
|
-
schema?: any;
|
|
335
|
-
_legacy?: boolean | undefined;
|
|
336
|
-
}>, z.ZodObject<{
|
|
45
|
+
load: z.ZodFunction<z.ZodTuple<readonly [z.ZodCustom<LoaderContext, LoaderContext>], null>, z.ZodCustom<void | {
|
|
46
|
+
schema?: any;
|
|
47
|
+
types?: string;
|
|
48
|
+
}, void | {
|
|
49
|
+
schema?: any;
|
|
50
|
+
types?: string;
|
|
51
|
+
}>>;
|
|
52
|
+
schema: z.ZodOptional<z.ZodPipe<z.ZodAny, z.ZodTransform<any, any>>>;
|
|
53
|
+
createSchema: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodPromise<z.ZodObject<{
|
|
54
|
+
schema: z.ZodCustom<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
55
|
+
types: z.ZodString;
|
|
56
|
+
}, z.core.$strip>>>>;
|
|
57
|
+
}, z.core.$strip>]>;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
337
59
|
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"live">>>;
|
|
338
60
|
schema: z.ZodOptional<z.ZodAny>;
|
|
339
|
-
loader: z.ZodFunction<z.
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
loader: (...args: unknown[]) => unknown;
|
|
343
|
-
schema?: any;
|
|
344
|
-
}, {
|
|
345
|
-
loader: (...args: unknown[]) => unknown;
|
|
346
|
-
type?: "live" | undefined;
|
|
347
|
-
schema?: any;
|
|
348
|
-
}>]>>;
|
|
349
|
-
}, "strip", z.ZodTypeAny, {
|
|
350
|
-
collections: Record<string, {
|
|
351
|
-
type: "content";
|
|
352
|
-
schema?: any;
|
|
353
|
-
} | {
|
|
354
|
-
type: "data";
|
|
355
|
-
schema?: any;
|
|
356
|
-
} | {
|
|
357
|
-
type: "content_layer";
|
|
358
|
-
loader: ((...args: unknown[]) => unknown) | {
|
|
359
|
-
name: string;
|
|
360
|
-
load: (args_0: {
|
|
361
|
-
collection: string;
|
|
362
|
-
generateDigest: (args_0: any) => unknown;
|
|
363
|
-
config?: any;
|
|
364
|
-
meta?: any;
|
|
365
|
-
logger?: any;
|
|
366
|
-
watcher?: any;
|
|
367
|
-
parseData?: any;
|
|
368
|
-
store?: any;
|
|
369
|
-
entryTypes?: any;
|
|
370
|
-
renderMarkdown?: any;
|
|
371
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
372
|
-
}) => unknown;
|
|
373
|
-
schema?: any;
|
|
374
|
-
render?: ((args_0: any) => unknown) | undefined;
|
|
375
|
-
};
|
|
376
|
-
schema?: any;
|
|
377
|
-
_legacy?: boolean | undefined;
|
|
378
|
-
} | {
|
|
379
|
-
type: "live";
|
|
380
|
-
loader: (...args: unknown[]) => unknown;
|
|
381
|
-
schema?: any;
|
|
382
|
-
}>;
|
|
383
|
-
}, {
|
|
384
|
-
collections: Record<string, {
|
|
385
|
-
type?: "content" | undefined;
|
|
386
|
-
schema?: any;
|
|
387
|
-
} | {
|
|
388
|
-
type: "data";
|
|
389
|
-
schema?: any;
|
|
390
|
-
} | {
|
|
391
|
-
type: "content_layer";
|
|
392
|
-
loader: ((...args: unknown[]) => unknown) | {
|
|
393
|
-
name: string;
|
|
394
|
-
load: (args_0: {
|
|
395
|
-
collection: string;
|
|
396
|
-
generateDigest: (args_0: any) => unknown;
|
|
397
|
-
config?: any;
|
|
398
|
-
meta?: any;
|
|
399
|
-
logger?: any;
|
|
400
|
-
watcher?: any;
|
|
401
|
-
parseData?: any;
|
|
402
|
-
store?: any;
|
|
403
|
-
entryTypes?: any;
|
|
404
|
-
renderMarkdown?: any;
|
|
405
|
-
refreshContextData?: Record<string, unknown> | undefined;
|
|
406
|
-
}) => unknown;
|
|
407
|
-
schema?: any;
|
|
408
|
-
render?: ((args_0: any) => unknown) | undefined;
|
|
409
|
-
};
|
|
410
|
-
schema?: any;
|
|
411
|
-
_legacy?: boolean | undefined;
|
|
412
|
-
} | {
|
|
413
|
-
loader: (...args: unknown[]) => unknown;
|
|
414
|
-
type?: "live" | undefined;
|
|
415
|
-
schema?: any;
|
|
416
|
-
}>;
|
|
417
|
-
}>;
|
|
61
|
+
loader: z.ZodFunction<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
62
|
+
}, z.core.$strip>]>>;
|
|
63
|
+
}, z.core.$strip>;
|
|
418
64
|
export type CollectionConfig = z.infer<typeof collectionConfigParser>;
|
|
419
65
|
export type ContentConfig = z.infer<typeof contentConfigParser> & {
|
|
420
66
|
digest?: string;
|
|
@@ -429,21 +75,12 @@ export declare function parseEntrySlug({ id, collection, generatedSlug, frontmat
|
|
|
429
75
|
generatedSlug: string;
|
|
430
76
|
frontmatterSlug?: unknown;
|
|
431
77
|
}): string;
|
|
432
|
-
export declare function
|
|
78
|
+
export declare function getEntryData<TInputData extends Record<string, unknown> = Record<string, unknown>, TOutputData extends TInputData = TInputData>(entry: {
|
|
433
79
|
id: string;
|
|
434
80
|
collection: string;
|
|
435
81
|
unvalidatedData: TInputData;
|
|
436
82
|
_internal: EntryInternal;
|
|
437
|
-
}, collectionConfig: CollectionConfig, shouldEmitFile: boolean,
|
|
438
|
-
data: TOutputData;
|
|
439
|
-
imageImports: Array<string>;
|
|
440
|
-
}>;
|
|
441
|
-
export declare function getEntryData(entry: {
|
|
442
|
-
id: string;
|
|
443
|
-
collection: string;
|
|
444
|
-
unvalidatedData: Record<string, unknown>;
|
|
445
|
-
_internal: EntryInternal;
|
|
446
|
-
}, collectionConfig: CollectionConfig, shouldEmitFile: boolean, experimentalSvgEnabled: boolean, pluginContext?: PluginContext): Promise<Record<string, unknown>>;
|
|
83
|
+
}, collectionConfig: CollectionConfig, shouldEmitFile: boolean, pluginContext?: PluginContext): Promise<TOutputData>;
|
|
447
84
|
export declare function getContentEntryExts(settings: Pick<AstroSettings, 'contentEntryTypes'>): string[];
|
|
448
85
|
export declare function getDataEntryExts(settings: Pick<AstroSettings, 'dataEntryTypes'>): string[];
|
|
449
86
|
export declare function getEntryConfigByExtMap<TEntryType extends ContentEntryType | DataEntryType>(entryTypes: TEntryType[]): Map<string, TEntryType>;
|
|
@@ -484,7 +121,7 @@ export declare function isDeferredModule(viteId: string): boolean;
|
|
|
484
121
|
export declare function reloadContentConfigObserver({ observer, ...loadContentConfigOpts }: {
|
|
485
122
|
fs: typeof fsMod;
|
|
486
123
|
settings: AstroSettings;
|
|
487
|
-
|
|
124
|
+
environment: RunnableDevEnvironment;
|
|
488
125
|
observer?: ContentObservable;
|
|
489
126
|
}): Promise<void>;
|
|
490
127
|
type ContentCtx = {
|
|
@@ -521,7 +158,7 @@ export type ContentPaths = {
|
|
|
521
158
|
url: URL;
|
|
522
159
|
};
|
|
523
160
|
};
|
|
524
|
-
export declare function getContentPaths({ srcDir,
|
|
161
|
+
export declare function getContentPaths({ srcDir, root }: Pick<AstroConfig, 'root' | 'srcDir'>, fs?: typeof fsMod): ContentPaths;
|
|
525
162
|
/**
|
|
526
163
|
* Check for slug in content entry frontmatter and validate the type,
|
|
527
164
|
* falling back to the `generatedSlug` if none is found.
|
|
@@ -534,9 +171,7 @@ export declare function getEntrySlug({ id, collection, generatedSlug, contentEnt
|
|
|
534
171
|
fileUrl: URL;
|
|
535
172
|
contentEntryType: Pick<ContentEntryType, 'getEntryInfo'>;
|
|
536
173
|
}): Promise<string>;
|
|
537
|
-
export declare function getExtGlob(exts: string[]): string;
|
|
538
174
|
export declare function hasAssetPropagationFlag(id: string): boolean;
|
|
539
|
-
export declare function globWithUnderscoresIgnored(relContentDir: string, exts: string[]): string[];
|
|
540
175
|
/**
|
|
541
176
|
* Unlike `path.posix.relative`, this function will accept a platform path and return a posix path.
|
|
542
177
|
*/
|