astro 6.0.0-alpha.0 → 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-jsx.d.ts +11 -0
- package/client.d.ts +17 -41
- 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 -18
- package/dist/actions/runtime/server.js +162 -82
- package/dist/actions/runtime/types.d.ts +64 -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 +12 -10
- package/dist/assets/endpoint/config.js +2 -2
- package/dist/assets/endpoint/dev.js +7 -6
- package/dist/assets/fonts/config.d.ts +91 -350
- package/dist/assets/fonts/config.js +35 -136
- package/dist/assets/fonts/constants.js +1 -1
- package/dist/assets/fonts/core/dedupe-font-faces.d.ts +2 -0
- package/dist/assets/fonts/core/dedupe-font-faces.js +30 -0
- package/dist/assets/fonts/definitions.d.ts +9 -22
- package/dist/assets/fonts/infra/build-remote-font-provider-mod-resolver.d.ts +4 -0
- package/dist/assets/fonts/infra/build-remote-font-provider-mod-resolver.js +8 -0
- package/dist/assets/fonts/infra/build-url-proxy-hash-resolver.d.ts +15 -0
- package/dist/assets/fonts/infra/build-url-proxy-hash-resolver.js +20 -0
- package/dist/assets/fonts/infra/build-url-resolver.d.ts +12 -0
- package/dist/assets/fonts/infra/build-url-resolver.js +40 -0
- package/dist/assets/fonts/infra/cached-font-fetcher.d.ts +11 -0
- package/dist/assets/fonts/infra/cached-font-fetcher.js +42 -0
- package/dist/assets/fonts/infra/capsize-font-metrics-resolver.d.ts +18 -0
- package/dist/assets/fonts/infra/capsize-font-metrics-resolver.js +71 -0
- package/dist/assets/fonts/infra/data-collector.d.ts +10 -0
- package/dist/assets/fonts/infra/data-collector.js +35 -0
- package/dist/assets/fonts/infra/dev-remote-font-provider-mod-resolver.d.ts +9 -0
- package/dist/assets/fonts/infra/dev-remote-font-provider-mod-resolver.js +14 -0
- package/dist/assets/fonts/infra/dev-url-proxy-hash-resolver.d.ts +15 -0
- package/dist/assets/fonts/infra/dev-url-proxy-hash-resolver.js +37 -0
- package/dist/assets/fonts/infra/dev-url-resolver.d.ts +10 -0
- package/dist/assets/fonts/infra/dev-url-resolver.js +29 -0
- package/dist/assets/fonts/infra/font-type-extractor.d.ts +5 -0
- package/dist/assets/fonts/infra/font-type-extractor.js +21 -0
- package/dist/assets/fonts/infra/fontace-font-file-reader.d.ts +11 -0
- package/dist/assets/fonts/infra/fontace-font-file-reader.js +25 -0
- package/dist/assets/fonts/infra/levenshtein-string-matcher.d.ts +5 -0
- package/dist/assets/fonts/infra/levenshtein-string-matcher.js +145 -0
- package/dist/assets/fonts/infra/local-url-proxy-content-resolver.d.ts +4 -0
- package/dist/assets/fonts/infra/local-url-proxy-content-resolver.js +14 -0
- package/dist/assets/fonts/{implementations/css-renderer.d.ts → infra/minifiable-css-renderer.d.ts} +8 -3
- package/dist/assets/fonts/{implementations/css-renderer.js → infra/minifiable-css-renderer.js} +12 -10
- package/dist/assets/fonts/infra/remote-font-provider-resolver.d.ts +10 -0
- package/dist/assets/fonts/infra/remote-font-provider-resolver.js +49 -0
- package/dist/assets/fonts/infra/remote-url-proxy-content-resolver.d.ts +4 -0
- package/dist/assets/fonts/infra/remote-url-proxy-content-resolver.js +9 -0
- package/dist/assets/fonts/infra/require-local-provider-url-resolver.d.ts +9 -0
- package/dist/assets/fonts/infra/require-local-provider-url-resolver.js +22 -0
- package/dist/assets/fonts/infra/system-fallbacks-provider.d.ts +6 -0
- package/dist/assets/fonts/{implementations → infra}/system-fallbacks-provider.js +8 -11
- package/dist/assets/fonts/infra/unstorage-fs-storage.d.ts +11 -0
- package/dist/assets/fonts/infra/unstorage-fs-storage.js +26 -0
- package/dist/assets/fonts/infra/url-proxy.d.ts +16 -0
- package/dist/assets/fonts/infra/url-proxy.js +50 -0
- package/dist/assets/fonts/infra/xxhash-hasher.d.ts +7 -0
- package/dist/assets/fonts/infra/xxhash-hasher.js +18 -0
- package/dist/assets/fonts/orchestrate.d.ts +1 -2
- package/dist/assets/fonts/orchestrate.js +50 -17
- package/dist/assets/fonts/providers/index.d.ts +6 -24
- package/dist/assets/fonts/types.d.ts +138 -8
- package/dist/assets/fonts/utils.d.ts +1 -2
- package/dist/assets/fonts/vite-plugin-fonts.js +56 -61
- package/dist/assets/services/noop.js +5 -0
- package/dist/assets/utils/index.d.ts +0 -2
- package/dist/assets/utils/index.js +0 -5
- package/dist/assets/utils/{transformToPath.d.ts → node.d.ts} +15 -1
- package/dist/assets/utils/{node/emitAsset.js → node.js} +34 -6
- package/dist/assets/utils/remotePattern.d.ts +1 -3
- package/dist/assets/utils/svg.d.ts +2 -1
- package/dist/assets/utils/svg.js +30 -4
- package/dist/assets/vite-plugin-assets.js +10 -8
- package/dist/cli/add/index.js +21 -13
- package/dist/cli/create-key/infra/crypto-key-generator.d.ts +3 -1
- package/dist/cli/create-key/infra/crypto-key-generator.js +7 -9
- package/dist/cli/definitions.d.ts +19 -2
- package/dist/cli/dev/index.js +1 -1
- package/dist/cli/docs/core/open-docs.d.ts +5 -3
- package/dist/cli/docs/core/open-docs.js +2 -9
- package/dist/cli/docs/definitions.d.ts +3 -11
- package/dist/cli/docs/domain/cloud-ide.d.ts +1 -0
- package/dist/cli/docs/domain/cloud-ide.js +0 -0
- package/dist/cli/docs/infra/process-cloud-ide-provider.d.ts +5 -0
- package/dist/cli/docs/infra/process-cloud-ide-provider.js +6 -0
- package/dist/cli/flags.d.ts +1 -0
- package/dist/cli/index.js +78 -21
- package/dist/cli/info/core/get-package-manager.d.ts +8 -0
- package/dist/cli/info/core/get-package-manager.js +37 -0
- package/dist/cli/info/core/info.d.ts +21 -0
- package/dist/cli/info/core/info.js +21 -0
- package/dist/cli/info/definitions.d.ts +30 -0
- package/dist/cli/info/definitions.js +0 -0
- package/dist/cli/info/domain/debug-info.d.ts +1 -0
- package/dist/cli/info/domain/debug-info.js +0 -0
- package/dist/cli/info/infra/bun-package-manager.d.ts +5 -0
- package/dist/cli/info/infra/bun-package-manager.js +9 -0
- package/dist/cli/info/infra/cli-astro-config-resolver.d.ts +10 -0
- package/dist/cli/info/infra/cli-astro-config-resolver.js +36 -0
- package/dist/cli/info/infra/cli-clipboard.d.ts +13 -0
- package/dist/cli/info/infra/cli-clipboard.js +78 -0
- package/dist/cli/info/infra/cli-debug-info-provider.d.ts +15 -0
- package/dist/cli/info/infra/cli-debug-info-provider.js +57 -0
- package/dist/cli/info/infra/dev-debug-info-provider.d.ts +18 -0
- package/dist/cli/info/infra/dev-debug-info-provider.js +36 -0
- package/dist/cli/info/infra/noop-package-manager.d.ts +5 -0
- package/dist/cli/info/infra/noop-package-manager.js +9 -0
- package/dist/cli/info/infra/npm-package-manager.d.ts +10 -0
- package/dist/cli/info/infra/npm-package-manager.js +32 -0
- package/dist/cli/info/infra/pnpm-package-manager.d.ts +10 -0
- package/dist/cli/info/infra/pnpm-package-manager.js +33 -0
- package/dist/cli/info/infra/process-node-version-provider.d.ts +4 -0
- package/dist/cli/info/infra/process-node-version-provider.js +6 -0
- package/dist/cli/info/infra/process-package-manager-user-agent-provider.d.ts +4 -0
- package/dist/cli/info/infra/process-package-manager-user-agent-provider.js +7 -0
- package/dist/cli/info/infra/prompts-prompt.d.ts +11 -0
- package/dist/cli/info/infra/prompts-prompt.js +25 -0
- package/dist/cli/info/infra/styled-debug-info-formatter.d.ts +10 -0
- package/dist/cli/info/infra/styled-debug-info-formatter.js +29 -0
- package/dist/cli/info/infra/yarn-package-manager.d.ts +10 -0
- package/dist/cli/info/infra/yarn-package-manager.js +34 -0
- package/dist/cli/infra/build-time-astro-version-provider.d.ts +3 -1
- package/dist/cli/infra/build-time-astro-version-provider.js +4 -8
- package/dist/cli/infra/cli-command-runner.d.ts +7 -4
- package/dist/cli/infra/cli-command-runner.js +14 -10
- package/dist/cli/infra/logger-help-display.d.ts +11 -7
- package/dist/cli/infra/logger-help-display.js +62 -50
- package/dist/cli/infra/passthrough-text-styler.d.ts +9 -0
- package/dist/cli/infra/passthrough-text-styler.js +23 -0
- package/dist/cli/infra/piccolore-text-styler.d.ts +2 -0
- package/dist/cli/infra/piccolore-text-styler.js +5 -0
- package/dist/cli/infra/process-operating-system-provider.d.ts +6 -0
- package/dist/cli/infra/process-operating-system-provider.js +12 -0
- package/dist/cli/infra/tinyexec-command-executor.d.ts +6 -0
- package/dist/cli/infra/tinyexec-command-executor.js +34 -0
- package/dist/cli/install-package.js +1 -1
- package/dist/cli/preferences/index.js +6 -2
- package/dist/cli/preview/index.js +1 -1
- package/dist/cli/utils/format-version.js +1 -1
- package/dist/config/index.js +9 -5
- package/dist/container/index.js +19 -13
- 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/content-layer.js +13 -18
- package/dist/content/loaders/errors.d.ts +3 -3
- package/dist/content/loaders/errors.js +5 -2
- package/dist/content/loaders/glob.js +6 -1
- package/dist/content/loaders/types.d.ts +11 -4
- package/dist/content/runtime-assets.d.ts +4 -4
- package/dist/content/runtime-assets.js +2 -2
- package/dist/content/runtime.d.ts +21 -20
- package/dist/content/runtime.js +14 -16
- package/dist/content/types-generator.js +81 -54
- package/dist/content/utils.d.ts +46 -338
- package/dist/content/utils.js +43 -48
- 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 -4
- package/dist/content/vite-plugin-content-virtual-mod.js +10 -7
- 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 -99
- package/dist/core/app/index.js +20 -486
- 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.js +14 -13
- 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 +96 -204
- package/dist/core/build/graph.js +2 -2
- package/dist/core/build/index.js +11 -16
- package/dist/core/build/internal.d.ts +2 -27
- package/dist/core/build/internal.js +1 -44
- package/dist/core/build/page-data.js +1 -1
- 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 -129
- 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 +181 -155
- 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 -2
- package/dist/core/config/config.js +3 -3
- 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 +336 -1434
- package/dist/core/config/schemas/base.js +42 -41
- package/dist/core/config/schemas/refined.d.ts +2 -2
- package/dist/core/config/schemas/refined.js +1 -1
- package/dist/core/config/schemas/relative.d.ts +672 -1761
- 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 +11 -0
- package/dist/core/constants.js +20 -1
- package/dist/core/create-vite.d.ts +2 -6
- package/dist/core/create-vite.js +35 -43
- 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/csp/runtime.d.ts +11 -0
- package/dist/core/csp/runtime.js +35 -0
- package/dist/core/dev/container.js +13 -7
- package/dist/core/dev/dev.js +2 -2
- 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/utils.js +1 -1
- package/dist/core/errors/dev/vite.js +1 -1
- package/dist/core/errors/errors-data.d.ts +27 -7
- package/dist/core/errors/errors-data.js +17 -4
- package/dist/core/errors/errors.d.ts +3 -3
- package/dist/core/errors/errors.js +8 -8
- package/dist/core/errors/zod-error-map.d.ts +2 -2
- package/dist/core/errors/zod-error-map.js +26 -24
- package/dist/core/logger/core.js +1 -1
- package/dist/core/messages.d.ts +2 -2
- package/dist/core/messages.js +3 -3
- 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 +3 -3
- package/dist/core/middleware/index.js +1 -3
- 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 -3
- package/dist/core/preview/static-preview-server.js +11 -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 -6
- package/dist/core/render/route-cache.d.ts +3 -2
- package/dist/core/render/route-cache.js +6 -5
- package/dist/core/render-context.d.ts +6 -4
- package/dist/core/render-context.js +66 -25
- 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 +11 -14
- 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 +3 -2
- package/dist/core/server-islands/endpoint.js +40 -19
- 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 +34 -22
- package/dist/core/util/pathname.d.ts +10 -0
- package/dist/core/util/pathname.js +17 -0
- 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/schema.d.ts +21 -251
- package/dist/env/schema.js +6 -3
- package/dist/env/vite-plugin-env.js +15 -10
- 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/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 +1 -1
- package/dist/integrations/hooks.js +10 -7
- 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/prerender/routing.d.ts +5 -7
- package/dist/prerender/routing.js +6 -17
- package/dist/runtime/client/dev-toolbar/ui-library/badge.d.ts +2 -2
- package/dist/runtime/client/dev-toolbar/ui-library/button.d.ts +2 -2
- package/dist/runtime/client/dev-toolbar/ui-library/card.d.ts +2 -2
- package/dist/runtime/client/dev-toolbar/ui-library/highlight.d.ts +2 -2
- package/dist/runtime/client/dev-toolbar/ui-library/radio-checkbox.d.ts +2 -2
- package/dist/runtime/client/dev-toolbar/ui-library/select.d.ts +2 -2
- package/dist/runtime/client/dev-toolbar/ui-library/toggle.d.ts +2 -2
- package/dist/runtime/server/endpoint.js +1 -1
- package/dist/runtime/server/render/server-islands.js +5 -4
- package/dist/runtime/server/transition.d.ts +1 -0
- package/dist/template/4xx.js +3 -1
- package/dist/transitions/events.d.ts +7 -0
- package/dist/transitions/router.js +7 -3
- package/dist/transitions/swap-functions.js +4 -0
- package/dist/types/astro.d.ts +8 -6
- package/dist/types/public/config.d.ts +404 -288
- package/dist/types/public/context.d.ts +3 -4
- package/dist/types/public/index.d.ts +2 -1
- package/dist/types/public/integrations.d.ts +23 -1
- package/dist/types/public/internal.d.ts +1 -16
- 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 -1
- package/dist/virtual-modules/live-config.js +1 -1
- 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 +6 -7
- package/dist/vite-plugin-app/pipeline.js +166 -0
- package/dist/vite-plugin-astro/index.js +21 -7
- package/dist/vite-plugin-astro-server/base.js +1 -1
- 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 +54 -65
- 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-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 +34 -31
- package/templates/content/module.mjs +1 -0
- package/templates/content/types.d.ts +24 -11
- 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 -25
- 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/fonts/implementations/data-collector.d.ts +0 -3
- package/dist/assets/fonts/implementations/data-collector.js +0 -21
- package/dist/assets/fonts/implementations/error-handler.d.ts +0 -2
- package/dist/assets/fonts/implementations/error-handler.js +0 -41
- package/dist/assets/fonts/implementations/font-fetcher.d.ts +0 -8
- package/dist/assets/fonts/implementations/font-fetcher.js +0 -34
- package/dist/assets/fonts/implementations/font-file-reader.d.ts +0 -4
- package/dist/assets/fonts/implementations/font-file-reader.js +0 -26
- package/dist/assets/fonts/implementations/font-metrics-resolver.d.ts +0 -5
- package/dist/assets/fonts/implementations/font-metrics-resolver.js +0 -66
- package/dist/assets/fonts/implementations/font-type-extractor.d.ts +0 -4
- package/dist/assets/fonts/implementations/font-type-extractor.js +0 -22
- package/dist/assets/fonts/implementations/hasher.d.ts +0 -2
- package/dist/assets/fonts/implementations/hasher.js +0 -14
- package/dist/assets/fonts/implementations/levenshtein-string-matcher.d.ts +0 -2
- package/dist/assets/fonts/implementations/levenshtein-string-matcher.js +0 -147
- package/dist/assets/fonts/implementations/local-provider-url-resolver.d.ts +0 -5
- package/dist/assets/fonts/implementations/local-provider-url-resolver.js +0 -17
- package/dist/assets/fonts/implementations/remote-font-provider-mod-resolver.d.ts +0 -6
- package/dist/assets/fonts/implementations/remote-font-provider-mod-resolver.js +0 -20
- package/dist/assets/fonts/implementations/remote-font-provider-resolver.d.ts +0 -6
- package/dist/assets/fonts/implementations/remote-font-provider-resolver.js +0 -47
- package/dist/assets/fonts/implementations/storage.d.ts +0 -4
- package/dist/assets/fonts/implementations/storage.js +0 -14
- package/dist/assets/fonts/implementations/system-fallbacks-provider.d.ts +0 -11
- package/dist/assets/fonts/implementations/url-proxy-content-resolver.d.ts +0 -5
- package/dist/assets/fonts/implementations/url-proxy-content-resolver.js +0 -28
- package/dist/assets/fonts/implementations/url-proxy-hash-resolver.d.ts +0 -8
- package/dist/assets/fonts/implementations/url-proxy-hash-resolver.js +0 -39
- package/dist/assets/fonts/implementations/url-proxy.d.ts +0 -7
- package/dist/assets/fonts/implementations/url-proxy.js +0 -31
- package/dist/assets/fonts/implementations/url-resolver.d.ts +0 -11
- package/dist/assets/fonts/implementations/url-resolver.js +0 -55
- package/dist/assets/utils/node/emitAsset.d.ts +0 -15
- package/dist/assets/utils/transformToPath.js +0 -32
- package/dist/cli/docs/domains/platform.d.ts +0 -1
- package/dist/cli/docs/infra/process-platform-provider.d.ts +0 -2
- package/dist/cli/docs/infra/process-platform-provider.js +0 -11
- package/dist/cli/docs/infra/tinyexec-command-executor.d.ts +0 -2
- package/dist/cli/docs/infra/tinyexec-command-executor.js +0 -30
- package/dist/cli/info/index.d.ts +0 -12
- package/dist/cli/info/index.js +0 -267
- package/dist/cli/infra/picocolors-text-styler.d.ts +0 -2
- package/dist/cli/infra/picocolors-text-styler.js +0 -7
- 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/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-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 -161
- package/dist/vite-plugin-astro-server/request.d.ts +0 -14
- package/dist/vite-plugin-astro-server/request.js +0 -66
- 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/{cli/docs/domains/platform.js → actions/runtime/types.js} +0 -0
- /package/dist/assets/fonts/{logic → core}/extract-unifont-providers.d.ts +0 -0
- /package/dist/assets/fonts/{logic → core}/extract-unifont-providers.js +0 -0
- /package/dist/assets/fonts/{logic → core}/normalize-remote-font-faces.d.ts +0 -0
- /package/dist/assets/fonts/{logic → core}/normalize-remote-font-faces.js +0 -0
- /package/dist/assets/fonts/{logic → core}/optimize-fallbacks.d.ts +0 -0
- /package/dist/assets/fonts/{logic → core}/optimize-fallbacks.js +0 -0
- /package/dist/assets/fonts/{logic → core}/resolve-families.d.ts +0 -0
- /package/dist/assets/fonts/{logic → core}/resolve-families.js +0 -0
package/dist/env/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
2
|
declare const StringSchema: z.ZodObject<{
|
|
3
3
|
type: z.ZodLiteral<"string">;
|
|
4
4
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -10,29 +10,7 @@ declare const StringSchema: z.ZodObject<{
|
|
|
10
10
|
includes: z.ZodOptional<z.ZodString>;
|
|
11
11
|
startsWith: z.ZodOptional<z.ZodString>;
|
|
12
12
|
endsWith: z.ZodOptional<z.ZodString>;
|
|
13
|
-
},
|
|
14
|
-
type: "string";
|
|
15
|
-
length?: number | undefined;
|
|
16
|
-
includes?: string | undefined;
|
|
17
|
-
optional?: boolean | undefined;
|
|
18
|
-
url?: boolean | undefined;
|
|
19
|
-
endsWith?: string | undefined;
|
|
20
|
-
startsWith?: string | undefined;
|
|
21
|
-
default?: string | undefined;
|
|
22
|
-
max?: number | undefined;
|
|
23
|
-
min?: number | undefined;
|
|
24
|
-
}, {
|
|
25
|
-
type: "string";
|
|
26
|
-
length?: number | undefined;
|
|
27
|
-
includes?: string | undefined;
|
|
28
|
-
optional?: boolean | undefined;
|
|
29
|
-
url?: boolean | undefined;
|
|
30
|
-
endsWith?: string | undefined;
|
|
31
|
-
startsWith?: string | undefined;
|
|
32
|
-
default?: string | undefined;
|
|
33
|
-
max?: number | undefined;
|
|
34
|
-
min?: number | undefined;
|
|
35
|
-
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
36
14
|
export type StringSchema = z.infer<typeof StringSchema>;
|
|
37
15
|
declare const NumberSchema: z.ZodObject<{
|
|
38
16
|
type: z.ZodLiteral<"number">;
|
|
@@ -43,57 +21,21 @@ declare const NumberSchema: z.ZodObject<{
|
|
|
43
21
|
lt: z.ZodOptional<z.ZodNumber>;
|
|
44
22
|
max: z.ZodOptional<z.ZodNumber>;
|
|
45
23
|
int: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
-
},
|
|
47
|
-
type: "number";
|
|
48
|
-
optional?: boolean | undefined;
|
|
49
|
-
default?: number | undefined;
|
|
50
|
-
max?: number | undefined;
|
|
51
|
-
min?: number | undefined;
|
|
52
|
-
gt?: number | undefined;
|
|
53
|
-
lt?: number | undefined;
|
|
54
|
-
int?: boolean | undefined;
|
|
55
|
-
}, {
|
|
56
|
-
type: "number";
|
|
57
|
-
optional?: boolean | undefined;
|
|
58
|
-
default?: number | undefined;
|
|
59
|
-
max?: number | undefined;
|
|
60
|
-
min?: number | undefined;
|
|
61
|
-
gt?: number | undefined;
|
|
62
|
-
lt?: number | undefined;
|
|
63
|
-
int?: boolean | undefined;
|
|
64
|
-
}>;
|
|
24
|
+
}, z.core.$strip>;
|
|
65
25
|
export type NumberSchema = z.infer<typeof NumberSchema>;
|
|
66
26
|
declare const BooleanSchema: z.ZodObject<{
|
|
67
27
|
type: z.ZodLiteral<"boolean">;
|
|
68
28
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
69
29
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
70
|
-
},
|
|
71
|
-
type: "boolean";
|
|
72
|
-
optional?: boolean | undefined;
|
|
73
|
-
default?: boolean | undefined;
|
|
74
|
-
}, {
|
|
75
|
-
type: "boolean";
|
|
76
|
-
optional?: boolean | undefined;
|
|
77
|
-
default?: boolean | undefined;
|
|
78
|
-
}>;
|
|
30
|
+
}, z.core.$strip>;
|
|
79
31
|
declare const EnumSchema: z.ZodObject<{
|
|
80
32
|
type: z.ZodLiteral<"enum">;
|
|
81
|
-
values: z.ZodArray<z.
|
|
33
|
+
values: z.ZodArray<z.ZodString>;
|
|
82
34
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
83
35
|
default: z.ZodOptional<z.ZodString>;
|
|
84
|
-
},
|
|
85
|
-
type: "enum";
|
|
86
|
-
values: string[];
|
|
87
|
-
optional?: boolean | undefined;
|
|
88
|
-
default?: string | undefined;
|
|
89
|
-
}, {
|
|
90
|
-
type: "enum";
|
|
91
|
-
values: string[];
|
|
92
|
-
optional?: boolean | undefined;
|
|
93
|
-
default?: string | undefined;
|
|
94
|
-
}>;
|
|
36
|
+
}, z.core.$strip>;
|
|
95
37
|
export type EnumSchema = z.infer<typeof EnumSchema>;
|
|
96
|
-
declare const EnvFieldType: z.ZodUnion<[z.ZodObject<{
|
|
38
|
+
declare const EnvFieldType: z.ZodUnion<readonly [z.ZodObject<{
|
|
97
39
|
type: z.ZodLiteral<"string">;
|
|
98
40
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
99
41
|
default: z.ZodOptional<z.ZodString>;
|
|
@@ -104,29 +46,7 @@ declare const EnvFieldType: z.ZodUnion<[z.ZodObject<{
|
|
|
104
46
|
includes: z.ZodOptional<z.ZodString>;
|
|
105
47
|
startsWith: z.ZodOptional<z.ZodString>;
|
|
106
48
|
endsWith: z.ZodOptional<z.ZodString>;
|
|
107
|
-
},
|
|
108
|
-
type: "string";
|
|
109
|
-
length?: number | undefined;
|
|
110
|
-
includes?: string | undefined;
|
|
111
|
-
optional?: boolean | undefined;
|
|
112
|
-
url?: boolean | undefined;
|
|
113
|
-
endsWith?: string | undefined;
|
|
114
|
-
startsWith?: string | undefined;
|
|
115
|
-
default?: string | undefined;
|
|
116
|
-
max?: number | undefined;
|
|
117
|
-
min?: number | undefined;
|
|
118
|
-
}, {
|
|
119
|
-
type: "string";
|
|
120
|
-
length?: number | undefined;
|
|
121
|
-
includes?: string | undefined;
|
|
122
|
-
optional?: boolean | undefined;
|
|
123
|
-
url?: boolean | undefined;
|
|
124
|
-
endsWith?: string | undefined;
|
|
125
|
-
startsWith?: string | undefined;
|
|
126
|
-
default?: string | undefined;
|
|
127
|
-
max?: number | undefined;
|
|
128
|
-
min?: number | undefined;
|
|
129
|
-
}>, z.ZodObject<{
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
130
50
|
type: z.ZodLiteral<"number">;
|
|
131
51
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
132
52
|
default: z.ZodOptional<z.ZodNumber>;
|
|
@@ -135,82 +55,18 @@ declare const EnvFieldType: z.ZodUnion<[z.ZodObject<{
|
|
|
135
55
|
lt: z.ZodOptional<z.ZodNumber>;
|
|
136
56
|
max: z.ZodOptional<z.ZodNumber>;
|
|
137
57
|
int: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
-
},
|
|
139
|
-
type: "number";
|
|
140
|
-
optional?: boolean | undefined;
|
|
141
|
-
default?: number | undefined;
|
|
142
|
-
max?: number | undefined;
|
|
143
|
-
min?: number | undefined;
|
|
144
|
-
gt?: number | undefined;
|
|
145
|
-
lt?: number | undefined;
|
|
146
|
-
int?: boolean | undefined;
|
|
147
|
-
}, {
|
|
148
|
-
type: "number";
|
|
149
|
-
optional?: boolean | undefined;
|
|
150
|
-
default?: number | undefined;
|
|
151
|
-
max?: number | undefined;
|
|
152
|
-
min?: number | undefined;
|
|
153
|
-
gt?: number | undefined;
|
|
154
|
-
lt?: number | undefined;
|
|
155
|
-
int?: boolean | undefined;
|
|
156
|
-
}>, z.ZodObject<{
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
59
|
type: z.ZodLiteral<"boolean">;
|
|
158
60
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
159
61
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
-
},
|
|
161
|
-
type: "boolean";
|
|
162
|
-
optional?: boolean | undefined;
|
|
163
|
-
default?: boolean | undefined;
|
|
164
|
-
}, {
|
|
165
|
-
type: "boolean";
|
|
166
|
-
optional?: boolean | undefined;
|
|
167
|
-
default?: boolean | undefined;
|
|
168
|
-
}>, z.ZodEffects<z.ZodObject<{
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
169
63
|
type: z.ZodLiteral<"enum">;
|
|
170
|
-
values: z.ZodArray<z.
|
|
64
|
+
values: z.ZodArray<z.ZodString>;
|
|
171
65
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
172
66
|
default: z.ZodOptional<z.ZodString>;
|
|
173
|
-
},
|
|
174
|
-
type: "enum";
|
|
175
|
-
values: string[];
|
|
176
|
-
optional?: boolean | undefined;
|
|
177
|
-
default?: string | undefined;
|
|
178
|
-
}, {
|
|
179
|
-
type: "enum";
|
|
180
|
-
values: string[];
|
|
181
|
-
optional?: boolean | undefined;
|
|
182
|
-
default?: string | undefined;
|
|
183
|
-
}>, {
|
|
184
|
-
type: "enum";
|
|
185
|
-
values: string[];
|
|
186
|
-
optional?: boolean | undefined;
|
|
187
|
-
default?: string | undefined;
|
|
188
|
-
}, {
|
|
189
|
-
type: "enum";
|
|
190
|
-
values: string[];
|
|
191
|
-
optional?: boolean | undefined;
|
|
192
|
-
default?: string | undefined;
|
|
193
|
-
}>]>;
|
|
67
|
+
}, z.core.$strip>]>;
|
|
194
68
|
export type EnvFieldType = z.infer<typeof EnvFieldType>;
|
|
195
|
-
declare const EnvFieldMetadata: z.
|
|
196
|
-
context: "client";
|
|
197
|
-
access: "public";
|
|
198
|
-
} | {
|
|
199
|
-
context: "server";
|
|
200
|
-
access: "public";
|
|
201
|
-
} | {
|
|
202
|
-
context: "server";
|
|
203
|
-
access: "secret";
|
|
204
|
-
}, z.ZodTypeDef, {
|
|
205
|
-
context: "client";
|
|
206
|
-
access: "public";
|
|
207
|
-
} | {
|
|
208
|
-
context: "server";
|
|
209
|
-
access: "public";
|
|
210
|
-
} | {
|
|
211
|
-
context: "server";
|
|
212
|
-
access: "secret";
|
|
213
|
-
}>, {
|
|
69
|
+
declare const EnvFieldMetadata: z.ZodCustom<{
|
|
214
70
|
context: "client";
|
|
215
71
|
access: "public";
|
|
216
72
|
} | {
|
|
@@ -229,25 +85,7 @@ declare const EnvFieldMetadata: z.ZodEffects<z.ZodType<{
|
|
|
229
85
|
context: "server";
|
|
230
86
|
access: "secret";
|
|
231
87
|
}>;
|
|
232
|
-
export declare const EnvSchema: z.ZodRecord<z.
|
|
233
|
-
context: "client";
|
|
234
|
-
access: "public";
|
|
235
|
-
} | {
|
|
236
|
-
context: "server";
|
|
237
|
-
access: "public";
|
|
238
|
-
} | {
|
|
239
|
-
context: "server";
|
|
240
|
-
access: "secret";
|
|
241
|
-
}, z.ZodTypeDef, {
|
|
242
|
-
context: "client";
|
|
243
|
-
access: "public";
|
|
244
|
-
} | {
|
|
245
|
-
context: "server";
|
|
246
|
-
access: "public";
|
|
247
|
-
} | {
|
|
248
|
-
context: "server";
|
|
249
|
-
access: "secret";
|
|
250
|
-
}>, {
|
|
88
|
+
export declare const EnvSchema: z.ZodRecord<z.ZodString, z.ZodIntersection<z.ZodCustom<{
|
|
251
89
|
context: "client";
|
|
252
90
|
access: "public";
|
|
253
91
|
} | {
|
|
@@ -265,7 +103,7 @@ export declare const EnvSchema: z.ZodRecord<z.ZodEffects<z.ZodEffects<z.ZodStrin
|
|
|
265
103
|
} | {
|
|
266
104
|
context: "server";
|
|
267
105
|
access: "secret";
|
|
268
|
-
}>, z.ZodUnion<[z.ZodObject<{
|
|
106
|
+
}>, z.ZodUnion<readonly [z.ZodObject<{
|
|
269
107
|
type: z.ZodLiteral<"string">;
|
|
270
108
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
271
109
|
default: z.ZodOptional<z.ZodString>;
|
|
@@ -276,29 +114,7 @@ export declare const EnvSchema: z.ZodRecord<z.ZodEffects<z.ZodEffects<z.ZodStrin
|
|
|
276
114
|
includes: z.ZodOptional<z.ZodString>;
|
|
277
115
|
startsWith: z.ZodOptional<z.ZodString>;
|
|
278
116
|
endsWith: z.ZodOptional<z.ZodString>;
|
|
279
|
-
},
|
|
280
|
-
type: "string";
|
|
281
|
-
length?: number | undefined;
|
|
282
|
-
includes?: string | undefined;
|
|
283
|
-
optional?: boolean | undefined;
|
|
284
|
-
url?: boolean | undefined;
|
|
285
|
-
endsWith?: string | undefined;
|
|
286
|
-
startsWith?: string | undefined;
|
|
287
|
-
default?: string | undefined;
|
|
288
|
-
max?: number | undefined;
|
|
289
|
-
min?: number | undefined;
|
|
290
|
-
}, {
|
|
291
|
-
type: "string";
|
|
292
|
-
length?: number | undefined;
|
|
293
|
-
includes?: string | undefined;
|
|
294
|
-
optional?: boolean | undefined;
|
|
295
|
-
url?: boolean | undefined;
|
|
296
|
-
endsWith?: string | undefined;
|
|
297
|
-
startsWith?: string | undefined;
|
|
298
|
-
default?: string | undefined;
|
|
299
|
-
max?: number | undefined;
|
|
300
|
-
min?: number | undefined;
|
|
301
|
-
}>, z.ZodObject<{
|
|
117
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
302
118
|
type: z.ZodLiteral<"number">;
|
|
303
119
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
304
120
|
default: z.ZodOptional<z.ZodNumber>;
|
|
@@ -307,67 +123,21 @@ export declare const EnvSchema: z.ZodRecord<z.ZodEffects<z.ZodEffects<z.ZodStrin
|
|
|
307
123
|
lt: z.ZodOptional<z.ZodNumber>;
|
|
308
124
|
max: z.ZodOptional<z.ZodNumber>;
|
|
309
125
|
int: z.ZodOptional<z.ZodBoolean>;
|
|
310
|
-
},
|
|
311
|
-
type: "number";
|
|
312
|
-
optional?: boolean | undefined;
|
|
313
|
-
default?: number | undefined;
|
|
314
|
-
max?: number | undefined;
|
|
315
|
-
min?: number | undefined;
|
|
316
|
-
gt?: number | undefined;
|
|
317
|
-
lt?: number | undefined;
|
|
318
|
-
int?: boolean | undefined;
|
|
319
|
-
}, {
|
|
320
|
-
type: "number";
|
|
321
|
-
optional?: boolean | undefined;
|
|
322
|
-
default?: number | undefined;
|
|
323
|
-
max?: number | undefined;
|
|
324
|
-
min?: number | undefined;
|
|
325
|
-
gt?: number | undefined;
|
|
326
|
-
lt?: number | undefined;
|
|
327
|
-
int?: boolean | undefined;
|
|
328
|
-
}>, z.ZodObject<{
|
|
126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
329
127
|
type: z.ZodLiteral<"boolean">;
|
|
330
128
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
331
129
|
default: z.ZodOptional<z.ZodBoolean>;
|
|
332
|
-
},
|
|
333
|
-
type: "boolean";
|
|
334
|
-
optional?: boolean | undefined;
|
|
335
|
-
default?: boolean | undefined;
|
|
336
|
-
}, {
|
|
337
|
-
type: "boolean";
|
|
338
|
-
optional?: boolean | undefined;
|
|
339
|
-
default?: boolean | undefined;
|
|
340
|
-
}>, z.ZodEffects<z.ZodObject<{
|
|
130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
341
131
|
type: z.ZodLiteral<"enum">;
|
|
342
|
-
values: z.ZodArray<z.
|
|
132
|
+
values: z.ZodArray<z.ZodString>;
|
|
343
133
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
344
134
|
default: z.ZodOptional<z.ZodString>;
|
|
345
|
-
},
|
|
346
|
-
type: "enum";
|
|
347
|
-
values: string[];
|
|
348
|
-
optional?: boolean | undefined;
|
|
349
|
-
default?: string | undefined;
|
|
350
|
-
}, {
|
|
351
|
-
type: "enum";
|
|
352
|
-
values: string[];
|
|
353
|
-
optional?: boolean | undefined;
|
|
354
|
-
default?: string | undefined;
|
|
355
|
-
}>, {
|
|
356
|
-
type: "enum";
|
|
357
|
-
values: string[];
|
|
358
|
-
optional?: boolean | undefined;
|
|
359
|
-
default?: string | undefined;
|
|
360
|
-
}, {
|
|
361
|
-
type: "enum";
|
|
362
|
-
values: string[];
|
|
363
|
-
optional?: boolean | undefined;
|
|
364
|
-
default?: string | undefined;
|
|
365
|
-
}>]>>>;
|
|
135
|
+
}, z.core.$strip>]>>>;
|
|
366
136
|
type Prettify<T> = {
|
|
367
137
|
[K in keyof T]: T[K];
|
|
368
138
|
} & {};
|
|
369
139
|
export type EnvSchema = z.infer<typeof EnvSchema>;
|
|
370
|
-
type _Field<T extends z.ZodType> = Prettify<z.infer<typeof EnvFieldMetadata & T>>;
|
|
140
|
+
type _Field<T extends z.ZodType> = Prettify<z.infer<typeof EnvFieldMetadata> & z.infer<T>>;
|
|
371
141
|
type _FieldInput<T extends z.ZodType, TKey extends string = 'type'> = Prettify<z.infer<typeof EnvFieldMetadata> & Omit<z.infer<T>, TKey>>;
|
|
372
142
|
export type StringField = _Field<typeof StringSchema>;
|
|
373
143
|
export type StringFieldInput = _FieldInput<typeof StringSchema>;
|
package/dist/env/schema.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
2
|
const StringSchema = z.object({
|
|
3
3
|
type: z.literal("string"),
|
|
4
4
|
optional: z.boolean().optional(),
|
|
@@ -79,12 +79,15 @@ const EnvFieldMetadata = z.custom().superRefine((data, ctx) => {
|
|
|
79
79
|
ctx.addIssue({
|
|
80
80
|
code: z.ZodIssueCode.custom,
|
|
81
81
|
message: `**Invalid combination** of "access" and "context" options:
|
|
82
|
-
Secret client variables are not supported. Please review the configuration
|
|
82
|
+
Secret client variables are not supported. Please review the configuration.
|
|
83
83
|
Learn more at https://docs.astro.build/en/guides/environment-variables/#variable-types`,
|
|
84
84
|
path: ["context", "access"]
|
|
85
85
|
});
|
|
86
86
|
} else {
|
|
87
|
-
ctx.addIssue(
|
|
87
|
+
ctx.addIssue({
|
|
88
|
+
...issue,
|
|
89
|
+
code: "custom"
|
|
90
|
+
});
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
93
|
});
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from "./constants.js";
|
|
12
12
|
import { invalidVariablesToError } from "./errors.js";
|
|
13
13
|
import { getEnvFieldType, validateEnvVariable } from "./validators.js";
|
|
14
|
+
import { isAstroClientEnvironment } from "../environments.js";
|
|
14
15
|
function astroEnv({ settings, sync, envLoader }) {
|
|
15
16
|
const { schema, validateSecrets } = settings.config.env;
|
|
16
17
|
let isBuild;
|
|
@@ -21,6 +22,18 @@ function astroEnv({ settings, sync, envLoader }) {
|
|
|
21
22
|
config(_, { command }) {
|
|
22
23
|
isBuild = command === "build";
|
|
23
24
|
},
|
|
25
|
+
buildStart() {
|
|
26
|
+
if (!isBuild || populated) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const loadedEnv = envLoader.get();
|
|
30
|
+
for (const [key, value] of Object.entries(loadedEnv)) {
|
|
31
|
+
if (value !== void 0) {
|
|
32
|
+
process.env[key] = value;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
populated = true;
|
|
36
|
+
},
|
|
24
37
|
resolveId(id) {
|
|
25
38
|
if (id === CLIENT_VIRTUAL_MODULE_ID) {
|
|
26
39
|
return RESOLVED_CLIENT_VIRTUAL_MODULE_ID;
|
|
@@ -32,11 +45,11 @@ function astroEnv({ settings, sync, envLoader }) {
|
|
|
32
45
|
return RESOLVED_INTERNAL_VIRTUAL_MODULE_ID;
|
|
33
46
|
}
|
|
34
47
|
},
|
|
35
|
-
load(id
|
|
48
|
+
load(id) {
|
|
36
49
|
if (id === RESOLVED_INTERNAL_VIRTUAL_MODULE_ID) {
|
|
37
50
|
return { code: `export const schema = ${JSON.stringify(schema)};` };
|
|
38
51
|
}
|
|
39
|
-
if (id === RESOLVED_SERVER_VIRTUAL_MODULE_ID &&
|
|
52
|
+
if (id === RESOLVED_SERVER_VIRTUAL_MODULE_ID && isAstroClientEnvironment(this.environment)) {
|
|
40
53
|
throw new AstroError({
|
|
41
54
|
...AstroErrorData.ServerOnlyModule,
|
|
42
55
|
message: AstroErrorData.ServerOnlyModule.message(SERVER_VIRTUAL_MODULE_ID)
|
|
@@ -44,14 +57,6 @@ function astroEnv({ settings, sync, envLoader }) {
|
|
|
44
57
|
}
|
|
45
58
|
if (id === RESOLVED_CLIENT_VIRTUAL_MODULE_ID || id === RESOLVED_SERVER_VIRTUAL_MODULE_ID) {
|
|
46
59
|
const loadedEnv = envLoader.get();
|
|
47
|
-
if (isBuild && !populated) {
|
|
48
|
-
for (const [key, value] of Object.entries(loadedEnv)) {
|
|
49
|
-
if (value !== void 0) {
|
|
50
|
-
process.env[key] = value;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
populated = true;
|
|
54
|
-
}
|
|
55
60
|
const validatedVariables = validatePublicVariables({
|
|
56
61
|
schema,
|
|
57
62
|
loadedEnv,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { transform } from "esbuild";
|
|
2
2
|
import MagicString from "magic-string";
|
|
3
3
|
import { createFilter, isCSSRequest } from "vite";
|
|
4
|
+
import { isAstroClientEnvironment } from "../environments.js";
|
|
4
5
|
const importMetaEnvOnlyRe = /\bimport\.meta\.env\b(?!\.)/;
|
|
5
6
|
function getReferencedPrivateKeys(source, privateEnv) {
|
|
6
7
|
const references = /* @__PURE__ */ new Set();
|
|
@@ -66,8 +67,8 @@ function importMetaEnv({ envLoader }) {
|
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
},
|
|
69
|
-
transform(source, id
|
|
70
|
-
if (
|
|
70
|
+
transform(source, id) {
|
|
71
|
+
if (isAstroClientEnvironment(this.environment) || !source.includes("import.meta.env") || !filter(id) || isCSSRequest(id) || viteConfig.assetsInclude(id)) {
|
|
71
72
|
return;
|
|
72
73
|
}
|
|
73
74
|
privateEnv ??= envLoader.getPrivateEnv();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ASTRO_VITE_ENVIRONMENT_NAMES } from "./core/constants.js";
|
|
2
|
+
function isAstroServerEnvironment(environment) {
|
|
3
|
+
return environment.name === ASTRO_VITE_ENVIRONMENT_NAMES.ssr || environment.name === ASTRO_VITE_ENVIRONMENT_NAMES.prerender;
|
|
4
|
+
}
|
|
5
|
+
function isAstroClientEnvironment(environment) {
|
|
6
|
+
return environment.name === ASTRO_VITE_ENVIRONMENT_NAMES.client;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
isAstroClientEnvironment,
|
|
10
|
+
isAstroServerEnvironment
|
|
11
|
+
};
|
package/dist/events/error.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ZodError } from 'zod';
|
|
1
|
+
import type { $ZodError } from 'zod/v4/core';
|
|
2
2
|
import { type ErrorWithMetadata } from '../core/errors/index.js';
|
|
3
3
|
interface ErrorEventPayload {
|
|
4
4
|
name: string;
|
|
@@ -12,7 +12,7 @@ interface ConfigErrorEventPayload extends ErrorEventPayload {
|
|
|
12
12
|
configErrorPaths: string[];
|
|
13
13
|
}
|
|
14
14
|
export declare function eventConfigError({ err, cmd, isFatal, }: {
|
|
15
|
-
err: ZodError;
|
|
15
|
+
err: $ZodError;
|
|
16
16
|
cmd: string;
|
|
17
17
|
isFatal: boolean;
|
|
18
18
|
}): {
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { RoutingStrategies } from '../core/app/common.js';
|
|
1
2
|
import type { SSRManifest } from '../core/app/types.js';
|
|
2
3
|
import type { AstroConfig, Locales, ValidRedirectStatus } from '../types/public/config.js';
|
|
3
4
|
import type { APIContext } from '../types/public/context.js';
|
|
4
|
-
import type { RoutingStrategies } from './utils.js';
|
|
5
5
|
export declare function requestHasLocale(locales: Locales): (context: APIContext) => boolean;
|
|
6
6
|
export declare function pathHasLocale(path: string, locales: Locales): boolean;
|
|
7
7
|
type GetLocaleRelativeUrl = GetLocaleOptions & {
|
|
@@ -9,7 +9,7 @@ type GetLocaleRelativeUrl = GetLocaleOptions & {
|
|
|
9
9
|
base: string;
|
|
10
10
|
locales: Locales;
|
|
11
11
|
trailingSlash: AstroConfig['trailingSlash'];
|
|
12
|
-
format: AstroConfig['build']['format']
|
|
12
|
+
format: NonNullable<AstroConfig['build']['format']>;
|
|
13
13
|
strategy?: RoutingStrategies;
|
|
14
14
|
defaultLocale: string;
|
|
15
15
|
domains: Record<string, string> | undefined;
|
package/dist/i18n/utils.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { AstroConfig, Locales } from '../types/public/config.js';
|
|
1
|
+
import type { Locales } from '../types/public/config.js';
|
|
3
2
|
type BrowserLocale = {
|
|
4
3
|
locale: string;
|
|
5
4
|
qualityValue: number | undefined;
|
|
@@ -22,8 +21,4 @@ export declare function parseLocale(header: string): BrowserLocale[];
|
|
|
22
21
|
export declare function computePreferredLocale(request: Request, locales: Locales): string | undefined;
|
|
23
22
|
export declare function computePreferredLocaleList(request: Request, locales: Locales): string[];
|
|
24
23
|
export declare function computeCurrentLocale(pathname: string, locales: Locales, defaultLocale: string): string | undefined;
|
|
25
|
-
export type RoutingStrategies = 'manual' | 'pathname-prefix-always' | 'pathname-prefix-other-locales' | 'pathname-prefix-always-no-redirect' | 'domains-prefix-always' | 'domains-prefix-other-locales' | 'domains-prefix-always-no-redirect';
|
|
26
|
-
export declare function toRoutingStrategy(routing: NonNullable<AstroConfig['i18n']>['routing'], domains: NonNullable<AstroConfig['i18n']>['domains']): RoutingStrategies;
|
|
27
|
-
export declare function fromRoutingStrategy(strategy: RoutingStrategies, fallbackType: NonNullable<SSRManifest['i18n']>['fallbackType']): NonNullable<AstroConfig['i18n']>['routing'];
|
|
28
|
-
export declare function toFallbackType(routing: NonNullable<AstroConfig['i18n']>['routing']): 'redirect' | 'rewrite';
|
|
29
24
|
export {};
|
package/dist/i18n/utils.js
CHANGED
|
@@ -134,71 +134,9 @@ function computeCurrentLocale(pathname, locales, defaultLocale) {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
function toRoutingStrategy(routing, domains) {
|
|
138
|
-
let strategy;
|
|
139
|
-
const hasDomains = domains ? Object.keys(domains).length > 0 : false;
|
|
140
|
-
if (routing === "manual") {
|
|
141
|
-
strategy = "manual";
|
|
142
|
-
} else {
|
|
143
|
-
if (!hasDomains) {
|
|
144
|
-
if (routing?.prefixDefaultLocale === true) {
|
|
145
|
-
if (routing.redirectToDefaultLocale) {
|
|
146
|
-
strategy = "pathname-prefix-always";
|
|
147
|
-
} else {
|
|
148
|
-
strategy = "pathname-prefix-always-no-redirect";
|
|
149
|
-
}
|
|
150
|
-
} else {
|
|
151
|
-
strategy = "pathname-prefix-other-locales";
|
|
152
|
-
}
|
|
153
|
-
} else {
|
|
154
|
-
if (routing?.prefixDefaultLocale === true) {
|
|
155
|
-
if (routing.redirectToDefaultLocale) {
|
|
156
|
-
strategy = "domains-prefix-always";
|
|
157
|
-
} else {
|
|
158
|
-
strategy = "domains-prefix-always-no-redirect";
|
|
159
|
-
}
|
|
160
|
-
} else {
|
|
161
|
-
strategy = "domains-prefix-other-locales";
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return strategy;
|
|
166
|
-
}
|
|
167
|
-
const PREFIX_DEFAULT_LOCALE = /* @__PURE__ */ new Set([
|
|
168
|
-
"pathname-prefix-always",
|
|
169
|
-
"domains-prefix-always",
|
|
170
|
-
"pathname-prefix-always-no-redirect",
|
|
171
|
-
"domains-prefix-always-no-redirect"
|
|
172
|
-
]);
|
|
173
|
-
const REDIRECT_TO_DEFAULT_LOCALE = /* @__PURE__ */ new Set([
|
|
174
|
-
"pathname-prefix-always-no-redirect",
|
|
175
|
-
"domains-prefix-always-no-redirect"
|
|
176
|
-
]);
|
|
177
|
-
function fromRoutingStrategy(strategy, fallbackType) {
|
|
178
|
-
let routing;
|
|
179
|
-
if (strategy === "manual") {
|
|
180
|
-
routing = "manual";
|
|
181
|
-
} else {
|
|
182
|
-
routing = {
|
|
183
|
-
prefixDefaultLocale: PREFIX_DEFAULT_LOCALE.has(strategy),
|
|
184
|
-
redirectToDefaultLocale: !REDIRECT_TO_DEFAULT_LOCALE.has(strategy),
|
|
185
|
-
fallbackType
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
return routing;
|
|
189
|
-
}
|
|
190
|
-
function toFallbackType(routing) {
|
|
191
|
-
if (routing === "manual") {
|
|
192
|
-
return "rewrite";
|
|
193
|
-
}
|
|
194
|
-
return routing.fallbackType;
|
|
195
|
-
}
|
|
196
137
|
export {
|
|
197
138
|
computeCurrentLocale,
|
|
198
139
|
computePreferredLocale,
|
|
199
140
|
computePreferredLocaleList,
|
|
200
|
-
|
|
201
|
-
parseLocale,
|
|
202
|
-
toFallbackType,
|
|
203
|
-
toRoutingStrategy
|
|
141
|
+
parseLocale
|
|
204
142
|
};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import type * as vite from 'vite';
|
|
2
2
|
import type { AstroSettings } from '../types/astro.js';
|
|
3
|
-
import type { AstroConfig } from '../types/public/config.js';
|
|
4
3
|
type AstroInternationalization = {
|
|
5
4
|
settings: AstroSettings;
|
|
6
5
|
};
|
|
7
|
-
export interface I18nInternalConfig extends Pick<AstroConfig, 'base' | 'site' | 'trailingSlash'>, Pick<AstroConfig['build'], 'format'> {
|
|
8
|
-
i18n: AstroConfig['i18n'];
|
|
9
|
-
isBuild: boolean;
|
|
10
|
-
}
|
|
11
6
|
export default function astroInternationalization({ settings, }: AstroInternationalization): vite.Plugin;
|
|
12
7
|
export {};
|
|
@@ -4,31 +4,10 @@ const virtualModuleId = "astro:i18n";
|
|
|
4
4
|
function astroInternationalization({
|
|
5
5
|
settings
|
|
6
6
|
}) {
|
|
7
|
-
const {
|
|
8
|
-
base,
|
|
9
|
-
build: { format },
|
|
10
|
-
i18n,
|
|
11
|
-
site,
|
|
12
|
-
trailingSlash
|
|
13
|
-
} = settings.config;
|
|
7
|
+
const { i18n } = settings.config;
|
|
14
8
|
return {
|
|
15
9
|
name: "astro:i18n",
|
|
16
10
|
enforce: "pre",
|
|
17
|
-
config(_config, { command }) {
|
|
18
|
-
const i18nConfig = {
|
|
19
|
-
base,
|
|
20
|
-
format,
|
|
21
|
-
site,
|
|
22
|
-
trailingSlash,
|
|
23
|
-
i18n,
|
|
24
|
-
isBuild: command === "build"
|
|
25
|
-
};
|
|
26
|
-
return {
|
|
27
|
-
define: {
|
|
28
|
-
__ASTRO_INTERNAL_I18N_CONFIG__: JSON.stringify(i18nConfig)
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
11
|
resolveId(id) {
|
|
33
12
|
if (id === virtualModuleId) {
|
|
34
13
|
if (i18n === void 0) throw new AstroError(AstroErrorData.i18nNotEnabled);
|
|
@@ -105,5 +105,5 @@ export declare function runHookRoutesResolved({ routes, settings, logger, }: {
|
|
|
105
105
|
settings: AstroSettings;
|
|
106
106
|
logger: Logger;
|
|
107
107
|
}): Promise<void>;
|
|
108
|
-
export declare function toIntegrationResolvedRoute(route: RouteData): IntegrationResolvedRoute;
|
|
108
|
+
export declare function toIntegrationResolvedRoute(route: RouteData, trailingSlash: AstroConfig['trailingSlash']): IntegrationResolvedRoute;
|
|
109
109
|
export {};
|