@graphql-markdown/core 1.20.0 → 1.21.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.
Files changed (48) hide show
  1. package/dist/config.d.ts +9 -57
  2. package/dist/config.d.ts.map +1 -1
  3. package/dist/config.js +42 -60
  4. package/dist/const/patterns.d.ts.map +1 -1
  5. package/dist/diff.d.ts.map +1 -1
  6. package/dist/directives/normalize.d.ts +2 -2
  7. package/dist/directives/normalize.d.ts.map +1 -1
  8. package/dist/directives/validation.d.ts.map +1 -1
  9. package/dist/directives/validation.js +4 -0
  10. package/dist/event-emitter.d.ts.map +1 -1
  11. package/dist/event-handlers.d.ts.map +1 -1
  12. package/dist/event-map.d.ts +1 -0
  13. package/dist/event-map.d.ts.map +1 -1
  14. package/dist/event-map.js +2 -0
  15. package/dist/events/diff-events.d.ts.map +1 -1
  16. package/dist/events/generate-index-metafile-events.d.ts.map +1 -1
  17. package/dist/events/index.d.ts +2 -1
  18. package/dist/events/index.d.ts.map +1 -1
  19. package/dist/events/index.js +20 -14
  20. package/dist/events/print-type-events.d.ts.map +1 -1
  21. package/dist/events/render-files-events.d.ts +13 -0
  22. package/dist/events/render-files-events.d.ts.map +1 -0
  23. package/dist/events/render-files-events.js +15 -0
  24. package/dist/events/render-files.d.ts +26 -0
  25. package/dist/events/render-files.d.ts.map +1 -0
  26. package/dist/events/render-files.js +20 -0
  27. package/dist/events/render-homepage-events.d.ts.map +1 -1
  28. package/dist/events/render-root-types-events.d.ts.map +1 -1
  29. package/dist/events/render-type-entities-events.d.ts.map +1 -1
  30. package/dist/events/render-type-entities.d.ts +4 -0
  31. package/dist/events/render-type-entities.d.ts.map +1 -1
  32. package/dist/events/schema-events.d.ts.map +1 -1
  33. package/dist/generator.d.ts +3 -14
  34. package/dist/generator.d.ts.map +1 -1
  35. package/dist/generator.js +19 -10
  36. package/dist/graphql-config.d.ts +0 -5
  37. package/dist/graphql-config.d.ts.map +1 -1
  38. package/dist/graphql-config.js +8 -4
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +13 -13
  42. package/dist/printer.d.ts +9 -10
  43. package/dist/printer.d.ts.map +1 -1
  44. package/dist/printer.js +11 -20
  45. package/dist/renderer.d.ts +4 -4
  46. package/dist/renderer.d.ts.map +1 -1
  47. package/dist/renderer.js +11 -4
  48. package/package.json +10 -13
package/dist/config.d.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  *
16
16
  * @packageDocumentation
17
17
  */
18
- import type { CliOptions, ConfigDocOptions, ConfigOptions, ConfigPrintTypeOptions, CustomDirective, DeprecatedCliOptions, DeprecatedConfigDocOptions, DeprecatedConfigPrintTypeOptions, DirectiveName, GroupByDirectiveOptions, Maybe, Options, TypeDiffMethod, TypeHierarchyObjectType, TypeHierarchyType, TypeHierarchyValueType } from "@graphql-markdown/types";
18
+ import type { CliOptions, ConfigDocOptions, ConfigOptions, ConfigPrintTypeOptions, CustomDirective, DirectiveName, GroupByDirectiveOptions, Maybe, Options, TypeDiffMethod, TypeHierarchyObjectType, TypeHierarchyType, TypeHierarchyValueType } from "@graphql-markdown/types";
19
19
  /**
20
20
  * Type hierarchy options for organizing schema documentation.
21
21
  *
@@ -97,8 +97,9 @@ export declare const DEFAULT_HIERARCHY: {
97
97
  * @public
98
98
  * @see {@link Options} for the complete configuration interface
99
99
  */
