@budibase/server 2.5.6-alpha.6 → 2.5.6-alpha.8
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/builder/assets/{index.4216de02.js → index.5c1a6913.js} +357 -357
- package/builder/assets/index.c0265b74.css +6 -0
- package/builder/index.html +2 -2
- package/dist/api/controllers/plugin/index.js +2 -2
- package/dist/api/controllers/table/utils.js +2 -1
- package/dist/app.js +2 -2
- package/dist/package.json +9 -8
- package/dist/sdk/plugins/plugins.js +2 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/websockets/client.js +14 -0
- package/dist/websockets/grid.js +60 -0
- package/dist/websockets/index.js +17 -0
- package/dist/websockets/websocket.js +78 -0
- package/jest.config.ts +3 -3
- package/nodemon.json +7 -3
- package/package.json +10 -9
- package/src/api/controllers/plugin/index.ts +2 -2
- package/src/api/controllers/table/utils.ts +2 -1
- package/src/app.ts +2 -2
- package/src/sdk/plugins/plugins.ts +2 -2
- package/src/websockets/client.ts +11 -0
- package/src/websockets/grid.ts +55 -0
- package/src/websockets/index.ts +14 -0
- package/src/websockets/websocket.ts +83 -0
- package/tsconfig.json +1 -7
- package/builder/assets/index.e2ac94e5.css +0 -6
- package/dist/websocket.js +0 -22
- package/src/websocket.ts +0 -26
package/dist/websocket.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ClientAppSocket = exports.initialise = void 0;
|
|
4
|
-
const socket_io_1 = require("socket.io");
|
|
5
|
-
class Websocket {
|
|
6
|
-
constructor(server, path) {
|
|
7
|
-
this.socketServer = new socket_io_1.Server(server, {
|
|
8
|
-
path,
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
// Emit an event to all sockets
|
|
12
|
-
emit(event, payload) {
|
|
13
|
-
this.socketServer.sockets.emit(event, payload);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
// Likely to be more socket instances in future
|
|
17
|
-
let ClientAppSocket;
|
|
18
|
-
exports.ClientAppSocket = ClientAppSocket;
|
|
19
|
-
const initialise = (server) => {
|
|
20
|
-
exports.ClientAppSocket = ClientAppSocket = new Websocket(server, "/socket/client");
|
|
21
|
-
};
|
|
22
|
-
exports.initialise = initialise;
|
package/src/websocket.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Server } from "socket.io"
|
|
2
|
-
import http from "http"
|
|
3
|
-
|
|
4
|
-
class Websocket {
|
|
5
|
-
socketServer: Server
|
|
6
|
-
|
|
7
|
-
constructor(server: http.Server, path: string) {
|
|
8
|
-
this.socketServer = new Server(server, {
|
|
9
|
-
path,
|
|
10
|
-
})
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// Emit an event to all sockets
|
|
14
|
-
emit(event: string, payload: any) {
|
|
15
|
-
this.socketServer.sockets.emit(event, payload)
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Likely to be more socket instances in future
|
|
20
|
-
let ClientAppSocket: Websocket
|
|
21
|
-
|
|
22
|
-
export const initialise = (server: http.Server) => {
|
|
23
|
-
ClientAppSocket = new Websocket(server, "/socket/client")
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { ClientAppSocket }
|