@ondc/automation-mock-runner 0.2.0 → 0.2.2
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.
|
@@ -25,7 +25,7 @@ exports.FUNCTION_REGISTRY = {
|
|
|
25
25
|
description: "The generated payload object to be sent in the API request",
|
|
26
26
|
},
|
|
27
27
|
description: "Generates the mock payload for an API call",
|
|
28
|
-
timeout:
|
|
28
|
+
timeout: 60 * 1000,
|
|
29
29
|
defaultBody: ` return defaultPayload;`,
|
|
30
30
|
template: (body) => `/**
|
|
31
31
|
* Generates the mock payload for an API call in the transaction flow.
|
|
@@ -10,15 +10,13 @@ class WorkerFactory {
|
|
|
10
10
|
const { id, code, functionName, args } = event.data;
|
|
11
11
|
const startTime = performance.now();
|
|
12
12
|
let logs = [];
|
|
13
|
-
|
|
14
|
-
try {
|
|
15
13
|
// Capture console outputs
|
|
16
14
|
const originalConsole = {
|
|
17
15
|
log: console.log,
|
|
18
16
|
error: console.error,
|
|
19
17
|
warn: console.warn
|
|
20
18
|
};
|
|
21
|
-
|
|
19
|
+
try {
|
|
22
20
|
console.log = (...logArgs) => {
|
|
23
21
|
logs.push({
|
|
24
22
|
type: 'log',
|