underpost 2.6.3 → 2.7.2
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/.dockerignore +13 -13
- package/.env.development +7 -7
- package/.env.production +7 -7
- package/.env.test +7 -7
- package/.github/workflows/publish.yml +26 -0
- package/.nycrc +9 -9
- package/.prettierignore +12 -12
- package/.prettierrc +9 -9
- package/.vscode/extensions.json +72 -72
- package/.vscode/settings.json +100 -99
- package/AUTHORS.md +10 -0
- package/CHANGELOG.md +91 -0
- package/Dockerfile +89 -89
- package/LICENSE +21 -21
- package/README.md +96 -96
- package/bin/db.js +172 -119
- package/bin/deploy.js +582 -626
- package/bin/dns.js +1 -1
- package/bin/file.js +92 -92
- package/bin/index.js +53 -34
- package/bin/install.js +398 -357
- package/bin/shortcut.js +44 -44
- package/bin/ssl.js +65 -61
- package/bin/util.js +182 -182
- package/bin/vs.js +35 -35
- package/conf.js +251 -249
- package/docker-compose.yml +67 -67
- package/jsconfig.json +7 -7
- package/jsdoc.json +32 -32
- package/nodemon.json +6 -6
- package/package.json +137 -128
- package/prometheus.yml +36 -36
- package/setup.sh +24 -24
- package/src/api/core/core.controller.js +69 -69
- package/src/api/core/core.model.js +11 -11
- package/src/api/core/core.router.js +23 -23
- package/src/api/core/core.service.js +29 -29
- package/src/api/crypto/crypto.controller.js +51 -51
- package/src/api/crypto/crypto.model.js +23 -23
- package/src/api/crypto/crypto.router.js +20 -20
- package/src/api/crypto/crypto.service.js +64 -64
- package/src/api/default/default.controller.js +69 -69
- package/src/api/default/default.model.js +20 -20
- package/src/api/default/default.router.js +23 -23
- package/src/api/default/default.service.js +31 -31
- package/src/api/file/file.controller.js +53 -51
- package/src/api/file/file.model.js +19 -19
- package/src/api/file/file.router.js +21 -20
- package/src/api/file/file.service.js +76 -70
- package/src/api/instance/instance.controller.js +69 -69
- package/src/api/instance/instance.model.js +36 -36
- package/src/api/instance/instance.router.js +33 -33
- package/src/api/instance/instance.service.js +48 -48
- package/src/api/test/test.controller.js +59 -59
- package/src/api/test/test.model.js +14 -14
- package/src/api/test/test.router.js +21 -21
- package/src/api/test/test.service.js +35 -35
- package/src/api/user/user.build.js +16 -0
- package/src/api/user/user.controller.js +70 -70
- package/src/api/user/user.model.js +65 -65
- package/src/api/user/user.router.js +345 -345
- package/src/api/user/user.service.js +479 -479
- package/src/api.js +23 -23
- package/src/client/Default.index.js +40 -40
- package/src/client/components/core/Account.js +290 -290
- package/src/client/components/core/AgGrid.js +160 -160
- package/src/client/components/core/Auth.js +19 -19
- package/src/client/components/core/Badge.js +32 -32
- package/src/client/components/core/BlockChain.js +41 -41
- package/src/client/components/core/Blog.js +9 -9
- package/src/client/components/core/BtnIcon.js +101 -94
- package/src/client/components/core/CalendarCore.js +458 -319
- package/src/client/components/core/Chat.js +64 -64
- package/src/client/components/core/ColorPalette.js +5267 -5267
- package/src/client/components/core/CommonJs.js +735 -732
- package/src/client/components/core/Content.js +193 -49
- package/src/client/components/core/Css.js +1064 -1027
- package/src/client/components/core/CssCore.js +817 -796
- package/src/client/components/core/D3Chart.js +44 -44
- package/src/client/components/core/Docs.js +229 -229
- package/src/client/components/core/DropDown.js +164 -164
- package/src/client/components/core/EventsUI.js +46 -54
- package/src/client/components/core/FileExplorer.js +699 -624
- package/src/client/components/core/FullScreen.js +45 -45
- package/src/client/components/core/Input.js +346 -259
- package/src/client/components/core/JoyStick.js +77 -77
- package/src/client/components/core/Keyboard.js +73 -73
- package/src/client/components/core/LoadingAnimation.js +179 -157
- package/src/client/components/core/LogIn.js +187 -181
- package/src/client/components/core/LogOut.js +58 -52
- package/src/client/components/core/Logger.js +26 -26
- package/src/client/components/core/Modal.js +1612 -1596
- package/src/client/components/core/NotificationManager.js +84 -84
- package/src/client/components/core/Panel.js +613 -413
- package/src/client/components/core/PanelForm.js +468 -0
- package/src/client/components/core/Polyhedron.js +162 -162
- package/src/client/components/core/Recover.js +204 -204
- package/src/client/components/core/Responsive.js +53 -53
- package/src/client/components/core/RichText.js +51 -27
- package/src/client/components/core/Router.js +76 -77
- package/src/client/components/core/Scroll.js +34 -0
- package/src/client/components/core/SignUp.js +125 -125
- package/src/client/components/core/SocketIo.js +72 -72
- package/src/client/components/core/Stream.js +113 -113
- package/src/client/components/core/ToggleSwitch.js +87 -87
- package/src/client/components/core/ToolTip.js +26 -26
- package/src/client/components/core/Translate.js +437 -408
- package/src/client/components/core/Validator.js +100 -100
- package/src/client/components/core/VanillaJs.js +460 -457
- package/src/client/components/core/Wallet.js +106 -106
- package/src/client/components/core/Webhook.js +25 -25
- package/src/client/components/core/Worker.js +272 -272
- package/src/client/components/default/CommonDefault.js +29 -29
- package/src/client/components/default/CssDefault.js +13 -13
- package/src/client/components/default/ElementsDefault.js +38 -38
- package/src/client/components/default/LogInDefault.js +41 -41
- package/src/client/components/default/LogOutDefault.js +28 -28
- package/src/client/components/default/MenuDefault.js +389 -389
- package/src/client/components/default/RoutesDefault.js +48 -48
- package/src/client/components/default/SettingsDefault.js +16 -16
- package/src/client/components/default/SignUpDefault.js +9 -9
- package/src/client/components/default/SocketIoDefault.js +54 -54
- package/src/client/components/default/TranslateDefault.js +7 -7
- package/src/client/public/default/assets/mailer/api-user-check.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-invalid-token.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-recover.png +0 -0
- package/src/client/public/default/browserconfig.xml +11 -11
- package/src/client/public/default/manifest.webmanifest +68 -68
- package/src/client/public/default/plantuml/client-conf.svg +1 -0
- package/src/client/public/default/plantuml/client-schema.svg +1 -0
- package/src/client/public/default/plantuml/cron-conf.svg +1 -0
- package/src/client/public/default/plantuml/cron-schema.svg +1 -0
- package/src/client/public/default/plantuml/server-conf.svg +1 -0
- package/src/client/public/default/plantuml/server-schema.svg +1 -0
- package/src/client/public/default/plantuml/ssr-conf.svg +1 -0
- package/src/client/public/default/plantuml/ssr-schema.svg +1 -0
- package/src/client/public/default/sitemap +147 -147
- package/src/client/public/default/yandex-browser-manifest.json +8 -8
- package/src/client/public/doc/sitemap +147 -147
- package/src/client/public/test/sitemap +147 -147
- package/src/client/services/core/core.service.js +170 -152
- package/src/client/services/crypto/crypto.service.js +70 -70
- package/src/client/services/default/default.management.js +345 -345
- package/src/client/services/default/default.service.js +89 -89
- package/src/client/services/file/file.service.js +70 -70
- package/src/client/services/instance/instance.management.js +74 -74
- package/src/client/services/instance/instance.service.js +89 -89
- package/src/client/services/test/test.service.js +70 -70
- package/src/client/services/user/user.management.js +50 -50
- package/src/client/services/user/user.service.js +89 -89
- package/src/client/ssr/Render.js +16 -16
- package/src/client/ssr/body-components/CacheControl.js +114 -113
- package/src/client/ssr/body-components/DefaultSplashScreen.js +79 -79
- package/src/client/ssr/email-components/DefaultRecoverEmail.js +21 -21
- package/src/client/ssr/email-components/DefaultVerifyEmail.js +17 -17
- package/src/client/ssr/head-components/Css.js +241 -241
- package/src/client/ssr/head-components/DefaultScripts.js +3 -3
- package/src/client/ssr/head-components/Microdata.js +11 -11
- package/src/client/ssr/head-components/Production.js +1 -1
- package/src/client/ssr/head-components/PwaDefault.js +59 -59
- package/src/client/ssr/head-components/Seo.js +14 -14
- package/src/client/sw/default.sw.js +201 -201
- package/src/client/sw/template.sw.js +84 -84
- package/src/client.build.js +22 -22
- package/src/client.dev.js +21 -21
- package/src/cron.js +25 -25
- package/src/db/DataBaseProvider.js +34 -34
- package/src/db/mariadb/MariaDB.js +33 -33
- package/src/db/mongo/MongooseDB.js +46 -46
- package/src/dns.js +22 -22
- package/src/index.js +42 -0
- package/src/mailer/EmailRender.js +69 -69
- package/src/mailer/MailerProvider.js +96 -96
- package/src/proxy.js +22 -22
- package/src/runtime/lampp/Lampp.js +69 -44
- package/src/runtime/nginx/Nginx.js +3 -3
- package/src/runtime/xampp/Xampp.js +49 -49
- package/src/server/auth.js +235 -204
- package/src/server/backup.js +101 -84
- package/src/server/client-build-live.js +72 -72
- package/src/server/client-build.js +705 -699
- package/src/server/client-dev-server.js +60 -58
- package/src/server/client-formatted.js +48 -48
- package/src/server/client-icons.js +149 -150
- package/src/server/conf.js +860 -611
- package/src/server/dns.js +98 -87
- package/src/server/downloader.js +42 -42
- package/src/server/logger.js +180 -135
- package/src/server/network.js +122 -122
- package/src/server/peer.js +33 -33
- package/src/server/process.js +66 -66
- package/src/server/prompt-optimizer.js +28 -0
- package/src/server/proxy.js +118 -118
- package/src/server/runtime.js +444 -393
- package/src/server/ssl.js +109 -107
- package/src/server.js +25 -25
- package/src/ws/IoInterface.js +45 -45
- package/src/ws/IoServer.js +39 -39
- package/src/ws/core/channels/core.ws.chat.js +23 -23
- package/src/ws/core/channels/core.ws.mailer.js +35 -35
- package/src/ws/core/channels/core.ws.stream.js +31 -31
- package/src/ws/core/core.ws.connection.js +28 -28
- package/src/ws/core/core.ws.emit.js +14 -14
- package/src/ws/core/core.ws.server.js +24 -24
- package/src/ws/core/management/core.ws.chat.js +8 -8
- package/src/ws/core/management/core.ws.mailer.js +16 -16
- package/src/ws/core/management/core.ws.stream.js +8 -8
- package/src/ws/default/channels/default.ws.main.js +16 -16
- package/src/ws/default/default.ws.connection.js +22 -22
- package/src/ws/default/default.ws.emit.js +14 -14
- package/src/ws/default/default.ws.server.js +20 -20
- package/src/ws/default/management/default.ws.main.js +8 -8
- package/startup.js +11 -11
- package/supervisord-openssh-server.conf +4 -4
- package/test/api.test.js +60 -60
- package/bin/help.js +0 -110
package/jsdoc.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"tags": {
|
|
3
|
-
"allowUnknownTags": true,
|
|
4
|
-
"dictionaries": ["jsdoc"]
|
|
5
|
-
},
|
|
6
|
-
"source": {
|
|
7
|
-
"include": ["./src", "./package.json", "./README.md"],
|
|
8
|
-
"includePattern": ".js$",
|
|
9
|
-
"excludePattern": "(node_modules/|docs)"
|
|
10
|
-
},
|
|
11
|
-
"plugins": ["plugins/markdown", "plugins/summarize", "plugins/shout"],
|
|
12
|
-
"opts": {
|
|
13
|
-
"template": "node_modules/clean-jsdoc-theme",
|
|
14
|
-
"readme": "./README.md",
|
|
15
|
-
"recurse": true,
|
|
16
|
-
"destination": "./public/www.nexodev.org/docs/",
|
|
17
|
-
"encoding": "utf8",
|
|
18
|
-
"verbose": true,
|
|
19
|
-
"theme_opts": {
|
|
20
|
-
"default_theme": "light",
|
|
21
|
-
"search": true,
|
|
22
|
-
"title": "Nexodev - ERP, CRM Development & Cloud DevOps Services",
|
|
23
|
-
"homepageTitle": "Docs",
|
|
24
|
-
"favicon": "./public/www.nexodev.org/"
|
|
25
|
-
},
|
|
26
|
-
"tutorials": "./public/www.nexodev.org/docs/learn"
|
|
27
|
-
},
|
|
28
|
-
"markdown": {
|
|
29
|
-
"hardwrap": false,
|
|
30
|
-
"idInHeadings": true
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"tags": {
|
|
3
|
+
"allowUnknownTags": true,
|
|
4
|
+
"dictionaries": ["jsdoc"]
|
|
5
|
+
},
|
|
6
|
+
"source": {
|
|
7
|
+
"include": ["./src", "./package.json", "./README.md"],
|
|
8
|
+
"includePattern": ".js$",
|
|
9
|
+
"excludePattern": "(node_modules/|docs)"
|
|
10
|
+
},
|
|
11
|
+
"plugins": ["plugins/markdown", "plugins/summarize", "plugins/shout"],
|
|
12
|
+
"opts": {
|
|
13
|
+
"template": "node_modules/clean-jsdoc-theme",
|
|
14
|
+
"readme": "./README.md",
|
|
15
|
+
"recurse": true,
|
|
16
|
+
"destination": "./public/www.nexodev.org/docs/",
|
|
17
|
+
"encoding": "utf8",
|
|
18
|
+
"verbose": true,
|
|
19
|
+
"theme_opts": {
|
|
20
|
+
"default_theme": "light",
|
|
21
|
+
"search": true,
|
|
22
|
+
"title": "Nexodev - ERP, CRM Development & Cloud DevOps Services",
|
|
23
|
+
"homepageTitle": "Docs",
|
|
24
|
+
"favicon": "./public/www.nexodev.org/"
|
|
25
|
+
},
|
|
26
|
+
"tutorials": "./public/www.nexodev.org/docs/learn"
|
|
27
|
+
},
|
|
28
|
+
"markdown": {
|
|
29
|
+
"hardwrap": false,
|
|
30
|
+
"idInHeadings": true
|
|
31
|
+
}
|
|
32
|
+
}
|
package/nodemon.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"watch": ["./src"],
|
|
3
|
-
"ext": "js",
|
|
4
|
-
"delay": 0,
|
|
5
|
-
"ignore": []
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"watch": ["./src"],
|
|
3
|
+
"ext": "js",
|
|
4
|
+
"delay": 0,
|
|
5
|
+
"ignore": []
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,129 +1,138 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
2
|
+
"type": "module",
|
|
3
|
+
"main": "src/index.js",
|
|
4
|
+
"name": "underpost",
|
|
5
|
+
"version": "2.7.2",
|
|
6
|
+
"description": "pwa api rest template",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",
|
|
9
|
+
"pm2": "env-cmd -f .env.production pm2 start src/server.js --node-args=\"--max-old-space-size=8192\" --name engine && pm2 logs",
|
|
10
|
+
"ssl": "env-cmd -f .env.production node bin/ssl",
|
|
11
|
+
"pm2-delete": "pm2 delete engine",
|
|
12
|
+
"build": "node bin/deploy build-full-client --no-warnings",
|
|
13
|
+
"dev": "env-cmd -f .env.development node src/client.dev --no-warnings",
|
|
14
|
+
"dev-api": "env-cmd -f .env.development nodemon --watch src --ignore src/client src/api",
|
|
15
|
+
"docs": "jsdoc -c jsdoc.json",
|
|
16
|
+
"backup": "node bin/db default.net/ export",
|
|
17
|
+
"install-template": "npm install && npm run build",
|
|
18
|
+
"install-global": "npm install -g pm2 && npm install -g jsdoc && npm install -g prettier && npm install -g env-cmd && npm install -g yarn && npm install -g auto-changelog",
|
|
19
|
+
"install-test": "npm install -g mocha && npm install -g c8 && npm install -g nyc && npm install -g coveralls",
|
|
20
|
+
"install-vs-extensions": "node bin/vs import",
|
|
21
|
+
"preinstall": "npm config set audit false && npm config set loglevel error",
|
|
22
|
+
"restore-preinstall": "npm config set audit true && npm config set loglevel notice",
|
|
23
|
+
"install": "npm run install-global && npm run install-test && npm run restore-preinstall --no-audit --no-warnings",
|
|
24
|
+
"docker:start": "docker-compose up",
|
|
25
|
+
"prettier": "prettier --write .",
|
|
26
|
+
"coveralls": "nyc npm run test --reporter=text-lcov | coveralls -v",
|
|
27
|
+
"test": "env-cmd -f .env.test c8 mocha",
|
|
28
|
+
"update": "npm update -g && npm update && npm audit fix --force && npm audit fix --force",
|
|
29
|
+
"underpost-publish": "npm publish --provenance --access public",
|
|
30
|
+
"underpost-unpublish": "npm unpublish underpost@2.5.x",
|
|
31
|
+
"login": "npm adduser",
|
|
32
|
+
"bin": "npm link --force"
|
|
33
|
+
},
|
|
34
|
+
"bin": {
|
|
35
|
+
"underpost": "bin/index.js"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/underpostnet/pwa-microservices-template.git"
|
|
40
|
+
},
|
|
41
|
+
"keywords": [
|
|
42
|
+
"pwa",
|
|
43
|
+
"template",
|
|
44
|
+
"microservices",
|
|
45
|
+
"api",
|
|
46
|
+
"server",
|
|
47
|
+
"proxy",
|
|
48
|
+
"client"
|
|
49
|
+
],
|
|
50
|
+
"author": "https://github.com/underpostnet",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/underpostnet/pwa-microservices-template/issues"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/underpostnet/pwa-microservices-template#readme",
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@fortawesome/fontawesome-free": "^6.4.2",
|
|
58
|
+
"@loadingio/css-spinner": "^2.0.2",
|
|
59
|
+
"@neodrag/vanilla": "^2.0.3",
|
|
60
|
+
"@pinata/sdk": "^2.1.0",
|
|
61
|
+
"@xenova/transformers": "^2.17.2",
|
|
62
|
+
"adm-zip": "^0.5.10",
|
|
63
|
+
"ag-grid-community": "31.0.0",
|
|
64
|
+
"axios": "^1.5.1",
|
|
65
|
+
"chai": "^5.1.0",
|
|
66
|
+
"cli-progress": "^3.12.0",
|
|
67
|
+
"cli-spinners": "^3.0.0",
|
|
68
|
+
"color": "^4.2.3",
|
|
69
|
+
"colors": "^1.4.0",
|
|
70
|
+
"commander": "^12.1.0",
|
|
71
|
+
"compression": "^1.7.4",
|
|
72
|
+
"copy-paste": "^1.5.3",
|
|
73
|
+
"cors": "^2.8.5",
|
|
74
|
+
"d3": "^7.9.0",
|
|
75
|
+
"deepmerge": "^4.3.1",
|
|
76
|
+
"detect-port": "^1.5.1",
|
|
77
|
+
"dotenv": "^16.3.1",
|
|
78
|
+
"easymde": "^2.18.0",
|
|
79
|
+
"env-cmd": "^10.1.0",
|
|
80
|
+
"eventemitter3": "^5.0.1",
|
|
81
|
+
"express": "^4.18.2",
|
|
82
|
+
"express-fileupload": "^1.4.3",
|
|
83
|
+
"favicons": "^7.2.0",
|
|
84
|
+
"font-awesome-assets": "^0.0.9",
|
|
85
|
+
"fs-extra": "^11.1.1",
|
|
86
|
+
"fullcalendar": "^6.1.15",
|
|
87
|
+
"html-minifier-terser": "^7.2.0",
|
|
88
|
+
"http-proxy-middleware": "^2.0.6",
|
|
89
|
+
"ignore-walk": "^6.0.4",
|
|
90
|
+
"is-admin": "^4.0.0",
|
|
91
|
+
"is-ip": "^5.0.1",
|
|
92
|
+
"jimp": "^0.22.12",
|
|
93
|
+
"joystick-controller": "^1.0.15",
|
|
94
|
+
"json-colorizer": "^2.2.2",
|
|
95
|
+
"jsonwebtoken": "^9.0.2",
|
|
96
|
+
"kill-port-process": "^3.2.0",
|
|
97
|
+
"log-update": "^6.0.0",
|
|
98
|
+
"mariadb": "^3.2.2",
|
|
99
|
+
"marked": "^12.0.2",
|
|
100
|
+
"mongoose": "^8.0.1",
|
|
101
|
+
"morgan": "^1.10.0",
|
|
102
|
+
"node-cron": "^3.0.3",
|
|
103
|
+
"nodemailer": "^6.9.9",
|
|
104
|
+
"nodemon": "^3.0.1",
|
|
105
|
+
"pathfinding": "^0.4.18",
|
|
106
|
+
"peer": "^1.0.2",
|
|
107
|
+
"peerjs": "^1.5.2",
|
|
108
|
+
"pixi.js": "7.4.0",
|
|
109
|
+
"prom-client": "^15.1.2",
|
|
110
|
+
"public-ip": "^6.0.1",
|
|
111
|
+
"read": "^2.1.0",
|
|
112
|
+
"sharp": "^0.32.5",
|
|
113
|
+
"shelljs": "^0.8.5",
|
|
114
|
+
"simple-git": "^3.26.0",
|
|
115
|
+
"simple-icons": "^13.9.0",
|
|
116
|
+
"sitemap": "^7.1.1",
|
|
117
|
+
"socket.io": "^4.7.2",
|
|
118
|
+
"sortablejs": "^1.15.0",
|
|
119
|
+
"split-file": "^2.3.0",
|
|
120
|
+
"swagger-ui-express": "^5.0.0",
|
|
121
|
+
"systeminformation": "^5.21.17",
|
|
122
|
+
"text-to-image": "^5.2.0",
|
|
123
|
+
"uglify-js": "^3.17.4",
|
|
124
|
+
"validator": "^13.11.0",
|
|
125
|
+
"winston": "^3.11.0"
|
|
126
|
+
},
|
|
127
|
+
"devDependencies": {
|
|
128
|
+
"clean-jsdoc-theme": "^4.3.0",
|
|
129
|
+
"mocha": "^10.4.0",
|
|
130
|
+
"plantuml": "^0.0.2",
|
|
131
|
+
"swagger-autogen": "^2.23.7",
|
|
132
|
+
"to-json-schema": "^0.2.5"
|
|
133
|
+
},
|
|
134
|
+
"publishConfig": {
|
|
135
|
+
"provenance": true,
|
|
136
|
+
"access": "public"
|
|
137
|
+
}
|
|
138
|
+
}
|
package/prometheus.yml
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
# my global config
|
|
2
|
-
global:
|
|
3
|
-
scrape_interval: 5s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
|
|
4
|
-
evaluation_interval: 5s # Evaluate rules every 15 seconds. The default is every 1 minute.
|
|
5
|
-
# scrape_timeout is set to the global default (10s).
|
|
6
|
-
|
|
7
|
-
# Alertmanager configuration
|
|
8
|
-
alerting:
|
|
9
|
-
alertmanagers:
|
|
10
|
-
- static_configs:
|
|
11
|
-
- targets:
|
|
12
|
-
# - alertmanager:9093
|
|
13
|
-
|
|
14
|
-
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
|
|
15
|
-
rule_files:
|
|
16
|
-
# - "first_rules.yml"
|
|
17
|
-
# - "second_rules.yml"
|
|
18
|
-
|
|
19
|
-
# A scrape configuration containing exactly one endpoint to scrape:
|
|
20
|
-
# Here it's Prometheus itself.
|
|
21
|
-
scrape_configs:
|
|
22
|
-
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
|
|
23
|
-
- job_name: 'prometheus_service'
|
|
24
|
-
|
|
25
|
-
# metrics_path defaults to '/metrics'
|
|
26
|
-
# scheme defaults to 'http'.
|
|
27
|
-
|
|
28
|
-
static_configs:
|
|
29
|
-
- targets: ['host.docker.internal:9090']
|
|
30
|
-
|
|
31
|
-
- job_name: 'nodejs_service'
|
|
32
|
-
static_configs:
|
|
33
|
-
- targets: ['host.docker.internal:4001', 'host.docker.internal:4002']
|
|
34
|
-
# - targets: ['localhost:4001', 'localhost:4002']
|
|
35
|
-
# - targets: ["host.docker.internal:3002"] # Windows
|
|
36
|
-
# - targets: ["docker.for.mac.localhost:9090"] # macOs
|
|
1
|
+
# my global config
|
|
2
|
+
global:
|
|
3
|
+
scrape_interval: 5s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
|
|
4
|
+
evaluation_interval: 5s # Evaluate rules every 15 seconds. The default is every 1 minute.
|
|
5
|
+
# scrape_timeout is set to the global default (10s).
|
|
6
|
+
|
|
7
|
+
# Alertmanager configuration
|
|
8
|
+
alerting:
|
|
9
|
+
alertmanagers:
|
|
10
|
+
- static_configs:
|
|
11
|
+
- targets:
|
|
12
|
+
# - alertmanager:9093
|
|
13
|
+
|
|
14
|
+
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
|
|
15
|
+
rule_files:
|
|
16
|
+
# - "first_rules.yml"
|
|
17
|
+
# - "second_rules.yml"
|
|
18
|
+
|
|
19
|
+
# A scrape configuration containing exactly one endpoint to scrape:
|
|
20
|
+
# Here it's Prometheus itself.
|
|
21
|
+
scrape_configs:
|
|
22
|
+
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
|
|
23
|
+
- job_name: 'prometheus_service'
|
|
24
|
+
|
|
25
|
+
# metrics_path defaults to '/metrics'
|
|
26
|
+
# scheme defaults to 'http'.
|
|
27
|
+
|
|
28
|
+
static_configs:
|
|
29
|
+
- targets: ['host.docker.internal:9090']
|
|
30
|
+
|
|
31
|
+
- job_name: 'nodejs_service'
|
|
32
|
+
static_configs:
|
|
33
|
+
- targets: ['host.docker.internal:4001', 'host.docker.internal:4002']
|
|
34
|
+
# - targets: ['localhost:4001', 'localhost:4002']
|
|
35
|
+
# - targets: ["host.docker.internal:3002"] # Windows
|
|
36
|
+
# - targets: ["docker.for.mac.localhost:9090"] # macOs
|
package/setup.sh
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
sudo apt update
|
|
2
|
-
sudo apt upgrade
|
|
3
|
-
|
|
4
|
-
# Install the MongoDB 4.4 GPG key:
|
|
5
|
-
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
|
|
6
|
-
|
|
7
|
-
# Add the source location for the MongoDB packages:
|
|
8
|
-
# echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
|
|
9
|
-
echo "deb [ arch=arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
|
|
10
|
-
|
|
11
|
-
# Download the package details for the MongoDB packages:
|
|
12
|
-
sudo apt-get update
|
|
13
|
-
|
|
14
|
-
# Install MongoDB:
|
|
15
|
-
sudo apt-get install -y mongodb-org
|
|
16
|
-
# sudo apt-get install mongodb
|
|
17
|
-
|
|
18
|
-
# Ensure mongod config is picked up:
|
|
19
|
-
sudo systemctl daemon-reload
|
|
20
|
-
|
|
21
|
-
# Tell systemd to run mongod on reboot:
|
|
22
|
-
sudo systemctl enable mongod
|
|
23
|
-
|
|
24
|
-
# Start up mongod!
|
|
1
|
+
sudo apt update
|
|
2
|
+
sudo apt upgrade
|
|
3
|
+
|
|
4
|
+
# Install the MongoDB 4.4 GPG key:
|
|
5
|
+
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
|
|
6
|
+
|
|
7
|
+
# Add the source location for the MongoDB packages:
|
|
8
|
+
# echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
|
|
9
|
+
echo "deb [ arch=arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
|
|
10
|
+
|
|
11
|
+
# Download the package details for the MongoDB packages:
|
|
12
|
+
sudo apt-get update
|
|
13
|
+
|
|
14
|
+
# Install MongoDB:
|
|
15
|
+
sudo apt-get install -y mongodb-org
|
|
16
|
+
# sudo apt-get install mongodb
|
|
17
|
+
|
|
18
|
+
# Ensure mongod config is picked up:
|
|
19
|
+
sudo systemctl daemon-reload
|
|
20
|
+
|
|
21
|
+
# Tell systemd to run mongod on reboot:
|
|
22
|
+
sudo systemctl enable mongod
|
|
23
|
+
|
|
24
|
+
# Start up mongod!
|
|
25
25
|
sudo systemctl start mongod
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { loggerFactory } from '../../server/logger.js';
|
|
2
|
-
import { CoreService } from './core.service.js';
|
|
3
|
-
|
|
4
|
-
const logger = loggerFactory(import.meta);
|
|
5
|
-
|
|
6
|
-
const CoreController = {
|
|
7
|
-
post: async (req, res, options) => {
|
|
8
|
-
try {
|
|
9
|
-
const result = await CoreService.post(req, res, options);
|
|
10
|
-
return res.status(200).json({
|
|
11
|
-
status: 'success',
|
|
12
|
-
data: result,
|
|
13
|
-
});
|
|
14
|
-
} catch (error) {
|
|
15
|
-
logger.error(error, error.stack);
|
|
16
|
-
return res.status(400).json({
|
|
17
|
-
status: 'error',
|
|
18
|
-
message: error.message,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
get: async (req, res, options) => {
|
|
23
|
-
try {
|
|
24
|
-
const result = await CoreService.put(req, res, options);
|
|
25
|
-
return res.status(200).json({
|
|
26
|
-
status: 'success',
|
|
27
|
-
data: result,
|
|
28
|
-
});
|
|
29
|
-
} catch (error) {
|
|
30
|
-
logger.error(error, error.stack);
|
|
31
|
-
return res.status(400).json({
|
|
32
|
-
status: 'error',
|
|
33
|
-
message: error.message,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
put: async (req, res, options) => {
|
|
38
|
-
try {
|
|
39
|
-
const result = await CoreService.get(req, res, options);
|
|
40
|
-
return res.status(200).json({
|
|
41
|
-
status: 'success',
|
|
42
|
-
data: result,
|
|
43
|
-
});
|
|
44
|
-
} catch (error) {
|
|
45
|
-
logger.error(error, error.stack);
|
|
46
|
-
return res.status(400).json({
|
|
47
|
-
status: 'error',
|
|
48
|
-
message: error.message,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
delete: async (req, res, options) => {
|
|
53
|
-
try {
|
|
54
|
-
const result = await CoreService.delete(req, res, options);
|
|
55
|
-
return res.status(200).json({
|
|
56
|
-
status: 'success',
|
|
57
|
-
data: result,
|
|
58
|
-
});
|
|
59
|
-
} catch (error) {
|
|
60
|
-
logger.error(error, error.stack);
|
|
61
|
-
return res.status(400).json({
|
|
62
|
-
status: 'error',
|
|
63
|
-
message: error.message,
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export { CoreController };
|
|
1
|
+
import { loggerFactory } from '../../server/logger.js';
|
|
2
|
+
import { CoreService } from './core.service.js';
|
|
3
|
+
|
|
4
|
+
const logger = loggerFactory(import.meta);
|
|
5
|
+
|
|
6
|
+
const CoreController = {
|
|
7
|
+
post: async (req, res, options) => {
|
|
8
|
+
try {
|
|
9
|
+
const result = await CoreService.post(req, res, options);
|
|
10
|
+
return res.status(200).json({
|
|
11
|
+
status: 'success',
|
|
12
|
+
data: result,
|
|
13
|
+
});
|
|
14
|
+
} catch (error) {
|
|
15
|
+
logger.error(error, error.stack);
|
|
16
|
+
return res.status(400).json({
|
|
17
|
+
status: 'error',
|
|
18
|
+
message: error.message,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
get: async (req, res, options) => {
|
|
23
|
+
try {
|
|
24
|
+
const result = await CoreService.put(req, res, options);
|
|
25
|
+
return res.status(200).json({
|
|
26
|
+
status: 'success',
|
|
27
|
+
data: result,
|
|
28
|
+
});
|
|
29
|
+
} catch (error) {
|
|
30
|
+
logger.error(error, error.stack);
|
|
31
|
+
return res.status(400).json({
|
|
32
|
+
status: 'error',
|
|
33
|
+
message: error.message,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
put: async (req, res, options) => {
|
|
38
|
+
try {
|
|
39
|
+
const result = await CoreService.get(req, res, options);
|
|
40
|
+
return res.status(200).json({
|
|
41
|
+
status: 'success',
|
|
42
|
+
data: result,
|
|
43
|
+
});
|
|
44
|
+
} catch (error) {
|
|
45
|
+
logger.error(error, error.stack);
|
|
46
|
+
return res.status(400).json({
|
|
47
|
+
status: 'error',
|
|
48
|
+
message: error.message,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
delete: async (req, res, options) => {
|
|
53
|
+
try {
|
|
54
|
+
const result = await CoreService.delete(req, res, options);
|
|
55
|
+
return res.status(200).json({
|
|
56
|
+
status: 'success',
|
|
57
|
+
data: result,
|
|
58
|
+
});
|
|
59
|
+
} catch (error) {
|
|
60
|
+
logger.error(error, error.stack);
|
|
61
|
+
return res.status(400).json({
|
|
62
|
+
status: 'error',
|
|
63
|
+
message: error.message,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export { CoreController };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Schema, model, Types } from 'mongoose';
|
|
2
|
-
|
|
3
|
-
// https://mongoosejs.com/docs/2.7.x/docs/schematypes.html
|
|
4
|
-
|
|
5
|
-
const CoreSchema = new Schema({});
|
|
6
|
-
|
|
7
|
-
const CoreModel = model('Core', CoreSchema);
|
|
8
|
-
|
|
9
|
-
const ProviderSchema = CoreSchema;
|
|
10
|
-
|
|
11
|
-
export { CoreSchema, CoreModel, ProviderSchema };
|
|
1
|
+
import { Schema, model, Types } from 'mongoose';
|
|
2
|
+
|
|
3
|
+
// https://mongoosejs.com/docs/2.7.x/docs/schematypes.html
|
|
4
|
+
|
|
5
|
+
const CoreSchema = new Schema({});
|
|
6
|
+
|
|
7
|
+
const CoreModel = model('Core', CoreSchema);
|
|
8
|
+
|
|
9
|
+
const ProviderSchema = CoreSchema;
|
|
10
|
+
|
|
11
|
+
export { CoreSchema, CoreModel, ProviderSchema };
|