@docusaurus/plugin-content-docs 0.0.0-5035 → 0.0.0-5040
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/lib/cli.d.ts +1 -1
- package/package.json +9 -9
- package/src/cli.ts +2 -2
- package/src/index.ts +1 -1
- package/src/options.ts +1 -1
- package/src/versions/files.ts +1 -1
package/lib/cli.d.ts
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { PluginOptions } from '@docusaurus/plugin-content-docs';
|
|
8
8
|
import type { LoadContext } from '@docusaurus/types';
|
|
9
|
-
export declare function cliDocsVersionCommand(version:
|
|
9
|
+
export declare function cliDocsVersionCommand(version: unknown, { id: pluginId, path: docsPath, sidebarPath }: PluginOptions, { siteDir, i18n }: LoadContext): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-docs",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-5040",
|
|
4
4
|
"description": "Docs plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@docusaurus/core": "0.0.0-
|
|
29
|
-
"@docusaurus/logger": "0.0.0-
|
|
30
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
31
|
-
"@docusaurus/utils": "0.0.0-
|
|
32
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
28
|
+
"@docusaurus/core": "0.0.0-5040",
|
|
29
|
+
"@docusaurus/logger": "0.0.0-5040",
|
|
30
|
+
"@docusaurus/mdx-loader": "0.0.0-5040",
|
|
31
|
+
"@docusaurus/utils": "0.0.0-5040",
|
|
32
|
+
"@docusaurus/utils-validation": "0.0.0-5040",
|
|
33
33
|
"combine-promises": "^1.1.0",
|
|
34
34
|
"fs-extra": "^10.1.0",
|
|
35
35
|
"import-fresh": "^3.3.0",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"webpack": "^5.72.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
45
|
-
"@docusaurus/types": "0.0.0-
|
|
44
|
+
"@docusaurus/module-type-aliases": "0.0.0-5040",
|
|
45
|
+
"@docusaurus/types": "0.0.0-5040",
|
|
46
46
|
"@types/js-yaml": "^4.0.5",
|
|
47
47
|
"@types/picomatch": "^2.3.0",
|
|
48
48
|
"commander": "^5.1.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"engines": {
|
|
59
59
|
"node": ">=14"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "b78c3c30f8187b22735be5d269a95324dda066c7"
|
|
62
62
|
}
|
package/src/cli.ts
CHANGED
|
@@ -53,7 +53,7 @@ async function createVersionedSidebarFile({
|
|
|
53
53
|
|
|
54
54
|
// Tests depend on non-default export for mocking.
|
|
55
55
|
export async function cliDocsVersionCommand(
|
|
56
|
-
version:
|
|
56
|
+
version: unknown,
|
|
57
57
|
{id: pluginId, path: docsPath, sidebarPath}: PluginOptions,
|
|
58
58
|
{siteDir, i18n}: LoadContext,
|
|
59
59
|
): Promise<void> {
|
|
@@ -70,7 +70,7 @@ export async function cliDocsVersionCommand(
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
// Load existing versions.
|
|
73
|
-
let versions = [];
|
|
73
|
+
let versions: string[] = [];
|
|
74
74
|
const versionsJSONFile = getVersionsFilePath(siteDir, pluginId);
|
|
75
75
|
if (await fs.pathExists(versionsJSONFile)) {
|
|
76
76
|
versions = await fs.readJSON(versionsJSONFile);
|
package/src/index.ts
CHANGED
|
@@ -100,7 +100,7 @@ export default async function pluginContentDocs(
|
|
|
100
100
|
.command(command)
|
|
101
101
|
.arguments('<version>')
|
|
102
102
|
.description(commandDescription)
|
|
103
|
-
.action((version) => {
|
|
103
|
+
.action((version: unknown) => {
|
|
104
104
|
cliDocsVersionCommand(version, options, context);
|
|
105
105
|
});
|
|
106
106
|
},
|
package/src/options.ts
CHANGED
|
@@ -98,7 +98,7 @@ const OptionsSchema = Joi.object<PluginOptions>({
|
|
|
98
98
|
Joi.function(),
|
|
99
99
|
// Convert boolean values to functions
|
|
100
100
|
Joi.alternatives().conditional(Joi.boolean(), {
|
|
101
|
-
then: Joi.custom((val) =>
|
|
101
|
+
then: Joi.custom((val: boolean) =>
|
|
102
102
|
val ? DefaultNumberPrefixParser : DisabledNumberPrefixParser,
|
|
103
103
|
),
|
|
104
104
|
}),
|
package/src/versions/files.ts
CHANGED
|
@@ -95,7 +95,7 @@ async function readVersionsFile(
|
|
|
95
95
|
): Promise<string[] | null> {
|
|
96
96
|
const versionsFilePath = getVersionsFilePath(siteDir, pluginId);
|
|
97
97
|
if (await fs.pathExists(versionsFilePath)) {
|
|
98
|
-
const content = await fs.readJSON(versionsFilePath);
|
|
98
|
+
const content: unknown = await fs.readJSON(versionsFilePath);
|
|
99
99
|
validateVersionNames(content);
|
|
100
100
|
return content;
|
|
101
101
|
}
|