@graphql-markdown/core 1.25.0 → 1.26.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 CHANGED
@@ -1,6 +1,7 @@
1
1
  # @graphql-markdown/core
2
2
 
3
3
  [![Latest Version](https://img.shields.io/npm/v/@graphql-markdown/core?style=flat)](https://www.npmjs.com/package/@graphql-markdown/core)
4
+ [![JSR](https://jsr.io/badges/@graphql-markdown/core)](https://jsr.io/@graphql-markdown/core)
4
5
  [![GitHub License](https://img.shields.io/github/license/graphql-markdown/graphql-markdown?style=flat)](https://raw.githubusercontent.com/graphql-markdown/graphql-markdown/main/LICENSE)
5
6
  [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=graphql-markdown_core&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=graphql-markdown_core)
6
7
  [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=graphql-markdown_core&metric=coverage)](https://sonarcloud.io/summary/new_code?id=graphql-markdown_core)
@@ -35,17 +36,17 @@ await generateDocFromSchema(config);
35
36
  ```ts
36
37
  import { getEvents, SchemaEvents } from "@graphql-markdown/core";
37
38
 
38
- getEvents().on(SchemaEvents.SCHEMA_LOAD, (event) => {
39
+ getEvents().on(SchemaEvents.AFTER_LOAD, (event) => {
39
40
  console.log("Schema loaded", event);
40
41
  });
41
42
  ```
42
43
 
43
- See the [event handlers documentation](https://graphql-markdown.dev/docs/advanced/lifecycle-events) for the full list of lifecycle events and their payloads.
44
+ See the [hooks recipes](https://graphql-markdown.dev/docs/advanced/hook-recipes) for the full list of lifecycle events and their payloads.
44
45
 
45
46
  ## Documentation
46
47
 
47
48
  - [Configuration Options](https://graphql-markdown.dev/docs/settings)
48
- - [Lifecycle Events](https://graphql-markdown.dev/docs/advanced/lifecycle-events)
49
+ - [Hooks Recipes](https://graphql-markdown.dev/docs/advanced/hook-recipes)
49
50
 
50
51
  ## License
51
52
 
package/dist/config.d.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  * @packageDocumentation
17
17
  */
18
18
  import type { CliOptions, ConfigDocOptions, ConfigOptions, ConfigPrintTypeOptions, CustomDirective, Decorators, DirectiveName, GroupByDirectiveOptions, Maybe, Options, TypeDiffMethod, TypeHierarchyObjectType, TypeHierarchyType, TypeHierarchyValueType } from "@graphql-markdown/types";
19
- import type { BuildConfigContext } from "./telemetry";
19
+ import type { BuildConfigContext } from "./telemetry.ts";
20
20
  /**
21
21
  * Type hierarchy options for organizing schema documentation.
22
22
  *
@@ -80,16 +80,17 @@ export declare const DOCS_URL: "https://graphql-markdown.dev/docs";
80
80
  */
81
81
  export declare const PACKAGE_NAME: "@graphql-markdown/docusaurus";
82
82
  /**
83
- * Location of the default homepage template.
83
+ * Sentinel selecting the built-in (inlined) homepage template.
84
+ * It is never a filesystem path and is never read from disk.
84
85
  * @public
85
86
  */
86
- export declare const ASSET_HOMEPAGE_LOCATION: string;
87
+ export declare const ASSET_HOMEPAGE_LOCATION: unique symbol;
87
88
  /**
88
89
  * Default hierarchy configuration using the API hierarchy type.
89
90
  * @public
90
91
  */
91
92
  export declare const DEFAULT_HIERARCHY: {
92
- api: {};
93
+ api: Record<string, never>;
93
94
  };
94
95
  /**
95
96
  * Default configuration options used when no user options are provided.
@@ -98,7 +99,8 @@ export declare const DEFAULT_HIERARCHY: {
98
99
  * @public
99
100
  * @see {@link Options} for the complete configuration interface
100
101
  */
101
- export declare const DEFAULT_OPTIONS: Readonly<Pick<ConfigOptions, "customDirective" | "decorators" | "groupByDirective" | "loaders" | "outputAdapter"> & Required<Omit<ConfigOptions, "customDirective" | "decorators" | "formatter" | "groupByDirective" | "loaders" | "mdxParser" | "outputAdapter" | "printTypeOptions" | "telemetry">>> & {
102
+ export declare const DEFAULT_OPTIONS: Readonly<Pick<ConfigOptions, "customDirective" | "decorators" | "groupByDirective" | "loaders" | "outputAdapter"> & Required<Omit<ConfigOptions, "customDirective" | "decorators" | "formatter" | "groupByDirective" | "homepage" | "loaders" | "mdxParser" | "outputAdapter" | "printTypeOptions" | "telemetry">>> & {
103
+ homepage: typeof ASSET_HOMEPAGE_LOCATION;
102
104
  printTypeOptions: Required<Omit<ConfigPrintTypeOptions, "exampleSection" | "hierarchy">> & {
103
105
  exampleSection: ConfigPrintTypeOptions["exampleSection"];
104
106
  hierarchy: Required<Pick<TypeHierarchyObjectType, TypeHierarchy.API>>;
@@ -321,6 +323,6 @@ export declare const getDecoratorsOption: (decorators: Maybe<Decorators>) => May
321
323
  * ```
322
324
  */
323
325
  export declare const parseGroupByOption: (groupOptions: unknown) => Maybe<GroupByDirectiveOptions>;
324
- export declare const parseHomepageOption: (cliHomepage: Maybe<string | false>, configHomepage: Maybe<string | false>) => Maybe<string>;
326
+ export declare const parseHomepageOption: (cliHomepage: Maybe<string | false>, configHomepage: Maybe<string | false>) => Maybe<string | typeof ASSET_HOMEPAGE_LOCATION>;
325
327
  export declare const buildConfig: (configFileOpts: Maybe<ConfigOptions>, cliOpts?: Maybe<CliOptions>, id?: Maybe<string>, context?: BuildConfigContext) => Promise<Options>;
326
328
  //# sourceMappingURL=config.d.ts.map
@@ -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,EAGf,UAAU,EACV,aAAa,EACb,uBAAuB,EACvB,KAAK,EACL,OAAO,EAGP,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AAOjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAKtD;;;;;;;;;;;;GAYG;AACH,oBAAY,aAAa;IACvB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED;;;;;;;;;;;GAWG;AACH,oBAAY,UAAU;IACpB,IAAI,S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tC,QAAQ,CAAC,gBAAgB,CAyB3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,eAAO,MAAM,sBAAsB,eACrB,KAAK,CAAC,sBAAsB,CAAC,iBAC1B,KAAK,CAAC,iBAAiB,CAAC,KACtC,KAAK,CAAC,uBAAuB,CAuC/B,CAAC;AAGF,eAAO,MAAM,8BAA8B,aAC/B,KAAK,CAAC,UAAU,CAAC,kBACX,KAAK,CAAC,aAAa,CAAC,KACnC,KAAK,CAAC,MAAM,CAed,CAAC;AAGF,eAAO,MAAM,+BAA+B,cAC/B,KAAK,CAAC,UAAU,CAAC,mBACX,KAAK,CAAC,sBAAsB,CAAC,KAC7C,MAAM,CAAC,MAAM,EAAE,KAAK,CAEtB,CAAC;AAwIF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,mBAAmB,eAClB,KAAK,CAAC,UAAU,CAAC,KAC5B,KAAK,CAAC,UAAU,CAqBlB,CAAC;AAuCF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,eAAO,MAAM,kBAAkB,iBACf,OAAO,KACpB,KAAK,CAAC,uBAAuB,CAgB/B,CAAC;AAGF,eAAO,MAAM,mBAAmB,gBACjB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,kBAClB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,KACpC,KAAK,CAAC,MAAM,GAAG,OAAO,uBAAuB,CAc/C,CAAC;AAoDF,eAAO,MAAM,WAAW,mBACN,KAAK,CAAC,aAAa,CAAC,YAC1B,KAAK,CAAC,UAAU,CAAC,OACvB,KAAK,CAAC,MAAM,CAAC,YACP,kBAAkB,KAC3B,OAAO,CAAC,OAAO,CA+GjB,CAAC"}
package/dist/config.js CHANGED
@@ -23,11 +23,11 @@ const node_os_1 = require("node:os");
23
23
  const deepmerge_1 = require("@fastify/deepmerge");
24
24
  const logger_1 = require("@graphql-markdown/logger");
25
25
  const printer_legacy_1 = require("@graphql-markdown/printer-legacy");
26
- const graphql_config_1 = require("./graphql-config");
27
- const telemetry_1 = require("./telemetry");
28
- const patterns_1 = require("./const/patterns");
29
- const validation_1 = require("./directives/validation");
30
- const builder_1 = require("./options/builder");
26
+ const graphql_config_ts_1 = require("./graphql-config.js");
27
+ const telemetry_ts_1 = require("./telemetry.js");
28
+ const patterns_ts_1 = require("./const/patterns.js");
29
+ const validation_ts_1 = require("./directives/validation.js");
30
+ const builder_ts_1 = require("./options/builder.js");
31
31
  /**
32
32
  * Type hierarchy options for organizing schema documentation.
33
33
  *
@@ -94,15 +94,18 @@ exports.DOCS_URL = "https://graphql-markdown.dev/docs";
94
94
  */
95
95
  exports.PACKAGE_NAME = "@graphql-markdown/docusaurus";
96
96
  /**
97
- * Location of the default homepage template.
97
+ * Sentinel selecting the built-in (inlined) homepage template.
98
+ * It is never a filesystem path and is never read from disk.
98
99
  * @public
99
100
  */
100
- exports.ASSET_HOMEPAGE_LOCATION = (0, node_path_1.join)(__dirname, "..", "assets", "generated.md");
101
+ exports.ASSET_HOMEPAGE_LOCATION = Symbol("graphql-markdown.homepage.builtin");
101
102
  /**
102
103
  * Default hierarchy configuration using the API hierarchy type.
103
104
  * @public
104
105
  */
105
- exports.DEFAULT_HIERARCHY = { [TypeHierarchy.API]: {} };
106
+ exports.DEFAULT_HIERARCHY = {
107
+ [TypeHierarchy.API]: {},
108
+ };
106
109
  /** Memoised OS temp path, resolved on the first read of `DEFAULT_OPTIONS.tmpDir`. */
107
110
  let defaultTmpDir;
108
111
  /**
@@ -168,10 +171,10 @@ exports.DEFAULT_OPTIONS = {
168
171
  */
169
172
  // Used only by unit tests for direct whitebox coverage; not part of the production public API.
170
173
  const getDocDirective = (name) => {
171
- if (typeof name !== "string" || !patterns_1.PATTERNS.DIRECTIVE_NAME.test(name)) {
174
+ if (typeof name !== "string" || !patterns_ts_1.PATTERNS.DIRECTIVE_NAME.test(name)) {
172
175
  throw new Error(`Invalid "${name}"`);
173
176
  }
174
- const { groups: { directive }, } = patterns_1.PATTERNS.DIRECTIVE_NAME.exec(name);
177
+ const { groups: { directive }, } = patterns_ts_1.PATTERNS.DIRECTIVE_NAME.exec(name);
175
178
  return directive;
176
179
  };
177
180
  exports.getDocDirective = getDocDirective;
@@ -313,8 +316,8 @@ const getCustomDirectives = (customDirectiveOptions, skipDocDirective) => {
313
316
  skipDocDirective.includes(name)) {
314
317
  delete customDirectiveOptions[name];
315
318
  }
316
- else if ((0, validation_1.isInvalidFunctionProperty)(option, "descriptor") ||
317
- (0, validation_1.isInvalidFunctionProperty)(option, "tag") ||
319
+ else if ((0, validation_ts_1.isInvalidFunctionProperty)(option, "descriptor") ||
320
+ (0, validation_ts_1.isInvalidFunctionProperty)(option, "tag") ||
318
321
  !("tag" in option || "descriptor" in option)) {
319
322
  throw new Error(`Wrong format for plugin custom directive "${name}".\nPlease refer to ${exports.DOCS_URL}/advanced/custom-directive`);
320
323
  }
@@ -682,14 +685,14 @@ const parseGroupByOption = (groupOptions) => {
682
685
  if (typeof groupOptions !== "string") {
683
686
  return undefined;
684
687
  }
685
- const parsedOptions = patterns_1.PATTERNS.GROUP_BY_DIRECTIVE.exec(groupOptions);
688
+ const parsedOptions = patterns_ts_1.PATTERNS.GROUP_BY_DIRECTIVE.exec(groupOptions);
686
689
  if (parsedOptions === null) {
687
690
  throw new Error(`Invalid "${groupOptions}"`);
688
691
  }
689
692
  return {
690
693
  directive: parsedOptions[1],
691
694
  field: parsedOptions[2],
692
- fallback: parsedOptions[3] || patterns_1.CONFIG_CONSTANTS.DEFAULT_GROUP,
695
+ fallback: parsedOptions[3] || patterns_ts_1.CONFIG_CONSTANTS.DEFAULT_GROUP,
693
696
  };
694
697
  };
695
698
  exports.parseGroupByOption = parseGroupByOption;
@@ -704,12 +707,12 @@ const parseHomepageOption = (cliHomepage, configHomepage) => {
704
707
  if (typeof configHomepage === "string") {
705
708
  return configHomepage;
706
709
  }
707
- return exports.DEFAULT_OPTIONS.homepage;
710
+ return exports.ASSET_HOMEPAGE_LOCATION;
708
711
  };
709
712
  exports.parseHomepageOption = parseHomepageOption;
710
713
  const buildConfig = async (configFileOpts, cliOpts, id = "default", context) => {
711
714
  cliOpts ??= {};
712
- const graphqlConfig = await (0, graphql_config_1.loadConfiguration)(id);
715
+ const graphqlConfig = await (0, graphql_config_ts_1.loadConfiguration)(id);
713
716
  (0, exports.parseDeprecatedPrintTypeOptions)(cliOpts, {
714
717
  ...graphqlConfig?.printTypeOptions,
715
718
  ...configFileOpts?.printTypeOptions,
@@ -728,7 +731,7 @@ const buildConfig = async (configFileOpts, cliOpts, id = "default", context) =>
728
731
  // Build options using consistent precedence: CLI > Config > Default
729
732
  // The precedence is enforced by the OptionBuilder's setIfProvided method
730
733
  // which only updates values if the source has higher precedence than the current source
731
- const { baseURL, force, linkRoot, prettify, rootPath, schemaLocation, tmpDir, } = new builder_1.OptionBuilder()
734
+ const { baseURL, force, linkRoot, prettify, rootPath, schemaLocation, tmpDir, } = new builder_ts_1.OptionBuilder()
732
735
  .addDefault(exports.DEFAULT_OPTIONS.baseURL, "baseURL")
733
736
  .addFromConfig(config.baseURL, "baseURL")
734
737
  .addFromCli(cliOpts.base, "baseURL")
@@ -760,7 +763,7 @@ const buildConfig = async (configFileOpts, cliOpts, id = "default", context) =>
760
763
  trigger: context?.trigger,
761
764
  };
762
765
  // fire and forget: async, never throws nor rejects (see reportTelemetry)
763
- void (0, telemetry_1.reportTelemetry)(telemetryReport);
766
+ void (0, telemetry_ts_1.reportTelemetry)(telemetryReport);
764
767
  return {
765
768
  baseURL,
766
769
  customDirective: (0, exports.getCustomDirectives)(config.customDirective, skipDocDirective),
@@ -784,7 +787,7 @@ const buildConfig = async (configFileOpts, cliOpts, id = "default", context) =>
784
787
  printTypeOptions,
785
788
  schemaLocation,
786
789
  skipDocDirective,
787
- telemetryContext: (0, telemetry_1.resolveTelemetryContext)(telemetryReport),
790
+ telemetryContext: (0, telemetry_ts_1.resolveTelemetryContext)(telemetryReport),
788
791
  tmpDir,
789
792
  };
790
793
  };
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Output file name of the generated homepage when using the built-in template.
3
+ *
4
+ * @internal
5
+ */
6
+ export declare const DEFAULT_HOMEPAGE_FILENAME = "generated.md";
1
7
  /**
2
8
  * The built-in homepage template, inlined.
3
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"homepage.d.ts","sourceRoot":"","sources":["../../src/const/homepage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,uVAYrC,CAAC"}
1
+ {"version":3,"file":"homepage.d.ts","sourceRoot":"","sources":["../../src/const/homepage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,iBAAiB,CAAC;AAExD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,uVAYrC,CAAC"}
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_HOMEPAGE_TEMPLATE = void 0;
3
+ exports.DEFAULT_HOMEPAGE_TEMPLATE = exports.DEFAULT_HOMEPAGE_FILENAME = void 0;
4
+ /**
5
+ * Output file name of the generated homepage when using the built-in template.
6
+ *
7
+ * @internal
8
+ */
9
+ exports.DEFAULT_HOMEPAGE_FILENAME = "generated.md";
4
10
  /**
5
11
  * The built-in homepage template, inlined.
6
12
  *
@@ -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;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
+ {"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,EAA4B,MAAM;IAEhD;;;;;;;;;;OAUG;aACH,kBAAkB,EAAsC,MAAM;IAE9D;;;;;;;;;OASG;aACH,aAAa,EAAsB,MAAM;IAEzC;;;;;;;;;OASG;aACH,eAAe,EAA4B,MAAM;IAEjD;;;;;;;;;OASG;aACH,uBAAuB,EAAqB,MAAM;IAElD;;;;;;;;;OASG;aACH,uBAAuB,EAAqB,MAAM;IAElD;;;;;;;;;;;;;OAaG;aACH,cAAc,EAAe,MAAM;CAC3B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;;OAGG;aACH,aAAa,EAAE,eAAe;CACtB,CAAC"}
package/dist/diff.d.ts CHANGED
@@ -23,7 +23,7 @@ import type { DiffMethodName, GraphQLSchema, Maybe } from "@graphql-markdown/typ
23
23
  *
24
24
  * @example
25
25
  * ```typescript
26
- * import { hasChanges } from "./diff";
26
+ * import { hasChanges } from "./diff.ts";
27
27
  * import { buildSchema } from "graphql";
28
28
  *
29
29
  * const schema = buildSchema(`
@@ -38,7 +38,7 @@ import type { DiffMethodName, GraphQLSchema, Maybe } from "@graphql-markdown/typ
38
38
  *
39
39
  * @example Using with a custom diff module
40
40
  * ```typescript
41
- * import { hasChanges } from "./diff";
41
+ * import { hasChanges } from "./diff.ts";
42
42
  *
43
43
  * const schema = getMySchema();
44
44
  * const result = await hasChanges(
@@ -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,WACb,aAAa,UACb,MAAM,cACF,KAAK,CAAC,cAAc,CAAC,eACrB,KAAK,CAAC,MAAM,CAAC,KACxB,OAAO,CAAC,OAAO,CAmBjB,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;AAOjC;;;;;;;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,CA4BjB,CAAC"}
package/dist/diff.js CHANGED
@@ -1,7 +1,17 @@
1
1
  "use strict";
2
+ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
3
+ if (typeof path === "string" && /^\.\.?\//.test(path)) {
4
+ return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
5
+ return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
6
+ });
7
+ }
8
+ return path;
9
+ };
2
10
  Object.defineProperty(exports, "__esModule", { value: true });
3
11
  exports.hasChanges = void 0;
4
12
  const logger_1 = require("@graphql-markdown/logger");
13
+ const utils_1 = require("@graphql-markdown/utils");
14
+ const optional_dependencies_ts_1 = require("./optional-dependencies.js");
5
15
  /**
6
16
  * Module for detecting changes in GraphQL schemas.
7
17
  * This module provides functionality to compare GraphQL schemas and detect changes.
@@ -21,7 +31,7 @@ const logger_1 = require("@graphql-markdown/logger");
21
31
  *
22
32
  * @example
23
33
  * ```typescript
24
- * import { hasChanges } from "./diff";
34
+ * import { hasChanges } from "./diff.ts";
25
35
  * import { buildSchema } from "graphql";
26
36
  *
27
37
  * const schema = buildSchema(`
@@ -36,7 +46,7 @@ const logger_1 = require("@graphql-markdown/logger");
36
46
  *
37
47
  * @example Using with a custom diff module
38
48
  * ```typescript
39
- * import { hasChanges } from "./diff";
49
+ * import { hasChanges } from "./diff.ts";
40
50
  *
41
51
  * const schema = getMySchema();
42
52
  * const result = await hasChanges(
@@ -58,7 +68,13 @@ const hasChanges = async (schema, tmpDir, diffMethod, diffModule = "@graphql-mar
58
68
  return true;
59
69
  }
60
70
  try {
61
- const { checkSchemaChanges, } = await import(diffModule);
71
+ // Specifier is only known at runtime (optional, user-configurable diff module).
72
+ // Resolved into a variable first: tsgo's CJS emit of `import(fn(x))` with
73
+ // rewriteRelativeImportExtensions leaves `fn` unqualified (ReferenceError).
74
+ const specifier = (0, utils_1.runtimeModuleSpecifier)(diffModule, diffModule === "@graphql-markdown/diff"
75
+ ? optional_dependencies_ts_1.OPTIONAL_DEPENDENCY_RANGES[diffModule]
76
+ : undefined);
77
+ const { checkSchemaChanges, } = await import(__rewriteRelativeImportExtension(specifier));
62
78
  return await checkSchemaChanges(schema, tmpDir, diffMethod);
63
79
  }
64
80
  catch {
@@ -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;;;OA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,SAAS,QAAO,uBAG5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,QAAO,IAK9B,CAAC"}
@@ -11,8 +11,8 @@ exports.registerMDXEventHandlers = void 0;
11
11
  * @packageDocumentation
12
12
  */
13
13
  const logger_1 = require("@graphql-markdown/logger");
14
- const event_emitter_1 = require("./event-emitter");
15
- const event_map_1 = require("./event-map");
14
+ const event_emitter_ts_1 = require("./event-emitter.js");
15
+ const event_map_ts_1 = require("./event-map.js");
16
16
  /**
17
17
  * Registers MDX module lifecycle event handlers with the event emitter.
18
18
  *
@@ -37,8 +37,8 @@ const registerMDXEventHandlers = (mdxModule) => {
37
37
  if (!mdxModule || typeof mdxModule !== "object") {
38
38
  return;
39
39
  }
40
- (0, event_emitter_1.resetEvents)(); // reset event to avoid duplicate registrations
41
- const events = (0, event_emitter_1.getEvents)();
40
+ (0, event_emitter_ts_1.resetEvents)(); // reset event to avoid duplicate registrations
41
+ const events = (0, event_emitter_ts_1.getEvents)();
42
42
  const registeredHandlers = new Set();
43
43
  // Get the actual module object, handling ESM default export wrapping
44
44
  // When using dynamic import() on a CommonJS module, exports may be under .default
@@ -47,7 +47,7 @@ const registerMDXEventHandlers = (mdxModule) => {
47
47
  ? module.default
48
48
  : module;
49
49
  // Iterate through event callback mappings (lifecycle hooks only)
50
- for (const [eventName, callbackName] of Object.entries(event_map_1.EVENT_CALLBACK_MAP)) {
50
+ for (const [eventName, callbackName] of Object.entries(event_map_ts_1.EVENT_CALLBACK_MAP)) {
51
51
  // Check if mdxModule has this callback function
52
52
  if (callbackName in effectiveModule &&
53
53
  typeof effectiveModule[callbackName] === "function") {
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Event callback mapping configuration.
3
+ *
4
+ * This module defines the mappings between event names and their corresponding
5
+ * callback names in MDX modules. Kept separate to avoid circular dependencies.
6
+ *
7
+ * @packageDocumentation
8
+ */
1
9
  /**
2
10
  * Event callback mapping configuration.
3
11
  * Maps event names to their corresponding callback names in mdxModule.
@@ -1 +1 @@
1
- {"version":3,"file":"event-map.d.ts","sourceRoot":"","sources":["../src/event-map.ts"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;kCACI,sBAAsB;kCAC3B,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"}
1
+ {"version":3,"file":"event-map.d.ts","sourceRoot":"","sources":["../src/event-map.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;aAC7B,mBAAmB,EAAE,sBAAsB;aAC3C,mBAAmB,EAAE,sBAAsB;aAC3C,kBAAkB,EAAE,qBAAqB;aACzC,kBAAkB,EAAE,qBAAqB;aACzC,iBAAiB,EAAE,oBAAoB;aACvC,8BAA8B,EAAE,2BAA2B;aAC3D,6BAA6B,EAAE,0BAA0B;aACzD,6BAA6B,EAAE,0BAA0B;aACzD,4BAA4B,EAAE,yBAAyB;aACvD,iCAAiC,EAAE,8BAA8B;aACjE,gCAAgC,EAAE,6BAA6B;aAC/D,oCAAoC,EAAE,iCAAiC;aACvE,mCAAmC,EAAE,gCAAgC;aACrE,yBAAyB,EAAE,sBAAsB;aACjD,uBAAuB,EAAE,qBAAqB;aAC9C,sBAAsB,EAAE,oBAAoB;aAC5C,uBAAuB,EAAE,qBAAqB;aAC9C,sBAAsB,EAAE,oBAAoB;aAC5C,6BAA6B,EAAE,2BAA2B;CAClD,CAAC"}
package/dist/event-map.js CHANGED
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EVENT_CALLBACK_MAP = void 0;
4
2
  /**
5
3
  * Event callback mapping configuration.
6
4
  *
@@ -9,15 +7,8 @@ exports.EVENT_CALLBACK_MAP = void 0;
9
7
  *
10
8
  * @packageDocumentation
11
9
  */
12
- const config_build_events_1 = require("./events/config-build-events");
13
- const schema_events_1 = require("./events/schema-events");
14
- const diff_events_1 = require("./events/diff-events");
15
- const render_root_types_events_1 = require("./events/render-root-types-events");
16
- const render_homepage_events_1 = require("./events/render-homepage-events");
17
- const render_type_entities_events_1 = require("./events/render-type-entities-events");
18
- const generate_index_metafile_events_1 = require("./events/generate-index-metafile-events");
19
- const render_files_events_1 = require("./events/render-files-events");
20
- const print_type_events_1 = require("./events/print-type-events");
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.EVENT_CALLBACK_MAP = void 0;
21
12
  /**
22
13
  * Event callback mapping configuration.
23
14
  * Maps event names to their corresponding callback names in mdxModule.
@@ -26,23 +17,23 @@ const print_type_events_1 = require("./events/print-type-events");
26
17
  * They are pure transformations handled via the Formatter interface, not events.
27
18
  */
28
19
  exports.EVENT_CALLBACK_MAP = {
29
- [config_build_events_1.ConfigBuildEvents.AFTER_BUILD]: "afterConfigBuildHook",
30
- [schema_events_1.SchemaEvents.BEFORE_LOAD]: "beforeLoadSchemaHook",
31
- [schema_events_1.SchemaEvents.AFTER_LOAD]: "afterLoadSchemaHook",
32
- [diff_events_1.DiffEvents.BEFORE_CHECK]: "beforeCheckDiffHook",
33
- [diff_events_1.DiffEvents.AFTER_CHECK]: "afterCheckDiffHook",
34
- [render_root_types_events_1.RenderRootTypesEvents.BEFORE_RENDER]: "beforeRenderRootTypesHook",
35
- [render_root_types_events_1.RenderRootTypesEvents.AFTER_RENDER]: "afterRenderRootTypesHook",
36
- [render_homepage_events_1.RenderHomepageEvents.BEFORE_RENDER]: "beforeRenderHomepageHook",
37
- [render_homepage_events_1.RenderHomepageEvents.AFTER_RENDER]: "afterRenderHomepageHook",
38
- [render_type_entities_events_1.RenderTypeEntitiesEvents.BEFORE_RENDER]: "beforeRenderTypeEntitiesHook",
39
- [render_type_entities_events_1.RenderTypeEntitiesEvents.AFTER_RENDER]: "afterRenderTypeEntitiesHook",
40
- [generate_index_metafile_events_1.GenerateIndexMetafileEvents.BEFORE_GENERATE]: "beforeGenerateIndexMetafileHook",
41
- [generate_index_metafile_events_1.GenerateIndexMetafileEvents.AFTER_GENERATE]: "afterGenerateIndexMetafileHook",
42
- [render_files_events_1.RenderFilesEvents.AFTER_RENDER]: "afterRenderFilesHook",
43
- [print_type_events_1.PrintTypeEvents.BEFORE_PRINT_CODE]: "beforePrintCodeHook",
44
- [print_type_events_1.PrintTypeEvents.AFTER_PRINT_CODE]: "afterPrintCodeHook",
45
- [print_type_events_1.PrintTypeEvents.BEFORE_PRINT_TYPE]: "beforePrintTypeHook",
46
- [print_type_events_1.PrintTypeEvents.AFTER_PRINT_TYPE]: "afterPrintTypeHook",
47
- [print_type_events_1.PrintTypeEvents.BEFORE_COMPOSE_PAGE_TYPE]: "beforeComposePageTypeHook",
20
+ "config:afterBuild": "afterConfigBuildHook",
21
+ "schema:beforeLoad": "beforeLoadSchemaHook",
22
+ "schema:afterLoad": "afterLoadSchemaHook",
23
+ "diff:beforeCheck": "beforeCheckDiffHook",
24
+ "diff:afterCheck": "afterCheckDiffHook",
25
+ "render:beforeRenderRootTypes": "beforeRenderRootTypesHook",
26
+ "render:afterRenderRootTypes": "afterRenderRootTypesHook",
27
+ "render:beforeRenderHomepage": "beforeRenderHomepageHook",
28
+ "render:afterRenderHomepage": "afterRenderHomepageHook",
29
+ "render:beforeRenderTypeEntities": "beforeRenderTypeEntitiesHook",
30
+ "render:afterRenderTypeEntities": "afterRenderTypeEntitiesHook",
31
+ "render:beforeGenerateIndexMetafile": "beforeGenerateIndexMetafileHook",
32
+ "render:afterGenerateIndexMetafile": "afterGenerateIndexMetafileHook",
33
+ "render:afterRenderFiles": "afterRenderFilesHook",
34
+ "print:beforePrintCode": "beforePrintCodeHook",
35
+ "print:afterPrintCode": "afterPrintCodeHook",
36
+ "print:beforePrintType": "beforePrintTypeHook",
37
+ "print:afterPrintType": "afterPrintTypeHook",
38
+ "print:beforeComposePageType": "beforeComposePageTypeHook",
48
39
  };
@@ -3,21 +3,21 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- export { ConfigBuildEvents } from "./config-build-events";
7
- export { SchemaEvents } from "./schema-events";
8
- export { DiffEvents } from "./diff-events";
9
- export { RenderRootTypesEvents } from "./render-root-types-events";
10
- export { RenderHomepageEvents } from "./render-homepage-events";
11
- export { RenderFilesEvents } from "./render-files-events";
12
- export { RenderTypeEntitiesEvents } from "./render-type-entities-events";
13
- export { GenerateIndexMetafileEvents } from "./generate-index-metafile-events";
14
- export { PrintTypeEvents } from "./print-type-events";
15
- export { ConfigBuildEvent } from "./config-build";
16
- export { SchemaEvent } from "./schema-load";
17
- export { DiffCheckEvent } from "./diff-check";
18
- export { RenderRootTypesEvent } from "./render-root-types";
19
- export { RenderHomepageEvent } from "./render-homepage";
20
- export { RenderFilesEvent } from "./render-files";
21
- export { RenderTypeEntitiesEvent } from "./render-type-entities";
22
- export { GenerateIndexMetafileEvent } from "./generate-index-metafile";
6
+ export { ConfigBuildEvents } from "./config-build-events.ts";
7
+ export { SchemaEvents } from "./schema-events.ts";
8
+ export { DiffEvents } from "./diff-events.ts";
9
+ export { RenderRootTypesEvents } from "./render-root-types-events.ts";
10
+ export { RenderHomepageEvents } from "./render-homepage-events.ts";
11
+ export { RenderFilesEvents } from "./render-files-events.ts";
12
+ export { RenderTypeEntitiesEvents } from "./render-type-entities-events.ts";
13
+ export { GenerateIndexMetafileEvents } from "./generate-index-metafile-events.ts";
14
+ export { PrintTypeEvents } from "./print-type-events.ts";
15
+ export { ConfigBuildEvent } from "./config-build.ts";
16
+ export { SchemaEvent } from "./schema-load.ts";
17
+ export { DiffCheckEvent } from "./diff-check.ts";
18
+ export { RenderRootTypesEvent } from "./render-root-types.ts";
19
+ export { RenderHomepageEvent } from "./render-homepage.ts";
20
+ export { RenderFilesEvent } from "./render-files.ts";
21
+ export { RenderTypeEntitiesEvent } from "./render-type-entities.ts";
22
+ export { GenerateIndexMetafileEvent } from "./generate-index-metafile.ts";
23
23
  //# 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,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,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;AAE/E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
@@ -7,39 +7,39 @@
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.GenerateIndexMetafileEvent = exports.RenderTypeEntitiesEvent = exports.RenderFilesEvent = exports.RenderHomepageEvent = exports.RenderRootTypesEvent = exports.DiffCheckEvent = exports.SchemaEvent = exports.ConfigBuildEvent = exports.PrintTypeEvents = exports.GenerateIndexMetafileEvents = exports.RenderTypeEntitiesEvents = exports.RenderFilesEvents = exports.RenderHomepageEvents = exports.RenderRootTypesEvents = exports.DiffEvents = exports.SchemaEvents = exports.ConfigBuildEvents = void 0;
9
9
  // Event constants
10
- var config_build_events_1 = require("./config-build-events");
11
- Object.defineProperty(exports, "ConfigBuildEvents", { enumerable: true, get: function () { return config_build_events_1.ConfigBuildEvents; } });
12
- var schema_events_1 = require("./schema-events");
13
- Object.defineProperty(exports, "SchemaEvents", { enumerable: true, get: function () { return schema_events_1.SchemaEvents; } });
14
- var diff_events_1 = require("./diff-events");
15
- Object.defineProperty(exports, "DiffEvents", { enumerable: true, get: function () { return diff_events_1.DiffEvents; } });
16
- var render_root_types_events_1 = require("./render-root-types-events");
17
- Object.defineProperty(exports, "RenderRootTypesEvents", { enumerable: true, get: function () { return render_root_types_events_1.RenderRootTypesEvents; } });
18
- var render_homepage_events_1 = require("./render-homepage-events");
19
- Object.defineProperty(exports, "RenderHomepageEvents", { enumerable: true, get: function () { return render_homepage_events_1.RenderHomepageEvents; } });
20
- var render_files_events_1 = require("./render-files-events");
21
- Object.defineProperty(exports, "RenderFilesEvents", { enumerable: true, get: function () { return render_files_events_1.RenderFilesEvents; } });
22
- var render_type_entities_events_1 = require("./render-type-entities-events");
23
- Object.defineProperty(exports, "RenderTypeEntitiesEvents", { enumerable: true, get: function () { return render_type_entities_events_1.RenderTypeEntitiesEvents; } });
24
- var generate_index_metafile_events_1 = require("./generate-index-metafile-events");
25
- Object.defineProperty(exports, "GenerateIndexMetafileEvents", { enumerable: true, get: function () { return generate_index_metafile_events_1.GenerateIndexMetafileEvents; } });
10
+ var config_build_events_ts_1 = require("./config-build-events.js");
11
+ Object.defineProperty(exports, "ConfigBuildEvents", { enumerable: true, get: function () { return config_build_events_ts_1.ConfigBuildEvents; } });
12
+ var schema_events_ts_1 = require("./schema-events.js");
13
+ Object.defineProperty(exports, "SchemaEvents", { enumerable: true, get: function () { return schema_events_ts_1.SchemaEvents; } });
14
+ var diff_events_ts_1 = require("./diff-events.js");
15
+ Object.defineProperty(exports, "DiffEvents", { enumerable: true, get: function () { return diff_events_ts_1.DiffEvents; } });
16
+ var render_root_types_events_ts_1 = require("./render-root-types-events.js");
17
+ Object.defineProperty(exports, "RenderRootTypesEvents", { enumerable: true, get: function () { return render_root_types_events_ts_1.RenderRootTypesEvents; } });
18
+ var render_homepage_events_ts_1 = require("./render-homepage-events.js");
19
+ Object.defineProperty(exports, "RenderHomepageEvents", { enumerable: true, get: function () { return render_homepage_events_ts_1.RenderHomepageEvents; } });
20
+ var render_files_events_ts_1 = require("./render-files-events.js");
21
+ Object.defineProperty(exports, "RenderFilesEvents", { enumerable: true, get: function () { return render_files_events_ts_1.RenderFilesEvents; } });
22
+ var render_type_entities_events_ts_1 = require("./render-type-entities-events.js");
23
+ Object.defineProperty(exports, "RenderTypeEntitiesEvents", { enumerable: true, get: function () { return render_type_entities_events_ts_1.RenderTypeEntitiesEvents; } });
24
+ var generate_index_metafile_events_ts_1 = require("./generate-index-metafile-events.js");
25
+ Object.defineProperty(exports, "GenerateIndexMetafileEvents", { enumerable: true, get: function () { return generate_index_metafile_events_ts_1.GenerateIndexMetafileEvents; } });
26
26
  // Re-export used only by unit tests via the events barrel.
27
- var print_type_events_1 = require("./print-type-events");
28
- Object.defineProperty(exports, "PrintTypeEvents", { enumerable: true, get: function () { return print_type_events_1.PrintTypeEvents; } });
27
+ var print_type_events_ts_1 = require("./print-type-events.js");
28
+ Object.defineProperty(exports, "PrintTypeEvents", { enumerable: true, get: function () { return print_type_events_ts_1.PrintTypeEvents; } });
29
29
  // Event classes
30
- var config_build_1 = require("./config-build");
31
- Object.defineProperty(exports, "ConfigBuildEvent", { enumerable: true, get: function () { return config_build_1.ConfigBuildEvent; } });
32
- var schema_load_1 = require("./schema-load");
33
- Object.defineProperty(exports, "SchemaEvent", { enumerable: true, get: function () { return schema_load_1.SchemaEvent; } });
34
- var diff_check_1 = require("./diff-check");
35
- Object.defineProperty(exports, "DiffCheckEvent", { enumerable: true, get: function () { return diff_check_1.DiffCheckEvent; } });
36
- var render_root_types_1 = require("./render-root-types");
37
- Object.defineProperty(exports, "RenderRootTypesEvent", { enumerable: true, get: function () { return render_root_types_1.RenderRootTypesEvent; } });
38
- var render_homepage_1 = require("./render-homepage");
39
- Object.defineProperty(exports, "RenderHomepageEvent", { enumerable: true, get: function () { return render_homepage_1.RenderHomepageEvent; } });
40
- var render_files_1 = require("./render-files");
41
- Object.defineProperty(exports, "RenderFilesEvent", { enumerable: true, get: function () { return render_files_1.RenderFilesEvent; } });
42
- var render_type_entities_1 = require("./render-type-entities");
43
- Object.defineProperty(exports, "RenderTypeEntitiesEvent", { enumerable: true, get: function () { return render_type_entities_1.RenderTypeEntitiesEvent; } });
44
- var generate_index_metafile_1 = require("./generate-index-metafile");
45
- Object.defineProperty(exports, "GenerateIndexMetafileEvent", { enumerable: true, get: function () { return generate_index_metafile_1.GenerateIndexMetafileEvent; } });
30
+ var config_build_ts_1 = require("./config-build.js");
31
+ Object.defineProperty(exports, "ConfigBuildEvent", { enumerable: true, get: function () { return config_build_ts_1.ConfigBuildEvent; } });
32
+ var schema_load_ts_1 = require("./schema-load.js");
33
+ Object.defineProperty(exports, "SchemaEvent", { enumerable: true, get: function () { return schema_load_ts_1.SchemaEvent; } });
34
+ var diff_check_ts_1 = require("./diff-check.js");
35
+ Object.defineProperty(exports, "DiffCheckEvent", { enumerable: true, get: function () { return diff_check_ts_1.DiffCheckEvent; } });
36
+ var render_root_types_ts_1 = require("./render-root-types.js");
37
+ Object.defineProperty(exports, "RenderRootTypesEvent", { enumerable: true, get: function () { return render_root_types_ts_1.RenderRootTypesEvent; } });
38
+ var render_homepage_ts_1 = require("./render-homepage.js");
39
+ Object.defineProperty(exports, "RenderHomepageEvent", { enumerable: true, get: function () { return render_homepage_ts_1.RenderHomepageEvent; } });
40
+ var render_files_ts_1 = require("./render-files.js");
41
+ Object.defineProperty(exports, "RenderFilesEvent", { enumerable: true, get: function () { return render_files_ts_1.RenderFilesEvent; } });
42
+ var render_type_entities_ts_1 = require("./render-type-entities.js");
43
+ Object.defineProperty(exports, "RenderTypeEntitiesEvent", { enumerable: true, get: function () { return render_type_entities_ts_1.RenderTypeEntitiesEvent; } });
44
+ var generate_index_metafile_ts_1 = require("./generate-index-metafile.js");
45
+ Object.defineProperty(exports, "GenerateIndexMetafileEvent", { enumerable: true, get: function () { return generate_index_metafile_ts_1.GenerateIndexMetafileEvent; } });
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAEV,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,WAAW,EAEX,cAAc,EAEf,MAAM,yBAAyB,CAAC;AAkEjC;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,cACb,KAAK,CAAC,WAAW,GAAG,MAAM,CAAC,KACrC,OAAO,CAAC,OAAO,CAYjB,CAAC;AAiBF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,aACzB,OAAO,gBACJ,MAAM,KACnB,CAAC,GAAG,SAmBN,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,cACzB,OAAO,SACX,QAAQ,KACd,OAAO,CAAC,SAAS,CAAC,GAAG,SA+CvB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,mBACZ,MAAM,eACT,KAAK,CAAC,YAAY,CAAC,KAC/B,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,CAY9B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,sBAAsB,WACzB,aAAa,kBACL,MAAM,cACV,KAAK,CAAC,cAAc,CAAC,UACzB,MAAM,KACb,OAAO,CAAC,OAAO,CAWjB,CAAC;AAEF;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,4BAA4B,qBACrB,KAAK,C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