@graphql-tools/delegate 9.0.0-alpha-e2ab84c8.0 → 9.0.0-alpha-25204a2f.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 (61) hide show
  1. package/README.md +0 -2
  2. package/cjs/Subschema.js +22 -0
  3. package/cjs/Transformer.js +45 -0
  4. package/cjs/applySchemaTransforms.js +11 -0
  5. package/cjs/checkResultAndHandleErrors.js +77 -0
  6. package/cjs/createRequest.js +125 -0
  7. package/cjs/defaultMergedResolver.js +29 -0
  8. package/cjs/delegateToSchema.js +148 -0
  9. package/cjs/finalizeGatewayRequest.js +317 -0
  10. package/cjs/getDocumentMetadata.js +25 -0
  11. package/cjs/index.js +13 -0
  12. package/cjs/mergeFields.js +87 -0
  13. package/cjs/package.json +1 -0
  14. package/cjs/prepareGatewayDocument.js +311 -0
  15. package/cjs/resolveExternalValue.js +103 -0
  16. package/cjs/subschemaConfig.js +31 -0
  17. package/cjs/symbols.js +6 -0
  18. package/cjs/types.js +3 -0
  19. package/esm/Subschema.js +17 -0
  20. package/esm/Transformer.js +41 -0
  21. package/esm/applySchemaTransforms.js +7 -0
  22. package/esm/checkResultAndHandleErrors.js +72 -0
  23. package/esm/createRequest.js +120 -0
  24. package/esm/defaultMergedResolver.js +25 -0
  25. package/esm/delegateToSchema.js +143 -0
  26. package/esm/finalizeGatewayRequest.js +313 -0
  27. package/esm/getDocumentMetadata.js +21 -0
  28. package/esm/index.js +10 -0
  29. package/esm/mergeFields.js +79 -0
  30. package/esm/prepareGatewayDocument.js +307 -0
  31. package/esm/resolveExternalValue.js +99 -0
  32. package/esm/subschemaConfig.js +26 -0
  33. package/esm/symbols.js +3 -0
  34. package/esm/types.js +1 -0
  35. package/package.json +40 -18
  36. package/{Subschema.d.ts → typings/Subschema.d.ts} +7 -3
  37. package/{Transformer.d.ts → typings/Transformer.d.ts} +3 -3
  38. package/{applySchemaTransforms.d.ts → typings/applySchemaTransforms.d.ts} +2 -2
  39. package/typings/checkResultAndHandleErrors.d.ts +8 -0
  40. package/{createRequest.d.ts → typings/createRequest.d.ts} +1 -2
  41. package/{defaultMergedResolver.d.ts → typings/defaultMergedResolver.d.ts} +2 -4
  42. package/typings/delegateToSchema.d.ts +6 -0
  43. package/typings/finalizeGatewayRequest.d.ts +3 -0
  44. package/{getDocumentMetadata.d.ts → typings/getDocumentMetadata.d.ts} +0 -0
  45. package/typings/index.d.ts +10 -0
  46. package/typings/mergeFields.d.ts +8 -0
  47. package/{prepareGatewayDocument.d.ts → typings/prepareGatewayDocument.d.ts} +0 -0
  48. package/typings/resolveExternalValue.d.ts +3 -0
  49. package/{subschemaConfig.d.ts → typings/subschemaConfig.d.ts} +1 -1
  50. package/typings/symbols.d.ts +3 -0
  51. package/{types.d.ts → typings/types.d.ts} +21 -40
  52. package/delegateToSchema.d.ts +0 -9
  53. package/externalObjects.d.ts +0 -11
  54. package/externalValues.d.ts +0 -4
  55. package/finalizeGatewayRequest.d.ts +0 -3
  56. package/getMergedParent.d.ts +0 -9
  57. package/index.d.ts +0 -11
  58. package/index.js +0 -1624
  59. package/index.mjs +0 -1590
  60. package/mergeDataAndErrors.d.ts +0 -5
  61. package/symbols.d.ts +0 -7
