@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.
Files changed (202) hide show
  1. package/README.md +2 -0
  2. package/api/.generated +50 -0
  3. package/api/@wtf/project-astro/README.md +68 -0
  4. package/api/@wtf/project-astro/config/README.md +38 -0
  5. package/api/@wtf/project-astro/config/functions/baseConfig.md +43 -0
  6. package/api/@wtf/project-astro/config/functions/baseOf.md +23 -0
  7. package/api/@wtf/project-astro/config/functions/siteOf.md +22 -0
  8. package/api/@wtf/project-astro/config/type-aliases/BaseOptions.md +73 -0
  9. package/api/@wtf/project-astro/config/type-aliases/Env.md +11 -0
  10. package/api/@wtf/project-astro/errors/README.md +16 -0
  11. package/api/@wtf/project-astro/errors/classes/BrokenLinksError.md +172 -0
  12. package/api/@wtf/project-astro/errors/classes/InvalidRedirectError.md +174 -0
  13. package/api/@wtf/project-astro/errors/classes/RedirectedLinksError.md +173 -0
  14. package/api/@wtf/project-astro/errors/classes/SiteError.md +192 -0
  15. package/api/@wtf/project-astro/index/README.md +19 -0
  16. package/api/@wtf/project-astro/index/type-aliases/BrokenLink.md +35 -0
  17. package/api/@wtf/project-astro/index/type-aliases/IgnoredLine.md +47 -0
  18. package/api/@wtf/project-astro/index/type-aliases/RedirectInput.md +17 -0
  19. package/api/@wtf/project-astro/index/type-aliases/RedirectMatch.md +35 -0
  20. package/api/@wtf/project-astro/index/type-aliases/RedirectRule.md +61 -0
  21. package/api/@wtf/project-astro/index/type-aliases/RedirectStatus.md +12 -0
  22. package/api/@wtf/project-astro/index/type-aliases/RedirectedLink.md +17 -0
  23. package/api/@wtf/project-astro/index/type-aliases/Redirects.md +35 -0
  24. package/api/@wtf/project-astro/links/README.md +27 -0
  25. package/api/@wtf/project-astro/links/functions/brokenLinksIn.md +27 -0
  26. package/api/@wtf/project-astro/links/functions/links.md +29 -0
  27. package/api/@wtf/project-astro/links/functions/redirectedLinksIn.md +27 -0
  28. package/api/@wtf/project-astro/links/variables/LINKS.md +11 -0
  29. package/api/@wtf/project-astro/pages/README.md +36 -0
  30. package/api/@wtf/project-astro/pages/functions/fixSearchUrlsIn.md +27 -0
  31. package/api/@wtf/project-astro/pages/functions/moveConflictingPages.md +23 -0
  32. package/api/@wtf/project-astro/pages/functions/pages.md +31 -0
  33. package/api/@wtf/project-astro/pages/functions/slashFolderLinksIn.md +35 -0
  34. package/api/@wtf/project-astro/pages/variables/PAGES.md +11 -0
  35. package/api/@wtf/project-astro/preview/README.md +34 -0
  36. package/api/@wtf/project-astro/preview/functions/files.md +39 -0
  37. package/api/@wtf/project-astro/preview/functions/listen.md +25 -0
  38. package/api/@wtf/project-astro/preview/functions/notFound.md +24 -0
  39. package/api/@wtf/project-astro/preview/functions/pagesOf.md +27 -0
  40. package/api/@wtf/project-astro/preview/type-aliases/FilesOptions.md +24 -0
  41. package/api/@wtf/project-astro/preview/type-aliases/Handler.md +21 -0
  42. package/api/@wtf/project-astro/preview/type-aliases/ListenOptions.md +35 -0
  43. package/api/@wtf/project-astro/preview/type-aliases/Listening.md +53 -0
  44. package/api/@wtf/project-astro/preview/type-aliases/Pages.md +35 -0
  45. package/api/@wtf/project-astro/redirects/README.md +28 -0
  46. package/api/@wtf/project-astro/redirects/functions/formatRedirects.md +28 -0
  47. package/api/@wtf/project-astro/redirects/functions/matchRedirect.md +35 -0
  48. package/api/@wtf/project-astro/redirects/functions/parseRedirects.md +32 -0
  49. package/api/@wtf/project-astro/redirects/variables/MAX_PARTS.md +11 -0
  50. package/api/@wtf/project-astro/redirects/variables/MAX_RULES.md +11 -0
  51. package/api/@wtf/project-astro/redirects/variables/MAX_SIZE.md +11 -0
  52. package/api/@wtf/project-oxfmt/variables/default.md +6 -6
  53. package/api/@wtf/project-oxlint/variables/default.md +17 -17
  54. package/api/@wtf/project-resolve/condition/variables/SOURCE_CONDITION.md +1 -1
  55. package/api/@wtf/project-resolve/env/functions/isHook.md +1 -1
  56. package/api/@wtf/project-resolve/env/functions/optionsWithoutHook.md +1 -1
  57. package/api/@wtf/project-resolve/env/functions/withoutHook.md +1 -1
  58. package/api/@wtf/project-resolve/env/type-aliases/Env.md +1 -1
  59. package/api/@wtf/project-resolve/errors/classes/ResolveError.md +4 -4
  60. package/api/@wtf/project-resolve/errors/classes/UnreadableWorkspaceError.md +6 -6
  61. package/api/@wtf/project-resolve/errors/classes/WorkspaceError.md +5 -5
  62. package/api/@wtf/project-resolve/hooks/functions/candidatesOf.md +1 -1
  63. package/api/@wtf/project-resolve/hooks/functions/sourcesHookOf.md +1 -1
  64. package/api/@wtf/project-resolve/hooks/functions/sourcesOf.md +1 -1
  65. package/api/@wtf/project-resolve/hooks/variables/resolveTypeScript.md +1 -1
  66. package/api/@wtf/project-resolve/node/functions/nodePlatform.md +5 -5
  67. package/api/@wtf/project-resolve/register/variables/REGISTERED.md +1 -1
  68. package/api/@wtf/project-resolve/workspace/functions/filesOf.md +1 -1
  69. package/api/@wtf/project-resolve/workspace/functions/packagesOf.md +1 -1
  70. package/api/@wtf/project-resolve/workspace/functions/workspaceAt.md +1 -1
  71. package/api/@wtf/project-resolve/workspace/functions/workspaceOf.md +1 -1
  72. package/api/@wtf/project-resolve/workspace/functions/workspaceRootAbove.md +1 -1
  73. package/api/@wtf/project-resolve/workspace/functions/workspaceRootOf.md +1 -1
  74. package/api/@wtf/project-resolve/workspace/type-aliases/Agent.md +1 -1
  75. package/api/@wtf/project-resolve/workspace/type-aliases/DirectoryEntry.md +4 -4
  76. package/api/@wtf/project-resolve/workspace/type-aliases/FileContents.md +3 -3
  77. package/api/@wtf/project-resolve/workspace/type-aliases/PackageManager.md +4 -4
  78. package/api/@wtf/project-resolve/workspace/type-aliases/PackageManagerName.md +1 -1
  79. package/api/@wtf/project-resolve/workspace/type-aliases/ProcessWorkspaceOptions.md +1 -1
  80. package/api/@wtf/project-resolve/workspace/type-aliases/Workspace.md +5 -5
  81. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceDirectoryHandle.md +6 -6
  82. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceFileHandle.md +3 -3
  83. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceFiles.md +6 -6
  84. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspaceOptions.md +2 -2
  85. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspacePackage.md +4 -4
  86. package/api/@wtf/project-resolve/workspace/type-aliases/WorkspacePaths.md +7 -7
  87. package/api/@wtf/project-typedoc/config/functions/gitRevisionOf.md +1 -1
  88. package/api/@wtf/project-typedoc/config/functions/typedocConfig.md +1 -1
  89. package/api/@wtf/project-typedoc/config/type-aliases/RevisionSources.md +3 -3
  90. package/api/@wtf/project-typedoc/config/type-aliases/TypedocConfig.md +1 -1
  91. package/api/@wtf/project-typedoc/config/type-aliases/TypedocOptions.md +6 -6
  92. package/api/@wtf/project-typedoc/config/variables/nodeRun.md +1 -1
  93. package/api/@wtf/project-typedoc/plugins/functions/cleanGeneratedMarkdown.md +1 -1
  94. package/api/@wtf/project-typedoc/plugins/functions/linkTrackedSources.md +1 -1
  95. package/api/@wtf/project-typedoc/plugins/functions/preventMediaFiles.md +1 -1
  96. package/api/@wtf/project-typedoc/plugins/type-aliases/CleanGeneratedMarkdownOptions.md +3 -3
  97. package/api/@wtf/project-typedoc/plugins/type-aliases/LinkTrackedSourcesOptions.md +3 -3
  98. package/api/@wtf/project-typedoc/plugins/type-aliases/PreventMediaFilesOptions.md +3 -3
  99. package/api/@wtf/project-typedoc/plugins/type-aliases/Run.md +1 -1
  100. package/api/@wtf/project-typedoc/plugins/type-aliases/TypedocPlugin.md +1 -1
  101. package/api/@wtf/project-vite/README.md +2 -2
  102. package/api/@wtf/project-vite/functions/baseConfig.md +4 -4
  103. package/api/@wtf/project-vite/functions/buildsSite.md +1 -1
  104. package/api/@wtf/project-vite/functions/compress.md +1 -1
  105. package/api/@wtf/project-vite/functions/conditionsOf.md +1 -1
  106. package/api/@wtf/project-vite/type-aliases/BaseOptions.md +2 -2
  107. package/api/@wtf/project-vite/type-aliases/CompressOptions.md +4 -4
  108. package/api/@wtf/project-vite/variables/CLIENT_CONDITIONS.md +1 -1
  109. package/api/@wtf/project-vite/variables/COMPRESSIBLE.md +1 -1
  110. package/api/@wtf/project-vite/variables/FROM_DIST.md +1 -1
  111. package/api/@wtf/project-vite/variables/THRESHOLD.md +1 -1
  112. package/api/@wtf/project-vitest/README.md +1 -1
  113. package/api/@wtf/project-vitest/browser/functions/browserConfig.md +1 -1
  114. package/api/@wtf/project-vitest/browser/functions/browserRootConfig.md +1 -1
  115. package/api/@wtf/project-vitest/browser/type-aliases/BrowserOptions.md +3 -3
  116. package/api/@wtf/project-vitest/config/functions/integrationConfig.md +1 -1
  117. package/api/@wtf/project-vitest/config/functions/packageConfig.md +1 -1
  118. package/api/@wtf/project-vitest/config/functions/rootConfig.md +1 -1
  119. package/api/@wtf/project-vitest/config/type-aliases/RootConfigOptions.md +2 -2
  120. package/api/@wtf/project-vitest/config/type-aliases/RootOptions.md +7 -7
  121. package/api/@wtf/project-vitest/config/variables/FROM_DIST.md +1 -1
  122. package/api/@wtf/project-vitest/config/variables/GUARD_TIMEOUT.md +1 -1
  123. package/api/@wtf/project-vitest/config/variables/integration.md +9 -9
  124. package/api/@wtf/project-vitest/process/functions/childEnv.md +1 -1
  125. package/api/@wtf/project-vitest/process/type-aliases/Env.md +1 -1
  126. package/api/@wtf/project-vitest/storybook/functions/storybookConfig.md +1 -1
  127. package/api/@wtf/project-vitest/storybook/type-aliases/StorybookOptions.md +2 -2
  128. package/api/@wtf/project-wpt/builtins/functions/builtins.md +1 -1
  129. package/api/@wtf/project-wpt/builtins/functions/intrinsics.md +1 -1
  130. package/api/@wtf/project-wpt/checkout/functions/checkoutFolderOf.md +1 -1
  131. package/api/@wtf/project-wpt/checkout/functions/checkoutTests.md +1 -1
  132. package/api/@wtf/project-wpt/checkout/functions/checkoutWpt.md +1 -1
  133. package/api/@wtf/project-wpt/checkout/functions/fileOf.md +1 -1
  134. package/api/@wtf/project-wpt/checkout/type-aliases/CheckedOutTests.md +3 -3
  135. package/api/@wtf/project-wpt/checkout/type-aliases/CheckoutOptions.md +8 -8
  136. package/api/@wtf/project-wpt/checkout/type-aliases/CheckoutTestsOptions.md +2 -2
  137. package/api/@wtf/project-wpt/checkout/variables/HARNESS.md +1 -1
  138. package/api/@wtf/project-wpt/checkout/variables/REWRITES.md +1 -1
  139. package/api/@wtf/project-wpt/checkout/variables/WPT_REPOSITORY.md +1 -1
  140. package/api/@wtf/project-wpt/errors/classes/HarnessFailedError.md +4 -4
  141. package/api/@wtf/project-wpt/errors/classes/InvalidCommitError.md +4 -4
  142. package/api/@wtf/project-wpt/errors/classes/InvalidExpectationsError.md +4 -4
  143. package/api/@wtf/project-wpt/errors/classes/NoSuiteError.md +4 -4
  144. package/api/@wtf/project-wpt/errors/classes/NotInWptError.md +5 -5
  145. package/api/@wtf/project-wpt/errors/classes/StaleExpectationError.md +4 -4
  146. package/api/@wtf/project-wpt/errors/classes/SubtestFailedError.md +4 -4
  147. package/api/@wtf/project-wpt/errors/classes/UnexpectedPassError.md +4 -4
  148. package/api/@wtf/project-wpt/errors/classes/WptError.md +4 -4
  149. package/api/@wtf/project-wpt/errors/classes/WptFetchError.md +4 -4
  150. package/api/@wtf/project-wpt/expectations/functions/checkHarness.md +1 -1
  151. package/api/@wtf/project-wpt/expectations/functions/checkSubtest.md +1 -1
  152. package/api/@wtf/project-wpt/expectations/functions/expectationOf.md +1 -1
  153. package/api/@wtf/project-wpt/expectations/functions/expectationsIssues.md +1 -1
  154. package/api/@wtf/project-wpt/expectations/functions/readExpectations.md +1 -1
  155. package/api/@wtf/project-wpt/expectations/functions/staleOf.md +1 -1
  156. package/api/@wtf/project-wpt/expectations/type-aliases/ReadExpectations.md +3 -3
  157. package/api/@wtf/project-wpt/index/type-aliases/ClearTimeout.md +1 -1
  158. package/api/@wtf/project-wpt/index/type-aliases/CreateRealm.md +1 -1
  159. package/api/@wtf/project-wpt/index/type-aliases/Env.md +1 -1
  160. package/api/@wtf/project-wpt/index/type-aliases/Exec.md +1 -1
  161. package/api/@wtf/project-wpt/index/type-aliases/Expectations.md +1 -1
  162. package/api/@wtf/project-wpt/index/type-aliases/FileExpectation.md +4 -4
  163. package/api/@wtf/project-wpt/index/type-aliases/FileResult.md +4 -4
  164. package/api/@wtf/project-wpt/index/type-aliases/Globals.md +1 -1
  165. package/api/@wtf/project-wpt/index/type-aliases/HarnessResult.md +4 -4
  166. package/api/@wtf/project-wpt/index/type-aliases/HarnessStatus.md +1 -1
  167. package/api/@wtf/project-wpt/index/type-aliases/HoldRejections.md +1 -1
  168. package/api/@wtf/project-wpt/index/type-aliases/Performance.md +3 -3
  169. package/api/@wtf/project-wpt/index/type-aliases/Realm.md +3 -3
  170. package/api/@wtf/project-wpt/index/type-aliases/SetTimeout.md +1 -1
  171. package/api/@wtf/project-wpt/index/type-aliases/SubtestResult.md +5 -5
  172. package/api/@wtf/project-wpt/index/type-aliases/SubtestStatus.md +1 -1
  173. package/api/@wtf/project-wpt/index/type-aliases/WptFile.md +3 -3
  174. package/api/@wtf/project-wpt/index/type-aliases/WptFiles.md +9 -9
  175. package/api/@wtf/project-wpt/index/type-aliases/WptPaths.md +4 -4
  176. package/api/@wtf/project-wpt/index/type-aliases/WptPlatform.md +6 -6
  177. package/api/@wtf/project-wpt/index/type-aliases/WptSystem.md +6 -6
  178. package/api/@wtf/project-wpt/index/type-aliases/WptTest.md +3 -3
  179. package/api/@wtf/project-wpt/meta/functions/idOf.md +1 -1
  180. package/api/@wtf/project-wpt/meta/functions/metaOf.md +1 -1
  181. package/api/@wtf/project-wpt/meta/functions/runsOutsideWindow.md +1 -1
  182. package/api/@wtf/project-wpt/meta/functions/scriptPathsOf.md +1 -1
  183. package/api/@wtf/project-wpt/meta/functions/testsOf.md +1 -1
  184. package/api/@wtf/project-wpt/meta/type-aliases/Meta.md +6 -6
  185. package/api/@wtf/project-wpt/node/functions/nodePlatform.md +1 -1
  186. package/api/@wtf/project-wpt/node/functions/nodeSystem.md +1 -1
  187. package/api/@wtf/project-wpt/node/variables/nodeExec.md +1 -1
  188. package/api/@wtf/project-wpt/node/variables/nodeFiles.md +1 -1
  189. package/api/@wtf/project-wpt/node/variables/nodeRealm.md +1 -1
  190. package/api/@wtf/project-wpt/node/variables/nodeRejections.md +1 -1
  191. package/api/@wtf/project-wpt/run/functions/runTest.md +1 -1
  192. package/api/@wtf/project-wpt/run/type-aliases/RunOptions.md +8 -8
  193. package/api/@wtf/project-wpt/run/type-aliases/RunPlatform.md +1 -1
  194. package/api/@wtf/project-wpt/run/variables/LONG_TIMEOUT.md +1 -1
  195. package/api/@wtf/project-wpt/run/variables/TIMEOUT.md +1 -1
  196. package/api/@wtf/project-wpt/run/variables/WPT_ORIGIN.md +1 -1
  197. package/api/@wtf/project-wpt/suite/functions/wptSuite.md +1 -1
  198. package/api/@wtf/project-wpt/suite/type-aliases/WptSuiteOptions.md +8 -8
  199. package/api/README.md +1 -0
  200. package/api/trains.json +34 -0
  201. package/guides/astro.md +173 -0
  202. package/package.json +15 -6
