@redocly/config 0.4.0 → 0.6.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 (45) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/lib/.tsbuildinfo +1 -1
  3. package/lib/default-theme-config-schema.d.ts +317 -13
  4. package/lib/default-theme-config-schema.js +15 -7
  5. package/lib/default-theme-config-schema.js.map +1 -1
  6. package/lib/portal-shared-types.d.ts +19 -7
  7. package/lib/redoc-config-schema.d.ts +298 -0
  8. package/lib/redoc-config-schema.js +185 -0
  9. package/lib/redoc-config-schema.js.map +1 -0
  10. package/lib/redoc-types.d.ts +84 -0
  11. package/lib/redoc-types.js +3 -0
  12. package/lib/redoc-types.js.map +1 -0
  13. package/lib/remove-property-recursively.d.ts +5 -0
  14. package/lib/remove-property-recursively.js +26 -0
  15. package/lib/remove-property-recursively.js.map +1 -0
  16. package/lib/root-config-schema.d.ts +3419 -1839
  17. package/lib/root-config-schema.js +8 -1
  18. package/lib/root-config-schema.js.map +1 -1
  19. package/lib/types.d.ts +2 -0
  20. package/lib-esm/.tsbuildinfo +1 -1
  21. package/lib-esm/default-theme-config-schema.d.ts +317 -13
  22. package/lib-esm/default-theme-config-schema.js +15 -7
  23. package/lib-esm/default-theme-config-schema.js.map +1 -1
  24. package/lib-esm/portal-shared-types.d.ts +19 -7
  25. package/lib-esm/redoc-config-schema.d.ts +298 -0
  26. package/lib-esm/redoc-config-schema.js +182 -0
  27. package/lib-esm/redoc-config-schema.js.map +1 -0
  28. package/lib-esm/redoc-types.d.ts +84 -0
  29. package/lib-esm/redoc-types.js +2 -0
  30. package/lib-esm/redoc-types.js.map +1 -0
  31. package/lib-esm/remove-property-recursively.d.ts +5 -0
  32. package/lib-esm/remove-property-recursively.js +22 -0
  33. package/lib-esm/remove-property-recursively.js.map +1 -0
  34. package/lib-esm/root-config-schema.d.ts +3419 -1839
  35. package/lib-esm/root-config-schema.js +8 -1
  36. package/lib-esm/root-config-schema.js.map +1 -1
  37. package/lib-esm/types.d.ts +2 -0
  38. package/package.json +4 -4
  39. package/src/default-theme-config-schema.ts +17 -8
  40. package/src/portal-shared-types.ts +22 -11
  41. package/src/redoc-config-schema.ts +183 -0
  42. package/src/redoc-types.ts +80 -0
  43. package/src/remove-property-recursively.ts +39 -0
  44. package/src/root-config-schema.ts +10 -1
  45. package/src/types.ts +2 -0
