@wtf/project-docs 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/api/.generated +50 -0
- package/api/@wtf/project-astro/README.md +68 -0
- package/api/@wtf/project-astro/config/README.md +38 -0
- package/api/@wtf/project-astro/config/functions/baseConfig.md +43 -0
- package/api/@wtf/project-astro/config/functions/baseOf.md +23 -0
- package/api/@wtf/project-astro/config/functions/siteOf.md +22 -0
- package/api/@wtf/project-astro/config/type-aliases/BaseOptions.md +73 -0
- package/api/@wtf/project-astro/config/type-aliases/Env.md +11 -0
- package/api/@wtf/project-astro/errors/README.md +16 -0
- package/api/@wtf/project-astro/errors/classes/BrokenLinksError.md +172 -0
- package/api/@wtf/project-astro/errors/classes/InvalidRedirectError.md +174 -0
- package/api/@wtf/project-astro/errors/classes/RedirectedLinksError.md +173 -0
- package/api/@wtf/project-astro/errors/classes/SiteError.md +192 -0
- package/api/@wtf/project-astro/index/README.md +19 -0
- package/api/@wtf/project-astro/index/type-aliases/BrokenLink.md +35 -0
- package/api/@wtf/project-astro/index/type-aliases/IgnoredLine.md +47 -0
- package/api/@wtf/project-astro/index/type-aliases/RedirectInput.md +17 -0
- package/api/@wtf/project-astro/index/type-aliases/RedirectMatch.md +35 -0
- package/api/@wtf/project-astro/index/type-aliases/RedirectRule.md +61 -0
- package/api/@wtf/project-astro/index/type-aliases/RedirectStatus.md +12 -0
- package/api/@wtf/project-astro/index/type-aliases/RedirectedLink.md +17 -0
- package/api/@wtf/project-astro/index/type-aliases/Redirects.md +35 -0
- package/api/@wtf/project-astro/links/README.md +27 -0
- package/api/@wtf/project-astro/links/functions/brokenLinksIn.md +27 -0
- package/api/@wtf/project-astro/links/functions/links.md +29 -0
- package/api/@wtf/project-astro/links/functions/redirectedLinksIn.md +27 -0
- package/api/@wtf/project-astro/links/variables/LINKS.md +11 -0
- package/api/@wtf/project-astro/pages/README.md +36 -0
- package/api/@wtf/project-astro/pages/functions/fixSearchUrlsIn.md +27 -0
- package/api/@wtf/project-astro/pages/functions/moveConflictingPages.md +23 -0
- package/api/@wtf/project-astro/pages/functions/pages.md +31 -0
- package/api/@wtf/project-astro/pages/functions/slashFolderLinksIn.md +35 -0
- package/api/@wtf/project-astro/pages/variables/PAGES.md +11 -0
- package/api/@wtf/project-astro/preview/README.md +34 -0
- package/api/@wtf/project-astro/preview/functions/files.md +39 -0
- package/api/@wtf/project-astro/preview/functions/listen.md +25 -0
- package/api/@wtf/project-astro/preview/functions/notFound.md +24 -0
- package/api/@wtf/project-astro/preview/functions/pagesOf.md +27 -0
- package/api/@wtf/project-astro/preview/type-aliases/FilesOptions.md +24 -0
- package/api/@wtf/project-astro/preview/type-aliases/Handler.md +21 -0
- package/api/@wtf/project-astro/preview/type-aliases/ListenOptions.md +35 -0
- package/api/@wtf/project-astro/preview/type-aliases/Listening.md +53 -0
- package/api/@wtf/project-astro/preview/type-aliases/Pages.md +35 -0
- package/api/@wtf/project-astro/redirects/README.md +28 -0
- package/api/@wtf/project-astro/redirects/functions/formatRedirects.md +28 -0
- package/api/@wtf/project-astro/redirects/functions/matchRedirect.md +35 -0
- package/api/@wtf/project-astro/redirects/functions/parseRedirects.md +32 -0
- package/api/@wtf/project-astro/redirects/variables/MAX_PARTS.md +11 -0
- package/api/@wtf/project-astro/redirects/variables/MAX_RULES.md +11 -0
- package/api/@wtf/project-astro/redirects/variables/MAX_SIZE.md +11 -0
- package/api/@wtf/project-oxfmt/variables/default.md +6 -6
- package/api/@wtf/project-oxlint/variables/default.md +17 -17
- 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/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-vite/README.md +2 -2
- package/api/@wtf/project-vite/functions/baseConfig.md +4 -4
- package/api/@wtf/project-vite/functions/buildsSite.md +1 -1
- package/api/@wtf/project-vite/functions/compress.md +1 -1
- package/api/@wtf/project-vite/functions/conditionsOf.md +1 -1
- package/api/@wtf/project-vite/type-aliases/BaseOptions.md +2 -2
- package/api/@wtf/project-vite/type-aliases/CompressOptions.md +4 -4
- package/api/@wtf/project-vite/variables/CLIENT_CONDITIONS.md +1 -1
- package/api/@wtf/project-vite/variables/COMPRESSIBLE.md +1 -1
- package/api/@wtf/project-vite/variables/FROM_DIST.md +1 -1
- package/api/@wtf/project-vite/variables/THRESHOLD.md +1 -1
- package/api/@wtf/project-vitest/README.md +1 -1
- 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/storybook/functions/storybookConfig.md +1 -1
- package/api/@wtf/project-vitest/storybook/type-aliases/StorybookOptions.md +2 -2
- 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/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 +34 -0
- package/guides/astro.md +173 -0
- package/package.json +15 -6
package/README.md
CHANGED
|
@@ -13,6 +13,8 @@ workspace of TypeScript packages compiles, lints, formats, tests and documents w
|
|
|
13
13
|
build in CI, with the pair of scripts each suite needs and coverage through the source maps.
|
|
14
14
|
- [Vite, and sites](guides/vite.md): start every Vite config from one base, ship compressed copies
|
|
15
15
|
of a site, and know which Vite and Vitest a repo names.
|
|
16
|
+
- [Astro sites](guides/astro.md): start an Astro site from one base config, build it to serve on
|
|
17
|
+
GitLab Pages, fail the build on a broken link, and preview it as GitLab Pages serves it.
|
|
16
18
|
|
|
17
19
|
| Path | |
|
|
18
20
|
| --------------- | ---------------------------------- |
|
package/api/.generated
CHANGED
|
@@ -1,4 +1,53 @@
|
|
|
1
1
|
.generated
|
|
2
|
+
@wtf/project-astro/README.md
|
|
3
|
+
@wtf/project-astro/config/README.md
|
|
4
|
+
@wtf/project-astro/config/functions/baseConfig.md
|
|
5
|
+
@wtf/project-astro/config/functions/baseOf.md
|
|
6
|
+
@wtf/project-astro/config/functions/siteOf.md
|
|
7
|
+
@wtf/project-astro/config/type-aliases/BaseOptions.md
|
|
8
|
+
@wtf/project-astro/config/type-aliases/Env.md
|
|
9
|
+
@wtf/project-astro/errors/README.md
|
|
10
|
+
@wtf/project-astro/errors/classes/BrokenLinksError.md
|
|
11
|
+
@wtf/project-astro/errors/classes/InvalidRedirectError.md
|
|
12
|
+
@wtf/project-astro/errors/classes/RedirectedLinksError.md
|
|
13
|
+
@wtf/project-astro/errors/classes/SiteError.md
|
|
14
|
+
@wtf/project-astro/index/README.md
|
|
15
|
+
@wtf/project-astro/index/type-aliases/BrokenLink.md
|
|
16
|
+
@wtf/project-astro/index/type-aliases/IgnoredLine.md
|
|
17
|
+
@wtf/project-astro/index/type-aliases/RedirectInput.md
|
|
18
|
+
@wtf/project-astro/index/type-aliases/RedirectMatch.md
|
|
19
|
+
@wtf/project-astro/index/type-aliases/RedirectRule.md
|
|
20
|
+
@wtf/project-astro/index/type-aliases/RedirectStatus.md
|
|
21
|
+
@wtf/project-astro/index/type-aliases/RedirectedLink.md
|
|
22
|
+
@wtf/project-astro/index/type-aliases/Redirects.md
|
|
23
|
+
@wtf/project-astro/links/README.md
|
|
24
|
+
@wtf/project-astro/links/functions/brokenLinksIn.md
|
|
25
|
+
@wtf/project-astro/links/functions/links.md
|
|
26
|
+
@wtf/project-astro/links/functions/redirectedLinksIn.md
|
|
27
|
+
@wtf/project-astro/links/variables/LINKS.md
|
|
28
|
+
@wtf/project-astro/pages/README.md
|
|
29
|
+
@wtf/project-astro/pages/functions/fixSearchUrlsIn.md
|
|
30
|
+
@wtf/project-astro/pages/functions/moveConflictingPages.md
|
|
31
|
+
@wtf/project-astro/pages/functions/pages.md
|
|
32
|
+
@wtf/project-astro/pages/functions/slashFolderLinksIn.md
|
|
33
|
+
@wtf/project-astro/pages/variables/PAGES.md
|
|
34
|
+
@wtf/project-astro/preview/README.md
|
|
35
|
+
@wtf/project-astro/preview/functions/files.md
|
|
36
|
+
@wtf/project-astro/preview/functions/listen.md
|
|
37
|
+
@wtf/project-astro/preview/functions/notFound.md
|
|
38
|
+
@wtf/project-astro/preview/functions/pagesOf.md
|
|
39
|
+
@wtf/project-astro/preview/type-aliases/FilesOptions.md
|
|
40
|
+
@wtf/project-astro/preview/type-aliases/Handler.md
|
|
41
|
+
@wtf/project-astro/preview/type-aliases/ListenOptions.md
|
|
42
|
+
@wtf/project-astro/preview/type-aliases/Listening.md
|
|
43
|
+
@wtf/project-astro/preview/type-aliases/Pages.md
|
|
44
|
+
@wtf/project-astro/redirects/README.md
|
|
45
|
+
@wtf/project-astro/redirects/functions/formatRedirects.md
|
|
46
|
+
@wtf/project-astro/redirects/functions/matchRedirect.md
|
|
47
|
+
@wtf/project-astro/redirects/functions/parseRedirects.md
|
|
48
|
+
@wtf/project-astro/redirects/variables/MAX_PARTS.md
|
|
49
|
+
@wtf/project-astro/redirects/variables/MAX_RULES.md
|
|
50
|
+
@wtf/project-astro/redirects/variables/MAX_SIZE.md
|
|
2
51
|
@wtf/project-oxfmt/README.md
|
|
3
52
|
@wtf/project-oxfmt/variables/default.md
|
|
4
53
|
@wtf/project-oxlint/README.md
|
|
@@ -175,3 +224,4 @@
|
|
|
175
224
|
@wtf/project-wpt/suite/type-aliases/WptSuiteOptions.md
|
|
176
225
|
README.md
|
|
177
226
|
llms.txt
|
|
227
|
+
trains.json
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
[Documentation](../../README.md) / @wtf/project-astro
|
|
2
|
+
|
|
3
|
+
# @wtf/project-astro
|
|
4
|
+
|
|
5
|
+
Build an Astro site that serves on GitLab Pages as it does on your machine, and try it before it
|
|
6
|
+
ships. Start your `astro.config.mjs` from one base config. It builds each page where GitLab Pages
|
|
7
|
+
finds it and gives each link the URL its page is served at. It fails the build on a link that leads
|
|
8
|
+
to no page, or only through a redirect. `project-astro preview` serves the build the way GitLab
|
|
9
|
+
Pages does, `_redirects` included. Astro is a peer dependency.
|
|
10
|
+
|
|
11
|
+
| Subpath | What you get |
|
|
12
|
+
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| `.` | The types: `RedirectRule`, `RedirectInput`, `IgnoredLine`, `Redirects`, `RedirectMatch`, `BrokenLink`, `RedirectedLink` |
|
|
14
|
+
| `./config` | `baseConfig(options)`: the base of an `astro.config.mjs`; `siteOf(env)` and `baseOf(env)`, of the URL of GitLab Pages |
|
|
15
|
+
| `./pages` | `pages()`: the integration that makes the build serve on GitLab Pages; its passes, `moveConflictingPages`, `slashFolderLinksIn`, `fixSearchUrlsIn` |
|
|
16
|
+
| `./links` | `links()`: the integration that fails the build on a link of no page, or of a redirect; `brokenLinksIn`, `redirectedLinksIn` |
|
|
17
|
+
| `./redirects` | `parseRedirects(text)`, `formatRedirects(rules)` and `matchRedirect(rules, path)`: a `_redirects` file read, written, matched |
|
|
18
|
+
| `./preview` | `pagesOf(folder, base)`: a built site served as GitLab Pages serves it; `files`, `notFound`, and `listen` on Node's server |
|
|
19
|
+
| `./errors` | `SiteError`, `BrokenLinksError`, `RedirectedLinksError` and `InvalidRedirectError`, each with a stable `code` |
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
// astro.config.mjs
|
|
23
|
+
import { defineConfig, mergeConfig } from 'astro/config'
|
|
24
|
+
|
|
25
|
+
import { baseConfig } from '@wtf/project-astro/config'
|
|
26
|
+
|
|
27
|
+
export default defineConfig(
|
|
28
|
+
mergeConfig(baseConfig(), { site: 'https://example.com/', outDir: 'public' })
|
|
29
|
+
)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
project-astro preview public --base /docs/
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## What it sets
|
|
37
|
+
|
|
38
|
+
`baseConfig()` gives your site:
|
|
39
|
+
|
|
40
|
+
- `trailingSlash: 'never'` and `build.format: 'preserve'`: a page is `X.html`, served at `X`, and
|
|
41
|
+
a page with pages below it is `X/index.html`, served at `X/`.
|
|
42
|
+
- `site` and `base` from the URL GitLab Pages serves the site at: `ASTRO_BASE`, for a domain of
|
|
43
|
+
your own, or else `CI_PAGES_URL`, which a pipeline sets. The base is that URL's path, such as
|
|
44
|
+
`/project/`.
|
|
45
|
+
- The markdown processor of remark and rehype, `unified()` of `@astrojs/markdown-remark`, with the
|
|
46
|
+
plugins you pass as `baseConfig({ markdown: { remarkPlugins, rehypePlugins } })`.
|
|
47
|
+
- Vite from `baseConfig()` of [`@wtf/project-vite`](../project-vite), which resolves the
|
|
48
|
+
workspace's packages from source and writes compressed copies of the site's scripts and styles.
|
|
49
|
+
Pass its options as `baseConfig({ vite: { compress: false } })`.
|
|
50
|
+
- The integrations `pages()` and `links()`. Switch either off with
|
|
51
|
+
`baseConfig({ pages: false, links: false })`.
|
|
52
|
+
|
|
53
|
+
Each integration runs after every integration of your site, so it sees the build whole, as
|
|
54
|
+
Starlight's search indexed it. Each reads the folder of the build through a handle of the
|
|
55
|
+
[File System Standard](https://fs.spec.whatwg.org/), on the disk by `@wtf/platform-fs-node`; you
|
|
56
|
+
can run its passes on a folder in memory too.
|
|
57
|
+
|
|
58
|
+
See [Astro sites](../../../guides/astro.md) in the guides.
|
|
59
|
+
|
|
60
|
+
## Modules
|
|
61
|
+
|
|
62
|
+
- [config](config/README.md)
|
|
63
|
+
- [errors](errors/README.md)
|
|
64
|
+
- [index](index/README.md)
|
|
65
|
+
- [links](links/README.md)
|
|
66
|
+
- [pages](pages/README.md)
|
|
67
|
+
- [preview](preview/README.md)
|
|
68
|
+
- [redirects](redirects/README.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@wtf/project-astro](../README.md) / config
|
|
2
|
+
|
|
3
|
+
# config
|
|
4
|
+
|
|
5
|
+
The base Astro config of a site: `baseConfig()`, which a site's `astro.config.mjs` starts from,
|
|
6
|
+
by Astro's `mergeConfig`, then adds its own, as its integrations. It holds the conventions of a
|
|
7
|
+
site built to serve on GitLab Pages:
|
|
8
|
+
|
|
9
|
+
- each page built as its route names it, `X.html` of `X` and `X/index.html` of a page with pages
|
|
10
|
+
below it (`build.format: 'preserve'`), and each link written without a final slash
|
|
11
|
+
(`trailingSlash: 'never'`), which `pages()` of `./pages` gives a link to a folder;
|
|
12
|
+
- the markdown processor of remark and rehype, `unified()` of `@astrojs/markdown-remark`, of the
|
|
13
|
+
plugins it is given;
|
|
14
|
+
- the site and its base of the URL of GitLab Pages, `ASTRO_BASE` or else `CI_PAGES_URL`
|
|
15
|
+
([siteOf](functions/siteOf.md), [baseOf](functions/baseOf.md));
|
|
16
|
+
- the Vite of the workspace, `baseConfig()` of `@wtf/project-vite/config`;
|
|
17
|
+
- the integrations `pages()` of `./pages` and `links()` of `./links`, each of which can be
|
|
18
|
+
switched off.
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
// astro.config.mjs
|
|
22
|
+
import { defineConfig, mergeConfig } from 'astro/config'
|
|
23
|
+
|
|
24
|
+
import { baseConfig } from '@wtf/project-astro/config'
|
|
25
|
+
|
|
26
|
+
export default defineConfig(mergeConfig(baseConfig(), { outDir: 'public', publicDir: 'static' }))
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Type Aliases
|
|
30
|
+
|
|
31
|
+
- [BaseOptions](type-aliases/BaseOptions.md)
|
|
32
|
+
- [Env](type-aliases/Env.md)
|
|
33
|
+
|
|
34
|
+
## Functions
|
|
35
|
+
|
|
36
|
+
- [baseConfig](functions/baseConfig.md)
|
|
37
|
+
- [baseOf](functions/baseOf.md)
|
|
38
|
+
- [siteOf](functions/siteOf.md)
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [config](../README.md) / baseConfig
|
|
2
|
+
|
|
3
|
+
# Function: baseConfig()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function baseConfig(options?): AstroUserConfig;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/config.ts:81](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/config.ts#L81)
|
|
10
|
+
|
|
11
|
+
The base config a site's `astro.config.mjs` starts from, by
|
|
12
|
+
`mergeConfig(baseConfig(), yours)` of `astro/config`, which appends the site's integrations to
|
|
13
|
+
its own, and replaces the markdown processor of a site that gives one. It sets:
|
|
14
|
+
|
|
15
|
+
- `site` and `base`, of the environment ([siteOf](siteOf.md), [baseOf](baseOf.md)), unless it names none;
|
|
16
|
+
- `trailingSlash: 'never'` and `build.format: 'preserve'`;
|
|
17
|
+
- `markdown.processor`: `unified(options.markdown)` of `@astrojs/markdown-remark`;
|
|
18
|
+
- `vite`: `baseConfig(options.vite)` of `@wtf/project-vite/config`;
|
|
19
|
+
- `integrations`: `pages()` of `./pages`, then `links()` of `./links`, unless `pages` or `links`
|
|
20
|
+
is `false`. Each runs after every integration of the site.
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import type { RemarkPlugins } from 'astro'
|
|
24
|
+
import { defineConfig, mergeConfig } from 'astro/config'
|
|
25
|
+
|
|
26
|
+
declare const remarkPlugins: RemarkPlugins
|
|
27
|
+
|
|
28
|
+
export default defineConfig(
|
|
29
|
+
mergeConfig(baseConfig({ markdown: { remarkPlugins }, links: false }), {
|
|
30
|
+
site: 'https://example.com/'
|
|
31
|
+
})
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Parameters
|
|
36
|
+
|
|
37
|
+
| Parameter | Type |
|
|
38
|
+
| ------ | ------ |
|
|
39
|
+
| `options` | [`BaseOptions`](../type-aliases/BaseOptions.md) |
|
|
40
|
+
|
|
41
|
+
## Returns
|
|
42
|
+
|
|
43
|
+
`AstroUserConfig`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [config](../README.md) / baseOf
|
|
2
|
+
|
|
3
|
+
# Function: baseOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function baseOf(env?): string | undefined;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/env.ts:35](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/env.ts#L35)
|
|
10
|
+
|
|
11
|
+
The base of the site, of `ASTRO_BASE` or else `CI_PAGES_URL` of `env`: the path of the URL,
|
|
12
|
+
with a slash at each end, such as `/project/` of `https://group.gitlab.io/project`. None, of
|
|
13
|
+
neither, or of a site at the root of its domain.
|
|
14
|
+
|
|
15
|
+
## Parameters
|
|
16
|
+
|
|
17
|
+
| Parameter | Type | Default value |
|
|
18
|
+
| ------ | ------ | ------ |
|
|
19
|
+
| `env` | [`Env`](../type-aliases/Env.md) | `process.env` |
|
|
20
|
+
|
|
21
|
+
## Returns
|
|
22
|
+
|
|
23
|
+
`string` \| `undefined`
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [config](../README.md) / siteOf
|
|
2
|
+
|
|
3
|
+
# Function: siteOf()
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
function siteOf(env?): string | undefined;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/env.ts:25](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/env.ts#L25)
|
|
10
|
+
|
|
11
|
+
The site's URL, of `ASTRO_BASE` or else `CI_PAGES_URL` of `env`: its origin, with a final
|
|
12
|
+
slash, as Astro's `site` takes it, such as `https://group.gitlab.io/`. None, of neither.
|
|
13
|
+
|
|
14
|
+
## Parameters
|
|
15
|
+
|
|
16
|
+
| Parameter | Type | Default value |
|
|
17
|
+
| ------ | ------ | ------ |
|
|
18
|
+
| `env` | [`Env`](../type-aliases/Env.md) | `process.env` |
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
`string` \| `undefined`
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [config](../README.md) / BaseOptions
|
|
2
|
+
|
|
3
|
+
# Type Alias: BaseOptions
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type BaseOptions = object;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/config.ts:39](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/config.ts#L39)
|
|
10
|
+
|
|
11
|
+
What [baseConfig](../functions/baseConfig.md) takes.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### env?
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
readonly optional env?: Env;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Defined in: [packages/project-astro/src/config.ts:53](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/config.ts#L53)
|
|
22
|
+
|
|
23
|
+
The environment the site and its base are read of: the process's own by default.
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### links?
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
readonly optional links?: boolean;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Defined in: [packages/project-astro/src/config.ts:51](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/config.ts#L51)
|
|
34
|
+
|
|
35
|
+
Whether the build fails on a link of no page, or of a redirect, by `links()` of `./links`: by
|
|
36
|
+
default.
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
40
|
+
### markdown?
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
readonly optional markdown?: UnifiedProcessorOptions;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Defined in: [packages/project-astro/src/config.ts:44](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/config.ts#L44)
|
|
47
|
+
|
|
48
|
+
The options of the markdown processor, `unified()` of `@astrojs/markdown-remark`: its remark
|
|
49
|
+
and rehype plugins, among the rest. None by default.
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### pages?
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
readonly optional pages?: boolean;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Defined in: [packages/project-astro/src/config.ts:48](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/config.ts#L48)
|
|
60
|
+
|
|
61
|
+
Whether the build is made to serve on GitLab Pages, by `pages()` of `./pages`: by default.
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### vite?
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
readonly optional vite?: BaseOptions;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Defined in: [packages/project-astro/src/config.ts:46](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/config.ts#L46)
|
|
72
|
+
|
|
73
|
+
The options of `baseConfig()` of `@wtf/project-vite/config`, as `{ compress: false }`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [config](../README.md) / Env
|
|
2
|
+
|
|
3
|
+
# Type Alias: Env
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
type Env = Readonly<Record<string, string | undefined>>;
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Defined in: [packages/project-astro/src/env.ts:10](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/env.ts#L10)
|
|
10
|
+
|
|
11
|
+
An environment, as Node's `process.env` is.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[Documentation](../../../README.md) / [@wtf/project-astro](../README.md) / errors
|
|
2
|
+
|
|
3
|
+
# errors
|
|
4
|
+
|
|
5
|
+
What `@wtf/project-astro` throws, each a [SiteError](classes/SiteError.md) of a stable `code`:
|
|
6
|
+
[BrokenLinksError](classes/BrokenLinksError.md), the internal links of a build that lead to no page;
|
|
7
|
+
[RedirectedLinksError](classes/RedirectedLinksError.md), the internal links of a build that lead to their page only through
|
|
8
|
+
a redirect; and [InvalidRedirectError](classes/InvalidRedirectError.md), a rule of `_redirects` that GitLab Pages would
|
|
9
|
+
ignore.
|
|
10
|
+
|
|
11
|
+
## Classes
|
|
12
|
+
|
|
13
|
+
- [BrokenLinksError](classes/BrokenLinksError.md)
|
|
14
|
+
- [InvalidRedirectError](classes/InvalidRedirectError.md)
|
|
15
|
+
- [RedirectedLinksError](classes/RedirectedLinksError.md)
|
|
16
|
+
- [SiteError](classes/SiteError.md)
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
[Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [errors](../README.md) / BrokenLinksError
|
|
2
|
+
|
|
3
|
+
# Class: BrokenLinksError
|
|
4
|
+
|
|
5
|
+
Defined in: [packages/project-astro/src/errors.ts:29](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/errors.ts#L29)
|
|
6
|
+
|
|
7
|
+
Each internal link of a build that leads to no page, as GitLab Pages serves the build.
|
|
8
|
+
|
|
9
|
+
## Extends
|
|
10
|
+
|
|
11
|
+
- [`SiteError`](SiteError.md)
|
|
12
|
+
|
|
13
|
+
## Constructors
|
|
14
|
+
|
|
15
|
+
### Constructor
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
new BrokenLinksError(links): BrokenLinksError;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Defined in: [packages/project-astro/src/errors.ts:33](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/errors.ts#L33)
|
|
22
|
+
|
|
23
|
+
#### Parameters
|
|
24
|
+
|
|
25
|
+
| Parameter | Type |
|
|
26
|
+
| ------ | ------ |
|
|
27
|
+
| `links` | readonly [`BrokenLink`](../../index/type-aliases/BrokenLink.md)[] |
|
|
28
|
+
|
|
29
|
+
#### Returns
|
|
30
|
+
|
|
31
|
+
`BrokenLinksError`
|
|
32
|
+
|
|
33
|
+
#### Overrides
|
|
34
|
+
|
|
35
|
+
[`SiteError`](SiteError.md).[`constructor`](SiteError.md#constructor)
|
|
36
|
+
|
|
37
|
+
## Properties
|
|
38
|
+
|
|
39
|
+
| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|
|
40
|
+
| ------ | ------ | ------ | ------ | ------ | ------ | ------ |
|
|
41
|
+
| <a id="property-cause"></a> `cause?` | `public` | `unknown` | `undefined` | - | [`SiteError`](SiteError.md).[`cause`](SiteError.md#property-cause) | - |
|
|
42
|
+
| <a id="property-code"></a> `code` | `readonly` | `string` | `undefined` | - | [`SiteError`](SiteError.md).[`code`](SiteError.md#property-code) | [packages/project-astro/src/errors.ts:17](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/errors.ts#L17) |
|
|
43
|
+
| <a id="property-exitcode"></a> `exitCode` | `readonly` | `number` | `1` | What a command that fails by it exits with. | [`SiteError`](SiteError.md).[`exitCode`](SiteError.md#property-exitcode) | [packages/project-astro/src/errors.ts:19](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/errors.ts#L19) |
|
|
44
|
+
| <a id="property-links"></a> `links` | `readonly` | readonly [`BrokenLink`](../../index/type-aliases/BrokenLink.md)[] | `undefined` | The links, each with its page. | - | [packages/project-astro/src/errors.ts:31](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/errors.ts#L31) |
|
|
45
|
+
| <a id="property-message"></a> `message` | `public` | `string` | `undefined` | - | [`SiteError`](SiteError.md).[`message`](SiteError.md#property-message) | - |
|
|
46
|
+
| <a id="property-name"></a> `name` | `public` | `string` | `undefined` | - | [`SiteError`](SiteError.md).[`name`](SiteError.md#property-name) | - |
|
|
47
|
+
| <a id="property-stack"></a> `stack?` | `public` | `string` | `undefined` | - | [`SiteError`](SiteError.md).[`stack`](SiteError.md#property-stack) | - |
|
|
48
|
+
| <a id="property-stacktracelimit"></a> `stackTraceLimit` | `static` | `number` | `undefined` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | [`SiteError`](SiteError.md).[`stackTraceLimit`](SiteError.md#property-stacktracelimit) | - |
|
|
49
|
+
|
|
50
|
+
## Methods
|
|
51
|
+
|
|
52
|
+
### captureStackTrace()
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
static captureStackTrace(targetObject, constructorOpt?): void;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Defined in: `@types/node`
|
|
59
|
+
|
|
60
|
+
Creates a `.stack` property on `targetObject`, which when accessed returns
|
|
61
|
+
a string representing the location in the code at which
|
|
62
|
+
`Error.captureStackTrace()` was called.
|
|
63
|
+
|
|
64
|
+
```js
|
|
65
|
+
const myObject = {};
|
|
66
|
+
Error.captureStackTrace(myObject);
|
|
67
|
+
myObject.stack; // Similar to `new Error().stack`
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The first line of the trace will be prefixed with
|
|
71
|
+
`${myObject.name}: ${myObject.message}`.
|
|
72
|
+
|
|
73
|
+
The optional `constructorOpt` argument accepts a function. If given, all frames
|
|
74
|
+
above `constructorOpt`, including `constructorOpt`, will be omitted from the
|
|
75
|
+
generated stack trace.
|
|
76
|
+
|
|
77
|
+
The `constructorOpt` argument is useful for hiding implementation
|
|
78
|
+
details of error generation from the user. For instance:
|
|
79
|
+
|
|
80
|
+
```js
|
|
81
|
+
function a() {
|
|
82
|
+
b();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function b() {
|
|
86
|
+
c();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function c() {
|
|
90
|
+
// Create an error without stack trace to avoid calculating the stack trace twice.
|
|
91
|
+
const { stackTraceLimit } = Error;
|
|
92
|
+
Error.stackTraceLimit = 0;
|
|
93
|
+
const error = new Error();
|
|
94
|
+
Error.stackTraceLimit = stackTraceLimit;
|
|
95
|
+
|
|
96
|
+
// Capture the stack trace above function b
|
|
97
|
+
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
a();
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
#### Parameters
|
|
105
|
+
|
|
106
|
+
| Parameter | Type |
|
|
107
|
+
| ------ | ------ |
|
|
108
|
+
| `targetObject` | `object` |
|
|
109
|
+
| `constructorOpt?` | `Function` |
|
|
110
|
+
|
|
111
|
+
#### Returns
|
|
112
|
+
|
|
113
|
+
`void`
|
|
114
|
+
|
|
115
|
+
#### Inherited from
|
|
116
|
+
|
|
117
|
+
[`SiteError`](SiteError.md).[`captureStackTrace`](SiteError.md#capturestacktrace)
|
|
118
|
+
|
|
119
|
+
***
|
|
120
|
+
|
|
121
|
+
### isError()
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
static isError(error): error is Error;
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Defined in: `typescript`
|
|
128
|
+
|
|
129
|
+
Indicates whether the argument provided is a built-in Error instance or not.
|
|
130
|
+
|
|
131
|
+
#### Parameters
|
|
132
|
+
|
|
133
|
+
| Parameter | Type |
|
|
134
|
+
| ------ | ------ |
|
|
135
|
+
| `error` | `unknown` |
|
|
136
|
+
|
|
137
|
+
#### Returns
|
|
138
|
+
|
|
139
|
+
`error is Error`
|
|
140
|
+
|
|
141
|
+
#### Inherited from
|
|
142
|
+
|
|
143
|
+
[`SiteError`](SiteError.md).[`isError`](SiteError.md#iserror)
|
|
144
|
+
|
|
145
|
+
***
|
|
146
|
+
|
|
147
|
+
### prepareStackTrace()
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
static prepareStackTrace(err, stackTraces): any;
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Defined in: `@types/node`
|
|
154
|
+
|
|
155
|
+
#### Parameters
|
|
156
|
+
|
|
157
|
+
| Parameter | Type |
|
|
158
|
+
| ------ | ------ |
|
|
159
|
+
| `err` | `Error` |
|
|
160
|
+
| `stackTraces` | `CallSite`[] |
|
|
161
|
+
|
|
162
|
+
#### Returns
|
|
163
|
+
|
|
164
|
+
`any`
|
|
165
|
+
|
|
166
|
+
#### See
|
|
167
|
+
|
|
168
|
+
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
169
|
+
|
|
170
|
+
#### Inherited from
|
|
171
|
+
|
|
172
|
+
[`SiteError`](SiteError.md).[`prepareStackTrace`](SiteError.md#preparestacktrace)
|