@mintlify/prebuild 1.0.605 → 1.0.607

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.
@@ -88,9 +88,12 @@ export const generateOpenApiFromDocsConfig = async (navigation, openApiFiles, pa
88
88
  return undefined;
89
89
  }
90
90
  const skipBulkForNode = new Set();
91
+ const skipBulkForNodeId = new Set();
92
+ let numNodes = 0;
91
93
  async function processNav(nav, inheritedOpenApi, openApiOwner) {
94
+ const nodeId = numNodes++;
92
95
  const currentOpenApi = extractOpenApiFromNav(nav) ?? inheritedOpenApi;
93
- const currentOpenApiOwner = extractOpenApiFromNav(nav) ? nav : openApiOwner;
96
+ const currentOpenApiOwner = extractOpenApiFromNav(nav) ? nodeId : openApiOwner;
94
97
  let newNav = nav;
95
98
  if ('pages' in newNav) {
96
99
  newNav.pages = await Promise.all(newNav.pages.map(async (page) => {
@@ -160,8 +163,9 @@ export const generateOpenApiFromDocsConfig = async (navigation, openApiFiles, pa
160
163
  if (!slug) {
161
164
  throw new Error('Failed to generate OpenAPI endpoint page');
162
165
  }
163
- if (currentOpenApiOwner)
164
- skipBulkForNode.add(currentOpenApiOwner);
166
+ if (currentOpenApiOwner && !explicitOpenapiPath) {
167
+ skipBulkForNodeId.add(currentOpenApiOwner);
168
+ }
165
169
  return slug;
166
170
  }
167
171
  }
@@ -177,6 +181,9 @@ export const generateOpenApiFromDocsConfig = async (navigation, openApiFiles, pa
177
181
  };
178
182
  }
179
183
  }
184
+ if (skipBulkForNodeId.has(nodeId)) {
185
+ skipBulkForNode.add(newNav);
186
+ }
180
187
  return newNav;
181
188
  }
182
189
  const navAfterExplicit = await processNav(navigation, undefined);