@@ -0,0 +1,298 @@
1
+ export declare const redocConfigSchema: {
2
+ readonly type: "object";
3
+ readonly properties: {
4
+ readonly licenseKey: {
5
+ readonly type: "string";
6
+ };
7
+ readonly hideLoading: {
8
+ readonly type: "boolean";
9
+ };
10
+ readonly disableRouter: {
11
+ readonly type: "boolean";
12
+ };
13
+ readonly hideSidebar: {
14
+ readonly type: "boolean";
15
+ };
16
+ readonly feedback: {
17
+ readonly type: "object";
18
+ readonly properties: {
19
+ readonly hide: {
20
+ readonly type: "boolean";
21
+ readonly default: false;
22
+ };
23
+ readonly type: {
24
+ readonly type: "string";
25
+ readonly enum: readonly ["rating", "sentiment", "comment", "reasons", "mood", "scale"];
26
+ readonly default: "sentiment";
27
+ };
28
+ readonly settings: {
29
+ readonly type: "object";
30
+ readonly properties: {
31
+ readonly label: {
32
+ readonly type: "string";
33
+ };
34
+ readonly submitText: {
35
+ readonly type: "string";
36
+ };
37
+ readonly buttonText: {
38
+ readonly type: "string";
39
+ };
40
+ readonly component: {
41
+ readonly type: "string";
42
+ readonly enum: readonly ["radio", "checkbox"];
43
+ readonly default: "checkbox";
44
+ };
45
+ readonly items: {
46
+ readonly type: "array";
47
+ readonly items: {
48
+ readonly type: "string";
49
+ };
50
+ readonly minItems: 1;
51
+ };
52
+ readonly leftScaleLabel: {
53
+ readonly type: "string";
54
+ };
55
+ readonly rightScaleLabel: {
56
+ readonly type: "string";
57
+ };
58
+ readonly reasons: {
59
+ readonly type: "object";
60
+ readonly properties: {
61
+ readonly hide: {
62
+ readonly type: "boolean";
63
+ readonly default: false;
64
+ };
65
+ readonly component: {
66
+ readonly type: "string";
67
+ readonly enum: readonly ["radio", "checkbox"];
68
+ readonly default: "checkbox";
69
+ };
70
+ readonly label: {
71
+ readonly type: "string";
72
+ };
73
+ readonly items: {
74
+ readonly type: "array";
75
+ readonly items: {
76
+ readonly type: "string";
77
+ };
78
+ };
79
+ };
80
+ readonly additionalProperties: false;
81
+ };
82
+ readonly comment: {
83
+ readonly type: "object";
84
+ readonly properties: {
85
+ readonly hide: {
86
+ readonly type: "boolean";
87
+ readonly default: false;
88
+ };
89
+ readonly label: {
90
+ readonly type: "string";
91
+ };
92
+ readonly likeLabel: {
93
+ readonly type: "string";
94
+ };
95
+ readonly dislikeLabel: {
96
+ readonly type: "string";
97
+ };
98
+ readonly satisfiedLabel: {
99
+ readonly type: "string";
100
+ };
101
+ readonly neutralLabel: {
102
+ readonly type: "string";
103
+ };
104
+ readonly dissatisfiedLabel: {
105
+ readonly type: "string";
106
+ };
107
+ };
108
+ readonly additionalProperties: false;
109
+ };
110
+ };
111
+ readonly additionalProperties: false;
112
+ };
113
+ };
114
+ readonly additionalProperties: false;
115
+ readonly default: null;
116
+ readonly nullable: true;
117
+ };
118
+ readonly hideReplay: {
119
+ readonly type: "boolean";
120
+ };
121
+ readonly oAuth2RedirectURI: {
122
+ readonly type: "string";
123
+ readonly nullable: true;
124
+ };
125
+ readonly corsProxyUrl: {
126
+ readonly type: "string";
127
+ };
128
+ readonly sortRequiredPropsFirst: {
129
+ readonly type: "boolean";
130
+ };
131
+ readonly sanitize: {
132
+ readonly type: "boolean";
133
+ };
134
+ readonly hideDownloadButtons: {
135
+ readonly type: "boolean";
136
+ };
137
+ readonly downloadUrls: {
138
+ readonly type: "array";
139
+ readonly items: {
140
+ readonly type: "object";
141
+ readonly properties: {
142
+ readonly title: {
143
+ readonly type: "string";
144
+ };
145
+ readonly url: {
146
+ readonly type: "string";
147
+ };
148
+ };
149
+ readonly required: readonly ["url"];
150
+ readonly additionalProperties: false;
151
+ };
152
+ };
153
+ readonly onlyRequiredInSamples: {
154
+ readonly type: "boolean";
155
+ };
156
+ readonly generatedSamplesMaxDepth: {
157
+ readonly oneOf: readonly [{
158
+ readonly type: "number";
159
+ }, {
160
+ readonly type: "string";
161
+ }];
162
+ };
163
+ readonly showExtensions: {
164
+ readonly oneOf: readonly [{
165
+ readonly type: "boolean";
166
+ }, {
167
+ readonly type: "string";
168
+ }, {
169
+ readonly type: "array";
170
+ readonly items: {
171
+ readonly type: "string";
172
+ };
173
+ }];
174
+ };
175
+ readonly hideSchemaTitles: {
176
+ readonly type: "boolean";
177
+ };
178
+ readonly jsonSamplesExpandLevel: {
179
+ readonly oneOf: readonly [{
180
+ readonly type: "number";
181
+ }, {
182
+ readonly type: "string";
183
+ }];
184
+ };
185
+ readonly schemasExpansionLevel: {
186
+ readonly oneOf: readonly [{
187
+ readonly type: "number";
188
+ }, {
189
+ readonly type: "string";
190
+ }];
191
+ };
192
+ readonly mockServer: {
193
+ readonly type: "object";
194
+ readonly properties: {
195
+ readonly url: {
196
+ readonly type: "string";
197
+ };
198
+ readonly position: {
199
+ readonly enum: readonly ["first", "last", "replace", "off"];
200
+ };
201
+ readonly description: {
202
+ readonly type: "string";
203
+ };
204
+ };
205
+ };
206
+ readonly maxDisplayedEnumValues: {
207
+ readonly type: "number";
208
+ };
209
+ readonly schemaDefinitionsTagName: {
210
+ readonly type: "string";
211
+ };
212
+ readonly layout: {
213
+ readonly type: "string";
214
+ readonly enum: readonly ["stacked", "three-panel"];
215
+ };
216
+ readonly hideInfoMetadata: {
217
+ readonly type: "boolean";
218
+ };
219
+ readonly events: {
220
+ readonly type: "object";
221
+ };
222
+ readonly skipBundle: {
223
+ readonly type: "boolean";
224
+ };
225
+ readonly routingBasePath: {
226
+ readonly type: "string";
227
+ };
228
+ readonly codeSamples: {
229
+ readonly type: "object";
230
+ readonly properties: {
231
+ readonly languages: {
232
+ readonly type: "array";
233
+ readonly items: {
234
+ readonly type: "object";
235
+ readonly properties: {
236
+ readonly lang: {
237
+ readonly type: "string";
238
+ readonly enum: readonly ["curl", "JavaScript", "Node.js", "Python", "Java8+Apache", "Java", "C#", "C#+Newtonsoft", "PHP", "Go", "Ruby", "R", "Payload"];
239
+ };
240
+ readonly label: {
241
+ readonly type: "string";
242
+ };
243
+ readonly options: {
244
+ readonly type: "object";
245
+ readonly properties: {
246
+ readonly indent: {
247
+ readonly type: "string";
248
+ };
249
+ readonly withImports: {
250
+ readonly type: "boolean";
251
+ };
252
+ readonly withComments: {
253
+ readonly type: "boolean";
254
+ };
255
+ readonly binary: {
256
+ readonly type: "boolean";
257
+ };
258
+ readonly credentials: {
259
+ readonly type: "string";
260
+ readonly enum: readonly ["omit", "same-origin", "include"];
261
+ };
262
+ };
263
+ readonly additionalProperties: false;
264
+ };
265
+ };
266
+ readonly required: readonly ["lang"];
267
+ readonly additionalProperties: false;
268
+ };
269
+ };
270
+ readonly skipOptionalParameters: {
271
+ readonly type: "boolean";
272
+ };
273
+ readonly withOAuth2Call: {
274
+ readonly type: "boolean";
275
+ };
276
+ };
277
+ readonly required: readonly ["languages"];
278
+ readonly additionalProperties: false;
279
+ };
280
+ readonly ignoreNamedSchemas: {
281
+ readonly oneOf: readonly [{
282
+ readonly type: "array";
283
+ readonly items: {
284
+ readonly type: "string";
285
+ };
286
+ }, {
287
+ readonly type: "string";
288
+ }];
289
+ };
290
+ readonly hidePropertiesPrefix: {
291
+ readonly type: "boolean";
292
+ };
293
+ readonly excludeFromSearch: {
294
+ readonly type: "boolean";
295
+ };
296
+ };
297
+ readonly additionalProperties: false;
298
+ };
@@ -0,0 +1,185 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.redocConfigSchema = void 0;
4
+ const codeSamplesConfigSchema = {
5
+ type: 'object',
6
+ properties: {
7
+ languages: {
8
+ type: 'array',
9
+ items: {
10
+ type: 'object',
11
+ properties: {
12
+ lang: {
13
+ type: 'string',
14
+ enum: [
15
+ 'curl',
16
+ 'JavaScript',
17
+ 'Node.js',
18
+ 'Python',
19
+ 'Java8+Apache',
20
+ 'Java',
21
+ 'C#',
22
+ 'C#+Newtonsoft',
23
+ 'PHP',
24
+ 'Go',
25
+ 'Ruby',
26
+ 'R',
27
+ 'Payload',
28
+ ],
29
+ },
30
+ label: { type: 'string' },
31
+ options: {
32
+ type: 'object',
33
+ properties: {
34
+ indent: { type: 'string' },
35
+ withImports: { type: 'boolean' },
36
+ withComments: { type: 'boolean' },
37
+ binary: { type: 'boolean' },
38
+ credentials: {
39
+ type: 'string',
40
+ enum: ['omit', 'same-origin', 'include'],
41
+ },
42
+ },
43
+ additionalProperties: false,
44
+ },
45
+ },
46
+ required: ['lang'],
47
+ additionalProperties: false,
48
+ },
49
+ },
50
+ skipOptionalParameters: { type: 'boolean' },
51
+ withOAuth2Call: { type: 'boolean' },
52
+ },
53
+ required: ['languages'],
54
+ additionalProperties: false,
55
+ };
56
+ const downloadUrlsSchema = {
57
+ type: 'array',
58
+ items: {
59
+ type: 'object',
60
+ properties: {
61
+ title: { type: 'string' },
62
+ url: { type: 'string' },
63
+ },
64
+ required: ['url'],
65
+ additionalProperties: false,
66
+ },
67
+ };
68
+ exports.redocConfigSchema = {
69
+ type: 'object',
70
+ properties: {
71
+ licenseKey: { type: 'string' },
72
+ hideLoading: { type: 'boolean' },
73
+ disableRouter: { type: 'boolean' },
74
+ hideSidebar: { type: 'boolean' },
75
+ feedback: {
76
+ type: 'object',
77
+ properties: {
78
+ hide: {
79
+ type: 'boolean',
80
+ default: false,
81
+ },
82
+ type: {
83
+ type: 'string',
84
+ enum: ['rating', 'sentiment', 'comment', 'reasons', 'mood', 'scale'],
85
+ default: 'sentiment',
86
+ },
87
+ settings: {
88
+ type: 'object',
89
+ properties: {
90
+ label: { type: 'string' },
91
+ submitText: { type: 'string' },
92
+ buttonText: { type: 'string' },
93
+ component: {
94
+ type: 'string',
95
+ enum: ['radio', 'checkbox'],
96
+ default: 'checkbox',
97
+ },
98
+ items: { type: 'array', items: { type: 'string' }, minItems: 1 },
99
+ leftScaleLabel: { type: 'string' },
100
+ rightScaleLabel: { type: 'string' },
101
+ reasons: {
102
+ type: 'object',
103
+ properties: {
104
+ hide: {
105
+ type: 'boolean',
106
+ default: false,
107
+ },
108
+ component: {
109
+ type: 'string',
110
+ enum: ['radio', 'checkbox'],
111
+ default: 'checkbox',
112
+ },
113
+ label: { type: 'string' },
114
+ items: { type: 'array', items: { type: 'string' } },
115
+ },
116
+ additionalProperties: false,
117
+ },
118
+ comment: {
119
+ type: 'object',
120
+ properties: {
121
+ hide: {
122
+ type: 'boolean',
123
+ default: false,
124
+ },
125
+ label: { type: 'string' },
126
+ likeLabel: { type: 'string' },
127
+ dislikeLabel: { type: 'string' },
128
+ satisfiedLabel: { type: 'string' },
129
+ neutralLabel: { type: 'string' },
130
+ dissatisfiedLabel: { type: 'string' },
131
+ },
132
+ additionalProperties: false,
133
+ },
134
+ },
135
+ additionalProperties: false,
136
+ },
137
+ },
138
+ additionalProperties: false,
139
+ default: null,
140
+ nullable: true,
141
+ },
142
+ hideReplay: { type: 'boolean' },
143
+ oAuth2RedirectURI: { type: 'string', nullable: true },
144
+ corsProxyUrl: { type: 'string' },
145
+ sortRequiredPropsFirst: { type: 'boolean' },
146
+ sanitize: { type: 'boolean' },
147
+ hideDownloadButtons: { type: 'boolean' },
148
+ downloadUrls: downloadUrlsSchema,
149
+ onlyRequiredInSamples: { type: 'boolean' },
150
+ generatedSamplesMaxDepth: { oneOf: [{ type: 'number' }, { type: 'string' }] },
151
+ showExtensions: {
152
+ oneOf: [
153
+ { type: 'boolean' },
154
+ { type: 'string' },
155
+ { type: 'array', items: { type: 'string' } },
156
+ ],
157
+ },
158
+ hideSchemaTitles: { type: 'boolean' },
159
+ jsonSamplesExpandLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },
160
+ schemasExpansionLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },
161
+ mockServer: {
162
+ type: 'object',
163
+ properties: {
164
+ url: { type: 'string' },
165
+ position: { enum: ['first', 'last', 'replace', 'off'] },
166
+ description: { type: 'string' },
167
+ },
168
+ },
169
+ maxDisplayedEnumValues: { type: 'number' },
170
+ schemaDefinitionsTagName: { type: 'string' },
171
+ layout: { type: 'string', enum: ['stacked', 'three-panel'] },
172
+ hideInfoMetadata: { type: 'boolean' },
173
+ events: { type: 'object' },
174
+ skipBundle: { type: 'boolean' },
175
+ routingBasePath: { type: 'string' },
176
+ codeSamples: codeSamplesConfigSchema,
177
+ ignoreNamedSchemas: {
178
+ oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }],
179
+ },
180
+ hidePropertiesPrefix: { type: 'boolean' },
181
+ excludeFromSearch: { type: 'boolean' },
182
+ },
183
+ additionalProperties: false,
184
+ };
185
+ //# sourceMappingURL=redoc-config-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redoc-config-schema.js","sourceRoot":"","sources":["../src/redoc-config-schema.ts"],"names":[],"mappings":";;;AAAA,MAAM,uBAAuB,GAAG;IAC9B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE;4BACJ,MAAM;4BACN,YAAY;4BACZ,SAAS;4BACT,QAAQ;4BACR,cAAc;4BACd,MAAM;4BACN,IAAI;4BACJ,eAAe;4BACf,KAAK;4BACL,IAAI;4BACJ,MAAM;4BACN,GAAG;4BACH,SAAS;yBACV;qBACF;oBACD,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BAC1B,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;4BAChC,YAAY,EAAE,EAAE,I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SAAS,EAAE;QACzC,iBAAiB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;KACvC;IACD,oBAAoB,EAAE,KAAK;CACnB,CAAC"}
@@ -0,0 +1,84 @@
1
+ import type { ReactElement, ComponentType } from 'react';
2
+ import type { FromSchema } from 'json-schema-to-ts';
3
+ import type { Schema, ConfigFunction } from '@markdoc/markdoc/dist/src/types';
4
+ import type { redocConfigSchema } from './redoc-config-schema';
5
+ export type RedocConfigTypes = FromSchema<typeof redocConfigSchema> & {
6
+ markdocOptions?: {
7
+ tags: Record<string, Schema>;
8
+ nodes: Record<string, Schema>;
9
+ components: Record<string, ComponentType>;
10
+ variables?: Record<string, any>;
11
+ partials?: Record<string, any>;
12
+ functions?: Record<string, ConfigFunction>;
13
+ };
14
+ onDeepLinkClick?: ((link: string) => void) | undefined | null;
15
+ unstable_hooks?: HooksConfig;
16
+ requestInterceptor?: ((req: Request, operation: OperationModel) => void) | undefined | null;
17
+ unstable_externalCodeSamples?: Unstable_ExternalCodeSample[];
18
+ scrollYOffset?: number | string | (() => number);
19
+ };
20
+ type HooksConfig = {
21
+ AfterApiTitle?: HookConfig<{
22
+ info: OpenAPIInfo;
23
+ }>;
24
+ BeforeOperation?: HookConfig<{
25
+ operation: OperationModel;
26
+ }>;
27
+ BeforeOperationSummary?: HookConfig<{
28
+ operation: OperationModel;
29
+ }>;
30
+ AfterOperationSummary?: HookConfig<{
31
+ operation: OperationModel;
32
+ }>;
33
+ AfterOperation?: HookConfig<{
34
+ operation: OperationModel;
35
+ }>;
36
+ onInit?: (args: {
37
+ store: Record<string, any>;
38
+ }) => void;
39
+ replaceSecurityLink?: (args: {
40
+ securityRequirementId: string;
41
+ }) => string;
42
+ sanitize?: (raw: string) => string;
43
+ MiddlePanelFooter?: HookConfig<undefined>;
44
+ MiddlePanelHeader?: HookConfig<undefined>;
45
+ };
46
+ type OpenAPIInfo = {
47
+ title: string;
48
+ version: string;
49
+ description?: string;
50
+ summary?: string;
51
+ termsOfService?: string;
52
+ contact?: Record<string, any>;
53
+ license?: Record<string, any>;
54
+ 'x-logo'?: Record<string, any>;
55
+ 'x-metadata'?: Record<string, any>;
56
+ 'x-seo'?: Record<string, any>;
57
+ };
58
+ type HookResult = ReactElement | {
59
+ html: string;
60
+ } | null;
61
+ type HookConfig<T> = (props: T) => HookResult;
62
+ type Unstable_ExternalCodeSample = {
63
+ get: (source: ExternalSource) => string;
64
+ lang: string;
65
+ label?: string;
66
+ };
67
+ type ExternalSource = {
68
+ sample: Unstable_ExternalCodeSample;
69
+ operation: OperationModel;
70
+ exampleName?: string;
71
+ pathParams?: any;
72
+ properties?: any;
73
+ };
74
+ type OperationModel = {
75
+ id: string;
76
+ name: string;
77
+ description?: string | Record<string, any>;
78
+ href: string;
79
+ pointer: string;
80
+ httpVerb: string;
81
+ deprecated: boolean;
82
+ path: string;
83
+ };
84
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=redoc-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redoc-types.js","sourceRoot":"","sources":["../src/redoc-types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ type Removed<T, Drop> = T extends Record<string, any> ? T extends ArrayLike<any> ? Array<Removed<T[number], Drop>> : {
2
+ [K in Exclude<keyof T, Drop>]: Removed<T[K], Drop>;
3
+ } : T;
4
+ export declare function removePropertyRecursively<TObject extends object, TProp extends string>(object: TObject, propToRemove: TProp): Removed<TObject, TProp>;
5
+ export {};
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removePropertyRecursively = void 0;
4
+ function removePropertyRecursively(object, propToRemove) {
5
+ return Object.fromEntries(Object.entries(object)
6
+ .map(([key, value]) => {
7
+ if (key === propToRemove) {
8
+ return undefined;
9
+ }
10
+ if (typeof value !== 'object' || !value) {
11
+ return [key, value];
12
+ }
13
+ if (Array.isArray(value)) {
14
+ return [
15
+ key,
16
+ value.map((arrayItem) => typeof arrayItem === 'object'
17
+ ? removePropertyRecursively(arrayItem, propToRemove)
18
+ : arrayItem),
19
+ ];
20
+ }
21
+ return [key, removePropertyRecursively(value, propToRemove)];
22
+ })
23
+ .filter(Boolean));
24
+ }
25
+ exports.removePropertyRecursively = removePropertyRecursively;
26
+ //# sourceMappingURL=remove-property-recursively.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-property-recursively.js","sourceRoot":"","sources":["../src/remove-property-recursively.ts"],"names":[],"mappings":";;;AAQA,SAAgB,yBAAyB,CACvC,MAAe,EACf,YAAmB;IAEnB,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;SACnB,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACpB,IAAI,GAAG,KAAK,YAAY,EAAE;YACxB,OAAO,SAAS,CAAC;SAClB;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,EAAE;YACvC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SACrB;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxB,OAAO;gBACL,GAAG;gBACH,KAAK,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CACtB,OAAO,SAAS,KAAK,QAAQ;oBAC3B,CAAC,CAAC,yBAAyB,CAAC,SAAS,EAAE,YAAY,CAAC;oBACpD,CAAC,CAAC,SAAS,CACd;aACF,CAAC;SACH;QAED,OAAO,CAAC,GAAG,EAAE,yBAAyB,CAAC,KAAgC,EAAE,YAAY,CAAC,CAAC,CAAC;IAC1F,CAAC,CAAC;SACD,MAAM,CAAC,OAAO,CAAwB,CACf,CAAC;AAC/B,CAAC;AA9BD,8DA8BC"}