prostgles-server 4.2.392 → 4.2.393
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.
|
@@ -17,22 +17,22 @@ const updateConfiguration = async (prgl, onReady, newOpts, force) => {
|
|
|
17
17
|
console.warn("No options changed");
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
if ("fileTable"
|
|
20
|
+
if ((0, prostgles_types_1.includes)(optionsThatChanged, "fileTable")) {
|
|
21
21
|
await prgl.initFileTable();
|
|
22
22
|
}
|
|
23
|
-
if ("restApi"
|
|
23
|
+
if ((0, prostgles_types_1.includes)(optionsThatChanged, "restApi")) {
|
|
24
24
|
prgl.initRestApi();
|
|
25
25
|
}
|
|
26
|
-
if ("tableConfig"
|
|
26
|
+
if ((0, prostgles_types_1.includes)(optionsThatChanged, "tableConfig")) {
|
|
27
27
|
await prgl.initTableConfig({ type: "prgl.update", newOpts });
|
|
28
28
|
}
|
|
29
|
-
if ("schema"
|
|
29
|
+
if ((0, prostgles_types_1.includes)(optionsThatChanged, "schema")) {
|
|
30
30
|
await prgl.refreshDBO();
|
|
31
31
|
}
|
|
32
|
-
if ("auth"
|
|
32
|
+
if ((0, prostgles_types_1.includes)(optionsThatChanged, "auth")) {
|
|
33
33
|
prgl.initAuthHandler();
|
|
34
34
|
}
|
|
35
|
-
if ("io"
|
|
35
|
+
if ((0, prostgles_types_1.includes)(optionsThatChanged, "io")) {
|
|
36
36
|
prgl.connectedSockets.forEach((socket) => {
|
|
37
37
|
socket.disconnect();
|
|
38
38
|
});
|
|
@@ -43,7 +43,7 @@ const updateConfiguration = async (prgl, onReady, newOpts, force) => {
|
|
|
43
43
|
* Some of these changes require clients to reconnect
|
|
44
44
|
* While others also affect the server and onReady should be called
|
|
45
45
|
*/
|
|
46
|
-
if (
|
|
46
|
+
if (optionsThatChanged.every((updatedKey) => exports.clientOnlyUpdateKeys.some((key) => key === updatedKey))) {
|
|
47
47
|
prgl.setupSocketIO();
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateConfiguration.js","sourceRoot":"","sources":["../lib/updateConfiguration.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"updateConfiguration.js","sourceRoot":"","sources":["../lib/updateConfiguration.ts"],"names":[],"mappings":";;;AAAA,qDAAiF;AAK1E,MAAM,mBAAmB,GAAG,KAAK,EACtC,IAAe,EACf,OAA6B,EAC7B,OAAgD,EAChD,KAAY,EACZ,EAAE;IACF,MAAM,kBAAkB,GAAG,IAAA,yBAAO,EAAC,OAAO,CAAC;SACxC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,IAAI,KAAK,IAAI,CAAC,IAAA,yBAAO,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChD,YAAY;YACZ,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,OAAO,CAAC,CAAC;QACX,CAAC;QACD,OAAO;IACT,CAAC,CAAC;SACD,MAAM,CAAC,2BAAS,CAAC,CAAC;IACrB,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;QAC/B,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QACnC,OAAO;IACT,CAAC;IAED,IAAI,IAAA,0BAAQ,EAAC,kBAAkB,EAAE,WAAW,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;IACD,IAAI,IAAA,0BAAQ,EAAC,kBAAkB,EAAE,SAAS,CAAC,EAAE,CAAC;QAC5C,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IACD,IAAI,IAAA,0BAAQ,EAAC,kBAAkB,EAAE,aAAa,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,IAAI,IAAA,0BAAQ,EAAC,kBAAkB,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC3C,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;IAC1B,CAAC;IACD,IAAI,IAAA,0BAAQ,EAAC,kBAAkB,EAAE,MAAM,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC;IACD,IAAI,IAAA,0BAAQ,EAAC,kBAAkB,EAAE,IAAI,CAAC,EAAE,CAAC;QACvC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACvC,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI,IAAA,yBAAO,EAAC,OAAO,CAAC;QAAE,OAAO;IAE7B;;;OAGG;IACH,IACE,kBAAkB,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,4BAAoB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC,EAChG,CAAC;QACD,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC,CAAC;AAvDW,QAAA,mBAAmB,uBAuD9B;AAEF;;GAEG;AACU,QAAA,oBAAoB,GAAG;IAClC,IAAI;IACJ,MAAM;IACN,SAAS;IACT,WAAW;IACX,eAAe;CAC+B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getKeys, isDefined, isEmpty, isEqual } from "prostgles-types";
|
|
1
|
+
import { getKeys, includes, isDefined, isEmpty, isEqual } from "prostgles-types";
|
|
2
2
|
import type { SessionUser } from "./Auth/AuthTypes";
|
|
3
3
|
import type { OnReadyCallbackBasic, UpdateableOptions } from "./initProstgles";
|
|
4
4
|
import type { Prostgles } from "./Prostgles";
|
|
@@ -24,22 +24,22 @@ export const updateConfiguration = async <DBSchema, UserSchema extends SessionUs
|
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
if ("fileTable"
|
|
27
|
+
if (includes(optionsThatChanged, "fileTable")) {
|
|
28
28
|
await prgl.initFileTable();
|
|
29
29
|
}
|
|
30
|
-
if ("restApi"
|
|
30
|
+
if (includes(optionsThatChanged, "restApi")) {
|
|
31
31
|
prgl.initRestApi();
|
|
32
32
|
}
|
|
33
|
-
if ("tableConfig"
|
|
33
|
+
if (includes(optionsThatChanged, "tableConfig")) {
|
|
34
34
|
await prgl.initTableConfig({ type: "prgl.update", newOpts });
|
|
35
35
|
}
|
|
36
|
-
if ("schema"
|
|
36
|
+
if (includes(optionsThatChanged, "schema")) {
|
|
37
37
|
await prgl.refreshDBO();
|
|
38
38
|
}
|
|
39
|
-
if ("auth"
|
|
39
|
+
if (includes(optionsThatChanged, "auth")) {
|
|
40
40
|
prgl.initAuthHandler();
|
|
41
41
|
}
|
|
42
|
-
if ("io"
|
|
42
|
+
if (includes(optionsThatChanged, "io")) {
|
|
43
43
|
prgl.connectedSockets.forEach((socket) => {
|
|
44
44
|
socket.disconnect();
|
|
45
45
|
});
|
|
@@ -52,7 +52,7 @@ export const updateConfiguration = async <DBSchema, UserSchema extends SessionUs
|
|
|
52
52
|
* While others also affect the server and onReady should be called
|
|
53
53
|
*/
|
|
54
54
|
if (
|
|
55
|
-
|
|
55
|
+
optionsThatChanged.every((updatedKey) => clientOnlyUpdateKeys.some((key) => key === updatedKey))
|
|
56
56
|
) {
|
|
57
57
|
prgl.setupSocketIO();
|
|
58
58
|
} else {
|