@redocly/config 0.48.0 → 0.48.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 (80) hide show
  1. package/lib/index.d.ts +9 -9
  2. package/lib/index.js +1 -41
  3. package/lib/package.json +3 -0
  4. package/lib/root-config-schema.d.ts +1 -1
  5. package/lib/types/api-functions-types.d.ts +2 -2
  6. package/lib/types/asyncapi-types.d.ts +1 -1
  7. package/lib/types/catalog-entity-types.d.ts +2 -2
  8. package/lib/types/config-types.d.ts +10 -10
  9. package/lib/types/graphql-types.d.ts +1 -1
  10. package/lib/types/index.d.ts +4 -4
  11. package/lib/types/portal-shared-types.d.ts +4 -4
  12. package/lib/types/redoc-types.d.ts +1 -1
  13. package/lib-esm/index.d.ts +9 -9
  14. package/lib-esm/index.js +1 -10
  15. package/lib-esm/root-config-schema.d.ts +1 -1
  16. package/lib-esm/types/api-functions-types.d.ts +2 -2
  17. package/lib-esm/types/asyncapi-types.d.ts +1 -1
  18. package/lib-esm/types/catalog-entity-types.d.ts +2 -2
  19. package/lib-esm/types/config-types.d.ts +10 -10
  20. package/lib-esm/types/graphql-types.d.ts +1 -1
  21. package/lib-esm/types/index.d.ts +4 -4
  22. package/lib-esm/types/portal-shared-types.d.ts +4 -4
  23. package/lib-esm/types/redoc-types.d.ts +1 -1
  24. package/package.json +19 -4
  25. package/lib/asyncapi-config-schema.js +0 -53
  26. package/lib/common.js +0 -103
  27. package/lib/constants/config.js +0 -17
  28. package/lib/constants/entities.js +0 -58
  29. package/lib/constants/enum.js +0 -6
  30. package/lib/constants/shared.js +0 -22
  31. package/lib/default-theme-config-schema.js +0 -57
  32. package/lib/entities-catalog-config-schema.js +0 -186
  33. package/lib/entities-catalog-entity-file-schema.js +0 -283
  34. package/lib/ex-theme-config-schemas.js +0 -687
  35. package/lib/feedback-config-schema.js +0 -88
  36. package/lib/graphql-config-schema.js +0 -157
  37. package/lib/product-override-schema.js +0 -44
  38. package/lib/redoc-config-schema.js +0 -120
  39. package/lib/reference-docs-config-schema.js +0 -518
  40. package/lib/remove-property-recursively.js +0 -28
  41. package/lib/reunite-config-schema.js +0 -103
  42. package/lib/root-config-schema.js +0 -588
  43. package/lib/scorecards-config-schema.js +0 -242
  44. package/lib/types/api-functions-types.js +0 -3
  45. package/lib/types/asyncapi-types.js +0 -3
  46. package/lib/types/catalog-entity-types.js +0 -3
  47. package/lib/types/code-walkthrough-types.js +0 -3
  48. package/lib/types/config-types.js +0 -3
  49. package/lib/types/graphql-types.js +0 -3
  50. package/lib/types/index.js +0 -21
  51. package/lib/types/portal-shared-types.js +0 -18
  52. package/lib/types/redoc-types.js +0 -3
  53. package/lib-esm/asyncapi-config-schema.js +0 -50
  54. package/lib-esm/common.js +0 -100
  55. package/lib-esm/constants/config.js +0 -14
  56. package/lib-esm/constants/entities.js +0 -55
  57. package/lib-esm/constants/enum.js +0 -2
  58. package/lib-esm/constants/shared.js +0 -19
  59. package/lib-esm/default-theme-config-schema.js +0 -54
  60. package/lib-esm/entities-catalog-config-schema.js +0 -183
  61. package/lib-esm/entities-catalog-entity-file-schema.js +0 -280
  62. package/lib-esm/ex-theme-config-schemas.js +0 -684
  63. package/lib-esm/feedback-config-schema.js +0 -85
  64. package/lib-esm/graphql-config-schema.js +0 -154
  65. package/lib-esm/product-override-schema.js +0 -41
  66. package/lib-esm/redoc-config-schema.js +0 -117
  67. package/lib-esm/reference-docs-config-schema.js +0 -515
  68. package/lib-esm/remove-property-recursively.js +0 -25
  69. package/lib-esm/reunite-config-schema.js +0 -100
  70. package/lib-esm/root-config-schema.js +0 -585
  71. package/lib-esm/scorecards-config-schema.js +0 -239
  72. package/lib-esm/types/api-functions-types.js +0 -2
  73. package/lib-esm/types/asyncapi-types.js +0 -2
  74. package/lib-esm/types/catalog-entity-types.js +0 -2
  75. package/lib-esm/types/code-walkthrough-types.js +0 -2
  76. package/lib-esm/types/config-types.js +0 -2
  77. package/lib-esm/types/graphql-types.js +0 -2
  78. package/lib-esm/types/index.js +0 -5
  79. package/lib-esm/types/portal-shared-types.js +0 -2
  80. package/lib-esm/types/redoc-types.js +0 -2
