Socket
Socket
Sign inDemoInstall

@redocly/config

Package Overview
Dependencies
Maintainers
9
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redocly/config - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

lib-esm/redoc-config-schema.d.ts

8

CHANGELOG.md
# @redocly/config
## 0.6.0
### Minor Changes
- 25e87a10c9: feat: Updated the product with a major UX and DX overhaul. Please, see the detailed [release notes](./realm-redesign-release-notes.md).
## 0.5.0

@@ -20,3 +26,3 @@

- 6380e0d826: feat: Added the `removeAttribution` configuration option for the Enterprise plan users. See [Remove attribution](/reference/remove-attribution.md) in the documentation for more information.
- 6380e0d826: feat: Added the `removeAttribution` configuration option for the Enterprise plan users. See [Remove attribution](/config/remove-attribution.md) in the documentation for more information.

@@ -23,0 +29,0 @@ ## 0.2.0

19

lib-esm/default-theme-config-schema.js

@@ -0,1 +1,2 @@

import { redocConfigSchema } from './redoc-config-schema';
const logoConfigSchema = {

@@ -284,3 +285,7 @@ type: 'object',

properties: {
type: { type: 'string', enum: ['select', 'checkboxes', 'date-range'] },
type: {
type: 'string',
enum: ['select', 'checkboxes', 'date-range'],
default: 'checkboxes',
},
title: { type: 'string' },

@@ -514,3 +519,3 @@ titleTranslationKey: { type: 'string' },

type: 'object',
properties: Object.assign({ text: { type: 'string', default: 'Next to {{label}}' } }, hideConfigSchema.properties),
properties: Object.assign({ text: { type: 'string', default: 'Next page' } }, hideConfigSchema.properties),
additionalProperties: false,

@@ -521,3 +526,3 @@ default: {},

type: 'object',
properties: Object.assign({ text: { type: 'string', default: 'Back to {{label}}' } }, hideConfigSchema.properties),
properties: Object.assign({ text: { type: 'string', default: 'Previous page' } }, hideConfigSchema.properties),
additionalProperties: false,

@@ -563,3 +568,3 @@ default: {},

markdown: markdownConfigSchema,
openapi: { type: 'object', additionalProperties: true },
openapi: redocConfigSchema,
graphql: { type: 'object', additionalProperties: true },

@@ -579,5 +584,5 @@ analytics: {

},
userProfile: {
userMenu: {
type: 'object',
properties: Object.assign({ loginLabel: { type: 'string', default: 'Login' }, logoutLabel: { type: 'string', default: 'Logout' }, menu: {
properties: Object.assign({ items: {
type: 'array',

@@ -595,3 +600,3 @@ items: {

default: [],
} }, hideConfigSchema.properties),
}, hideLoginButton: { type: 'boolean' } }, hideConfigSchema.properties),
additionalProperties: false,

@@ -598,0 +603,0 @@ default: {},

@@ -39,6 +39,9 @@ import type { Node } from '@markdoc/markdoc/dist/src/types';

versionFolderId?: string;
badges?: ItemBadge[];
httpVerb?: string;
separatorLine?: boolean;
linePosition?: 'top' | 'bottom';
routeSlug?: string;
active?: boolean;
deprecated?: boolean;
icon?: string;

@@ -54,2 +57,7 @@ srcSet?: string;

};
export type ItemBadge = {
name: string;
color?: string;
position?: 'before' | 'after';
};
export type ResolvedNavGroupItem = {

@@ -73,2 +81,3 @@ type: 'group';

separatorLine?: boolean;
linePosition?: 'top' | 'bottom';
routeSlug?: string;

@@ -96,2 +105,3 @@ active?: boolean;

versionFolderId?: string;
variant?: 'primary' | 'secondary';
separatorLine?: boolean;

@@ -105,2 +115,3 @@ linePosition?: 'top' | 'bottom';

srcSet?: string;
languageInsensitive?: boolean;
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;

@@ -111,3 +122,2 @@ [REDOCLY_ROUTE_RBAC]?: {

};
languageInsensitive?: boolean;
} | {

@@ -127,2 +137,5 @@ type: 'error';

linkedSidebars?: string[];
icon?: string;
srcSet?: string;
languageInsensitive?: boolean;
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;

@@ -133,5 +146,2 @@ [REDOCLY_ROUTE_RBAC]?: {

};
icon?: string;
srcSet?: string;
languageInsensitive?: boolean;
};

@@ -142,3 +152,3 @@ export type ResolvedNavItemWithLink = (ResolvedNavLinkItem | ResolvedNavGroupItem) & {

export type ResolvedSidebar = {
relatedNavbarItem?: Breadcrumb;
relatedNavbarItem?: BreadcrumbItem;
items: ResolvedNavItem[];

@@ -178,4 +188,6 @@ };

name: string;
email?: string;
picture: string;
logoutDisabled?: boolean;
teams?: string[];
};

@@ -264,4 +276,4 @@ export interface PageData {

};
export type MenuStyle = 'drilldown';
export type Breadcrumb = {
export type MenuStyle = 'drilldown' | 'drilldown-header';
export type BreadcrumbItem = {
label: string;

@@ -268,0 +280,0 @@ link?: string;

import { DEFAULT_TEAM_CLAIM_NAME, AuthProviderType, ApigeeDevOnboardingIntegrationAuthType, } from './constants';
import { themeConfigSchema } from './default-theme-config-schema';
import { removePropertyRecursively } from './remove-property-recursively';
import { reuniteConfigSchema } from './reunite-config-schema';

@@ -320,2 +321,8 @@ export const oidcIssuerMetadataSchema = {

},
rules: {
type: 'object',
additionalProperties: {
oneOf: [{ type: 'string' }, { type: 'object' }],
},
},
ssoOnPrem: ssoOnPremConfigSchema,

@@ -340,3 +347,3 @@ sso: ssoConfigSchema,

};
const environmentSchema = Object.assign(Object.assign({}, redoclyConfigSchema), { additionalProperties: false });
const environmentSchema = Object.assign(Object.assign({}, removePropertyRecursively(redoclyConfigSchema, 'default')), { additionalProperties: false });
export const rootRedoclyConfigSchema = Object.assign(Object.assign({}, redoclyConfigSchema), { properties: Object.assign(Object.assign({ plugins: {

@@ -343,0 +350,0 @@ type: 'array',

import type { FromSchema } from 'json-schema-to-ts';
import type { amplitudeAnalyticsConfigSchema, catalogFilterSchema, catalogSchema, googleAnalyticsConfigSchema, gtmAnalyticsConfigSchema, markdownConfigSchema, productConfigSchema, productGoogleAnalyticsConfigSchema, rudderstackAnalyticsConfigSchema, scorecardConfigSchema, segmentAnalyticsConfigSchema, themeConfigSchema } from './default-theme-config-schema';
import type { apiConfigSchema, apigeeAdapterAuthOauth2Schema, apigeeAdapterAuthServiceAccountSchema, apigeeEdgeAdapterConfigSchema, apigeeXAdapterConfigSchema, authProviderConfigSchema, basicAuthProviderConfigSchema, devOnboardingAdapterConfigSchema, graviteeAdapterConfigSchema, i18ConfigSchema, oidcIssuerMetadataSchema, oidcProviderConfigSchema, rbacConfigSchema, rbacScopeItemsSchema, redirectConfigSchema, redirectsConfigSchema, rootRedoclyConfigSchema, saml2ProviderConfigSchema, seoConfigSchema, ssoOnPremConfigSchema } from './root-config-schema';
import type { RedocConfigTypes } from './redoc-types';
/**

@@ -8,2 +9,3 @@ * Theme

export type ThemeConfig = FromSchema<typeof themeConfigSchema>;
export type RedocConfig = RedocConfigTypes;
export type ProductConfig = FromSchema<typeof productConfigSchema>;

@@ -10,0 +12,0 @@ export type ProductGoogleAnalyticsConfig = FromSchema<typeof productGoogleAnalyticsConfigSchema>;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.productConfigOverrideSchema = exports.productThemeOverrideSchema = exports.themeConfigSchema = exports.catalogSchema = exports.scorecardConfigSchema = exports.catalogFilterSchema = exports.productConfigSchema = exports.googleAnalyticsConfigSchema = exports.productGoogleAnalyticsConfigSchema = exports.gtmAnalyticsConfigSchema = exports.segmentAnalyticsConfigSchema = exports.rudderstackAnalyticsConfigSchema = exports.heapAnalyticsConfigSchema = exports.fullstoryAnalyticsConfigSchema = exports.amplitudeAnalyticsConfigSchema = exports.markdownConfigSchema = void 0;
const redoc_config_schema_1 = require("./redoc-config-schema");
const logoConfigSchema = {

@@ -287,3 +288,7 @@ type: 'object',

properties: {
type: { type: 'string', enum: ['select', 'checkboxes', 'date-range'] },
type: {
type: 'string',
enum: ['select', 'checkboxes', 'date-range'],
default: 'checkboxes',
},
title: { type: 'string' },

@@ -517,3 +522,3 @@ titleTranslationKey: { type: 'string' },

type: 'object',
properties: Object.assign({ text: { type: 'string', default: 'Next to {{label}}' } }, hideConfigSchema.properties),
properties: Object.assign({ text: { type: 'string', default: 'Next page' } }, hideConfigSchema.properties),
additionalProperties: false,

@@ -524,3 +529,3 @@ default: {},

type: 'object',
properties: Object.assign({ text: { type: 'string', default: 'Back to {{label}}' } }, hideConfigSchema.properties),
properties: Object.assign({ text: { type: 'string', default: 'Previous page' } }, hideConfigSchema.properties),
additionalProperties: false,

@@ -566,3 +571,3 @@ default: {},

markdown: exports.markdownConfigSchema,
openapi: { type: 'object', additionalProperties: true },
openapi: redoc_config_schema_1.redocConfigSchema,
graphql: { type: 'object', additionalProperties: true },

@@ -582,5 +587,5 @@ analytics: {

},
userProfile: {
userMenu: {
type: 'object',
properties: Object.assign({ loginLabel: { type: 'string', default: 'Login' }, logoutLabel: { type: 'string', default: 'Logout' }, menu: {
properties: Object.assign({ items: {
type: 'array',

@@ -598,3 +603,3 @@ items: {

default: [],
} }, hideConfigSchema.properties),
}, hideLoginButton: { type: 'boolean' } }, hideConfigSchema.properties),
additionalProperties: false,

@@ -601,0 +606,0 @@ default: {},

@@ -39,6 +39,9 @@ import type { Node } from '@markdoc/markdoc/dist/src/types';

versionFolderId?: string;
badges?: ItemBadge[];
httpVerb?: string;
separatorLine?: boolean;
linePosition?: 'top' | 'bottom';
routeSlug?: string;
active?: boolean;
deprecated?: boolean;
icon?: string;

@@ -54,2 +57,7 @@ srcSet?: string;

};
export type ItemBadge = {
name: string;
color?: string;
position?: 'before' | 'after';
};
export type ResolvedNavGroupItem = {

@@ -73,2 +81,3 @@ type: 'group';

separatorLine?: boolean;
linePosition?: 'top' | 'bottom';
routeSlug?: string;

@@ -96,2 +105,3 @@ active?: boolean;

versionFolderId?: string;
variant?: 'primary' | 'secondary';
separatorLine?: boolean;

@@ -105,2 +115,3 @@ linePosition?: 'top' | 'bottom';

srcSet?: string;
languageInsensitive?: boolean;
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;

@@ -111,3 +122,2 @@ [REDOCLY_ROUTE_RBAC]?: {

};
languageInsensitive?: boolean;
} | {

@@ -127,2 +137,5 @@ type: 'error';

linkedSidebars?: string[];
icon?: string;
srcSet?: string;
languageInsensitive?: boolean;
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;

@@ -133,5 +146,2 @@ [REDOCLY_ROUTE_RBAC]?: {

};
icon?: string;
srcSet?: string;
languageInsensitive?: boolean;
};

@@ -142,3 +152,3 @@ export type ResolvedNavItemWithLink = (ResolvedNavLinkItem | ResolvedNavGroupItem) & {

export type ResolvedSidebar = {
relatedNavbarItem?: Breadcrumb;
relatedNavbarItem?: BreadcrumbItem;
items: ResolvedNavItem[];

@@ -178,4 +188,6 @@ };

name: string;
email?: string;
picture: string;
logoutDisabled?: boolean;
teams?: string[];
};

@@ -264,4 +276,4 @@ export interface PageData {

};
export type MenuStyle = 'drilldown';
export type Breadcrumb = {
export type MenuStyle = 'drilldown' | 'drilldown-header';
export type BreadcrumbItem = {
label: string;

@@ -268,0 +280,0 @@ link?: string;

@@ -6,2 +6,3 @@ "use strict";

const default_theme_config_schema_1 = require("./default-theme-config-schema");
const remove_property_recursively_1 = require("./remove-property-recursively");
const reunite_config_schema_1 = require("./reunite-config-schema");

@@ -324,2 +325,8 @@ exports.oidcIssuerMetadataSchema = {

},
rules: {
type: 'object',
additionalProperties: {
oneOf: [{ type: 'string' }, { type: 'object' }],
},
},
ssoOnPrem: exports.ssoOnPremConfigSchema,

@@ -344,3 +351,3 @@ sso: exports.ssoConfigSchema,

};
const environmentSchema = Object.assign(Object.assign({}, exports.redoclyConfigSchema), { additionalProperties: false });
const environmentSchema = Object.assign(Object.assign({}, (0, remove_property_recursively_1.removePropertyRecursively)(exports.redoclyConfigSchema, 'default')), { additionalProperties: false });
exports.rootRedoclyConfigSchema = Object.assign(Object.assign({}, exports.redoclyConfigSchema), { properties: Object.assign(Object.assign({ plugins: {

@@ -347,0 +354,0 @@ type: 'array',

import type { FromSchema } from 'json-schema-to-ts';
import type { amplitudeAnalyticsConfigSchema, catalogFilterSchema, catalogSchema, googleAnalyticsConfigSchema, gtmAnalyticsConfigSchema, markdownConfigSchema, productConfigSchema, productGoogleAnalyticsConfigSchema, rudderstackAnalyticsConfigSchema, scorecardConfigSchema, segmentAnalyticsConfigSchema, themeConfigSchema } from './default-theme-config-schema';
import type { apiConfigSchema, apigeeAdapterAuthOauth2Schema, apigeeAdapterAuthServiceAccountSchema, apigeeEdgeAdapterConfigSchema, apigeeXAdapterConfigSchema, authProviderConfigSchema, basicAuthProviderConfigSchema, devOnboardingAdapterConfigSchema, graviteeAdapterConfigSchema, i18ConfigSchema, oidcIssuerMetadataSchema, oidcProviderConfigSchema, rbacConfigSchema, rbacScopeItemsSchema, redirectConfigSchema, redirectsConfigSchema, rootRedoclyConfigSchema, saml2ProviderConfigSchema, seoConfigSchema, ssoOnPremConfigSchema } from './root-config-schema';
import type { RedocConfigTypes } from './redoc-types';
/**

@@ -8,2 +9,3 @@ * Theme

export type ThemeConfig = FromSchema<typeof themeConfigSchema>;
export type RedocConfig = RedocConfigTypes;
export type ProductConfig = FromSchema<typeof productConfigSchema>;

@@ -10,0 +12,0 @@ export type ProductGoogleAnalyticsConfig = FromSchema<typeof productGoogleAnalyticsConfigSchema>;

{
"name": "@redocly/config",
"version": "0.5.0",
"version": "0.6.0",
"license": "MIT",

@@ -8,7 +8,7 @@ "main": "./lib/index.js",

"types": "./lib/index.d.ts",
"dependencies": {},
"devDependencies": {
"@markdoc/markdoc": "0.4.0",
"@types/react": "18.3.2",
"json-schema-to-ts": "2.7.2",
"rimraf": "5.0.5",
"json-schema-to-ts": "2.7.2",
"@markdoc/markdoc": "0.4.0",
"typescript": "5.2.2"

@@ -15,0 +15,0 @@ },

@@ -0,1 +1,3 @@

import { redocConfigSchema } from './redoc-config-schema';
const logoConfigSchema = {

@@ -324,3 +326,7 @@ type: 'object',

properties: {
type: { type: 'string', enum: ['select', 'checkboxes', 'date-range'] },
type: {
type: 'string',
enum: ['select', 'checkboxes', 'date-range'],
default: 'checkboxes',
},
title: { type: 'string' },

@@ -586,3 +592,3 @@ titleTranslationKey: { type: 'string' },

properties: {
text: { type: 'string', default: 'Next to {{label}}' },
text: { type: 'string', default: 'Next page' },
...hideConfigSchema.properties,

@@ -596,3 +602,3 @@ },

properties: {
text: { type: 'string', default: 'Back to {{label}}' },
text: { type: 'string', default: 'Previous page' },
...hideConfigSchema.properties,

@@ -651,3 +657,3 @@ },

markdown: markdownConfigSchema,
openapi: { type: 'object', additionalProperties: true }, // TODO: put the real schema here @Viacheslav
openapi: redocConfigSchema,
graphql: { type: 'object', additionalProperties: true },

@@ -667,8 +673,6 @@ analytics: {

},
userProfile: {
userMenu: {
type: 'object',
properties: {
loginLabel: { type: 'string', default: 'Login' },
logoutLabel: { type: 'string', default: 'Logout' },
menu: {
items: {
type: 'array',

@@ -687,2 +691,3 @@ items: {

},
hideLoginButton: { type: 'boolean' },
...hideConfigSchema.properties,

@@ -689,0 +694,0 @@ },

@@ -50,6 +50,9 @@ import type { Node } from '@markdoc/markdoc/dist/src/types';

badges?: ItemBadge[];
httpVerb?: string;
separatorLine?: boolean;
linePosition?: 'top' | 'bottom';
routeSlug?: string;
active?: boolean;
deprecated?: boolean;
icon?: string;

@@ -67,2 +70,8 @@ srcSet?: string;

export type ItemBadge = {
name: string;
color?: string;
position?: 'before' | 'after';
};
export type ResolvedNavGroupItem = {

@@ -88,2 +97,3 @@ type: 'group';

separatorLine?: boolean;
linePosition?: 'top' | 'bottom';
routeSlug?: string;

@@ -118,2 +128,3 @@ active?: boolean;

variant?: 'primary' | 'secondary';
separatorLine?: boolean;

@@ -125,4 +136,5 @@ linePosition?: 'top' | 'bottom';

linkedSidebars?: string[]; // for typescript
icon?: string;
srcSet?: string;
icon?: string; // for typescript
srcSet?: string; // for typescript
languageInsensitive?: boolean; // for typescript
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;

@@ -133,4 +145,2 @@ [REDOCLY_ROUTE_RBAC]?: {

};
languageInsensitive?: boolean;
}

@@ -153,2 +163,5 @@ | {

linkedSidebars?: string[]; // for typescript
icon?: string; // for typescript
srcSet?: string; // for typescript
languageInsensitive?: boolean; // for typescript
[REDOCLY_TEAMS_RBAC]?: RbacScopeItems;

@@ -159,6 +172,2 @@ [REDOCLY_ROUTE_RBAC]?: {

};
icon?: string; // for typescript
srcSet?: string;
languageInsensitive?: boolean;
};

@@ -171,3 +180,3 @@

export type ResolvedSidebar = {
relatedNavbarItem?: Breadcrumb;
relatedNavbarItem?: BreadcrumbItem;
items: ResolvedNavItem[];

@@ -211,4 +220,6 @@ };

name: string;
email?: string;
picture: string;
logoutDisabled?: boolean;
teams?: string[];
};

@@ -311,5 +322,5 @@

export type MenuStyle = 'drilldown';
export type MenuStyle = 'drilldown' | 'drilldown-header';
export type Breadcrumb = {
export type BreadcrumbItem = {
label: string;

@@ -316,0 +327,0 @@ link?: string;

@@ -7,2 +7,3 @@ import {

import { themeConfigSchema } from './default-theme-config-schema';
import { removePropertyRecursively } from './remove-property-recursively';
import { reuniteConfigSchema } from './reunite-config-schema';

@@ -356,2 +357,8 @@

},
rules: {
type: 'object',
additionalProperties: {
oneOf: [{ type: 'string' }, { type: 'object' }],
},
},
ssoOnPrem: ssoOnPremConfigSchema,

@@ -378,3 +385,5 @@ sso: ssoConfigSchema,

const environmentSchema = {
...redoclyConfigSchema,
// We don't want to populate the env override with defaults
// Because during merge, defaults can override values from the root config
...removePropertyRecursively(redoclyConfigSchema, 'default'),
additionalProperties: false,

@@ -381,0 +390,0 @@ } as const;

@@ -38,2 +38,3 @@ import type { FromSchema } from 'json-schema-to-ts';

} from './root-config-schema';
import type { RedocConfigTypes } from './redoc-types';

@@ -45,2 +46,3 @@ /**

export type ThemeConfig = FromSchema<typeof themeConfigSchema>;
export type RedocConfig = RedocConfigTypes;
export type ProductConfig = FromSchema<typeof productConfigSchema>;

@@ -47,0 +49,0 @@ export type ProductGoogleAnalyticsConfig = FromSchema<typeof productGoogleAnalyticsConfigSchema>;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc