@graphql-markdown/core 1.15.1 → 1.16.1
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/config.d.ts +1 -0
- package/dist/config.js +15 -2
- package/dist/renderer.d.ts +1 -1
- package/dist/renderer.js +0 -1
- package/package.json +7 -7
package/dist/config.d.ts
CHANGED
|
@@ -363,6 +363,7 @@ export declare const getPrintTypeOptions: (cliOpts: Maybe<CliOptions & Omit<Depr
|
|
|
363
363
|
* ```
|
|
364
364
|
*/
|
|
365
365
|
export declare const parseGroupByOption: (groupOptions: unknown) => Maybe<GroupByDirectiveOptions>;
|
|
366
|
+
export declare const parseHomepageOption: (cliHomepage: Maybe<string | false>, configHomepage: Maybe<string | false>) => Maybe<string>;
|
|
366
367
|
/**
|
|
367
368
|
* Builds the complete configuration object by merging options from multiple sources
|
|
368
369
|
* in order of precedence:
|
package/dist/config.js
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* @packageDocumentation
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.buildConfig = exports.parseGroupByOption = exports.getPrintTypeOptions = exports.parseDeprecatedPrintTypeOptions = exports.getTypeHierarchyOption = exports.getDocOptions = exports.parseDeprecatedDocOptions = exports.getDiffMethod = exports.getCustomDirectives = exports.getVisibilityDirectives = exports.getSkipDocDirectives = exports.getOnlyDocDirectives = exports.getDocDirective = exports.DEFAULT_OPTIONS = exports.DEFAULT_HIERARCHY = exports.ASSET_HOMEPAGE_LOCATION = exports.PACKAGE_NAME = exports.DOCS_URL = exports.DeprecatedOption = exports.DiffMethod = exports.TypeHierarchy = void 0;
|
|
20
|
+
exports.buildConfig = exports.parseHomepageOption = exports.parseGroupByOption = exports.getPrintTypeOptions = exports.parseDeprecatedPrintTypeOptions = exports.getTypeHierarchyOption = exports.getDocOptions = exports.parseDeprecatedDocOptions = exports.getDiffMethod = exports.getCustomDirectives = exports.getVisibilityDirectives = exports.getSkipDocDirectives = exports.getOnlyDocDirectives = exports.getDocDirective = exports.DEFAULT_OPTIONS = exports.DEFAULT_HIERARCHY = exports.ASSET_HOMEPAGE_LOCATION = exports.PACKAGE_NAME = exports.DOCS_URL = exports.DeprecatedOption = exports.DiffMethod = exports.TypeHierarchy = void 0;
|
|
21
21
|
const node_path_1 = require("node:path");
|
|
22
22
|
const node_os_1 = require("node:os");
|
|
23
23
|
const graphql_config_1 = require("./graphql-config");
|
|
@@ -541,6 +541,19 @@ const parseGroupByOption = (groupOptions) => {
|
|
|
541
541
|
return { directive, field, fallback };
|
|
542
542
|
};
|
|
543
543
|
exports.parseGroupByOption = parseGroupByOption;
|
|
544
|
+
const parseHomepageOption = (cliHomepage, configHomepage) => {
|
|
545
|
+
if (typeof cliHomepage === "string") {
|
|
546
|
+
return cliHomepage;
|
|
547
|
+
}
|
|
548
|
+
if (configHomepage === false) {
|
|
549
|
+
return undefined;
|
|
550
|
+
}
|
|
551
|
+
if (typeof configHomepage === "string") {
|
|
552
|
+
return configHomepage;
|
|
553
|
+
}
|
|
554
|
+
return exports.DEFAULT_OPTIONS.homepage;
|
|
555
|
+
};
|
|
556
|
+
exports.parseHomepageOption = parseHomepageOption;
|
|
544
557
|
/**
|
|
545
558
|
* Builds the complete configuration object by merging options from multiple sources
|
|
546
559
|
* in order of precedence:
|
|
@@ -593,7 +606,7 @@ const buildConfig = async (configFileOpts, cliOpts, id = "default") => {
|
|
|
593
606
|
docOptions: (0, exports.getDocOptions)(cliOpts, config.docOptions),
|
|
594
607
|
force,
|
|
595
608
|
groupByDirective: (0, exports.parseGroupByOption)(cliOpts.groupByDirective) ?? config.groupByDirective,
|
|
596
|
-
homepageLocation: cliOpts.homepage
|
|
609
|
+
homepageLocation: (0, exports.parseHomepageOption)(cliOpts.homepage, config.homepage),
|
|
597
610
|
id: id ?? exports.DEFAULT_OPTIONS.id,
|
|
598
611
|
linkRoot: cliOpts.link ?? config.linkRoot ?? exports.DEFAULT_OPTIONS.linkRoot,
|
|
599
612
|
loaders: config.loaders,
|
package/dist/renderer.d.ts
CHANGED
|
@@ -163,7 +163,7 @@ export declare class Renderer {
|
|
|
163
163
|
* @useDeclaredType
|
|
164
164
|
* @example
|
|
165
165
|
*/
|
|
166
|
-
renderHomepage(homepageLocation: string): Promise<void>;
|
|
166
|
+
renderHomepage(homepageLocation: Maybe<string>): Promise<void>;
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
169
|
* Factory function to create and initialize a Renderer instance.
|
package/dist/renderer.js
CHANGED
|
@@ -348,7 +348,6 @@ class Renderer {
|
|
|
348
348
|
*/
|
|
349
349
|
async renderHomepage(homepageLocation) {
|
|
350
350
|
if (typeof homepageLocation !== "string") {
|
|
351
|
-
(0, logger_1.log)("Homepage location is not a valid string", logger_1.LogLevel.warn);
|
|
352
351
|
return;
|
|
353
352
|
}
|
|
354
353
|
if (!isPath(this.outputDir)) {
|
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.
|
|
8
|
+
"version": "1.16.1",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -64,18 +64,18 @@
|
|
|
64
64
|
"suggest:tests": "ts-node ../../scripts/test-suggestions.ts"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@graphql-markdown/graphql": "^1.1.
|
|
67
|
+
"@graphql-markdown/graphql": "^1.1.8",
|
|
68
68
|
"@graphql-markdown/logger": "^1.0.5",
|
|
69
|
-
"@graphql-markdown/utils": "^1.
|
|
69
|
+
"@graphql-markdown/utils": "^1.9.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@graphql-markdown/diff": "^1.1.
|
|
73
|
-
"@graphql-markdown/helpers": "^1.0.
|
|
74
|
-
"@graphql-markdown/printer-legacy": "^1.12.
|
|
72
|
+
"@graphql-markdown/diff": "^1.1.12",
|
|
73
|
+
"@graphql-markdown/helpers": "^1.0.11",
|
|
74
|
+
"@graphql-markdown/printer-legacy": "^1.12.2",
|
|
75
75
|
"graphql-config": "^5.1.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@graphql-markdown/types": "^1.
|
|
78
|
+
"@graphql-markdown/types": "^1.8.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
81
81
|
"@graphql-markdown/printer-legacy": {
|