@wtf/project-docs 1.1.1 → 2.1.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/README.md +2 -0
- package/api/.generated +138 -12
- package/api/@wtf/project-astro/README.md +58 -14
- package/api/@wtf/project-astro/config/README.md +1 -1
- package/api/@wtf/project-astro/config/functions/baseConfig.md +3 -3
- package/api/@wtf/project-astro/config/functions/baseOf.md +1 -1
- package/api/@wtf/project-astro/config/functions/siteOf.md +1 -1
- package/api/@wtf/project-astro/config/type-aliases/BaseOptions.md +9 -8
- package/api/@wtf/project-astro/config/type-aliases/Env.md +1 -1
- 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/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/functions/brokenLinksIn.md +1 -1
- package/api/@wtf/project-astro/links/functions/links.md +1 -1
- package/api/@wtf/project-astro/links/functions/redirectedLinksIn.md +1 -1
- package/api/@wtf/project-astro/links/variables/LINKS.md +1 -1
- package/api/@wtf/project-astro/pages/README.md +12 -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 +17 -7
- package/api/@wtf/project-astro/pages/functions/prefixedLocaleOf.md +35 -0
- package/api/@wtf/project-astro/pages/functions/redirectBaseToLocaleIn.md +39 -0
- package/api/@wtf/project-astro/pages/functions/slashFolderLinksIn.md +1 -1
- package/api/@wtf/project-astro/pages/type-aliases/I18n.md +11 -0
- package/api/@wtf/project-astro/pages/type-aliases/PagesOptions.md +25 -0
- package/api/@wtf/project-astro/pages/variables/PAGES.md +1 -1
- package/api/@wtf/project-astro/preview/README.md +20 -10
- package/api/@wtf/project-astro/preview/functions/files.md +1 -1
- package/api/@wtf/project-astro/preview/functions/listen.md +4 -2
- 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 +25 -0
- 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 +15 -3
- package/api/@wtf/project-astro/preview/type-aliases/Listening.md +16 -4
- package/api/@wtf/project-astro/preview/type-aliases/Pages.md +3 -3
- package/api/@wtf/project-astro/preview/type-aliases/Preview.md +19 -0
- package/api/@wtf/project-astro/preview/type-aliases/PreviewOptions.md +36 -0
- 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 +23 -0
- package/api/@wtf/project-astro/schema/variables/astroSchema.md +13 -0
- package/api/@wtf/project-config/README.md +94 -0
- package/api/@wtf/project-config/define/README.md +23 -0
- package/api/@wtf/project-config/define/functions/defineConfig.md +29 -0
- package/api/@wtf/project-config/env/README.md +33 -0
- package/api/@wtf/project-config/env/functions/envNameOf.md +22 -0
- package/api/@wtf/project-config/env/functions/envPrefixOf.md +22 -0
- package/api/@wtf/project-config/env/functions/jsonSchemaOf.md +23 -0
- package/api/@wtf/project-config/env/functions/variablesOf.md +23 -0
- package/api/@wtf/project-config/env/functions/withEnvironment.md +34 -0
- package/api/@wtf/project-config/env/type-aliases/Environment.md +11 -0
- package/api/@wtf/project-config/env/type-aliases/EnvironmentValue.md +32 -0
- package/api/@wtf/project-config/env/type-aliases/WithEnvironment.md +31 -0
- package/api/@wtf/project-config/errors/README.md +31 -0
- package/api/@wtf/project-config/errors/classes/ConfigError.md +200 -0
- package/api/@wtf/project-config/errors/classes/ConfigFileMismatchError.md +175 -0
- package/api/@wtf/project-config/errors/classes/ConfigInCodeError.md +177 -0
- package/api/@wtf/project-config/errors/classes/ConfigPathError.md +174 -0
- package/api/@wtf/project-config/errors/classes/EnvPlaceholderUnsetError.md +176 -0
- package/api/@wtf/project-config/errors/classes/InvalidConfigFileError.md +179 -0
- package/api/@wtf/project-config/errors/classes/InvalidSectionError.md +185 -0
- package/api/@wtf/project-config/errors/classes/NoConfigFileError.md +178 -0
- package/api/@wtf/project-config/errors/classes/NoConfigValueError.md +174 -0
- package/api/@wtf/project-config/errors/classes/SyncConfigInCodeError.md +177 -0
- package/api/@wtf/project-config/errors/classes/SyncSchemaError.md +174 -0
- package/api/@wtf/project-config/errors/classes/UnwritableConfigFileError.md +175 -0
- package/api/@wtf/project-config/index/README.md +35 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigDefaults.md +36 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigEnvironment.md +44 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigIssue.md +31 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigNames.md +52 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigPath.md +12 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigPlatform.md +14 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigSection.md +19 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigSource.md +35 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigSyncPlatform.md +33 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigWrite.md +116 -0
- package/api/@wtf/project-config/index/type-aliases/ImportModule.md +22 -0
- package/api/@wtf/project-config/index/type-aliases/JsonSchema.md +15 -0
- package/api/@wtf/project-config/index/type-aliases/LocatedConfig.md +45 -0
- package/api/@wtf/project-config/index/type-aliases/NamespaceConfig.md +29 -0
- package/api/@wtf/project-config/index/type-aliases/ResolvedConfig.md +109 -0
- package/api/@wtf/project-config/index/type-aliases/SectionSchema.md +23 -0
- package/api/@wtf/project-config/index/type-aliases/SectionsOf.md +19 -0
- package/api/@wtf/project-config/index/type-aliases/SyncFiles.md +55 -0
- package/api/@wtf/project-config/index/type-aliases/ValidateSection.md +24 -0
- package/api/@wtf/project-config/load/README.md +33 -0
- package/api/@wtf/project-config/load/functions/ignoredWarning.md +22 -0
- package/api/@wtf/project-config/load/functions/importFileModule.md +24 -0
- package/api/@wtf/project-config/load/functions/loadConfig.md +30 -0
- package/api/@wtf/project-config/load/functions/loadConfigSync.md +25 -0
- package/api/@wtf/project-config/load/type-aliases/LoadLayers.md +19 -0
- package/api/@wtf/project-config/load/type-aliases/LoadOptions.md +17 -0
- package/api/@wtf/project-config/load/type-aliases/LoadSyncOptions.md +11 -0
- package/api/@wtf/project-config/locate/README.md +40 -0
- package/api/@wtf/project-config/locate/functions/configFilesOf.md +23 -0
- package/api/@wtf/project-config/locate/functions/configNamesOf.md +24 -0
- package/api/@wtf/project-config/locate/functions/jsonFilesOf.md +22 -0
- package/api/@wtf/project-config/locate/functions/locateConfig.md +27 -0
- package/api/@wtf/project-config/locate/functions/locateConfigSync.md +23 -0
- package/api/@wtf/project-config/locate/functions/projectRootOf.md +25 -0
- package/api/@wtf/project-config/locate/functions/projectRootOfSync.md +23 -0
- package/api/@wtf/project-config/locate/type-aliases/LocateNames.md +18 -0
- package/api/@wtf/project-config/locate/type-aliases/LocateOptions.md +17 -0
- package/api/@wtf/project-config/locate/type-aliases/LocateSyncOptions.md +17 -0
- package/api/@wtf/project-config/locate/type-aliases/NamespaceNames.md +18 -0
- package/api/@wtf/project-config/locate/variables/DEFAULT_NAMESPACE.md +11 -0
- package/api/@wtf/project-config/node/README.md +27 -0
- package/api/@wtf/project-config/node/functions/loadConfig.md +24 -0
- package/api/@wtf/project-config/node/functions/loadConfigSync.md +24 -0
- package/api/@wtf/project-config/node/functions/nodeConfigPlatform.md +16 -0
- package/api/@wtf/project-config/node/functions/nodeSyncPlatform.md +16 -0
- package/api/@wtf/project-config/path/README.md +13 -0
- package/api/@wtf/project-config/path/functions/configPathOf.md +23 -0
- package/api/@wtf/project-config/path/functions/textOfConfigPath.md +21 -0
- package/api/@wtf/project-config/path/functions/valueAt.md +23 -0
- package/api/@wtf/project-config/placeholder/README.md +24 -0
- package/api/@wtf/project-config/placeholder/functions/expandPlaceholders.md +31 -0
- package/api/@wtf/project-config/placeholder/functions/expandString.md +31 -0
- package/api/@wtf/project-config/schema/README.md +29 -0
- package/api/@wtf/project-config/schema/functions/namespaceSchema.md +31 -0
- package/api/@wtf/project-config/schema/functions/sectionIdOf.md +23 -0
- package/api/@wtf/project-config/schema/type-aliases/NamespaceSchemaOptions.md +31 -0
- package/api/@wtf/project-config/schema/variables/JSON_SCHEMA_DRAFT.md +11 -0
- package/api/@wtf/project-config/section/README.md +34 -0
- package/api/@wtf/project-config/section/functions/issuesOf.md +30 -0
- package/api/@wtf/project-config/section/functions/issuesOfSync.md +34 -0
- package/api/@wtf/project-config/section/functions/mergeSection.md +28 -0
- package/api/@wtf/project-config/section/functions/sectionOf.md +43 -0
- package/api/@wtf/project-config/section/functions/sectionOfSync.md +35 -0
- package/api/@wtf/project-config/section/type-aliases/Checked.md +38 -0
- package/api/@wtf/project-config/write/README.md +30 -0
- package/api/@wtf/project-config/write/functions/setConfigValue.md +39 -0
- package/api/@wtf/project-config/write/functions/unsetConfigValue.md +31 -0
- package/api/@wtf/project-config/write/type-aliases/WriteOptions.md +18 -0
- package/api/@wtf/project-oxfmt/README.md +32 -8
- package/api/@wtf/project-oxfmt/config/README.md +23 -0
- package/api/@wtf/project-oxfmt/config/functions/oxfmtConfig.md +30 -0
- package/api/@wtf/project-oxfmt/config/type-aliases/OxfmtOptions.md +11 -0
- package/api/@wtf/project-oxfmt/config/variables/OXFMT_DEFAULTS.md +21 -0
- package/api/@wtf/project-oxfmt/config/variables/default.md +11 -0
- package/api/@wtf/project-oxfmt/schema/README.md +25 -0
- package/api/@wtf/project-oxfmt/schema/variables/oxfmtSchema.md +13 -0
- package/api/@wtf/project-oxlint/README.md +35 -8
- package/api/@wtf/project-oxlint/config/README.md +23 -0
- package/api/@wtf/project-oxlint/config/functions/oxlintConfig.md +30 -0
- package/api/@wtf/project-oxlint/config/type-aliases/OxlintOptions.md +13 -0
- package/api/@wtf/project-oxlint/config/variables/OXLINT_DEFAULTS.md +32 -0
- package/api/@wtf/project-oxlint/config/variables/default.md +11 -0
- package/api/@wtf/project-oxlint/schema/README.md +27 -0
- package/api/@wtf/project-oxlint/schema/variables/oxlintSchema.md +12 -0
- 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 +31 -4
- package/api/@wtf/project-typedoc/config/functions/gitRevisionOf.md +1 -1
- package/api/@wtf/project-typedoc/config/functions/typedocConfig.md +1 -1
- package/api/@wtf/project-typedoc/config/type-aliases/RevisionSources.md +3 -3
- package/api/@wtf/project-typedoc/config/type-aliases/TypedocConfig.md +1 -1
- package/api/@wtf/project-typedoc/config/type-aliases/TypedocOptions.md +6 -6
- package/api/@wtf/project-typedoc/config/variables/nodeRun.md +1 -1
- package/api/@wtf/project-typedoc/plugins/functions/cleanGeneratedMarkdown.md +1 -1
- package/api/@wtf/project-typedoc/plugins/functions/linkTrackedSources.md +1 -1
- package/api/@wtf/project-typedoc/plugins/functions/preventMediaFiles.md +1 -1
- package/api/@wtf/project-typedoc/plugins/type-aliases/CleanGeneratedMarkdownOptions.md +3 -3
- package/api/@wtf/project-typedoc/plugins/type-aliases/LinkTrackedSourcesOptions.md +3 -3
- package/api/@wtf/project-typedoc/plugins/type-aliases/PreventMediaFilesOptions.md +3 -3
- package/api/@wtf/project-typedoc/plugins/type-aliases/Run.md +1 -1
- package/api/@wtf/project-typedoc/plugins/type-aliases/TypedocPlugin.md +1 -1
- package/api/@wtf/project-typedoc/schema/README.md +28 -0
- package/api/@wtf/project-typedoc/schema/variables/typedocSchema.md +13 -0
- package/api/@wtf/project-vite/README.md +17 -33
- package/api/@wtf/project-vite/config/README.md +46 -0
- package/api/@wtf/project-vite/{functions → config/functions}/baseConfig.md +5 -5
- package/api/@wtf/project-vite/{functions → config/functions}/buildsSite.md +2 -2
- package/api/@wtf/project-vite/{functions → config/functions}/compress.md +2 -2
- package/api/@wtf/project-vite/{functions → config/functions}/conditionsOf.md +2 -2
- package/api/@wtf/project-vite/{type-aliases → config/type-aliases}/BaseOptions.md +3 -3
- package/api/@wtf/project-vite/{type-aliases → config/type-aliases}/CompressOptions.md +5 -5
- package/api/@wtf/project-vite/{variables → config/variables}/CLIENT_CONDITIONS.md +2 -2
- package/api/@wtf/project-vite/{variables → config/variables}/COMPRESSIBLE.md +2 -2
- package/api/@wtf/project-vite/{variables → config/variables}/FROM_DIST.md +2 -2
- package/api/@wtf/project-vite/{variables → config/variables}/THRESHOLD.md +2 -2
- package/api/@wtf/project-vite/schema/README.md +21 -0
- package/api/@wtf/project-vite/schema/variables/viteSchema.md +12 -0
- package/api/@wtf/project-vitest/README.md +26 -0
- package/api/@wtf/project-vitest/browser/functions/browserConfig.md +1 -1
- package/api/@wtf/project-vitest/browser/functions/browserRootConfig.md +1 -1
- package/api/@wtf/project-vitest/browser/type-aliases/BrowserOptions.md +3 -3
- package/api/@wtf/project-vitest/config/functions/integrationConfig.md +1 -1
- package/api/@wtf/project-vitest/config/functions/packageConfig.md +1 -1
- package/api/@wtf/project-vitest/config/functions/rootConfig.md +1 -1
- package/api/@wtf/project-vitest/config/type-aliases/RootConfigOptions.md +2 -2
- package/api/@wtf/project-vitest/config/type-aliases/RootOptions.md +7 -7
- package/api/@wtf/project-vitest/config/variables/FROM_DIST.md +1 -1
- package/api/@wtf/project-vitest/config/variables/GUARD_TIMEOUT.md +1 -1
- package/api/@wtf/project-vitest/config/variables/integration.md +9 -9
- package/api/@wtf/project-vitest/process/functions/childEnv.md +1 -1
- package/api/@wtf/project-vitest/process/type-aliases/Env.md +1 -1
- package/api/@wtf/project-vitest/schema/README.md +22 -0
- package/api/@wtf/project-vitest/schema/variables/vitestSchema.md +13 -0
- package/api/@wtf/project-vitest/storybook/functions/storybookConfig.md +1 -1
- package/api/@wtf/project-vitest/storybook/type-aliases/StorybookOptions.md +2 -2
- package/api/@wtf/project-wpt/README.md +44 -0
- 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/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/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 +8 -8
- 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 +1 -1
- 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/type-aliases/ClearTimeout.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/CreateRealm.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/Env.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/Exec.md +1 -1
- 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/Performance.md +3 -3
- package/api/@wtf/project-wpt/index/type-aliases/Realm.md +3 -3
- package/api/@wtf/project-wpt/index/type-aliases/SetTimeout.md +1 -1
- 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 +6 -6
- package/api/@wtf/project-wpt/index/type-aliases/WptSystem.md +6 -6
- 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/functions/nodePlatform.md +1 -1
- package/api/@wtf/project-wpt/node/functions/nodeSystem.md +1 -1
- package/api/@wtf/project-wpt/node/variables/nodeExec.md +1 -1
- 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 +8 -8
- package/api/@wtf/project-wpt/run/type-aliases/RunPlatform.md +1 -1
- 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 +39 -0
- package/api/@wtf/project-wpt/schema/type-aliases/WptConfig.md +27 -0
- package/api/@wtf/project-wpt/schema/type-aliases/WptSuiteConfig.md +19 -0
- package/api/@wtf/project-wpt/schema/variables/wptSchema.md +13 -0
- 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/README.md +1 -0
- package/api/trains.json +3 -0
- package/guides/astro.md +83 -26
- package/guides/config.md +153 -0
- package/guides/presets.md +16 -0
- package/package.json +10 -9
- package/api/@wtf/project-oxfmt/variables/default.md +0 -19
- package/api/@wtf/project-oxlint/variables/default.md +0 -30
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type IgnoredLine = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:40](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:40](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L40)
|
|
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:42](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
21
|
+
Defined in: [packages/project-astro/src/index.ts:42](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L42)
|
|
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:46](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
33
|
+
Defined in: [packages/project-astro/src/index.ts:46](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L46)
|
|
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:44](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
45
|
+
Defined in: [packages/project-astro/src/index.ts:44](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L44)
|
|
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:34](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:34](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L34)
|
|
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:36](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
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:36](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L36) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type RedirectMatch = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:58](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:58](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L58)
|
|
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:62](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
21
|
+
Defined in: [packages/project-astro/src/index.ts:62](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L62)
|
|
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:60](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
33
|
+
Defined in: [packages/project-astro/src/index.ts:60](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L60)
|
|
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:22](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:22](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L22)
|
|
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:24](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
23
|
+
Defined in: [packages/project-astro/src/index.ts:24](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L24)
|
|
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:30](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
35
|
+
Defined in: [packages/project-astro/src/index.ts:30](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L30)
|
|
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:28](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
47
|
+
Defined in: [packages/project-astro/src/index.ts:28](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L28)
|
|
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:26](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
59
|
+
Defined in: [packages/project-astro/src/index.ts:26](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L26)
|
|
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:15](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:15](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L15)
|
|
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:74](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:74](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L74)
|
|
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:76](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
17
|
+
| `location` | `string` | Where GitLab Pages sends the link, such as `/en/guides/` of `/en/guides`. | [packages/project-astro/src/index.ts:76](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L76) |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type Redirects = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/index.ts:50](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/index.ts:50](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L50)
|
|
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:54](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
21
|
+
Defined in: [packages/project-astro/src/index.ts:54](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L54)
|
|
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:52](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
33
|
+
Defined in: [packages/project-astro/src/index.ts:52](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/index.ts#L52)
|
|
34
34
|
|
|
35
35
|
The rules GitLab Pages reads, in the order of the file.
|
|
@@ -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:151](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:151](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/links.ts#L151)
|
|
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
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function links(): AstroIntegration;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/links.ts:190](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:190](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/links.ts#L190)
|
|
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`
|
|
@@ -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:166](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:166](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/links.ts#L166)
|
|
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
|
|
@@ -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:44](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:44](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/links.ts#L44)
|
|
10
10
|
|
|
11
11
|
The name of the integration [links](../functions/links.md) gives, and of the one it adds to run last.
|
|
@@ -12,7 +12,10 @@ Standard:
|
|
|
12
12
|
- [slashFolderLinksIn](functions/slashFolderLinksIn.md): each link to a page built as a folder given its final slash, as
|
|
13
13
|
GitLab Pages answers it without one with a redirect;
|
|
14
14
|
- [fixSearchUrlsIn](functions/fixSearchUrlsIn.md): each page of Pagefind's index given the URL it is served at, once it
|
|
15
|
-
moved
|
|
15
|
+
moved;
|
|
16
|
+
- [redirectBaseToLocaleIn](functions/redirectBaseToLocaleIn.md): the base of a site whose default locale has its prefix, as
|
|
17
|
+
`/en/`, sent there by a rule of `_redirects`, of the locale [prefixedLocaleOf](functions/prefixedLocaleOf.md) reads of
|
|
18
|
+
Astro's `i18n`.
|
|
16
19
|
|
|
17
20
|
```ts
|
|
18
21
|
import type { FileSystemDirectoryHandle, FileSystemFileHandle } from '@wtf/platform/fs'
|
|
@@ -22,8 +25,14 @@ declare const dist: FileSystemDirectoryHandle
|
|
|
22
25
|
await moveConflictingPages(dist)
|
|
23
26
|
await slashFolderLinksIn(dist, '/', 'https://example.com/')
|
|
24
27
|
await fixSearchUrlsIn(dist, '/')
|
|
28
|
+
await redirectBaseToLocaleIn(dist, '/', 'en')
|
|
25
29
|
```
|
|
26
30
|
|
|
31
|
+
## Type Aliases
|
|
32
|
+
|
|
33
|
+
- [I18n](type-aliases/I18n.md)
|
|
34
|
+
- [PagesOptions](type-aliases/PagesOptions.md)
|
|
35
|
+
|
|
27
36
|
## Variables
|
|
28
37
|
|
|
29
38
|
- [PAGES](variables/PAGES.md)
|
|
@@ -33,4 +42,6 @@ await fixSearchUrlsIn(dist, '/')
|
|
|
33
42
|
- [fixSearchUrlsIn](functions/fixSearchUrlsIn.md)
|
|
34
43
|
- [moveConflictingPages](functions/moveConflictingPages.md)
|
|
35
44
|
- [pages](functions/pages.md)
|
|
45
|
+
- [prefixedLocaleOf](functions/prefixedLocaleOf.md)
|
|
46
|
+
- [redirectBaseToLocaleIn](functions/redirectBaseToLocaleIn.md)
|
|
36
47
|
- [slashFolderLinksIn](functions/slashFolderLinksIn.md)
|
|
@@ -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:193](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/pages.ts#L193)
|
|
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:60](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/pages.ts#L60)
|
|
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,18 +3,21 @@
|
|
|
3
3
|
# Function: pages()
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
|
-
function pages(): AstroIntegration;
|
|
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:353](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/pages.ts#L353)
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
([
|
|
17
|
-
|
|
13
|
+
sends the base of a site whose default locale has its prefix there
|
|
14
|
+
([redirectBaseToLocaleIn](redirectBaseToLocaleIn.md)), of the locales of Astro's `i18n` ([prefixedLocaleOf](prefixedLocaleOf.md)),
|
|
15
|
+
unless `localeRedirect` is `false`; moves each page beside a folder of its name into it
|
|
16
|
+
([moveConflictingPages](moveConflictingPages.md)), gives each link to a page built as a folder its final slash, of
|
|
17
|
+
the pages and the sitemap ([slashFolderLinksIn](slashFolderLinksIn.md)), and gives each page of the search index
|
|
18
|
+
the URL it is served at ([fixSearchUrlsIn](fixSearchUrlsIn.md)), under the site's `base`. It reads the folder of
|
|
19
|
+
the build on the disk, by `nodeDirectory` of `@wtf/platform-fs-node/handles`. `baseConfig()` of
|
|
20
|
+
`./config` lists it.
|
|
18
21
|
|
|
19
22
|
```ts
|
|
20
23
|
import { defineConfig } from 'astro/config'
|
|
@@ -22,10 +25,17 @@ import { defineConfig } from 'astro/config'
|
|
|
22
25
|
export default defineConfig({
|
|
23
26
|
trailingSlash: 'never',
|
|
24
27
|
build: { format: 'preserve' },
|
|
28
|
+
i18n: { locales: ['en', 'sv'], defaultLocale: 'en', routing: { prefixDefaultLocale: true } },
|
|
25
29
|
integrations: [pages()]
|
|
26
30
|
})
|
|
27
31
|
```
|
|
28
32
|
|
|
33
|
+
## Parameters
|
|
34
|
+
|
|
35
|
+
| Parameter | Type |
|
|
36
|
+
| ------ | ------ |
|
|
37
|
+
| `options` | [`PagesOptions`](../type-aliases/PagesOptions.md) |
|
|
38
|
+
|
|
29
39
|
## Returns
|
|
30
40
|
|
|
31
41
|
`AstroIntegration`
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [pages](../README.md) / prefixedLocaleOf
|
|
2
|
+
|
|
3
|
+
# Function: prefixedLocaleOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function prefixedLocaleOf(i18n): string | undefined;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:257](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/pages.ts#L257)
|
|
10
|
+
|
|
11
|
+
The prefix of the default locale of a site whose URLs all start with their locale, as `en` of
|
|
12
|
+
`/en/`, of Astro's `i18n`: the `path` of the locale of `locales` that is its `defaultLocale`, by
|
|
13
|
+
its name or one of its `codes`. None of a site of no `i18n`, of `routing: 'manual'`, which routes
|
|
14
|
+
its locales itself, and of a site whose default locale has no prefix (`prefixDefaultLocale:
|
|
15
|
+
false`), as a site of one locale at its root. Starlight sets Astro's `i18n` of its own `locales`
|
|
16
|
+
and `defaultLocale` as it sets the site up, so a site of Starlight declares its locales once,
|
|
17
|
+
in one or the other, and this reads them either way.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
prefixedLocaleOf({
|
|
21
|
+
defaultLocale: 'en',
|
|
22
|
+
locales: ['en', 'sv'],
|
|
23
|
+
routing: { prefixDefaultLocale: true, redirectToDefaultLocale: false, fallbackType: 'redirect' }
|
|
24
|
+
}) // 'en'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type |
|
|
30
|
+
| ------ | ------ |
|
|
31
|
+
| `i18n` | [`I18n`](../type-aliases/I18n.md) \| `undefined` |
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`string` \| `undefined`
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [pages](../README.md) / redirectBaseToLocaleIn
|
|
2
|
+
|
|
3
|
+
# Function: redirectBaseToLocaleIn()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function redirectBaseToLocaleIn(
|
|
7
|
+
folder,
|
|
8
|
+
base,
|
|
9
|
+
locale
|
|
10
|
+
): Promise<
|
|
11
|
+
| RedirectInput
|
|
12
|
+
| undefined>;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Defined in: [packages/project-astro/src/pages.ts:308](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/pages.ts#L308)
|
|
16
|
+
|
|
17
|
+
Sends the base of a built site, served under `base`, to the path of its default locale,
|
|
18
|
+
`<base><locale>/`, by a `302` rule of the `_redirects` of `folder`, its folder of the build: the
|
|
19
|
+
rule a site whose URLs all start with their locale needs on GitLab Pages, where nothing else
|
|
20
|
+
answers its base. Astro builds no page there, or, of `redirectToDefaultLocale`, a page of a meta
|
|
21
|
+
refresh, which GitLab Pages serves as a page, `200`, and so before any rule: this removes that
|
|
22
|
+
page. It merges the rule with the site's own `_redirects`: before the rules there, which stay as
|
|
23
|
+
they are, unless one of them is of the base already, which wins. It writes nothing of a site
|
|
24
|
+
that builds a page of its own at its base, which GitLab Pages serves. Resolves to the rule it
|
|
25
|
+
wrote, or none.
|
|
26
|
+
|
|
27
|
+
## Parameters
|
|
28
|
+
|
|
29
|
+
| Parameter | Type |
|
|
30
|
+
| ------ | ------ |
|
|
31
|
+
| `folder` | `FileSystemDirectoryHandle` |
|
|
32
|
+
| `base` | `string` |
|
|
33
|
+
| `locale` | `string` |
|
|
34
|
+
|
|
35
|
+
## Returns
|
|
36
|
+
|
|
37
|
+
`Promise`\<
|
|
38
|
+
\| [`RedirectInput`](../../index/type-aliases/RedirectInput.md)
|
|
39
|
+
\| `undefined`\>
|
|
@@ -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:98](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/pages.ts#L98)
|
|
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,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [pages](../README.md) / I18n
|
|
2
|
+
|
|
3
|
+
# Type Alias: I18n
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type I18n = Pick<NonNullable<AstroConfig["i18n"]>, "defaultLocale" | "locales" | "routing">;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:238](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/pages.ts#L238)
|
|
10
|
+
|
|
11
|
+
The locales of a site, as Astro's `i18n` has them once it is set up, and as Starlight sets it.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [pages](../README.md) / PagesOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: PagesOptions
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type PagesOptions = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:228](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/pages.ts#L228)
|
|
10
|
+
|
|
11
|
+
What [pages](../functions/pages.md) takes.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### localeRedirect?
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
readonly optional localeRedirect?: boolean;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Defined in: [packages/project-astro/src/pages.ts:234](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/pages.ts#L234)
|
|
22
|
+
|
|
23
|
+
Whether the base of a site whose default locale has its prefix, as `/en/`, sends a reader
|
|
24
|
+
there, by a rule of `_redirects` ([redirectBaseToLocaleIn](../functions/redirectBaseToLocaleIn.md)): by default. It reads the
|
|
25
|
+
locales of Astro's `i18n`, which Starlight sets of its own `locales`.
|
|
@@ -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:53](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/pages.ts#L53)
|
|
10
10
|
|
|
11
11
|
The name of the integration [pages](../functions/pages.md) gives, and of the one it adds to run last.
|
|
@@ -4,18 +4,25 @@
|
|
|
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;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
`404.html`, under the site's base; [previewOf](functions/previewOf.md), the same of a folder of the disk by its
|
|
8
|
+
path, of the base of the environment, with a warning of each line of `_redirects` GitLab Pages
|
|
9
|
+
ignores; the parts it is made of, [files](functions/files.md) and [notFound](functions/notFound.md); and [listen](functions/listen.md), which
|
|
10
|
+
serves a handler on Node's HTTP server until it is closed, or its signal aborted. The folder is a
|
|
11
|
+
handle of the WHATWG File System Standard, so a test can serve one in memory.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
import { nodeDirectory } from '@wtf/platform-fs-node/handles'
|
|
13
|
+
A script of a repo serves its build so, of the flags it chooses:
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
```ts
|
|
16
|
+
// scripts/preview.ts
|
|
17
|
+
import { listen, previewOf } from '@wtf/project-astro/preview'
|
|
18
|
+
|
|
19
|
+
const site = await previewOf('dist')
|
|
20
|
+
for (const warning of site.warnings) console.warn(warning)
|
|
21
|
+
const stop = new AbortController()
|
|
22
|
+
for (const signal of ['SIGINT', 'SIGTERM'] as const) process.once(signal, () => stop.abort())
|
|
23
|
+
const server = await listen(site.handler, { port: 4321, signal: stop.signal })
|
|
24
|
+
console.log(`Serving dist as GitLab Pages does at ${site.urlOf(server)}`)
|
|
25
|
+
await server.closed
|
|
19
26
|
```
|
|
20
27
|
|
|
21
28
|
## Type Aliases
|
|
@@ -25,6 +32,8 @@ console.log(`${server.url}`)
|
|
|
25
32
|
- [Listening](type-aliases/Listening.md)
|
|
26
33
|
- [ListenOptions](type-aliases/ListenOptions.md)
|
|
27
34
|
- [Pages](type-aliases/Pages.md)
|
|
35
|
+
- [Preview](type-aliases/Preview.md)
|
|
36
|
+
- [PreviewOptions](type-aliases/PreviewOptions.md)
|
|
28
37
|
|
|
29
38
|
## Functions
|
|
30
39
|
|
|
@@ -32,3 +41,4 @@ console.log(`${server.url}`)
|
|
|
32
41
|
- [listen](functions/listen.md)
|
|
33
42
|
- [notFound](functions/notFound.md)
|
|
34
43
|
- [pagesOf](functions/pagesOf.md)
|
|
44
|
+
- [previewOf](functions/previewOf.md)
|
|
@@ -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:348](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/preview.ts#L348)
|
|
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,12 +6,14 @@
|
|
|
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:588](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/preview.ts#L588)
|
|
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`
|
|
13
13
|
written back, its body streamed. A handler that throws is answered `500`. Resolves once the
|
|
14
|
-
server listens, with the URL it is served at; rejects of a port it cannot listen on
|
|
14
|
+
server listens, with the URL it is served at; rejects of a port it cannot listen on, or of a
|
|
15
|
+
`signal` aborted already. It serves until it is closed, or its `signal` is aborted: then
|
|
16
|
+
`closed` resolves.
|
|
15
17
|
|
|
16
18
|
## Parameters
|
|
17
19
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function notFound(folder, path): Handler;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:376](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/preview.ts#L376)
|
|
10
10
|
|
|
11
11
|
A [Handler](../type-aliases/Handler.md) that answers every request with the page at `path` of `folder`, such as
|
|
12
12
|
`404.html`, and the status `404 Not Found`. A `HEAD` gets its head alone. Without the page, the
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function pagesOf(folder, base): Promise<Pages>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:477](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/preview.ts#L477)
|
|
10
10
|
|
|
11
11
|
The site built into `folder`, served under `base` as GitLab Pages serves it. A file at the path
|
|
12
12
|
wins: a folder's `index.html`, and `<path>.html` of a clean URL ([files](files.md)). Then the first
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [preview](../README.md) / previewOf
|
|
2
|
+
|
|
3
|
+
# Function: previewOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function previewOf(folder, __namedParameters?): Promise<Preview>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:499](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/preview.ts#L499)
|
|
10
|
+
|
|
11
|
+
The site built into `folder` to preview as GitLab Pages serves it, as [pagesOf](pagesOf.md) serves it:
|
|
12
|
+
the folder by its path, on the disk, or its handle; under the `base` given, else the base of
|
|
13
|
+
`ASTRO_BASE` or `CI_PAGES_URL` of the environment, else `/`. Its `warnings` say each line of its
|
|
14
|
+
`_redirects` GitLab Pages ignores. A folder that is not there rejects, as its handle does.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| ------ | ------ |
|
|
20
|
+
| `folder` | `string` \| `FileSystemDirectoryHandle` |
|
|
21
|
+
| `__namedParameters` | [`PreviewOptions`](../type-aliases/PreviewOptions.md) |
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`Promise`\<[`Preview`](../type-aliases/Preview.md)\>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type FilesOptions = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:48](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/preview.ts#L48)
|
|
10
10
|
|
|
11
11
|
How [files](../functions/files.md) serves a folder.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ How [files](../functions/files.md) serves a folder.
|
|
|
18
18
|
readonly optional cleanUrls?: boolean;
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
21
|
+
Defined in: [packages/project-astro/src/preview.ts:53](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/preview.ts#L53)
|
|
22
22
|
|
|
23
23
|
Serve a clean URL from its page: `/guide`, or `/guide/`, from `guide.html` when there is no
|
|
24
24
|
file or folder `guide`, as GitLab Pages does. Off by default.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type Handler = (request) => Promise<Response>;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:45](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.1.0/packages/project-astro/src/preview.ts#L45)
|
|
10
10
|
|
|
11
11
|
What answers a request: a function of the Fetch API's `Request` and `Response`.
|
|
12
12
|
|