core-3nweb-client-lib 0.35.2 → 0.35.4

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.
@@ -34,7 +34,7 @@ class ConfigOfASMailServer {
34
34
  getOnServer: this.serverConfig.getParam.bind(this.serverConfig),
35
35
  setOnServer: async (param, value) => {
36
36
  ensureParameterCanBeSetDirectly(param);
37
- this.serverConfig.setParam(param, value);
37
+ await this.serverConfig.setParam(param, value);
38
38
  }
39
39
  };
40
40
  return Object.freeze(w);
@@ -100,7 +100,7 @@ class RecordsInSQL {
100
100
  key, keyStatus,
101
101
  mainObjHeaderOfs, removeAfter
102
102
  }));
103
- await db.saveToFile();
103
+ await db.saveToFile({ skipUpload: true });
104
104
  }
105
105
  async saveLatestWithAttr() {
106
106
  // XXX
@@ -137,7 +137,7 @@ class RecordsInSQL {
137
137
  const deliveryTS = findMsgAndGetDeliveryTS(db.db, msgId);
138
138
  if (deliveryTS) {
139
139
  deleteMsgFrom(db.db, msgId);
140
- await db.saveToFile();
140
+ await db.saveToFile({ skipUpload: true });
141
141
  return deliveryTS;
142
142
  }
143
143
  }
@@ -231,7 +231,7 @@ class SqliteFiles {
231
231
  const dbFile = await this.dbsFS.writableFile(LATEST_DB, { create: true, exclusive: true });
232
232
  const latest = await lib_sqlite_on_3nstorage_1.SQLiteOn3NStorage.makeAndStart(dbFile);
233
233
  latest.db.run(createIndexTab);
234
- await latest.saveToFile();
234
+ await latest.saveToFile({ skipUpload: true });
235
235
  return latest;
236
236
  }
237
237
  }
@@ -9,8 +9,7 @@ export interface ParamOnServer<P extends keyof ASMailConfigParams> {
9
9
  getFromServer: () => Promise<ASMailConfigParams[P] | null>;
10
10
  }
11
11
  export declare class MailConfigurator extends ServiceUser {
12
- private readonly sleepMillisAfterParamSetting;
13
- constructor(userId: string, getSigner: IGetMailerIdSigner, mainUrlGetter: () => Promise<string>, net: NetClient, sleepMillisAfterParamSetting?: number);
12
+ constructor(userId: string, getSigner: IGetMailerIdSigner, mainUrlGetter: () => Promise<string>, net: NetClient);
14
13
  getParam<P extends keyof ASMailConfigParams>(param: P): Promise<ASMailConfigParams[P] | null>;
15
14
  setParam<P extends keyof ASMailConfigParams>(param: P, value: ASMailConfigParams[P] | null): Promise<void>;
16
15
  makeParamSetterAndGetter<P extends keyof ASMailConfigParams>(param: P): ParamOnServer<P>;
@@ -23,16 +23,14 @@ const request_utils_1 = require("../request-utils");
23
23
  const api = require("../../lib-common/service-api/asmail/config");
24
24
  const user_with_mid_session_1 = require("../user-with-mid-session");
25
25
  const service_locator_1 = require("../service-locator");
26
- const sleep_1 = require("../../lib-common/processes/sleep");
27
26
  const configAccessParams = {
28
27
  login: api.midLogin.MID_URL_PART,
29
28
  logout: api.closeSession.URL_END,
30
29
  canBeRedirected: true
31
30
  };
32
31
  class MailConfigurator extends user_with_mid_session_1.ServiceUser {
33
- constructor(userId, getSigner, mainUrlGetter, net, sleepMillisAfterParamSetting = 50) {
32
+ constructor(userId, getSigner, mainUrlGetter, net) {
34
33
  super(userId, configAccessParams, getSigner, serviceUriGetter(net, mainUrlGetter), net);
35
- this.sleepMillisAfterParamSetting = sleepMillisAfterParamSetting;
36
34
  Object.seal(this);
37
35
  }
38
36
  async getParam(param) {
@@ -56,8 +54,6 @@ class MailConfigurator extends user_with_mid_session_1.ServiceUser {
56
54
  if (rep.status !== api.PARAM_SC.ok) {
57
55
  throw (0, request_utils_1.makeException)(rep, 'Unexpected status');
58
56
  }
59
- // wait to let possibly distributed system to propagate updates internally
60
- await (0, sleep_1.sleep)(this.sleepMillisAfterParamSetting);
61
57
  }
62
58
  makeParamSetterAndGetter(param) {
63
59
  return {