@ondc/automation-mock-runner 1.3.55 → 1.3.56
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/dist/lib/configHelper.js +14 -0
- package/package.json +1 -1
package/dist/lib/configHelper.js
CHANGED
|
@@ -166,6 +166,17 @@ async function createOptimizedMockConfig(config) {
|
|
|
166
166
|
},
|
|
167
167
|
};
|
|
168
168
|
}));
|
|
169
|
+
const optimizedExtraSteps = config.extra_steps ? await Promise.all(config.extra_steps.steps.map(async (step) => {
|
|
170
|
+
return {
|
|
171
|
+
...step,
|
|
172
|
+
mock: {
|
|
173
|
+
...step.mock,
|
|
174
|
+
generate: await getMinifiedCode(step.mock.generate),
|
|
175
|
+
validate: await getMinifiedCode(step.mock.validate),
|
|
176
|
+
requirements: await getMinifiedCode(step.mock.requirements),
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
})) : [];
|
|
169
180
|
const optimizedConfig = {
|
|
170
181
|
meta: config.meta,
|
|
171
182
|
transaction_history: [],
|
|
@@ -173,6 +184,9 @@ async function createOptimizedMockConfig(config) {
|
|
|
173
184
|
validationLib: config.validationLib,
|
|
174
185
|
transaction_data: config.transaction_data,
|
|
175
186
|
steps: optimizedSteps,
|
|
187
|
+
extra_steps: {
|
|
188
|
+
steps: optimizedExtraSteps,
|
|
189
|
+
}
|
|
176
190
|
};
|
|
177
191
|
return optimizedConfig;
|
|
178
192
|
}
|