@graphql-markdown/docusaurus 1.21.0-next.0 → 1.21.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/dist/index.d.ts +4 -1
- package/dist/index.js +13 -2
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type { LoadContext, Plugin, PluginOptions } from "@docusaurus/types";
|
|
2
|
-
|
|
2
|
+
import type { ConfigOptions } from "@graphql-markdown/types";
|
|
3
|
+
export default function pluginGraphQLDocGenerator(_: LoadContext, options: ConfigOptions & Partial<PluginOptions> & {
|
|
4
|
+
runOnBuild: boolean | undefined;
|
|
5
|
+
}): Plugin;
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,16 @@ function pluginGraphQLDocGenerator(_, options) {
|
|
|
16
16
|
: `${DESCRIPTION} for configuration with id ${options.id}`;
|
|
17
17
|
return {
|
|
18
18
|
name: NAME,
|
|
19
|
+
async loadContent() {
|
|
20
|
+
if (options.runOnBuild !== true) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const config = await (0, core_1.buildConfig)(options, {}, options.id);
|
|
24
|
+
await (0, core_1.generateDocFromSchema)({
|
|
25
|
+
...config,
|
|
26
|
+
loggerModule,
|
|
27
|
+
});
|
|
28
|
+
},
|
|
19
29
|
extendCli(cli) {
|
|
20
30
|
cli
|
|
21
31
|
.command(command)
|
|
@@ -36,14 +46,15 @@ function pluginGraphQLDocGenerator(_, options) {
|
|
|
36
46
|
.option("-d, --diff <diffMethod>", "Set diff method")
|
|
37
47
|
.option("-t, --tmp <tmpDir>", "Set temp dir for schema diff")
|
|
38
48
|
.option("-gbd, --groupByDirective <@directive(field|=fallback)>", "Group documentation by directive")
|
|
39
|
-
.option("--
|
|
49
|
+
.option("--only <@directive...>", "Only print types with matching directive")
|
|
50
|
+
.option("--skip <@directive...>", "Skip types with matching directive")
|
|
40
51
|
.option("--deprecated <option>", "Option for printing deprecated entities: `default`, `group` or `skip`")
|
|
41
52
|
.option("--pretty", "Prettify generated files")
|
|
42
53
|
.action(async (cliOptions) => {
|
|
43
54
|
const config = await (0, core_1.buildConfig)(options, cliOptions, options.id);
|
|
44
55
|
await (0, core_1.generateDocFromSchema)({
|
|
45
56
|
...config,
|
|
46
|
-
loggerModule
|
|
57
|
+
loggerModule,
|
|
47
58
|
});
|
|
48
59
|
});
|
|
49
60
|
},
|
package/package.json
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/graphql-markdown/graphql-markdown/issues"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.21.0
|
|
8
|
+
"version": "1.21.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "graphql-markdown/graphql-markdown",
|
|
12
|
+
"url": "git+https://github.com/graphql-markdown/graphql-markdown.git",
|
|
13
13
|
"directory": "packages/docusaurus"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"clean": "rm -rf ./dist"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@graphql-markdown/core": "^1.7.0
|
|
54
|
-
"@graphql-markdown/logger": "^1.0.0
|
|
55
|
-
"@graphql-markdown/printer-legacy": "^1.5.0
|
|
53
|
+
"@graphql-markdown/core": "^1.7.0",
|
|
54
|
+
"@graphql-markdown/logger": "^1.0.0",
|
|
55
|
+
"@graphql-markdown/printer-legacy": "^1.5.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@docusaurus/types": "^2.4.1",
|
|
59
|
-
"@graphql-markdown/types": "^1.0.0
|
|
59
|
+
"@graphql-markdown/types": "^1.0.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"@docusaurus/logger": "*"
|