Skip to content

Commit 8950cf6

Browse files
committed
3.34.0
1 parent 663c5ce commit 8950cf6

4 files changed

Lines changed: 51 additions & 51 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "epicenter-libs",
3-
"version": "3.33.0",
3+
"version": "3.34.0",
44
"main": "dist/cjs/epicenter.js",
55
"type": "module",
66
"module": "dist/module/epicenter.js",

src/adapters/chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,4 +318,4 @@ export async function sendMessageAdmin(
318318
body: { message },
319319
...routingOptions,
320320
}).then(({ body }) => body);
321-
}
321+
}

tests/chat.spec.js

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,25 @@ describe('chatAdapter', () => {
5858
await chatAdapter.create(room, scope, permit);
5959
const req = capturedRequests[capturedRequests.length - 1];
6060
expect(getAuthHeader(req.requestHeaders)).toBe(
61-
`Bearer ${SESSION.token}`
61+
`Bearer ${SESSION.token}`,
6262
);
6363
});
6464

6565
it('Should use the chat URL', async () => {
6666
await chatAdapter.create(room, scope, permit);
6767
const req = capturedRequests[capturedRequests.length - 1];
6868
expect(req.url).toBe(
69-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat`
69+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat`,
7070
);
7171
});
7272

7373
it('Should support generic URL options', async () => {
7474
await chatAdapter.create(room, scope, permit, GENERIC_OPTIONS);
7575
const req = capturedRequests[capturedRequests.length - 1];
76-
const { server, accountShortName, projectShortName } =
77-
GENERIC_OPTIONS;
76+
const { server, accountShortName, projectShortName }
77+
= GENERIC_OPTIONS;
7878
expect(req.url).toBe(
79-
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat`
79+
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat`,
8080
);
8181
});
8282

@@ -110,25 +110,25 @@ describe('chatAdapter', () => {
110110
await chatAdapter.get(chatKey);
111111
const req = capturedRequests[capturedRequests.length - 1];
112112
expect(getAuthHeader(req.requestHeaders)).toBe(
113-
`Bearer ${SESSION.token}`
113+
`Bearer ${SESSION.token}`,
114114
);
115115
});
116116

117117
it('Should use the chat URL with chatKey', async () => {
118118
await chatAdapter.get(chatKey);
119119
const req = capturedRequests[capturedRequests.length - 1];
120120
expect(req.url).toBe(
121-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/${chatKey}`
121+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/${chatKey}`,
122122
);
123123
});
124124

125125
it('Should support generic URL options', async () => {
126126
await chatAdapter.get(chatKey, GENERIC_OPTIONS);
127127
const req = capturedRequests[capturedRequests.length - 1];
128-
const { server, accountShortName, projectShortName } =
129-
GENERIC_OPTIONS;
128+
const { server, accountShortName, projectShortName }
129+
= GENERIC_OPTIONS;
130130
expect(req.url).toBe(
131-
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/${chatKey}`
131+
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/${chatKey}`,
132132
);
133133
});
134134

@@ -152,25 +152,25 @@ describe('chatAdapter', () => {
152152
await chatAdapter.updatePermit(chatKey, permit);
153153
const req = capturedRequests[capturedRequests.length - 1];
154154
expect(getAuthHeader(req.requestHeaders)).toBe(
155-
`Bearer ${SESSION.token}`
155+
`Bearer ${SESSION.token}`,
156156
);
157157
});
158158

159159
it('Should use the chat URL with chatKey', async () => {
160160
await chatAdapter.updatePermit(chatKey, permit);
161161
const req = capturedRequests[capturedRequests.length - 1];
162162
expect(req.url).toBe(
163-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/${chatKey}`
163+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/${chatKey}`,
164164
);
165165
});
166166

167167
it('Should support generic URL options', async () => {
168168
await chatAdapter.updatePermit(chatKey, permit, GENERIC_OPTIONS);
169169
const req = capturedRequests[capturedRequests.length - 1];
170-
const { server, accountShortName, projectShortName } =
171-
GENERIC_OPTIONS;
170+
const { server, accountShortName, projectShortName }
171+
= GENERIC_OPTIONS;
172172
expect(req.url).toBe(
173-
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/${chatKey}`
173+
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/${chatKey}`,
174174
);
175175
});
176176

@@ -205,25 +205,25 @@ describe('chatAdapter', () => {
205205
await chatAdapter.query(searchOptions);
206206
const req = capturedRequests[capturedRequests.length - 1];
207207
expect(getAuthHeader(req.requestHeaders)).toBe(
208-
`Bearer ${SESSION.token}`
208+
`Bearer ${SESSION.token}`,
209209
);
210210
});
211211

212212
it('Should use the chat/search URL', async () => {
213213
await chatAdapter.query(searchOptions);
214214
const req = capturedRequests[capturedRequests.length - 1];
215215
expect(req.url).toContain(
216-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/search`
216+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/search`,
217217
);
218218
});
219219

220220
it('Should support generic URL options', async () => {
221221
await chatAdapter.query(searchOptions, GENERIC_OPTIONS);
222222
const req = capturedRequests[capturedRequests.length - 1];
223-
const { server, accountShortName, projectShortName } =
224-
GENERIC_OPTIONS;
223+
const { server, accountShortName, projectShortName }
224+
= GENERIC_OPTIONS;
225225
expect(req.url).toContain(
226-
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/search`
226+
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/search`,
227227
);
228228
});
229229

@@ -253,15 +253,15 @@ describe('chatAdapter', () => {
253253
await chatAdapter.sendMessage(chatKey, message);
254254
const req = capturedRequests[capturedRequests.length - 1];
255255
expect(getAuthHeader(req.requestHeaders)).toBe(
256-
`Bearer ${SESSION.token}`
256+
`Bearer ${SESSION.token}`,
257257
);
258258
});
259259

260260
it('Should use the chat/message URL', async () => {
261261
await chatAdapter.sendMessage(chatKey, message);
262262
const req = capturedRequests[capturedRequests.length - 1];
263263
expect(req.url).toBe(
264-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/${chatKey}`
264+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/${chatKey}`,
265265
);
266266
});
267267

@@ -270,17 +270,17 @@ describe('chatAdapter', () => {
270270
await chatAdapter.sendMessage(chatKey, message, { userKey });
271271
const req = capturedRequests[capturedRequests.length - 1];
272272
expect(req.url).toBe(
273-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/${chatKey}/${userKey}`
273+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/${chatKey}/${userKey}`,
274274
);
275275
});
276276

277277
it('Should support generic URL options', async () => {
278278
await chatAdapter.sendMessage(chatKey, message, GENERIC_OPTIONS);
279279
const req = capturedRequests[capturedRequests.length - 1];
280-
const { server, accountShortName, projectShortName } =
281-
GENERIC_OPTIONS;
280+
const { server, accountShortName, projectShortName }
281+
= GENERIC_OPTIONS;
282282
expect(req.url).toBe(
283-
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/message/${chatKey}`
283+
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/message/${chatKey}`,
284284
);
285285
});
286286

@@ -308,25 +308,25 @@ describe('chatAdapter', () => {
308308
await chatAdapter.getMessages(chatKey);
309309
const req = capturedRequests[capturedRequests.length - 1];
310310
expect(getAuthHeader(req.requestHeaders)).toBe(
311-
`Bearer ${SESSION.token}`
311+
`Bearer ${SESSION.token}`,
312312
);
313313
});
314314

315315
it('Should use the chat/message URL', async () => {
316316
await chatAdapter.getMessages(chatKey);
317317
const req = capturedRequests[capturedRequests.length - 1];
318318
expect(req.url).toContain(
319-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/${chatKey}`
319+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/${chatKey}`,
320320
);
321321
});
322322

323323
it('Should support generic URL options', async () => {
324324
await chatAdapter.getMessages(chatKey, GENERIC_OPTIONS);
325325
const req = capturedRequests[capturedRequests.length - 1];
326-
const { server, accountShortName, projectShortName } =
327-
GENERIC_OPTIONS;
326+
const { server, accountShortName, projectShortName }
327+
= GENERIC_OPTIONS;
328328
expect(req.url).toContain(
329-
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/message/${chatKey}`
329+
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/message/${chatKey}`,
330330
);
331331
});
332332

@@ -358,25 +358,25 @@ describe('chatAdapter', () => {
358358
await chatAdapter.getMessagesForUser(chatKey, pseudonymKey);
359359
const req = capturedRequests[capturedRequests.length - 1];
360360
expect(getAuthHeader(req.requestHeaders)).toBe(
361-
`Bearer ${SESSION.token}`
361+
`Bearer ${SESSION.token}`,
362362
);
363363
});
364364

