@redocly/config 0.43.0 → 0.44.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.
Files changed (51) hide show
  1. package/lib/common.d.ts +241 -22
  2. package/lib/common.js +50 -37
  3. package/lib/constants/config.d.ts +12 -0
  4. package/lib/constants/config.js +17 -0
  5. package/lib/constants/entities.d.ts +45 -0
  6. package/lib/constants/entities.js +58 -0
  7. package/lib/constants/enum.d.ts +1 -0
  8. package/lib/constants/enum.js +6 -0
  9. package/lib/constants/shared.d.ts +15 -0
  10. package/lib/constants/shared.js +22 -0
  11. package/lib/default-theme-config-schema.d.ts +866 -723
  12. package/lib/default-theme-config-schema.js +1 -1
  13. package/lib/entities-catalog-entity-file-schema.js +22 -22
  14. package/lib/ex-theme-config-schemas.d.ts +96 -26
  15. package/lib/ex-theme-config-schemas.js +23 -2
  16. package/lib/index.d.ts +3 -1
  17. package/lib/index.js +13 -10
  18. package/lib/product-override-schema.d.ts +73 -20
  19. package/lib/root-config-schema.d.ts +2823 -1567
  20. package/lib/root-config-schema.js +18 -11
  21. package/lib/scorecards-config-schema.d.ts +6 -0
  22. package/lib/scorecards-config-schema.js +2 -4
  23. package/lib/types/portal-shared-types.d.ts +1 -1
  24. package/lib-esm/common.d.ts +241 -22
  25. package/lib-esm/common.js +29 -16
  26. package/lib-esm/constants/config.d.ts +12 -0
  27. package/lib-esm/constants/config.js +14 -0
  28. package/lib-esm/constants/entities.d.ts +45 -0
  29. package/lib-esm/constants/entities.js +55 -0
  30. package/lib-esm/constants/enum.d.ts +1 -0
  31. package/lib-esm/constants/enum.js +2 -0
  32. package/lib-esm/constants/shared.d.ts +15 -0
  33. package/lib-esm/constants/shared.js +19 -0
  34. package/lib-esm/default-theme-config-schema.d.ts +866 -723
  35. package/lib-esm/default-theme-config-schema.js +1 -1
  36. package/lib-esm/entities-catalog-entity-file-schema.js +21 -21
  37. package/lib-esm/ex-theme-config-schemas.d.ts +96 -26
  38. package/lib-esm/ex-theme-config-schemas.js +24 -3
  39. package/lib-esm/index.d.ts +3 -1
  40. package/lib-esm/index.js +3 -1
  41. package/lib-esm/product-override-schema.d.ts +73 -20
  42. package/lib-esm/root-config-schema.d.ts +2823 -1567
  43. package/lib-esm/root-config-schema.js +14 -7
  44. package/lib-esm/scorecards-config-schema.d.ts +6 -0
  45. package/lib-esm/scorecards-config-schema.js +2 -4
  46. package/lib-esm/types/portal-shared-types.d.ts +1 -1
  47. package/package.json +2 -2
  48. package/lib/constants.d.ts +0 -38
  49. package/lib/constants.js +0 -73
  50. package/lib-esm/constants.d.ts +0 -38
  51. package/lib-esm/constants.js +0 -70
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.rootRedoclyConfigSchema = exports.redoclyConfigSchema = exports.accessConfigSchema = exports.l10nConfigSchema = exports.devOnboardingAdapterConfigSchema = exports.apigeeEdgeAdapterConfigSchema = exports.apigeeXAdapterConfigSchema = exports.apigeeAdapterAuthServiceAccountSchema = exports.apigeeAdapterAuthOauth2Schema = exports.graviteeAdapterConfigSchema = exports.graviteeAdapterAuthIdpSchema = exports.graviteeAdapterAuthStaticSchema = exports.rbacConfigSchema = exports.rbacEntitiesCatalogConfigSchema = exports.apiFunctionsConfigSchema = exports.seoConfigSchema = exports.apiConfigSchema = exports.bannersConfigSchema = exports.bannerConfigSchema = exports.rbacScopeItemsSchema = exports.bannerColorSchema = exports.redirectsConfigSchema = exports.redirectConfigSchema = exports.ssoConfigSchema = exports.ssoDirectConfigSchema = exports.authProviderConfigSchema = exports.saml2ProviderConfigSchema = exports.oidcProviderConfigSchema = exports.oidcIssuerMetadataSchema = void 0;
4
- const constants_1 = require("./constants");
4
+ const shared_1 = require("./constants/shared");
5
+ const config_1 = require("./constants/config");
5
6
  const default_theme_config_schema_1 = require("./default-theme-config-schema");
6
7
  const feedback_config_schema_1 = require("./feedback-config-schema");
