@upyo/mock 0.5.0-dev.158 → 0.5.0-dev.168

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 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) return {
357
- ...this.config.defaultResponse,
358
- successful: true,
359
- messageId: `mock-message-${this.messageIdCounter++}`,
360
- provider: "mock"
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) return {
334
- ...this.config.defaultResponse,
335
- successful: true,
336
- messageId: `mock-message-${this.messageIdCounter++}`,
337
- provider: "mock"
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.158",
3
+ "version": "0.5.0-dev.168",
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.158+468b767c"
57
+ "@upyo/core": "0.5.0-dev.168+1e808a3a"
58
58
  },
59
59
  "devDependencies": {
60
60
  "tsdown": "^0.12.7",