365365
it('Should use the chat/message URL', async () => {
366366
await chatAdapter.getMessagesForUser(chatKey, pseudonymKey);
367367
const req = capturedRequests[capturedRequests.length - 1];
368368
expect(req.url).toContain(
369-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/${chatKey}/${pseudonymKey}`
369+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/${chatKey}/${pseudonymKey}`,
370370
);
371371
});
372372

373373
it('Should support generic URL options', async () => {
374374
await chatAdapter.getMessagesForUser(chatKey, pseudonymKey, GENERIC_OPTIONS);
375375
const req = capturedRequests[capturedRequests.length - 1];
376-
const { server, accountShortName, projectShortName } =
377-
GENERIC_OPTIONS;
376+
const { server, accountShortName, projectShortName }
377+
= GENERIC_OPTIONS;
378378
expect(req.url).toContain(
379-
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/message/${chatKey}/${pseudonymKey}`
379+
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/message/${chatKey}/${pseudonymKey}`,
380380
);
381381
});
382382

@@ -407,25 +407,25 @@ describe('chatAdapter', () => {
407407
await chatAdapter.getMessagesAdmin(chatKey);
408408
const req = capturedRequests[capturedRequests.length - 1];
409409
expect(getAuthHeader(req.requestHeaders)).toBe(
410-
`Bearer ${SESSION.token}`
410+
`Bearer ${SESSION.token}`,
411411
);
412412
});
413413

414414
it('Should use the chat/message URL', async () => {
415415
await chatAdapter.getMessagesAdmin(chatKey);
416416
const req = capturedRequests[capturedRequests.length - 1];
417417
expect(req.url).toContain(
418-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/all/${chatKey}`
418+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/all/${chatKey}`,
419419
);
420420
});
421421

422422
it('Should support generic URL options', async () => {
423423
await chatAdapter.getMessagesAdmin(chatKey, GENERIC_OPTIONS);
424424
const req = capturedRequests[capturedRequests.length - 1];
425-
const { server, accountShortName, projectShortName } =
426-
GENERIC_OPTIONS;
425+
const { server, accountShortName, projectShortName }
426+
= GENERIC_OPTIONS;
427427
expect(req.url).toContain(
428-
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/message/all/${chatKey}`
428+
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/message/all/${chatKey}`,
429429
);
430430
});
431431

@@ -457,15 +457,15 @@ describe('chatAdapter', () => {
457457
await chatAdapter.sendMessageAdmin(chatKey, message);
458458
const req = capturedRequests[capturedRequests.length - 1];
459459
expect(getAuthHeader(req.requestHeaders)).toBe(
460-
`Bearer ${SESSION.token}`
460+
`Bearer ${SESSION.token}`,
461461
);
462462
});
463463

464464
it('Should use the chat/message URL', async () => {
465465
await chatAdapter.sendMessageAdmin(chatKey, message);
466466
const req = capturedRequests[capturedRequests.length - 1];
467467
expect(req.url).toBe(
468-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/system/${chatKey}`
468+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/system/${chatKey}`,
469469
);
470470
});
471471

@@ -474,17 +474,17 @@ describe('chatAdapter', () => {
474474
await chatAdapter.sendMessageAdmin(chatKey, message, { userKey });
475475
const req = capturedRequests[capturedRequests.length - 1];
476476
expect(req.url).toBe(
477-
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/system/${chatKey}/${userKey}`
477+
`https://${config.apiHost}/api/v${config.apiVersion}/${config.accountShortName}/${config.projectShortName}/chat/message/system/${chatKey}/${userKey}`,
478478
);
479479
});
480480

481481
it('Should support generic URL options', async () => {
482482
await chatAdapter.sendMessageAdmin(chatKey, message, GENERIC_OPTIONS);
483483
const req = capturedRequests[capturedRequests.length - 1];
484-
const { server, accountShortName, projectShortName } =
485-
GENERIC_OPTIONS;
484+
const { server, accountShortName, projectShortName }
485+
= GENERIC_OPTIONS;
486486
expect(req.url).toBe(
487-
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/message/system/${chatKey}`
487+
`${server}/api/v${config.apiVersion}/${accountShortName}/${projectShortName}/chat/message/system/${chatKey}`,
488488
);
489489
});
490490

0 commit comments

Comments
 (0)