@social-mail/social-mail-web-server 1.5.7 → 1.5.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-web-server",
3
- "version": "1.5.7",
3
+ "version": "1.5.9",
4
4
  "description": "## Phase 1",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,7 +18,7 @@ export default class GlobalEvents {
18
18
 
19
19
  private client: Promise<WebSocket>;
20
20
 
21
- public on(m: "refresh-dns", fx: () => any);
21
+ public on(m: "refresh-dns", fx: (m1: "refresh-dns", value: { serverID }) => any);
22
22
  public on(m: "dkim-added", fx: (m1: "dkim-added", value: { serverID, host, publicKey, name, keyType }) => any);
23
23
  public on(m: "host-added", fx: (m1: "host-added", value: { serverID, host: string }) => any);
24
24
  public on(m: "html-to-image" | "html-to-image-result", value: any);
@@ -45,10 +45,10 @@ export default class GlobalEvents {
45
45
  const { id } = v;
46
46
  try {
47
47
  fx(v).then(
48
- (value) => this.notify(id, { value }),
49
- (error) => this.notify(id, { error }));
48
+ (value) => this.notify(id, { value } as any),
49
+ (error) => this.notify(id, { error } as any));
50
50
  } catch (e) {
51
- this.notify(id, { error: e});
51
+ this.notify(id, { error: e} as any);
52
52
  }
53
53
  });
54
54
  }
@@ -57,7 +57,7 @@ export default class GlobalEvents {
57
57
  public async post(m: any, p: any): Promise<any> {
58
58
  const id = `${m}-${pid++}`;
59
59
  return new Promise<any>((resolve, reject) => {
60
- const d = this.on(id as any, ({ value, error }) => {
60
+ const d = this.on("html-to-image", ({ value, error }) => {
61
61
  d[Symbol.dispose]();
62
62
  if (error) {
63
63
  reject(error);
@@ -70,7 +70,7 @@ export default class GlobalEvents {
70
70
  });
71
71
  }
72
72
 
73
- public notify(m: "refresh-dns", value?: any);
73
+ public notify(m: "refresh-dns", value: { serverID });
74
74
  public notify(m: "dkim-added", value: { serverID, host, publicKey, name, keyType });
75
75
  public notify(m: "host-added", value: { serverID, host: string });
76
76
  public notify(message: any, value: any) {
@@ -39,7 +39,7 @@ export default class SyncDnsZoneRecordsWorkflow extends Workflow {
39
39
  ) {
40
40
  const zoneID = this.input;
41
41
  await db.hostedZones.statements.update({ dateSigned: null, dateUpdated: DateTime.now }, { zoneID });
42
- ge.notify("refresh-dns");
42
+ ge.notify("refresh-dns", { serverID: globalEnv.serverID });
43
43
  }
44
44
 
45
45
  @UniqueActivity