@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.
@@ -1,4 +1,4 @@
1
- const operatorSchema = {
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
- // Base condition schema with field, operator, value, and match properties
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: operatorSchema,
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: operatorSchema,
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: operatorSchema,
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: operatorSchema,
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: operatorSchema,
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.2",
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": "2.14.3",
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": "npm run clean && npm run compile",
25
+ "build": "pnpm run clean && pnpm run compile",
26
26
  "test": "vitest run src"
27
27
  }
28
28
  }
@@ -1,3 +0,0 @@
1
- export type ScorecardsConfig = {
2
- test: boolean;
3
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=scorecards-types.js.map
@@ -1,3 +0,0 @@
1
- export type ScorecardsConfig = {
2
- test: boolean;
3
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=scorecards-types.js.map