@redocly/config 0.43.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.
Files changed (65) hide show
  1. package/lib/asyncapi-config-schema.d.ts +300 -0
  2. package/lib/asyncapi-config-schema.js +53 -0
  3. package/lib/common.d.ts +241 -22
  4. package/lib/common.js +50 -37
  5. package/lib/constants/config.d.ts +12 -0
  6. package/lib/constants/config.js +17 -0
  7. package/lib/constants/entities.d.ts +45 -0
  8. package/lib/constants/entities.js +58 -0
  9. package/lib/constants/enum.d.ts +1 -0
  10. package/lib/constants/enum.js +6 -0
  11. package/lib/constants/shared.d.ts +15 -0
  12. package/lib/constants/shared.js +22 -0
  13. package/lib/default-theme-config-schema.d.ts +3205 -2762
  14. package/lib/default-theme-config-schema.js +3 -1
  15. package/lib/entities-catalog-entity-file-schema.js +22 -22
  16. package/lib/ex-theme-config-schemas.d.ts +1903 -26
  17. package/lib/ex-theme-config-schemas.js +25 -3
  18. package/lib/index.d.ts +3 -1
  19. package/lib/index.js +13 -10
  20. package/lib/product-override-schema.d.ts +73 -20
  21. package/lib/remove-property-recursively.d.ts +1 -1
  22. package/lib/remove-property-recursively.js +7 -4
  23. package/lib/root-config-schema.d.ts +3715 -1713
  24. package/lib/root-config-schema.js +18 -11
  25. package/lib/scorecards-config-schema.d.ts +6 -0
  26. package/lib/scorecards-config-schema.js +2 -4
  27. package/lib/types/asyncapi-types.d.ts +14 -0
  28. package/lib/types/asyncapi-types.js +3 -0
  29. package/lib/types/config-types.d.ts +2 -0
  30. package/lib/types/portal-shared-types.d.ts +1 -1
  31. package/lib-esm/asyncapi-config-schema.d.ts +300 -0
  32. package/lib-esm/asyncapi-config-schema.js +50 -0
  33. package/lib-esm/common.d.ts +241 -22
  34. package/lib-esm/common.js +29 -16
  35. package/lib-esm/constants/config.d.ts +12 -0
  36. package/lib-esm/constants/config.js +14 -0
  37. package/lib-esm/constants/entities.d.ts +45 -0
  38. package/lib-esm/constants/entities.js +55 -0
  39. package/lib-esm/constants/enum.d.ts +1 -0
  40. package/lib-esm/constants/enum.js +2 -0
  41. package/lib-esm/constants/shared.d.ts +15 -0
  42. package/lib-esm/constants/shared.js +19 -0
  43. package/lib-esm/default-theme-config-schema.d.ts +3205 -2762
  44. package/lib-esm/default-theme-config-schema.js +3 -1
  45. package/lib-esm/entities-catalog-entity-file-schema.js +21 -21
  46. package/lib-esm/ex-theme-config-schemas.d.ts +1903 -26
  47. package/lib-esm/ex-theme-config-schemas.js +25 -3
  48. package/lib-esm/index.d.ts +3 -1
  49. package/lib-esm/index.js +3 -1
  50. package/lib-esm/product-override-schema.d.ts +73 -20
  51. package/lib-esm/remove-property-recursively.d.ts +1 -1
  52. package/lib-esm/remove-property-recursively.js +7 -4
  53. package/lib-esm/root-config-schema.d.ts +3715 -1713
  54. package/lib-esm/root-config-schema.js +14 -7
  55. package/lib-esm/scorecards-config-schema.d.ts +6 -0
  56. package/lib-esm/scorecards-config-schema.js +2 -4
  57. package/lib-esm/types/asyncapi-types.d.ts +14 -0
  58. package/lib-esm/types/asyncapi-types.js +2 -0
  59. package/lib-esm/types/config-types.d.ts +2 -0
  60. package/lib-esm/types/portal-shared-types.d.ts +1 -1
  61. package/package.json +2 -2
  62. package/lib/constants.d.ts +0 -38
  63. package/lib/constants.js +0 -73
  64. package/lib-esm/constants.d.ts +0 -38
  65. package/lib-esm/constants.js +0 -70
