core-3nweb-client-lib 0.49.1 → 0.49.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.
@@ -154,6 +154,8 @@ class Delivery {
154
154
  }
155
155
  const attachments = common_1.Attachments.fromMsg(msgToSend);
156
156
  const localMeta = opts === null || opts === void 0 ? void 0 : opts.localMeta;
157
+ // DEBUG console to help capturing a bug
158
+ console.log(`Sending msg with delivery id ${id} ${attachments ? `with attachments` : `without attachments`}`);
157
159
  // save msg, in case delivery should be restarted
158
160
  const msgFS = await this.makeFSForNewMsg(id);
159
161
  const msg = await msg_1.Msg.forNew(id, msgFS, msgToSend, sender, recipients, this.r, attachments, localMeta, opts === null || opts === void 0 ? void 0 : opts.retryRecipient);
@@ -65,8 +65,7 @@ class WIP {
65
65
  const wip = new WIP(msg, state, cryptor);
66
66
  wip.packer = await msg.msgPacker(state.pack);
67
67
  if (state.bytesUploaded > 0) {
68
- msg.progress.recipients[state.recipient].bytesSent =
69
- state.bytesUploaded;
68
+ msg.progress.recipients[state.recipient].bytesSent = state.bytesUploaded;
70
69
  }
71
70
  return wip;
72
71
  }
@@ -230,8 +229,7 @@ class WIP {
230
229
  const recInfo = this.msg.progress.recipients[recipient];
231
230
  if (complete) {
232
231
  if (err) {
233
- recInfo.err = (err.runtimeException ?
234
- err : (err.stack ? err.stack : err));
232
+ recInfo.err = (err.runtimeException ? err : (err.stack ? err.stack : err));
235
233
  }
236
234
  else {
237
235
  recInfo.bytesSent = this.msg.progress.msgSize;
@@ -155,9 +155,9 @@ class MailSender {
155
155
  }
156
156
  }
157
157
  prepareRedirectOrThrowUp(rep) {
158
- if (("string" !== typeof rep.redirect) ||
159
- (rep.redirect.length === 0) ||
160
- ((new URL(rep.redirect)).protocol !== 'https:')) {
158
+ if (("string" !== typeof rep.redirect)
159
+ || (rep.redirect.length === 0)
160
+ || ((new URL(rep.redirect)).protocol !== 'https:')) {
161
161
  throw this.badRedirectExc();
162
162
  }
163
163
  // refuse second redirect
@@ -413,8 +413,8 @@ class MailSender {
413
413
  async trySessionRestart() {
414
414
  // check and set timestamp for session restarts
415
415
  const now = Date.now();
416
- if ((typeof this.sessionRestartTimeStamp === 'number') &&
417
- (now <= (this.sessionRestartTimeStamp + TOO_EARLY_RESTART_PERIOD))) {
416
+ if ((typeof this.sessionRestartTimeStamp === 'number')
417
+ && (now <= (this.sessionRestartTimeStamp + TOO_EARLY_RESTART_PERIOD))) {
418
418
  return false;
419
419
  }
420
420
  this.sessionRestartTimeStamp = now;
@@ -451,6 +451,10 @@ class MailSender {
451
451
  }
452
452
  }
453
453
  else if (rep.status === api.msgObj.SC.ok) {
454
+ // DEBUG console to help capturing a bug
455
+ if ((fstReq === null || fstReq === void 0 ? void 0 : fstReq.last) || (followReq === null || followReq === void 0 ? void 0 : followReq.last)) {
456
+ console.log(`sent obj ${objId} within msg ${this.msgId}`);
457
+ }
454
458
  // normal return
455
459
  return;
456
460
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.49.1",
3
+ "version": "0.49.2",
4
4
  "description": "3NWeb client core library, embeddable into different environments",
5
5
  "main": "build/lib-index.js",
6
6
  "types": "build/lib-index.d.ts",