underpost 3.1.2 → 3.2.0
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/.env.example +0 -2
- package/.github/workflows/ghpkg.ci.yml +4 -4
- package/.github/workflows/npmpkg.ci.yml +38 -7
- package/.github/workflows/pwa-microservices-template-page.cd.yml +3 -4
- package/.github/workflows/pwa-microservices-template-test.ci.yml +3 -3
- package/.github/workflows/release.cd.yml +4 -4
- package/CHANGELOG.md +365 -1
- package/CLI-HELP.md +55 -3
- package/README.md +7 -3
- package/bin/build.js +18 -12
- package/bin/deploy.js +205 -225
- package/bin/file.js +3 -0
- package/conf.js +4 -10
- package/jsdoc.json +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +72 -50
- package/manifests/deployment/dd-test-development/proxy.yaml +13 -4
- package/manifests/deployment/playwright/deployment.yaml +1 -1
- package/nodemon.json +1 -1
- package/package.json +21 -14
- package/scripts/ports-ls.sh +2 -0
- package/scripts/rhel-grpc-setup.sh +56 -0
- package/src/api/file/file.ref.json +18 -0
- package/src/api/user/user.service.js +8 -7
- package/src/cli/cluster.js +7 -7
- package/src/cli/db.js +76 -242
- package/src/cli/deploy.js +104 -65
- package/src/cli/env.js +1 -0
- package/src/cli/fs.js +2 -1
- package/src/cli/index.js +50 -1
- package/src/cli/kubectl.js +211 -0
- package/src/cli/release.js +284 -0
- package/src/cli/repository.js +328 -112
- package/src/cli/run.js +283 -69
- package/src/cli/test.js +3 -3
- package/src/client/Default.index.js +3 -4
- package/src/client/components/core/Alert.js +2 -2
- package/src/client/components/core/AppStore.js +69 -0
- package/src/client/components/core/CalendarCore.js +2 -2
- package/src/client/components/core/Docs.js +9 -2
- package/src/client/components/core/DropDown.js +129 -17
- package/src/client/components/core/Keyboard.js +2 -2
- package/src/client/components/core/LogIn.js +2 -2
- package/src/client/components/core/LogOut.js +2 -2
- package/src/client/components/core/Modal.js +0 -1
- package/src/client/components/core/Panel.js +0 -1
- package/src/client/components/core/PanelForm.js +19 -19
- package/src/client/components/core/RichText.js +1 -2
- package/src/client/components/core/SocketIo.js +82 -29
- package/src/client/components/core/SocketIoHandler.js +75 -0
- package/src/client/components/core/Stream.js +143 -95
- package/src/client/components/core/Webhook.js +40 -7
- package/src/client/components/default/AppStoreDefault.js +5 -0
- package/src/client/components/default/LogInDefault.js +3 -3
- package/src/client/components/default/LogOutDefault.js +2 -2
- package/src/client/components/default/MenuDefault.js +5 -5
- package/src/client/components/default/SocketIoDefault.js +3 -51
- package/src/client/services/core/core.service.js +20 -8
- package/src/client/services/user/user.management.js +2 -2
- package/src/client/ssr/body/404.js +15 -11
- package/src/client/ssr/body/500.js +15 -11
- package/src/client/ssr/body/SwaggerDarkMode.js +285 -0
- package/src/client/ssr/offline/NoNetworkConnection.js +11 -10
- package/src/client/ssr/pages/Test.js +11 -10
- package/src/index.js +24 -1
- package/src/runtime/express/Express.js +26 -9
- package/src/runtime/lampp/Dockerfile +9 -2
- package/src/runtime/lampp/Lampp.js +4 -3
- package/src/runtime/wp/Dockerfile +64 -0
- package/src/runtime/wp/Wp.js +497 -0
- package/src/server/auth.js +30 -6
- package/src/server/backup.js +19 -1
- package/src/server/client-build-docs.js +51 -110
- package/src/server/client-build.js +55 -64
- package/src/server/client-formatted.js +109 -57
- package/src/server/conf.js +19 -15
- package/src/server/ipfs-client.js +24 -1
- package/src/server/peer.js +8 -0
- package/src/server/runtime.js +25 -1
- package/src/server/start.js +21 -8
- package/src/ws/IoInterface.js +1 -10
- package/src/ws/IoServer.js +14 -33
- package/src/ws/core/channels/core.ws.chat.js +65 -20
- package/src/ws/core/channels/core.ws.mailer.js +113 -32
- package/src/ws/core/channels/core.ws.stream.js +90 -31
- package/src/ws/core/core.ws.connection.js +12 -33
- package/src/ws/core/core.ws.emit.js +10 -26
- package/src/ws/core/core.ws.server.js +25 -58
- package/src/ws/default/channels/default.ws.main.js +53 -12
- package/src/ws/default/default.ws.connection.js +26 -13
- package/src/ws/default/default.ws.server.js +30 -12
- package/src/client/components/default/ElementsDefault.js +0 -38
- package/src/ws/core/management/core.ws.chat.js +0 -8
- package/src/ws/core/management/core.ws.mailer.js +0 -16
- package/src/ws/core/management/core.ws.stream.js +0 -8
- package/src/ws/default/management/default.ws.main.js +0 -8
|
@@ -1,20 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default WebSocket server factory — initializes the main channel and creates the Socket.IO server.
|
|
3
|
+
* @module ws/default/default.ws.server
|
|
4
|
+
*/
|
|
5
|
+
|
|
1
6
|
'use strict';
|
|
2
7
|
|
|
3
8
|
import { IoServer } from '../IoServer.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
// https://socket.io/docs/v3/
|
|
9
|
+
import { DefaultWsConnectionHandler } from './default.ws.connection.js';
|
|
10
|
+
import { DefaultWsMainChannel } from './channels/default.ws.main.js';
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
/**
|
|
13
|
+
* @class DefaultWsServer
|
|
14
|
+
* @classdesc Creates the default WebSocket server with a single main channel.
|
|
15
|
+
*/
|
|
16
|
+
class DefaultWsServer {
|
|
17
|
+
/**
|
|
18
|
+
* Initializes the main channel and creates the Socket.IO server.
|
|
19
|
+
* @param {import('http').Server} httpServer
|
|
20
|
+
* @param {Object} options
|
|
21
|
+
* @param {string} options.host
|
|
22
|
+
* @param {string} options.path
|
|
23
|
+
* @returns {{ options: import('socket.io').ServerOptions, ioServer: import('socket.io').Server, meta: ImportMeta }}
|
|
24
|
+
*/
|
|
25
|
+
static create(httpServer, options) {
|
|
26
|
+
const { host, path } = options;
|
|
27
|
+
const wsManagementId = `${host}${path}`;
|
|
12
28
|
|
|
13
|
-
|
|
29
|
+
DefaultWsMainChannel.init(wsManagementId);
|
|
14
30
|
|
|
15
|
-
|
|
16
|
-
}
|
|
31
|
+
return IoServer.create(httpServer, options, (socket) => DefaultWsConnectionHandler.handle(socket, wsManagementId));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
17
34
|
|
|
18
|
-
const
|
|
35
|
+
/** Required by Express.js dynamic import: `const { createIoServer } = await import(...)` */
|
|
36
|
+
const createIoServer = DefaultWsServer.create.bind(DefaultWsServer);
|
|
19
37
|
|
|
20
|
-
export {
|
|
38
|
+
export { DefaultWsServer, createIoServer };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { loggerFactory } from '../core/Logger.js';
|
|
2
|
-
import { BaseElement } from './CommonDefault.js';
|
|
3
|
-
|
|
4
|
-
const logger = loggerFactory(import.meta);
|
|
5
|
-
|
|
6
|
-
const ElementsDefault = {
|
|
7
|
-
Data: BaseElement(),
|
|
8
|
-
Interval: {},
|
|
9
|
-
LocalDataScope: {},
|
|
10
|
-
Init: function (options = { type: 'user', id: 'main', element: {} }) {
|
|
11
|
-
const { type, id, element } = options;
|
|
12
|
-
this.Data[type][id] = {
|
|
13
|
-
...BaseElement()[type].main,
|
|
14
|
-
...this.Data[type][id],
|
|
15
|
-
...element,
|
|
16
|
-
};
|
|
17
|
-
if (!this.Interval[type]) this.Interval[type] = {};
|
|
18
|
-
if (!this.Interval[type][id]) this.Interval[type][id] = {};
|
|
19
|
-
if (!this.LocalDataScope[type]) this.LocalDataScope[type] = {};
|
|
20
|
-
if (!this.LocalDataScope[type][id])
|
|
21
|
-
this.LocalDataScope[type][id] = {
|
|
22
|
-
path: [],
|
|
23
|
-
};
|
|
24
|
-
},
|
|
25
|
-
removeAll: function () {
|
|
26
|
-
for (const type of Object.keys(this.Data)) {
|
|
27
|
-
for (const id of Object.keys(this.Data[type])) {
|
|
28
|
-
if (this.Interval[type] && this.Interval[type][id]) {
|
|
29
|
-
for (const interval of Object.keys(this.Interval[type][id])) clearInterval(this.Interval[type][id][interval]);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
this.Interval = {};
|
|
34
|
-
this.Data = BaseElement();
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export { ElementsDefault };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const CoreWsMailerManagement = {
|
|
2
|
-
element: {},
|
|
3
|
-
instance: function (wsManagementId = '') {
|
|
4
|
-
this.element[wsManagementId] = {};
|
|
5
|
-
},
|
|
6
|
-
getUserWsId: function (wsManagementId = '', id = '') {
|
|
7
|
-
for (const userWsId of Object.keys(this.element[wsManagementId])) {
|
|
8
|
-
if (this.element[wsManagementId][userWsId].model.user._id === id) {
|
|
9
|
-
return userWsId;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return undefined;
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { CoreWsMailerManagement };
|