@graphql-markdown/core 1.10.4 → 1.11.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/dist/generator.js CHANGED
@@ -66,10 +66,8 @@ const generateDocFromSchema = async ({ baseURL, customDirective, diffMethod, doc
66
66
  return renderer.renderRootTypes(typeName, rootTypes[typeName]);
67
67
  }));
68
68
  await renderer.renderHomepage(homepageLocation);
69
- const sidebarPath = await renderer.renderSidebar();
70
69
  const duration = (Number(process.hrtime.bigint() - start) / NS_PER_SEC).toFixed(SEC_DECIMALS);
71
70
  (0, logger_1.log)(`Documentation successfully generated in "${outputDir}" with base URL "${baseURL}".`, "success");
72
71
  (0, logger_1.log)(`${pages.flat().length} pages generated in ${duration}s from schema "${String(schemaLocation)}".`);
73
- (0, logger_1.log)(`Remember to update your Docusaurus site's sidebars with "${sidebarPath}".`);
74
72
  };
75
73
  exports.generateDocFromSchema = generateDocFromSchema;
@@ -14,6 +14,5 @@ export declare class Renderer {
14
14
  generateCategoryMetafileType(type: unknown, name: string, rootTypeName: SchemaEntity): Promise<string>;
15
15
  renderRootTypes(rootTypeName: SchemaEntity, type: unknown): Promise<Maybe<Maybe<Category>[]>>;
16
16
  renderTypeEntities(dirPath: string, name: string, type: unknown): Promise<Maybe<Category>>;
17
- renderSidebar(): Promise<string>;
18
17
  renderHomepage(homepageLocation: string): Promise<void>;
19
18
  }
package/dist/renderer.js CHANGED
@@ -5,7 +5,6 @@ const node_path_1 = require("node:path");
5
5
  const graphql_1 = require("@graphql-markdown/graphql");
6
6
  const utils_1 = require("@graphql-markdown/utils");
7
7
  const logger_1 = require("@graphql-markdown/logger");
8
- const SIDEBAR = "sidebar-schema.js";
9
8
  const CATEGORY_YAML = "_category_.yml";
10
9
  var SidebarPosition;
11
10
  (function (SidebarPosition) {
@@ -108,24 +107,6 @@ class Renderer {
108
107
  slug: slug,
109
108
  };
110
109
  }
111
- async renderSidebar() {
112
- const sidebar = {
113
- schemaSidebar: [
114
- {
115
- type: "autogenerated",
116
- dirName: this.baseURL,
117
- },
118
- ],
119
- };
120
- const jsonSidebar = `
121
- /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
122
-
123
- module.exports = ${JSON.stringify(sidebar, null, 2)};
124
- `;
125
- const filePath = (0, node_path_1.join)(this.outputDir, SIDEBAR);
126
- await (0, utils_1.saveFile)(filePath, jsonSidebar, this.prettify ? utils_1.prettifyJavascript : undefined);
127
- return filePath;
128
- }
129
110
  async renderHomepage(homepageLocation) {
130
111
  const homePage = (0, node_path_1.basename)(homepageLocation);
131
112
  const destLocation = (0, node_path_1.join)(this.outputDir, homePage);
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.10.4",
8
+ "version": "1.11.0",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
@@ -68,9 +68,9 @@
68
68
  "@graphql-markdown/utils": "^1.6.5"
69
69
  },
70
70
  "peerDependencies": {
71
- "@graphql-markdown/diff": "^1.1.6",
71
+ "@graphql-markdown/diff": "^1.1.7",
72
72
  "@graphql-markdown/helpers": "^1.0.6",
73
- "@graphql-markdown/printer-legacy": "^1.8.4",
73
+ "@graphql-markdown/printer-legacy": "^1.8.5",
74
74
  "graphql-config": "^5.0.3"
75
75
  },
76
76
  "devDependencies": {