@budibase/server 2.6.19-alpha.36 → 2.6.19-alpha.38
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.0ce47fa3.js → index.30093977.js} +243 -242
- package/builder/index.html +1 -1
- package/dist/automation.js +37 -11
- package/dist/automation.js.map +4 -4
- package/dist/index.js +229 -90
- package/dist/index.js.map +4 -4
- package/dist/query.js +29 -6
- package/dist/query.js.map +4 -4
- package/package.json +8 -8
- package/src/api/controllers/deploy/index.ts +1 -0
- package/src/utilities/redis.ts +4 -4
- package/src/websockets/builder.ts +45 -40
- package/src/websockets/client.ts +2 -2
- package/src/websockets/grid.ts +22 -44
- package/src/websockets/websocket.ts +186 -11
package/dist/query.js
CHANGED
|
@@ -763,6 +763,12 @@ var init_cli = __esm({
|
|
|
763
763
|
}
|
|
764
764
|
});
|
|
765
765
|
|
|
766
|
+
// ../types/src/sdk/websocket.ts
|
|
767
|
+
var init_websocket = __esm({
|
|
768
|
+
"../types/src/sdk/websocket.ts"() {
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
|
|
766
772
|
// ../types/src/sdk/index.ts
|
|
767
773
|
var init_sdk = __esm({
|
|
768
774
|
"../types/src/sdk/index.ts"() {
|
|
@@ -785,6 +791,7 @@ var init_sdk = __esm({
|
|
|
785
791
|
init_sso();
|
|
786
792
|
init_user2();
|
|
787
793
|
init_cli();
|
|
794
|
+
init_websocket();
|
|
788
795
|
}
|
|
789
796
|
});
|
|
790
797
|
|
|
@@ -2626,7 +2633,7 @@ var init_utils2 = __esm({
|
|
|
2626
2633
|
})(Databases || {});
|
|
2627
2634
|
SelectableDatabase = /* @__PURE__ */ ((SelectableDatabase2) => {
|
|
2628
2635
|
SelectableDatabase2[SelectableDatabase2["DEFAULT"] = 0] = "DEFAULT";
|
|
2629
|
-
SelectableDatabase2[SelectableDatabase2["
|
|
2636
|
+
SelectableDatabase2[SelectableDatabase2["SOCKET_IO"] = 1] = "SOCKET_IO";
|
|
2630
2637
|
SelectableDatabase2[SelectableDatabase2["UNUSED_1"] = 2] = "UNUSED_1";
|
|
2631
2638
|
SelectableDatabase2[SelectableDatabase2["UNUSED_2"] = 3] = "UNUSED_2";
|
|
2632
2639
|
SelectableDatabase2[SelectableDatabase2["UNUSED_3"] = 4] = "UNUSED_3";
|
|
@@ -2811,6 +2818,9 @@ var init_redis = __esm({
|
|
|
2811
2818
|
CLOSED = false;
|
|
2812
2819
|
init2(this._select);
|
|
2813
2820
|
await waitForConnection(this._select);
|
|
2821
|
+
if (this._select && !environment_default2.isTest()) {
|
|
2822
|
+
this.getClient().select(this._select);
|
|
2823
|
+
}
|
|
2814
2824
|
return this;
|
|
2815
2825
|
}
|
|
2816
2826
|
async finish() {
|
|
@@ -2833,6 +2843,10 @@ var init_redis = __esm({
|
|
|
2833
2843
|
const db = this._db;
|
|
2834
2844
|
return this.getClient().keys(addDbPrefix(db, pattern));
|
|
2835
2845
|
}
|
|
2846
|
+
async exists(key) {
|
|
2847
|
+
const db = this._db;
|
|
2848
|
+
return await this.getClient().exists(addDbPrefix(db, key));
|
|
2849
|
+
}
|
|
2836
2850
|
async get(key) {
|
|
2837
2851
|
const db = this._db;
|
|
2838
2852
|
let response = await this.getClient().get(addDbPrefix(db, key));
|
|
@@ -2913,6 +2927,7 @@ __export(init_exports, {
|
|
|
2913
2927
|
getCacheClient: () => getCacheClient,
|
|
2914
2928
|
getLockClient: () => getLockClient,
|
|
2915
2929
|
getSessionClient: () => getSessionClient,
|
|
2930
|
+
getSocketClient: () => getSocketClient,
|
|
2916
2931
|
getUserClient: () => getUserClient,
|
|
2917
2932
|
getWritethroughClient: () => getWritethroughClient,
|
|
2918
2933
|
shutdown: () => shutdown
|
|
@@ -2923,9 +2938,10 @@ async function init3() {
|
|
|
2923
2938
|
appClient = await new redis_default("appMetadata" /* APP_METADATA */).init();
|
|
2924
2939
|
cacheClient = await new redis_default("data_cache" /* GENERIC_CACHE */).init();
|
|
2925
2940
|
lockClient = await new redis_default("locks" /* LOCKS */).init();
|
|
2926
|
-
writethroughClient = await new redis_default(
|
|
2927
|
-
|
|
2928
|
-
|
|
2941
|
+
writethroughClient = await new redis_default("writeThrough" /* WRITE_THROUGH */).init();
|
|
2942
|
+
socketClient = await new redis_default(
|
|
2943
|
+
"socket_io" /* SOCKET_IO */,
|
|
2944
|
+
1 /* SOCKET_IO */
|
|
2929
2945
|
).init();
|
|
2930
2946
|
}
|
|
2931
2947
|
async function shutdown() {
|
|
@@ -2941,6 +2957,8 @@ async function shutdown() {
|
|
|
2941
2957
|
await writethroughClient.finish();
|
|
2942
2958
|
if (lockClient)
|
|
2943
2959
|
await lockClient.finish();
|
|
2960
|
+
if (socketClient)
|
|
2961
|
+
await socketClient.finish();
|
|
2944
2962
|
}
|
|
2945
2963
|
async function getUserClient() {
|
|
2946
2964
|
if (!userClient) {
|
|
@@ -2978,7 +2996,13 @@ async function getLockClient() {
|
|
|
2978
2996
|
}
|
|
2979
2997
|
return lockClient;
|
|
2980
2998
|
}
|
|
2981
|
-
|
|
2999
|
+
async function getSocketClient() {
|
|
3000
|
+
if (!socketClient) {
|
|
3001
|
+
await init3();
|
|
3002
|
+
}
|
|
3003
|
+
return socketClient;
|
|
3004
|
+
}
|
|
3005
|
+
var userClient, sessionClient, appClient, cacheClient, writethroughClient, lockClient, socketClient;
|
|
2982
3006
|
var init_init = __esm({
|
|
2983
3007
|
"../backend-core/src/redis/init.ts"() {
|
|
2984
3008
|
init_redis();
|
|
@@ -23931,7 +23955,6 @@ var WEBHOOK_ENDPOINTS = new RegExp(
|
|
|
23931
23955
|
|
|
23932
23956
|
// src/websockets/websocket.ts
|
|
23933
23957
|
var import_redis_adapter = require("@socket.io/redis-adapter");
|
|
23934
|
-
var import_uuid4 = __toESM(require("uuid"));
|
|
23935
23958
|
|
|
23936
23959
|
// src/middleware/authorized.ts
|
|
23937
23960
|
var csrf = auth_exports.buildCsrfMiddleware();
|