100
- export declare const DEFAULT_OPTIONS: Readonly<Pick<ConfigOptions, "customDirective" | "groupByDirective" | "loaders"> & Required<Omit<ConfigOptions, "customDirective" | "groupByDirective" | "loaders" | "mdxParser" | "printTypeOptions">>> & {
101
- printTypeOptions: Required<Omit<ConfigPrintTypeOptions, "hierarchy">> & {
100
+ export declare const DEFAULT_OPTIONS: Readonly<Pick<ConfigOptions, "customDirective" | "groupByDirective" | "loaders"> & Required<Omit<ConfigOptions, "customDirective" | "formatter" | "groupByDirective" | "loaders" | "mdxParser" | "printTypeOptions">>> & {
101
+ printTypeOptions: Required<Omit<ConfigPrintTypeOptions, "exampleSection" | "hierarchy">> & {
102
+ exampleSection: ConfigPrintTypeOptions["exampleSection"];
102
103
  hierarchy: Required<Pick<TypeHierarchyObjectType, TypeHierarchy.API>>;
103
104
  };
104
105
  };
@@ -233,17 +234,8 @@ export declare const getCustomDirectives: (customDirectiveOptions: Maybe<CustomD
233
234
  * @see {@link DiffMethod} for available diff methods
234
235
  */
235
236
  export declare const getForcedDiffMethod: () => TypeDiffMethod;
236
- export declare const getNormalizedDiffMethod: (diff: TypeDiffMethod) => TypeDiffMethod;
237
237
  export declare const getDiffMethod: (diff: TypeDiffMethod) => TypeDiffMethod;
238
- /**
239
- * Placeholder function for handling deprecated document options.
240
- * Currently returns an empty object as these options are deprecated.
241
- *
242
- * @param _cliOpts - Deprecated CLI options (unused)
243
- * @param _configOptions - Deprecated config options (unused)
244
- * @returns An empty object
245
- */
246
- export declare const parseDeprecatedDocOptions: (_cliOpts: Maybe<Omit<DeprecatedCliOptions, "never">>, _configOptions: Maybe<Omit<DeprecatedConfigDocOptions, "never">>) => Record<string, never>;
238
+ export declare const parseDeprecatedDocOptions: (_cliOpts?: Maybe<CliOptions>, _configOptions?: Maybe<ConfigDocOptions>) => Record<string, never>;
247
239
  /**
248
240
  * Builds the document options by merging CLI options, config file options, and defaults.
249
241
  * Handles index generation flag and front matter configuration.
@@ -264,7 +256,7 @@ export declare const parseDeprecatedDocOptions: (_cliOpts: Maybe<Omit<Deprecated
264
256
  * // }
265
257
  * ```
266
258
  */
267
- export declare const getDocOptions: (cliOpts?: Maybe<CliOptions & Omit<DeprecatedCliOptions, "never">>, configOptions?: Maybe<ConfigDocOptions & Omit<DeprecatedConfigDocOptions, "never">>) => Required<ConfigDocOptions>;
259
+ export declare const getDocOptions: (cliOpts?: Maybe<CliOptions>, configOptions?: Maybe<ConfigDocOptions>) => Required<ConfigDocOptions>;
268
260
  /**
269
261
  * Resolves the type hierarchy configuration by merging CLI and config file options.
270
262
  * Validates that CLI and config don't specify conflicting hierarchy types.
@@ -289,49 +281,9 @@ export declare const getDocOptions: (cliOpts?: Maybe<CliOptions & Omit<Deprecate
289
281
  * ```
290
282
  * @see {@link TypeHierarchy} for available hierarchy types
291
283
  */
292
- export declare const getTypeHierarchyOption: (cliOption?: Maybe<TypeHierarchyValueType>, configOption?: Maybe<TypeHierarchyType>) => Maybe<Partial<Record<TypeHierarchyValueType, import("@graphql-markdown/types").TypeHierarchyTypeOptions>>>;
293
- /**
294
- * Handles deprecated print type options.
295
- *
296
- * Emits deprecation warnings when legacy section toggle options are detected
297
- * from CLI flags or config file values.
298
- *
299
- * @param cliOpts - CLI options containing deprecated print type flags
300
- * @param configOptions - Config options containing deprecated print type settings
301
- * @returns An empty object reserved for backward compatibility
302
- */
303
- export declare const parseDeprecatedPrintTypeOptions: (cliOpts: Maybe<Pick<CliOptions, "noCode" | "noExample" | "noRelatedType">>, configOptions: Maybe<Pick<ConfigPrintTypeOptions, "codeSection" | "exampleSection" | "relatedTypeSection">>) => Record<string, never>;
304
- /**
305
- * Builds the print type options by merging CLI options, config file options, and defaults.
306
- * Handles various formatting options for type documentation.
307
- *
308
- * @param cliOpts - CLI options for print type configuration
309
- * @param configOptions - Config file options for print type configuration
310
- * @returns The resolved print type options with all required fields
311
- * @example
312
- * ```typescript
313
- * const cliOptions = { noCode: true, deprecated: "group" };
314
- * const configOptions = {
315
- * exampleSection: true,
316
- * hierarchy: "entity"
317
- * };
318
- *
319
- * const printOptions = getPrintTypeOptions(cliOptions, configOptions);
320
- * console.log(printOptions);
321
- * // {
322
- * // codeSection: false, // Disabled via noCode CLI flag
323
- * // deprecated: "group", // From CLI
324
- * // exampleSection: true, // From config
325
- * // parentTypePrefix: true, // Default value
326
- * // relatedTypeSection: true, // Default value
327
- * // typeBadges: true, // Default value
328
- * // hierarchy: { entity: {} } // Parsed from config
329
- * // }
330
- * ```
331
- * @see {@link DeprecatedOption} for deprecated handling options
332
- * @see {@link getTypeHierarchyOption} for hierarchy resolution
333
- */
334
- export declare const getPrintTypeOptions: (cliOpts: Maybe<CliOptions & Omit<DeprecatedCliOptions, "never">>, configOptions: Maybe<ConfigPrintTypeOptions & Omit<DeprecatedConfigPrintTypeOptions, "never">>) => Required<ConfigPrintTypeOptions>;
284
+ export declare const getTypeHierarchyOption: (cliOption?: Maybe<TypeHierarchyValueType>, configOption?: Maybe<TypeHierarchyType>) => Maybe<TypeHierarchyObjectType>;
285
+ export declare const parseDeprecatedFormatterOption: (cliOpts?: Maybe<CliOptions>, configOptions?: Maybe<ConfigOptions>) => Maybe<string>;
286
+ export declare const parseDeprecatedPrintTypeOptions: (_cliOpts?: Maybe<CliOptions>, _configOptions?: Maybe<ConfigPrintTypeOptions>) => Record<string, never>;
335
287
  /**
336
288
  * Parses and validates the groupByDirective option string format.
337
289
  * The format should be \@directive(field|=fallback) where:
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,0BAA0B,EAC1B,gCAAgC,EAChC,aAAa,EAEb,uBAAuB,EACvB,KAAK,EACL,OAAO,EAIP,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AAQjC;;;;;;;;;;;;GAYG;AACH,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED;;;;;;;;;;;GAWG;AACH,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,qCAA+C,CAAC;AAErE;;;GAGG;AACH,eA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AmB,gBACjB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,kBAClB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,KACpC,KAAK,CAAC,MAAM,CAcd,CAAC;AAmDF,eAAO,MAAM,WAAW,mBACN,KAAK,CAAC,aAAa,CAAC,YAC1B,KAAK,CAAC,UAAU,CAAC,OACvB,KAAK,CAAC,MAAM,CAAC,KAChB,OAAO,CAAC,OAAO,CAkFjB,CAAC"}
package/dist/config.js CHANGED
@@ -17,15 +17,15 @@
17
17
  * @packageDocumentation
18
18
  */
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.buildConfig = exports.parseHomepageOption = exports.parseGroupByOption = exports.getPrintTypeOptions = exports.parseDeprecatedPrintTypeOptions = exports.getTypeHierarchyOption = exports.getDocOptions = exports.parseDeprecatedDocOptions = exports.getDiffMethod = exports.getNormalizedDiffMethod = exports.getForcedDiffMethod = 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.parseDeprecatedPrintTypeOptions = exports.parseDeprecatedFormatterOption = exports.getTypeHierarchyOption = exports.getDocOptions = exports.parseDeprecatedDocOptions = exports.getDiffMethod = exports.getForcedDiffMethod = 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 deepmerge_1 = require("@fastify/deepmerge");
24
+ const logger_1 = require("@graphql-markdown/logger");
24
25
  const graphql_config_1 = require("./graphql-config");
25
26
  const patterns_1 = require("./const/patterns");
26
27
  const validation_1 = require("./directives/validation");
27
28
  const builder_1 = require("./options/builder");
28
- const logger_1 = require("@graphql-markdown/logger");
29
29
  /**
30
30
  * Type hierarchy options for organizing schema documentation.
31
31
  *
@@ -126,13 +126,10 @@ exports.DEFAULT_OPTIONS = {
126
126
  loaders: undefined,
127
127
  metatags: [],
128
128
  pretty: false,
129
- printer: "@graphql-markdown/printer-legacy",
130
129
  printTypeOptions: {
131
- codeSection: true,
132
130
  deprecated: DeprecatedOption.DEFAULT,
133
- exampleSection: false,
131
+ exampleSection: undefined,
134
132
  parentTypePrefix: true,
135
- relatedTypeSection: true,
136
133
  typeBadges: true,
137
134
  },
138
135
  rootPath: "./docs",
@@ -157,6 +154,8 @@ exports.DEFAULT_OPTIONS = {
157
154
  * getDocDirective("example"); // Error: Invalid "example"
158
155
  * ```
159
156
  */
157
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
158
+ // fallow-ignore-next-line unused-export
160
159
  const getDocDirective = (name) => {
161
160
  if (typeof name !== "string" || !patterns_1.PATTERNS.DIRECTIVE_NAME.test(name)) {
162
161
  throw new Error(`Invalid "${name}"`);
@@ -291,6 +290,8 @@ exports.getVisibilityDirectives = getVisibilityDirectives;
291
290
  * ```
292
291
  * @see {@link DOCS_URL}/advanced/custom-directive for custom directive format documentation
293
292
  */
293
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
294
+ // fallow-ignore-next-line unused-export
294
295
  const getCustomDirectives = (customDirectiveOptions, skipDocDirective) => {
295
296
  if (!customDirectiveOptions ||
296
297
  Object.keys(customDirectiveOptions).length === 0) {
@@ -324,6 +325,8 @@ exports.getCustomDirectives = getCustomDirectives;
324
325
  * ```
325
326
  * @see {@link DiffMethod} for available diff methods
326
327
  */
328
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
329
+ // fallow-ignore-next-line unused-export
327
330
  const getForcedDiffMethod = () => {
328
331
  return DiffMethod.FORCE;
329
332
  };
@@ -331,19 +334,14 @@ exports.getForcedDiffMethod = getForcedDiffMethod;
331
334
  const getNormalizedDiffMethod = (diff) => {
332
335
  return diff.toLocaleUpperCase();
333
336
  };
334
- exports.getNormalizedDiffMethod = getNormalizedDiffMethod;
337
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
338
+ // fallow-ignore-next-line unused-export
335
339
  const getDiffMethod = (diff) => {
336
- return (0, exports.getNormalizedDiffMethod)(diff);
340
+ return getNormalizedDiffMethod(diff);
337
341
  };
338
342
  exports.getDiffMethod = getDiffMethod;
339
- /**
340
- * Placeholder function for handling deprecated document options.
341
- * Currently returns an empty object as these options are deprecated.
342
- *
343
- * @param _cliOpts - Deprecated CLI options (unused)
344
- * @param _configOptions - Deprecated config options (unused)
345
- * @returns An empty object
346
- */
343
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
344
+ // fallow-ignore-next-line unused-export
347
345
  const parseDeprecatedDocOptions = (_cliOpts, _configOptions) => {
348
346
  return {};
349
347
  };
@@ -368,6 +366,8 @@ exports.parseDeprecatedDocOptions = parseDeprecatedDocOptions;
368
366
  * // }
369
367
  * ```
370
368
  */
369
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
370
+ // fallow-ignore-next-line unused-export
371
371
  const getDocOptions = (cliOpts, configOptions) => {
372
372
  const deprecated = (0, exports.parseDeprecatedDocOptions)(cliOpts, configOptions);
373
373
  const cliIndex = typeof cliOpts?.index === "boolean" ? cliOpts.index : undefined;
@@ -412,6 +412,8 @@ exports.getDocOptions = getDocOptions;
412
412
  * ```
413
413
  * @see {@link TypeHierarchy} for available hierarchy types
414
414
  */
415
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
416
+ // fallow-ignore-next-line unused-export
415
417
  const getTypeHierarchyOption = (cliOption, configOption) => {
416
418
  const parseValue = (config) => {
417
419
  if (typeof config === "string") {
@@ -443,35 +445,21 @@ const getTypeHierarchyOption = (cliOption, configOption) => {
443
445
  return cliHierarchy ?? configHierarchy ?? exports.DEFAULT_HIERARCHY;
444
446
  };
445
447
  exports.getTypeHierarchyOption = getTypeHierarchyOption;
446
- /**
447
- * Handles deprecated print type options.
448
- *
449
- * Emits deprecation warnings when legacy section toggle options are detected
450
- * from CLI flags or config file values.
451
- *
452
- * @param cliOpts - CLI options containing deprecated print type flags
453
- * @param configOptions - Config options containing deprecated print type settings
454
- * @returns An empty object reserved for backward compatibility
455
- */
456
- const parseDeprecatedPrintTypeOptions = (cliOpts, configOptions) => {
457
- if (cliOpts?.noCode) {
458
- (0, logger_1.log)(`[DEPRECATED] CLI option '--noCode' is deprecated. Use the 'beforeComposePageTypeHook' event instead: remove 'code' from event.output to hide the code section.`, logger_1.LogLevel.warn);
459
- }
460
- else if (typeof configOptions?.codeSection === "boolean") {
461
- (0, logger_1.log)(`[DEPRECATED] config option 'printTypeOptions.codeSection' is deprecated. Use the 'beforeComposePageTypeHook' event instead: remove 'code' from event.output to hide the code section.`, logger_1.LogLevel.warn);
462
- }
463
- if (cliOpts?.noExample) {
464
- (0, logger_1.log)(`[DEPRECATED] CLI option '--noExample' is deprecated. Use the 'beforeComposePageTypeHook' event instead: remove 'example' from event.output to hide the example section.`, logger_1.LogLevel.warn);
465
- }
466
- else if (typeof configOptions?.exampleSection === "boolean") {
467
- (0, logger_1.log)(`[DEPRECATED] config option 'printTypeOptions.exampleSection' is deprecated. Use the 'beforeComposePageTypeHook' event instead: remove 'example' from event.output to hide the example section.`, logger_1.LogLevel.warn);
468
- }
469
- if (cliOpts?.noRelatedType) {
470
- (0, logger_1.log)(`[DEPRECATED] CLI option '--noRelatedType' is deprecated. Use the 'beforeComposePageTypeHook' event instead: remove 'relations' from event.output to hide the relations section.`, logger_1.LogLevel.warn);
471
- }
472
- else if (typeof configOptions?.relatedTypeSection === "boolean") {
473
- (0, logger_1.log)(`[DEPRECATED] config option 'printTypeOptions.relatedTypeSection' is deprecated. Use the 'beforeComposePageTypeHook' event instead: remove 'relations' from event.output to hide the relations section.`, logger_1.LogLevel.warn);
448
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
449
+ // fallow-ignore-next-line unused-export
450
+ const parseDeprecatedFormatterOption = (cliOpts, configOptions) => {
451
+ const legacyCli = cliOpts?.mdxParser ?? null; // NOSONAR typescript:S1874
452
+ const legacyConfig = configOptions?.mdxParser; // NOSONAR typescript:S1874
453
+ if (legacyCli !== null ||
454
+ (legacyConfig !== undefined && legacyConfig !== null)) {
455
+ (0, logger_1.log)(`Setting "mdxParser" is deprecated and will be removed in a future version. Use "formatter" instead.`, logger_1.LogLevel.warn);
474
456
  }
457
+ return (cliOpts?.formatter ?? legacyCli ?? configOptions?.formatter ?? legacyConfig);
458
+ };
459
+ exports.parseDeprecatedFormatterOption = parseDeprecatedFormatterOption;
460
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
461
+ // fallow-ignore-next-line unused-export
462
+ const parseDeprecatedPrintTypeOptions = (_cliOpts, _configOptions) => {
475
463
  return {};
476
464
  };
477
465
  exports.parseDeprecatedPrintTypeOptions = parseDeprecatedPrintTypeOptions;
@@ -484,20 +472,18 @@ exports.parseDeprecatedPrintTypeOptions = parseDeprecatedPrintTypeOptions;
484
472
  * @returns The resolved print type options with all required fields
485
473
  * @example
486
474
  * ```typescript
487
- * const cliOptions = { noCode: true, deprecated: "group" };
475
+ * const cliOptions = { deprecated: "group" };
488
476
  * const configOptions = {
489
- * exampleSection: true,
477
+ * exampleSection: { directive: "example" },
490
478
  * hierarchy: "entity"
491
479
  * };
492
480
  *
493
481
  * const printOptions = getPrintTypeOptions(cliOptions, configOptions);
494
482
  * console.log(printOptions);
495
483
  * // {
496
- * // codeSection: false, // Disabled via noCode CLI flag
497
484
  * // deprecated: "group", // From CLI
498
- * // exampleSection: true, // From config
485
+ * // exampleSection: { directive: "example" }, // From config
499
486
  * // parentTypePrefix: true, // Default value
500
- * // relatedTypeSection: true, // Default value
501
487
  * // typeBadges: true, // Default value
502
488
  * // hierarchy: { entity: {} } // Parsed from config
503
489
  * // }
@@ -507,23 +493,18 @@ exports.parseDeprecatedPrintTypeOptions = parseDeprecatedPrintTypeOptions;
507
493
  */
508
494
  const getPrintTypeOptions = (cliOpts, configOptions) => {
509
495
  return {
510
- codeSection: (!cliOpts?.noCode && configOptions?.codeSection) ??
511
- exports.DEFAULT_OPTIONS.printTypeOptions.codeSection,
512
496
  deprecated: (cliOpts?.deprecated ??
513
497
  configOptions?.deprecated ??
514
498
  exports.DEFAULT_OPTIONS.printTypeOptions.deprecated).toLocaleLowerCase(),
515
- exampleSection: (!cliOpts?.noExample && configOptions?.exampleSection) ??
499
+ exampleSection: configOptions?.exampleSection ??
516
500
  exports.DEFAULT_OPTIONS.printTypeOptions.exampleSection,
517
501
  parentTypePrefix: (!cliOpts?.noParentType && configOptions?.parentTypePrefix) ??
518
502
  exports.DEFAULT_OPTIONS.printTypeOptions.parentTypePrefix,
519
- relatedTypeSection: (!cliOpts?.noRelatedType && configOptions?.relatedTypeSection) ??
520
- exports.DEFAULT_OPTIONS.printTypeOptions.relatedTypeSection,
521
503
  typeBadges: (!cliOpts?.noTypeBadges && configOptions?.typeBadges) ??
522
504
  exports.DEFAULT_OPTIONS.printTypeOptions.typeBadges,
523
505
  hierarchy: (0, exports.getTypeHierarchyOption)(cliOpts?.hierarchy, configOptions?.hierarchy),
524
506
  };
525
507
  };
526
- exports.getPrintTypeOptions = getPrintTypeOptions;
527
508
  /**
528
509
  * Parses and validates the groupByDirective option string format.
529
510
  * The format should be \@directive(field|=fallback) where:
@@ -551,6 +532,8 @@ exports.getPrintTypeOptions = getPrintTypeOptions;
551
532
  * // Error: Invalid "invalid-format"
552
533
  * ```
553
534
  */
535
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
536
+ // fallow-ignore-next-line unused-export
554
537
  const parseGroupByOption = (groupOptions) => {
555
538
  if (typeof groupOptions !== "string") {
556
539
  return undefined;
@@ -566,6 +549,8 @@ const parseGroupByOption = (groupOptions) => {
566
549
  };
567
550
  };
568
551
  exports.parseGroupByOption = parseGroupByOption;
552
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
553
+ // fallow-ignore-next-line unused-export
569
554
  const parseHomepageOption = (cliHomepage, configHomepage) => {
570
555
  if (typeof cliHomepage === "string") {
571
556
  return cliHomepage;
@@ -582,8 +567,6 @@ exports.parseHomepageOption = parseHomepageOption;
582
567
  const buildConfig = async (configFileOpts, cliOpts, id = "default") => {
583
568
  cliOpts ??= {};
584
569
  const graphqlConfig = await (0, graphql_config_1.loadConfiguration)(id);
585
- // Emit deprecation warnings using raw user-provided options only (no defaults merged in),
586
- // so we don't spuriously warn for projects that never set these options.
587
570
  (0, exports.parseDeprecatedPrintTypeOptions)(cliOpts, {
588
571
  ...graphqlConfig?.printTypeOptions,
589
572
  ...configFileOpts?.printTypeOptions,
@@ -629,13 +612,12 @@ const buildConfig = async (configFileOpts, cliOpts, id = "default") => {
629
612
  id: id ?? exports.DEFAULT_OPTIONS.id,
630
613
  linkRoot,
631
614
  loaders: config.loaders,
632
- mdxParser: cliOpts.mdxParser ?? config.mdxParser,
615
+ formatter: (0, exports.parseDeprecatedFormatterOption)(cliOpts, config),
633
616
  metatags: config.metatags ?? exports.DEFAULT_OPTIONS.metatags,
634
617
  onlyDocDirective,
635
618
  outputDir: (0, node_path_1.join)(rootPath, baseURL),
636
619
  prettify,
637
- printer: (config.printer ?? exports.DEFAULT_OPTIONS.printer),
638
- printTypeOptions: (0, exports.getPrintTypeOptions)(cliOpts, config.printTypeOptions),
620
+ printTypeOptions: getPrintTypeOptions(cliOpts, config.printTypeOptions),
639
621
  schemaLocation,
640
622
  skipDocDirective,
641
623
  tmpDir,
@@ -1 +1 @@
1
- {"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../../src/const/patterns.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ;IACnB;;;;;;;;;;OAUG;;IAGH;;;;;;;;;;OAUG;;IAGH;;;;;;;;;OASG;;IAGH;;;;;;;;;OASG;;IAGH;;;;;;;;;OASG;;IAGH;;;;;;;;;OASG;;IAGH;;;;;;;;;;;;;OAaG;;CAEK,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;;OAGG;;CAEK,CAAC"}
1
+ {"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../../src/const/patterns.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ;IACnB;;;;;;;;;;OAUG;aACH,cAAc;IAEd;;;;;;;;;;OAUG;aACH,kBAAkB;IAElB;;;;;;;;;OASG;aACH,aAAa;IAEb;;;;;;;;;OASG;aACH,eAAe;IAEf;;;;;;;;;OASG;aACH,uBAAuB;IAEvB;;;;;;;;;OASG;aACH,uBAAuB;IAEvB;;;;;;;;;;;;;OAaG;aACH,cAAc;CACN,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;;OAGG;aACH,aAAa,EAAE,eAAe;CACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACV,cAAc,EAEd,aAAa,EACb,KAAK,EACN,MAAM,yBAAyB,CAAC;AAIjC;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,UAAU,4HAwBtB,CAAC"}
1
+ {"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EACV,cAAc,EAEd,aAAa,EACb,KAAK,EACN,MAAM,yBAAyB,CAAC;AAIjC;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,UAAU,WACb,aAAa,UACb,MAAM,cACF,KAAK,CAAC,cAAc,CAAC,eACrB,KAAK,CAAC,MAAM,CAAC,KACxB,OAAO,CAAC,OAAO,CAmBjB,CAAC"}
@@ -37,7 +37,7 @@ import type { DirectiveName, Maybe } from "@graphql-markdown/types";
37
37
  * // Result: ["@example", "@internal", "@auth"]
38
38
  * ```
39
39
  */
40
- export declare const normalizeDirectiveNames: (...sources: Maybe<DirectiveName[]>[]) => DirectiveName[];
40
+ export declare const normalizeDirectiveNames: (...sources: (DirectiveName[] | Maybe<DirectiveName[]>)[]) => DirectiveName[];
41
41
  /**
42
42
  * Removes duplicate directive names from an array while preserving order.
43
43
  *
@@ -75,5 +75,5 @@ export declare const uniqueDirectiveNames: (directives: DirectiveName[]) => Dire
75
75
  * // Result: ["@example", "@internal", "@auth"]
76
76
  * ```
77
77
  */
78
- export declare const combineDirectiveNames: (...sources: Maybe<DirectiveName[]>[]) => DirectiveName[];
78
+ export declare const combineDirectiveNames: (...sources: (DirectiveName[] | Maybe<DirectiveName[]>)[]) => DirectiveName[];
79
79
  //# sourceMappingURL=normalize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/directives/normalize.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,uBAAuB,2DAQnC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,kDAIhC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,qBAAqB,2DAIjC,CAAC"}
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/directives/normalize.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,uBAAuB,eACtB,CAAC,aAAa,EAAE,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,KACvD,aAAa,EAMf,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,eACnB,aAAa,EAAE,KAC1B,aAAa,EAEf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,qBAAqB,eACpB,CAAC,aAAa,EAAE,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,EAAE,KACvD,aAAa,EAEf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/directives/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAeH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,sFAQzB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,+EAQlB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,uCAE1B,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,wDAI1B,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,mCAElB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,uDAI1B,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,uCAE1B,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,yBAAyB,wFASrC,CAAC"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/directives/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAeH;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,aAAa,WAChB,OAAO,KACd,MAAM,IAAI,MAAM,CAAC,YAAY,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAMhE,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,MAAM,WACT,OAAO,KACd,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAMzD,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,WAAY,OAAO,KAAG,MAAM,IAAI,MAE1D,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,WACjB,OAAO,KACd,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAElC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,SAAU,OAAO,KAAG,IAAI,IAAI,MAE9C,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,WACjB,OAAO,KACd,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAEjC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,WAAY,OAAO,KAAG,MAAM,IAAI,MAE1D,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,yBAAyB,WAC5B,OAAO,YACL,YAAY,GAAG,KAAK,KAC7B,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAMlC,CAAC"}
@@ -35,6 +35,8 @@ const isTypeObject = (value) => {
35
35
  * }
36
36
  * ```
37
37
  */
38
+ // Used only by unit tests for direct whitebox coverage; not part of the production public API.
39
+ // fallow-ignore-next-line unused-export
38
40
  const hasDescriptor = (config) => {
39
41
  return (isTypeObject(config) &&
40
42
  "descriptor" in config &&
@@ -57,6 +59,8 @@ exports.hasDescriptor = hasDescriptor;
57
59
  * }
58
60
  * ```
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 hasTag = (config) => {
61
65
  return (isTypeObject(config) &&
62
66
  "tag" in config &&
@@ -1 +1 @@
1
- {"version":3,"file":"event-emitter.d.ts","sourceRoot":"","sources":["../src/event-emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,MAAM,EAAE,KAAK,EAAE,CAAC;IAEhB;;;OAGG;IACH,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,cAAM,uBAAwB,SAAQ,YAAY;IAChD,OAAO,CAAC,MAAM,CAAC,OAAO;IAItB,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAMjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,SAAS,CACb,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,UAAU,CAAC,CAgBrB;YAEa,cAAc;YAOd,eAAe;YAsBf,gBAAgB;CAgB/B;AAQD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS,+BAGrB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,YAKvB,CAAC"}
1
+ {"version":3,"file":"event-emitter.d.ts","sourceRoot":"","sources":["../src/event-emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,MAAM,EAAE,KAAK,EAAE,CAAC;IAEhB;;;OAGG;IACH,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,cAAM,uBAAwB,SAAQ,YAAY;IAChD,OAAO,CAAC,MAAM,CAAC,OAAO;IAItB,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAMjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,SAAS,CACb,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,UAAU,CAAC,CAgBrB;YAEa,cAAc;YAOd,eAAe;YAsBf,gBAAgB;CAgB/B;AAQD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS,QAAO,uBAG5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,QAAO,IAK9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"event-handlers.d.ts","sourceRoot":"","sources":["../src/event-handlers.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,wBAAwB,8BAwCpC,CAAC"}
1
+ {"version":3,"file":"event-handlers.d.ts","sourceRoot":"","sources":["../src/event-handlers.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,wBAAwB,cAAe,OAAO,KAAG,IAwC7D,CAAC"}
@@ -18,6 +18,7 @@ export declare const EVENT_CALLBACK_MAP: {
18
18
  readonly "render:afterRenderTypeEntities": "afterRenderTypeEntitiesHook";
19
19
  readonly "render:beforeGenerateIndexMetafile": "beforeGenerateIndexMetafileHook";
20
20
  readonly "render:afterGenerateIndexMetafile": "afterGenerateIndexMetafileHook";
21
+ readonly "render:afterRenderFiles": "afterRenderFilesHook";
21
22
  readonly "print:beforePrintCode": "beforePrintCodeHook";
22
23
  readonly "print:afterPrintCode": "afterPrintCodeHook";
23
24
  readonly "print:beforePrintType": "beforePrintTypeHook";
@@ -1 +1 @@
1
- {"version":3,"file":"event-map.d.ts","sourceRoot":"","sources":["../src/event-map.ts"],"names":[],"mappings":"AAgBA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;CAoBrB,CAAC"}
1
+ {"version":3,"file":"event-map.d.ts","sourceRoot":"","sources":["../src/event-map.ts"],"names":[],"mappings":"AAiBA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;kCACD,sBAAsB;iCACvB,qBAAqB;iCACrB,qBAAqB;gCACtB,oBAAoB;6CACP,2BAA2B;4CAC5B,0BAA0B;4CAC1B,0BAA0B;2CAC3B,yBAAyB;gDACpB,8BAA8B;+CAC/B,6BAA6B;mDAEpE,iCAAiC;kDAEjC,gCAAgC;wCACA,sBAAsB;sCACnB,qBAAqB;qCACtB,oBAAoB;sCACnB,qBAAqB;qCACtB,oBAAoB;4CACZ,2BAA2B;CAC/D,CAAC"}
package/dist/event-map.js CHANGED
@@ -15,6 +15,7 @@ const render_root_types_events_1 = require("./events/render-root-types-events");
15
15
  const render_homepage_events_1 = require("./events/render-homepage-events");
16
16
  const render_type_entities_events_1 = require("./events/render-type-entities-events");
17
17
  const generate_index_metafile_events_1 = require("./events/generate-index-metafile-events");
18
+ const render_files_events_1 = require("./events/render-files-events");
18
19
  const print_type_events_1 = require("./events/print-type-events");
19
20
  /**
20
21
  * Event callback mapping configuration.
@@ -36,6 +37,7 @@ exports.EVENT_CALLBACK_MAP = {
36
37
  [render_type_entities_events_1.RenderTypeEntitiesEvents.AFTER_RENDER]: "afterRenderTypeEntitiesHook",
37
38
  [generate_index_metafile_events_1.GenerateIndexMetafileEvents.BEFORE_GENERATE]: "beforeGenerateIndexMetafileHook",
38
39
  [generate_index_metafile_events_1.GenerateIndexMetafileEvents.AFTER_GENERATE]: "afterGenerateIndexMetafileHook",
40
+ [render_files_events_1.RenderFilesEvents.AFTER_RENDER]: "afterRenderFilesHook",
39
41
  [print_type_events_1.PrintTypeEvents.BEFORE_PRINT_CODE]: "beforePrintCodeHook",
40
42
  [print_type_events_1.PrintTypeEvents.AFTER_PRINT_CODE]: "afterPrintCodeHook",
41
43
  [print_type_events_1.PrintTypeEvents.BEFORE_PRINT_TYPE]: "beforePrintTypeHook",
@@ -1 +1 @@
1
- {"version":3,"file":"diff-events.d.ts","sourceRoot":"","sources":["../../src/events/diff-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB,iDAAiD;;IAEjD,gDAAgD;;CAExC,CAAC"}
1
+ {"version":3,"file":"diff-events.d.ts","sourceRoot":"","sources":["../../src/events/diff-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB,iDAAiD;aACjD,YAAY,EAAE,kBAAkB;IAChC,gDAAgD;aAChD,WAAW,EAAE,iBAAiB;CACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generate-index-metafile-events.d.ts","sourceRoot":"","sources":["../../src/events/generate-index-metafile-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B;IACtC,+CAA+C;;IAE/C,8CAA8C;;CAEtC,CAAC"}
1
+ {"version":3,"file":"generate-index-metafile-events.d.ts","sourceRoot":"","sources":["../../src/events/generate-index-metafile-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B;IACtC,+CAA+C;aAC/C,eAAe,EAAE,oCAAoC;IACrD,8CAA8C;aAC9C,cAAc,EAAE,mCAAmC;CAC3C,CAAC"}
@@ -7,6 +7,7 @@ export { SchemaEvents } from "./schema-events";
7
7
  export { DiffEvents } from "./diff-events";
8
8
  export { RenderRootTypesEvents } from "./render-root-types-events";
9
9
  export { RenderHomepageEvents } from "./render-homepage-events";
10
+ export { RenderFilesEvents } from "./render-files-events";
10
11
  export { RenderTypeEntitiesEvents } from "./render-type-entities-events";
11
12
  export { GenerateIndexMetafileEvents } from "./generate-index-metafile-events";
12
13
  export { PrintTypeEvents } from "./print-type-events";
@@ -14,7 +15,7 @@ export { SchemaEvent } from "./schema-load";
14
15
  export { DiffCheckEvent } from "./diff-check";
15
16
  export { RenderRootTypesEvent } from "./render-root-types";
16
17
  export { RenderHomepageEvent } from "./render-homepage";
18
+ export { RenderFilesEvent } from "./render-files";
17
19
  export { RenderTypeEntitiesEvent } from "./render-type-entities";
18
20
  export { GenerateIndexMetafileEvent } from "./generate-index-metafile";
19
- export type { PrintCodeEventData, PrintTypeEventData, ComposePageTypeEventData, PageSection, PageSections, } from "@graphql-markdown/types";
20
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,WAAW,EACX,YAAY,GACb,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAG/E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC"}
@@ -5,32 +5,38 @@
5
5
  * @packageDocumentation
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.GenerateIndexMetafileEvent = exports.RenderTypeEntitiesEvent = exports.RenderHomepageEvent = exports.RenderRootTypesEvent = exports.DiffCheckEvent = exports.SchemaEvent = exports.PrintTypeEvents = exports.GenerateIndexMetafileEvents = exports.RenderTypeEntitiesEvents = exports.RenderHomepageEvents = exports.RenderRootTypesEvents = exports.DiffEvents = exports.SchemaEvents = void 0;
8
+ exports.GenerateIndexMetafileEvent = exports.RenderTypeEntitiesEvent = exports.RenderFilesEvent = exports.RenderHomepageEvent = exports.RenderRootTypesEvent = exports.DiffCheckEvent = exports.SchemaEvent = exports.PrintTypeEvents = exports.GenerateIndexMetafileEvents = exports.RenderTypeEntitiesEvents = exports.RenderFilesEvents = exports.RenderHomepageEvents = exports.RenderRootTypesEvents = exports.DiffEvents = exports.SchemaEvents = void 0;
9
9
  // Event constants
10
- const schema_events_1 = require("./schema-events");
10
+ var schema_events_1 = require("./schema-events");
11
11
  Object.defineProperty(exports, "SchemaEvents", { enumerable: true, get: function () { return schema_events_1.SchemaEvents; } });
12
- const diff_events_1 = require("./diff-events");
12
+ var diff_events_1 = require("./diff-events");
13
13
  Object.defineProperty(exports, "DiffEvents", { enumerable: true, get: function () { return diff_events_1.DiffEvents; } });
14
- const render_root_types_events_1 = require("./render-root-types-events");
14
+ var render_root_types_events_1 = require("./render-root-types-events");
15
15
  Object.defineProperty(exports, "RenderRootTypesEvents", { enumerable: true, get: function () { return render_root_types_events_1.RenderRootTypesEvents; } });
16
- const render_homepage_events_1 = require("./render-homepage-events");
16
+ var render_homepage_events_1 = require("./render-homepage-events");
17
17
  Object.defineProperty(exports, "RenderHomepageEvents", { enumerable: true, get: function () { return render_homepage_events_1.RenderHomepageEvents; } });
18
- const render_type_entities_events_1 = require("./render-type-entities-events");
18
+ var render_files_events_1 = require("./render-files-events");
19
+ Object.defineProperty(exports, "RenderFilesEvents", { enumerable: true, get: function () { return render_files_events_1.RenderFilesEvents; } });
20
+ var render_type_entities_events_1 = require("./render-type-entities-events");
19
21
  Object.defineProperty(exports, "RenderTypeEntitiesEvents", { enumerable: true, get: function () { return render_type_entities_events_1.RenderTypeEntitiesEvents; } });
20
- const generate_index_metafile_events_1 = require("./generate-index-metafile-events");
22
+ var generate_index_metafile_events_1 = require("./generate-index-metafile-events");
21
23
  Object.defineProperty(exports, "GenerateIndexMetafileEvents", { enumerable: true, get: function () { return generate_index_metafile_events_1.GenerateIndexMetafileEvents; } });
22
- const print_type_events_1 = require("./print-type-events");
24
+ // Re-export used only by unit tests via the events barrel.
25
+ // fallow-ignore-next-line unused-export
26
+ var print_type_events_1 = require("./print-type-events");
23
27
  Object.defineProperty(exports, "PrintTypeEvents", { enumerable: true, get: function () { return print_type_events_1.PrintTypeEvents; } });
24
28
  // Event classes
25
- const schema_load_1 = require("./schema-load");
29
+ var schema_load_1 = require("./schema-load");
26
30
  Object.defineProperty(exports, "SchemaEvent", { enumerable: true, get: function () { return schema_load_1.SchemaEvent; } });
27
- const diff_check_1 = require("./diff-check");
31
+ var diff_check_1 = require("./diff-check");
28
32
  Object.defineProperty(exports, "DiffCheckEvent", { enumerable: true, get: function () { return diff_check_1.DiffCheckEvent; } });
29
- const render_root_types_1 = require("./render-root-types");
33
+ var render_root_types_1 = require("./render-root-types");
30
34
  Object.defineProperty(exports, "RenderRootTypesEvent", { enumerable: true, get: function () { return render_root_types_1.RenderRootTypesEvent; } });
31
- const render_homepage_1 = require("./render-homepage");
35
+ var render_homepage_1 = require("./render-homepage");
32
36
  Object.defineProperty(exports, "RenderHomepageEvent", { enumerable: true, get: function () { return render_homepage_1.RenderHomepageEvent; } });
33
- const render_type_entities_1 = require("./render-type-entities");
37
+ var render_files_1 = require("./render-files");
38
+ Object.defineProperty(exports, "RenderFilesEvent", { enumerable: true, get: function () { return render_files_1.RenderFilesEvent; } });
39
+ var render_type_entities_1 = require("./render-type-entities");
34
40
  Object.defineProperty(exports, "RenderTypeEntitiesEvent", { enumerable: true, get: function () { return render_type_entities_1.RenderTypeEntitiesEvent; } });
35
- const generate_index_metafile_1 = require("./generate-index-metafile");
41
+ var generate_index_metafile_1 = require("./generate-index-metafile");
36
42
  Object.defineProperty(exports, "GenerateIndexMetafileEvent", { enumerable: true, get: function () { return generate_index_metafile_1.GenerateIndexMetafileEvent; } });
@@ -1 +1 @@
1
- {"version":3,"file":"print-type-events.d.ts","sourceRoot":"","sources":["../../src/events/print-type-events.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe;IAC1B,0DAA0D;;IAE1D,kFAAkF;;IAElF,4DAA4D;;IAE5D,oFAAoF;;IAEpF,0EAA0E;;CAElE,CAAC"}
1
+ {"version":3,"file":"print-type-events.d.ts","sourceRoot":"","sources":["../../src/events/print-type-events.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe;IAC1B,0DAA0D;aAC1D,iBAAiB,EAAE,uBAAuB;IAC1C,kFAAkF;aAClF,gBAAgB,EAAE,sBAAsB;IACxC,4DAA4D;aAC5D,iBAAiB,EAAE,uBAAuB;IAC1C,oFAAoF;aACpF,gBAAgB,EAAE,sBAAsB;IACxC,0EAA0E;aAC1E,wBAAwB,EAAE,6BAA6B;CAC/C,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Render files event constants.
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ /**
7
+ * Event names fired once after all output files (entities + homepage) are written.
8
+ */
9
+ export declare const RenderFilesEvents: {
10
+ /** Emitted after all files have been written */
11
+ readonly AFTER_RENDER: "render:afterRenderFiles";
12
+ };
13
+ //# sourceMappingURL=render-files-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render-files-events.d.ts","sourceRoot":"","sources":["../../src/events/render-files-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;IAC5B,gDAAgD;aAChD,YAAY,EAAE,yBAAyB;CAC/B,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /**
3
+ * Render files event constants.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.RenderFilesEvents = void 0;
9
+ /**
10
+ * Event names fired once after all output files (entities + homepage) are written.
11
+ */
12
+ exports.RenderFilesEvents = {
13
+ /** Emitted after all files have been written */
14
+ AFTER_RENDER: "render:afterRenderFiles",
15
+ };