@wtf/project-docs 1.1.1 → 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 +1 -1
- package/api/@wtf/project-astro/links/functions/redirectedLinksIn.md +1 -1
- package/api/@wtf/project-astro/links/variables/LINKS.md +1 -1
- package/api/@wtf/project-astro/pages/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 +1 -1
- package/api/@wtf/project-astro/preview/functions/listen.md +4 -2
- package/api/@wtf/project-astro/preview/functions/notFound.md +1 -1
- package/api/@wtf/project-astro/preview/functions/pagesOf.md +1 -1
- package/api/@wtf/project-astro/preview/functions/previewOf.md +25 -0
- package/api/@wtf/project-astro/preview/type-aliases/FilesOptions.md +2 -2
- package/api/@wtf/project-astro/preview/type-aliases/Handler.md +1 -1
- package/api/@wtf/project-astro/preview/type-aliases/ListenOptions.md +15 -3
- package/api/@wtf/project-astro/preview/type-aliases/Listening.md +16 -4
- package/api/@wtf/project-astro/preview/type-aliases/Pages.md +3 -3
- package/api/@wtf/project-astro/preview/type-aliases/Preview.md +19 -0
- package/api/@wtf/project-astro/preview/type-aliases/PreviewOptions.md +36 -0
- package/api/@wtf/project-astro/redirects/functions/formatRedirects.md +1 -1
- package/api/@wtf/project-astro/redirects/functions/matchRedirect.md +1 -1
- package/api/@wtf/project-astro/redirects/functions/parseRedirects.md +1 -1
- package/api/@wtf/project-astro/redirects/variables/MAX_PARTS.md +1 -1
- package/api/@wtf/project-astro/redirects/variables/MAX_RULES.md +1 -1
- package/api/@wtf/project-astro/redirects/variables/MAX_SIZE.md +1 -1
- package/api/@wtf/project-astro/schema/README.md +23 -0
- package/api/@wtf/project-astro/schema/variables/astroSchema.md +13 -0
- package/api/@wtf/project-config/README.md +94 -0
- package/api/@wtf/project-config/define/README.md +23 -0
- package/api/@wtf/project-config/define/functions/defineConfig.md +29 -0
- package/api/@wtf/project-config/env/README.md +33 -0
- package/api/@wtf/project-config/env/functions/envNameOf.md +22 -0
- package/api/@wtf/project-config/env/functions/envPrefixOf.md +22 -0
- package/api/@wtf/project-config/env/functions/jsonSchemaOf.md +23 -0
- package/api/@wtf/project-config/env/functions/variablesOf.md +23 -0
- package/api/@wtf/project-config/env/functions/withEnvironment.md +34 -0
- package/api/@wtf/project-config/env/type-aliases/Environment.md +11 -0
- package/api/@wtf/project-config/env/type-aliases/EnvironmentValue.md +32 -0
- package/api/@wtf/project-config/env/type-aliases/WithEnvironment.md +31 -0
- package/api/@wtf/project-config/errors/README.md +31 -0
- package/api/@wtf/project-config/errors/classes/ConfigError.md +200 -0
- package/api/@wtf/project-config/errors/classes/ConfigFileMismatchError.md +175 -0
- package/api/@wtf/project-config/errors/classes/ConfigInCodeError.md +177 -0
- package/api/@wtf/project-config/errors/classes/ConfigPathError.md +174 -0
- package/api/@wtf/project-config/errors/classes/EnvPlaceholderUnsetError.md +176 -0
- package/api/@wtf/project-config/errors/classes/InvalidConfigFileError.md +179 -0
- package/api/@wtf/project-config/errors/classes/InvalidSectionError.md +185 -0
- package/api/@wtf/project-config/errors/classes/NoConfigFileError.md +178 -0
- package/api/@wtf/project-config/errors/classes/NoConfigValueError.md +174 -0
- package/api/@wtf/project-config/errors/classes/SyncConfigInCodeError.md +177 -0
- package/api/@wtf/project-config/errors/classes/SyncSchemaError.md +174 -0
- package/api/@wtf/project-config/errors/classes/UnwritableConfigFileError.md +175 -0
- package/api/@wtf/project-config/index/README.md +35 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigDefaults.md +36 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigEnvironment.md +44 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigIssue.md +31 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigNames.md +52 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigPath.md +12 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigPlatform.md +14 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigSection.md +19 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigSource.md +35 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigSyncPlatform.md +33 -0
- package/api/@wtf/project-config/index/type-aliases/ConfigWrite.md +116 -0
- package/api/@wtf/project-config/index/type-aliases/ImportModule.md +22 -0
- package/api/@wtf/project-config/index/type-aliases/JsonSchema.md +15 -0
- package/api/@wtf/project-config/index/type-aliases/LocatedConfig.md +45 -0
- package/api/@wtf/project-config/index/type-aliases/NamespaceConfig.md +29 -0
- package/api/@wtf/project-config/index/type-aliases/ResolvedConfig.md +109 -0
- package/api/@wtf/project-config/index/type-aliases/SectionSchema.md +23 -0
- package/api/@wtf/project-config/index/type-aliases/SectionsOf.md +19 -0
- package/api/@wtf/project-config/index/type-aliases/SyncFiles.md +55 -0
- package/api/@wtf/project-config/index/type-aliases/ValidateSection.md +24 -0
- package/api/@wtf/project-config/load/README.md +33 -0
- package/api/@wtf/project-config/load/functions/ignoredWarning.md +22 -0
- package/api/@wtf/project-config/load/functions/importFileModule.md +24 -0
- package/api/@wtf/project-config/load/functions/loadConfig.md +30 -0
- package/api/@wtf/project-config/load/functions/loadConfigSync.md +25 -0
- package/api/@wtf/project-config/load/type-aliases/LoadLayers.md +19 -0
- package/api/@wtf/project-config/load/type-aliases/LoadOptions.md +17 -0
- package/api/@wtf/project-config/load/type-aliases/LoadSyncOptions.md +11 -0
- package/api/@wtf/project-config/locate/README.md +40 -0
- package/api/@wtf/project-config/locate/functions/configFilesOf.md +23 -0
- package/api/@wtf/project-config/locate/functions/configNamesOf.md +24 -0
- package/api/@wtf/project-config/locate/functions/jsonFilesOf.md +22 -0
- package/api/@wtf/project-config/locate/functions/locateConfig.md +27 -0
- package/api/@wtf/project-config/locate/functions/locateConfigSync.md +23 -0
- package/api/@wtf/project-config/locate/functions/projectRootOf.md +25 -0
- package/api/@wtf/project-config/locate/functions/projectRootOfSync.md +23 -0
- package/api/@wtf/project-config/locate/type-aliases/LocateNames.md +18 -0
- package/api/@wtf/project-config/locate/type-aliases/LocateOptions.md +17 -0
- package/api/@wtf/project-config/locate/type-aliases/LocateSyncOptions.md +17 -0
- package/api/@wtf/project-config/locate/type-aliases/NamespaceNames.md +18 -0
- package/api/@wtf/project-config/locate/variables/DEFAULT_NAMESPACE.md +11 -0
- package/api/@wtf/project-config/node/README.md +27 -0
- package/api/@wtf/project-config/node/functions/loadConfig.md +24 -0
- package/api/@wtf/project-config/node/functions/loadConfigSync.md +24 -0
- package/api/@wtf/project-config/node/functions/nodeConfigPlatform.md +16 -0
- package/api/@wtf/project-config/node/functions/nodeSyncPlatform.md +16 -0
- package/api/@wtf/project-config/path/README.md +13 -0
- package/api/@wtf/project-config/path/functions/configPathOf.md +23 -0
- package/api/@wtf/project-config/path/functions/textOfConfigPath.md +21 -0
- package/api/@wtf/project-config/path/functions/valueAt.md +23 -0
- package/api/@wtf/project-config/placeholder/README.md +24 -0
- package/api/@wtf/project-config/placeholder/functions/expandPlaceholders.md +31 -0
- package/api/@wtf/project-config/placeholder/functions/expandString.md +31 -0
- package/api/@wtf/project-config/schema/README.md +29 -0
- package/api/@wtf/project-config/schema/functions/namespaceSchema.md +31 -0
- package/api/@wtf/project-config/schema/functions/sectionIdOf.md +23 -0
- package/api/@wtf/project-config/schema/type-aliases/NamespaceSchemaOptions.md +31 -0
- package/api/@wtf/project-config/schema/variables/JSON_SCHEMA_DRAFT.md +11 -0
- package/api/@wtf/project-config/section/README.md +34 -0
- package/api/@wtf/project-config/section/functions/issuesOf.md +30 -0
- package/api/@wtf/project-config/section/functions/issuesOfSync.md +34 -0
- package/api/@wtf/project-config/section/functions/mergeSection.md +28 -0
- package/api/@wtf/project-config/section/functions/sectionOf.md +43 -0
- package/api/@wtf/project-config/section/functions/sectionOfSync.md +35 -0
- package/api/@wtf/project-config/section/type-aliases/Checked.md +38 -0
- package/api/@wtf/project-config/write/README.md +30 -0
- package/api/@wtf/project-config/write/functions/setConfigValue.md +39 -0
- package/api/@wtf/project-config/write/functions/unsetConfigValue.md +31 -0
- package/api/@wtf/project-config/write/type-aliases/WriteOptions.md +18 -0
- package/api/@wtf/project-oxfmt/README.md +32 -8
- package/api/@wtf/project-oxfmt/config/README.md +23 -0
- package/api/@wtf/project-oxfmt/config/functions/oxfmtConfig.md +30 -0
- package/api/@wtf/project-oxfmt/config/type-aliases/OxfmtOptions.md +11 -0
- package/api/@wtf/project-oxfmt/config/variables/OXFMT_DEFAULTS.md +21 -0
- package/api/@wtf/project-oxfmt/config/variables/default.md +11 -0
- package/api/@wtf/project-oxfmt/schema/README.md +25 -0
- package/api/@wtf/project-oxfmt/schema/variables/oxfmtSchema.md +13 -0
- package/api/@wtf/project-oxlint/README.md +35 -8
- package/api/@wtf/project-oxlint/config/README.md +23 -0
- package/api/@wtf/project-oxlint/config/functions/oxlintConfig.md +30 -0
- package/api/@wtf/project-oxlint/config/type-aliases/OxlintOptions.md +13 -0
- package/api/@wtf/project-oxlint/config/variables/OXLINT_DEFAULTS.md +32 -0
- package/api/@wtf/project-oxlint/config/variables/default.md +11 -0
- package/api/@wtf/project-oxlint/schema/README.md +27 -0
- package/api/@wtf/project-oxlint/schema/variables/oxlintSchema.md +12 -0
- package/api/@wtf/project-resolve/condition/variables/SOURCE_CONDITION.md +1 -1
- package/api/@wtf/project-resolve/env/functions/isHook.md +1 -1
- package/api/@wtf/project-resolve/env/functions/optionsWithoutHook.md +1 -1
- package/api/@wtf/project-resolve/env/functions/withoutHook.md +1 -1
- package/api/@wtf/project-resolve/env/type-aliases/Env.md +1 -1
- package/api/@wtf/project-resolve/errors/classes/ResolveError.md +4 -4
- package/api/@wtf/project-resolve/errors/classes/UnreadableWorkspaceError.md +6 -6
- package/api/@wtf/project-resolve/errors/classes/WorkspaceError.md +5 -5
- package/api/@wtf/project-resolve/hooks/functions/candidatesOf.md +1 -1
- package/api/@wtf/project-resolve/hooks/functions/sourcesHookOf.md +1 -1
- package/api/@wtf/project-resolve/hooks/functions/sourcesOf.md +1 -1
- package/api/@wtf/project-resolve/hooks/variables/resolveTypeScript.md +1 -1
- package/api/@wtf/project-resolve/node/functions/nodePlatform.md +5 -5
- package/api/@wtf/project-resolve/register/variables/REGISTERED.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/filesOf.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/packagesOf.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/workspaceAt.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/workspaceOf.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/workspaceRootAbove.md +1 -1
- package/api/@wtf/project-resolve/workspace/functions/workspaceRootOf.md +1 -1
- package/api/@wtf/project-resolve/workspace/type-aliases/Agent.md +1 -1
- package/api/@wtf/project-resolve/workspace/type-aliases/DirectoryEntry.md +4 -4
- package/api/@wtf/project-resolve/workspace/type-aliases/FileContents.md +3 -3
- package/api/@wtf/project-resolve/workspace/type-aliases/PackageManager.md +4 -4
- package/api/@wtf/project-resolve/workspace/type-aliases/PackageManagerName.md +1 -1
- package/api/@wtf/project-resolve/workspace/type-aliases/ProcessWorkspaceOptions.md +1 -1
- package/api/@wtf/project-resolve/workspace/type-aliases/Workspace.md +5 -5
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceDirectoryHandle.md +6 -6
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceFileHandle.md +3 -3
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceFiles.md +6 -6
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceOptions.md +2 -2
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspacePackage.md +4 -4
- package/api/@wtf/project-resolve/workspace/type-aliases/WorkspacePaths.md +7 -7
- package/api/@wtf/project-typedoc/README.md +31 -4
- package/api/@wtf/project-typedoc/config/functions/gitRevisionOf.md +1 -1
- package/api/@wtf/project-typedoc/config/functions/typedocConfig.md +1 -1
- package/api/@wtf/project-typedoc/config/type-aliases/RevisionSources.md +3 -3
- package/api/@wtf/project-typedoc/config/type-aliases/TypedocConfig.md +1 -1
- package/api/@wtf/project-typedoc/config/type-aliases/TypedocOptions.md +6 -6
- package/api/@wtf/project-typedoc/config/variables/nodeRun.md +1 -1
- package/api/@wtf/project-typedoc/plugins/functions/cleanGeneratedMarkdown.md +1 -1
- package/api/@wtf/project-typedoc/plugins/functions/linkTrackedSources.md +1 -1
- package/api/@wtf/project-typedoc/plugins/functions/preventMediaFiles.md +1 -1
- package/api/@wtf/project-typedoc/plugins/type-aliases/CleanGeneratedMarkdownOptions.md +3 -3
- package/api/@wtf/project-typedoc/plugins/type-aliases/LinkTrackedSourcesOptions.md +3 -3
- package/api/@wtf/project-typedoc/plugins/type-aliases/PreventMediaFilesOptions.md +3 -3
- package/api/@wtf/project-typedoc/plugins/type-aliases/Run.md +1 -1
- package/api/@wtf/project-typedoc/plugins/type-aliases/TypedocPlugin.md +1 -1
- package/api/@wtf/project-typedoc/schema/README.md +28 -0
- package/api/@wtf/project-typedoc/schema/variables/typedocSchema.md +13 -0
- package/api/@wtf/project-vite/README.md +17 -33
- package/api/@wtf/project-vite/config/README.md +46 -0
- package/api/@wtf/project-vite/{functions → config/functions}/baseConfig.md +5 -5
- package/api/@wtf/project-vite/{functions → config/functions}/buildsSite.md +2 -2
- package/api/@wtf/project-vite/{functions → config/functions}/compress.md +2 -2
- package/api/@wtf/project-vite/{functions → config/functions}/conditionsOf.md +2 -2
- package/api/@wtf/project-vite/{type-aliases → config/type-aliases}/BaseOptions.md +3 -3
- package/api/@wtf/project-vite/{type-aliases → config/type-aliases}/CompressOptions.md +5 -5
- package/api/@wtf/project-vite/{variables → config/variables}/CLIENT_CONDITIONS.md +2 -2
- package/api/@wtf/project-vite/{variables → config/variables}/COMPRESSIBLE.md +2 -2
- package/api/@wtf/project-vite/{variables → config/variables}/FROM_DIST.md +2 -2
- package/api/@wtf/project-vite/{variables → config/variables}/THRESHOLD.md +2 -2
- package/api/@wtf/project-vite/schema/README.md +21 -0
- package/api/@wtf/project-vite/schema/variables/viteSchema.md +12 -0
- package/api/@wtf/project-vitest/README.md +26 -0
- package/api/@wtf/project-vitest/browser/functions/browserConfig.md +1 -1
- package/api/@wtf/project-vitest/browser/functions/browserRootConfig.md +1 -1
- package/api/@wtf/project-vitest/browser/type-aliases/BrowserOptions.md +3 -3
- package/api/@wtf/project-vitest/config/functions/integrationConfig.md +1 -1
- package/api/@wtf/project-vitest/config/functions/packageConfig.md +1 -1
- package/api/@wtf/project-vitest/config/functions/rootConfig.md +1 -1
- package/api/@wtf/project-vitest/config/type-aliases/RootConfigOptions.md +2 -2
- package/api/@wtf/project-vitest/config/type-aliases/RootOptions.md +7 -7
- package/api/@wtf/project-vitest/config/variables/FROM_DIST.md +1 -1
- package/api/@wtf/project-vitest/config/variables/GUARD_TIMEOUT.md +1 -1
- package/api/@wtf/project-vitest/config/variables/integration.md +9 -9
- package/api/@wtf/project-vitest/process/functions/childEnv.md +1 -1
- package/api/@wtf/project-vitest/process/type-aliases/Env.md +1 -1
- package/api/@wtf/project-vitest/schema/README.md +22 -0
- package/api/@wtf/project-vitest/schema/variables/vitestSchema.md +13 -0
- package/api/@wtf/project-vitest/storybook/functions/storybookConfig.md +1 -1
- package/api/@wtf/project-vitest/storybook/type-aliases/StorybookOptions.md +2 -2
- package/api/@wtf/project-wpt/README.md +44 -0
- package/api/@wtf/project-wpt/builtins/functions/builtins.md +1 -1
- package/api/@wtf/project-wpt/builtins/functions/intrinsics.md +1 -1
- package/api/@wtf/project-wpt/checkout/functions/checkoutFolderOf.md +1 -1
- package/api/@wtf/project-wpt/checkout/functions/checkoutTests.md +1 -1
- package/api/@wtf/project-wpt/checkout/functions/checkoutWpt.md +1 -1
- package/api/@wtf/project-wpt/checkout/functions/fileOf.md +1 -1
- package/api/@wtf/project-wpt/checkout/type-aliases/CheckedOutTests.md +3 -3
- package/api/@wtf/project-wpt/checkout/type-aliases/CheckoutOptions.md +8 -8
- package/api/@wtf/project-wpt/checkout/type-aliases/CheckoutTestsOptions.md +2 -2
- package/api/@wtf/project-wpt/checkout/variables/HARNESS.md +1 -1
- package/api/@wtf/project-wpt/checkout/variables/REWRITES.md +1 -1
- package/api/@wtf/project-wpt/checkout/variables/WPT_REPOSITORY.md +1 -1
- package/api/@wtf/project-wpt/errors/classes/HarnessFailedError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/InvalidCommitError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/InvalidExpectationsError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/NoSuiteError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/NotInWptError.md +5 -5
- package/api/@wtf/project-wpt/errors/classes/StaleExpectationError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/SubtestFailedError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/UnexpectedPassError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/WptError.md +4 -4
- package/api/@wtf/project-wpt/errors/classes/WptFetchError.md +4 -4
- package/api/@wtf/project-wpt/expectations/functions/checkHarness.md +1 -1
- package/api/@wtf/project-wpt/expectations/functions/checkSubtest.md +1 -1
- package/api/@wtf/project-wpt/expectations/functions/expectationOf.md +1 -1
- package/api/@wtf/project-wpt/expectations/functions/expectationsIssues.md +1 -1
- package/api/@wtf/project-wpt/expectations/functions/readExpectations.md +1 -1
- package/api/@wtf/project-wpt/expectations/functions/staleOf.md +1 -1
- package/api/@wtf/project-wpt/expectations/type-aliases/ReadExpectations.md +3 -3
- package/api/@wtf/project-wpt/index/type-aliases/ClearTimeout.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/CreateRealm.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/Env.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/Exec.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/Expectations.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/FileExpectation.md +4 -4
- package/api/@wtf/project-wpt/index/type-aliases/FileResult.md +4 -4
- package/api/@wtf/project-wpt/index/type-aliases/Globals.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/HarnessResult.md +4 -4
- package/api/@wtf/project-wpt/index/type-aliases/HarnessStatus.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/HoldRejections.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/Performance.md +3 -3
- package/api/@wtf/project-wpt/index/type-aliases/Realm.md +3 -3
- package/api/@wtf/project-wpt/index/type-aliases/SetTimeout.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/SubtestResult.md +5 -5
- package/api/@wtf/project-wpt/index/type-aliases/SubtestStatus.md +1 -1
- package/api/@wtf/project-wpt/index/type-aliases/WptFile.md +3 -3
- package/api/@wtf/project-wpt/index/type-aliases/WptFiles.md +9 -9
- package/api/@wtf/project-wpt/index/type-aliases/WptPaths.md +4 -4
- package/api/@wtf/project-wpt/index/type-aliases/WptPlatform.md +6 -6
- package/api/@wtf/project-wpt/index/type-aliases/WptSystem.md +6 -6
- package/api/@wtf/project-wpt/index/type-aliases/WptTest.md +3 -3
- package/api/@wtf/project-wpt/meta/functions/idOf.md +1 -1
- package/api/@wtf/project-wpt/meta/functions/metaOf.md +1 -1
- package/api/@wtf/project-wpt/meta/functions/runsOutsideWindow.md +1 -1
- package/api/@wtf/project-wpt/meta/functions/scriptPathsOf.md +1 -1
- package/api/@wtf/project-wpt/meta/functions/testsOf.md +1 -1
- package/api/@wtf/project-wpt/meta/type-aliases/Meta.md +6 -6
- package/api/@wtf/project-wpt/node/functions/nodePlatform.md +1 -1
- package/api/@wtf/project-wpt/node/functions/nodeSystem.md +1 -1
- package/api/@wtf/project-wpt/node/variables/nodeExec.md +1 -1
- package/api/@wtf/project-wpt/node/variables/nodeFiles.md +1 -1
- package/api/@wtf/project-wpt/node/variables/nodeRealm.md +1 -1
- package/api/@wtf/project-wpt/node/variables/nodeRejections.md +1 -1
- package/api/@wtf/project-wpt/run/functions/runTest.md +1 -1
- package/api/@wtf/project-wpt/run/type-aliases/RunOptions.md +8 -8
- package/api/@wtf/project-wpt/run/type-aliases/RunPlatform.md +1 -1
- package/api/@wtf/project-wpt/run/variables/LONG_TIMEOUT.md +1 -1
- package/api/@wtf/project-wpt/run/variables/TIMEOUT.md +1 -1
- package/api/@wtf/project-wpt/run/variables/WPT_ORIGIN.md +1 -1
- package/api/@wtf/project-wpt/schema/README.md +39 -0
- package/api/@wtf/project-wpt/schema/type-aliases/WptConfig.md +27 -0
- package/api/@wtf/project-wpt/schema/type-aliases/WptSuiteConfig.md +19 -0
- package/api/@wtf/project-wpt/schema/variables/wptSchema.md +13 -0
- package/api/@wtf/project-wpt/suite/functions/wptSuite.md +1 -1
- package/api/@wtf/project-wpt/suite/type-aliases/WptSuiteOptions.md +8 -8
- package/api/README.md +1 -0
- package/api/trains.json +3 -0
- package/guides/astro.md +37 -22
- 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) / [index](../README.md) / SectionSchema
|
|
2
|
+
|
|
3
|
+
# Type Alias: SectionSchema\<T\>
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type SectionSchema<T> =
|
|
7
|
+
| StandardSchemaV1<unknown, T>
|
|
8
|
+
| StandardJSONSchemaV1<unknown, T>
|
|
9
|
+
| JsonSchema
|
|
10
|
+
| ValidateSection;
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Defined in: [packages/project-config/src/index.ts:160](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/index.ts#L160)
|
|
14
|
+
|
|
15
|
+
What a tool checks its section by: a Standard Schema, as a preset's `./schema` exports one, or
|
|
16
|
+
zod's, whose output is what the section reads as; a JSON Schema of draft 2020-12, or a Standard
|
|
17
|
+
JSON Schema, which ajv checks; or a function of its own.
|
|
18
|
+
|
|
19
|
+
## Type Parameters
|
|
20
|
+
|
|
21
|
+
| Type Parameter | Default type |
|
|
22
|
+
| ------ | ------ |
|
|
23
|
+
| `T` | `unknown` |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [index](../README.md) / SectionsOf
|
|
2
|
+
|
|
3
|
+
# Type Alias: SectionsOf\<S\>
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type SectionsOf<S> = { readonly [K in keyof S]?: StandardTypedV1.InferInput<S[K]> };
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/index.ts:30](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/index.ts#L30)
|
|
10
|
+
|
|
11
|
+
The sections of the schemas `S`, each by its name: the input type of each schema, as
|
|
12
|
+
`SectionsOf<{ vite: typeof viteSchema }>` is `{ vite?: ViteOptions }`. A code config is typed by
|
|
13
|
+
it with `defineConfig` of ./define.
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
| Type Parameter |
|
|
18
|
+
| ------ |
|
|
19
|
+
| `S` *extends* `Readonly`\<`Record`\<`string`, `StandardTypedV1`\>\> |
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [index](../README.md) / SyncFiles
|
|
2
|
+
|
|
3
|
+
# Type Alias: SyncFiles
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type SyncFiles = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/index.ts:202](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/index.ts#L202)
|
|
10
|
+
|
|
11
|
+
What reads a project's files synchronously, by their absolute paths.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### files
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
readonly files: (folder) => ReadonlySet<string>;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Defined in: [packages/project-config/src/index.ts:206](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/index.ts#L206)
|
|
22
|
+
|
|
23
|
+
The names of the files in `folder`, none when it is no folder.
|
|
24
|
+
|
|
25
|
+
#### Parameters
|
|
26
|
+
|
|
27
|
+
| Parameter | Type |
|
|
28
|
+
| ------ | ------ |
|
|
29
|
+
| `folder` | `string` |
|
|
30
|
+
|
|
31
|
+
#### Returns
|
|
32
|
+
|
|
33
|
+
`ReadonlySet`\<`string`\>
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### text
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
readonly text: (path) => string | undefined;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Defined in: [packages/project-config/src/index.ts:204](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/index.ts#L204)
|
|
44
|
+
|
|
45
|
+
The text of the file at `path`, or `undefined` when no file is there.
|
|
46
|
+
|
|
47
|
+
#### Parameters
|
|
48
|
+
|
|
49
|
+
| Parameter | Type |
|
|
50
|
+
| ------ | ------ |
|
|
51
|
+
| `path` | `string` |
|
|
52
|
+
|
|
53
|
+
#### Returns
|
|
54
|
+
|
|
55
|
+
`string` \| `undefined`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [index](../README.md) / ValidateSection
|
|
2
|
+
|
|
3
|
+
# Type Alias: ValidateSection
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type ValidateSection = (value) =>
|
|
7
|
+
| readonly ConfigIssue[]
|
|
8
|
+
| Promise<readonly ConfigIssue[]>;
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Defined in: [packages/project-config/src/index.ts:151](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/index.ts#L151)
|
|
12
|
+
|
|
13
|
+
A function that checks a section: what is wrong with it, none when it is valid.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `value` | `unknown` |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
\| readonly [`ConfigIssue`](ConfigIssue.md)[]
|
|
24
|
+
\| `Promise`\<readonly [`ConfigIssue`](ConfigIssue.md)[]\>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@wtf/project-config](../README.md) / load
|
|
2
|
+
|
|
3
|
+
# load
|
|
4
|
+
|
|
5
|
+
A project's configuration, as a tool reads it: [loadConfig](functions/loadConfig.md), the object of the first file
|
|
6
|
+
of it found at the root of the project, of code or of JSON, the file it came from, and the
|
|
7
|
+
others found, which are ignored; [loadConfigSync](functions/loadConfigSync.md), the same of a JSON file or package.json
|
|
8
|
+
alone, for a tool that reads its config synchronously; [ignoredWarning](functions/ignoredWarning.md), what to say of
|
|
9
|
+
the files ignored; and [importFileModule](functions/importFileModule.md), which imports a configuration of code, as
|
|
10
|
+
`wtf.config.ts`, by its file URL, as Node imports a module.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { loadConfig } from '@wtf/project-config/load'
|
|
14
|
+
import { nodeConfigPlatform } from '@wtf/project-config/node'
|
|
15
|
+
|
|
16
|
+
const resolved = await loadConfig(process.cwd(), {
|
|
17
|
+
platform: nodeConfigPlatform(),
|
|
18
|
+
environment: process.env
|
|
19
|
+
})
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Type Aliases
|
|
23
|
+
|
|
24
|
+
- [LoadLayers](type-aliases/LoadLayers.md)
|
|
25
|
+
- [LoadOptions](type-aliases/LoadOptions.md)
|
|
26
|
+
- [LoadSyncOptions](type-aliases/LoadSyncOptions.md)
|
|
27
|
+
|
|
28
|
+
## Functions
|
|
29
|
+
|
|
30
|
+
- [ignoredWarning](functions/ignoredWarning.md)
|
|
31
|
+
- [importFileModule](functions/importFileModule.md)
|
|
32
|
+
- [loadConfig](functions/loadConfig.md)
|
|
33
|
+
- [loadConfigSync](functions/loadConfigSync.md)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [load](../README.md) / ignoredWarning
|
|
2
|
+
|
|
3
|
+
# Function: ignoredWarning()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function ignoredWarning(__namedParameters): string | undefined;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/load.ts:209](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/load.ts#L209)
|
|
10
|
+
|
|
11
|
+
What to say of the files of the configuration that are ignored, as a tool warns: `undefined`
|
|
12
|
+
when none is.
|
|
13
|
+
|
|
14
|
+
## Parameters
|
|
15
|
+
|
|
16
|
+
| Parameter | Type |
|
|
17
|
+
| ------ | ------ |
|
|
18
|
+
| `__namedParameters` | `Pick`\<[`ResolvedConfig`](../../index/type-aliases/ResolvedConfig.md), `"namespace"` \| `"key"` \| `"source"` \| `"ignored"`\> |
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
`string` \| `undefined`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [load](../README.md) / importFileModule
|
|
2
|
+
|
|
3
|
+
# Function: importFileModule()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function importFileModule(path): ImportModule;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/load.ts:90](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/load.ts#L90)
|
|
10
|
+
|
|
11
|
+
What imports the module of the file at an absolute path, by its file URL, as the paths `path`
|
|
12
|
+
give it: what imports a configuration of code by default, `wtf.config.ts` among them, whose types
|
|
13
|
+
Node strips itself. The runtime imports it, of the file system it imports from, and not the one
|
|
14
|
+
a caller gives.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| ------ | ------ |
|
|
20
|
+
| `path` | `Pick`\<[`ConfigPlatform`](../../index/type-aliases/ConfigPlatform.md)\[`"path"`\], `"toFileUrl"`\> |
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
[`ImportModule`](../../index/type-aliases/ImportModule.md)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [load](../README.md) / loadConfig
|
|
2
|
+
|
|
3
|
+
# Function: loadConfig()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function loadConfig(folder, __namedParameters): Promise<ResolvedConfig>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/load.ts:166](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/load.ts#L166)
|
|
10
|
+
|
|
11
|
+
The configuration of the project in `folder`: the object of the first file of it at the root of
|
|
12
|
+
the project, in the order of the files of its names — by default `wtf.config.mjs`,
|
|
13
|
+
`wtf.config.js`, `wtf.config.ts` and `wtf.config.json`, then the `wtf` key of package.json — and
|
|
14
|
+
the file it came from; `{}`, of no file, when none is there. Each other file found is in
|
|
15
|
+
`ignored`. The `defaults` a tool gives are kept beside it, for `sectionOf` of ./section to merge
|
|
16
|
+
the project's sections over, and so are the variables of the `environment` it gives of the
|
|
17
|
+
prefix of the names, `WTF_` by default, with the whole environment, which placeholders are taken
|
|
18
|
+
from. No placeholder is expanded here. A file of code is imported by `importModule`. A file that
|
|
19
|
+
holds no object, or a module that fails to load, is an [InvalidConfigFileError](../../errors/classes/InvalidConfigFileError.md).
|
|
20
|
+
|
|
21
|
+
## Parameters
|
|
22
|
+
|
|
23
|
+
| Parameter | Type |
|
|
24
|
+
| ------ | ------ |
|
|
25
|
+
| `folder` | `string` |
|
|
26
|
+
| `__namedParameters` | [`LoadOptions`](../type-aliases/LoadOptions.md) |
|
|
27
|
+
|
|
28
|
+
## Returns
|
|
29
|
+
|
|
30
|
+
`Promise`\<[`ResolvedConfig`](../../index/type-aliases/ResolvedConfig.md)\>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [load](../README.md) / loadConfigSync
|
|
2
|
+
|
|
3
|
+
# Function: loadConfigSync()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function loadConfigSync(folder, __namedParameters): ResolvedConfig;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/load.ts:189](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/load.ts#L189)
|
|
10
|
+
|
|
11
|
+
The configuration of the project in `folder`, as [loadConfig](loadConfig.md) reads it, read synchronously:
|
|
12
|
+
of a JSON file of the names, `wtf.config.json` by default, or the key of package.json, `wtf` by
|
|
13
|
+
default, for a tool that loads its own config synchronously. A configuration of code in use, as
|
|
14
|
+
`wtf.config.ts`, is a [SyncConfigInCodeError](../../errors/classes/SyncConfigInCodeError.md), as importing it is asynchronous.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| ------ | ------ |
|
|
20
|
+
| `folder` | `string` |
|
|
21
|
+
| `__namedParameters` | [`LoadSyncOptions`](../type-aliases/LoadSyncOptions.md) |
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
[`ResolvedConfig`](../../index/type-aliases/ResolvedConfig.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [load](../README.md) / LoadLayers
|
|
2
|
+
|
|
3
|
+
# Type Alias: LoadLayers
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type LoadLayers = LocateNames & object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/load.ts:53](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/load.ts#L53)
|
|
10
|
+
|
|
11
|
+
How a configuration is read, apart from the platform: its names, the defaults of the tool's
|
|
12
|
+
package, and the environment over it.
|
|
13
|
+
|
|
14
|
+
## Type Declaration
|
|
15
|
+
|
|
16
|
+
| Name | Type | Description | Defined in |
|
|
17
|
+
| ------ | ------ | ------ | ------ |
|
|
18
|
+
| `defaults?` | [`ConfigDefaults`](../../index/type-aliases/ConfigDefaults.md) | The configuration under the project's, as the tool's package gives it: a section the project gives none of is the one of the defaults, and one it gives is merged over it (`sectionOf` of ./section). | [packages/project-config/src/load.ts:59](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/load.ts#L59) |
|
|
19
|
+
| `environment?` | [`Environment`](../../env/type-aliases/Environment.md) | The variables of an environment, as a process's: those of the prefix of the names, as `WTF_`, are kept, and a section is read with them over it, and its placeholders `${env:NAME}` taken from the whole (`sectionOf` of ./section). None by default: nothing here reads the process's own, which `loadConfig` of ./node gives. | [packages/project-config/src/load.ts:66](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/load.ts#L66) |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [load](../README.md) / LoadOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: LoadOptions
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type LoadOptions = LocateOptions & LoadLayers & object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/load.ts:70](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/load.ts#L70)
|
|
10
|
+
|
|
11
|
+
How a configuration is read asynchronously.
|
|
12
|
+
|
|
13
|
+
## Type Declaration
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description | Defined in |
|
|
16
|
+
| ------ | ------ | ------ | ------ |
|
|
17
|
+
| `importModule?` | [`ImportModule`](../../index/type-aliases/ImportModule.md) | What imports a file of code: by default `import()` of its file URL, as the platform's paths give it ([importFileModule](../functions/importFileModule.md)). A caller of a file system of its own, not the one its runtime imports from, gives one too. | [packages/project-config/src/load.ts:77](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/load.ts#L77) |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [load](../README.md) / LoadSyncOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: LoadSyncOptions
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type LoadSyncOptions = LocateSyncOptions & LoadLayers;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/load.ts:81](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/load.ts#L81)
|
|
10
|
+
|
|
11
|
+
How a configuration is read synchronously.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@wtf/project-config](../README.md) / locate
|
|
2
|
+
|
|
3
|
+
# locate
|
|
4
|
+
|
|
5
|
+
Where a project's configuration is: [projectRootOf](functions/projectRootOf.md), the folder it is looked for in, the
|
|
6
|
+
root of the workspace the project is in, or the project's own folder; [locateConfig](functions/locateConfig.md), each
|
|
7
|
+
file of it there, in the order of the files of its names, of which the first is used; and
|
|
8
|
+
[configNamesOf](functions/configNamesOf.md), those names: the files ([configFilesOf](functions/configFilesOf.md) of the namespace by
|
|
9
|
+
default), the key of package.json (the namespace) and the prefix of the environment's variables
|
|
10
|
+
(the key). The namespace is `wtf` by default ([DEFAULT\_NAMESPACE](variables/DEFAULT_NAMESPACE.md)). Each reads by the
|
|
11
|
+
platform it is given, asynchronously; [projectRootOfSync](functions/projectRootOfSync.md) and [locateConfigSync](functions/locateConfigSync.md) by
|
|
12
|
+
the files of a synchronous one.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { locateConfig } from '@wtf/project-config/locate'
|
|
16
|
+
import { nodeConfigPlatform } from '@wtf/project-config/node'
|
|
17
|
+
|
|
18
|
+
const { root, sources } = await locateConfig(process.cwd(), { platform: nodeConfigPlatform() })
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Type Aliases
|
|
22
|
+
|
|
23
|
+
- [LocateNames](type-aliases/LocateNames.md)
|
|
24
|
+
- [LocateOptions](type-aliases/LocateOptions.md)
|
|
25
|
+
- [LocateSyncOptions](type-aliases/LocateSyncOptions.md)
|
|
26
|
+
- [NamespaceNames](type-aliases/NamespaceNames.md)
|
|
27
|
+
|
|
28
|
+
## Variables
|
|
29
|
+
|
|
30
|
+
- [DEFAULT\_NAMESPACE](variables/DEFAULT_NAMESPACE.md)
|
|
31
|
+
|
|
32
|
+
## Functions
|
|
33
|
+
|
|
34
|
+
- [configFilesOf](functions/configFilesOf.md)
|
|
35
|
+
- [configNamesOf](functions/configNamesOf.md)
|
|
36
|
+
- [jsonFilesOf](functions/jsonFilesOf.md)
|
|
37
|
+
- [locateConfig](functions/locateConfig.md)
|
|
38
|
+
- [locateConfigSync](functions/locateConfigSync.md)
|
|
39
|
+
- [projectRootOf](functions/projectRootOf.md)
|
|
40
|
+
- [projectRootOfSync](functions/projectRootOfSync.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / configFilesOf
|
|
2
|
+
|
|
3
|
+
# Function: configFilesOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function configFilesOf(namespace?): readonly string[];
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:49](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L49)
|
|
10
|
+
|
|
11
|
+
The files the configuration of `namespace` can be in by default, in the order the first found is
|
|
12
|
+
used: code first, as a person who writes code means it to be read, then JSON. After them comes
|
|
13
|
+
the `namespace` key of package.json, where a write makes it when there is none.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Default value |
|
|
18
|
+
| ------ | ------ | ------ |
|
|
19
|
+
| `namespace` | `string` | `DEFAULT_NAMESPACE` |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
readonly `string`[]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / configNamesOf
|
|
2
|
+
|
|
3
|
+
# Function: configNamesOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function configNamesOf(__namedParameters?): Required<ConfigNames> & object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:69](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L69)
|
|
10
|
+
|
|
11
|
+
The names of the configuration of the namespace, each as `names` gives it, else its default: the
|
|
12
|
+
files, [configFilesOf](configFilesOf.md) the namespace; the key of package.json, the namespace; and the
|
|
13
|
+
prefix of the environment's variables, the key. A file that is neither code nor JSON,
|
|
14
|
+
package.json among the files, an empty key, or a prefix of no letter or digit, is a `TypeError`.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| ------ | ------ |
|
|
20
|
+
| `__namedParameters` | [`NamespaceNames`](../type-aliases/NamespaceNames.md) |
|
|
21
|
+
|
|
22
|
+
## Returns
|
|
23
|
+
|
|
24
|
+
`Required`\<[`ConfigNames`](../../index/type-aliases/ConfigNames.md)\> & `object`
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / jsonFilesOf
|
|
2
|
+
|
|
3
|
+
# Function: jsonFilesOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function jsonFilesOf(names?): readonly string[];
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:98](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L98)
|
|
10
|
+
|
|
11
|
+
The JSON files of the names of a namespace, which a write makes or changes, and a synchronous
|
|
12
|
+
load reads: those of its files that are no code, in their order.
|
|
13
|
+
|
|
14
|
+
## Parameters
|
|
15
|
+
|
|
16
|
+
| Parameter | Type |
|
|
17
|
+
| ------ | ------ |
|
|
18
|
+
| `names` | [`NamespaceNames`](../type-aliases/NamespaceNames.md) |
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
readonly `string`[]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / locateConfig
|
|
2
|
+
|
|
3
|
+
# Function: locateConfig()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function locateConfig(folder, __namedParameters): Promise<LocatedConfig>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:195](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L195)
|
|
10
|
+
|
|
11
|
+
Each file of the configuration of the project in `folder`, at its root, in the order of the
|
|
12
|
+
files of its names (`wtf.config.mjs`, `.js`, `.ts` and `.json` by default), and package.json
|
|
13
|
+
when it has the key (`wtf` by default). The first is the one in use. The root is
|
|
14
|
+
[projectRootOf](projectRootOf.md) `folder`, or `folder` itself with `up: false`. A package.json that is no
|
|
15
|
+
JSON object is an `InvalidConfigFileError` of ./errors; names that are not of the configuration,
|
|
16
|
+
a `TypeError`, as [configNamesOf](configNamesOf.md) says.
|
|
17
|
+
|
|
18
|
+
## Parameters
|
|
19
|
+
|
|
20
|
+
| Parameter | Type |
|
|
21
|
+
| ------ | ------ |
|
|
22
|
+
| `folder` | `string` |
|
|
23
|
+
| `__namedParameters` | [`LocateOptions`](../type-aliases/LocateOptions.md) |
|
|
24
|
+
|
|
25
|
+
## Returns
|
|
26
|
+
|
|
27
|
+
`Promise`\<[`LocatedConfig`](../../index/type-aliases/LocatedConfig.md)\>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / locateConfigSync
|
|
2
|
+
|
|
3
|
+
# Function: locateConfigSync()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function locateConfigSync(folder, __namedParameters): LocatedConfig;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:202](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L202)
|
|
10
|
+
|
|
11
|
+
Each file of the configuration of the project in `folder`, as [locateConfig](locateConfig.md) finds them,
|
|
12
|
+
read synchronously.
|
|
13
|
+
|
|
14
|
+
## Parameters
|
|
15
|
+
|
|
16
|
+
| Parameter | Type |
|
|
17
|
+
| ------ | ------ |
|
|
18
|
+
| `folder` | `string` |
|
|
19
|
+
| `__namedParameters` | [`LocateSyncOptions`](../type-aliases/LocateSyncOptions.md) |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
[`LocatedConfig`](../../index/type-aliases/LocatedConfig.md)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / projectRootOf
|
|
2
|
+
|
|
3
|
+
# Function: projectRootOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function projectRootOf(folder, __namedParameters): Promise<string>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:175](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L175)
|
|
10
|
+
|
|
11
|
+
The folder the configuration of the project in `folder` is looked for in: the root of the
|
|
12
|
+
workspace it is in, the nearest from `folder` up with a pnpm-workspace.yaml or a package.json of
|
|
13
|
+
`workspaces`; else the project's own folder, the nearest from `folder` up with a package.json;
|
|
14
|
+
else `folder`. One configuration then serves each package of a workspace.
|
|
15
|
+
|
|
16
|
+
## Parameters
|
|
17
|
+
|
|
18
|
+
| Parameter | Type |
|
|
19
|
+
| ------ | ------ |
|
|
20
|
+
| `folder` | `string` |
|
|
21
|
+
| `__namedParameters` | `Pick`\<[`LocateOptions`](../type-aliases/LocateOptions.md), `"platform"`\> |
|
|
22
|
+
|
|
23
|
+
## Returns
|
|
24
|
+
|
|
25
|
+
`Promise`\<`string`\>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / projectRootOfSync
|
|
2
|
+
|
|
3
|
+
# Function: projectRootOfSync()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function projectRootOfSync(folder, __namedParameters): string;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:182](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L182)
|
|
10
|
+
|
|
11
|
+
The folder the configuration of the project in `folder` is looked for in, as
|
|
12
|
+
[projectRootOf](projectRootOf.md) finds it, read synchronously.
|
|
13
|
+
|
|
14
|
+
## Parameters
|
|
15
|
+
|
|
16
|
+
| Parameter | Type |
|
|
17
|
+
| ------ | ------ |
|
|
18
|
+
| `folder` | `string` |
|
|
19
|
+
| `__namedParameters` | `Pick`\<[`LocateSyncOptions`](../type-aliases/LocateSyncOptions.md), `"platform"`\> |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`string`
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / LocateNames
|
|
2
|
+
|
|
3
|
+
# Type Alias: LocateNames
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type LocateNames = NamespaceNames & object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:103](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L103)
|
|
10
|
+
|
|
11
|
+
Where the configuration is looked for, apart from the platform: the namespace and its names,
|
|
12
|
+
each its default when not given, and whether the root is looked for from the folder up.
|
|
13
|
+
|
|
14
|
+
## Type Declaration
|
|
15
|
+
|
|
16
|
+
| Name | Type | Description | Defined in |
|
|
17
|
+
| ------ | ------ | ------ | ------ |
|
|
18
|
+
| `up?` | `boolean` | Whether the root is looked for from the folder up, as [projectRootOf](../functions/projectRootOf.md) finds it: by default. With `false`, the folder given is the root. | [packages/project-config/src/locate.ts:108](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L108) |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / LocateOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: LocateOptions
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type LocateOptions = LocateNames & object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:112](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L112)
|
|
10
|
+
|
|
11
|
+
Where the configuration is looked for, asynchronously, by the platform's files.
|
|
12
|
+
|
|
13
|
+
## Type Declaration
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description | Defined in |
|
|
16
|
+
| ------ | ------ | ------ | ------ |
|
|
17
|
+
| `platform` | [`ConfigPlatform`](../../index/type-aliases/ConfigPlatform.md) | The platform it is read by: its storage, whose `getDirectory()` is the root of its file system, as a browser's or `nodeConfigPlatform()` of ./node gives it, and its paths. | [packages/project-config/src/locate.ts:117](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L117) |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / LocateSyncOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: LocateSyncOptions
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type LocateSyncOptions = LocateNames & object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:121](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L121)
|
|
10
|
+
|
|
11
|
+
Where the configuration is looked for, synchronously, by the platform's files.
|
|
12
|
+
|
|
13
|
+
## Type Declaration
|
|
14
|
+
|
|
15
|
+
| Name | Type | Description | Defined in |
|
|
16
|
+
| ------ | ------ | ------ | ------ |
|
|
17
|
+
| `platform` | [`ConfigSyncPlatform`](../../index/type-aliases/ConfigSyncPlatform.md) | The platform it is read by synchronously, as `nodeSyncPlatform()` of ./node gives it. | [packages/project-config/src/locate.ts:123](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L123) |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / NamespaceNames
|
|
2
|
+
|
|
3
|
+
# Type Alias: NamespaceNames
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type NamespaceNames = ConfigNames & object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:58](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L58)
|
|
10
|
+
|
|
11
|
+
The names of a namespace's configuration: the namespace, `wtf` by default, and the names a
|
|
12
|
+
tool gives.
|
|
13
|
+
|
|
14
|
+
## Type Declaration
|
|
15
|
+
|
|
16
|
+
| Name | Type | Description | Defined in |
|
|
17
|
+
| ------ | ------ | ------ | ------ |
|
|
18
|
+
| `namespace?` | `string` | The namespace of the tools: the name of its files and its key by default. `wtf` by default. | [packages/project-config/src/locate.ts:60](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L60) |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-config](../../README.md) / [locate](../README.md) / DEFAULT\_NAMESPACE
|
|
2
|
+
|
|
3
|
+
# Variable: DEFAULT\_NAMESPACE
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
const DEFAULT_NAMESPACE: "wtf" = 'wtf';
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-config/src/locate.ts:42](https://gitlab.com/wetryfun/project/project/-/blob/docs-v2.0.0/packages/project-config/src/locate.ts#L42)
|
|
10
|
+
|
|
11
|
+
The namespace a configuration is of when none is given: `wtf`, as `wtf.config.json`.
|