@graphql-markdown/core 1.4.1 → 1.4.2
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/package.json +4 -4
- package/src/config.js +28 -27
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/graphql-markdown/graphql-markdown/issues"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.4.
|
|
8
|
+
"version": "1.4.2",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"main": "src/index.js",
|
|
11
11
|
"repository": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"stryker": "stryker run"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@graphql-markdown/utils": "^1.4.
|
|
32
|
+
"@graphql-markdown/utils": "^1.4.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@graphql-markdown/printer-legacy": "^1.3.
|
|
36
|
-
"@graphql-markdown/diff": "^1.0.
|
|
35
|
+
"@graphql-markdown/printer-legacy": "^1.3.2",
|
|
36
|
+
"@graphql-markdown/diff": "^1.0.11",
|
|
37
37
|
"prettier": "^2.8"
|
|
38
38
|
},
|
|
39
39
|
"peerDependenciesMeta": {
|
package/src/config.js
CHANGED
|
@@ -9,29 +9,30 @@ const PACKAGE_NAME = "@graphql-markdown/docusaurus";
|
|
|
9
9
|
const ASSETS_LOCATION = join(__dirname, "../assets/");
|
|
10
10
|
|
|
11
11
|
const DEFAULT_OPTIONS = {
|
|
12
|
-
schema: "./schema.graphql",
|
|
13
|
-
rootPath: "./docs",
|
|
14
12
|
baseURL: "schema",
|
|
15
|
-
|
|
16
|
-
homepage: join(ASSETS_LOCATION, "generated.md"),
|
|
13
|
+
customDirective: undefined,
|
|
17
14
|
diffMethod: undefined,
|
|
18
|
-
tmpDir: join(tmpdir(), PACKAGE_NAME),
|
|
19
|
-
loaders: {},
|
|
20
|
-
pretty: false,
|
|
21
|
-
printer: "@graphql-markdown/printer-legacy",
|
|
22
15
|
docOptions: {
|
|
16
|
+
index: false,
|
|
23
17
|
pagination: true,
|
|
24
18
|
toc: true,
|
|
25
|
-
index: false,
|
|
26
19
|
},
|
|
20
|
+
groupByDirective: undefined,
|
|
21
|
+
homepage: join(ASSETS_LOCATION, "generated.md"),
|
|
22
|
+
linkRoot: "/",
|
|
23
|
+
loaders: {},
|
|
24
|
+
pretty: false,
|
|
25
|
+
printer: "@graphql-markdown/printer-legacy",
|
|
27
26
|
printTypeOptions: {
|
|
27
|
+
deprecated: "default",
|
|
28
28
|
parentTypePrefix: true,
|
|
29
29
|
relatedTypeSection: true,
|
|
30
30
|
typeBadges: true,
|
|
31
|
-
deprecated: "default",
|
|
32
31
|
},
|
|
32
|
+
rootPath: "./docs",
|
|
33
|
+
schema: "./schema.graphql",
|
|
34
|
+
tmpDir: join(tmpdir(), PACKAGE_NAME),
|
|
33
35
|
skipDocDirective: [],
|
|
34
|
-
customDirective: undefined,
|
|
35
36
|
};
|
|
36
37
|
|
|
37
38
|
function buildConfig(configFileOpts, cliOpts) {
|
|
@@ -50,24 +51,24 @@ function buildConfig(configFileOpts, cliOpts) {
|
|
|
50
51
|
|
|
51
52
|
return {
|
|
52
53
|
baseURL,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
customDirective: getCustomDirectives(
|
|
55
|
+
config.customDirective,
|
|
56
|
+
skipDocDirective,
|
|
57
|
+
),
|
|
57
58
|
diffMethod: getDiffMethod(cliOpts.diff ?? config.diffMethod, cliOpts.force),
|
|
58
|
-
|
|
59
|
-
loaders: config.loaders,
|
|
59
|
+
docOptions: getDocOptions(cliOpts, config.docOptions),
|
|
60
60
|
groupByDirective:
|
|
61
61
|
parseGroupByOption(cliOpts.groupByDirective) || config.groupByDirective,
|
|
62
|
+
homepageLocation: cliOpts.homepage ?? config.homepage,
|
|
63
|
+
linkRoot: cliOpts.link ?? config.linkRoot,
|
|
64
|
+
loaders: config.loaders,
|
|
65
|
+
outputDir: join(cliOpts.root ?? config.rootPath, baseURL),
|
|
62
66
|
prettify: cliOpts.pretty ?? config.pretty,
|
|
63
|
-
docOptions: getDocOptions(cliOpts, config.docOptions),
|
|
64
|
-
printTypeOptions: gePrintTypeOptions(cliOpts, config.printTypeOptions),
|
|
65
67
|
printer: config.printer,
|
|
68
|
+
printTypeOptions: gePrintTypeOptions(cliOpts, config.printTypeOptions),
|
|
69
|
+
schemaLocation: cliOpts.schema ?? config.schema,
|
|
66
70
|
skipDocDirective,
|
|
67
|
-
|
|
68
|
-
config.customDirective,
|
|
69
|
-
skipDocDirective,
|
|
70
|
-
),
|
|
71
|
+
tmpDir: cliOpts.tmp ?? config.tmpDir,
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
74
|
|
|
@@ -181,11 +182,11 @@ function parseGroupByOption(groupOptions) {
|
|
|
181
182
|
}
|
|
182
183
|
|
|
183
184
|
module.exports = {
|
|
185
|
+
ASSETS_LOCATION,
|
|
184
186
|
buildConfig,
|
|
185
|
-
|
|
187
|
+
DEFAULT_OPTIONS,
|
|
188
|
+
getCustomDirectives,
|
|
186
189
|
getSkipDocDirective,
|
|
190
|
+
getSkipDocDirectives,
|
|
187
191
|
parseGroupByOption,
|
|
188
|
-
getCustomDirectives,
|
|
189
|
-
DEFAULT_OPTIONS,
|
|
190
|
-
ASSETS_LOCATION,
|
|
191
192
|
};
|