@graphql-markdown/printer-legacy 1.20.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/README.md +4 -10
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +0 -3
- package/dist/decorator.d.ts +2 -46
- package/dist/decorator.d.ts.map +1 -1
- package/dist/decorator.js +5 -189
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/printer.d.ts.map +1 -1
- package/dist/printer.js +1 -6
- package/dist/section.d.ts.map +1 -1
- package/dist/section.js +1 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://sonarcloud.io/summary/new_code?id=graphql-markdown_printer-legacy)
|
|
8
8
|
[](https://dashboard.stryker-mutator.io/reports/github.com/graphql-markdown/graphql-markdown/main?module=printer-legacy)
|
|
9
9
|
|
|
10
|
-
Legacy Docusaurus-flavored MDX printer for GraphQL-Markdown. Converts GraphQL schema types into MDX pages, and is the printer used by default when no `formatter` is configured. New setups should prefer a formatter preset from [`@graphql-markdown/formatters`](https://www.npmjs.com/package/@graphql-markdown/formatters); this package is kept for backward compatibility with existing Docusaurus configurations and for
|
|
10
|
+
Legacy Docusaurus-flavored MDX printer for GraphQL-Markdown. Converts GraphQL schema types into MDX pages, and is the printer used by default when no `formatter` is configured. New setups should prefer a formatter preset from [`@graphql-markdown/formatters`](https://www.npmjs.com/package/@graphql-markdown/formatters); this package is kept for backward compatibility with existing Docusaurus configurations and for its built-in decorators support.
|
|
11
11
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
@@ -26,17 +26,11 @@ await Printer.init(schema, baseURL, linkRoot, options);
|
|
|
26
26
|
const page = await Printer.printType("query", queryType, options);
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
### Custom directive decorators
|
|
30
|
-
|
|
31
|
-
```ts
|
|
32
|
-
import { buildCustomDirectiveDecorators } from "@graphql-markdown/printer-legacy";
|
|
33
|
-
```
|
|
34
|
-
|
|
35
29
|
## Documentation
|
|
36
30
|
|
|
37
|
-
- [Configuration Options](https://graphql-markdown.dev/docs/settings)
|
|
38
|
-
- [
|
|
39
|
-
- [Integration with Frameworks](https://graphql-markdown.dev/docs/
|
|
31
|
+
- [Configuration Options](https://graphql-markdown.dev/docs/reference/settings)
|
|
32
|
+
- [Decorators](https://graphql-markdown.dev/docs/customize/decorators)
|
|
33
|
+
- [Integration with Frameworks](https://graphql-markdown.dev/docs/guides/other-frameworks)
|
|
40
34
|
|
|
41
35
|
## License
|
|
42
36
|
|
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,EAEV,SAAS,EACT,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAsCjC;;;;;GAKG;AAEH,eAAO,MAAM,YAAY,oBACN;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,WACzC,gBAAgB,KACxB,MAUF,CAAC;AAEF;;;;;GAKG;AAEH,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,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAEV,SAAS,EACT,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAsCjC;;;;;GAKG;AAEH,eAAO,MAAM,YAAY,oBACN;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,WACzC,gBAAgB,KACxB,MAUF,CAAC;AAEF;;;;;GAKG;AAEH,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,MASd,CAAC"}
|
package/dist/common.js
CHANGED
|
@@ -66,9 +66,6 @@ exports.printDeprecation = printDeprecation;
|
|
|
66
66
|
const printDescription = (type, options, noText) => {
|
|
67
67
|
const description = formatDescription(type, noText);
|
|
68
68
|
const deprecation = (0, exports.printDeprecation)(type, options);
|
|
69
|
-
// `customDirective`'s `descriptor` handlers reach this line via the
|
|
70
|
-
// decorators pipeline (`printSlotDecorators`), not a dedicated call — see
|
|
71
|
-
// `buildCustomDirectiveDecorators` in `./decorator`.
|
|
72
69
|
const decoratorContent = (0, decorator_ts_1.printSlotDecorators)("description", type, options);
|
|
73
70
|
const decorators = decoratorContent.length > 0
|
|
74
71
|
? `${strings_ts_1.MARKDOWN_EOP}${decoratorContent.join(strings_ts_1.MARKDOWN_EOP)}`
|
package/dist/decorator.d.ts
CHANGED
|
@@ -14,17 +14,9 @@
|
|
|
14
14
|
* to the built-in sections, or into a named slot such as the heading's
|
|
15
15
|
* metadata line or a member's description.
|
|
16
16
|
*
|
|
17
|
-
* `customDirective` is the deprecated predecessor of this module. It never
|
|
18
|
-
* reaches this module, or any other part of the printer: `@graphql-markdown/core`
|
|
19
|
-
* converts its schema-resolved directive map into decorator declarations
|
|
20
|
-
* (see {@link buildCustomDirectiveDecorators}) once, before the printer is
|
|
21
|
-
* ever invoked, so both options flow through the exact same resolve/render
|
|
22
|
-
* pipeline below — there is one code path for "select nodes by directive,
|
|
23
|
-
* render descriptor text, a badge, or a section", not two.
|
|
24
|
-
*
|
|
25
17
|
* @packageDocumentation
|
|
26
18
|
*/
|
|
27
|
-
import type {
|
|
19
|
+
import type { DecoratorDefinition, Maybe, PageSection, PageSections, PrintTypeOptions } from "@graphql-markdown/types";
|
|
28
20
|
import { getSchemaEntity } from "@graphql-markdown/graphql";
|
|
29
21
|
export { getSchemaEntity };
|
|
30
22
|
/**
|
|
@@ -47,47 +39,11 @@ export type ResolvedDecorator = DecoratorDefinition & {
|
|
|
47
39
|
* names are reserved.
|
|
48
40
|
*/
|
|
49
41
|
export declare const RESERVED_SECTION_NAMES: readonly string[];
|
|
50
|
-
/**
|
|
51
|
-
* Converts the deprecated `customDirective` option's schema-resolved
|
|
52
|
-
* directive map into decorator declarations, so it flows through the exact
|
|
53
|
-
* same resolve/render pipeline as everything declared under `decorators`.
|
|
54
|
-
*
|
|
55
|
-
* Called once by `@graphql-markdown/core`, right after `customDirectives` is
|
|
56
|
-
* schema-resolved, and merged directly into the top-level `decorators`
|
|
57
|
-
* option before it reaches the printer — `customDirective`/`CustomDirectiveMap`
|
|
58
|
-
* never reach this printer package otherwise; only the three decorators
|
|
59
|
-
* built here do, indistinguishable from any other `decorators` entry except
|
|
60
|
-
* for their reserved ids (see {@link CUSTOM_DIRECTIVE_DECORATOR_IDS}).
|
|
61
|
-
*
|
|
62
|
-
* Returns three entries:
|
|
63
|
-
* - `customDirectives`: the built-in "Directives" section, listing every
|
|
64
|
-
* custom directive declared on a type, positioned right after `code`
|
|
65
|
-
* (its fixed position in the pre-decorators built-in section order).
|
|
66
|
-
* - `customDirective:description`: `customDirective`'s `descriptor`
|
|
67
|
-
* handlers, appended as description text (`position: { into: "description" }`).
|
|
68
|
-
* - `customDirective:tags`: `customDirective`'s `tag` handlers, rendered as
|
|
69
|
-
* badges in the metadata line (`position: { into: "tags" }`).
|
|
70
|
-
*
|
|
71
|
-
* All three share one `resolve`, reading every custom directive matched on
|
|
72
|
-
* a node, in schema declaration order. Matching (including wildcard `"*"`
|
|
73
|
-
* precedence — a named handler wins over `"*"`) is already resolved by
|
|
74
|
-
* `getConstDirectiveMap` (fed by `@graphql-markdown/graphql`'s
|
|
75
|
-
* `getCustomDirectives`, which expands a wildcard into concrete
|
|
76
|
-
* per-directive entries upstream), so this reuses that resolution rather
|
|
77
|
-
* than re-implementing it against the generic predicate system.
|
|
78
|
-
*
|
|
79
|
-
* @param customDirectives - the schema-resolved `customDirective` map, or
|
|
80
|
-
* `undefined`/empty when the option is not in use.
|
|
81
|
-
*
|
|
82
|
-
* @returns the three decorators, or `{}` when `customDirectives` is empty.
|
|
83
|
-
*
|
|
84
|
-
*/
|
|
85
|
-
export declare const buildCustomDirectiveDecorators: (customDirectives: Maybe<CustomDirectiveMap>) => Decorators;
|
|
86
42
|
/**
|
|
87
43
|
* Builds the example section as a decorator definition.
|
|
88
44
|
*
|
|
89
45
|
* The example section is a specialized decorator: it is driven by a schema
|
|
90
|
-
* directive, named by [`printTypeOptions.exampleSection`](https://graphql-markdown.dev/docs/settings#printtypeoptions),
|
|
46
|
+
* directive, named by [`printTypeOptions.exampleSection`](https://graphql-markdown.dev/docs/reference/settings#printtypeoptions),
|
|
91
47
|
* and rendered as a code block.
|
|
92
48
|
*
|
|
93
49
|
* It resolves its own value rather than gating on a directive by name,
|
package/dist/decorator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../src/decorator.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"decorator.d.ts","sourceRoot":"","sources":["../src/decorator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAEV,mBAAmB,EACnB,KAAK,EACL,WAAW,EACX,YAAY,EACZ,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAU,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAMpE,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG;IACpD,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAW1C,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,2BAA2B,QAAO,iBAe9C,CAAC;AA4FF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,cAAc,SACnB,OAAO,aACF,iBAAiB,WACnB,gBAAgB,KACxB,KAAK,CAAC,WAAW,CAcnB,CAAC;AA4CF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,SACpB,OAAO,WACJ,gBAAgB,KACxB,YAgBF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,SACxB,MAAM,QACN,OAAO,WACJ,gBAAgB,KACxB,MAAM,EAcR,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB,iBACf,SAAS,MAAM,EAAE,WACtB,gBAAgB,KACxB,MAAM,EAuBR,CAAC"}
|
package/dist/decorator.js
CHANGED
|
@@ -15,26 +15,14 @@
|
|
|
15
15
|
* to the built-in sections, or into a named slot such as the heading's
|
|
16
16
|
* metadata line or a member's description.
|
|
17
17
|
*
|
|
18
|
-
* `customDirective` is the deprecated predecessor of this module. It never
|
|
19
|
-
* reaches this module, or any other part of the printer: `@graphql-markdown/core`
|
|
20
|
-
* converts its schema-resolved directive map into decorator declarations
|
|
21
|
-
* (see {@link buildCustomDirectiveDecorators}) once, before the printer is
|
|
22
|
-
* ever invoked, so both options flow through the exact same resolve/render
|
|
23
|
-
* pipeline below — there is one code path for "select nodes by directive,
|
|
24
|
-
* render descriptor text, a badge, or a section", not two.
|
|
25
|
-
*
|
|
26
18
|
* @packageDocumentation
|
|
27
19
|
*/
|
|
28
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.getDecoratorsOrder = exports.printSlotDecorators = exports.printDecorators = exports.printDecorator = exports.getExampleSectionDefinition = exports.
|
|
21
|
+
exports.getDecoratorsOrder = exports.printSlotDecorators = exports.printDecorators = exports.printDecorator = exports.getExampleSectionDefinition = exports.RESERVED_SECTION_NAMES = exports.getSchemaEntity = void 0;
|
|
30
22
|
const graphql_1 = require("@graphql-markdown/graphql");
|
|
31
23
|
Object.defineProperty(exports, "getSchemaEntity", { enumerable: true, get: function () { return graphql_1.getSchemaEntity; } });
|
|
32
|
-
const utils_1 = require("@graphql-markdown/utils");
|
|
33
|
-
const badge_ts_1 = require("./badge.js");
|
|
34
24
|
const example_ts_1 = require("./example.js");
|
|
35
|
-
const link_ts_1 = require("./link.js");
|
|
36
25
|
const strings_ts_1 = require("./const/strings.js");
|
|
37
|
-
const options_ts_1 = require("./const/options.js");
|
|
38
26
|
/**
|
|
39
27
|
* Section/decorator keys owned by the printer, which a decorator cannot claim.
|
|
40
28
|
*
|
|
@@ -53,176 +41,15 @@ exports.RESERVED_SECTION_NAMES = [
|
|
|
53
41
|
"tags",
|
|
54
42
|
"description",
|
|
55
43
|
"code",
|
|
56
|
-
"customDirectives",
|
|
57
|
-
"customDirective:description",
|
|
58
|
-
"customDirective:tags",
|
|
59
44
|
"metadata",
|
|
60
45
|
"example",
|
|
61
46
|
"relations",
|
|
62
47
|
];
|
|
63
|
-
/**
|
|
64
|
-
* Ids {@link buildCustomDirectiveDecorators} assigns to its three adapter
|
|
65
|
-
* decorators. Reserved above so a user's own `decorators` config can't claim
|
|
66
|
-
* them, but exempted from `getDeclaredDecorators`'s reserved-id filter so
|
|
67
|
-
* `@graphql-markdown/core` can merge the converter's own output for these
|
|
68
|
-
* ids directly into `options.decorators`.
|
|
69
|
-
*
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
72
|
-
const CUSTOM_DIRECTIVE_DECORATOR_IDS = [
|
|
73
|
-
"customDirectives",
|
|
74
|
-
"customDirective:description",
|
|
75
|
-
"customDirective:tags",
|
|
76
|
-
];
|
|
77
|
-
/**
|
|
78
|
-
* Resolves a custom directive handler's return value.
|
|
79
|
-
*
|
|
80
|
-
* Internal to {@link buildCustomDirectiveDecorators}'s render closures; not
|
|
81
|
-
* itself user-facing — see `ConfigOptions.customDirective` for the setting.
|
|
82
|
-
*
|
|
83
|
-
* @param resolver - The resolver function name to execute
|
|
84
|
-
* @param type - The GraphQL type to resolve the directive for
|
|
85
|
-
* @param constDirectiveOption - The directive configuration options
|
|
86
|
-
* @param fallback - Optional fallback value if resolution fails
|
|
87
|
-
* @returns The resolved directive value or `fallback`/`undefined`
|
|
88
|
-
*
|
|
89
|
-
* @internal
|
|
90
|
-
*/
|
|
91
|
-
const getCustomDirectiveResolver = (resolver, type, constDirectiveOption, fallback) => {
|
|
92
|
-
if (typeof constDirectiveOption.type !== "object" ||
|
|
93
|
-
typeof constDirectiveOption[resolver] !== "function") {
|
|
94
|
-
return fallback;
|
|
95
|
-
}
|
|
96
|
-
return constDirectiveOption[resolver](constDirectiveOption.type, type);
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Prints a single custom directive entry as a Markdown string, for the
|
|
100
|
-
* built-in "Directives" section. The descriptor output is treated as text and
|
|
101
|
-
* escaped with `escapeMDX`, like the `customDirective:description` slot, so it
|
|
102
|
-
* cannot inject HTML, JSX or MDX into the page.
|
|
103
|
-
*
|
|
104
|
-
* @internal
|
|
105
|
-
*/
|
|
106
|
-
const printCustomDirective = (type, constDirectiveOption, options) => {
|
|
107
|
-
const typeNameLink = (0, link_ts_1.printLink)(constDirectiveOption.type, {
|
|
108
|
-
...options,
|
|
109
|
-
withAttributes: false,
|
|
110
|
-
});
|
|
111
|
-
const description = getCustomDirectiveResolver("descriptor", type, constDirectiveOption);
|
|
112
|
-
if (typeof description !== "string") {
|
|
113
|
-
return undefined;
|
|
114
|
-
}
|
|
115
|
-
return `${options_ts_1.SectionLevels.LEVEL.repeat(4)} ${typeNameLink}${strings_ts_1.MARKDOWN_EOL} ${(0, utils_1.escapeMDX)(description)}${strings_ts_1.MARKDOWN_EOL} `;
|
|
116
|
-
};
|
|
117
|
-
/**
|
|
118
|
-
* Converts the deprecated `customDirective` option's schema-resolved
|
|
119
|
-
* directive map into decorator declarations, so it flows through the exact
|
|
120
|
-
* same resolve/render pipeline as everything declared under `decorators`.
|
|
121
|
-
*
|
|
122
|
-
* Called once by `@graphql-markdown/core`, right after `customDirectives` is
|
|
123
|
-
* schema-resolved, and merged directly into the top-level `decorators`
|
|
124
|
-
* option before it reaches the printer — `customDirective`/`CustomDirectiveMap`
|
|
125
|
-
* never reach this printer package otherwise; only the three decorators
|
|
126
|
-
* built here do, indistinguishable from any other `decorators` entry except
|
|
127
|
-
* for their reserved ids (see {@link CUSTOM_DIRECTIVE_DECORATOR_IDS}).
|
|
128
|
-
*
|
|
129
|
-
* Returns three entries:
|
|
130
|
-
* - `customDirectives`: the built-in "Directives" section, listing every
|
|
131
|
-
* custom directive declared on a type, positioned right after `code`
|
|
132
|
-
* (its fixed position in the pre-decorators built-in section order).
|
|
133
|
-
* - `customDirective:description`: `customDirective`'s `descriptor`
|
|
134
|
-
* handlers, appended as description text (`position: { into: "description" }`).
|
|
135
|
-
* - `customDirective:tags`: `customDirective`'s `tag` handlers, rendered as
|
|
136
|
-
* badges in the metadata line (`position: { into: "tags" }`).
|
|
137
|
-
*
|
|
138
|
-
* All three share one `resolve`, reading every custom directive matched on
|
|
139
|
-
* a node, in schema declaration order. Matching (including wildcard `"*"`
|
|
140
|
-
* precedence — a named handler wins over `"*"`) is already resolved by
|
|
141
|
-
* `getConstDirectiveMap` (fed by `@graphql-markdown/graphql`'s
|
|
142
|
-
* `getCustomDirectives`, which expands a wildcard into concrete
|
|
143
|
-
* per-directive entries upstream), so this reuses that resolution rather
|
|
144
|
-
* than re-implementing it against the generic predicate system.
|
|
145
|
-
*
|
|
146
|
-
* @param customDirectives - the schema-resolved `customDirective` map, or
|
|
147
|
-
* `undefined`/empty when the option is not in use.
|
|
148
|
-
*
|
|
149
|
-
* @returns the three decorators, or `{}` when `customDirectives` is empty.
|
|
150
|
-
*
|
|
151
|
-
*/
|
|
152
|
-
const buildCustomDirectiveDecorators = (customDirectives) => {
|
|
153
|
-
if (typeof customDirectives !== "object" ||
|
|
154
|
-
customDirectives === null ||
|
|
155
|
-
Object.keys(customDirectives).length === 0) {
|
|
156
|
-
return {};
|
|
157
|
-
}
|
|
158
|
-
const resolve = (type) => {
|
|
159
|
-
const constDirectiveMap = (0, graphql_1.getConstDirectiveMap)(type, customDirectives);
|
|
160
|
-
return constDirectiveMap
|
|
161
|
-
? Object.values(constDirectiveMap)
|
|
162
|
-
: [];
|
|
163
|
-
};
|
|
164
|
-
return {
|
|
165
|
-
customDirectives: {
|
|
166
|
-
title: "Directives",
|
|
167
|
-
predicate: (0, graphql_1.always)(),
|
|
168
|
-
resolve,
|
|
169
|
-
position: { after: "code" },
|
|
170
|
-
render: (values, options, context) => {
|
|
171
|
-
const directives = values
|
|
172
|
-
.map((item) => {
|
|
173
|
-
return printCustomDirective(context.type, item, options);
|
|
174
|
-
})
|
|
175
|
-
.filter((value) => {
|
|
176
|
-
return value !== undefined;
|
|
177
|
-
});
|
|
178
|
-
return directives.length > 0
|
|
179
|
-
? directives.join(strings_ts_1.MARKDOWN_EOP)
|
|
180
|
-
: undefined;
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
"customDirective:description": {
|
|
184
|
-
predicate: (0, graphql_1.always)(),
|
|
185
|
-
resolve,
|
|
186
|
-
position: { into: "description" },
|
|
187
|
-
render: (values, _options, context) => {
|
|
188
|
-
const parts = values
|
|
189
|
-
.map((item) => {
|
|
190
|
-
return getCustomDirectiveResolver("descriptor", context.type, item, "");
|
|
191
|
-
})
|
|
192
|
-
.filter((text) => {
|
|
193
|
-
return typeof text === "string" && text.length > 0;
|
|
194
|
-
})
|
|
195
|
-
.map((text) => {
|
|
196
|
-
return (0, utils_1.escapeMDX)(text);
|
|
197
|
-
});
|
|
198
|
-
return parts.length > 0 ? parts.join(strings_ts_1.MARKDOWN_EOP) : undefined;
|
|
199
|
-
},
|
|
200
|
-
},
|
|
201
|
-
"customDirective:tags": {
|
|
202
|
-
predicate: (0, graphql_1.always)(),
|
|
203
|
-
resolve,
|
|
204
|
-
position: { into: "tags" },
|
|
205
|
-
render: (values, options, context) => {
|
|
206
|
-
const badges = values
|
|
207
|
-
.map((item) => {
|
|
208
|
-
return getCustomDirectiveResolver("tag", context.type, item);
|
|
209
|
-
})
|
|
210
|
-
.filter((value) => {
|
|
211
|
-
return value !== undefined;
|
|
212
|
-
});
|
|
213
|
-
return badges.length > 0
|
|
214
|
-
? (0, badge_ts_1.formatBadges)(badges, options)
|
|
215
|
-
: undefined;
|
|
216
|
-
},
|
|
217
|
-
},
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
exports.buildCustomDirectiveDecorators = buildCustomDirectiveDecorators;
|
|
221
48
|
/**
|
|
222
49
|
* Builds the example section as a decorator definition.
|
|
223
50
|
*
|
|
224
51
|
* The example section is a specialized decorator: it is driven by a schema
|
|
225
|
-
* directive, named by [`printTypeOptions.exampleSection`](https://graphql-markdown.dev/docs/settings#printtypeoptions),
|
|
52
|
+
* directive, named by [`printTypeOptions.exampleSection`](https://graphql-markdown.dev/docs/reference/settings#printtypeoptions),
|
|
226
53
|
* and rendered as a code block.
|
|
227
54
|
*
|
|
228
55
|
* It resolves its own value rather than gating on a directive by name,
|
|
@@ -354,18 +181,8 @@ const printDecorator = (type, decorator, options) => {
|
|
|
354
181
|
exports.printDecorator = printDecorator;
|
|
355
182
|
/**
|
|
356
183
|
* Returns the decorators to build, in declaration order, from the top-level
|
|
357
|
-
* `decorators` option.
|
|
358
|
-
*
|
|
359
|
-
* same option before it reaches the printer, so this reads a single source,
|
|
360
|
-
* with no separate customDirective-specific path.
|
|
361
|
-
*
|
|
362
|
-
* Every entry is filtered against reserved ids, except the adapter's own —
|
|
363
|
-
* see {@link CUSTOM_DIRECTIVE_DECORATOR_IDS} — since those are assigned by
|
|
364
|
-
* the converter, not user config, and are reserved specifically to keep user
|
|
365
|
-
* config from claiming them. A user-declared decorator claiming any other
|
|
366
|
-
* reserved id is still dropped: the printer is reachable directly through
|
|
367
|
-
* its public API, bypassing configuration validation, and such a decorator
|
|
368
|
-
* would otherwise overwrite a built-in section.
|
|
184
|
+
* `decorators` option.
|
|
185
|
+
*
|
|
369
186
|
*
|
|
370
187
|
* @internal
|
|
371
188
|
*
|
|
@@ -381,8 +198,7 @@ const getDeclaredDecorators = (options) => {
|
|
|
381
198
|
return decorators
|
|
382
199
|
? Object.entries(decorators)
|
|
383
200
|
.filter(([id]) => {
|
|
384
|
-
return
|
|
385
|
-
CUSTOM_DIRECTIVE_DECORATOR_IDS.includes(id));
|
|
201
|
+
return !exports.RESERVED_SECTION_NAMES.includes(id);
|
|
386
202
|
})
|
|
387
203
|
.map(([id, decorator]) => {
|
|
388
204
|
return { ...decorator, id };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Printer } from "./printer.ts";
|
|
2
|
-
export {
|
|
2
|
+
export { RESERVED_SECTION_NAMES } from "./decorator.ts";
|
|
3
|
+
export { toLink } from "./link.ts";
|
|
3
4
|
export { PrintCodeEvent, PrintTypeEvent, BeforeComposePageTypeEvent, } from "./events.ts";
|
|
4
5
|
export type { PageSection, PageSections, PrintCodeEventData, PrintTypeEventData, ComposePageTypeEventData, } from "./events.ts";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EACL,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BeforeComposePageTypeEvent = exports.PrintTypeEvent = exports.PrintCodeEvent = exports.
|
|
3
|
+
exports.BeforeComposePageTypeEvent = exports.PrintTypeEvent = exports.PrintCodeEvent = exports.toLink = exports.RESERVED_SECTION_NAMES = exports.Printer = void 0;
|
|
4
4
|
var printer_ts_1 = require("./printer.js");
|
|
5
5
|
Object.defineProperty(exports, "Printer", { enumerable: true, get: function () { return printer_ts_1.Printer; } });
|
|
6
6
|
var decorator_ts_1 = require("./decorator.js");
|
|
7
|
-
Object.defineProperty(exports, "buildCustomDirectiveDecorators", { enumerable: true, get: function () { return decorator_ts_1.buildCustomDirectiveDecorators; } });
|
|
8
7
|
Object.defineProperty(exports, "RESERVED_SECTION_NAMES", { enumerable: true, get: function () { return decorator_ts_1.RESERVED_SECTION_NAMES; } });
|
|
8
|
+
var link_ts_1 = require("./link.js");
|
|
9
|
+
Object.defineProperty(exports, "toLink", { enumerable: true, get: function () { return link_ts_1.toLink; } });
|
|
9
10
|
var events_ts_1 = require("./events.js");
|
|
10
11
|
Object.defineProperty(exports, "PrintCodeEvent", { enumerable: true, get: function () { return events_ts_1.PrintCodeEvent; } });
|
|
11
12
|
Object.defineProperty(exports, "PrintTypeEvent", { enumerable: true, get: function () { return events_ts_1.PrintTypeEvent; } });
|
package/dist/printer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"printer.d.ts","sourceRoot":"","sources":["../src/printer.ts"],"names":[],"mappings":"AA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7C;IAEF;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,4BAA4B,CAgBlD;IAEF;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAY1C;CACH"}
|
package/dist/printer.js
CHANGED
|
@@ -437,9 +437,6 @@ class Printer {
|
|
|
437
437
|
// can add, remove, or reorder them at will.
|
|
438
438
|
// See: https://github.com/graphql-markdown/graphql-markdown/issues/2954
|
|
439
439
|
const code = await Printer.printCodeAsync(type, name, printTypeOptions);
|
|
440
|
-
// `customDirective`'s `tag` handlers reach this line via the decorators
|
|
441
|
-
// pipeline (`printSlotDecorators`, not a dedicated call) — see
|
|
442
|
-
// `buildCustomDirectiveDecorators` in `./decorator`.
|
|
443
440
|
const tags = (0, decorator_ts_1.printSlotDecorators)("tags", type, printTypeOptions)
|
|
444
441
|
.filter(Boolean)
|
|
445
442
|
.join(" ");
|
|
@@ -448,9 +445,7 @@ class Printer {
|
|
|
448
445
|
const example = Printer.printExample(type, printTypeOptions);
|
|
449
446
|
// Create sections map for composition events. The built-in "Directives"
|
|
450
447
|
// section reaches this map via the `...Printer.printDecorators(...)`
|
|
451
|
-
// spread below
|
|
452
|
-
// present under the reserved `customDirectives` id — see
|
|
453
|
-
// `buildCustomDirectiveDecorators`), not a dedicated field here.
|
|
448
|
+
// spread below, not a dedicated field here.
|
|
454
449
|
const sections = {
|
|
455
450
|
header: { content: header },
|
|
456
451
|
metatags: { content: metatags },
|
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;AA8CjC;;;;;;;;GAQG;AAEH,eAAO,MAAM,gBAAgB,GAAI,CAAC,QAC1B,CAAC,WACE,gBAAgB,KACxB,SAAS,GAAG,
|
|
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;AA8CjC;;;;;;;;GAQG;AAEH,eAAO,MAAM,gBAAgB,GAAI,CAAC,QAC1B,CAAC,WACE,gBAAgB,KACxB,SAAS,GAAG,MAgEd,CAAC;AAEF;;;;;;;;GAQG;AAEH,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
|
@@ -28,7 +28,7 @@ const printPermalink = (id, options) => {
|
|
|
28
28
|
return undefined;
|
|
29
29
|
}
|
|
30
30
|
const format = options.formatMDXPermalink ?? options_ts_1.DEFAULT_OPTIONS.formatMDXPermalink;
|
|
31
|
-
return format(id);
|
|
31
|
+
return format(id, options.meta);
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
34
|
* Prints a single section item with its associated metadata.
|
|
@@ -56,9 +56,6 @@ const printSectionItem = (type, options) => {
|
|
|
56
56
|
]
|
|
57
57
|
.filter(Boolean)
|
|
58
58
|
.join(" ");
|
|
59
|
-
// `customDirective`'s `tag` handlers reach this line via the decorators
|
|
60
|
-
// pipeline (`printSlotDecorators`), not a dedicated call — see
|
|
61
|
-
// `buildCustomDirectiveDecorators` in `./decorator`.
|
|
62
59
|
const tags = (0, decorator_ts_1.printSlotDecorators)("tags", type, options)
|
|
63
60
|
.filter(Boolean)
|
|
64
61
|
.join(" ");
|
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.21.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"test:watch": "vitest --watch"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@graphql-markdown/formatters": "^1.
|
|
69
|
-
"@graphql-markdown/graphql": "^1.
|
|
70
|
-
"@graphql-markdown/types": "^1.
|
|
71
|
-
"@graphql-markdown/utils": "^1.14.
|
|
68
|
+
"@graphql-markdown/formatters": "^1.3.0",
|
|
69
|
+
"@graphql-markdown/graphql": "^1.4.0",
|
|
70
|
+
"@graphql-markdown/types": "^1.19.0",
|
|
71
|
+
"@graphql-markdown/utils": "^1.14.4"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@graphql-markdown/tooling-config": "^1.0.0"
|