@redocly/config 0.41.2 → 0.41.4
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.
- package/lib/constants.d.ts +22 -0
- package/lib/constants.js +23 -1
- package/lib/default-theme-config-schema.d.ts +69 -18
- package/lib/entities-catalog-entity-file-schema.d.ts +105 -0
- package/lib/entities-catalog-entity-file-schema.js +27 -41
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/root-config-schema.d.ts +294 -78
- package/lib/scorecards-config-schema.d.ts +138 -36
- package/lib/scorecards-config-schema.js +15 -11
- package/lib-esm/constants.d.ts +22 -0
- package/lib-esm/constants.js +22 -0
- package/lib-esm/default-theme-config-schema.d.ts +69 -18
- package/lib-esm/entities-catalog-entity-file-schema.d.ts +105 -0
- package/lib-esm/entities-catalog-entity-file-schema.js +28 -42
- package/lib-esm/index.d.ts +1 -1
- package/lib-esm/index.js +1 -1
- package/lib-esm/root-config-schema.d.ts +294 -78
- package/lib-esm/scorecards-config-schema.d.ts +138 -36
- package/lib-esm/scorecards-config-schema.js +15 -11
- package/package.json +3 -3
- package/lib/types/scorecards-types.d.ts +0 -3
- package/lib/types/scorecards-types.js +0 -3
- package/lib-esm/types/scorecards-types.d.ts +0 -3
- package/lib-esm/types/scorecards-types.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const comparisonOperatorSchema = {
|
|
2
2
|
type: 'string',
|
|
3
3
|
enum: [
|
|
4
4
|
'eq',
|
|
@@ -17,30 +17,33 @@ const operatorSchema = {
|
|
|
17
17
|
'some',
|
|
18
18
|
'every',
|
|
19
19
|
'none',
|
|
20
|
-
'and',
|
|
21
|
-
'or',
|
|
22
|
-
'not',
|
|
23
20
|
],
|
|
24
21
|
};
|
|
25
|
-
|
|
22
|
+
const logicalOperatorSchema = {
|
|
23
|
+
type: 'string',
|
|
24
|
+
enum: ['and', 'or'],
|
|
25
|
+
};
|
|
26
|
+
// Base condition schema with field, operator, value, modifier, and match properties
|
|
26
27
|
const conditionSchema = {
|
|
27
28
|
type: 'object',
|
|
28
29
|
properties: {
|
|
29
30
|
field: { type: 'string' },
|
|
30
|
-
operator:
|
|
31
|
+
operator: comparisonOperatorSchema,
|
|
31
32
|
value: {
|
|
32
33
|
oneOf: [{ type: 'boolean' }, { type: 'string' }, { type: 'number' }],
|
|
33
34
|
},
|
|
35
|
+
modifier: { type: 'string', enum: ['not'] },
|
|
34
36
|
match: {
|
|
35
37
|
type: 'array',
|
|
36
38
|
items: {
|
|
37
39
|
type: 'object',
|
|
38
40
|
properties: {
|
|
39
41
|
field: { type: 'string' },
|
|
40
|
-
operator:
|
|
42
|
+
operator: comparisonOperatorSchema,
|
|
41
43
|
value: {
|
|
42
44
|
oneOf: [{ type: 'boolean' }, { type: 'string' }, { type: 'number' }],
|
|
43
45
|
},
|
|
46
|
+
modifier: { type: 'string', enum: ['not'] },
|
|
44
47
|
},
|
|
45
48
|
},
|
|
46
49
|
},
|
|
@@ -50,7 +53,7 @@ const conditionSchema = {
|
|
|
50
53
|
const logicalOperatorConditionSchema = {
|
|
51
54
|
type: 'object',
|
|
52
55
|
properties: {
|
|
53
|
-
operator:
|
|
56
|
+
operator: logicalOperatorSchema,
|
|
54
57
|
conditions: {
|
|
55
58
|
type: 'array',
|
|
56
59
|
items: conditionSchema, // At the deepest level, only simple conditions
|
|
@@ -68,7 +71,7 @@ const conditionsSchema = {
|
|
|
68
71
|
{
|
|
69
72
|
type: 'object',
|
|
70
73
|
properties: {
|
|
71
|
-
operator:
|
|
74
|
+
operator: logicalOperatorSchema,
|
|
72
75
|
conditions: {
|
|
73
76
|
type: 'array',
|
|
74
77
|
items: {
|
|
@@ -205,6 +208,7 @@ export const scorecardSchema = {
|
|
|
205
208
|
type: 'object',
|
|
206
209
|
properties: {
|
|
207
210
|
name: { type: 'string' },
|
|
211
|
+
key: { type: 'string' },
|
|
208
212
|
description: { type: 'string' },
|
|
209
213
|
entities: {
|
|
210
214
|
oneOf: [
|
|
@@ -212,7 +216,7 @@ export const scorecardSchema = {
|
|
|
212
216
|
{
|
|
213
217
|
type: 'object',
|
|
214
218
|
properties: {
|
|
215
|
-
operator:
|
|
219
|
+
operator: logicalOperatorSchema,
|
|
216
220
|
conditions: conditionsSchema,
|
|
217
221
|
},
|
|
218
222
|
required: ['operator', 'conditions'],
|
|
@@ -227,7 +231,7 @@ export const scorecardSchema = {
|
|
|
227
231
|
},
|
|
228
232
|
trigger: triggerSchema,
|
|
229
233
|
},
|
|
230
|
-
required: ['name', 'entities', 'levels'],
|
|
234
|
+
required: ['name', 'key', 'entities', 'levels'],
|
|
231
235
|
additionalProperties: false,
|
|
232
236
|
};
|
|
233
237
|
export const scorecardsConfigSchema = {
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/config",
|
|
3
|
-
"version": "0.41.
|
|
3
|
+
"version": "0.41.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@markdoc/markdoc": "0.5.2",
|
|
10
|
-
"@redocly/openapi-core": "
|
|
10
|
+
"@redocly/openapi-core": "0.0.0-snapshot.1769511679",
|
|
11
11
|
"@types/node": "22.18.13",
|
|
12
12
|
"@types/react": "^19.2.7",
|
|
13
13
|
"@vitest/coverage-v8": "4.0.10",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"clean": "rimraf lib",
|
|
24
24
|
"compile": "tsc -p tsconfig.build.json && tsc -p tsconfig.lib-esm.json",
|
|
25
|
-
"build": "
|
|
25
|
+
"build": "pnpm run clean && pnpm run compile",
|
|
26
26
|
"test": "vitest run src"
|
|
27
27
|
}
|
|
28
28
|
}
|