package/lib/common.js CHANGED
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.decoratorsSchemas = exports.decoratorTypes = exports.decoratorsSchema = exports.preprocessorSchemas = exports.preprocessorTypes = exports.ruleSchemas = exports.ruleTypes = exports.rulesSchema = void 0;
4
- exports.rulesSchema = {
3
+ exports.configGovernanceSchema = exports.decoratorTypes = exports.preprocessorTypes = exports.ruleTypes = void 0;
4
+ const rulesSchema = {
5
+ nodeTypeName: undefined,
5
6
  type: 'object',
6
7
  additionalProperties: {
7
8
  oneOf: [{ type: 'string' }, { type: 'object' }],
8
9
  },
10
+ 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.',
11
+ documentationLink: 'https://redocly.com/docs/cli/configuration/reference/rules#rules',
9
12
  };
10
13
  exports.ruleTypes = [
11
14
  'rules',
@@ -19,17 +22,17 @@ exports.ruleTypes = [
19
22
  'overlay1Rules',
20
23
  'openrpc1Rules',
21
24
  ];
22
- exports.ruleSchemas = {
23
- rules: exports.rulesSchema,
24
- oas2Rules: exports.rulesSchema,
25
- oas3_0Rules: exports.rulesSchema,
26
- oas3_1Rules: exports.rulesSchema,
27
- oas3_2Rules: exports.rulesSchema,
28
- async2Rules: exports.rulesSchema,
29
- async3Rules: exports.rulesSchema,
30
- arazzo1Rules: exports.rulesSchema,
31
- overlay1Rules: exports.rulesSchema,
32
- openrpc1Rules: exports.rulesSchema,
25
+ const ruleSchemas = {
26
+ rules: rulesSchema,
27
+ oas2Rules: rulesSchema,
28
+ oas3_0Rules: rulesSchema,
29
+ oas3_1Rules: rulesSchema,
30
+ oas3_2Rules: rulesSchema,
31
+ async2Rules: rulesSchema,
32
+ async3Rules: rulesSchema,
33
+ arazzo1Rules: rulesSchema,
34
+ overlay1Rules: rulesSchema,
35
+ openrpc1Rules: rulesSchema,
33
36
  };
34
37
  exports.preprocessorTypes = [
35
38
  'preprocessors',
@@ -43,23 +46,25 @@ exports.preprocessorTypes = [
43
46
  'overlay1Preprocessors',
44
47
  'openrpc1Preprocessors',
45
48
  ];
46
- const preprocessorSchema = {
49
+ const preprocessorsSchema = {
50
+ nodeTypeName: undefined,
47
51
  type: 'object',
48
52
  additionalProperties: true,
49
53
  };
50
- exports.preprocessorSchemas = {
51
- preprocessors: preprocessorSchema,
52
- oas2Preprocessors: preprocessorSchema,
53
- oas3_0Preprocessors: preprocessorSchema,
54
- oas3_1Preprocessors: preprocessorSchema,
55
- oas3_2Preprocessors: preprocessorSchema,
56
- async2Preprocessors: preprocessorSchema,
57
- async3Preprocessors: preprocessorSchema,
58
- arazzo1Preprocessors: preprocessorSchema,
59
- overlay1Preprocessors: preprocessorSchema,
60
- openrpc1Preprocessors: preprocessorSchema,
54
+ const preprocessorSchemas = {
55
+ preprocessors: preprocessorsSchema,
56
+ oas2Preprocessors: preprocessorsSchema,
57
+ oas3_0Preprocessors: preprocessorsSchema,
58
+ oas3_1Preprocessors: preprocessorsSchema,
59
+ oas3_2Preprocessors: preprocessorsSchema,
60
+ async2Preprocessors: preprocessorsSchema,
61
+ async3Preprocessors: preprocessorsSchema,
62
+ arazzo1Preprocessors: preprocessorsSchema,
63
+ overlay1Preprocessors: preprocessorsSchema,
64
+ openrpc1Preprocessors: preprocessorsSchema,
61
65
  };
62
- exports.decoratorsSchema = {
66
+ const decoratorsSchema = {
67
+ nodeTypeName: undefined,
63
68
  type: 'object',
64
69
  additionalProperties: true,
65
70
  };
@@ -75,16 +80,24 @@ exports.decoratorTypes = [
75
80
  'overlay1Decorators',
76
81
  'openrpc1Decorators',
77
82
  ];
78
- exports.decoratorsSchemas = {
79
- decorators: exports.decoratorsSchema,
80
- oas2Decorators: exports.decoratorsSchema,
81
- oas3_0Decorators: exports.decoratorsSchema,
82
- oas3_1Decorators: exports.decoratorsSchema,
83
- oas3_2Decorators: exports.decoratorsSchema,
84
- async2Decorators: exports.decoratorsSchema,
85
- async3Decorators: exports.decoratorsSchema,
86
- arazzo1Decorators: exports.decoratorsSchema,
87
- overlay1Decorators: exports.decoratorsSchema,
88
- openrpc1Decorators: exports.decoratorsSchema,
83
+ const decoratorSchemas = {
84
+ decorators: decoratorsSchema,
85
+ oas2Decorators: decoratorsSchema,
86
+ oas3_0Decorators: decoratorsSchema,
87
+ oas3_1Decorators: decoratorsSchema,
88
+ oas3_2Decorators: decoratorsSchema,
89
+ async2Decorators: decoratorsSchema,
90
+ async3Decorators: decoratorsSchema,
91
+ arazzo1Decorators: decoratorsSchema,
92
+ overlay1Decorators: decoratorsSchema,
93
+ openrpc1Decorators: decoratorsSchema,
89
94
  };
95
+ const extendsSchema = {
96
+ nodeTypeName: undefined,
97
+ type: 'array',
98
+ items: { type: 'string' },
99
+ description: 'Use extends to inherit rules and their configurations from other rulesets.',
100
+ documentationLink: 'https://redocly.com/docs/cli/configuration/reference/extends',
101
+ };
102
+ exports.configGovernanceSchema = Object.assign(Object.assign(Object.assign(Object.assign({}, ruleSchemas), decoratorSchemas), preprocessorSchemas), { extends: extendsSchema });
90
103
  //# 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,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONFIG_NODE_TYPE_NAMES = void 0;
4
+ const enum_1 = require("./enum");
5
+ exports.CONFIG_NODE_TYPE_NAMES = (0, enum_1.createEnum)({
6
+ RedirectSource: 'RedirectSource',
7
+ Redirects: 'Redirects',
8
+ ScorecardClassic: 'ScorecardClassic',
9
+ ScorecardClassicLevelList: 'ScorecardClassicLevelList',
10
+ ScorecardClassicLevel: 'ScorecardClassicLevel',
11
+ ScorecardClassicTargetList: 'ScorecardClassicTargetList',
12
+ ScorecardClassicTarget: 'ScorecardClassicTarget',
13
+ ScorecardClassicTargetWhere: 'ScorecardClassicTargetWhere',
14
+ ScorecardClassicTargetWhereMetadata: 'ScorecardClassicTargetWhereMetadata',
15
+ ScorecardClassicTeamMetadataProperty: 'ScorecardClassicTeamMetadataProperty',
16
+ });
17
+ //# 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,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NODE_TYPE_NAMES = exports.ENTITY_NODE_TYPE_NAMES = exports.ENTITY_RELATION_TYPES = void 0;
4
+ const enum_1 = require("./enum");
5
+ exports.ENTITY_RELATION_TYPES = [
6
+ 'partOf',
7
+ 'hasParts',
8
+ 'creates',
9
+ 'createdBy',
10
+ 'owns',
11
+ 'ownedBy',
12
+ 'implements',
13
+ 'implementedBy',
14
+ 'dependsOn',
15
+ 'dependencyOf',
16
+ 'uses',
17
+ 'usedBy',
18
+ 'produces',
19
+ 'consumes',
20
+ 'linksTo',
21
+ 'supersedes',
22
+ 'supersededBy',
23
+ 'compatibleWith',
24
+ 'extends',
25
+ 'extendedBy',
26
+ 'relatesTo',
27
+ 'hasMember',
28
+ 'memberOf',
29
+ 'triggers',
30
+ 'triggeredBy',
31
+ 'returns',
32
+ 'returnedBy',
33
+ ];
34
+ exports.ENTITY_NODE_TYPE_NAMES = (0, enum_1.createEnum)({
35
+ UserEntity: 'UserEntity',
36
+ UserEntityMetadata: 'UserEntityMetadata',
37
+ ApiDescriptionEntity: 'ApiDescriptionEntity',
38
+ ApiDescriptionEntityMetadata: 'ApiDescriptionEntityMetadata',
39
+ ApiOperationEntity: 'ApiOperationEntity',
40
+ ApiOperationEntityMetadata: 'ApiOperationEntityMetadata',
41
+ DataSchemaEntity: 'DataSchemaEntity',
42
+ DataSchemaEntityMetadata: 'DataSchemaEntityMetadata',
43
+ ServiceEntity: 'ServiceEntity',
44
+ DomainEntity: 'DomainEntity',
45
+ TeamEntity: 'TeamEntity',
46
+ Entity: 'Entity',
47
+ EntityMetadata: 'EntityMetadata',
48
+ EntityLinkList: 'EntityLinkList',
49
+ EntityLink: 'EntityLink',
50
+ EntityRelation: 'EntityRelation',
51
+ EntityRelationList: 'EntityRelationList',
52
+ EntityContact: 'EntityContact',
53
+ EntitySlackContact: 'EntitySlackContact',
54
+ EntitySlackChannel: 'EntitySlackChannel',
55
+ });
56
+ // 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)
57
+ exports.NODE_TYPE_NAMES = exports.ENTITY_NODE_TYPE_NAMES;
58
+ //# 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,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createEnum = void 0;
4
+ const createEnum = (obj) => obj;
5
+ exports.createEnum = createEnum;
6
+ //# sourceMappingURL=enum.js.map
@@ -0,0 +1,15 @@
1
+ export declare const DEFAULT_TEAM_CLAIM_NAME = "https://redocly.com/sso/teams";
2
+ export declare enum AuthProviderType {
3
+ OIDC = "OIDC",
4
+ SAML2 = "SAML2"
5
+ }
6
+ export declare enum ApigeeDevOnboardingIntegrationAuthType {
7
+ SERVICE_ACCOUNT = "SERVICE_ACCOUNT",
8
+ OAUTH2 = "OAUTH2"
9
+ }
10
+ export declare const REDOCLY_TEAMS_RBAC = "redocly::teams-rbac";
11
+ export declare const REDOCLY_ROUTE_RBAC = "redocly::route-rbac";
12
+ export declare enum LayoutVariant {
13
+ STACKED = "stacked",
14
+ THREE_PANEL = "three-panel"
15
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LayoutVariant = exports.REDOCLY_ROUTE_RBAC = exports.REDOCLY_TEAMS_RBAC = exports.ApigeeDevOnboardingIntegrationAuthType = exports.AuthProviderType = exports.DEFAULT_TEAM_CLAIM_NAME = void 0;
4
+ exports.DEFAULT_TEAM_CLAIM_NAME = 'https://redocly.com/sso/teams';
5
+ var AuthProviderType;
6
+ (function (AuthProviderType) {
7
+ AuthProviderType["OIDC"] = "OIDC";
8
+ AuthProviderType["SAML2"] = "SAML2";
9
+ })(AuthProviderType || (exports.AuthProviderType = AuthProviderType = {}));
10
+ var ApigeeDevOnboardingIntegrationAuthType;
11
+ (function (ApigeeDevOnboardingIntegrationAuthType) {
12
+ ApigeeDevOnboardingIntegrationAuthType["SERVICE_ACCOUNT"] = "SERVICE_ACCOUNT";
13
+ ApigeeDevOnboardingIntegrationAuthType["OAUTH2"] = "OAUTH2";
14
+ })(ApigeeDevOnboardingIntegrationAuthType || (exports.ApigeeDevOnboardingIntegrationAuthType = ApigeeDevOnboardingIntegrationAuthType = {}));
15
+ exports.REDOCLY_TEAMS_RBAC = 'redocly::teams-rbac';
16
+ exports.REDOCLY_ROUTE_RBAC = 'redocly::route-rbac';
17
+ var LayoutVariant;
18
+ (function (LayoutVariant) {
19
+ LayoutVariant["STACKED"] = "stacked";
20
+ LayoutVariant["THREE_PANEL"] = "three-panel";
21
+ })(LayoutVariant || (exports.LayoutVariant = LayoutVariant = {}));
22
+ //# sourceMappingURL=shared.js.map