@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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [path](../README.md) / valueAt
|
|
2
|
+
|
|
3
|
+
# Function: valueAt()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function valueAt(value, path): unknown;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/path.ts:33](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/path.ts#L33)
|
|
10
|
+
|
|
11
|
+
The value at `path` of `value`, by each key in turn: of an object, its own key; of a list, its
|
|
12
|
+
index. `undefined` when one is not there, or when a value on the way is no object or list.
|
|
13
|
+
|
|
14
|
+
## Parameters
|
|
15
|
+
|
|
16
|
+
| Parameter | Type |
|
|
17
|
+
| ------ | ------ |
|
|
18
|
+
| `value` | `unknown` |
|
|
19
|
+
| `path` | [`ConfigPath`](../../index/type-aliases/ConfigPath.md) |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`unknown`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@wtf/project-config](../README.md) / placeholder
|
|
2
|
+
|
|
3
|
+
# placeholder
|
|
4
|
+
|
|
5
|
+
A value of the configuration that points at the environment: a placeholder `${env:NAME}` in a
|
|
6
|
+
string, as `"clientSecret": "${env:CLIENT_SECRET}"`, or in a longer one,
|
|
7
|
+
`"https://${env:HOST}/api"`. [expandPlaceholders](functions/expandPlaceholders.md) gives a value, and [expandString](functions/expandString.md)
|
|
8
|
+
a string, with each placeholder taken for the variable of the environment it names, of the
|
|
9
|
+
environment the caller gives; `sectionOf` of ./section does it as a tool reads its section,
|
|
10
|
+
before the schema checks it. Only that form is one, with `NAME` of letters, digits and `_`, not
|
|
11
|
+
starting with a digit: `${version}`, `${foo}` and every other `$` or `{` stay as they are.
|
|
12
|
+
`$${env:NAME}` is the text `${env:NAME}`. A variable that is not set, or is empty, is an
|
|
13
|
+
[EnvPlaceholderUnsetError](../errors/classes/EnvPlaceholderUnsetError.md), which names the path of the value and the variable, and no
|
|
14
|
+
value. Nothing here reads the environment of a process.
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
expandString('https://${env:HOST}/api', ['wtf', 'astro', 'url'], { HOST: 'a.example' })
|
|
18
|
+
// 'https://a.example/api'
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Functions
|
|
22
|
+
|
|
23
|
+
- [expandPlaceholders](functions/expandPlaceholders.md)
|
|
24
|
+
- [expandString](functions/expandString.md)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [placeholder](../README.md) / expandPlaceholders
|
|
2
|
+
|
|
3
|
+
# Function: expandPlaceholders()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function expandPlaceholders(
|
|
7
|
+
value,
|
|
8
|
+
path,
|
|
9
|
+
environment
|
|
10
|
+
): unknown;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [packages/project-config/src/placeholder.ts:57](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/placeholder.ts#L57)
|
|
14
|
+
|
|
15
|
+
`value` with [expandString](expandString.md) of every string in it, at any depth, in the objects and lists:
|
|
16
|
+
the values of an object, and not its keys; a number, a boolean, `null`, and anything that is no
|
|
17
|
+
plain object or list, as it is. `path` is where `value` is, which a refusal names, as
|
|
18
|
+
`['wtf', 'astro']`; each key goes after it. `value` is not changed: it is copied where a
|
|
19
|
+
string in it is not as it was written.
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type |
|
|
24
|
+
| ------ | ------ |
|
|
25
|
+
| `value` | `unknown` |
|
|
26
|
+
| `path` | [`ConfigPath`](../../index/type-aliases/ConfigPath.md) |
|
|
27
|
+
| `environment` | [`Environment`](../../env/type-aliases/Environment.md) |
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
`unknown`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [placeholder](../README.md) / expandString
|
|
2
|
+
|
|
3
|
+
# Function: expandString()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function expandString(
|
|
7
|
+
text,
|
|
8
|
+
path,
|
|
9
|
+
environment
|
|
10
|
+
): string;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [packages/project-config/src/placeholder.ts:34](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/placeholder.ts#L34)
|
|
14
|
+
|
|
15
|
+
`text` with each placeholder `${env:NAME}` taken for the variable `NAME` of `environment`, and
|
|
16
|
+
each `$${env:NAME}` for the text `${env:NAME}`; the rest as it is. What a variable holds is not
|
|
17
|
+
read again, so a value with a placeholder in it stays one. A variable that is not set or is
|
|
18
|
+
empty is an [EnvPlaceholderUnsetError](../../errors/classes/EnvPlaceholderUnsetError.md) of `path`, the path of the value `text` is, from
|
|
19
|
+
the key that names the configuration, as `['wtf', 'astro', 'url']`.
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type |
|
|
24
|
+
| ------ | ------ |
|
|
25
|
+
| `text` | `string` |
|
|
26
|
+
| `path` | [`ConfigPath`](../../index/type-aliases/ConfigPath.md) |
|
|
27
|
+
| `environment` | [`Environment`](../../env/type-aliases/Environment.md) |
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
`string`
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@wtf/project-config](../README.md) / schema
|
|
2
|
+
|
|
3
|
+
# schema
|
|
4
|
+
|
|
5
|
+
The JSON Schema of a namespace's configuration, of the schemas of the sections of the tools a
|
|
6
|
+
project uses: [namespaceSchema](functions/namespaceSchema.md). Each tool's package exports the schema of its options, as
|
|
7
|
+
`viteSchema` of `@wtf/project-vite/schema`, a Standard Schema that gives its JSON Schema; the
|
|
8
|
+
schema of the whole has each at the property of its section, and takes any other section as it
|
|
9
|
+
is. An editor completes `wtf.config.json` by it.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { namespaceSchema } from '@wtf/project-config/schema'
|
|
13
|
+
import { viteSchema } from '@wtf/project-vite/schema'
|
|
14
|
+
|
|
15
|
+
const schema = namespaceSchema('wtf', { vite: viteSchema })
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Type Aliases
|
|
19
|
+
|
|
20
|
+
- [NamespaceSchemaOptions](type-aliases/NamespaceSchemaOptions.md)
|
|
21
|
+
|
|
22
|
+
## Variables
|
|
23
|
+
|
|
24
|
+
- [JSON\_SCHEMA\_DRAFT](variables/JSON_SCHEMA_DRAFT.md)
|
|
25
|
+
|
|
26
|
+
## Functions
|
|
27
|
+
|
|
28
|
+
- [namespaceSchema](functions/namespaceSchema.md)
|
|
29
|
+
- [sectionIdOf](functions/sectionIdOf.md)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [schema](../README.md) / namespaceSchema
|
|
2
|
+
|
|
3
|
+
# Function: namespaceSchema()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function namespaceSchema(
|
|
7
|
+
namespace,
|
|
8
|
+
sections,
|
|
9
|
+
__namedParameters?
|
|
10
|
+
): object;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [packages/project-config/src/schema.ts:51](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/schema.ts#L51)
|
|
14
|
+
|
|
15
|
+
The JSON Schema of the configuration of `namespace`, of draft 2020-12, of `sections`, the schema
|
|
16
|
+
of each section by its name: a JSON Schema, or a Standard Schema that gives one, as zod's and
|
|
17
|
+
the presets' do, of its input. It is an object with each section at its property, checked by its
|
|
18
|
+
schema; the `$schema` key, by which a file names its schema; and any other key as it is. A
|
|
19
|
+
schema that gives no JSON Schema, as a function, takes any value.
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type |
|
|
24
|
+
| ------ | ------ |
|
|
25
|
+
| `namespace` | `string` |
|
|
26
|
+
| `sections` | `Readonly`\<`Record`\<`string`, [`SectionSchema`](../../index/type-aliases/SectionSchema.md)\>\> |
|
|
27
|
+
| `__namedParameters` | [`NamespaceSchemaOptions`](../type-aliases/NamespaceSchemaOptions.md) |
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
`object`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [schema](../README.md) / sectionIdOf
|
|
2
|
+
|
|
3
|
+
# Function: sectionIdOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function sectionIdOf(namespace, name): string;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/schema.ts:27](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/schema.ts#L27)
|
|
10
|
+
|
|
11
|
+
The `$id` of a section's schema that has none: a `$ref` in it, as `#/$defs/x`, is then of the
|
|
12
|
+
section's own schema, and not of the whole.
|
|
13
|
+
|
|
14
|
+
## Parameters
|
|
15
|
+
|
|
16
|
+
| Parameter | Type |
|
|
17
|
+
| ------ | ------ |
|
|
18
|
+
| `namespace` | `string` |
|
|
19
|
+
| `name` | `string` |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`string`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [schema](../README.md) / NamespaceSchemaOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: NamespaceSchemaOptions
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type NamespaceSchemaOptions = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/schema.ts:30](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/schema.ts#L30)
|
|
10
|
+
|
|
11
|
+
What the schema of the whole says of itself.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### description?
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
readonly optional description?: string;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Defined in: [packages/project-config/src/schema.ts:32](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/schema.ts#L32)
|
|
22
|
+
|
|
23
|
+
***
|
|
24
|
+
|
|
25
|
+
### title?
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
readonly optional title?: string;
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Defined in: [packages/project-config/src/schema.ts:31](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/schema.ts#L31)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [schema](../README.md) / JSON\_SCHEMA\_DRAFT
|
|
2
|
+
|
|
3
|
+
# Variable: JSON\_SCHEMA\_DRAFT
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
const JSON_SCHEMA_DRAFT: "https://json-schema.org/draft/2020-12/schema" = 'https://json-schema.org/draft/2020-12/schema';
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/schema.ts:21](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/schema.ts#L21)
|
|
10
|
+
|
|
11
|
+
The draft of the JSON Schema [namespaceSchema](../functions/namespaceSchema.md) gives, and a section's is read as.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@wtf/project-config](../README.md) / section
|
|
2
|
+
|
|
3
|
+
# section
|
|
4
|
+
|
|
5
|
+
A tool's section of the configuration: [sectionOf](functions/sectionOf.md), the section of a name, the project's
|
|
6
|
+
merged over the defaults of the tool's package ([mergeSection](functions/mergeSection.md)), with the environment's
|
|
7
|
+
variables the tool gives over both, each placeholder `${env:NAME}` in it replaced by the variable
|
|
8
|
+
it names, and checked by the schema the tool gives; [sectionOfSync](functions/sectionOfSync.md), the same, checked
|
|
9
|
+
synchronously; and [issuesOf](functions/issuesOf.md) and [issuesOfSync](functions/issuesOfSync.md), what a schema finds wrong with a
|
|
10
|
+
value. A schema is a Standard Schema, as each preset's `./schema` exports one, a JSON Schema or a
|
|
11
|
+
Standard JSON Schema, which ajv checks, or a function. What is wrong is an
|
|
12
|
+
`InvalidSectionError` of ./errors, which names the file and the path of each value.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { loadConfig } from '@wtf/project-config/node'
|
|
16
|
+
import { sectionOf } from '@wtf/project-config/section'
|
|
17
|
+
import { baseConfig } from '@wtf/project-vite/config'
|
|
18
|
+
import { viteSchema } from '@wtf/project-vite/schema'
|
|
19
|
+
|
|
20
|
+
const config = await loadConfig(process.cwd())
|
|
21
|
+
export default baseConfig({ ...(await sectionOf(config, 'vite', viteSchema)) })
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Type Aliases
|
|
25
|
+
|
|
26
|
+
- [Checked](type-aliases/Checked.md)
|
|
27
|
+
|
|
28
|
+
## Functions
|
|
29
|
+
|
|
30
|
+
- [issuesOf](functions/issuesOf.md)
|
|
31
|
+
- [issuesOfSync](functions/issuesOfSync.md)
|
|
32
|
+
- [mergeSection](functions/mergeSection.md)
|
|
33
|
+
- [sectionOf](functions/sectionOf.md)
|
|
34
|
+
- [sectionOfSync](functions/sectionOfSync.md)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [section](../README.md) / issuesOf
|
|
2
|
+
|
|
3
|
+
# Function: issuesOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function issuesOf<T>(value, schema): Promise<Checked<T>>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/section.ts:124](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/section.ts#L124)
|
|
10
|
+
|
|
11
|
+
What `schema` finds wrong with `value`, none when it is valid, and the value as it reads it: a
|
|
12
|
+
Standard Schema's output, or `value` itself. A Standard Schema that validates is asked; a JSON
|
|
13
|
+
Schema, or a Standard JSON Schema of none, is checked by ajv; a function is called.
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
| Type Parameter |
|
|
18
|
+
| ------ |
|
|
19
|
+
| `T` |
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type |
|
|
24
|
+
| ------ | ------ |
|
|
25
|
+
| `value` | `unknown` |
|
|
26
|
+
| `schema` | [`SectionSchema`](../../index/type-aliases/SectionSchema.md)\<`T`\> |
|
|
27
|
+
|
|
28
|
+
## Returns
|
|
29
|
+
|
|
30
|
+
`Promise`\<[`Checked`](../type-aliases/Checked.md)\<`T`\>\>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [section](../README.md) / issuesOfSync
|
|
2
|
+
|
|
3
|
+
# Function: issuesOfSync()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function issuesOfSync<T>(
|
|
7
|
+
value,
|
|
8
|
+
schema,
|
|
9
|
+
section?
|
|
10
|
+
): Checked<T>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [packages/project-config/src/section.ts:137](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/section.ts#L137)
|
|
14
|
+
|
|
15
|
+
What `schema` finds wrong with `value`, as [issuesOf](issuesOf.md) checks it, checked synchronously: a
|
|
16
|
+
schema that answers with a promise is a [SyncSchemaError](../../errors/classes/SyncSchemaError.md) of the section `section`.
|
|
17
|
+
|
|
18
|
+
## Type Parameters
|
|
19
|
+
|
|
20
|
+
| Type Parameter |
|
|
21
|
+
| ------ |
|
|
22
|
+
| `T` |
|
|
23
|
+
|
|
24
|
+
## Parameters
|
|
25
|
+
|
|
26
|
+
| Parameter | Type | Default value |
|
|
27
|
+
| ------ | ------ | ------ |
|
|
28
|
+
| `value` | `unknown` | `undefined` |
|
|
29
|
+
| `schema` | [`SectionSchema`](../../index/type-aliases/SectionSchema.md)\<`T`\> | `undefined` |
|
|
30
|
+
| `section` | `string` | `'configuration'` |
|
|
31
|
+
|
|
32
|
+
## Returns
|
|
33
|
+
|
|
34
|
+
[`Checked`](../type-aliases/Checked.md)\<`T`\>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [section](../README.md) / mergeSection
|
|
2
|
+
|
|
3
|
+
# Function: mergeSection()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function mergeSection(under, over): unknown;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/merge.ts:23](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/merge.ts#L23)
|
|
10
|
+
|
|
11
|
+
`over` merged over `under`, as a project's section is over the defaults of its tool: two objects
|
|
12
|
+
key by key, each key's value merged so; else `over`, a list, a value or `null` as it is, and
|
|
13
|
+
`under` where `over` is `undefined`.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
mergeSection({ a: { b: 1, c: [1] } }, { a: { c: [2] } }) // { a: { b: 1, c: [2] } }
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Parameters
|
|
20
|
+
|
|
21
|
+
| Parameter | Type |
|
|
22
|
+
| ------ | ------ |
|
|
23
|
+
| `under` | `unknown` |
|
|
24
|
+
| `over` | `unknown` |
|
|
25
|
+
|
|
26
|
+
## Returns
|
|
27
|
+
|
|
28
|
+
`unknown`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [section](../README.md) / sectionOf
|
|
2
|
+
|
|
3
|
+
# Function: sectionOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function sectionOf<T>(
|
|
7
|
+
resolved,
|
|
8
|
+
name,
|
|
9
|
+
schema?
|
|
10
|
+
): Promise<T | undefined>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [packages/project-config/src/section.ts:238](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/section.ts#L238)
|
|
14
|
+
|
|
15
|
+
The section `name` of the configuration, as its tool reads it: the project's, merged over the
|
|
16
|
+
section of the `defaults` of the tool's package when it gives some ([mergeSection](mergeSection.md)), with
|
|
17
|
+
the environment's variables the tool gave `loadConfig` over both, each that names a key of the
|
|
18
|
+
section or of its schema, as `WTF_VITE_COMPRESS` (`withEnvironment` of ./env); `undefined` when
|
|
19
|
+
none has one, which the tool takes as its own defaults. Each string in it is then read for
|
|
20
|
+
placeholders `${env:NAME}`, taken from the whole environment the tool gave (`expandPlaceholders`
|
|
21
|
+
of ./placeholder); a variable not set, or of no environment given, is an
|
|
22
|
+
`EnvPlaceholderUnsetError`. Only this, and [sectionOfSync](sectionOfSync.md), expand them, so what shows or
|
|
23
|
+
writes the configuration never holds a secret it points at. With a `schema` it is checked, and
|
|
24
|
+
what is wrong is an [InvalidSectionError](../../errors/classes/InvalidSectionError.md), which names where the value came from and the
|
|
25
|
+
path of each value, as `wtf.vite.compress`.
|
|
26
|
+
|
|
27
|
+
## Type Parameters
|
|
28
|
+
|
|
29
|
+
| Type Parameter | Default type |
|
|
30
|
+
| ------ | ------ |
|
|
31
|
+
| `T` | `unknown` |
|
|
32
|
+
|
|
33
|
+
## Parameters
|
|
34
|
+
|
|
35
|
+
| Parameter | Type |
|
|
36
|
+
| ------ | ------ |
|
|
37
|
+
| `resolved` | [`ResolvedConfig`](../../index/type-aliases/ResolvedConfig.md) |
|
|
38
|
+
| `name` | `string` |
|
|
39
|
+
| `schema?` | [`SectionSchema`](../../index/type-aliases/SectionSchema.md)\<`T`\> |
|
|
40
|
+
|
|
41
|
+
## Returns
|
|
42
|
+
|
|
43
|
+
`Promise`\<`T` \| `undefined`\>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [section](../README.md) / sectionOfSync
|
|
2
|
+
|
|
3
|
+
# Function: sectionOfSync()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function sectionOfSync<T>(
|
|
7
|
+
resolved,
|
|
8
|
+
name,
|
|
9
|
+
schema?
|
|
10
|
+
): T | undefined;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [packages/project-config/src/section.ts:256](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/section.ts#L256)
|
|
14
|
+
|
|
15
|
+
The section `name` of the configuration, as [sectionOf](sectionOf.md) reads it, checked synchronously,
|
|
16
|
+
as a tool that reads its config synchronously reads it with `loadConfigSync` of ./load. A schema
|
|
17
|
+
that checks asynchronously is a [SyncSchemaError](../../errors/classes/SyncSchemaError.md).
|
|
18
|
+
|
|
19
|
+
## Type Parameters
|
|
20
|
+
|
|
21
|
+
| Type Parameter | Default type |
|
|
22
|
+
| ------ | ------ |
|
|
23
|
+
| `T` | `unknown` |
|
|
24
|
+
|
|
25
|
+
## Parameters
|
|
26
|
+
|
|
27
|
+
| Parameter | Type |
|
|
28
|
+
| ------ | ------ |
|
|
29
|
+
| `resolved` | [`ResolvedConfig`](../../index/type-aliases/ResolvedConfig.md) |
|
|
30
|
+
| `name` | `string` |
|
|
31
|
+
| `schema?` | [`SectionSchema`](../../index/type-aliases/SectionSchema.md)\<`T`\> |
|
|
32
|
+
|
|
33
|
+
## Returns
|
|
34
|
+
|
|
35
|
+
`T` \| `undefined`
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [section](../README.md) / Checked
|
|
2
|
+
|
|
3
|
+
# Type Alias: Checked\<T\>
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type Checked<T> = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/section.ts:43](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/section.ts#L43)
|
|
10
|
+
|
|
11
|
+
What a schema found of a value: what is wrong with it, none when it is valid, and the value as
|
|
12
|
+
the schema reads it.
|
|
13
|
+
|
|
14
|
+
## Type Parameters
|
|
15
|
+
|
|
16
|
+
| Type Parameter |
|
|
17
|
+
| ------ |
|
|
18
|
+
| `T` |
|
|
19
|
+
|
|
20
|
+
## Properties
|
|
21
|
+
|
|
22
|
+
### issues
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
readonly issues: readonly ConfigIssue[];
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Defined in: [packages/project-config/src/section.ts:43](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/section.ts#L43)
|
|
29
|
+
|
|
30
|
+
***
|
|
31
|
+
|
|
32
|
+
### value
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
readonly value: T;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Defined in: [packages/project-config/src/section.ts:43](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/section.ts#L43)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@wtf/project-config](../README.md) / write
|
|
2
|
+
|
|
3
|
+
# write
|
|
4
|
+
|
|
5
|
+
A value of a project's configuration written: [setConfigValue](functions/setConfigValue.md), a value set at a path, and
|
|
6
|
+
[unsetConfigValue](functions/unsetConfigValue.md), a value taken away. Each writes the file in use, the key of
|
|
7
|
+
package.json (`wtf` by default) or a JSON file of its names (`wtf.config.json` by default); with
|
|
8
|
+
none, a set makes it in the key of package.json, or in the JSON file that is named; and it never
|
|
9
|
+
writes a file of code, as `wtf.config.ts`. The text of the file is changed in place, by
|
|
10
|
+
jsonc-parser, so what the write does not change stays as it was: its indent, its line ends and
|
|
11
|
+
the order of its keys, and a new key is the last of its object. Each reads and writes by the
|
|
12
|
+
platform it is given.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { nodeConfigPlatform } from '@wtf/project-config/node'
|
|
16
|
+
import { setConfigValue } from '@wtf/project-config/write'
|
|
17
|
+
|
|
18
|
+
await setConfigValue(process.cwd(), ['vite', 'compress'], false, {
|
|
19
|
+
platform: nodeConfigPlatform()
|
|
20
|
+
})
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Type Aliases
|
|
24
|
+
|
|
25
|
+
- [WriteOptions](type-aliases/WriteOptions.md)
|
|
26
|
+
|
|
27
|
+
## Functions
|
|
28
|
+
|
|
29
|
+
- [setConfigValue](functions/setConfigValue.md)
|
|
30
|
+
- [unsetConfigValue](functions/unsetConfigValue.md)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [write](../README.md) / setConfigValue
|
|
2
|
+
|
|
3
|
+
# Function: setConfigValue()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function setConfigValue(
|
|
7
|
+
folder,
|
|
8
|
+
path,
|
|
9
|
+
value,
|
|
10
|
+
options
|
|
11
|
+
): Promise<ConfigWrite>;
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Defined in: [packages/project-config/src/write.ts:210](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/write.ts#L210)
|
|
15
|
+
|
|
16
|
+
Set `value` at `path` of the configuration of the project in `folder`: in the file in use, the
|
|
17
|
+
key of package.json (the namespace by default) or a JSON file of the names
|
|
18
|
+
(`<namespace>.config.json` by default); with none, in the key, added to the package.json at the
|
|
19
|
+
root, by default, or in the JSON file `options.file` names, made. An object on the way that is
|
|
20
|
+
not there is made. Nothing is written when the value is already so.
|
|
21
|
+
|
|
22
|
+
Throws a `ConfigInCodeError` when the configuration is code, as `<namespace>.config.ts`; a
|
|
23
|
+
`NoConfigFileError` when there is none, and no package.json at the root to hold it, and no JSON
|
|
24
|
+
file is named; a `ConfigFileMismatchError` when the file named is not the one in use; an
|
|
25
|
+
`UnwritableConfigFileError` when the file named is neither a JSON file of the names nor
|
|
26
|
+
package.json; and a `ConfigPathError` when the path goes into a value that is no object or list.
|
|
27
|
+
|
|
28
|
+
## Parameters
|
|
29
|
+
|
|
30
|
+
| Parameter | Type |
|
|
31
|
+
| ------ | ------ |
|
|
32
|
+
| `folder` | `string` |
|
|
33
|
+
| `path` | [`ConfigPath`](../../index/type-aliases/ConfigPath.md) |
|
|
34
|
+
| `value` | `unknown` |
|
|
35
|
+
| `options` | [`WriteOptions`](../type-aliases/WriteOptions.md) |
|
|
36
|
+
|
|
37
|
+
## Returns
|
|
38
|
+
|
|
39
|
+
`Promise`\<[`ConfigWrite`](../../index/type-aliases/ConfigWrite.md)\>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [write](../README.md) / unsetConfigValue
|
|
2
|
+
|
|
3
|
+
# Function: unsetConfigValue()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function unsetConfigValue(
|
|
7
|
+
folder,
|
|
8
|
+
path,
|
|
9
|
+
options
|
|
10
|
+
): Promise<ConfigWrite>;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [packages/project-config/src/write.ts:246](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/write.ts#L246)
|
|
14
|
+
|
|
15
|
+
Take away the value at `path` of the configuration of the project in `folder`, in the file in
|
|
16
|
+
use: a JSON file of the names (`<namespace>.config.json` by default) or the key of package.json
|
|
17
|
+
(the namespace by default). Nothing is written when no value is there, or no configuration:
|
|
18
|
+
`changed` is false. An object it leaves empty stays. Throws a `ConfigInCodeError` when the
|
|
19
|
+
configuration is code, and a `ConfigFileMismatchError` when the file named is not the one in use.
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type |
|
|
24
|
+
| ------ | ------ |
|
|
25
|
+
| `folder` | `string` |
|
|
26
|
+
| `path` | [`ConfigPath`](../../index/type-aliases/ConfigPath.md) |
|
|
27
|
+
| `options` | [`WriteOptions`](../type-aliases/WriteOptions.md) |
|
|
28
|
+
|
|
29
|
+
## Returns
|
|
30
|
+
|
|
31
|
+
`Promise`\<[`ConfigWrite`](../../index/type-aliases/ConfigWrite.md)\>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [write](../README.md) / WriteOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: WriteOptions
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type WriteOptions = LocateOptions & object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/write.ts:39](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/write.ts#L39)
|
|
10
|
+
|
|
11
|
+
How a value of the configuration is written: where it is looked for, of the namespace and the
|
|
12
|
+
names of `ConfigNames`, each its default when it is not given, and the file to write.
|
|
13
|
+
|
|
14
|
+
## Type Declaration
|
|
15
|
+
|
|
16
|
+
| Name | Type | Description | Defined in |
|
|
17
|
+
| ------ | ------ | ------ | ------ |
|
|
18
|
+
| `file?` | `string` | The file to write: where none holds the configuration, the one to make it in, the key of package.json (`package.json`) by default, or a JSON file of the names, as `<namespace>.config.json`; where one does, it must be that one, or the write is a `ConfigFileMismatchError`. Any other file is an `UnwritableConfigFileError`. | [packages/project-config/src/write.ts:46](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/write.ts#L46) |
|