@graphql-markdown/printer-legacy 1.16.0 → 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/badge.d.ts.map +1 -1
- package/dist/badge.js +2 -0
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +6 -0
- package/dist/const/options.d.ts +1 -1
- package/dist/const/options.d.ts.map +1 -1
- package/dist/const/options.js +2 -2
- package/dist/directive.d.ts.map +1 -1
- package/dist/directive.js +4 -0
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +2 -0
- package/dist/graphql/scalar.d.ts.map +1 -1
- package/dist/graphql/scalar.js +2 -0
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +12 -0
- package/dist/printer.d.ts +5 -3
- package/dist/printer.d.ts.map +1 -1
- package/dist/printer.js +1 -1
- package/dist/relation.d.ts.map +1 -1
- package/dist/relation.js +4 -0
- package/dist/section.d.ts.map +1 -1
- package/dist/section.js +4 -0
- package/package.json +7 -7
package/dist/badge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/badge.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,KAAK,EAEL,SAAS,EACT,KAAK,EACL,gBAAgB,EAChB,sBAAsB,EAEvB,MAAM,yBAAyB,CAAC;AAgBjC,eAAO,MAAM,mBAAmB;IAC9B,UAAU;IACV,QAAQ;IACR,QAAQ;CACT,CAAC;AAEF;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../src/badge.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,KAAK,EAEL,SAAS,EACT,KAAK,EACL,gBAAgB,EAChB,sBAAsB,EAEvB,MAAM,yBAAyB,CAAC;AAgBjC,eAAO,MAAM,mBAAmB;IAC9B,UAAU;IACV,QAAQ;IACR,QAAQ;CACT,CAAC;AAEF;;;;;GAKG;AAGH,eAAO,MAAM,aAAa,SAClB,OAAO,WACJ,KAAK,CAAC,sBAAsB,CAAC,KACrC,KAAK,EA0CP,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,wBACA,KAAK,WACjB,gBAAgB,KACxB,SAWF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,WACf,KAAK,EAAE,WACN,gBAAgB,KACxB,SAAS,GAAG,MASd,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,SAChB,OAAO,WACJ,gBAAgB,KACxB,SAAS,GAAG,MAUd,CAAC"}
|
package/dist/badge.js
CHANGED
|
@@ -24,6 +24,8 @@ exports.CSS_BADGE_CLASSNAME = {
|
|
|
24
24
|
* @param groups - Optional map of schema entities to their groups
|
|
25
25
|
* @returns Array of Badge objects containing text and optional classnames
|
|
26
26
|
*/
|
|
27
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
28
|
+
// fallow-ignore-next-line unused-export
|
|
27
29
|
const getTypeBadges = (type, groups) => {
|
|
28
30
|
if (typeof type !== "object" || type === null) {
|
|
29
31
|
return [];
|
package/dist/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAIV,SAAS,EACT,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAcjC;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAIV,SAAS,EACT,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAcjC;;;;;;GAMG;AAGH,eAAO,MAAM,uBAAuB,SAC5B,OAAO,YACH,gBAAgB,KACzB,MA4BF,CAAC;AAuBF;;;;;GAKG;AAGH,eAAO,MAAM,YAAY,oBACN;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,WACzC,gBAAgB,KACxB,MAUF,CAAC;AAEF;;;;;GAKG;AAGH,eAAO,MAAM,gBAAgB,SACrB,OAAO,WACJ,gBAAgB,KACxB,MAcF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,SACrB,OAAO,WACJ,gBAAgB,WAChB,MAAM,KACd,SAAS,GAAG,MAKd,CAAC"}
|
package/dist/common.js
CHANGED
|
@@ -16,6 +16,8 @@ const directive_1 = require("./directive");
|
|
|
16
16
|
* @param options - Printer configuration options
|
|
17
17
|
* @returns Formatted directive documentation string
|
|
18
18
|
*/
|
|
19
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
20
|
+
// fallow-ignore-next-line unused-export
|
|
19
21
|
const getCustomDirectivesText = (type, options) => {
|
|
20
22
|
const constDirectiveMap = (0, graphql_1.getConstDirectiveMap)(type, options?.customDirectives);
|
|
21
23
|
if ((0, utils_1.isEmpty)(constDirectiveMap)) {
|
|
@@ -57,6 +59,8 @@ const formatDescription = (type, replacement = strings_1.NO_DESCRIPTION_TEXT) =>
|
|
|
57
59
|
* @param options - Configuration options for printing
|
|
58
60
|
* @returns Formatted warning message as MDX string
|
|
59
61
|
*/
|
|
62
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
63
|
+
// fallow-ignore-next-line unused-export
|
|
60
64
|
const printWarning = ({ text, title }, options) => {
|
|
61
65
|
const formattedText = typeof text !== "string" || text.trim() === ""
|
|
62
66
|
? strings_1.MARKDOWN_EOP
|
|
@@ -70,6 +74,8 @@ exports.printWarning = printWarning;
|
|
|
70
74
|
* @param options - Configuration options for printing
|
|
71
75
|
* @returns Formatted deprecation warning as MDX string, or empty string if not deprecated
|
|
72
76
|
*/
|
|
77
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
78
|
+
// fallow-ignore-next-line unused-export
|
|
73
79
|
const printDeprecation = (type, options) => {
|
|
74
80
|
if (typeof type !== "object" || type === null || !(0, graphql_1.isDeprecated)(type)) {
|
|
75
81
|
return "";
|
package/dist/const/options.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const PRINT_TYPE_DEFAULT_OPTIONS: Required<Omit<PrinterConfigPrin
|
|
|
17
17
|
/**
|
|
18
18
|
* Clean runtime options passed through the printer.
|
|
19
19
|
*/
|
|
20
|
-
export declare const DEFAULT_OPTIONS: Required<Omit<PrintTypeOptions, "
|
|
20
|
+
export declare const DEFAULT_OPTIONS: Required<Omit<PrintTypeOptions, "collapsible" | "exampleSection" | "formatCategoryFolderName" | "groups" | "level" | "meta" | "onlyDocDirectives" | "parentType" | "schema" | "skipDocDirectives">> & {
|
|
21
21
|
collapsible: Maybe<CollapsibleOption>;
|
|
22
22
|
exampleSection: PrintTypeOptions["exampleSection"];
|
|
23
23
|
groups: Maybe<SchemaEntitiesGroupMap>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/const/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,KAAK,EACL,gBAAgB,EAChB,6BAA6B,EAC7B,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAajC,oBAAY,aAAa;IACvB,GAAG,QAAQ;
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/const/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,KAAK,EACL,gBAAgB,EAChB,6BAA6B,EAC7B,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAajC,oBAAY,aAAa;IACvB,GAAG,QAAQ;IAGX,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,oBAAY,aAAa;IACvB;;OAEG;IAGH,IAAI,KAAK;IACT,KAAK,MAAM;CACZ;AAED,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAC/C,IAAI,CAAC,6BAA6B,EAAE,gBAAgB,CAAC,CACtD,GAAG;IACF,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CAQpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CACpC,IAAI,CACF,gBAAgB,EACd,aAAa,GACb,gBAAgB,GAChB,0BAA0B,GAC1B,QAAQ,GACR,OAAO,GACP,MAAM,GACN,mBAAmB,GACnB,YAAY,GACZ,QAAQ,GACR,mBAAmB,CACtB,CACF,GAAG;IACF,WAAW,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACtC,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACnD,MAAM,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IAChC,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;IACtC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC1B,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC7B,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;CA6BvC,CAAC"}
|
package/dist/const/options.js
CHANGED
|
@@ -5,8 +5,7 @@ const defaults_1 = require("@graphql-markdown/formatters/defaults");
|
|
|
5
5
|
var TypeHierarchy;
|
|
6
6
|
(function (TypeHierarchy) {
|
|
7
7
|
TypeHierarchy["API"] = "api";
|
|
8
|
-
// Used
|
|
9
|
-
// fallow can't trace cross-workspace callers when dist/ is excluded.
|
|
8
|
+
// Used only by unit tests for direct whitebox coverage.
|
|
10
9
|
// fallow-ignore-next-line unused-enum-member
|
|
11
10
|
TypeHierarchy["ENTITY"] = "entity";
|
|
12
11
|
TypeHierarchy["FLAT"] = "flat";
|
|
@@ -16,6 +15,7 @@ var SectionLevels;
|
|
|
16
15
|
/**
|
|
17
16
|
* @deprecated Use `SectionLevels.LEVEL` instead.
|
|
18
17
|
*/
|
|
18
|
+
// Reserved for future usage.
|
|
19
19
|
// fallow-ignore-next-line unused-enum-member
|
|
20
20
|
SectionLevels["NONE"] = "";
|
|
21
21
|
SectionLevels["LEVEL"] = "#";
|
package/dist/directive.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directive.d.ts","sourceRoot":"","sources":["../src/directive.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,KAAK,EACL,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,uBAAuB,EACvB,KAAK,EACL,WAAW,EACZ,MAAM,yBAAyB,CAAC;AASjC;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,aAC3B,uBAAuB,QAC3B,OAAO,wBACS,sBAAsB,aACjC,KAAK,CAAC,MAAM,CAAC,KACvB,KAAK,CAAC,MAAM,CAYd,CAAC;AAEF;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"directive.d.ts","sourceRoot":"","sources":["../src/directive.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,KAAK,EACL,gBAAgB,EAChB,SAAS,EACT,sBAAsB,EACtB,uBAAuB,EACvB,KAAK,EACL,WAAW,EACZ,MAAM,yBAAyB,CAAC;AASjC;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,aAC3B,uBAAuB,QAC3B,OAAO,wBACS,sBAAsB,aACjC,KAAK,CAAC,MAAM,CAAC,KACvB,KAAK,CAAC,MAAM,CAYd,CAAC;AAEF;;;;;;GAMG;AAGH,eAAO,MAAM,oBAAoB,SACzB,OAAO,wBACS,sBAAsB,WACnC,gBAAgB,KACxB,KAAK,CAAC,MAAM,CAgBd,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,SAC1B,OAAO,WACJ,gBAAgB,KACxB,KAAK,CAAC,WAAW,CA6BnB,CAAC;AAEF;;;;;GAKG;AAGH,eAAO,MAAM,aAAa,SAClB,OAAO,WACJ,gBAAgB,KACxB,KAAK,EAqBP,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SACpB,OAAO,WACJ,gBAAgB,KACxB,SAAS,GAAG,MAEd,CAAC"}
|
package/dist/directive.js
CHANGED
|
@@ -33,6 +33,8 @@ exports.getCustomDirectiveResolver = getCustomDirectiveResolver;
|
|
|
33
33
|
* @param options - General printing options
|
|
34
34
|
* @returns Formatted Markdown string for the directive or `undefined`
|
|
35
35
|
*/
|
|
36
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
37
|
+
// fallow-ignore-next-line unused-export
|
|
36
38
|
const printCustomDirective = (type, constDirectiveOption, options) => {
|
|
37
39
|
const typeNameLink = (0, link_1.printLink)(constDirectiveOption.type, {
|
|
38
40
|
...options,
|
|
@@ -80,6 +82,8 @@ exports.printCustomDirectives = printCustomDirectives;
|
|
|
80
82
|
* @param options - General printing options
|
|
81
83
|
* @returns Array of badge configurations from directive tags
|
|
82
84
|
*/
|
|
85
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
86
|
+
// fallow-ignore-next-line unused-export
|
|
83
87
|
const getCustomTags = (type, options) => {
|
|
84
88
|
const constDirectiveMap = (0, graphql_1.getConstDirectiveMap)(type, options.customDirectives);
|
|
85
89
|
if (typeof constDirectiveMap !== "object" ||
|
package/dist/example.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAIV,KAAK,EACL,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAwBjC;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAIV,KAAK,EACL,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAwBjC;;;;;GAKG;AAGH,eAAO,MAAM,yBAAyB,gCAGnC,gBAAgB,KAAG,KAAK,CAAC,oBAAoB,CA6B/C,CAAC;AAiKF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,YAAY,SACjB,OAAO,WACJ,gBAAgB,KACxB,KAAK,CAAC,MAAM,CAgBd,CAAC"}
|
package/dist/example.js
CHANGED
|
@@ -15,6 +15,8 @@ const link_1 = require("./link");
|
|
|
15
15
|
* @param options - Configuration options
|
|
16
16
|
* @returns The directive example configuration if valid, otherwise `undefined`
|
|
17
17
|
*/
|
|
18
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
19
|
+
// fallow-ignore-next-line unused-export
|
|
18
20
|
const getDirectiveExampleOption = ({ exampleSection, schema, }) => {
|
|
19
21
|
let directiveName = "example", argName = "value", parserFunc = undefined;
|
|
20
22
|
if (exampleSection && typeof exampleSection === "object") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scalar.d.ts","sourceRoot":"","sources":["../../src/graphql/scalar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,EACN,MAAM,yBAAyB,CAAC;AAIjC;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"scalar.d.ts","sourceRoot":"","sources":["../../src/graphql/scalar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,KAAK,EACN,MAAM,yBAAyB,CAAC;AAIjC;;;;;GAKG;AAGH,eAAO,MAAM,kBAAkB,SACvB,OAAO,WACJ,gBAAgB,KACxB,KAAK,CAAC,WAAW,CAgBnB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,SACxB,OAAO,WACJ,gBAAgB,KACxB,KAAK,CAAC,WAAW,CAEnB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,SACpB,OAAO,YACH,gBAAgB,KACzB,MAEF,CAAC"}
|
package/dist/graphql/scalar.js
CHANGED
|
@@ -8,6 +8,8 @@ const graphql_1 = require("@graphql-markdown/graphql");
|
|
|
8
8
|
* @param options - Options for printing type information
|
|
9
9
|
* @returns A specification PageSection, or undefined when no URL exists
|
|
10
10
|
*/
|
|
11
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
12
|
+
// fallow-ignore-next-line unused-export
|
|
11
13
|
const printSpecification = (type, options) => {
|
|
12
14
|
if (typeof type !== "object" ||
|
|
13
15
|
type === null ||
|
package/dist/link.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../src/link.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,SAAS,EACT,KAAK,EACL,gBAAgB,EAChB,gBAAgB,EAKhB,QAAQ,EACR,UAAU,EACX,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../src/link.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,SAAS,EACT,KAAK,EACL,gBAAgB,EAChB,gBAAgB,EAKhB,QAAQ,EACR,UAAU,EACX,MAAM,yBAAyB,CAAC;AAkCjC,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,oBAAoB,CAG5C,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,SAC1B,OAAO,YACH,IAAI,CACZ,gBAAgB,EAChB,YAAY,GAAG,mBAAmB,GAAG,mBAAmB,CACzD,KACA,OAyBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,SAAU,OAAO,KAAG,KAAK,CAAC,UAAU,CAoBjE,CAAC;AAEF;;;;;;GAMG;AAGH,eAAO,MAAM,qBAAqB,SAC1B,OAAO,oBACK,KAAK,CAAC,UAAU,CAAC,KAClC,KAAK,CAAC,MAAM,CAoBd,CAAC;AAEF;;;;;GAKG;AAGH,eAAO,MAAM,uBAAuB,YAAa,gBAAgB,KAAG,OAEnE,CAAC;AAEF;;;;;GAKG;AAGH,eAAO,MAAM,mBAAmB,YAAa,gBAAgB,KAAG,OAO/D,CAAC;AAEF;;;;;;GAMG;AAGH,eAAO,MAAM,qBAAqB,SAC1B,OAAO,WACJ,KAAK,CAAC,oBAAoB,GAAG,OAAO,CAAC,KAC7C,MAMF,CAAC;AAuBF;;;;;;;;GAQG;AACH,eAAO,MAAM,MAAM,SACX,OAAO,QACP,MAAM,aACD,KAAK,CAAC,UAAU,CAAC,WACnB,gBAAgB,KACxB,QAkFF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,aAChB,KAAK,CAAC,UAAU,CAAC,QACrB,OAAO,WACJ,gBAAgB,KACxB,KAAK,CAAC,QAAQ,CAUhB,CAAC;AAEF;;;;;;GAMG;AAGH,eAAO,MAAM,mBAAmB,SACxB,OAAO,SACP,KAAK,CAAC,MAAM,CAAC,KAClB,MAkBF,CAAC;AAoBF;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,OACpB,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,WACf,gBAAgB,KACxB,MAgCF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,SACpB,OAAO,WACJ,gBAAgB,KACxB,SAAS,GAAG,MAWd,CAAC"}
|
package/dist/link.js
CHANGED
|
@@ -11,6 +11,8 @@ const utils_1 = require("@graphql-markdown/utils");
|
|
|
11
11
|
const group_1 = require("./group");
|
|
12
12
|
const strings_1 = require("./const/strings");
|
|
13
13
|
const options_1 = require("./const/options");
|
|
14
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
15
|
+
// fallow-ignore-next-line unused-export
|
|
14
16
|
exports.API_GROUPS = {
|
|
15
17
|
operations: "operations",
|
|
16
18
|
types: "types",
|
|
@@ -76,6 +78,8 @@ exports.getCategoryLocale = getCategoryLocale;
|
|
|
76
78
|
* @param operationLocale - The locale of the operation
|
|
77
79
|
* @returns The folder name for the link category, or `undefined` if not found
|
|
78
80
|
*/
|
|
81
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
82
|
+
// fallow-ignore-next-line unused-export
|
|
79
83
|
const getLinkCategoryFolder = (type, operationLocale) => {
|
|
80
84
|
const categoryLocale = (0, exports.getCategoryLocale)(type);
|
|
81
85
|
if (!categoryLocale) {
|
|
@@ -101,6 +105,8 @@ exports.getLinkCategoryFolder = getLinkCategoryFolder;
|
|
|
101
105
|
* @param options - The options to check
|
|
102
106
|
* @returns `true` if the options include `withAttributes`, `false` otherwise
|
|
103
107
|
*/
|
|
108
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
109
|
+
// fallow-ignore-next-line unused-export
|
|
104
110
|
const hasOptionWithAttributes = (options) => {
|
|
105
111
|
return "withAttributes" in options && options.withAttributes === true;
|
|
106
112
|
};
|
|
@@ -111,6 +117,8 @@ exports.hasOptionWithAttributes = hasOptionWithAttributes;
|
|
|
111
117
|
* @param options - The options to check
|
|
112
118
|
* @returns `true` if the options include `parentTypePrefix`, `false` otherwise
|
|
113
119
|
*/
|
|
120
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
121
|
+
// fallow-ignore-next-line unused-export
|
|
114
122
|
const hasOptionParentType = (options) => {
|
|
115
123
|
return ("parentTypePrefix" in options &&
|
|
116
124
|
options.parentTypePrefix === true &&
|
|
@@ -125,6 +133,8 @@ exports.hasOptionParentType = hasOptionParentType;
|
|
|
125
133
|
* @param groups - The group options
|
|
126
134
|
* @returns The folder name for the API group
|
|
127
135
|
*/
|
|
136
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
137
|
+
// fallow-ignore-next-line unused-export
|
|
128
138
|
const getLinkApiGroupFolder = (type, groups) => {
|
|
129
139
|
let folderNames = exports.API_GROUPS;
|
|
130
140
|
if (groups && typeof groups === "object") {
|
|
@@ -240,6 +250,8 @@ exports.getRelationLink = getRelationLink;
|
|
|
240
250
|
* @param text - The text to append attributes to
|
|
241
251
|
* @returns The text with appended attributes
|
|
242
252
|
*/
|
|
253
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
254
|
+
// fallow-ignore-next-line unused-export
|
|
243
255
|
const printLinkAttributes = (type, text = "") => {
|
|
244
256
|
if (typeof type !== "object" || type === null) {
|
|
245
257
|
return text ?? "";
|
package/dist/printer.d.ts
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
*/
|
|
10
10
|
import type { Formatter, GraphQLSchema, IPrinter, Maybe, MDXString, PageSection, PrinterEventEmitter, PrinterInitOptions, PrintTypeOptions } from "@graphql-markdown/types";
|
|
11
|
+
import { printDescription } from "./common";
|
|
12
|
+
import { printCustomDirectives, printCustomTags } from "./directive";
|
|
11
13
|
/**
|
|
12
14
|
* The Printer class implements the core functionality for generating Markdown documentation
|
|
13
15
|
* from GraphQL schema types.
|
|
@@ -30,15 +32,15 @@ export declare class Printer implements IPrinter {
|
|
|
30
32
|
/**
|
|
31
33
|
* Prints type descriptions
|
|
32
34
|
*/
|
|
33
|
-
static readonly printDescription:
|
|
35
|
+
static readonly printDescription: typeof printDescription;
|
|
34
36
|
/**
|
|
35
37
|
* Prints custom directives
|
|
36
38
|
*/
|
|
37
|
-
static readonly printCustomDirectives:
|
|
39
|
+
static readonly printCustomDirectives: typeof printCustomDirectives;
|
|
38
40
|
/**
|
|
39
41
|
* Prints custom tags
|
|
40
42
|
*/
|
|
41
|
-
static readonly printCustomTags:
|
|
43
|
+
static readonly printCustomTags: typeof printCustomTags;
|
|
42
44
|
private static _eventEmitter;
|
|
43
45
|
private static _options;
|
|
44
46
|
private static _mdxDeclaration;
|
package/dist/printer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"printer.d.ts","sourceRoot":"","sources":["../src/printer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAEV,SAAS,EACT,aAAa,EACb,QAAQ,EACR,KAAK,EACL,SAAS,EACT,WAAW,EAEX,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAGjB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"printer.d.ts","sourceRoot":"","sources":["../src/printer.ts"],"names":[],"mappings":"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"}
|
package/dist/printer.js
CHANGED
|
@@ -206,7 +206,7 @@ class Printer {
|
|
|
206
206
|
* @returns Formatted code block string with type definition
|
|
207
207
|
*/
|
|
208
208
|
static printCode = (type, options) => {
|
|
209
|
-
let code
|
|
209
|
+
let code;
|
|
210
210
|
switch (true) {
|
|
211
211
|
case (0, graphql_1.isOperation)(type):
|
|
212
212
|
code = (0, graphql_2.printCodeOperation)(type, options);
|
package/dist/relation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relation.d.ts","sourceRoot":"","sources":["../src/relation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,KAAK,EACL,gBAAgB,EAGhB,UAAU,EACX,MAAM,yBAAyB,CAAC;AAgBjC;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"relation.d.ts","sourceRoot":"","sources":["../src/relation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,KAAK,EACL,gBAAgB,EAGhB,UAAU,EACX,MAAM,yBAAyB,CAAC;AAgBjC;;;;;;;;GAQG;AAGH,eAAO,MAAM,2BAA2B,SAChC,MAAM,KACX,KAAK,CAAC,UAAU,CAOlB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AAGH,eAAO,MAAM,eAAe,GAAI,CAAC,QACzB,OAAO,WACJ,OAAO,eACH,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,WAC1B,gBAAgB,KACxB,SAAS,GAAG,MAmDd,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,SACnB,OAAO,WACJ,gBAAgB,KACxB,SAAS,GAAG,MAgBd,CAAC"}
|
package/dist/relation.js
CHANGED
|
@@ -20,6 +20,8 @@ const options_1 = require("./const/options");
|
|
|
20
20
|
* const locale = getRootTypeLocaleFromString('Query');
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
24
|
+
// fallow-ignore-next-line unused-export
|
|
23
25
|
const getRootTypeLocaleFromString = (text) => {
|
|
24
26
|
for (const [type, props] of Object.entries(strings_1.ROOT_TYPE_LOCALE)) {
|
|
25
27
|
if (Object.values(props).includes(text)) {
|
|
@@ -43,6 +45,8 @@ exports.getRootTypeLocaleFromString = getRootTypeLocaleFromString;
|
|
|
43
45
|
* const mdx = printRelationOf(type, "Member Of", getRelationOfField, options);
|
|
44
46
|
* ```
|
|
45
47
|
*/
|
|
48
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
49
|
+
// fallow-ignore-next-line unused-export
|
|
46
50
|
const printRelationOf = (type, section, getRelation, options) => {
|
|
47
51
|
if (!(0, graphql_1.isNamedType)(type) ||
|
|
48
52
|
(0, graphql_1.isOperation)(type) ||
|
package/dist/section.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../src/section.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAEV,KAAK,EACL,SAAS,EACT,WAAW,EACX,gBAAgB,EAEjB,MAAM,yBAAyB,CAAC;AAuBjC;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../src/section.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAEV,KAAK,EACL,SAAS,EACT,WAAW,EACX,gBAAgB,EAEjB,MAAM,yBAAyB,CAAC;AAuBjC;;;;;;;;GAQG;AAGH,eAAO,MAAM,gBAAgB,GAAI,CAAC,QAC1B,CAAC,WACE,gBAAgB,KACxB,SAAS,GAAG,MAgDd,CAAC;AAEF;;;;;;;;GAQG;AAGH,eAAO,MAAM,iBAAiB,GAAI,CAAC,UACzB,CAAC,GAAG,CAAC,EAAE,WACN,gBAAgB,KACxB,SAAS,GAAG,MAiBd,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,UACpB,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,WACjB,MAAM,WACN,gBAAgB,KACxB,KAAK,CAAC,WAAW,CAmCnB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,EAAE,CAAC,QACjC,CAAC,UACC,CAAC,GAAG,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,WACrB,MAAM,WACN,gBAAgB,KACxB,KAAK,CAAC,WAAW,CAqEnB,CAAC"}
|
package/dist/section.js
CHANGED
|
@@ -23,6 +23,8 @@ const options_1 = require("./const/options");
|
|
|
23
23
|
*
|
|
24
24
|
* @template T - Type of the GraphQL element being printed
|
|
25
25
|
*/
|
|
26
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
27
|
+
// fallow-ignore-next-line unused-export
|
|
26
28
|
const printSectionItem = (type, options) => {
|
|
27
29
|
const level = "level" in options && typeof options.level === "number" ? options.level : 4;
|
|
28
30
|
if (!(0, link_1.hasPrintableDirective)(type, options)) {
|
|
@@ -67,6 +69,8 @@ exports.printSectionItem = printSectionItem;
|
|
|
67
69
|
*
|
|
68
70
|
* @template V - Type of the values being printed
|
|
69
71
|
*/
|
|
72
|
+
// Used only by unit tests for direct whitebox coverage; not part of the production public API.
|
|
73
|
+
// fallow-ignore-next-line unused-export
|
|
70
74
|
const printSectionItems = (values, options) => {
|
|
71
75
|
if (!Array.isArray(values) || values.length === 0) {
|
|
72
76
|
return "";
|
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.16.
|
|
8
|
+
"version": "1.16.1",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
"test:watch": "jest --watch"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@graphql-markdown/formatters": "
|
|
69
|
-
"@graphql-markdown/graphql": "
|
|
70
|
-
"@graphql-markdown/types": "
|
|
71
|
-
"@graphql-markdown/utils": "
|
|
68
|
+
"@graphql-markdown/formatters": "",
|
|
69
|
+
"@graphql-markdown/graphql": "",
|
|
70
|
+
"@graphql-markdown/types": "",
|
|
71
|
+
"@graphql-markdown/utils": ""
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@graphql-markdown/tooling-config": "
|
|
74
|
+
"@graphql-markdown/tooling-config": ""
|
|
75
75
|
},
|
|
76
76
|
"resolutions": {
|
|
77
77
|
"micromatch": "4.0.8"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"test": "tests"
|
|
81
81
|
},
|
|
82
82
|
"engines": {
|
|
83
|
-
"node": ">=
|
|
83
|
+
"node": ">=22.12.0"
|
|
84
84
|
},
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|