@wtf/project-docs 1.1.0 → 2.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/README.md +2 -0
- package/api/.generated +134 -12
- package/api/@wtf/project-astro/README.md +53 -14
- package/api/@wtf/project-astro/config/functions/baseConfig.md +1 -1
- 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 +6 -6
- 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 +2 -2
- 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 +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 +1 -1
- package/api/@wtf/project-astro/pages/functions/slashFolderLinksIn.md +1 -1
- 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 +5 -1
- package/api/@wtf/project-astro/preview/functions/listen.md +4 -2
- package/api/@wtf/project-astro/preview/functions/notFound.md +3 -2
- package/api/@wtf/project-astro/preview/functions/pagesOf.md +4 -3
- 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 +37 -20
- 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 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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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:
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:151](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.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,13 +6,13 @@
|
|
|
6
6
|
function links(): AstroIntegration;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/links.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:190](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.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`
|
|
13
13
|
included. Once the build is done, after every other integration's own hook, and after
|
|
14
14
|
`pages()` of `./pages` where it is listed before this, it checks each page under the site's
|
|
15
|
-
`base
|
|
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
17
|
which says where each one leads. It logs each one first. It reads the folder of the build on the
|
|
18
18
|
disk, by `nodeDirectory` of `@wtf/platform-fs-node/handles`. `baseConfig()` of `./config` lists
|
|
@@ -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:166](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.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:
|
|
9
|
+
Defined in: [packages/project-astro/src/links.ts:44](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.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.
|
|
@@ -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:187](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/pages.ts#L187)
|
|
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:54](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:54](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/pages.ts#L54)
|
|
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
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function pages(): AstroIntegration;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/pages.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:240](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/pages.ts#L240)
|
|
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
|
|
@@ -10,7 +10,7 @@ function slashFolderLinksIn(
|
|
|
10
10
|
): Promise<number>;
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Defined in: [packages/project-astro/src/pages.ts:92](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
13
|
+
Defined in: [packages/project-astro/src/pages.ts:92](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/pages.ts#L92)
|
|
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
|
const PAGES: "wtf-project:pages" = 'wtf-project:pages';
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/pages.ts:47](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/pages.ts:47](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/pages.ts#L47)
|
|
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.0.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:
|
|
@@ -27,6 +27,10 @@ name, finds nothing.
|
|
|
27
27
|
Anything else, such as a path with no file, or a `POST`, is a miss: `404 Not Found`, with no
|
|
28
28
|
body, so [pagesOf](pagesOf.md) asks its next handler.
|
|
29
29
|
|
|
30
|
+
It lists the folder once, at its first request, by one walk of it, and finds the file of each
|
|
31
|
+
request in that list, as a build does not change once it is built: a file written after is not
|
|
32
|
+
served. Each answer reads its file as it is then.
|
|
33
|
+
|
|
30
34
|
## Parameters
|
|
31
35
|
|
|
32
36
|
| Parameter | Type |
|
|
@@ -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.0.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,11 +6,12 @@
|
|
|
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.0.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
|
|
13
|
-
answer is `404` with no body.
|
|
13
|
+
answer is `404` with no body. It finds the page in the one listing of the folder that
|
|
14
|
+
[files](files.md) makes.
|
|
14
15
|
|
|
15
16
|
## Parameters
|
|
16
17
|
|
|
@@ -6,14 +6,15 @@
|
|
|
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.0.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
|
|
13
13
|
rule of the folder's `_redirects` that matches, its paths written with the base, as GitLab Pages
|
|
14
14
|
reads them. Then the folder's `404.html`, with the status `404` ([notFound](notFound.md)). A path
|
|
15
|
-
outside the base gets a `404` with no body. It
|
|
16
|
-
|
|
15
|
+
outside the base gets a `404` with no body. It lists the folder once, as it reads its
|
|
16
|
+
`_redirects`, and answers each request of that list. It resolves with the lines of `_redirects`
|
|
17
|
+
that GitLab Pages ignores, and why.
|
|
17
18
|
|
|
18
19
|
## Parameters
|
|
19
20
|
|
|
@@ -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.0.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.0.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.0.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.0.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
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type ListenOptions = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:89](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L89)
|
|
10
10
|
|
|
11
11
|
Where [listen](../functions/listen.md) serves.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ Where [listen](../functions/listen.md) serves.
|
|
|
18
18
|
readonly optional host?: string;
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
21
|
+
Defined in: [packages/project-astro/src/preview.ts:91](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L91)
|
|
22
22
|
|
|
23
23
|
The host it listens on: `localhost` by default.
|
|
24
24
|
|
|
@@ -30,6 +30,18 @@ The host it listens on: `localhost` by default.
|
|
|
30
30
|
readonly optional port?: number;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
33
|
+
Defined in: [packages/project-astro/src/preview.ts:93](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L93)
|
|
34
34
|
|
|
35
35
|
The port it listens on: `4321` by default, as `astro preview`'s; `0`, a free one.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### signal?
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
readonly optional signal?: AbortSignal;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Defined in: [packages/project-astro/src/preview.ts:95](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L95)
|
|
46
|
+
|
|
47
|
+
Closes the server once it is aborted, as a script's on `SIGINT` or `SIGTERM`.
|
|
@@ -6,19 +6,31 @@
|
|
|
6
6
|
type Listening = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:99](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L99)
|
|
10
10
|
|
|
11
11
|
A handler served on Node's HTTP server, by [listen](../functions/listen.md).
|
|
12
12
|
|
|
13
13
|
## Properties
|
|
14
14
|
|
|
15
|
+
### closed
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
readonly closed: Promise<void>;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Defined in: [packages/project-astro/src/preview.ts:105](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L105)
|
|
22
|
+
|
|
23
|
+
Resolves once the server is closed, by [Listening.close](#close) or by its signal.
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
15
27
|
### url
|
|
16
28
|
|
|
17
29
|
```ts
|
|
18
30
|
readonly url: URL;
|
|
19
31
|
```
|
|
20
32
|
|
|
21
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
33
|
+
Defined in: [packages/project-astro/src/preview.ts:101](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L101)
|
|
22
34
|
|
|
23
35
|
The URL it is served at, such as `http://localhost:4321/`.
|
|
24
36
|
|
|
@@ -30,7 +42,7 @@ The URL it is served at, such as `http://localhost:4321/`.
|
|
|
30
42
|
asyncDispose: Promise<void>;
|
|
31
43
|
```
|
|
32
44
|
|
|
33
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
45
|
+
Defined in: [packages/project-astro/src/preview.ts:106](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L106)
|
|
34
46
|
|
|
35
47
|
#### Returns
|
|
36
48
|
|
|
@@ -44,7 +56,7 @@ Defined in: [packages/project-astro/src/preview.ts:70](https://gitlab.com/wetryf
|
|
|
44
56
|
close(): Promise<void>;
|
|
45
57
|
```
|
|
46
58
|
|
|
47
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
59
|
+
Defined in: [packages/project-astro/src/preview.ts:103](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L103)
|
|
48
60
|
|
|
49
61
|
Stops serving: it closes every connection, and resolves once the server is closed.
|
|
50
62
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
type Pages = object;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:57](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L57)
|
|
10
10
|
|
|
11
11
|
A built site, ready to serve: its handler, and the lines of its `_redirects` it ignores.
|
|
12
12
|
|
|
@@ -18,7 +18,7 @@ A built site, ready to serve: its handler, and the lines of its `_redirects` it
|
|
|
18
18
|
readonly handler: Handler;
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
21
|
+
Defined in: [packages/project-astro/src/preview.ts:59](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L59)
|
|
22
22
|
|
|
23
23
|
What answers each request, as GitLab Pages would.
|
|
24
24
|
|
|
@@ -30,6 +30,6 @@ What answers each request, as GitLab Pages would.
|
|
|
30
30
|
readonly ignored: readonly IgnoredLine[];
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [packages/project-astro/src/preview.ts:
|
|
33
|
+
Defined in: [packages/project-astro/src/preview.ts:61](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L61)
|
|
34
34
|
|
|
35
35
|
Each line of the site's `_redirects` that GitLab Pages ignores too, and why.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [preview](../README.md) / Preview
|
|
2
|
+
|
|
3
|
+
# Type Alias: Preview
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type Preview = Pages & object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:76](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L76)
|
|
10
|
+
|
|
11
|
+
A built site to preview, of [previewOf](../functions/previewOf.md): its [Pages](Pages.md), its base, and what to say.
|
|
12
|
+
|
|
13
|
+
## Type Declaration
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description | Defined in |
|
|
16
|
+
| ------ | ------ | ------ | ------ |
|
|
17
|
+
| `base` | `string` | The base it is served under, with a slash at each end, as `/docs/`, or `/`. | [packages/project-astro/src/preview.ts:78](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L78) |
|
|
18
|
+
| `warnings` | readonly `string`[] | A warning of each line of the site's `_redirects` that GitLab Pages ignores, and why, as `GitLab Pages ignores _redirects:2 (/old /new 301 Country=nl): …`. | [packages/project-astro/src/preview.ts:83](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L83) |
|
|
19
|
+
| `urlOf()` | (`server`) => `URL` | The URL of the site on `server`, under its base, as `http://localhost:4321/docs/`. | [packages/project-astro/src/preview.ts:85](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L85) |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [preview](../README.md) / PreviewOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: PreviewOptions
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type PreviewOptions = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/preview.ts:65](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L65)
|
|
10
|
+
|
|
11
|
+
What [previewOf](../functions/previewOf.md) takes.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### base?
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
readonly optional base?: string;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Defined in: [packages/project-astro/src/preview.ts:70](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L70)
|
|
22
|
+
|
|
23
|
+
The base the site is served under, as `/docs/`: by default, of `ASTRO_BASE` or else
|
|
24
|
+
`CI_PAGES_URL` of `env`, as `baseOf` of ./config reads it, or `/`.
|
|
25
|
+
|
|
26
|
+
***
|
|
27
|
+
|
|
28
|
+
### env?
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
readonly optional env?: Env;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Defined in: [packages/project-astro/src/preview.ts:72](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/preview.ts#L72)
|
|
35
|
+
|
|
36
|
+
The environment the base is read of: the process's own by default.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
function formatRedirects(rules): string;
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/project-astro/src/redirects.ts:130](https://gitlab.com/wetryfun/project/project/-/blob/docs-
|
|
9
|
+
Defined in: [packages/project-astro/src/redirects.ts:130](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/redirects.ts#L130)
|
|
10
10
|
|
|
11
11
|
The text of a `_redirects` file of `rules`, one line of each, in order: its path, its target and
|
|
12
12
|
its status, `301` by default. Throws an [InvalidRedirectError](../../errors/classes/InvalidRedirectError.md) of the first rule GitLab
|
|
@@ -8,7 +8,7 @@ function matchRedirect(rules, path):
|
|
|
8
8
|
| undefined;
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/project-astro/src/redirects.ts:
|
|
11
|
+
Defined in: [packages/project-astro/src/redirects.ts:215](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-astro/src/redirects.ts#L215)
|
|
12
12
|
|
|
13
13
|
The first of `rules` whose path matches `path`, the path of a URL as it is written, encoded,
|
|
14
14
|
such as `/blog/2026/hello`, and where it sends it: its `to`, each placeholder and `:splat` put
|