@redocly/config 0.44.0 → 0.44.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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scorecardConfigSchema = exports.catalogsConfigSchema = exports.catalogSchema = exports.catalogFilterSchema = exports.breadcrumbsConfigSchema = exports.versionPickerConfigSchema = exports.userMenuConfigSchema = exports.analyticsConfigSchema = exports.googleAnalyticsConfigSchema = exports.productGoogleAnalyticsConfigSchema = exports.gtmAnalyticsConfigSchema = exports.segmentAnalyticsConfigSchema = exports.rudderstackAnalyticsConfigSchema = exports.heapAnalyticsConfigSchema = exports.fullstoryAnalyticsConfigSchema = exports.amplitudeAnalyticsConfigSchema = exports.openapiConfigSchema = exports.markdownConfigSchema = exports.codeSnippetConfigSchema = exports.navigationConfigSchema = exports.colorModeConfigSchema = exports.aiAssistantSchema = exports.searchConfigSchema = exports.linksConfigSchema = exports.scriptsConfigSchema = exports.sidebarConfigSchema = exports.footerConfigSchema = exports.productsConfigSchema = exports.navbarConfigSchema = exports.logoConfigSchema = exports.searchFiltersConfigSchema = exports.searchFacetsConfigSchema = exports.aiSearchConfigSchema = exports.productConfigSchema = exports.navItemsSchema = void 0;
3
+ exports.scorecardConfigSchema = exports.catalogsConfigSchema = exports.catalogSchema = exports.catalogFilterSchema = exports.breadcrumbsConfigSchema = exports.versionPickerConfigSchema = exports.userMenuConfigSchema = exports.analyticsConfigSchema = exports.googleAnalyticsConfigSchema = exports.productGoogleAnalyticsConfigSchema = exports.gtmAnalyticsConfigSchema = exports.segmentAnalyticsConfigSchema = exports.rudderstackAnalyticsConfigSchema = exports.heapAnalyticsConfigSchema = exports.fullstoryAnalyticsConfigSchema = exports.amplitudeAnalyticsConfigSchema = exports.asyncapiConfigSchema = exports.openapiConfigSchema = exports.markdownConfigSchema = exports.codeSnippetConfigSchema = exports.navigationConfigSchema = exports.colorModeConfigSchema = exports.aiAssistantSchema = exports.searchConfigSchema = exports.linksConfigSchema = exports.scriptsConfigSchema = exports.sidebarConfigSchema = exports.footerConfigSchema = exports.productsConfigSchema = exports.navbarConfigSchema = exports.logoConfigSchema = exports.searchFiltersConfigSchema = exports.searchFacetsConfigSchema = exports.aiSearchConfigSchema = exports.productConfigSchema = exports.navItemsSchema = void 0;
4
4
  const redoc_config_schema_1 = require("./redoc-config-schema");
5
5
  const reference_docs_config_schema_1 = require("./reference-docs-config-schema");
6
6
  const common_1 = require("./common");
@@ -377,6 +377,7 @@ exports.markdownConfigSchema = {
377
377
  default: {},
378
378
  };
379
379
  exports.openapiConfigSchema = Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema), { properties: Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema.properties), reference_docs_config_schema_1.deprecatedRefDocsSchema.properties) });
380
+ exports.asyncapiConfigSchema = Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema), { properties: Object.assign(Object.assign({}, redoc_config_schema_1.redocConfigSchema.properties), reference_docs_config_schema_1.deprecatedRefDocsSchema.properties) });
380
381
  const adobeAnalyticsConfigSchema = {
381
382
  type: 'object',
382
383
  properties: {
@@ -1,5 +1,5 @@
1
1
  type Removed<T, Drop> = T extends Record<string, any> ? T extends ArrayLike<any> ? Array<Removed<T[number], Drop>> : {
2
2
  [K in Exclude<keyof T, Drop>]: Removed<T[K], Drop>;
3
3
  } : T;
4
- export declare function removePropertyRecursively<TObject extends object, TProp extends string>(object: TObject, propToRemove: TProp): Removed<TObject, TProp>;
4
+ export declare function removePropertyRecursively<TObject extends object, TProp extends string>(object: TObject, propToRemove: TProp, parentKey?: string): Removed<TObject, TProp>;
5
5
  export {};
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.removePropertyRecursively = removePropertyRecursively;
4
- function removePropertyRecursively(object, propToRemove) {
4
+ function removePropertyRecursively(object, propToRemove, parentKey) {
5
5
  return Object.fromEntries(Object.entries(object)
6
6
  .map(([key, value]) => {
7
- if (key === propToRemove) {
7
+ if (key === propToRemove && parentKey !== 'properties') {
8
8
  return undefined;
9
9
  }
10
10
  if (typeof value !== 'object' || !value) {
@@ -14,11 +14,14 @@ function removePropertyRecursively(object, propToRemove) {
14
14
  return [
15
15
  key,
16
16
  value.map((arrayItem) => typeof arrayItem === 'object'
17
- ? removePropertyRecursively(arrayItem, propToRemove)
17
+ ? removePropertyRecursively(arrayItem, propToRemove, key)
18
18
  : arrayItem),
19
19
  ];
20
20
  }
21
- return [key, removePropertyRecursively(value, propToRemove)];
21
+ return [
22
+ key,
23
+ removePropertyRecursively(value, propToRemove, key),
24
+ ];
22
25
  })
23
26
  .filter(Boolean));
24
27
  }