@@ -0,0 +1,61 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [index](../README.md) / RedirectRule
2
+
3
+ # Type Alias: RedirectRule
4
+
5
+ ```ts
6
+ type RedirectRule = object;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/index.ts:22](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L22)
10
+
11
+ A rule of a `_redirects` file: a request whose path matches `from` is sent to `to`. `from` is a
12
+ path; each `:name` in it matches one part of a path, and a `*` at its end matches the rest, as
13
+ `:splat`. `to` is a path or a full URL, and takes the values of `from`, as `/blog/:year/:splat`.
14
+
15
+ ## Properties
16
+
17
+ ### from
18
+
19
+ ```ts
20
+ readonly from: string;
21
+ ```
22
+
23
+ Defined in: [packages/project-astro/src/index.ts:24](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L24)
24
+
25
+ The path a request's path matches, such as `/blog/:year/*`.
26
+
27
+ ***
28
+
29
+ ### line
30
+
31
+ ```ts
32
+ readonly line: number;
33
+ ```
34
+
35
+ Defined in: [packages/project-astro/src/index.ts:30](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L30)
36
+
37
+ The line of the file the rule is on, from 1.
38
+
39
+ ***
40
+
41
+ ### status
42
+
43
+ ```ts
44
+ readonly status: RedirectStatus;
45
+ ```
46
+
47
+ Defined in: [packages/project-astro/src/index.ts:28](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L28)
48
+
49
+ What the rule answers with: a redirect, `301` or `302`, or a rewrite, `200`.
50
+
51
+ ***
52
+
53
+ ### to
54
+
55
+ ```ts
56
+ readonly to: string;
57
+ ```
58
+
59
+ Defined in: [packages/project-astro/src/index.ts:26](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L26)
60
+
61
+ Where the rule sends a request: a path, or a full URL of a redirect.
@@ -0,0 +1,12 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [index](../README.md) / RedirectStatus
2
+
3
+ # Type Alias: RedirectStatus
4
+
5
+ ```ts
6
+ type RedirectStatus = 200 | 301 | 302;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/index.ts:15](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L15)
10
+
11
+ The status of a rule of `_redirects`: `301 Moved Permanently` and `302 Found` redirect, and
12
+ `200` rewrites, serving what is at the rule's `to` under the URL that was asked for.
@@ -0,0 +1,17 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [index](../README.md) / RedirectedLink
2
+
3
+ # Type Alias: RedirectedLink
4
+
5
+ ```ts
6
+ type RedirectedLink = BrokenLink & object;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/index.ts:74](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L74)
10
+
11
+ An internal link of a built page that leads to its page only through a redirect.
12
+
13
+ ## Type Declaration
14
+
15
+ | Name | Type | Description | Defined in |
16
+ | ------ | ------ | ------ | ------ |
17
+ | `location` | `string` | Where GitLab Pages sends the link, such as `/en/guides/` of `/en/guides`. | [packages/project-astro/src/index.ts:76](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L76) |
@@ -0,0 +1,35 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [index](../README.md) / Redirects
2
+
3
+ # Type Alias: Redirects
4
+
5
+ ```ts
6
+ type Redirects = object;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/index.ts:50](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L50)
10
+
11
+ A `_redirects` file, read: its rules, in order, and each line it ignored.
12
+
13
+ ## Properties
14
+
15
+ ### ignored
16
+
17
+ ```ts
18
+ readonly ignored: readonly IgnoredLine[];
19
+ ```
20
+
21
+ Defined in: [packages/project-astro/src/index.ts:54](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L54)
22
+
23
+ Each line GitLab Pages ignores, with why.
24
+
25
+ ***
26
+
27
+ ### rules
28
+
29
+ ```ts
30
+ readonly rules: readonly RedirectRule[];
31
+ ```
32
+
33
+ Defined in: [packages/project-astro/src/index.ts:52](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/index.ts#L52)
34
+
35
+ The rules GitLab Pages reads, in the order of the file.
@@ -0,0 +1,27 @@
1
+ [Documentation](../../../README.md) / [@wtf/project-astro](../README.md) / links
2
+
3
+ # links
4
+
5
+ The internal links of a built site, checked as GitLab Pages serves it: [links](functions/links.md), the Astro
6
+ integration that fails the build on a link that leads to no page, or only through a redirect;
7
+ and the checks it runs, each through the handle of the folder of the build, of the WHATWG File
8
+ System Standard: [brokenLinksIn](functions/brokenLinksIn.md), each link that leads to no page, and
9
+ [redirectedLinksIn](functions/redirectedLinksIn.md), each link that GitLab Pages answers with a redirect.
10
+
11
+ ```ts
12
+ import type { FileSystemDirectoryHandle } from '@wtf/platform/fs'
13
+
14
+ declare const dist: FileSystemDirectoryHandle
15
+
16
+ for (const { page, href } of await brokenLinksIn(dist, '/')) console.error(`${page}: ${href}`)
17
+ ```
18
+
19
+ ## Variables
20
+
21
+ - [LINKS](variables/LINKS.md)
22
+
23
+ ## Functions
24
+
25
+ - [brokenLinksIn](functions/brokenLinksIn.md)
26
+ - [links](functions/links.md)
27
+ - [redirectedLinksIn](functions/redirectedLinksIn.md)
@@ -0,0 +1,27 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [links](../README.md) / brokenLinksIn
2
+
3
+ # Function: brokenLinksIn()
4
+
5
+ ```ts
6
+ function brokenLinksIn(folder, base): Promise<BrokenLink[]>;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/links.ts:94](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/links.ts#L94)
10
+
11
+ Each internal link of the pages below `folder`, the folder of a built site served under `base`,
12
+ that leads to no page, as GitLab Pages serves the folder: an `href` of a root-absolute path or a
13
+ relative one, resolved against its page, that finds no file, no folder of an `index.html`, no
14
+ page `<path>.html`, with or without its last slash, and no rule of the folder's `_redirects`
15
+ that leads to a page. A link to another site, or to a path outside `base`, is not checked, nor a
16
+ link to a fragment of its own page alone.
17
+
18
+ ## Parameters
19
+
20
+ | Parameter | Type |
21
+ | ------ | ------ |
22
+ | `folder` | `FileSystemDirectoryHandle` |
23
+ | `base` | `string` |
24
+
25
+ ## Returns
26
+
27
+ `Promise`\<[`BrokenLink`](../../index/type-aliases/BrokenLink.md)[]\>
@@ -0,0 +1,29 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [links](../README.md) / links
2
+
3
+ # Function: links()
4
+
5
+ ```ts
6
+ function links(): AstroIntegration;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/links.ts:149](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/links.ts#L149)
10
+
11
+ The Astro integration that fails a site's build on an internal link that leads to no page, or
12
+ that reaches its page only through a redirect, as GitLab Pages serves the build, `_redirects`
13
+ included. Once the build is done, after every other integration's own hook, and after
14
+ `pages()` of `./pages` where it is listed before this, it checks each page under the site's
15
+ `base`: a link of no page fails the build with a [BrokenLinksError](../../errors/classes/BrokenLinksError.md) of `./errors`, which
16
+ lists each one with its page; a link that is redirected, with a [RedirectedLinksError](../../errors/classes/RedirectedLinksError.md),
17
+ which says where each one leads. It logs each one first. It reads the folder of the build on the
18
+ disk, by `nodeDirectory` of `@wtf/platform-fs-node/handles`. `baseConfig()` of `./config` lists
19
+ it.
20
+
21
+ ```ts
22
+ import { defineConfig } from 'astro/config'
23
+
24
+ export default defineConfig({ integrations: [links()] })
25
+ ```
26
+
27
+ ## Returns
28
+
29
+ `AstroIntegration`
@@ -0,0 +1,27 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [links](../README.md) / redirectedLinksIn
2
+
3
+ # Function: redirectedLinksIn()
4
+
5
+ ```ts
6
+ function redirectedLinksIn(folder, base): Promise<RedirectedLink[]>;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/links.ts:116](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/links.ts#L116)
10
+
11
+ Each internal link of the pages below `folder`, the folder of a built site served under `base`,
12
+ that GitLab Pages answers with a redirect: a link to a folder of an `index.html` without its
13
+ final slash, which `slashFolderLinksIn` of `./pages` gives one, or a link that a redirect rule
14
+ of the folder's `_redirects` (301 or 302) answers, such as the base of a site that sends a
15
+ reader on to a page of a language. Each costs a reader a round trip; the link to the page itself
16
+ costs none. The links are those [brokenLinksIn](brokenLinksIn.md) checks.
17
+
18
+ ## Parameters
19
+
20
+ | Parameter | Type |
21
+ | ------ | ------ |
22
+ | `folder` | `FileSystemDirectoryHandle` |
23
+ | `base` | `string` |
24
+
25
+ ## Returns
26
+
27
+ `Promise`\<[`RedirectedLink`](../../index/type-aliases/RedirectedLink.md)[]\>
@@ -0,0 +1,11 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [links](../README.md) / LINKS
2
+
3
+ # Variable: LINKS
4
+
5
+ ```ts
6
+ const LINKS: "wtf-project:links" = 'wtf-project:links';
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/links.ts:41](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/links.ts#L41)
10
+
11
+ The name of the integration [links](../functions/links.md) gives, and of the one it adds to run last.
@@ -0,0 +1,36 @@
1
+ [Documentation](../../../README.md) / [@wtf/project-astro](../README.md) / pages
2
+
3
+ # pages
4
+
5
+ A built Astro site made to serve on GitLab Pages: [pages](functions/pages.md), the Astro integration that runs
6
+ the passes below over the folder of the build, once Astro and every other integration have
7
+ written it; and the passes, each through the handle of the folder, of the WHATWG File System
8
+ Standard:
9
+
10
+ - [moveConflictingPages](functions/moveConflictingPages.md): each page `X.html` beside a folder `X/` moved to `X/index.html`,
11
+ as GitLab Pages cannot serve the page beside the folder;
12
+ - [slashFolderLinksIn](functions/slashFolderLinksIn.md): each link to a page built as a folder given its final slash, as
13
+ GitLab Pages answers it without one with a redirect;
14
+ - [fixSearchUrlsIn](functions/fixSearchUrlsIn.md): each page of Pagefind's index given the URL it is served at, once it
15
+ moved.
16
+
17
+ ```ts
18
+ import type { FileSystemDirectoryHandle } from '@wtf/platform/fs'
19
+
20
+ declare const dist: FileSystemDirectoryHandle
21
+
22
+ await moveConflictingPages(dist)
23
+ await slashFolderLinksIn(dist, '/', 'https://example.com/')
24
+ await fixSearchUrlsIn(dist, '/')
25
+ ```
26
+
27
+ ## Variables
28
+
29
+ - [PAGES](variables/PAGES.md)
30
+
31
+ ## Functions
32
+
33
+ - [fixSearchUrlsIn](functions/fixSearchUrlsIn.md)
34
+ - [moveConflictingPages](functions/moveConflictingPages.md)
35
+ - [pages](functions/pages.md)
36
+ - [slashFolderLinksIn](functions/slashFolderLinksIn.md)
@@ -0,0 +1,27 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [pages](../README.md) / fixSearchUrlsIn
2
+
3
+ # Function: fixSearchUrlsIn()
4
+
5
+ ```ts
6
+ function fixSearchUrlsIn(folder, base): Promise<number>;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/pages.ts:183](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/pages.ts#L183)
10
+
11
+ Gives each page of the search index below `folder`, the folder of a built site served under
12
+ `base`, the URL it is served at. Pagefind, as Starlight runs it, indexes the build before the
13
+ moves of [moveConflictingPages](moveConflictingPages.md), so it records a page `x.html` that then moved to
14
+ `x/index.html` at `x.html`; this records it at `x/`, and each page `x.html` that stayed at `x`,
15
+ as the site links it. It rewrites each fragment of `pagefind/fragment`, whose `url` the results
16
+ link to. Resolves to the count of fragments it changed; none in a site with no search index.
17
+
18
+ ## Parameters
19
+
20
+ | Parameter | Type |
21
+ | ------ | ------ |
22
+ | `folder` | `FileSystemDirectoryHandle` |
23
+ | `base` | `string` |
24
+
25
+ ## Returns
26
+
27
+ `Promise`\<`number`\>
@@ -0,0 +1,23 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [pages](../README.md) / moveConflictingPages
2
+
3
+ # Function: moveConflictingPages()
4
+
5
+ ```ts
6
+ function moveConflictingPages(folder): Promise<number>;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/pages.ts:54](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/pages.ts#L54)
10
+
11
+ Moves each page `X.html` that has a folder `X/` beside it to `X/index.html`, below `folder`, at
12
+ any depth: GitLab Pages cannot serve `X.html` when a folder `X` is there too. A folder that holds
13
+ an `index.html` already keeps it. Resolves to the count of pages it moved.
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type |
18
+ | ------ | ------ |
19
+ | `folder` | `FileSystemDirectoryHandle` |
20
+
21
+ ## Returns
22
+
23
+ `Promise`\<`number`\>
@@ -0,0 +1,31 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [pages](../README.md) / pages
2
+
3
+ # Function: pages()
4
+
5
+ ```ts
6
+ function pages(): AstroIntegration;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/pages.ts:234](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/pages.ts#L234)
10
+
11
+ The Astro integration that makes a site's build serve on GitLab Pages. Once the build is done,
12
+ after every other integration's own hook, as Starlight's, whose search indexes the pages, it
13
+ moves each page beside a folder of its name into it ([moveConflictingPages](moveConflictingPages.md)), gives each
14
+ link to a page built as a folder its final slash, of the pages and the sitemap
15
+ ([slashFolderLinksIn](slashFolderLinksIn.md)), and gives each page of the search index the URL it is served at
16
+ ([fixSearchUrlsIn](fixSearchUrlsIn.md)), under the site's `base`. It reads the folder of the build on the disk,
17
+ by `nodeDirectory` of `@wtf/platform-fs-node/handles`. `baseConfig()` of `./config` lists it.
18
+
19
+ ```ts
20
+ import { defineConfig } from 'astro/config'
21
+
22
+ export default defineConfig({
23
+ trailingSlash: 'never',
24
+ build: { format: 'preserve' },
25
+ integrations: [pages()]
26
+ })
27
+ ```
28
+
29
+ ## Returns
30
+
31
+ `AstroIntegration`
@@ -0,0 +1,35 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [pages](../README.md) / slashFolderLinksIn
2
+
3
+ # Function: slashFolderLinksIn()
4
+
5
+ ```ts
6
+ function slashFolderLinksIn(
7
+ folder,
8
+ base,
9
+ site?
10
+ ): Promise<number>;
11
+ ```
12
+
13
+ Defined in: [packages/project-astro/src/pages.ts:92](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/pages.ts#L92)
14
+
15
+ Gives each internal link of the pages below `folder`, the folder of a built site served under
16
+ `base`, the URL its page is served at: a link to a page built as the `index.html` of a folder,
17
+ such as `/docs/guides`, gets its final slash, `/docs/guides/`, as GitLab Pages would otherwise
18
+ answer it with a redirect there. It reads what was built, after [moveConflictingPages](moveConflictingPages.md), so
19
+ a page's links follow the files and nothing else. It changes each `href`, of a root-absolute
20
+ path, a relative one, or a URL of the origin of `site`, and each `value` of an `<option>` of a
21
+ root-absolute path, which a picker navigates to. Given the `site`, it also changes each `<loc>`
22
+ of a sitemap at the top of the folder (`sitemap*.xml`). The query and the fragment of a link
23
+ stay. Resolves to the count of files it changed.
24
+
25
+ ## Parameters
26
+
27
+ | Parameter | Type |
28
+ | ------ | ------ |
29
+ | `folder` | `FileSystemDirectoryHandle` |
30
+ | `base` | `string` |
31
+ | `site?` | `string` |
32
+
33
+ ## Returns
34
+
35
+ `Promise`\<`number`\>
@@ -0,0 +1,11 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [pages](../README.md) / PAGES
2
+
3
+ # Variable: PAGES
4
+
5
+ ```ts
6
+ const PAGES: "wtf-project:pages" = 'wtf-project:pages';
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/pages.ts:47](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/pages.ts#L47)
10
+
11
+ The name of the integration [pages](../functions/pages.md) gives, and of the one it adds to run last.
@@ -0,0 +1,34 @@
1
+ [Documentation](../../../README.md) / [@wtf/project-astro](../README.md) / preview
2
+
3
+ # preview
4
+
5
+ A built site served as GitLab Pages serves it, to try it before it ships: [pagesOf](functions/pagesOf.md), the
6
+ [Handler](type-aliases/Handler.md) of the folder of the build, of its files, the rules of its `_redirects` and its
7
+ `404.html`, under the site's base; the parts it is made of, [files](functions/files.md) and [notFound](functions/notFound.md);
8
+ and [listen](functions/listen.md), which serves a handler on Node's HTTP server. `project-astro preview` serves
9
+ a folder of the disk by them. The folder is a handle of the WHATWG File System Standard, so a
10
+ test can serve one in memory.
11
+
12
+ ```ts
13
+ import { nodeDirectory } from '@wtf/platform-fs-node/handles'
14
+
15
+ const { handler, ignored } = await pagesOf(await nodeDirectory('dist'), '/')
16
+ for (const { line, reason } of ignored) console.warn(`_redirects:${line}: ${reason}`)
17
+ const server = await listen(handler, { port: 4321 })
18
+ console.log(`${server.url}`)
19
+ ```
20
+
21
+ ## Type Aliases
22
+
23
+ - [FilesOptions](type-aliases/FilesOptions.md)
24
+ - [Handler](type-aliases/Handler.md)
25
+ - [Listening](type-aliases/Listening.md)
26
+ - [ListenOptions](type-aliases/ListenOptions.md)
27
+ - [Pages](type-aliases/Pages.md)
28
+
29
+ ## Functions
30
+
31
+ - [files](functions/files.md)
32
+ - [listen](functions/listen.md)
33
+ - [notFound](functions/notFound.md)
34
+ - [pagesOf](functions/pagesOf.md)
@@ -0,0 +1,39 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [preview](../README.md) / files
2
+
3
+ # Function: files()
4
+
5
+ ```ts
6
+ function files(folder, options?): Handler;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/preview.ts:289](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/preview.ts#L289)
10
+
11
+ A [Handler](../type-aliases/Handler.md) that serves the files of `folder`, as GitLab Pages does. Each `GET` and
12
+ `HEAD` gets the file at the request's path:
13
+
14
+ - a path that ends with a slash gets the `index.html` of its folder;
15
+ - a folder asked for without the last slash is redirected to it with the slash (`302 Found`),
16
+ by a relative `Location`, so it works under any base;
17
+ - with `cleanUrls`, a path with no file or folder gets `<path>.html` when there is one:
18
+ `/guide` and `/guide/` get `guide.html`.
19
+
20
+ The answer has `Content-Type` by the file's extension, `Content-Length`, `Last-Modified`, a
21
+ weak `ETag`, and `Accept-Ranges`. A request whose `If-None-Match` or `If-Modified-Since` says
22
+ its copy is current gets `304 Not Modified`. A `Range` of one range of bytes gets
23
+ `206 Partial Content`, or `416 Range Not Satisfiable` past the end; a request for many ranges
24
+ gets the whole file. A path never leads out of the folder: a `..`, or a `/` or `` encoded in a
25
+ name, finds nothing.
26
+
27
+ Anything else, such as a path with no file, or a `POST`, is a miss: `404 Not Found`, with no
28
+ body, so [pagesOf](pagesOf.md) asks its next handler.
29
+
30
+ ## Parameters
31
+
32
+ | Parameter | Type |
33
+ | ------ | ------ |
34
+ | `folder` | `FileSystemDirectoryHandle` |
35
+ | `options` | [`FilesOptions`](../type-aliases/FilesOptions.md) |
36
+
37
+ ## Returns
38
+
39
+ [`Handler`](../type-aliases/Handler.md)
@@ -0,0 +1,25 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [preview](../README.md) / listen
2
+
3
+ # Function: listen()
4
+
5
+ ```ts
6
+ function listen(handler, options?): Promise<Listening>;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/preview.ts:466](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/preview.ts#L466)
10
+
11
+ Serves `handler` on Node's HTTP server, at `host` and `port`, `localhost:4321` by default: each
12
+ request made a `Request`, its `signal` aborted as its client goes away, and each `Response`
13
+ written back, its body streamed. A handler that throws is answered `500`. Resolves once the
14
+ server listens, with the URL it is served at; rejects of a port it cannot listen on.
15
+
16
+ ## Parameters
17
+
18
+ | Parameter | Type |
19
+ | ------ | ------ |
20
+ | `handler` | [`Handler`](../type-aliases/Handler.md) |
21
+ | `options` | [`ListenOptions`](../type-aliases/ListenOptions.md) |
22
+
23
+ ## Returns
24
+
25
+ `Promise`\<[`Listening`](../type-aliases/Listening.md)\>
@@ -0,0 +1,24 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [preview](../README.md) / notFound
2
+
3
+ # Function: notFound()
4
+
5
+ ```ts
6
+ function notFound(folder, path): Handler;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/preview.ts:320](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/preview.ts#L320)
10
+
11
+ A [Handler](../type-aliases/Handler.md) that answers every request with the page at `path` of `folder`, such as
12
+ `404.html`, and the status `404 Not Found`. A `HEAD` gets its head alone. Without the page, the
13
+ answer is `404` with no body.
14
+
15
+ ## Parameters
16
+
17
+ | Parameter | Type |
18
+ | ------ | ------ |
19
+ | `folder` | `FileSystemDirectoryHandle` |
20
+ | `path` | `string` |
21
+
22
+ ## Returns
23
+
24
+ [`Handler`](../type-aliases/Handler.md)
@@ -0,0 +1,27 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [preview](../README.md) / pagesOf
2
+
3
+ # Function: pagesOf()
4
+
5
+ ```ts
6
+ function pagesOf(folder, base): Promise<Pages>;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/preview.ts:422](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/preview.ts#L422)
10
+
11
+ The site built into `folder`, served under `base` as GitLab Pages serves it. A file at the path
12
+ wins: a folder's `index.html`, and `<path>.html` of a clean URL ([files](files.md)). Then the first
13
+ rule of the folder's `_redirects` that matches, its paths written with the base, as GitLab Pages
14
+ reads them. Then the folder's `404.html`, with the status `404` ([notFound](notFound.md)). A path
15
+ outside the base gets a `404` with no body. It resolves with the lines of `_redirects` that
16
+ GitLab Pages ignores, and why.
17
+
18
+ ## Parameters
19
+
20
+ | Parameter | Type |
21
+ | ------ | ------ |
22
+ | `folder` | `FileSystemDirectoryHandle` |
23
+ | `base` | `string` |
24
+
25
+ ## Returns
26
+
27
+ `Promise`\<[`Pages`](../type-aliases/Pages.md)\>
@@ -0,0 +1,24 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [preview](../README.md) / FilesOptions
2
+
3
+ # Type Alias: FilesOptions
4
+
5
+ ```ts
6
+ type FilesOptions = object;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/preview.ts:40](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/preview.ts#L40)
10
+
11
+ How [files](../functions/files.md) serves a folder.
12
+
13
+ ## Properties
14
+
15
+ ### cleanUrls?
16
+
17
+ ```ts
18
+ readonly optional cleanUrls?: boolean;
19
+ ```
20
+
21
+ Defined in: [packages/project-astro/src/preview.ts:45](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/preview.ts#L45)
22
+
23
+ Serve a clean URL from its page: `/guide`, or `/guide/`, from `guide.html` when there is no
24
+ file or folder `guide`, as GitLab Pages does. Off by default.
@@ -0,0 +1,21 @@
1
+ [Documentation](../../../../README.md) / [@wtf/project-astro](../../README.md) / [preview](../README.md) / Handler
2
+
3
+ # Type Alias: Handler
4
+
5
+ ```ts
6
+ type Handler = (request) => Promise<Response>;
7
+ ```
8
+
9
+ Defined in: [packages/project-astro/src/preview.ts:37](https://gitlab.com/wetryfun/project/project/-/blob/docs-v1.1.0/packages/project-astro/src/preview.ts#L37)
10
+
11
+ What answers a request: a function of the Fetch API's `Request` and `Response`.
12
+
13
+ ## Parameters
14
+
15
+ | Parameter | Type |
16
+ | ------ | ------ |
17
+ | `request` | `Request` |
18
+
19
+ ## Returns
20
+
21
+ `Promise`\<`Response`\>