mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-27 17:19:42 -04:00
websocket team sync (#5180)
* enable team sync in ws request * sync payload * add default payload name * make git sync work * fix test * hrmph * fix failing nedb test Co-authored-by: Filipe Freire <livrofubia@gmail.com>
This commit is contained in:
1 parent
bbb47524a7
commit
dc56947574
4 files changed
+8
-4
No files matched your search
@@ -9,10 +9,10 @@ export const prefix = 'ws-payload';
|
||||
|
||||
export const canDuplicate = true;
|
||||
|
||||
// @TODO: enable this at some point
|
||||
export const canSync = false;
|
||||
export const canSync = true;
|
||||
|
||||
export interface BaseWebSocketPayload {
|
||||
name: string;
|
||||
value: string;
|
||||
mode: string;
|
||||
}
|
||||
@@ -28,6 +28,7 @@ export const isWebSocketPayloadId = (id: string | null) => (
|
||||
);
|
||||
|
||||
export const init = (): BaseWebSocketPayload => ({
|
||||
name: 'New Payload',
|
||||
value: '',
|
||||
mode: 'application/json',
|
||||
});
|
||||
|
||||
@@ -10,8 +10,7 @@ export const prefix = 'ws-req';
|
||||
|
||||
export const canDuplicate = true;
|
||||
|
||||
// @TODO: enable this at some point
|
||||
export const canSync = false;
|
||||
export const canSync = true;
|
||||
|
||||
export interface BaseWebSocketRequest {
|
||||
name: string;
|
||||
|
||||
@@ -57,6 +57,8 @@ describe('NeDBClient', () => {
|
||||
models.requestGroup.type,
|
||||
models.unitTest.type,
|
||||
models.unitTestSuite.type,
|
||||
models.webSocketPayload.type,
|
||||
models.webSocketRequest.type,
|
||||
models.workspace.type,
|
||||
]);
|
||||
expect(await neDbClient.readdir(reqDir)).toEqual(['req_1.yml', 'req_2.yml']);
|
||||
|
||||
@@ -148,6 +148,8 @@ export class NeDBClient {
|
||||
models.grpcRequest.type,
|
||||
models.protoFile.type,
|
||||
models.protoDirectory.type,
|
||||
models.webSocketRequest.type,
|
||||
models.webSocketPayload.type,
|
||||
];
|
||||
} else if (type !== null && id === null) {
|
||||
const workspace = await db.get(models.workspace.type, this._workspaceId);
|
||||
|
||||
Reference in new issue
Block a user