@@ -0,0 +1,317 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.finalizeGatewayRequest = void 0;
4
+ const graphql_1 = require("graphql");
5
+ const utils_1 = require("@graphql-tools/utils");
6
+ const getDocumentMetadata_js_1 = require("./getDocumentMetadata.js");
7
+ function finalizeGatewayDocument(targetSchema, fragments, operations) {
8
+ var _a;
9
+ let usedVariables = [];
10
+ let usedFragments = [];
11
+ const newOperations = [];
12
+ let newFragments = [];
13
+ const validFragments = [];
14
+ const validFragmentsWithType = Object.create(null);
15
+ for (const fragment of fragments) {
16
+ const typeName = fragment.typeCondition.name.value;
17
+ const type = targetSchema.getType(typeName);
18
+ if (type != null) {
19
+ validFragments.push(fragment);
20
+ validFragmentsWithType[fragment.name.value] = type;
21
+ }
22
+ }
23
+ let fragmentSet = Object.create(null);
24
+ for (const operation of operations) {
25
+ const type = (0, utils_1.getDefinedRootType)(targetSchema, operation.operation);
26
+ const { selectionSet, usedFragments: operationUsedFragments, usedVariables: operationUsedVariables, } = finalizeSelectionSet(targetSchema, type, validFragmentsWithType, operation.selectionSet);
27
+ usedFragments = union(usedFragments, operationUsedFragments);
28
+ const { usedVariables: collectedUsedVariables, newFragments: collectedNewFragments, fragmentSet: collectedFragmentSet, } = collectFragmentVariables(targetSchema, fragmentSet, validFragments, validFragmentsWithType, usedFragments);
29
+ const operationOrFragmentVariables = union(operationUsedVariables, collectedUsedVariables);
30
+ usedVariables = union(usedVariables, operationOrFragmentVariables);
31
+ newFragments = collectedNewFragments;
32
+ fragmentSet = collectedFragmentSet;
33
+ const variableDefinitions = ((_a = operation.variableDefinitions) !== null && _a !== void 0 ? _a : []).filter((variable) => operationOrFragmentVariables.indexOf(variable.variable.name.value) !== -1);
34
+ newOperations.push({
35
+ kind: graphql_1.Kind.OPERATION_DEFINITION,
36
+ operation: operation.operation,
37
+ name: operation.name,
38
+ directives: operation.directives,
39
+ variableDefinitions,
40
+ selectionSet,
41
+ });
42
+ }
43
+ const newDocument = {
44
+ kind: graphql_1.Kind.DOCUMENT,
45
+ definitions: [...newOperations, ...newFragments],
46
+ };
47
+ return {
48
+ usedVariables,
49
+ newDocument,
50
+ };
51
+ }
52
+ function finalizeGatewayRequest(originalRequest, delegationContext) {
53
+ let { document, variables } = originalRequest;
54
+ let { operations, fragments } = (0, getDocumentMetadata_js_1.getDocumentMetadata)(document);
55
+ const { targetSchema, args } = delegationContext;
56
+ if (args) {
57
+ const requestWithNewVariables = addVariablesToRootFields(targetSchema, operations, args);
58
+ operations = requestWithNewVariables.newOperations;
59
+ variables = Object.assign({}, variables !== null && variables !== void 0 ? variables : {}, requestWithNewVariables.newVariables);
60
+ }
61
+ const { usedVariables, newDocument } = finalizeGatewayDocument(targetSchema, fragments, operations);
62
+ const newVariables = {};
63
+ if (variables != null) {
64
+ for (const variableName of usedVariables) {
65
+ const variableValue = variables[variableName];
66
+ if (variableValue !== undefined) {
67
+ newVariables[variableName] = variableValue;
68
+ }
69
+ }
70
+ }
71
+ return {
72
+ ...originalRequest,
73
+ document: newDocument,
74
+ variables: newVariables,
75
+ };
76
+ }
77
+ exports.finalizeGatewayRequest = finalizeGatewayRequest;
78
+ function addVariablesToRootFields(targetSchema, operations, args) {
79
+ const newVariables = Object.create(null);
80
+ const newOperations = operations.map((operation) => {
81
+ var _a, _b;
82
+ const variableDefinitionMap = ((_a = operation.variableDefinitions) !== null && _a !== void 0 ? _a : []).reduce((prev, def) => ({
83
+ ...prev,
84
+ [def.variable.name.value]: def,
85
+ }), {});
86
+ const type = (0, utils_1.getDefinedRootType)(targetSchema, operation.operation);
87
+ const newSelections = [];
88
+ for (const selection of operation.selectionSet.selections) {
89
+ if (selection.kind === graphql_1.Kind.FIELD) {
90
+ const argumentNodes = (_b = selection.arguments) !== null && _b !== void 0 ? _b : [];
91
+ const argumentNodeMap = argumentNodes.reduce((prev, argument) => ({
92
+ ...prev,
93
+ [argument.name.value]: argument,
94
+ }), {});
95
+ const targetField = type.getFields()[selection.name.value];
96
+ // excludes __typename
97
+ if (targetField != null) {
98
+ updateArguments(targetField, argumentNodeMap, variableDefinitionMap, newVariables, args);
99
+ }
100
+ newSelections.push({
101
+ ...selection,
102
+ arguments: Object.values(argumentNodeMap),
103
+ });
104
+ }
105
+ else {
106
+ newSelections.push(selection);
107
+ }
108
+ }
109
+ const newSelectionSet = {
110
+ kind: graphql_1.Kind.SELECTION_SET,
111
+ selections: newSelections,
112
+ };
113
+ return {
114
+ ...operation,
115
+ variableDefinitions: Object.values(variableDefinitionMap),
116
+ selectionSet: newSelectionSet,
117
+ };
118
+ });
119
+ return {
120
+ newOperations,
121
+ newVariables,
122
+ };
123
+ }
124
+ function updateArguments(targetField, argumentNodeMap, variableDefinitionMap, variableValues, newArgs) {
125
+ const generateVariableName = (0, utils_1.createVariableNameGenerator)(variableDefinitionMap);
126
+ for (const argument of targetField.args) {
127
+ const argName = argument.name;
128
+ const argType = argument.type;
129
+ if (argName in newArgs) {
130
+ (0, utils_1.updateArgument)(argumentNodeMap, variableDefinitionMap, variableValues, argName, generateVariableName(argName), argType, (0, utils_1.serializeInputValue)(argType, newArgs[argName]));
131
+ }
132
+ }
133
+ }
134
+ function collectFragmentVariables(targetSchema, fragmentSet, validFragments, validFragmentsWithType, usedFragments) {
135
+ let remainingFragments = usedFragments.slice();
136
+ let usedVariables = [];
137
+ const newFragments = [];
138
+ while (remainingFragments.length !== 0) {
139
+ const nextFragmentName = remainingFragments.pop();
140
+ const fragment = validFragments.find(fr => fr.name.value === nextFragmentName);
141
+ if (fragment != null) {
142
+ const name = nextFragmentName;
143
+ const typeName = fragment.typeCondition.name.value;
144
+ const type = targetSchema.getType(typeName);
145
+ if (type == null) {
146
+ throw new Error(`Fragment reference type "${typeName}", but the type is not contained within the target schema.`);
147
+ }
148
+ const { selectionSet, usedFragments: fragmentUsedFragments, usedVariables: fragmentUsedVariables, } = finalizeSelectionSet(targetSchema, type, validFragmentsWithType, fragment.selectionSet);
149
+ remainingFragments = union(remainingFragments, fragmentUsedFragments);
150
+ usedVariables = union(usedVariables, fragmentUsedVariables);
151
+ if (name && !(name in fragmentSet)) {
152
+ fragmentSet[name] = true;
153
+ newFragments.push({
154
+ kind: graphql_1.Kind.FRAGMENT_DEFINITION,
155
+ name: {
156
+ kind: graphql_1.Kind.NAME,
157
+ value: name,
158
+ },
159
+ typeCondition: fragment.typeCondition,
160
+ selectionSet,
161
+ });
162
+ }
163
+ }
164
+ }
165
+ return {
166
+ usedVariables,
167
+ newFragments,
168
+ fragmentSet,
169
+ };
170
+ }
171
+ const filteredSelectionSetVisitorKeys = {
172
+ SelectionSet: ['selections'],
173
+ Field: ['selectionSet'],
174
+ InlineFragment: ['selectionSet'],
175
+ FragmentDefinition: ['selectionSet'],
176
+ };
177
+ const variablesVisitorKeys = {
178
+ SelectionSet: ['selections'],
179
+ Field: ['arguments', 'directives', 'selectionSet'],
180
+ Argument: ['value'],
181
+ InlineFragment: ['directives', 'selectionSet'],
182
+ FragmentSpread: ['directives'],
183
+ FragmentDefinition: ['selectionSet'],
184
+ ObjectValue: ['fields'],
185
+ ObjectField: ['name', 'value'],
186
+ Directive: ['arguments'],
187
+ ListValue: ['values'],
188
+ };
189
+ function finalizeSelectionSet(schema, type, validFragments, selectionSet) {
190
+ const usedFragments = [];
191
+ const usedVariables = [];
192
+ const typeInfo = graphql_1.versionInfo.major < 16 ? new graphql_1.TypeInfo(schema, undefined, type) : new graphql_1.TypeInfo(schema, type);
193
+ const filteredSelectionSet = (0, graphql_1.visit)(selectionSet, (0, graphql_1.visitWithTypeInfo)(typeInfo, {
194
+ [graphql_1.Kind.FIELD]: {
195
+ enter: node => {
196
+ const parentType = typeInfo.getParentType();
197
+ if ((0, graphql_1.isObjectType)(parentType) || (0, graphql_1.isInterfaceType)(parentType)) {
198
+ const fields = parentType.getFields();
199
+ const field = node.name.value === '__typename' ? graphql_1.TypeNameMetaFieldDef : fields[node.name.value];
200
+ if (!field) {
201
+ return null;
202
+ }
203
+ const args = field.args != null ? field.args : [];
204
+ const argsMap = Object.create(null);
205
+ for (const arg of args) {
206
+ argsMap[arg.name] = arg;
207
+ }
208
+ if (node.arguments != null) {
209
+ const newArgs = [];
210
+ for (const arg of node.arguments) {
211
+ if (arg.name.value in argsMap) {
212
+ newArgs.push(arg);
213
+ }
214
+ }
215
+ if (newArgs.length !== node.arguments.length) {
216
+ return {
217
+ ...node,
218
+ arguments: newArgs,
219
+ };
220
+ }
221
+ }
222
+ }
223
+ },
224
+ leave: node => {
225
+ const type = typeInfo.getType();
226
+ if (type == null) {
227
+ throw new Error(`No type was found for field node ${(0, utils_1.inspect)(node)}.`);
228
+ }
229
+ const namedType = (0, graphql_1.getNamedType)(type);
230
+ if (!schema.getType(namedType.name) == null) {
231
+ return null;
232
+ }
233
+ if ((0, graphql_1.isObjectType)(namedType) || (0, graphql_1.isInterfaceType)(namedType)) {
234
+ const selections = node.selectionSet != null ? node.selectionSet.selections : null;
235
+ if (selections == null || selections.length === 0) {
236
+ return null;
237
+ }
238
+ }
239
+ },
240
+ },
241
+ [graphql_1.Kind.FRAGMENT_SPREAD]: {
242
+ enter: node => {
243
+ if (!(node.name.value in validFragments)) {
244
+ return null;
245
+ }
246
+ const parentType = typeInfo.getParentType();
247
+ const innerType = validFragments[node.name.value];
248
+ if (!(0, utils_1.implementsAbstractType)(schema, parentType, innerType)) {
249
+ return null;
250
+ }
251
+ usedFragments.push(node.name.value);
252
+ },
253
+ },
254
+ [graphql_1.Kind.INLINE_FRAGMENT]: {
255
+ enter: node => {
256
+ if (node.typeCondition != null) {
257
+ const parentType = typeInfo.getParentType();
258
+ const innerType = schema.getType(node.typeCondition.name.value);
259
+ if (!(0, utils_1.implementsAbstractType)(schema, parentType, innerType)) {
260
+ return null;
261
+ }
262
+ }
263
+ },
264
+ },
265
+ [graphql_1.Kind.SELECTION_SET]: {
266
+ leave: node => {
267
+ const parentType = typeInfo.getParentType();
268
+ if (parentType != null && (0, graphql_1.isAbstractType)(parentType)) {
269
+ const selections = node.selections.concat([
270
+ {
271
+ kind: graphql_1.Kind.FIELD,
272
+ name: {
273
+ kind: graphql_1.Kind.NAME,
274
+ value: '__typename',
275
+ },
276
+ },
277
+ ]);
278
+ return {
279
+ ...node,
280
+ selections,
281
+ };
282
+ }
283
+ },
284
+ },
285
+ }),
286
+ // visitorKeys argument usage a la https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-graphql/src/batching/merge-queries.js
287
+ // empty keys cannot be removed only because of typescript errors
288
+ // will hopefully be fixed in future version of graphql-js to be optional
289
+ filteredSelectionSetVisitorKeys);
290
+ (0, graphql_1.visit)(filteredSelectionSet, {
291
+ [graphql_1.Kind.VARIABLE]: variableNode => {
292
+ usedVariables.push(variableNode.name.value);
293
+ },
294
+ },
295
+ // visitorKeys argument usage a la https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-graphql/src/batching/merge-queries.js
296
+ // empty keys cannot be removed only because of typescript errors
297
+ // will hopefully be fixed in future version of graphql-js to be optional
298
+ variablesVisitorKeys);
299
+ return {
300
+ selectionSet: filteredSelectionSet,
301
+ usedFragments,
302
+ usedVariables,
303
+ };
304
+ }
305
+ function union(...arrays) {
306
+ const cache = Object.create(null);
307
+ const result = [];
308
+ for (const array of arrays) {
309
+ for (const item of array) {
310
+ if (!(item in cache)) {
311
+ cache[item] = true;
312
+ result.push(item);
313
+ }
314
+ }
315
+ }
316
+ return result;
317
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDocumentMetadata = void 0;
4
+ const graphql_1 = require("graphql");
5
+ function getDocumentMetadata(document) {
6
+ const operations = [];
7
+ const fragments = [];
8
+ const fragmentNames = new Set();
9
+ for (let i = 0; i < document.definitions.length; i++) {
10
+ const def = document.definitions[i];
11
+ if (def.kind === graphql_1.Kind.FRAGMENT_DEFINITION) {
12
+ fragments.push(def);
13
+ fragmentNames.add(def.name.value);
14
+ }
15
+ else if (def.kind === graphql_1.Kind.OPERATION_DEFINITION) {
16
+ operations.push(def);
17
+ }
18
+ }
19
+ return {
20
+ operations,
21
+ fragments,
22
+ fragmentNames,
23
+ };
24
+ }
25
+ exports.getDocumentMetadata = getDocumentMetadata;
package/cjs/index.js ADDED
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./Subschema.js"), exports);
5
+ tslib_1.__exportStar(require("./Transformer.js"), exports);
6
+ tslib_1.__exportStar(require("./applySchemaTransforms.js"), exports);
7
+ tslib_1.__exportStar(require("./createRequest.js"), exports);
8
+ tslib_1.__exportStar(require("./defaultMergedResolver.js"), exports);
9
+ tslib_1.__exportStar(require("./delegateToSchema.js"), exports);
10
+ tslib_1.__exportStar(require("./mergeFields.js"), exports);
11
+ tslib_1.__exportStar(require("./resolveExternalValue.js"), exports);
12
+ tslib_1.__exportStar(require("./subschemaConfig.js"), exports);
13
+ tslib_1.__exportStar(require("./types.js"), exports);
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mergeFields = exports.getUnpathedErrors = exports.getSubschema = exports.annotateExternalObject = exports.isExternalObject = void 0;
4
+ const graphql_1 = require("graphql");
5
+ const utils_1 = require("@graphql-tools/utils");
6
+ const symbols_js_1 = require("./symbols.js");
7
+ function isExternalObject(data) {
8
+ return data[symbols_js_1.UNPATHED_ERRORS_SYMBOL] !== undefined;
9
+ }
10
+ exports.isExternalObject = isExternalObject;
11
+ function annotateExternalObject(object, errors, subschema, subschemaMap) {
12
+ Object.defineProperties(object, {
13
+ [symbols_js_1.OBJECT_SUBSCHEMA_SYMBOL]: { value: subschema },
14
+ [symbols_js_1.FIELD_SUBSCHEMA_MAP_SYMBOL]: { value: subschemaMap },
15
+ [symbols_js_1.UNPATHED_ERRORS_SYMBOL]: { value: errors },
16
+ });
17
+ return object;
18
+ }
19
+ exports.annotateExternalObject = annotateExternalObject;
20
+ function getSubschema(object, responseKey) {
21
+ var _a;
22
+ return (_a = object[symbols_js_1.FIELD_SUBSCHEMA_MAP_SYMBOL][responseKey]) !== null && _a !== void 0 ? _a : object[symbols_js_1.OBJECT_SUBSCHEMA_SYMBOL];
23
+ }
24
+ exports.getSubschema = getSubschema;
25
+ function getUnpathedErrors(object) {
26
+ return object[symbols_js_1.UNPATHED_ERRORS_SYMBOL];
27
+ }
28
+ exports.getUnpathedErrors = getUnpathedErrors;
29
+ const EMPTY_ARRAY = [];
30
+ const EMPTY_OBJECT = Object.create(null);
31
+ async function mergeFields(mergedTypeInfo, object, sourceSubschema, context, info) {
32
+ var _a;
33
+ const delegationMaps = mergedTypeInfo.delegationPlanBuilder(info.schema, sourceSubschema, info.variableValues != null && Object.keys(info.variableValues).length > 0 ? info.variableValues : EMPTY_OBJECT, info.fragments != null && Object.keys(info.fragments).length > 0 ? info.fragments : EMPTY_OBJECT, ((_a = info.fieldNodes) === null || _a === void 0 ? void 0 : _a.length) ? info.fieldNodes : EMPTY_ARRAY);
34
+ for (const delegationMap of delegationMaps) {
35
+ await executeDelegationStage(mergedTypeInfo, delegationMap, object, context, info);
36
+ }
37
+ return object;
38
+ }
39
+ exports.mergeFields = mergeFields;
40
+ async function executeDelegationStage(mergedTypeInfo, delegationMap, object, context, info) {
41
+ const combinedErrors = object[symbols_js_1.UNPATHED_ERRORS_SYMBOL];
42
+ const path = (0, graphql_1.responsePathAsArray)(info.path);
43
+ const combinedFieldSubschemaMap = object[symbols_js_1.FIELD_SUBSCHEMA_MAP_SYMBOL];
44
+ await Promise.all([...delegationMap.entries()].map(async ([subschema, selectionSet]) => {
45
+ var _a;
46
+ const schema = subschema.transformedSchema || info.schema;
47
+ const type = schema.getType(object.__typename);
48
+ const resolver = mergedTypeInfo.resolvers.get(subschema);
49
+ if (resolver) {
50
+ let source;
51
+ try {
52
+ source = await resolver(object, context, info, subschema, selectionSet, undefined, type);
53
+ }
54
+ catch (error) {
55
+ source = error;
56
+ }
57
+ if (source instanceof Error || source == null) {
58
+ const fieldNodeResponseKeyMap = (0, utils_1.collectFields)(schema, EMPTY_OBJECT, EMPTY_OBJECT, type, selectionSet, new Map(), new Set());
59
+ const nullResult = {};
60
+ for (const [responseKey, fieldNodes] of fieldNodeResponseKeyMap) {
61
+ const combinedPath = [...path, responseKey];
62
+ if (source instanceof graphql_1.GraphQLError) {
63
+ nullResult[responseKey] = (0, utils_1.relocatedError)(source, combinedPath);
64
+ }
65
+ else if (source instanceof Error) {
66
+ nullResult[responseKey] = (0, graphql_1.locatedError)(source, fieldNodes, combinedPath);
67
+ }
68
+ else {
69
+ nullResult[responseKey] = null;
70
+ }
71
+ }
72
+ source = nullResult;
73
+ }
74
+ else {
75
+ if (source[symbols_js_1.UNPATHED_ERRORS_SYMBOL]) {
76
+ combinedErrors.push(...source[symbols_js_1.UNPATHED_ERRORS_SYMBOL]);
77
+ }
78
+ }
79
+ const objectSubschema = source[symbols_js_1.OBJECT_SUBSCHEMA_SYMBOL];
80
+ const fieldSubschemaMap = source[symbols_js_1.FIELD_SUBSCHEMA_MAP_SYMBOL];
81
+ for (const responseKey in source) {
82
+ object[responseKey] = source[responseKey];
83
+ combinedFieldSubschemaMap[responseKey] = (_a = fieldSubschemaMap === null || fieldSubschemaMap === void 0 ? void 0 : fieldSubschemaMap[responseKey]) !== null && _a !== void 0 ? _a : objectSubschema;
84
+ }
85
+ }
86
+ }));
87
+ }
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}