@alauda/doom 0.22.3 → 0.22.4

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-present Alauda.io
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Doom
2
2
 
3
+ [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/alauda/doom/ci.yml?branch=main)](https://github.com/alauda/doom/actions/workflows/ci.yml?query=branch%3Amain)
4
+ [![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Falauda%2Fdoom%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
5
+ [![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/alauda/doom)](https://coderabbit.ai)
6
+ [![npm](https://img.shields.io/npm/v/@alauda/doom.svg)](https://www.npmjs.com/package/@alauda/doom)
7
+ [![GitHub Release](https://img.shields.io/github/release/alauda/doom)](https://github.com/alauda/doom/releases)
8
+
9
+ [![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
10
+ [![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)
11
+ [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
12
+ [![Code Style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
13
+ [![changesets](https://img.shields.io/badge/maintained%20with-changesets-176de3.svg)](https://github.com/changesets/changesets)
14
+
3
15
  Doctor Doom making docs.
4
16
 
5
- Please view <https://doom.alauda.cn/> for its documents.
17
+ Please view <https://doom.js.org/> for its documents.
18
+
19
+ ## Changelog
20
+
21
+ Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).
22
+
23
+ ## License
24
+
25
+ [MIT][] © [Alauda][]
26
+
27
+ [alauda]: https://www.alauda.io
28
+ [MIT]: http://opensource.org/licenses/MIT
@@ -23,7 +23,8 @@ export async function mergePDFs(entries) {
23
23
  pyodide.FS.mkdirTree(MOUNT_DIR);
24
24
  pyodide.FS.mount(
25
25
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
26
- pyodide.FS.filesystems.NODEFS, { root: pyodideDir }, MOUNT_DIR);
26
+ pyodide.FS.filesystems.NODEFS, // type-coverage:ignore-line -- out of control
27
+ { root: pyodideDir }, MOUNT_DIR);
27
28
  /**
28
29
  * @see https://github.com/pyodide/pyodide/issues/3246#issuecomment-1312210155
29
30
  * You need to prefix the path with emfs: or it will be treated as a url
@@ -73,7 +73,7 @@ const VersionsNav_ = () => {
73
73
  }, []);
74
74
  // hack way to detect nav menu recreation on theme change
75
75
  useEffect(() => {
76
- if (!navMenu?.parentNode) {
76
+ if (!navMenu) {
77
77
  return;
78
78
  }
79
79
  const observer = new MutationObserver((mutations) => {
@@ -81,7 +81,13 @@ const VersionsNav_ = () => {
81
81
  setNavMenu(getNavMenu);
82
82
  }
83
83
  });
84
- observer.observe(navMenu.parentNode, { childList: true });
84
+ const newNavMenu = getNavMenu();
85
+ if (newNavMenu !== navMenu) {
86
+ setNavMenu(newNavMenu);
87
+ }
88
+ else if (navMenu.parentNode) {
89
+ observer.observe(navMenu.parentNode, { childList: true });
90
+ }
85
91
  return () => {
86
92
  observer.disconnect();
87
93
  };
@@ -60,7 +60,7 @@ export const replacePlugin = ({ lang, localBasePath, force, }) => {
60
60
  }));
61
61
  for (const result of results) {
62
62
  if (result.status === 'rejected') {
63
- logger.error(result.reason);
63
+ logger.error(result.reason); // type-coverage:ignore-line -- out of control
64
64
  }
65
65
  }
66
66
  },
@@ -84,7 +84,8 @@ const resolveRelease_ = async (releaseTemplates, releaseQuery) => {
84
84
  }
85
85
  catch (err) {
86
86
  if (err instanceof ResponseError) {
87
- logger.error(`Failed to fetch release notes for query \`${red(releaseQuery)}\` with status \`${err.response.status}\` and ${err.data ? `data ${JSON.stringify(data, null, 2)}` : `message \`${err.message}\``}`);
87
+ const error = err;
88
+ logger.error(`Failed to fetch release notes for query \`${red(releaseQuery)}\` with status \`${error.response.status}\` and ${error.data ? `data ${JSON.stringify(data, null, 2)}` : `message \`${error.message}\``}`);
88
89
  }
89
90
  return;
90
91
  }
@@ -72,7 +72,7 @@ const getRefsForPath = (openapi, path, knownRefs) => {
72
72
  }
73
73
  }
74
74
  for (const value of Object.values(schema)) {
75
- if (typeof value === 'object') {
75
+ if (value && typeof value === 'object') {
76
76
  collectRefs(value);
77
77
  }
78
78
  }
@@ -61,7 +61,7 @@ const getRefsForSchema = (openapi, schema, knownRefs) => {
61
61
  }
62
62
  }
63
63
  for (const value of Object.values(schema)) {
64
- if (typeof value === 'object') {
64
+ if (value && typeof value === 'object') {
65
65
  collectRefs(value);
66
66
  }
67
67
  }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "0.22.3",
3
+ "version": "0.22.4",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": "git+https://github.com/alauda/Doom.git",
7
7
  "homepage": "https://github.com/alauda/Doom#readme",
8
8
  "funding": "https://opencollective.com/alauda",
9
+ "license": "MIT",
9
10
  "engines": {
10
11
  "node": ">=18.17.0 <20 || >=20.1.0"
11
12
  },
@@ -24,6 +25,14 @@
24
25
  "styles",
25
26
  "!lib/*.tsbuildinfo"
26
27
  ],
28
+ "keywords": [
29
+ "document",
30
+ "documentation",
31
+ "docs",
32
+ "mdx",
33
+ "rspress",
34
+ "rspress-plugins"
35
+ ],
27
36
  "dependencies": {
28
37
  "@inquirer/prompts": "^7.5.0",
29
38
  "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",