7
8
  const graphql_config_schema_1 = require("./graphql-config-schema");
@@ -25,7 +26,7 @@ exports.oidcIssuerMetadataSchema = {
25
26
  exports.oidcProviderConfigSchema = {
26
27
  type: 'object',
27
28
  properties: {
28
- type: { type: 'string', const: constants_1.AuthProviderType.OIDC },
29
+ type: { type: 'string', const: shared_1.AuthProviderType.OIDC },
29
30
  title: { type: 'string' },
30
31
  pkce: { type: 'boolean', default: false },
31
32
  configurationUrl: { type: 'string', minLength: 1 },
@@ -49,13 +50,13 @@ exports.oidcProviderConfigSchema = {
49
50
  exports.saml2ProviderConfigSchema = {
50
51
  type: 'object',
51
52
  properties: {
52
- type: { type: 'string', const: constants_1.AuthProviderType.SAML2 },
53
+ type: { type: 'string', const: shared_1.AuthProviderType.SAML2 },
53
54
  title: { type: 'string' },
54
55
  issuerId: { type: 'string' },
55
56
  entityId: { type: 'string' },
56
57
  ssoUrl: { type: 'string' },
57
58
  x509PublicCert: { type: 'string' },
58
- teamsAttributeName: { type: 'string', default: constants_1.DEFAULT_TEAM_CLAIM_NAME },
59
+ teamsAttributeName: { type: 'string', default: shared_1.DEFAULT_TEAM_CLAIM_NAME },
59
60
  teamsAttributeMap: { type: 'object', additionalProperties: { type: 'string' } },
60
61
  defaultTeams: { type: 'array', items: { type: 'string' } },
61
62
  },
@@ -96,11 +97,17 @@ exports.redirectConfigSchema = {
96
97
  type: { type: 'number', default: 301 },
97
98
  },
98
99
  additionalProperties: false,
100
+ nodeTypeName: config_1.CONFIG_NODE_TYPE_NAMES.RedirectSource,
101
+ description: 'Source is an absolute path that must start with a forward slash.',
102
+ documentationLink: 'https://redocly.com/docs/realm/config/redirects#sources-map',
99
103
  };
100
104
  exports.redirectsConfigSchema = {
101
105
  type: 'object',
102
106
  additionalProperties: exports.redirectConfigSchema,
103
107
  default: {},
108
+ nodeTypeName: config_1.CONFIG_NODE_TYPE_NAMES.Redirects,
109
+ description: 'Use redirects to change which resource a URL points to, maintaining working links when you move, rename, or restructure content.',
110
+ documentationLink: 'https://redocly.com/docs/realm/config/redirects',
104
111
  };
105
112
  exports.bannerColorSchema = {
106
113
  type: 'string',
@@ -130,7 +137,7 @@ exports.bannersConfigSchema = {
130
137
  };
131
138
  exports.apiConfigSchema = {
132
139
  type: 'object',
133
- properties: Object.assign(Object.assign(Object.assign(Object.assign({ root: { type: 'string' }, output: { type: 'string', pattern: '(.ya?ml|.json)$' }, rbac: { type: 'object', additionalProperties: true }, openapi: ex_theme_config_schemas_1.openapiConfigSchema, graphql: graphql_config_schema_1.graphqlConfigSchema,
140
+ properties: Object.assign({ root: { type: 'string' }, output: { type: 'string', pattern: '(.ya?ml|.json)$' }, rbac: { type: 'object', additionalProperties: true }, openapi: ex_theme_config_schemas_1.openapiConfigSchema, graphql: graphql_config_schema_1.graphqlConfigSchema,
134
141
  /**
135
142
  * @deprecated left for backwards compatibility
136
143
  */
@@ -141,7 +148,7 @@ exports.apiConfigSchema = {
141
148
  graphql: graphql_config_schema_1.graphqlConfigSchema,
142
149
  },
143
150
  additionalProperties: false,
144
- }, title: { type: 'string' }, metadata: { type: 'object', additionalProperties: true } }, common_1.ruleSchemas), common_1.preprocessorSchemas), common_1.decoratorsSchemas), { extends: { type: 'array', items: { type: 'string' } } }),
151
+ }, title: { type: 'string' }, metadata: { type: 'object', additionalProperties: true } }, common_1.configGovernanceSchema),
145
152
  required: ['root'],
146
153
  };
147
154
  const metadataConfigSchema = {
@@ -369,7 +376,7 @@ exports.graviteeAdapterConfigSchema = {
369
376
  exports.apigeeAdapterAuthOauth2Schema = {
370
377
  type: 'object',
371
378
  properties: {
372
- type: { type: 'string', const: constants_1.ApigeeDevOnboardingIntegrationAuthType.OAUTH2 },
379
+ type: { type: 'string', const: shared_1.ApigeeDevOnboardingIntegrationAuthType.OAUTH2 },
373
380
  tokenEndpoint: { type: 'string' },
374
381
  clientId: { type: 'string' },
375
382
  clientSecret: { type: 'string' },
@@ -380,7 +387,7 @@ exports.apigeeAdapterAuthOauth2Schema = {
380
387
  exports.apigeeAdapterAuthServiceAccountSchema = {
381
388
  type: 'object',
382
389
  properties: {
383
- type: { type: 'string', const: constants_1.ApigeeDevOnboardingIntegrationAuthType.SERVICE_ACCOUNT },
390
+ type: { type: 'string', const: shared_1.ApigeeDevOnboardingIntegrationAuthType.SERVICE_ACCOUNT },
384
391
  serviceAccountEmail: { type: 'string' },
385
392
  serviceAccountPrivateKey: { type: 'string' },
386
393
  },
@@ -497,7 +504,7 @@ exports.accessConfigSchema = {
497
504
  };
498
505
  exports.redoclyConfigSchema = {
499
506
  type: 'object',
500
- properties: Object.assign(Object.assign(Object.assign(Object.assign({
507
+ properties: Object.assign(Object.assign({
501
508
  /**
502
509
  * @deprecated Should use `plugins` instead
503
510
  */
@@ -522,7 +529,7 @@ exports.redoclyConfigSchema = {
522
529
  }, apis: {
523
530
  type: 'object',
524
531
  additionalProperties: exports.apiConfigSchema,
525
- }, extends: { type: 'array', items: { type: 'string' } } }, common_1.ruleSchemas), common_1.decoratorsSchemas), common_1.preprocessorSchemas), { ssoDirect: exports.ssoDirectConfigSchema, sso: exports.ssoConfigSchema, residency: residencySchema, logoutReturnUrl: logoutReturnUrlSchema, access: exports.accessConfigSchema, developerOnboarding: devOnboardingConfigSchema, removeAttribution: { type: 'boolean' }, i18n: exports.l10nConfigSchema, l10n: exports.l10nConfigSchema, metadata: metadataConfigSchema, metadataGlobs: metadataGlobsConfigSchema, ignore: { type: 'array', items: { type: 'string' } },
532
+ } }, common_1.configGovernanceSchema), { ssoDirect: exports.ssoDirectConfigSchema, sso: exports.ssoConfigSchema, residency: residencySchema, logoutReturnUrl: logoutReturnUrlSchema, access: exports.accessConfigSchema, developerOnboarding: devOnboardingConfigSchema, removeAttribution: { type: 'boolean' }, i18n: exports.l10nConfigSchema, l10n: exports.l10nConfigSchema, metadata: metadataConfigSchema, metadataGlobs: metadataGlobsConfigSchema, ignore: { type: 'array', items: { type: 'string' } },
526
533
  /**
527
534
  * @deprecated properties moved to the root of the config
528
535
  */
@@ -536,7 +543,7 @@ exports.redoclyConfigSchema = {
536
543
  /**
537
544
  * @deprecated Should use `scorecardClassic` instead
538
545
  */
539
- scorecard: ex_theme_config_schemas_1.scorecardConfigSchema, scorecards: scorecards_config_schema_1.scorecardsConfigSchema, scorecardClassic: ex_theme_config_schemas_1.scorecardConfigSchema, mcp: mcpConfigSchema, banner: exports.bannersConfigSchema }),
546
+ scorecard: ex_theme_config_schemas_1.scorecardConfigSchema, scorecardClassic: ex_theme_config_schemas_1.scorecardConfigSchema, scorecards: scorecards_config_schema_1.scorecardsConfigSchema, mcp: mcpConfigSchema, banner: exports.bannersConfigSchema }),
540
547
  default: { redirects: {}, seo: exports.seoConfigSchema.default },
541
548
  additionalProperties: true,
542
549
  };
@@ -415,10 +415,13 @@ export declare const scorecardSchema: {
415
415
  readonly type: "string";
416
416
  };
417
417
  readonly extends: {
418
+ readonly nodeTypeName: undefined;
418
419
  readonly type: "array";
419
420
  readonly items: {
420
421
  readonly type: "string";
421
422
  };
423
+ readonly description: "Use extends to inherit rules and their configurations from other rulesets.";
424
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/extends";
422
425
  };
423
426
  readonly rules: {
424
427
  readonly type: "object";
@@ -1006,10 +1009,13 @@ export declare const scorecardsConfigSchema: {
1006
1009
  readonly type: "string";
1007
1010
  };
1008
1011
  readonly extends: {
1012
+ readonly nodeTypeName: undefined;
1009
1013
  readonly type: "array";
1010
1014
  readonly items: {
1011
1015
  readonly type: "string";
1012
1016
  };
1017
+ readonly description: "Use extends to inherit rules and their configurations from other rulesets.";
1018
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/extends";
1013
1019
  };
1014
1020
  readonly rules: {
1015
1021
  readonly type: "object";
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.scorecardsConfigSchema = exports.scorecardSchema = void 0;
4
+ const common_1 = require("./common");
4
5
  const comparisonOperatorSchema = {
5
6
  type: 'string',
6
7
  enum: [
@@ -178,10 +179,7 @@ const levelSchema = {
178
179
  type: 'object',
179
180
  properties: {
180
181
  name: { type: 'string' },
181
- extends: {
182
- type: 'array',
183
- items: { type: 'string' },
184
- },
182
+ extends: common_1.configGovernanceSchema.extends,
185
183
  rules: levelRulesSchema,
186
184
  },
187
185
  required: ['name'],
@@ -1,5 +1,5 @@
1
1
  import type { Node } from '@markdoc/markdoc/dist/src/types';
2
- import type { LayoutVariant, REDOCLY_ROUTE_RBAC, REDOCLY_TEAMS_RBAC } from '../constants';
2
+ import type { LayoutVariant, REDOCLY_ROUTE_RBAC, REDOCLY_TEAMS_RBAC } from '../constants/shared';
3
3
  import type { ProductConfig, ProductGoogleAnalyticsConfig, RbacScopeItems, RedoclyConfig, SeoConfig } from './config-types';
4
4
  import type { CatalogEntityConfig } from './catalog-entity-types';
5
5
  export * from './code-walkthrough-types';
@@ -1,28 +1,247 @@
1
- export declare const rulesSchema: {
2
- readonly type: "object";
3
- readonly additionalProperties: {
4
- readonly oneOf: readonly [{
5
- readonly type: "string";
6
- }, {
7
- readonly type: "object";
8
- }];
9
- };
10
- };
11
1
  export declare const ruleTypes: readonly ["rules", "oas2Rules", "oas3_0Rules", "oas3_1Rules", "oas3_2Rules", "async2Rules", "async3Rules", "arazzo1Rules", "overlay1Rules", "openrpc1Rules"];
12
2
  export type RuleTypes = (typeof ruleTypes)[number];
13
- export declare const ruleSchemas: Record<RuleTypes, typeof rulesSchema>;
14
3
  export declare const preprocessorTypes: readonly ["preprocessors", "oas2Preprocessors", "oas3_0Preprocessors", "oas3_1Preprocessors", "oas3_2Preprocessors", "async2Preprocessors", "async3Preprocessors", "arazzo1Preprocessors", "overlay1Preprocessors", "openrpc1Preprocessors"];
15
4
  export type PreprocessorTypes = (typeof preprocessorTypes)[number];
16
- declare const preprocessorSchema: {
17
- readonly type: "object";
18
- readonly additionalProperties: true;
19
- };
20
- export declare const preprocessorSchemas: Record<PreprocessorTypes, typeof preprocessorSchema>;
21
- export declare const decoratorsSchema: {
22
- readonly type: "object";
23
- readonly additionalProperties: true;
24
- };
25
5
  export declare const decoratorTypes: readonly ["decorators", "oas2Decorators", "oas3_0Decorators", "oas3_1Decorators", "oas3_2Decorators", "async2Decorators", "async3Decorators", "arazzo1Decorators", "overlay1Decorators", "openrpc1Decorators"];
26
6
  export type DecoratorTypes = (typeof decoratorTypes)[number];
27
- export declare const decoratorsSchemas: Record<DecoratorTypes, typeof decoratorsSchema>;
28
- export {};
7
+ export declare const configGovernanceSchema: {
8
+ extends: {
9
+ readonly nodeTypeName: undefined;
10
+ readonly type: "array";
11
+ readonly items: {
12
+ readonly type: "string";
13
+ };
14
+ readonly description: "Use extends to inherit rules and their configurations from other rulesets.";
15
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/extends";
16
+ };
17
+ preprocessors: {
18
+ readonly nodeTypeName: undefined;
19
+ readonly type: "object";
20
+ readonly additionalProperties: true;
21
+ };
22
+ oas2Preprocessors: {
23
+ readonly nodeTypeName: undefined;
24
+ readonly type: "object";
25
+ readonly additionalProperties: true;
26
+ };
27
+ oas3_0Preprocessors: {
28
+ readonly nodeTypeName: undefined;
29
+ readonly type: "object";
30
+ readonly additionalProperties: true;
31
+ };
32
+ oas3_1Preprocessors: {
33
+ readonly nodeTypeName: undefined;
34
+ readonly type: "object";
35
+ readonly additionalProperties: true;
36
+ };
37
+ oas3_2Preprocessors: {
38
+ readonly nodeTypeName: undefined;
39
+ readonly type: "object";
40
+ readonly additionalProperties: true;
41
+ };
42
+ async2Preprocessors: {
43
+ readonly nodeTypeName: undefined;
44
+ readonly type: "object";
45
+ readonly additionalProperties: true;
46
+ };
47
+ async3Preprocessors: {
48
+ readonly nodeTypeName: undefined;
49
+ readonly type: "object";
50
+ readonly additionalProperties: true;
51
+ };
52
+ arazzo1Preprocessors: {
53
+ readonly nodeTypeName: undefined;
54
+ readonly type: "object";
55
+ readonly additionalProperties: true;
56
+ };
57
+ overlay1Preprocessors: {
58
+ readonly nodeTypeName: undefined;
59
+ readonly type: "object";
60
+ readonly additionalProperties: true;
61
+ };
62
+ openrpc1Preprocessors: {
63
+ readonly nodeTypeName: undefined;
64
+ readonly type: "object";
65
+ readonly additionalProperties: true;
66
+ };
67
+ decorators: {
68
+ readonly nodeTypeName: undefined;
69
+ readonly type: "object";
70
+ readonly additionalProperties: true;
71
+ };
72
+ oas2Decorators: {
73
+ readonly nodeTypeName: undefined;
74
+ readonly type: "object";
75
+ readonly additionalProperties: true;
76
+ };
77
+ oas3_0Decorators: {
78
+ readonly nodeTypeName: undefined;
79
+ readonly type: "object";
80
+ readonly additionalProperties: true;
81
+ };
82
+ oas3_1Decorators: {
83
+ readonly nodeTypeName: undefined;
84
+ readonly type: "object";
85
+ readonly additionalProperties: true;
86
+ };
87
+ oas3_2Decorators: {
88
+ readonly nodeTypeName: undefined;
89
+ readonly type: "object";
90
+ readonly additionalProperties: true;
91
+ };
92
+ async2Decorators: {
93
+ readonly nodeTypeName: undefined;
94
+ readonly type: "object";
95
+ readonly additionalProperties: true;
96
+ };
97
+ async3Decorators: {
98
+ readonly nodeTypeName: undefined;
99
+ readonly type: "object";
100
+ readonly additionalProperties: true;
101
+ };
102
+ arazzo1Decorators: {
103
+ readonly nodeTypeName: undefined;
104
+ readonly type: "object";
105
+ readonly additionalProperties: true;
106
+ };
107
+ overlay1Decorators: {
108
+ readonly nodeTypeName: undefined;
109
+ readonly type: "object";
110
+ readonly additionalProperties: true;
111
+ };
112
+ openrpc1Decorators: {
113
+ readonly nodeTypeName: undefined;
114
+ readonly type: "object";
115
+ readonly additionalProperties: true;
116
+ };
117
+ rules: {
118
+ readonly nodeTypeName: undefined;
119
+ readonly type: "object";
120
+ readonly additionalProperties: {
121
+ readonly oneOf: readonly [{
122
+ readonly type: "string";
123
+ }, {
124
+ readonly type: "object";
125
+ }];
126
+ };
127
+ readonly description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.";
128
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules";
129
+ };
130
+ oas2Rules: {
131
+ readonly nodeTypeName: undefined;
132
+ readonly type: "object";
133
+ readonly additionalProperties: {
134
+ readonly oneOf: readonly [{
135
+ readonly type: "string";
136
+ }, {
137
+ readonly type: "object";
138
+ }];
139
+ };
140
+ readonly description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.";
141
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules";
142
+ };
143
+ oas3_0Rules: {
144
+ readonly nodeTypeName: undefined;
145
+ readonly type: "object";
146
+ readonly additionalProperties: {
147
+ readonly oneOf: readonly [{
148
+ readonly type: "string";
149
+ }, {
150
+ readonly type: "object";
151
+ }];
152
+ };
153
+ readonly description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.";
154
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules";
155
+ };
156
+ oas3_1Rules: {
157
+ readonly nodeTypeName: undefined;
158
+ readonly type: "object";
159
+ readonly additionalProperties: {
160
+ readonly oneOf: readonly [{
161
+ readonly type: "string";
162
+ }, {
163
+ readonly type: "object";
164
+ }];
165
+ };
166
+ readonly description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.";
167
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules";
168
+ };
169
+ oas3_2Rules: {
170
+ readonly nodeTypeName: undefined;
171
+ readonly type: "object";
172
+ readonly additionalProperties: {
173
+ readonly oneOf: readonly [{
174
+ readonly type: "string";
175
+ }, {
176
+ readonly type: "object";
177
+ }];
178
+ };
179
+ readonly description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.";
180
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules";
181
+ };
182
+ async2Rules: {
183
+ readonly nodeTypeName: undefined;
184
+ readonly type: "object";
185
+ readonly additionalProperties: {
186
+ readonly oneOf: readonly [{
187
+ readonly type: "string";
188
+ }, {
189
+ readonly type: "object";
190
+ }];
191
+ };
192
+ readonly description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.";
193
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules";
194
+ };
195
+ async3Rules: {
196
+ readonly nodeTypeName: undefined;
197
+ readonly type: "object";
198
+ readonly additionalProperties: {
199
+ readonly oneOf: readonly [{
200
+ readonly type: "string";
201
+ }, {
202
+ readonly type: "object";
203
+ }];
204
+ };
205
+ readonly description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.";
206
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules";
207
+ };
208
+ arazzo1Rules: {
209
+ readonly nodeTypeName: undefined;
210
+ readonly type: "object";
211
+ readonly additionalProperties: {
212
+ readonly oneOf: readonly [{
213
+ readonly type: "string";
214
+ }, {
215
+ readonly type: "object";
216
+ }];
217
+ };
218
+ readonly description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.";
219
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules";
220
+ };
221
+ overlay1Rules: {
222
+ readonly nodeTypeName: undefined;
223
+ readonly type: "object";
224
+ readonly additionalProperties: {
225
+ readonly oneOf: readonly [{
226
+ readonly type: "string";
227
+ }, {
228
+ readonly type: "object";
229
+ }];
230
+ };
231
+ readonly description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.";
232
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules";
233
+ };
234
+ openrpc1Rules: {
235
+ readonly nodeTypeName: undefined;
236
+ readonly type: "object";
237
+ readonly additionalProperties: {
238
+ readonly oneOf: readonly [{
239
+ readonly type: "string";
240
+ }, {
241
+ readonly type: "object";
242
+ }];
243
+ };
244
+ readonly description: "The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.";
245
+ readonly documentationLink: "https://redocly.com/docs/cli/configuration/reference/rules#rules";
246
+ };
247
+ };
package/lib-esm/common.js CHANGED
@@ -1,8 +1,11 @@
1
- export const rulesSchema = {
1
+ const rulesSchema = {
2
+ nodeTypeName: undefined,
2
3
  type: 'object',
3
4
  additionalProperties: {
4
5
  oneOf: [{ type: 'string' }, { type: 'object' }],
5
6
  },
7
+ description: 'The rules configuration blocks set up linting rules and their severity. You can configure built-in rules, add configurable rules, and rules from plugins.',
8
+ documentationLink: 'https://redocly.com/docs/cli/configuration/reference/rules#rules',
6
9
  };
7
10
  export const ruleTypes = [
8
11
  'rules',
@@ -16,7 +19,7 @@ export const ruleTypes = [
16
19
  'overlay1Rules',
17
20
  'openrpc1Rules',
18
21
  ];
19
- export const ruleSchemas = {
22
+ const ruleSchemas = {
20
23
  rules: rulesSchema,
21
24
  oas2Rules: rulesSchema,
22
25
  oas3_0Rules: rulesSchema,
@@ -40,23 +43,25 @@ export const preprocessorTypes = [
40
43
  'overlay1Preprocessors',
41
44
  'openrpc1Preprocessors',
42
45
  ];
43
- const preprocessorSchema = {
46
+ const preprocessorsSchema = {
47
+ nodeTypeName: undefined,
44
48
  type: 'object',
45
49
  additionalProperties: true,
46
50
  };
47
- export const preprocessorSchemas = {
48
- preprocessors: preprocessorSchema,
49
- oas2Preprocessors: preprocessorSchema,
50
- oas3_0Preprocessors: preprocessorSchema,
51
- oas3_1Preprocessors: preprocessorSchema,
52
- oas3_2Preprocessors: preprocessorSchema,
53
- async2Preprocessors: preprocessorSchema,
54
- async3Preprocessors: preprocessorSchema,
55
- arazzo1Preprocessors: preprocessorSchema,
56
- overlay1Preprocessors: preprocessorSchema,
57
- openrpc1Preprocessors: preprocessorSchema,
51
+ const preprocessorSchemas = {
52
+ preprocessors: preprocessorsSchema,
53
+ oas2Preprocessors: preprocessorsSchema,
54
+ oas3_0Preprocessors: preprocessorsSchema,
55
+ oas3_1Preprocessors: preprocessorsSchema,
56
+ oas3_2Preprocessors: preprocessorsSchema,
57
+ async2Preprocessors: preprocessorsSchema,
58
+ async3Preprocessors: preprocessorsSchema,
59
+ arazzo1Preprocessors: preprocessorsSchema,
60
+ overlay1Preprocessors: preprocessorsSchema,
61
+ openrpc1Preprocessors: preprocessorsSchema,
58
62
  };
59
- export const decoratorsSchema = {
63
+ const decoratorsSchema = {
64
+ nodeTypeName: undefined,
60
65
  type: 'object',
61
66
  additionalProperties: true,
62
67
  };
@@ -72,7 +77,7 @@ export const decoratorTypes = [
72
77
  'overlay1Decorators',
73
78
  'openrpc1Decorators',
74
79
  ];
75
- export const decoratorsSchemas = {
80
+ const decoratorSchemas = {
76
81
  decorators: decoratorsSchema,
77
82
  oas2Decorators: decoratorsSchema,
78
83
  oas3_0Decorators: decoratorsSchema,
@@ -84,4 +89,12 @@ export const decoratorsSchemas = {
84
89
  overlay1Decorators: decoratorsSchema,
85
90
  openrpc1Decorators: decoratorsSchema,
86
91
  };
92
+ const extendsSchema = {
93
+ nodeTypeName: undefined,
94
+ type: 'array',
95
+ items: { type: 'string' },
96
+ description: 'Use extends to inherit rules and their configurations from other rulesets.',
97
+ documentationLink: 'https://redocly.com/docs/cli/configuration/reference/extends',
98
+ };
99
+ export const configGovernanceSchema = Object.assign(Object.assign(Object.assign(Object.assign({}, ruleSchemas), decoratorSchemas), preprocessorSchemas), { extends: extendsSchema });
87
100
  //# sourceMappingURL=common.js.map
@@ -0,0 +1,12 @@
1
+ export declare const CONFIG_NODE_TYPE_NAMES: {
2
+ readonly RedirectSource: "RedirectSource";
3
+ readonly Redirects: "Redirects";
4
+ readonly ScorecardClassic: "ScorecardClassic";
5
+ readonly ScorecardClassicLevelList: "ScorecardClassicLevelList";
6
+ readonly ScorecardClassicLevel: "ScorecardClassicLevel";
7
+ readonly ScorecardClassicTargetList: "ScorecardClassicTargetList";
8
+ readonly ScorecardClassicTarget: "ScorecardClassicTarget";
9
+ readonly ScorecardClassicTargetWhere: "ScorecardClassicTargetWhere";
10
+ readonly ScorecardClassicTargetWhereMetadata: "ScorecardClassicTargetWhereMetadata";
11
+ readonly ScorecardClassicTeamMetadataProperty: "ScorecardClassicTeamMetadataProperty";
12
+ };
@@ -0,0 +1,14 @@
1
+ import { createEnum } from './enum';
2
+ export const CONFIG_NODE_TYPE_NAMES = createEnum({
3
+ RedirectSource: 'RedirectSource',
4
+ Redirects: 'Redirects',
5
+ ScorecardClassic: 'ScorecardClassic',
6
+ ScorecardClassicLevelList: 'ScorecardClassicLevelList',
7
+ ScorecardClassicLevel: 'ScorecardClassicLevel',
8
+ ScorecardClassicTargetList: 'ScorecardClassicTargetList',
9
+ ScorecardClassicTarget: 'ScorecardClassicTarget',
10
+ ScorecardClassicTargetWhere: 'ScorecardClassicTargetWhere',
11
+ ScorecardClassicTargetWhereMetadata: 'ScorecardClassicTargetWhereMetadata',
12
+ ScorecardClassicTeamMetadataProperty: 'ScorecardClassicTeamMetadataProperty',
13
+ });
14
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1,45 @@
1
+ export declare const ENTITY_RELATION_TYPES: readonly ["partOf", "hasParts", "creates", "createdBy", "owns", "ownedBy", "implements", "implementedBy", "dependsOn", "dependencyOf", "uses", "usedBy", "produces", "consumes", "linksTo", "supersedes", "supersededBy", "compatibleWith", "extends", "extendedBy", "relatesTo", "hasMember", "memberOf", "triggers", "triggeredBy", "returns", "returnedBy"];
2
+ export declare const ENTITY_NODE_TYPE_NAMES: {
3
+ readonly UserEntity: "UserEntity";
4
+ readonly UserEntityMetadata: "UserEntityMetadata";
5
+ readonly ApiDescriptionEntity: "ApiDescriptionEntity";
6
+ readonly ApiDescriptionEntityMetadata: "ApiDescriptionEntityMetadata";
7
+ readonly ApiOperationEntity: "ApiOperationEntity";
8
+ readonly ApiOperationEntityMetadata: "ApiOperationEntityMetadata";
9
+ readonly DataSchemaEntity: "DataSchemaEntity";
10
+ readonly DataSchemaEntityMetadata: "DataSchemaEntityMetadata";
11
+ readonly ServiceEntity: "ServiceEntity";
12
+ readonly DomainEntity: "DomainEntity";
13
+ readonly TeamEntity: "TeamEntity";
14
+ readonly Entity: "Entity";
15
+ readonly EntityMetadata: "EntityMetadata";
16
+ readonly EntityLinkList: "EntityLinkList";
17
+ readonly EntityLink: "EntityLink";
18
+ readonly EntityRelation: "EntityRelation";
19
+ readonly EntityRelationList: "EntityRelationList";
20
+ readonly EntityContact: "EntityContact";
21
+ readonly EntitySlackContact: "EntitySlackContact";
22
+ readonly EntitySlackChannel: "EntitySlackChannel";
23
+ };
24
+ export declare const NODE_TYPE_NAMES: {
25
+ readonly UserEntity: "UserEntity";
26
+ readonly UserEntityMetadata: "UserEntityMetadata";
27
+ readonly ApiDescriptionEntity: "ApiDescriptionEntity";
28
+ readonly ApiDescriptionEntityMetadata: "ApiDescriptionEntityMetadata";
29
+ readonly ApiOperationEntity: "ApiOperationEntity";
30
+ readonly ApiOperationEntityMetadata: "ApiOperationEntityMetadata";
31
+ readonly DataSchemaEntity: "DataSchemaEntity";
32
+ readonly DataSchemaEntityMetadata: "DataSchemaEntityMetadata";
33
+ readonly ServiceEntity: "ServiceEntity";
34
+ readonly DomainEntity: "DomainEntity";
35
+ readonly TeamEntity: "TeamEntity";
36
+ readonly Entity: "Entity";
37
+ readonly EntityMetadata: "EntityMetadata";
38
+ readonly EntityLinkList: "EntityLinkList";
39
+ readonly EntityLink: "EntityLink";
40
+ readonly EntityRelation: "EntityRelation";
41
+ readonly EntityRelationList: "EntityRelationList";
42
+ readonly EntityContact: "EntityContact";
43
+ readonly EntitySlackContact: "EntitySlackContact";
44
+ readonly EntitySlackChannel: "EntitySlackChannel";
45
+ };
@@ -0,0 +1,55 @@
1
+ import { createEnum } from './enum';
2
+ export const ENTITY_RELATION_TYPES = [
3
+ 'partOf',
4
+ 'hasParts',
5
+ 'creates',
6
+ 'createdBy',
7
+ 'owns',
8
+ 'ownedBy',
9
+ 'implements',
10
+ 'implementedBy',
11
+ 'dependsOn',
12
+ 'dependencyOf',
13
+ 'uses',
14
+ 'usedBy',
15
+ 'produces',
16
+ 'consumes',
17
+ 'linksTo',
18
+ 'supersedes',
19
+ 'supersededBy',
20
+ 'compatibleWith',
21
+ 'extends',
22
+ 'extendedBy',
23
+ 'relatesTo',
24
+ 'hasMember',
25
+ 'memberOf',
26
+ 'triggers',
27
+ 'triggeredBy',
28
+ 'returns',
29
+ 'returnedBy',
30
+ ];
31
+ export const ENTITY_NODE_TYPE_NAMES = createEnum({
32
+ UserEntity: 'UserEntity',
33
+ UserEntityMetadata: 'UserEntityMetadata',
34
+ ApiDescriptionEntity: 'ApiDescriptionEntity',
35
+ ApiDescriptionEntityMetadata: 'ApiDescriptionEntityMetadata',
36
+ ApiOperationEntity: 'ApiOperationEntity',
37
+ ApiOperationEntityMetadata: 'ApiOperationEntityMetadata',
38
+ DataSchemaEntity: 'DataSchemaEntity',
39
+ DataSchemaEntityMetadata: 'DataSchemaEntityMetadata',
40
+ ServiceEntity: 'ServiceEntity',
41
+ DomainEntity: 'DomainEntity',
42
+ TeamEntity: 'TeamEntity',
43
+ Entity: 'Entity',
44
+ EntityMetadata: 'EntityMetadata',
45
+ EntityLinkList: 'EntityLinkList',
46
+ EntityLink: 'EntityLink',
47
+ EntityRelation: 'EntityRelation',
48
+ EntityRelationList: 'EntityRelationList',
49
+ EntityContact: 'EntityContact',
50
+ EntitySlackContact: 'EntitySlackContact',
51
+ EntitySlackChannel: 'EntitySlackChannel',
52
+ });
53
+ // FIXME: remove this once the config is updated in openapi-core and it's updated in the monorepo (https://github.com/Redocly/redocly-cli/pull/2604)
54
+ export const NODE_TYPE_NAMES = ENTITY_NODE_TYPE_NAMES;
55
+ //# sourceMappingURL=entities.js.map
@@ -0,0 +1 @@
1
+ export declare const createEnum: <T extends { [K in keyof T]: K; }>(obj: T) => T;
@@ -0,0 +1,2 @@
1
+ export const createEnum = (obj) => obj;
2
+ //# sourceMappingURL=enum.js.map