@upyo/mock 0.5.0-dev.156 → 0.5.0-dev.164
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/index.cjs +10 -6
- package/dist/index.js +10 -6
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -353,12 +353,16 @@ var MockTransport = class {
|
|
|
353
353
|
this.nextResponse = null;
|
|
354
354
|
return response;
|
|
355
355
|
}
|
|
356
|
-
if (this.config.defaultResponse.successful && this.config.generateUniqueMessageIds)
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
356
|
+
if (this.config.defaultResponse.successful && this.config.generateUniqueMessageIds) {
|
|
357
|
+
const { attempts, timestamp } = this.config.defaultResponse;
|
|
358
|
+
return {
|
|
359
|
+
successful: true,
|
|
360
|
+
messageId: `mock-message-${this.messageIdCounter++}`,
|
|
361
|
+
provider: "mock",
|
|
362
|
+
...attempts == null ? {} : { attempts },
|
|
363
|
+
...timestamp == null ? {} : { timestamp }
|
|
364
|
+
};
|
|
365
|
+
}
|
|
362
366
|
return this.config.defaultResponse;
|
|
363
367
|
}
|
|
364
368
|
};
|
package/dist/index.js
CHANGED
|
@@ -330,12 +330,16 @@ var MockTransport = class {
|
|
|
330
330
|
this.nextResponse = null;
|
|
331
331
|
return response;
|
|
332
332
|
}
|
|
333
|
-
if (this.config.defaultResponse.successful && this.config.generateUniqueMessageIds)
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
333
|
+
if (this.config.defaultResponse.successful && this.config.generateUniqueMessageIds) {
|
|
334
|
+
const { attempts, timestamp } = this.config.defaultResponse;
|
|
335
|
+
return {
|
|
336
|
+
successful: true,
|
|
337
|
+
messageId: `mock-message-${this.messageIdCounter++}`,
|
|
338
|
+
provider: "mock",
|
|
339
|
+
...attempts == null ? {} : { attempts },
|
|
340
|
+
...timestamp == null ? {} : { timestamp }
|
|
341
|
+
};
|
|
342
|
+
}
|
|
339
343
|
return this.config.defaultResponse;
|
|
340
344
|
}
|
|
341
345
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upyo/mock",
|
|
3
|
-
"version": "0.5.0-dev.
|
|
3
|
+
"version": "0.5.0-dev.164",
|
|
4
4
|
"description": "Mock transport for Upyo email library—useful for testing",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"email",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"sideEffects": false,
|
|
56
56
|
"peerDependencies": {
|
|
57
|
-
"@upyo/core": "0.5.0-dev.
|
|
57
|
+
"@upyo/core": "0.5.0-dev.164+5e283c64"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"tsdown": "^0.12.7",
|