@wtf/project-docs 2.3.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/.generated +14 -25
- package/api/@wtf/project-astro/README.md +42 -25
- package/api/@wtf/project-astro/config/README.md +9 -1
- package/api/@wtf/project-astro/config/functions/baseConfig.md +10 -6
- package/api/@wtf/project-astro/config/functions/baseOf.md +5 -5
- package/api/@wtf/project-astro/config/functions/siteOf.md +5 -5
- package/api/@wtf/project-astro/config/type-aliases/BaseOptions.md +21 -19
- package/api/@wtf/project-astro/config/type-aliases/Env.md +3 -3
- package/api/@wtf/project-astro/errors/classes/BrokenLinksError.md +5 -5
- package/api/@wtf/project-astro/errors/classes/InvalidRedirectError.md +6 -6
- package/api/@wtf/project-astro/errors/classes/RedirectedLinksError.md +5 -5
- package/api/@wtf/project-astro/errors/classes/SiteError.md +4 -4
- package/api/@wtf/project-astro/index/README.md +3 -1
- package/api/@wtf/project-astro/index/type-aliases/AstroPlatform.md +15 -0
- package/api/@wtf/project-astro/index/type-aliases/BrokenLink.md +3 -3
- package/api/@wtf/project-astro/index/type-aliases/IgnoredLine.md +4 -4
- package/api/@wtf/project-astro/index/type-aliases/RedirectInput.md +2 -2
- package/api/@wtf/project-astro/index/type-aliases/RedirectMatch.md +3 -3
- package/api/@wtf/project-astro/index/type-aliases/RedirectRule.md +5 -5
- package/api/@wtf/project-astro/index/type-aliases/RedirectStatus.md +1 -1
- package/api/@wtf/project-astro/index/type-aliases/RedirectedLink.md +2 -2
- package/api/@wtf/project-astro/index/type-aliases/Redirects.md +3 -3
- package/api/@wtf/project-astro/links/README.md +4 -0
- package/api/@wtf/project-astro/links/functions/brokenLinksIn.md +1 -1
- package/api/@wtf/project-astro/links/functions/links.md +15 -6
- package/api/@wtf/project-astro/links/functions/redirectedLinksIn.md +1 -1
- package/api/@wtf/project-astro/links/type-aliases/LinksOptions.md +23 -0
- package/api/@wtf/project-astro/links/variables/LINKS.md +1 -1
- package/api/@wtf/project-astro/pages/functions/fixSearchUrlsIn.md +1 -1
- package/api/@wtf/project-astro/pages/functions/moveConflictingPages.md +1 -1
- package/api/@wtf/project-astro/pages/functions/pages.md +9 -6
- package/api/@wtf/project-astro/pages/functions/prefixedLocaleOf.md +1 -1
- package/api/@wtf/project-astro/pages/functions/redirectBaseToLocaleIn.md +1 -1
- package/api/@wtf/project-astro/pages/functions/slashFolderLinksIn.md +1 -1
- package/api/@wtf/project-astro/pages/type-aliases/I18n.md +1 -1
- package/api/@wtf/project-astro/pages/type-aliases/PagesOptions.md +2 -2
- package/api/@wtf/project-astro/pages/variables/PAGES.md +1 -1
- package/api/@wtf/project-astro/preview/README.md +7 -4
- package/api/@wtf/project-astro/preview/functions/files.md +1 -1
- package/api/@wtf/project-astro/preview/functions/listen.md +1 -1
- package/api/@wtf/project-astro/preview/functions/notFound.md +1 -1
- package/api/@wtf/project-astro/preview/functions/pagesOf.md +1 -1
- package/api/@wtf/project-astro/preview/functions/previewOf.md +6 -5
- package/api/@wtf/project-astro/preview/type-aliases/FilesOptions.md +2 -2
- package/api/@wtf/project-astro/preview/type-aliases/Handler.md +1 -1
- package/api/@wtf/project-astro/preview/type-aliases/ListenOptions.md +4 -4
- package/api/@wtf/project-astro/preview/type-aliases/Listening.md +5 -5
- package/api/@wtf/project-astro/preview/type-aliases/Pages.md +3 -3
- package/api/@wtf/project-astro/preview/type-aliases/Preview.md +4 -4
- package/api/@wtf/project-astro/preview/type-aliases/PreviewOptions.md +8 -7
- package/api/@wtf/project-astro/redirects/functions/formatRedirects.md +1 -1
- package/api/@wtf/project-astro/redirects/functions/matchRedirect.md +1 -1
- package/api/@wtf/project-astro/redirects/functions/parseRedirects.md +1 -1
- package/api/@wtf/project-astro/redirects/variables/MAX_PARTS.md +1 -1
- package/api/@wtf/project-astro/redirects/variables/MAX_RULES.md +1 -1
- package/api/@wtf/project-astro/redirects/variables/MAX_SIZE.md +1 -1
- package/api/@wtf/project-astro/schema/README.md +7 -3
- package/api/@wtf/project-astro/schema/functions/astroSchemaWith.md +3 -3
- package/api/@wtf/project-astro/schema/type-aliases/AstroSection.md +11 -0
- package/api/@wtf/project-astro/schema/type-aliases/JsonSchema.md +12 -12
- package/api/@wtf/project-astro/schema/type-aliases/OptionsSchema.md +1 -1
- package/api/@wtf/project-astro/schema/variables/astroProperties.md +4 -3
- package/api/@wtf/project-astro/schema/variables/astroSchema.md +5 -5
- package/api/@wtf/project-config/README.md +40 -35
- package/api/@wtf/project-config/define/functions/defineConfig.md +1 -1
- package/api/@wtf/project-config/env/README.md +2 -2
- package/api/@wtf/project-config/env/functions/envNameOf.md +1 -1
- package/api/@wtf/project-config/env/functions/envPrefixOf.md +1 -1
- package/api/@wtf/project-config/env/functions/jsonSchemaOf.md +1 -1
- package/api/@wtf/project-config/env/functions/variablesOf.md +1 -1
- package/api/@wtf/project-config/env/functions/withEnvironment.md +1 -1
- package/api/@wtf/project-config/env/type-aliases/Environment.md +1 -1
- package/api/@wtf/project-config/env/type-aliases/EnvironmentValue.md +3 -3
- package/api/@wtf/project-config/env/type-aliases/WithEnvironment.md +3 -3
- package/api/@wtf/project-config/errors/README.md +3 -5
- package/api/@wtf/project-config/errors/classes/ConfigError.md +4 -5
- package/api/@wtf/project-config/errors/classes/ConfigFileMismatchError.md +6 -6
- package/api/@wtf/project-config/errors/classes/ConfigInCodeError.md +5 -5
- package/api/@wtf/project-config/errors/classes/ConfigPathError.md +5 -5
- package/api/@wtf/project-config/errors/classes/EnvPlaceholderUnsetError.md +6 -6
- package/api/@wtf/project-config/errors/classes/InvalidConfigFileError.md +5 -5
- package/api/@wtf/project-config/errors/classes/InvalidSectionError.md +7 -7
- package/api/@wtf/project-config/errors/classes/NamedError.md +12 -12
- package/api/@wtf/project-config/errors/classes/NoConfigFileError.md +5 -5
- package/api/@wtf/project-config/errors/classes/NoConfigValueError.md +6 -6
- package/api/@wtf/project-config/errors/classes/SyncSchemaError.md +6 -6
- package/api/@wtf/project-config/errors/classes/UnwritableConfigFileError.md +5 -5
- package/api/@wtf/project-config/errors/type-aliases/NamedErrorCode.md +1 -1
- package/api/@wtf/project-config/errors/type-aliases/NamedErrorDetails.md +9 -9
- package/api/@wtf/project-config/index/README.md +1 -3
- package/api/@wtf/project-config/index/type-aliases/ConfigDefaults.md +3 -3
- package/api/@wtf/project-config/index/type-aliases/ConfigEnvironment.md +4 -4
- package/api/@wtf/project-config/index/type-aliases/ConfigIssue.md +3 -3
- package/api/@wtf/project-config/index/type-aliases/ConfigNames.md +4 -4
- package/api/@wtf/project-config/index/type-aliases/ConfigPath.md +1 -1
- package/api/@wtf/project-config/index/type-aliases/ConfigPlatform.md +4 -4
- package/api/@wtf/project-config/index/type-aliases/ConfigSection.md +1 -1
- package/api/@wtf/project-config/index/type-aliases/ConfigSource.md +3 -3
- package/api/@wtf/project-config/index/type-aliases/ConfigWrite.md +10 -10
- package/api/@wtf/project-config/index/type-aliases/ImportModule.md +1 -1
- package/api/@wtf/project-config/index/type-aliases/JsonSchema.md +1 -1
- package/api/@wtf/project-config/index/type-aliases/LocatedConfig.md +4 -4
- package/api/@wtf/project-config/index/type-aliases/NamespaceConfig.md +2 -2
- package/api/@wtf/project-config/index/type-aliases/ResolvedConfig.md +9 -9
- package/api/@wtf/project-config/index/type-aliases/SectionSchema.md +1 -1
- package/api/@wtf/project-config/index/type-aliases/SectionsOf.md +1 -1
- package/api/@wtf/project-config/index/type-aliases/ValidateSection.md +1 -1
- package/api/@wtf/project-config/load/README.md +14 -11
- package/api/@wtf/project-config/load/functions/ignoredWarning.md +1 -1
- package/api/@wtf/project-config/load/functions/importFileModule.md +1 -1
- package/api/@wtf/project-config/load/functions/loadConfig.md +10 -11
- package/api/@wtf/project-config/load/type-aliases/LoadLayers.md +5 -5
- package/api/@wtf/project-config/load/type-aliases/LoadOptions.md +5 -4
- package/api/@wtf/project-config/load/type-aliases/LoadPlatform.md +15 -0
- package/api/@wtf/project-config/locate/README.md +6 -7
- package/api/@wtf/project-config/locate/functions/configFilesOf.md +1 -1
- package/api/@wtf/project-config/locate/functions/configNamesOf.md +1 -1
- package/api/@wtf/project-config/locate/functions/jsonFilesOf.md +3 -3
- package/api/@wtf/project-config/locate/functions/locateConfig.md +1 -1
- package/api/@wtf/project-config/locate/functions/projectRootOf.md +1 -1
- package/api/@wtf/project-config/locate/type-aliases/LocateNames.md +2 -2
- package/api/@wtf/project-config/locate/type-aliases/LocateOptions.md +3 -3
- package/api/@wtf/project-config/locate/type-aliases/NamespaceNames.md +2 -2
- package/api/@wtf/project-config/locate/variables/DEFAULT_NAMESPACE.md +1 -1
- package/api/@wtf/project-config/named/README.md +2 -2
- package/api/@wtf/project-config/named/functions/factoryOf.md +1 -1
- package/api/@wtf/project-config/named/functions/namedSchema.md +1 -1
- package/api/@wtf/project-config/named/functions/namedSetSchema.md +1 -1
- package/api/@wtf/project-config/named/functions/resolveNamed.md +1 -1
- package/api/@wtf/project-config/named/functions/resolveNamedSet.md +1 -1
- package/api/@wtf/project-config/named/type-aliases/LoadModule.md +3 -1
- package/api/@wtf/project-config/named/type-aliases/ModuleReference.md +3 -3
- package/api/@wtf/project-config/named/type-aliases/NamedCheckOptions.md +5 -5
- package/api/@wtf/project-config/named/type-aliases/NamedEntries.md +1 -1
- package/api/@wtf/project-config/named/type-aliases/NamedFactory.md +1 -1
- package/api/@wtf/project-config/named/type-aliases/NamedOptions.md +1 -1
- package/api/@wtf/project-config/named/type-aliases/NamedReference.md +1 -1
- package/api/@wtf/project-config/named/type-aliases/NamedResolveOptions.md +3 -3
- package/api/@wtf/project-config/named/type-aliases/NamedSchema.md +1 -1
- package/api/@wtf/project-config/named/type-aliases/NamedSchemaOptions.md +4 -4
- package/api/@wtf/project-config/named/type-aliases/NamedSet.md +1 -1
- package/api/@wtf/project-config/named/type-aliases/NamedSetOptions.md +2 -2
- package/api/@wtf/project-config/named/type-aliases/NamedSetSchemaOptions.md +3 -3
- package/api/@wtf/project-config/named/type-aliases/NamedSets.md +1 -1
- package/api/@wtf/project-config/named/type-aliases/NamedUse.md +1 -1
- package/api/@wtf/project-config/path/functions/configPathOf.md +1 -1
- package/api/@wtf/project-config/path/functions/textOfConfigPath.md +1 -1
- package/api/@wtf/project-config/path/functions/valueAt.md +1 -1
- package/api/@wtf/project-config/placeholder/functions/expandPlaceholders.md +1 -1
- package/api/@wtf/project-config/placeholder/functions/expandString.md +1 -1
- package/api/@wtf/project-config/schema/functions/namespaceSchema.md +1 -1
- package/api/@wtf/project-config/schema/functions/sectionIdOf.md +1 -1
- package/api/@wtf/project-config/schema/type-aliases/NamespaceSchemaOptions.md +3 -3
- package/api/@wtf/project-config/schema/variables/JSON_SCHEMA_DRAFT.md +1 -1
- package/api/@wtf/project-config/section/README.md +11 -8
- package/api/@wtf/project-config/section/functions/issuesOf.md +1 -1
- package/api/@wtf/project-config/section/functions/issuesOfSync.md +1 -1
- package/api/@wtf/project-config/section/functions/mergeSection.md +1 -1
- package/api/@wtf/project-config/section/functions/sectionOf.md +10 -10
- package/api/@wtf/project-config/section/type-aliases/Checked.md +3 -3
- package/api/@wtf/project-config/write/README.md +5 -4
- package/api/@wtf/project-config/write/functions/setConfigValue.md +1 -1
- package/api/@wtf/project-config/write/functions/unsetConfigValue.md +1 -1
- package/api/@wtf/project-config/write/type-aliases/WriteOptions.md +2 -2
- package/api/@wtf/project-oxfmt/README.md +5 -2
- package/api/@wtf/project-oxfmt/config/functions/oxfmtConfig.md +1 -1
- package/api/@wtf/project-oxfmt/config/type-aliases/OxfmtOptions.md +1 -1
- package/api/@wtf/project-oxfmt/config/variables/OXFMT_DEFAULTS.md +6 -6
- package/api/@wtf/project-oxfmt/config/variables/default.md +1 -1
- package/api/@wtf/project-oxfmt/schema/README.md +5 -2
- package/api/@wtf/project-oxfmt/schema/variables/oxfmtSchema.md +1 -1
- package/api/@wtf/project-oxlint/README.md +5 -2
- package/api/@wtf/project-oxlint/config/functions/oxlintConfig.md +1 -1
- package/api/@wtf/project-oxlint/config/type-aliases/OxlintOptions.md +1 -1
- package/api/@wtf/project-oxlint/config/variables/OXLINT_DEFAULTS.md +17 -17
- package/api/@wtf/project-oxlint/config/variables/default.md +1 -1
- package/api/@wtf/project-oxlint/schema/README.md +5 -2
- package/api/@wtf/project-oxlint/schema/variables/oxlintSchema.md +1 -1
- package/api/@wtf/project-resolve/condition/variables/SOURCE_CONDITION.md +1 -1
- package/api/@wtf/project-resolve/env/functions/isHook.md +1 -1
- package/api/@wtf/project-resolve/env/functions/optionsWithoutHook.md +1 -1
- package/api/@wtf/project-resolve/env/functions/withoutHook.md +1 -1
- package/api/@wtf/project-resolve/env/type-aliases/Env.md +1 -1
- package/api/@wtf/project-resolve/errors/classes/ResolveError.md +4 -4
- package/api/@wtf/project-resolve/errors/classes/UnreadableWorkspaceError.md +6 -6
- package/api/@wtf/project-resolve/errors/classes/WorkspaceError.md +5 -5
- package/api/@wtf/project-resolve/hooks/functions/candidatesOf.md +1 -1
- package/api/@wtf/project-resolve/hooks/functions/sourcesHookOf.md +1 -1
- package/api/@wtf/project-resolve/hooks/functions/sourcesOf.md +1 -1
- package/api/@wtf/project-resolve/hooks/variables/resolveTypeScript.md +1 -1
- package/api/@wtf/project-resolve/node/functions/nodePlatform.md +5 -5
- package/api/@wtf/project-resolve/register/variables/REGISTERED.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/filesOf.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/packagesOf.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/workspaceAt.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/workspaceOf.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/workspaceRootAbove.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/workspaceRootOf.md +1 -1
- package/api/@wtf/project-resolve/workspace/type-aliases/Agent.md +1 -1
- package/api/@wtf/project-resolve/workspace/type-aliases/DirectoryEntry.md +4 -4
- package/api/@wtf/project-resolve/workspace/type-aliases/FileContents.md +3 -3
- package/api/@wtf/project-resolve/workspace/type-aliases/PackageManager.md +4 -4
- package/api/@wtf/project-resolve/workspace/type-aliases/PackageManagerName.md +1 -1
- package/api/@wtf/project-resolve/workspace/type-aliases/ProcessWorkspaceOptions.md +1 -1
- package/api/@wtf/project-resolve/workspace/type-aliases/Workspace.md +5 -5
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceDirectoryHandle.md +6 -6
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceFileHandle.md +3 -3
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceFiles.md +6 -6
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceOptions.md +2 -2
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspacePackage.md +4 -4
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspacePaths.md +7 -7
- package/api/@wtf/project-typedoc/README.md +17 -3
- package/api/@wtf/project-typedoc/config/README.md +20 -4
- package/api/@wtf/project-typedoc/config/functions/gitRevisionOf.md +6 -6
- package/api/@wtf/project-typedoc/config/functions/typedocConfig.md +5 -5
- package/api/@wtf/project-typedoc/config/type-aliases/RevisionSources.md +7 -7
- package/api/@wtf/project-typedoc/config/type-aliases/TypedocConfig.md +1 -1
- package/api/@wtf/project-typedoc/config/type-aliases/TypedocOptions.md +8 -6
- package/api/@wtf/project-typedoc/config/type-aliases/TypedocPlatform.md +18 -0
- package/api/@wtf/project-typedoc/plugins/README.md +0 -1
- package/api/@wtf/project-typedoc/plugins/functions/cleanGeneratedMarkdown.md +1 -1
- package/api/@wtf/project-typedoc/plugins/functions/linkTrackedSources.md +2 -2
- package/api/@wtf/project-typedoc/plugins/functions/preventMediaFiles.md +1 -1
- package/api/@wtf/project-typedoc/plugins/type-aliases/CleanGeneratedMarkdownOptions.md +15 -3
- package/api/@wtf/project-typedoc/plugins/type-aliases/LinkTrackedSourcesOptions.md +9 -9
- package/api/@wtf/project-typedoc/plugins/type-aliases/PreventMediaFilesOptions.md +23 -3
- package/api/@wtf/project-typedoc/plugins/type-aliases/TypedocPlugin.md +1 -1
- package/api/@wtf/project-typedoc/schema/README.md +11 -2
- package/api/@wtf/project-typedoc/schema/type-aliases/TypedocSection.md +19 -0
- package/api/@wtf/project-typedoc/schema/variables/typedocSchema.md +6 -5
- package/api/@wtf/project-vite/README.md +20 -11
- package/api/@wtf/project-vite/config/README.md +11 -4
- package/api/@wtf/project-vite/config/functions/baseConfig.md +14 -9
- package/api/@wtf/project-vite/config/functions/buildsSite.md +1 -1
- package/api/@wtf/project-vite/config/functions/compress.md +1 -1
- package/api/@wtf/project-vite/config/functions/conditionsOf.md +8 -7
- package/api/@wtf/project-vite/config/functions/fromDist.md +22 -0
- package/api/@wtf/project-vite/config/type-aliases/BaseOptions.md +15 -2
- package/api/@wtf/project-vite/config/type-aliases/CompressOptions.md +4 -4
- package/api/@wtf/project-vite/config/variables/CLIENT_CONDITIONS.md +1 -1
- package/api/@wtf/project-vite/config/variables/COMPRESSIBLE.md +1 -1
- package/api/@wtf/project-vite/config/variables/THRESHOLD.md +1 -1
- package/api/@wtf/project-vite/schema/README.md +10 -3
- package/api/@wtf/project-vite/schema/type-aliases/ViteSection.md +11 -0
- package/api/@wtf/project-vite/schema/variables/viteSchema.md +5 -4
- package/api/@wtf/project-vitest/README.md +34 -16
- package/api/@wtf/project-vitest/browser/README.md +2 -1
- package/api/@wtf/project-vitest/browser/functions/browserConfig.md +6 -6
- package/api/@wtf/project-vitest/browser/functions/browserRootConfig.md +2 -2
- package/api/@wtf/project-vitest/browser/type-aliases/BrowserOptions.md +8 -6
- package/api/@wtf/project-vitest/config/README.md +17 -1
- package/api/@wtf/project-vitest/config/functions/fromDist.md +22 -0
- package/api/@wtf/project-vitest/config/functions/integrationConfig.md +2 -2
- package/api/@wtf/project-vitest/config/functions/packageConfig.md +17 -10
- package/api/@wtf/project-vitest/config/functions/rootConfig.md +5 -2
- package/api/@wtf/project-vitest/config/type-aliases/PackageOptions.md +18 -0
- package/api/@wtf/project-vitest/config/type-aliases/RootConfigOptions.md +2 -2
- package/api/@wtf/project-vitest/config/type-aliases/RootOptions.md +32 -7
- package/api/@wtf/project-vitest/config/type-aliases/VitestPlatform.md +26 -0
- package/api/@wtf/project-vitest/config/variables/GUARD_TIMEOUT.md +1 -1
- package/api/@wtf/project-vitest/config/variables/integration.md +10 -10
- package/api/@wtf/project-vitest/process/README.md +3 -3
- package/api/@wtf/project-vitest/process/functions/childEnv.md +6 -6
- package/api/@wtf/project-vitest/process/type-aliases/Env.md +1 -1
- package/api/@wtf/project-vitest/schema/README.md +14 -3
- package/api/@wtf/project-vitest/schema/type-aliases/VitestSection.md +12 -0
- package/api/@wtf/project-vitest/schema/variables/vitestSchema.md +6 -5
- package/api/@wtf/project-vitest/storybook/functions/storybookConfig.md +6 -4
- package/api/@wtf/project-vitest/storybook/type-aliases/StorybookOptions.md +3 -3
- package/api/@wtf/project-wpt/README.md +27 -19
- package/api/@wtf/project-wpt/builtins/functions/builtins.md +1 -1
- package/api/@wtf/project-wpt/builtins/functions/intrinsics.md +1 -1
- package/api/@wtf/project-wpt/checkout/README.md +3 -2
- package/api/@wtf/project-wpt/checkout/functions/checkoutFolderOf.md +1 -1
- package/api/@wtf/project-wpt/checkout/functions/checkoutTests.md +1 -1
- package/api/@wtf/project-wpt/checkout/functions/checkoutWpt.md +1 -1
- package/api/@wtf/project-wpt/checkout/functions/execOf.md +28 -0
- package/api/@wtf/project-wpt/checkout/functions/fileOf.md +1 -1
- package/api/@wtf/project-wpt/checkout/type-aliases/CheckedOutTests.md +3 -3
- package/api/@wtf/project-wpt/checkout/type-aliases/CheckoutOptions.md +12 -12
- package/api/@wtf/project-wpt/checkout/type-aliases/CheckoutTestsOptions.md +2 -2
- package/api/@wtf/project-wpt/checkout/variables/HARNESS.md +1 -1
- package/api/@wtf/project-wpt/checkout/variables/REWRITES.md +1 -1
- package/api/@wtf/project-wpt/checkout/variables/WPT_REPOSITORY.md +1 -1
- package/api/@wtf/project-wpt/errors/classes/HarnessFailedError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/InvalidCommitError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/InvalidExpectationsError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/NoSuiteError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/NotInWptError.md +5 -5
- package/api/@wtf/project-wpt/errors/classes/StaleExpectationError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/SubtestFailedError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/UnexpectedPassError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/WptError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/WptFetchError.md +4 -4
- package/api/@wtf/project-wpt/expectations/functions/checkHarness.md +1 -1
- package/api/@wtf/project-wpt/expectations/functions/checkSubtest.md +1 -1
- package/api/@wtf/project-wpt/expectations/functions/expectationOf.md +1 -1
- package/api/@wtf/project-wpt/expectations/functions/expectationsIssues.md +1 -1
- package/api/@wtf/project-wpt/expectations/functions/readExpectations.md +6 -4
- package/api/@wtf/project-wpt/expectations/functions/staleOf.md +1 -1
- package/api/@wtf/project-wpt/expectations/type-aliases/ReadExpectations.md +3 -3
- package/api/@wtf/project-wpt/index/README.md +2 -5
- package/api/@wtf/project-wpt/index/type-aliases/CreateRealm.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/Exec.md +3 -3
- package/api/@wtf/project-wpt/index/type-aliases/Expectations.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/FileExpectation.md +4 -4
- package/api/@wtf/project-wpt/index/type-aliases/FileResult.md +4 -4
- package/api/@wtf/project-wpt/index/type-aliases/Globals.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/HarnessResult.md +4 -4
- package/api/@wtf/project-wpt/index/type-aliases/HarnessStatus.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/HoldRejections.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/Realm.md +3 -3
- package/api/@wtf/project-wpt/index/type-aliases/SubtestResult.md +5 -5
- package/api/@wtf/project-wpt/index/type-aliases/SubtestStatus.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/WptFile.md +3 -3
- package/api/@wtf/project-wpt/index/type-aliases/WptFiles.md +9 -9
- package/api/@wtf/project-wpt/index/type-aliases/WptPaths.md +4 -4
- package/api/@wtf/project-wpt/index/type-aliases/WptPlatform.md +10 -60
- package/api/@wtf/project-wpt/index/type-aliases/WptSystem.md +8 -8
- package/api/@wtf/project-wpt/index/type-aliases/WptTest.md +3 -3
- package/api/@wtf/project-wpt/meta/functions/idOf.md +1 -1
- package/api/@wtf/project-wpt/meta/functions/metaOf.md +1 -1
- package/api/@wtf/project-wpt/meta/functions/runsOutsideWindow.md +1 -1
- package/api/@wtf/project-wpt/meta/functions/scriptPathsOf.md +1 -1
- package/api/@wtf/project-wpt/meta/functions/testsOf.md +1 -1
- package/api/@wtf/project-wpt/meta/type-aliases/Meta.md +6 -6
- package/api/@wtf/project-wpt/node/README.md +16 -8
- package/api/@wtf/project-wpt/node/functions/nodeSystem.md +9 -3
- package/api/@wtf/project-wpt/node/type-aliases/NodeSystemPlatform.md +12 -0
- package/api/@wtf/project-wpt/node/variables/nodeFiles.md +1 -1
- package/api/@wtf/project-wpt/node/variables/nodeRealm.md +1 -1
- package/api/@wtf/project-wpt/node/variables/nodeRejections.md +1 -1
- package/api/@wtf/project-wpt/run/functions/runTest.md +1 -1
- package/api/@wtf/project-wpt/run/type-aliases/RunOptions.md +10 -9
- package/api/@wtf/project-wpt/run/type-aliases/RunPlatform.md +3 -3
- package/api/@wtf/project-wpt/run/variables/LONG_TIMEOUT.md +1 -1
- package/api/@wtf/project-wpt/run/variables/TIMEOUT.md +1 -1
- package/api/@wtf/project-wpt/run/variables/WPT_ORIGIN.md +1 -1
- package/api/@wtf/project-wpt/schema/README.md +6 -3
- package/api/@wtf/project-wpt/schema/type-aliases/WptConfig.md +2 -2
- package/api/@wtf/project-wpt/schema/type-aliases/WptSuiteConfig.md +2 -2
- package/api/@wtf/project-wpt/schema/variables/wptSchema.md +1 -1
- package/api/@wtf/project-wpt/suite/README.md +6 -2
- package/api/@wtf/project-wpt/suite/functions/wptSuite.md +1 -1
- package/api/@wtf/project-wpt/suite/type-aliases/WptSuiteOptions.md +8 -8
- package/api/llms.txt +8 -3
- package/guides/astro.md +48 -23
- package/guides/config.md +33 -32
- package/guides/getting-started.md +8 -2
- package/guides/presets.md +11 -2
- package/guides/vite.md +20 -10
- package/guides/vitest.md +54 -27
- package/package.json +7 -7
- package/api/@wtf/project-config/errors/classes/SyncConfigInCodeError.md +0 -177
- package/api/@wtf/project-config/index/type-aliases/ConfigSyncPlatform.md +0 -33
- package/api/@wtf/project-config/index/type-aliases/SyncFiles.md +0 -55
- package/api/@wtf/project-config/load/functions/loadConfigSync.md +0 -25
- package/api/@wtf/project-config/load/type-aliases/LoadSyncOptions.md +0 -11
- package/api/@wtf/project-config/locate/functions/locateConfigSync.md +0 -23
- package/api/@wtf/project-config/locate/functions/projectRootOfSync.md +0 -23
- package/api/@wtf/project-config/locate/type-aliases/LocateSyncOptions.md +0 -17
- package/api/@wtf/project-config/node/README.md +0 -29
- package/api/@wtf/project-config/node/functions/loadConfig.md +0 -24
- package/api/@wtf/project-config/node/functions/loadConfigSync.md +0 -24
- package/api/@wtf/project-config/node/functions/nodeConfigPlatform.md +0 -16
- package/api/@wtf/project-config/node/functions/nodeLoadModule.md +0 -32
- package/api/@wtf/project-config/node/functions/nodeSyncPlatform.md +0 -16
- package/api/@wtf/project-config/section/functions/sectionOfSync.md +0 -35
- package/api/@wtf/project-typedoc/config/variables/nodeRun.md +0 -33
- package/api/@wtf/project-typedoc/plugins/type-aliases/Run.md +0 -25
- package/api/@wtf/project-vite/config/variables/FROM_DIST.md +0 -11
- package/api/@wtf/project-vitest/config/variables/FROM_DIST.md +0 -11
- package/api/@wtf/project-wpt/index/type-aliases/ClearTimeout.md +0 -21
- package/api/@wtf/project-wpt/index/type-aliases/Env.md +0 -11
- package/api/@wtf/project-wpt/index/type-aliases/Performance.md +0 -35
- package/api/@wtf/project-wpt/index/type-aliases/SetTimeout.md +0 -22
- package/api/@wtf/project-wpt/node/functions/nodePlatform.md +0 -18
- package/api/@wtf/project-wpt/node/variables/nodeExec.md +0 -11
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: RedirectedLinksError
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/project-astro/src/errors.ts:48](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
5
|
+
Defined in: [packages/project-astro/src/errors.ts:48](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/errors.ts#L48)
|
|
6
6
|
|
|
7
7
|
Each internal link of a build that leads to its page only through a redirect, which costs each
|
|
8
8
|
reader a round trip: link to where it leads instead.
|
|
@@ -19,7 +19,7 @@ reader a round trip: link to where it leads instead.
|
|
|
19
19
|
new RedirectedLinksError(links): RedirectedLinksError;
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
Defined in: [packages/project-astro/src/errors.ts:52](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
22
|
+
Defined in: [packages/project-astro/src/errors.ts:52](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/errors.ts#L52)
|
|
23
23
|
|
|
24
24
|
#### Parameters
|
|
25
25
|
|
|
@@ -40,9 +40,9 @@ Defined in: [packages/project-astro/src/errors.ts:52](https://gitlab.com/wetryfu
|
|
|
40
40
|
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|
|
41
41
|
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
|
|
42
42
|
| <a id="property-cause"></a> `cause?` | `public` | `unknown` | `undefined` | - | [`SiteError`](SiteError.md).[`cause`](SiteError.md#property-cause) | - |
|
|
43
|
-
| <a id="property-code"></a> `code` | `readonly` | `string` | `undefined` | - | [`SiteError`](SiteError.md).[`code`](SiteError.md#property-code) | [packages/project-astro/src/errors.ts:17](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
44
|
-
| <a id="property-exitcode"></a> `exitCode` | `readonly` | `number` | `1` | What a command that fails by it exits with. | [`SiteError`](SiteError.md).[`exitCode`](SiteError.md#property-exitcode) | [packages/project-astro/src/errors.ts:19](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
45
|
-
| <a id="property-links"></a> `links` | `readonly` | readonly [`RedirectedLink`](../../index/type-aliases/RedirectedLink.md)[] | `undefined` | The links, each with its page and where it leads. | - | [packages/project-astro/src/errors.ts:50](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
43
|
+
| <a id="property-code"></a> `code` | `readonly` | `string` | `undefined` | - | [`SiteError`](SiteError.md).[`code`](SiteError.md#property-code) | [packages/project-astro/src/errors.ts:17](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/errors.ts#L17) |
|
|
44
|
+
| <a id="property-exitcode"></a> `exitCode` | `readonly` | `number` | `1` | What a command that fails by it exits with. | [`SiteError`](SiteError.md).[`exitCode`](SiteError.md#property-exitcode) | [packages/project-astro/src/errors.ts:19](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/errors.ts#L19) |
|
|
45
|
+
| <a id="property-links"></a> `links` | `readonly` | readonly [`RedirectedLink`](../../index/type-aliases/RedirectedLink.md)[] | `undefined` | The links, each with its page and where it leads. | - | [packages/project-astro/src/errors.ts:50](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/errors.ts#L50) |
|
|
46
46
|
| <a id="property-message"></a> `message` | `public` | `string` | `undefined` | - | [`SiteError`](SiteError.md).[`message`](SiteError.md#property-message) | - |
|
|
47
47
|
| <a id="property-name"></a> `name` | `public` | `string` | `undefined` | - | [`SiteError`](SiteError.md).[`name`](SiteError.md#property-name) | - |
|
|
48
48
|
| <a id="property-stack"></a> `stack?` | `public` | `string` | `undefined` | - | [`SiteError`](SiteError.md).[`stack`](SiteError.md#property-stack) | - |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Class: SiteError
|
|
4
4
|
|
|
5
|
-
Defined in: [packages/project-astro/src/errors.ts:16](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
5
|
+
Defined in: [packages/project-astro/src/errors.ts:16](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/errors.ts#L16)
|
|
6
6
|
|
|
7
7
|
What this package throws: an Error with a stable SCREAMING_SNAKE `code` to match on in place of
|
|
8
8
|
its message, and the `exitCode` a command that fails by it exits with, 1.
|
|
@@ -29,7 +29,7 @@ new SiteError(
|
|
|
29
29
|
): SiteError;
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Defined in: [packages/project-astro/src/errors.ts:21](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
32
|
+
Defined in: [packages/project-astro/src/errors.ts:21](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/errors.ts#L21)
|
|
33
33
|
|
|
34
34
|
#### Parameters
|
|
35
35
|
|
|
@@ -54,8 +54,8 @@ Error.constructor
|
|
|
54
54
|
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|
|
55
55
|
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
|
|
56
56
|
| <a id="property-cause"></a> `cause?` | `public` | `unknown` | `undefined` | - | `Error.cause` | - |
|
|
57
|
-
| <a id="property-code"></a> `code` | `readonly` | `string` | `undefined` | - | - | [packages/project-astro/src/errors.ts:17](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
58
|
-
| <a id="property-exitcode"></a> `exitCode` | `readonly` | `number` | `1` | What a command that fails by it exits with. | - | [packages/project-astro/src/errors.ts:19](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
57
|
+
| <a id="property-code"></a> `code` | `readonly` | `string` | `undefined` | - | - | [packages/project-astro/src/errors.ts:17](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/errors.ts#L17) |
|
|
58
|
+
| <a id="property-exitcode"></a> `exitCode` | `readonly` | `number` | `1` | What a command that fails by it exits with. | - | [packages/project-astro/src/errors.ts:19](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/errors.ts#L19) |
|
|
59
59
|
| <a id="property-message"></a> `message` | `public` | `string` | `undefined` | - | `Error.message` | - |
|
|
60
60
|
| <a id="property-name"></a> `name` | `public` | `string` | `undefined` | - | `Error.name` | - |
|
|
61
61
|
| <a id="property-stack"></a> `stack?` | `public` | `string` | `undefined` | - | `Error.stack` | - |
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# index
|
|
4
4
|
|
|
5
|
-
The types of `@wtf/project-astro`: the
|
|
5
|
+
The types of `@wtf/project-astro`: the platform a config, an integration and a preview read by
|
|
6
|
+
([AstroPlatform](type-aliases/AstroPlatform.md)); the rules of a `_redirects` file ([RedirectRule](type-aliases/RedirectRule.md),
|
|
6
7
|
[IgnoredLine](type-aliases/IgnoredLine.md), [Redirects](type-aliases/Redirects.md), [RedirectMatch](type-aliases/RedirectMatch.md)), and the links of a built site
|
|
7
8
|
that lead to no page, or only through a redirect ([BrokenLink](type-aliases/BrokenLink.md), [RedirectedLink](type-aliases/RedirectedLink.md)).
|
|
8
9
|
Types only, with no code.
|
|
9
10
|
|
|
10
11
|
## Type Aliases
|
|
11
12
|
|
|
13
|
+
- [AstroPlatform](type-aliases/AstroPlatform.md)
|
|
12
14
|
- [BrokenLink](type-aliases/BrokenLink.md)
|
|
13
15
|
- [IgnoredLine](type-aliases/IgnoredLine.md)
|
|
14
16
|
- [RedirectedLink](type-aliases/RedirectedLink.md)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [index](../README.md) / AstroPlatform
|
|
2
|
+
|
|
3
|
+
# Type Alias: AstroPlatform
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type AstroPlatform = FilesPlatform & Pick<Platform, "env">;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:21](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L21)
|
|
10
|
+
|
|
11
|
+
The platform a site's config, its integrations and its preview read by, which the config file
|
|
12
|
+
or the script, its entry point, builds and gives them, as `nodePlatform()` of
|
|
13
|
+
`@wtf/platform-node/platform` makes Node's: its environment, `env`, of the URL GitLab Pages
|
|
14
|
+
serves the site at; and its file system, `navigator.storage`, whose root the folder of a build is
|
|
15
|
+
walked down from, by its `path`, against its working folder, `dirs.cwd`.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type BrokenLink = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:78](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L78)
|
|
10
10
|
|
|
11
11
|
An internal link of a built page that leads to no page.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ An internal link of a built page that leads to no page.
|
|
|
18
18
|
readonly href: string;
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
21
|
+
Defined in: [packages/project-astro/src/index.ts:82](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L82)
|
|
22
22
|
|
|
23
23
|
The link, as the page's `href` writes it.
|
|
24
24
|
|
|
@@ -30,6 +30,6 @@ The link, as the page's `href` writes it.
|
|
|
30
30
|
readonly page: string;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
33
|
+
Defined in: [packages/project-astro/src/index.ts:80](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L80)
|
|
34
34
|
|
|
35
35
|
The page, from the folder of the build, such as `/en/blog/hello.html`.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type IgnoredLine = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:52](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L52)
|
|
10
10
|
|
|
11
11
|
A line of a `_redirects` file that is no rule GitLab Pages supports, and why.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ A line of a `_redirects` file that is no rule GitLab Pages supports, and why.
|
|
|
18
18
|
readonly line: number;
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
21
|
+
Defined in: [packages/project-astro/src/index.ts:54](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L54)
|
|
22
22
|
|
|
23
23
|
The line, from 1; `0` for the whole file.
|
|
24
24
|
|
|
@@ -30,7 +30,7 @@ The line, from 1; `0` for the whole file.
|
|
|
30
30
|
readonly reason: string;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
33
|
+
Defined in: [packages/project-astro/src/index.ts:58](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L58)
|
|
34
34
|
|
|
35
35
|
Why GitLab Pages ignores it, and what it supports instead.
|
|
36
36
|
|
|
@@ -42,6 +42,6 @@ Why GitLab Pages ignores it, and what it supports instead.
|
|
|
42
42
|
readonly text: string;
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
45
|
+
Defined in: [packages/project-astro/src/index.ts:56](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L56)
|
|
46
46
|
|
|
47
47
|
The text of the line, trimmed; empty for the whole file.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RedirectInput = Pick<RedirectRule, "from" | "to"> & object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:46](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L46)
|
|
10
10
|
|
|
11
11
|
A rule to write into a `_redirects` file: its status `301` by default, and of no line.
|
|
12
12
|
|
|
@@ -14,4 +14,4 @@ A rule to write into a `_redirects` file: its status `301` by default, and of no
|
|
|
14
14
|
|
|
15
15
|
| Name | Type | Description | Defined in |
|
|
16
16
|
| ------ | ------ | ------ | ------ |
|
|
17
|
-
| `status?` | [`RedirectStatus`](RedirectStatus.md) | What the rule answers with: `301` by default, as GitLab Pages reads a rule of none. | [packages/project-astro/src/index.ts:
|
|
17
|
+
| `status?` | [`RedirectStatus`](RedirectStatus.md) | What the rule answers with: `301` by default, as GitLab Pages reads a rule of none. | [packages/project-astro/src/index.ts:48](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L48) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RedirectMatch = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:70](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L70)
|
|
10
10
|
|
|
11
11
|
The rule of `_redirects` that answers a path, and where it sends it.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ The rule of `_redirects` that answers a path, and where it sends it.
|
|
|
18
18
|
readonly location: string;
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
21
|
+
Defined in: [packages/project-astro/src/index.ts:74](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L74)
|
|
22
22
|
|
|
23
23
|
The rule's `to`, its placeholders and `:splat` put in: the `Location` of a redirect.
|
|
24
24
|
|
|
@@ -30,6 +30,6 @@ The rule's `to`, its placeholders and `:splat` put in: the `Location` of a redir
|
|
|
30
30
|
readonly rule: RedirectRule;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
33
|
+
Defined in: [packages/project-astro/src/index.ts:72](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L72)
|
|
34
34
|
|
|
35
35
|
The first rule whose path matches.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RedirectRule = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:34](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L34)
|
|
10
10
|
|
|
11
11
|
A rule of a `_redirects` file: a request whose path matches `from` is sent to `to`. `from` is a
|
|
12
12
|
path; each `:name` in it matches one part of a path, and a `*` at its end matches the rest, as
|
|
@@ -20,7 +20,7 @@ path; each `:name` in it matches one part of a path, and a `*` at its end matche
|
|
|
20
20
|
readonly from: string;
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
23
|
+
Defined in: [packages/project-astro/src/index.ts:36](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L36)
|
|
24
24
|
|
|
25
25
|
The path a request's path matches, such as `/blog/:year/*`.
|
|
26
26
|
|
|
@@ -32,7 +32,7 @@ The path a request's path matches, such as `/blog/:year/*`.
|
|
|
32
32
|
readonly line: number;
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
35
|
+
Defined in: [packages/project-astro/src/index.ts:42](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L42)
|
|
36
36
|
|
|
37
37
|
The line of the file the rule is on, from 1.
|
|
38
38
|
|
|
@@ -44,7 +44,7 @@ The line of the file the rule is on, from 1.
|
|
|
44
44
|
readonly status: RedirectStatus;
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
47
|
+
Defined in: [packages/project-astro/src/index.ts:40](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L40)
|
|
48
48
|
|
|
49
49
|
What the rule answers with: a redirect, `301` or `302`, or a rewrite, `200`.
|
|
50
50
|
|
|
@@ -56,6 +56,6 @@ What the rule answers with: a redirect, `301` or `302`, or a rewrite, `200`.
|
|
|
56
56
|
readonly to: string;
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
59
|
+
Defined in: [packages/project-astro/src/index.ts:38](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L38)
|
|
60
60
|
|
|
61
61
|
Where the rule sends a request: a path, or a full URL of a redirect.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RedirectStatus = 200 | 301 | 302;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:27](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L27)
|
|
10
10
|
|
|
11
11
|
The status of a rule of `_redirects`: `301 Moved Permanently` and `302 Found` redirect, and
|
|
12
12
|
`200` rewrites, serving what is at the rule's `to` under the URL that was asked for.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RedirectedLink = BrokenLink & object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:86](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L86)
|
|
10
10
|
|
|
11
11
|
An internal link of a built page that leads to its page only through a redirect.
|
|
12
12
|
|
|
@@ -14,4 +14,4 @@ An internal link of a built page that leads to its page only through a redirect.
|
|
|
14
14
|
|
|
15
15
|
| Name | Type | Description | Defined in |
|
|
16
16
|
| ------ | ------ | ------ | ------ |
|
|
17
|
-
| `location` | `string` | Where GitLab Pages sends the link, such as `/en/guides/` of `/en/guides`. | [packages/project-astro/src/index.ts:
|
|
17
|
+
| `location` | `string` | Where GitLab Pages sends the link, such as `/en/guides/` of `/en/guides`. | [packages/project-astro/src/index.ts:88](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L88) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type Redirects = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:62](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L62)
|
|
10
10
|
|
|
11
11
|
A `_redirects` file, read: its rules, in order, and each line it ignored.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ A `_redirects` file, read: its rules, in order, and each line it ignored.
|
|
|
18
18
|
readonly ignored: readonly IgnoredLine[];
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
21
|
+
Defined in: [packages/project-astro/src/index.ts:66](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L66)
|
|
22
22
|
|
|
23
23
|
Each line GitLab Pages ignores, with why.
|
|
24
24
|
|
|
@@ -30,6 +30,6 @@ Each line GitLab Pages ignores, with why.
|
|
|
30
30
|
readonly rules: readonly RedirectRule[];
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [packages/project-astro/src/index.ts:
|
|
33
|
+
Defined in: [packages/project-astro/src/index.ts:64](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/index.ts#L64)
|
|
34
34
|
|
|
35
35
|
The rules GitLab Pages reads, in the order of the file.
|
|
@@ -16,6 +16,10 @@ declare const dist: FileSystemDirectoryHandle
|
|
|
16
16
|
for (const { page, href } of await brokenLinksIn(dist, '/')) console.error(`${page}: ${href}`)
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
## Type Aliases
|
|
20
|
+
|
|
21
|
+
- [LinksOptions](type-aliases/LinksOptions.md)
|
|
22
|
+
|
|
19
23
|
## Variables
|
|
20
24
|
|
|
21
25
|
- [LINKS](variables/LINKS.md)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function brokenLinksIn(folder, base): Promise<BrokenLink[]>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/links.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:155](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/links.ts#L155)
|
|
10
10
|
|
|
11
11
|
Each internal link of the pages below `folder`, the folder of a built site served under `base`,
|
|
12
12
|
that leads to no page, as GitLab Pages serves the folder: an `href` of a root-absolute path or a
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
# Function: links()
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
function links(): AstroIntegration;
|
|
6
|
+
function links(__namedParameters): AstroIntegration;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/links.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:203](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/links.ts#L203)
|
|
10
10
|
|
|
11
11
|
The Astro integration that fails a site's build on an internal link that leads to no page, or
|
|
12
12
|
that reaches its page only through a redirect, as GitLab Pages serves the build, `_redirects`
|
|
@@ -14,16 +14,25 @@ included. Once the build is done, after every other integration's own hook, and
|
|
|
14
14
|
`pages()` of `./pages` where it is listed before this, it checks each page under the site's
|
|
15
15
|
`base`, of one read of the build for both checks: a link of no page fails the build with a [BrokenLinksError](../../errors/classes/BrokenLinksError.md) of `./errors`, which
|
|
16
16
|
lists each one with its page; a link that is redirected, with a [RedirectedLinksError](../../errors/classes/RedirectedLinksError.md),
|
|
17
|
-
which says where each one leads. It logs each one first. It reads the folder of the build
|
|
18
|
-
|
|
19
|
-
it.
|
|
17
|
+
which says where each one leads. It logs each one first. It reads the folder of the build by
|
|
18
|
+
the file system of the `platform` it is given, as `nodePlatform()` of
|
|
19
|
+
`@wtf/platform-node/platform` gives the disk's. `baseConfig()` of `./config` lists it.
|
|
20
20
|
|
|
21
21
|
```ts
|
|
22
|
+
import type { AstroPlatform } from '@wtf/project-astro'
|
|
22
23
|
import { defineConfig } from 'astro/config'
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
declare const platform: AstroPlatform
|
|
26
|
+
|
|
27
|
+
export default defineConfig({ integrations: [links({ platform })] })
|
|
25
28
|
```
|
|
26
29
|
|
|
30
|
+
## Parameters
|
|
31
|
+
|
|
32
|
+
| Parameter | Type |
|
|
33
|
+
| ------ | ------ |
|
|
34
|
+
| `__namedParameters` | [`LinksOptions`](../type-aliases/LinksOptions.md) |
|
|
35
|
+
|
|
27
36
|
## Returns
|
|
28
37
|
|
|
29
38
|
`AstroIntegration`
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function redirectedLinksIn(folder, base): Promise<RedirectedLink[]>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/links.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:170](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/links.ts#L170)
|
|
10
10
|
|
|
11
11
|
Each internal link of the pages below `folder`, the folder of a built site served under `base`,
|
|
12
12
|
that GitLab Pages answers with a redirect: a link to a folder of an `index.html` without its
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [links](../README.md) / LinksOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: LinksOptions
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type LinksOptions = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:178](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/links.ts#L178)
|
|
10
|
+
|
|
11
|
+
What [links](../functions/links.md) takes.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### platform
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
readonly platform: Pick<AstroPlatform, "navigator" | "path" | "dirs">;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Defined in: [packages/project-astro/src/links.ts:180](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/links.ts#L180)
|
|
22
|
+
|
|
23
|
+
The platform the build is read by: its file system, and its paths.
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
const LINKS: "wtf-project:links" = 'wtf-project:links';
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/links.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:48](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/links.ts#L48)
|
|
10
10
|
|
|
11
11
|
The name of the integration [links](../functions/links.md) gives, and of the one it adds to run last.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function fixSearchUrlsIn(folder, base): Promise<number>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:191](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/pages.ts#L191)
|
|
10
10
|
|
|
11
11
|
Gives each page of the search index below `folder`, the folder of a built site served under
|
|
12
12
|
`base`, the URL it is served at. Pagefind, as Starlight runs it, indexes the build before the
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function moveConflictingPages(folder): Promise<number>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:58](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/pages.ts#L58)
|
|
10
10
|
|
|
11
11
|
Moves each page `X.html` that has a folder `X/` beside it to `X/index.html`, below `folder`, at
|
|
12
12
|
any depth: GitLab Pages cannot serve `X.html` when a folder `X` is there too. A folder that holds
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
# Function: pages()
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
function pages(options
|
|
6
|
+
function pages(options): AstroIntegration;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:354](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/pages.ts#L354)
|
|
10
10
|
|
|
11
11
|
The Astro integration that makes a site's build serve on GitLab Pages. Once the build is done,
|
|
12
12
|
after every other integration's own hook, as Starlight's, whose search indexes the pages, it
|
|
@@ -16,17 +16,20 @@ unless `localeRedirect` is `false`; moves each page beside a folder of its name
|
|
|
16
16
|
([moveConflictingPages](moveConflictingPages.md)), gives each link to a page built as a folder its final slash, of
|
|
17
17
|
the pages and the sitemap ([slashFolderLinksIn](slashFolderLinksIn.md)), and gives each page of the search index
|
|
18
18
|
the URL it is served at ([fixSearchUrlsIn](fixSearchUrlsIn.md)), under the site's `base`. It reads the folder of
|
|
19
|
-
the build
|
|
20
|
-
`./config` lists it.
|
|
19
|
+
the build by the file system of the `platform` it is given, as `nodePlatform()` of
|
|
20
|
+
`@wtf/platform-node/platform` gives the disk's. `baseConfig()` of `./config` lists it.
|
|
21
21
|
|
|
22
22
|
```ts
|
|
23
|
+
import type { AstroPlatform } from '@wtf/project-astro'
|
|
23
24
|
import { defineConfig } from 'astro/config'
|
|
24
25
|
|
|
26
|
+
declare const platform: AstroPlatform
|
|
27
|
+
|
|
25
28
|
export default defineConfig({
|
|
26
29
|
trailingSlash: 'never',
|
|
27
30
|
build: { format: 'preserve' },
|
|
28
31
|
i18n: { locales: ['en', 'sv'], defaultLocale: 'en', routing: { prefixDefaultLocale: true } },
|
|
29
|
-
integrations: [pages()]
|
|
32
|
+
integrations: [pages({ platform })]
|
|
30
33
|
})
|
|
31
34
|
```
|
|
32
35
|
|
|
@@ -34,7 +37,7 @@ export default defineConfig({
|
|
|
34
37
|
|
|
35
38
|
| Parameter | Type |
|
|
36
39
|
| ------ | ------ |
|
|
37
|
-
| `options` | [`PagesOptions`](../type-aliases/PagesOptions.md) |
|
|
40
|
+
| `options` | [`PagesOptions`](../type-aliases/PagesOptions.md) & `object` |
|
|
38
41
|
|
|
39
42
|
## Returns
|
|
40
43
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function prefixedLocaleOf(i18n): string | undefined;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:255](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/pages.ts#L255)
|
|
10
10
|
|
|
11
11
|
The prefix of the default locale of a site whose URLs all start with their locale, as `en` of
|
|
12
12
|
`/en/`, of Astro's `i18n`: the `path` of the locale of `locales` that is its `defaultLocale`, by
|
|
@@ -12,7 +12,7 @@ function redirectBaseToLocaleIn(
|
|
|
12
12
|
| undefined>;
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
15
|
+
Defined in: [packages/project-astro/src/pages.ts:306](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/pages.ts#L306)
|
|
16
16
|
|
|
17
17
|
Sends the base of a built site, served under `base`, to the path of its default locale,
|
|
18
18
|
`<base><locale>/`, by a `302` rule of the `_redirects` of `folder`, its folder of the build: the
|
|
@@ -10,7 +10,7 @@ function slashFolderLinksIn(
|
|
|
10
10
|
): Promise<number>;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
13
|
+
Defined in: [packages/project-astro/src/pages.ts:96](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/pages.ts#L96)
|
|
14
14
|
|
|
15
15
|
Gives each internal link of the pages below `folder`, the folder of a built site served under
|
|
16
16
|
`base`, the URL its page is served at: a link to a page built as the `index.html` of a folder,
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
type I18n = Pick<NonNullable<AstroConfig["i18n"]>, "defaultLocale" | "locales" | "routing">;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:236](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/pages.ts#L236)
|
|
10
10
|
|
|
11
11
|
The locales of a site, as Astro's `i18n` has them once it is set up, and as Starlight sets it.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type PagesOptions = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:226](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/pages.ts#L226)
|
|
10
10
|
|
|
11
11
|
What [pages](../functions/pages.md) takes.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ What [pages](../functions/pages.md) takes.
|
|
|
18
18
|
readonly optional localeRedirect?: boolean;
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
21
|
+
Defined in: [packages/project-astro/src/pages.ts:232](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/pages.ts#L232)
|
|
22
22
|
|
|
23
23
|
Whether the base of a site whose default locale has its prefix, as `/en/`, sends a reader
|
|
24
24
|
there, by a rule of `_redirects` ([redirectBaseToLocaleIn](../functions/redirectBaseToLocaleIn.md)): by default. It reads the
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
const PAGES: "wtf-project:pages" = 'wtf-project:pages';
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:51](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/pages.ts#L51)
|
|
10
10
|
|
|
11
11
|
The name of the integration [pages](../functions/pages.md) gives, and of the one it adds to run last.
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
A built site served as GitLab Pages serves it, to try it before it ships: [pagesOf](functions/pagesOf.md), the
|
|
6
6
|
[Handler](type-aliases/Handler.md) of the folder of the build, of its files, the rules of its `_redirects` and its
|
|
7
|
-
`404.html`, under the site's base; [previewOf](functions/previewOf.md), the same of a folder
|
|
8
|
-
|
|
9
|
-
ignores; the parts it is made of, [files](functions/files.md) and [notFound](functions/notFound.md); and [listen](functions/listen.md), which
|
|
7
|
+
`404.html`, under the site's base; [previewOf](functions/previewOf.md), the same of a folder by its path, of the
|
|
8
|
+
file system and the environment of the platform it is given, with a warning of each line of
|
|
9
|
+
`_redirects` GitLab Pages ignores; the parts it is made of, [files](functions/files.md) and [notFound](functions/notFound.md); and [listen](functions/listen.md), which
|
|
10
10
|
serves a handler on Node's HTTP server until it is closed, or its signal aborted. The folder is a
|
|
11
11
|
handle of the WHATWG File System Standard, so a test can serve one in memory.
|
|
12
12
|
|
|
@@ -14,9 +14,12 @@ A script of a repo serves its build so, of the flags it chooses:
|
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
16
|
// scripts/preview.ts
|
|
17
|
+
import { nodeStorage } from '@wtf/platform-fs-node/storage'
|
|
18
|
+
import { nodePlatform } from '@wtf/platform-node/platform'
|
|
17
19
|
import { listen, previewOf } from '@wtf/project-astro/preview'
|
|
18
20
|
|
|
19
|
-
const
|
|
21
|
+
const platform = nodePlatform({ fetch, storage: nodeStorage() })
|
|
22
|
+
const site = await previewOf('dist', { platform })
|
|
20
23
|
for (const warning of site.warnings) console.warn(warning)
|
|
21
24
|
const stop = new AbortController()
|
|
22
25
|
for (const signal of ['SIGINT', 'SIGTERM'] as const) process.once(signal, () => stop.abort())
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function files(folder, options?): Handler;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:353](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/preview.ts#L353)
|
|
10
10
|
|
|
11
11
|
A [Handler](../type-aliases/Handler.md) that serves the files of `folder`, as GitLab Pages does. Each `GET` and
|
|
12
12
|
`HEAD` gets the file at the request's path:
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function listen(handler, options?): Promise<Listening>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:594](https://gitlab.com/wetryfun/project/project/-/blob/docs-v4.0.0/packages/project-astro/src/preview.ts#L594)
|
|
10
10
|
|
|
11
11
|
Serves `handler` on Node's HTTP server, at `host` and `port`, `localhost:4321` by default: each
|
|
12
12
|
request made a `Request`, its `signal` aborted as its client goes away, and each `Response`
|