@mintlify/scraping 4.0.207 → 4.0.209

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintlify/scraping",
3
- "version": "4.0.207",
3
+ "version": "4.0.209",
4
4
  "description": "Scrape documentation frameworks to Mintlify docs",
5
5
  "engines": {
6
6
  "node": ">=18.0.0"
@@ -38,7 +38,7 @@
38
38
  "format:check": "prettier . --check"
39
39
  },
40
40
  "dependencies": {
41
- "@mintlify/common": "1.0.353",
41
+ "@mintlify/common": "1.0.354",
42
42
  "@mintlify/openapi-parser": "^0.0.7",
43
43
  "fs-extra": "^11.1.1",
44
44
  "hast-util-to-mdast": "^10.1.0",
@@ -61,7 +61,7 @@
61
61
  "@mintlify/models": "0.0.188",
62
62
  "@mintlify/prettier-config": "1.0.4",
63
63
  "@mintlify/ts-config": "2.0.2",
64
- "@mintlify/validation": "0.1.349",
64
+ "@mintlify/validation": "0.1.350",
65
65
  "@trivago/prettier-plugin-sort-imports": "^4.2.1",
66
66
  "@tsconfig/recommended": "1.x",
67
67
  "@types/hast": "^3.0.4",
@@ -77,5 +77,5 @@
77
77
  "typescript": "^5.5.3",
78
78
  "vitest": "^2.0.4"
79
79
  },
80
- "gitHead": "1352be0c7cd6bad770b3c24f8bc9914e6f3afad5"
80
+ "gitHead": "21c41658e69c4b20ec37cc9659977f241257838f"
81
81
  }
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  getOpenApiTitleAndDescription,
3
+ OperationObject,
3
4
  optionallyAddLeadingSlash,
4
5
  slugToTitle,
5
6
  } from '@mintlify/common';
@@ -75,6 +76,14 @@ export type OpenApiPageGenerationResult<N, DN> = {
75
76
  isUrl: boolean;
76
77
  };
77
78
 
79
+ type MaybeOperationObjectWithExtensions = OperationObject & {
80
+ [`x-hidden`]: boolean;
81
+ };
82
+
83
+ const isHiddenOperation = (operation: MaybeOperationObjectWithExtensions) => {
84
+ return operation['x-hidden'];
85
+ };
86
+
78
87
  export function processOpenApiPath<N, DN>(
79
88
  path: string,
80
89
  pathItemObject: OpenAPIV3.PathItemObject,
@@ -94,6 +103,9 @@ export function processOpenApiPath<N, DN>(
94
103
  Object.values(OpenAPIV3.HttpMethods).forEach((method) => {
95
104
  if (method in pathItemObject) {
96
105
  const operation = pathItemObject[method];
106
+ if (isHiddenOperation(operation as MaybeOperationObjectWithExtensions)) {
107
+ return;
108
+ }
97
109
  const groupName = operation?.tags?.[0];
98
110
  const title =
99
111
  prepareStringToBeValidFilename(operation?.summary) ??
@@ -159,6 +171,9 @@ export function processOpenApiWebhook<N, DN>(
159
171
  Object.values(OpenAPIV3.HttpMethods).forEach((method) => {
160
172
  if (method in webhookObject) {
161
173
  const operation = webhookObject[method];
174
+ if (isHiddenOperation(operation as MaybeOperationObjectWithExtensions)) {
175
+ return;
176
+ }
162
177
  const groupName = operation?.tags?.[0];
163
178
  const title =
164
179
  prepareStringToBeValidFilename(operation?.summary) ??