@@ -1,515 +0,0 @@
1
- // Needed for supporting deprecated Reference Docs config options
2
- // Transferred from https://github.com/Redocly/redocly-cli/blob/main/packages/core/src/types/redocly-yaml.ts
3
- const ConfigLanguage = {
4
- type: 'object',
5
- properties: {
6
- label: { type: 'string' },
7
- lang: {
8
- enum: [
9
- 'curl',
10
- 'C#',
11
- 'Go',
12
- 'Java',
13
- 'Java8+Apache',
14
- 'JavaScript',
15
- 'Node.js',
16
- 'PHP',
17
- 'Python',
18
- 'R',
19
- 'Ruby',
20
- ],
21
- },
22
- },
23
- required: ['lang'],
24
- };
25
- const ConfigLabels = {
26
- type: 'object',
27
- properties: {
28
- enum: { type: 'string' },
29
- enumSingleValue: { type: 'string' },
30
- enumArray: { type: 'string' },
31
- default: { type: 'string' },
32
- deprecated: { type: 'string' },
33
- example: { type: 'string' },
34
- examples: { type: 'string' },
35
- nullable: { type: 'string' },
36
- recursive: { type: 'string' },
37
- arrayOf: { type: 'string' },
38
- webhook: { type: 'string' },
39
- authorizations: { type: 'string' },
40
- tryItAuthBasicUsername: { type: 'string' },
41
- tryItAuthBasicPassword: { type: 'string' },
42
- },
43
- };
44
- const CommonConfigSidebarLinks = {
45
- type: 'object',
46
- properties: {
47
- label: { type: 'string' },
48
- link: { type: 'string' },
49
- target: { type: 'string' },
50
- },
51
- required: ['label', 'link'],
52
- };
53
- const ConfigSidebarLinks = {
54
- type: 'object',
55
- properties: {
56
- beforeInfo: { type: 'array', items: CommonConfigSidebarLinks },
57
- end: { type: 'array', items: CommonConfigSidebarLinks },
58
- },
59
- };
60
- const CommonThemeColors = {
61
- type: 'object',
62
- properties: {
63
- main: { type: 'string' },
64
- light: { type: 'string' },
65
- dark: { type: 'string' },
66
- contrastText: { type: 'string' },
67
- },
68
- };
69
- const CommonColorProps = {
70
- type: 'object',
71
- properties: {
72
- backgroundColor: { type: 'string' },
73
- borderColor: { type: 'string' },
74
- color: { type: 'string' },
75
- tabTextColor: { type: 'string' },
76
- },
77
- };
78
- const BorderThemeColors = {
79
- type: 'object',
80
- properties: pickObjectProps(CommonThemeColors.properties, ['light', 'dark']),
81
- };
82
- const HttpColors = {
83
- type: 'object',
84
- properties: {
85
- basic: { type: 'string' },
86
- delete: { type: 'string' },
87
- get: { type: 'string' },
88
- head: { type: 'string' },
89
- link: { type: 'string' },
90
- options: { type: 'string' },
91
- patch: { type: 'string' },
92
- post: { type: 'string' },
93
- put: { type: 'string' },
94
- },
95
- };
96
- const ResponseColors = {
97
- type: 'object',
98
- properties: {
99
- error: CommonColorProps,
100
- info: CommonColorProps,
101
- redirect: CommonColorProps,
102
- success: CommonColorProps,
103
- },
104
- };
105
- const SecondaryColors = {
106
- type: 'object',
107
- properties: omitObjectProps(CommonThemeColors.properties, ['dark']),
108
- };
109
- const TextThemeColors = {
110
- type: 'object',
111
- properties: {
112
- primary: { type: 'string' },
113
- secondary: { type: 'string' },
114
- light: { type: 'string' },
115
- },
116
- };
117
- const ThemeColors = {
118
- type: 'object',
119
- properties: {
120
- accent: CommonThemeColors,
121
- border: BorderThemeColors,
122
- error: CommonThemeColors,
123
- http: HttpColors,
124
- primary: CommonThemeColors,
125
- responses: ResponseColors,
126
- secondary: SecondaryColors,
127
- success: CommonThemeColors,
128
- text: TextThemeColors,
129
- tonalOffset: { type: 'number' },
130
- warning: CommonThemeColors,
131
- },
132
- };
133
- const SizeProps = {
134
- type: 'object',
135
- properties: {
136
- fontSize: { type: 'string' },
137
- padding: { type: 'string' },
138
- minWidth: { type: 'string' },
139
- },
140
- };
141
- const Sizes = {
142
- type: 'object',
143
- properties: {
144
- small: SizeProps,
145
- medium: SizeProps,
146
- large: SizeProps,
147
- xlarge: SizeProps,
148
- },
149
- };
150
- const FontConfig = {
151
- type: 'object',
152
- properties: {
153
- fontFamily: { type: 'string' },
154
- fontSize: { type: 'string' },
155
- fontWeight: { type: 'string' },
156
- lineHeight: { type: 'string' },
157
- },
158
- };
159
- const ButtonsConfig = {
160
- type: 'object',
161
- properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontSize', 'lineHeight'])), { borderRadius: { type: 'string' }, hoverStyle: { type: 'string' }, boxShadow: { type: 'string' }, hoverBoxShadow: { type: 'string' }, sizes: Sizes }),
162
- };
163
- const BadgeFontConfig = {
164
- type: 'object',
165
- properties: pickObjectProps(FontConfig.properties, ['fontSize', 'lineHeight']),
166
- };
167
- const BadgeSizes = {
168
- type: 'object',
169
- properties: {
170
- medium: BadgeFontConfig,
171
- small: BadgeFontConfig,
172
- },
173
- };
174
- const HttpBadgesConfig = {
175
- type: 'object',
176
- properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontSize', 'lineHeight'])), { borderRadius: { type: 'string' }, color: { type: 'string' }, sizes: BadgeSizes }),
177
- };
178
- const LabelControls = {
179
- type: 'object',
180
- properties: {
181
- top: { type: 'string' },
182
- width: { type: 'string' },
183
- height: { type: 'string' },
184
- },
185
- };
186
- const Panels = {
187
- type: 'object',
188
- properties: {
189
- borderRadius: { type: 'string' },
190
- backgroundColor: { type: 'string' },
191
- },
192
- };
193
- const TryItButton = {
194
- type: 'object',
195
- properties: {
196
- fullWidth: { type: 'boolean' },
197
- },
198
- };
199
- const ConfigThemeComponents = {
200
- type: 'object',
201
- properties: {
202
- buttons: ButtonsConfig,
203
- httpBadges: HttpBadgesConfig,
204
- layoutControls: LabelControls,
205
- panels: Panels,
206
- tryItButton: TryItButton,
207
- tryItSendButton: TryItButton,
208
- },
209
- };
210
- const Breakpoints = {
211
- type: 'object',
212
- properties: {
213
- small: { type: 'string' },
214
- medium: { type: 'string' },
215
- large: { type: 'string' },
216
- },
217
- };
218
- const StackedConfig = {
219
- type: 'object',
220
- properties: {
221
- maxWidth: Breakpoints,
222
- },
223
- };
224
- const ThreePanelConfig = {
225
- type: 'object',
226
- properties: {
227
- maxWidth: Breakpoints,
228
- middlePanelMaxWidth: Breakpoints,
229
- },
230
- };
231
- const Layout = {
232
- type: 'object',
233
- properties: {
234
- showDarkRightPanel: { type: 'boolean' },
235
- stacked: StackedConfig,
236
- 'three-panel': ThreePanelConfig,
237
- },
238
- };
239
- const SchemaColorsConfig = {
240
- type: 'object',
241
- properties: {
242
- backgroundColor: { type: 'string' },
243
- border: { type: 'string' },
244
- },
245
- };
246
- const ConfigThemeSchema = {
247
- type: 'object',
248
- properties: {
249
- breakFieldNames: { type: 'boolean' },
250
- caretColor: { type: 'string' },
251
- caretSize: { type: 'string' },
252
- constraints: SchemaColorsConfig,
253
- defaultDetailsWidth: { type: 'string' },
254
- examples: SchemaColorsConfig,
255
- labelsTextSize: { type: 'string' },
256
- linesColor: { type: 'string' },
257
- nestedBackground: { type: 'string' },
258
- nestingSpacing: { type: 'string' },
259
- requireLabelColor: { type: 'string' },
260
- typeNameColor: { type: 'string' },
261
- typeTitleColor: { type: 'string' },
262
- },
263
- };
264
- const GroupItemsConfig = {
265
- type: 'object',
266
- properties: {
267
- subItemsColor: { type: 'string' },
268
- textTransform: { type: 'string' },
269
- fontWeight: { type: 'string' },
270
- },
271
- };
272
- const Level1Items = {
273
- type: 'object',
274
- properties: pickObjectProps(GroupItemsConfig.properties, ['textTransform']),
275
- };
276
- const SpacingConfig = {
277
- type: 'object',
278
- properties: {
279
- unit: { type: 'number' },
280
- paddingHorizontal: { type: 'string' },
281
- paddingVertical: { type: 'string' },
282
- offsetTop: { type: 'string' },
283
- offsetLeft: { type: 'string' },
284
- offsetNesting: { type: 'string' },
285
- },
286
- };
287
- const Sidebar = {
288
- type: 'object',
289
- properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontWeight', 'lineHeight'])), { activeBgColor: { type: 'string' }, activeTextColor: { type: 'string' }, backgroundColor: { type: 'string' }, borderRadius: { type: 'string' }, breakPath: { type: 'boolean' }, caretColor: { type: 'string' }, caretSize: { type: 'string' }, groupItems: GroupItemsConfig, level1items: Level1Items, rightLineColor: { type: 'string' }, separatorLabelColor: { type: 'string' }, showAtBreakpoint: { type: 'string' }, spacing: SpacingConfig, textColor: { type: 'string' }, width: { type: 'string' } }),
290
- };
291
- const Heading = {
292
- type: 'object',
293
- properties: Object.assign(Object.assign({}, FontConfig.properties), { color: { type: 'string' }, transform: { type: 'string' } }),
294
- };
295
- const CodeConfig = {
296
- type: 'object',
297
- properties: Object.assign(Object.assign({}, FontConfig.properties), { backgroundColor: { type: 'string' }, color: { type: 'string' }, wordBreak: {
298
- type: 'string',
299
- enum: [
300
- 'break-all',
301
- 'break-word',
302
- 'keep-all',
303
- 'normal',
304
- 'revert',
305
- 'unset',
306
- 'inherit',
307
- 'initial',
308
- ],
309
- }, wrap: { type: 'boolean' } }),
310
- };
311
- const HeadingsConfig = {
312
- type: 'object',
313
- properties: omitObjectProps(FontConfig.properties, ['fontSize']),
314
- };
315
- const LinksConfig = {
316
- type: 'object',
317
- properties: {
318
- color: { type: 'string' },
319
- hover: { type: 'string' },
320
- textDecoration: { type: 'string' },
321
- hoverTextDecoration: { type: 'string' },
322
- visited: { type: 'string' },
323
- },
324
- };
325
- const Typography = {
326
- type: 'object',
327
- properties: Object.assign(Object.assign({ code: CodeConfig, fieldName: FontConfig }, pickObjectProps(FontConfig.properties, ['fontSize', 'fontFamily'])), { fontWeightBold: { type: 'string' }, fontWeightLight: { type: 'string' }, fontWeightRegular: { type: 'string' }, heading1: Heading, heading2: Heading, heading3: Heading, headings: HeadingsConfig, lineHeight: { type: 'string' }, links: LinksConfig, optimizeSpeed: { type: 'boolean' }, rightPanelHeading: Heading, smoothing: {
328
- type: 'string',
329
- enum: ['auto', 'none', 'antialiased', 'subpixel-antialiased', 'grayscale'],
330
- } }),
331
- };
332
- const TokenProps = {
333
- type: 'object',
334
- properties: Object.assign({ color: { type: 'string' } }, omitObjectProps(FontConfig.properties, ['fontWeight'])),
335
- };
336
- const CodeBlock = {
337
- type: 'object',
338
- properties: {
339
- backgroundColor: { type: 'string' },
340
- borderRadius: { type: 'string' },
341
- tokens: TokenProps,
342
- },
343
- };
344
- const ConfigThemeLogo = {
345
- type: 'object',
346
- properties: {
347
- gutter: { type: 'string' },
348
- maxHeight: { type: 'string' },
349
- maxWidth: { type: 'string' },
350
- },
351
- };
352
- const Fab = {
353
- type: 'object',
354
- properties: {
355
- backgroundColor: { type: 'string' },
356
- color: { type: 'string' },
357
- },
358
- };
359
- const ButtonOverrides = {
360
- type: 'object',
361
- properties: {
362
- custom: { type: 'string' },
363
- },
364
- };
365
- const Overrides = {
366
- type: 'object',
367
- properties: {
368
- DownloadButton: ButtonOverrides,
369
- NextSectionButton: ButtonOverrides,
370
- },
371
- };
372
- const RightPanel = {
373
- type: 'object',
374
- properties: {
375
- backgroundColor: { type: 'string' },
376
- panelBackgroundColor: { type: 'string' },
377
- panelControlsBackgroundColor: { type: 'string' },
378
- showAtBreakpoint: { type: 'string' },
379
- textColor: { type: 'string' },
380
- width: { type: 'string' },
381
- },
382
- };
383
- const Shape = {
384
- type: 'object',
385
- properties: { borderRadius: { type: 'string' } },
386
- };
387
- const ThemeSpacing = {
388
- type: 'object',
389
- properties: {
390
- sectionHorizontal: { type: 'number' },
391
- sectionVertical: { type: 'number' },
392
- unit: { type: 'number' },
393
- },
394
- };
395
- const ConfigTheme = {
396
- type: 'object',
397
- properties: {
398
- breakpoints: Breakpoints,
399
- codeBlock: CodeBlock,
400
- colors: ThemeColors,
401
- components: ConfigThemeComponents,
402
- layout: Layout,
403
- logo: ConfigThemeLogo,
404
- fab: Fab,
405
- overrides: Overrides,
406
- rightPanel: RightPanel,
407
- schema: ConfigThemeSchema,
408
- shape: Shape,
409
- sidebar: Sidebar,
410
- spacing: ThemeSpacing,
411
- typography: Typography,
412
- links: { properties: { color: { type: 'string' } } },
413
- codeSample: { properties: { backgroundColor: { type: 'string' } } },
414
- },
415
- };
416
- const GenerateCodeSamples = {
417
- type: 'object',
418
- properties: {
419
- skipOptionalParameters: { type: 'boolean' },
420
- languages: { type: 'array', items: ConfigLanguage },
421
- },
422
- required: ['languages'],
423
- };
424
- export const deprecatedRefDocsSchema = {
425
- type: 'object',
426
- properties: {
427
- theme: ConfigTheme,
428
- ctrlFHijack: { type: 'boolean' },
429
- defaultSampleLanguage: { type: 'string' },
430
- disableDeepLinks: { type: 'boolean' },
431
- disableSearch: { type: 'boolean' },
432
- disableSidebar: { type: 'boolean' },
433
- downloadDefinitionUrl: { type: 'string' },
434
- expandDefaultServerVariables: { type: 'boolean' },
435
- enumSkipQuotes: { type: 'boolean' },
436
- expandDefaultRequest: { type: 'boolean' },
437
- expandDefaultResponse: { type: 'boolean' },
438
- expandResponses: { type: 'string' },
439
- expandSingleSchemaField: { type: 'boolean' },
440
- generateCodeSamples: GenerateCodeSamples,
441
- generatedPayloadSamplesMaxDepth: { type: 'number' },
442
- hideDownloadButton: { type: 'boolean' },
443
- hideHostname: { type: 'boolean' },
444
- hideInfoSection: { type: 'boolean' },
445
- hideLogo: { type: 'boolean' },
446
- hideRequestPayloadSample: { type: 'boolean' },
447
- hideRightPanel: { type: 'boolean' },
448
- hideSchemaPattern: { type: 'boolean' },
449
- hideSingleRequestSampleTab: { type: 'boolean' },
450
- hideSecuritySection: { type: 'boolean' },
451
- hideTryItPanel: { type: 'boolean' },
452
- hideFab: { type: 'boolean' },
453
- hideOneOfDescription: { type: 'boolean' },
454
- htmlTemplate: { type: 'string' },
455
- jsonSampleExpandLevel: {
456
- oneOf: [{ type: 'number', minimum: 1 }, { type: 'string' }],
457
- },
458
- labels: ConfigLabels,
459
- menuToggle: { type: 'boolean' },
460
- nativeScrollbars: { type: 'boolean' },
461
- noAutoAuth: { type: 'boolean' },
462
- onDeepLinkClick: { type: 'object' },
463
- pagination: { enum: ['none', 'section', 'item'] },
464
- pathInMiddlePanel: { type: 'boolean' },
465
- payloadSampleIdx: { type: 'number', minimum: 0 },
466
- requiredPropsFirst: { type: 'boolean' },
467
- routingStrategy: { type: 'string' },
468
- samplesTabsMaxCount: { type: 'number' },
469
- schemaExpansionLevel: {
470
- oneOf: [{ type: 'number', minimum: 0 }, { type: 'string' }],
471
- },
472
- minCharacterLengthToInitSearch: { type: 'number', minimum: 1 },
473
- maxResponseHeadersToShowInTryIt: { type: 'number', minimum: 0 },
474
- scrollYOffset: {
475
- oneOf: [{ type: 'number' }, { type: 'string' }],
476
- },
477
- searchAutoExpand: { type: 'boolean' },
478
- searchFieldLevelBoost: { type: 'number', minimum: 0 },
479
- searchMaxDepth: { type: 'number', minimum: 1 },
480
- searchMode: { type: 'string', enum: ['default', 'path-only'] },
481
- searchOperationTitleBoost: { type: 'number' },
482
- searchTagTitleBoost: { type: 'number' },
483
- sendXUserAgentInTryIt: { type: 'boolean' },
484
- showChangeLayoutButton: { type: 'boolean' },
485
- showConsole: { type: 'boolean' },
486
- showNextButton: { type: 'boolean' },
487
- showRightPanelToggle: { type: 'boolean' },
488
- showSecuritySchemeType: { type: 'boolean' },
489
- showWebhookVerb: { type: 'boolean' },
490
- showObjectSchemaExamples: { type: 'boolean' },
491
- disableTryItRequestUrlEncoding: { type: 'boolean' },
492
- sidebarLinks: ConfigSidebarLinks,
493
- sideNavStyle: { type: 'string', enum: ['summary-only', 'path-first', 'id-only', 'path-only'] },
494
- simpleOneOfTypeLabel: { type: 'boolean' },
495
- sortEnumValuesAlphabetically: { type: 'boolean' },
496
- sortOperationsAlphabetically: { type: 'boolean' },
497
- sortPropsAlphabetically: { type: 'boolean' },
498
- sortTagsAlphabetically: { type: 'boolean' },
499
- suppressWarnings: { type: 'boolean' },
500
- unstable_externalDescription: { type: 'boolean' },
501
- unstable_ignoreMimeParameters: { type: 'boolean' },
502
- untrustedDefinition: { type: 'boolean' },
503
- showAccessMode: { type: 'boolean' },
504
- preserveOriginalExtensionsName: { type: 'boolean' },
505
- markdownHeadingsAnchorLevel: { type: 'number' },
506
- },
507
- additionalProperties: false,
508
- };
509
- function pickObjectProps(object, keys) {
510
- return Object.fromEntries(keys.filter((key) => key in object).map((key) => [key, object[key]]));
511
- }
512
- function omitObjectProps(object, keys) {
513
- return Object.fromEntries(Object.entries(object).filter(([key]) => !keys.includes(key)));
514
- }
515
- //# sourceMappingURL=reference-docs-config-schema.js.map
@@ -1,25 +0,0 @@
1
- export function removePropertyRecursively(object, propToRemove, parentKey) {
2
- return Object.fromEntries(Object.entries(object)
3
- .map(([key, value]) => {
4
- if (key === propToRemove && parentKey !== 'properties') {
5
- return undefined;
6
- }
7
- if (typeof value !== 'object' || !value) {
8
- return [key, value];
9
- }
10
- if (Array.isArray(value)) {
11
- return [
12
- key,
13
- value.map((arrayItem) => typeof arrayItem === 'object'
14
- ? removePropertyRecursively(arrayItem, propToRemove, key)
15
- : arrayItem),
16
- ];
17
- }
18
- return [
19
- key,
20
- removePropertyRecursively(value, propToRemove, key),
21
- ];
22
- })
23
- .filter(Boolean));
24
- }
25
- //# sourceMappingURL=remove-property-recursively.js.map
@@ -1,100 +0,0 @@
1
- const jobInputsSchema = {
2
- type: 'object',
3
- additionalProperties: { type: 'string' },
4
- };
5
- const jobServersSchema = {
6
- type: 'object',
7
- additionalProperties: false,
8
- patternProperties: {
9
- '^[a-zA-Z0-9_-]+$': {
10
- type: 'string',
11
- pattern: '^https?://[^\\s/$.?#].[^\\s]*$',
12
- },
13
- },
14
- };
15
- const severitySchema = {
16
- type: 'string',
17
- enum: ['error', 'warn', 'off'],
18
- };
19
- const jobSeveritySchema = {
20
- type: 'object',
21
- additionalProperties: false,
22
- properties: {
23
- schemaCheck: severitySchema,
24
- statusCodeCheck: severitySchema,
25
- contentTypeCheck: severitySchema,
26
- successCriteriaCheck: severitySchema,
27
- },
28
- };
29
- const jobTriggerIntervalSchema = {
30
- type: 'object',
31
- properties: {
32
- event: { type: 'string', enum: ['schedule'] },
33
- interval: {
34
- type: 'string',
35
- enum: ['1m', '2m', '5m', '10m', '15m', '30m', '1h', '3h', '6h', '12h', '1d', '7d'],
36
- },
37
- },
38
- required: ['event'],
39
- additionalProperties: false,
40
- };
41
- const jobTriggerBuildSchema = {
42
- type: 'object',
43
- properties: {
44
- event: { type: 'string', enum: ['build'] },
45
- },
46
- required: ['event'],
47
- additionalProperties: false,
48
- };
49
- const sloSchema = {
50
- type: 'object',
51
- properties: {
52
- warn: { type: 'number' },
53
- error: { type: 'number' },
54
- },
55
- additionalProperties: false,
56
- };
57
- export const reuniteConfigSchema = {
58
- type: 'object',
59
- properties: {
60
- ignoreLint: {
61
- oneOf: [
62
- { type: 'boolean', default: false },
63
- {
64
- type: 'object',
65
- additionalProperties: { type: 'boolean' },
66
- },
67
- ],
68
- },
69
- ignoreLinkChecker: { type: 'boolean' },
70
- ignoreMarkdocErrors: { type: 'boolean' },
71
- ignoreRespectMonitoring: { type: 'boolean' },
72
- jobs: {
73
- type: 'array',
74
- items: {
75
- type: 'object',
76
- properties: {
77
- path: {
78
- type: 'string',
79
- pattern: '^(?!\\/|\\.\\./)',
80
- },
81
- agent: {
82
- type: 'string',
83
- enum: ['respect'],
84
- },
85
- trigger: {
86
- oneOf: [jobTriggerIntervalSchema, jobTriggerBuildSchema],
87
- },
88
- inputs: jobInputsSchema,
89
- servers: jobServersSchema,
90
- severity: jobSeveritySchema,
91
- slo: sloSchema,
92
- },
93
- required: ['path', 'trigger', 'agent'],
94
- additionalProperties: false,
95
- },
96
- },
97
- },
98
- additionalProperties: false,
99
- };
100
- //# sourceMappingURL=reunite-config-schema.js.map