underpost 2.8.0 → 2.8.1
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/.vscode/settings.json +2 -1
- package/bin/deploy.js +2 -16
- package/bin/index.js +4 -5
- package/bin/util.js +18 -0
- package/conf.js +8 -1
- package/docker-compose.yml +1 -1
- package/package.json +11 -9
- package/src/client/components/core/Account.js +4 -2
- package/src/client/components/core/Auth.js +2 -2
- package/src/client/components/core/Css.js +1 -1
- package/src/client/components/core/Docs.js +2 -1
- package/src/client/components/core/JoyStick.js +8 -5
- package/src/client/components/core/Modal.js +7 -6
- package/src/client/components/core/Panel.js +1 -0
- package/src/client/components/core/PanelForm.js +7 -1
- package/src/client/components/core/SignUp.js +4 -1
- package/src/client/components/core/Translate.js +14 -0
- package/src/client/public/default/plantuml/client-conf.svg +1 -1
- package/src/client/public/default/plantuml/server-conf.svg +1 -1
- package/src/client/public/default/plantuml/server-schema.svg +1 -1
- package/src/client/public/default/plantuml/ssr-conf.svg +1 -1
- package/src/client/public/default/plantuml/ssr-schema.svg +1 -1
- package/src/client/services/core/core.service.js +2 -0
- package/src/client/ssr/body/CacheControl.js +2 -1
- package/src/client/ssr/body/DefaultSplashScreen.js +3 -3
- package/src/client/ssr/offline/Maintenance.js +63 -0
- package/src/client/sw/default.sw.js +23 -3
- package/src/index.js +8 -0
- package/src/server/client-build.js +5 -4
- package/src/server/client-icons.js +1 -1
- package/src/server/conf.js +3 -3
- package/src/server/logger.js +8 -6
- package/src/server/valkey.js +1 -0
package/.vscode/settings.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"cSpell.words": [
|
|
13
13
|
"ANAME",
|
|
14
14
|
"browserconfig",
|
|
15
|
+
"Bymyelectrics",
|
|
15
16
|
"certbot",
|
|
16
17
|
"certonly",
|
|
17
18
|
"changefreq",
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
"[xml]": {
|
|
78
79
|
"editor.defaultFormatter": "redhat.vscode-xml"
|
|
79
80
|
},
|
|
80
|
-
"docwriter.style": "
|
|
81
|
+
"docwriter.style": "Auto-detect",
|
|
81
82
|
"docwriter.progress.trackFunctions": false,
|
|
82
83
|
"docwriter.progress.trackMethods": false,
|
|
83
84
|
"files.exclude": {
|
package/bin/deploy.js
CHANGED
|
@@ -752,22 +752,8 @@ try {
|
|
|
752
752
|
);
|
|
753
753
|
|
|
754
754
|
fs.writeFileSync(
|
|
755
|
-
`./src/
|
|
756
|
-
fs
|
|
757
|
-
.readFileSync(`./src/client/components/core/Docs.js`, 'utf8')
|
|
758
|
-
.replaceAll(`/engine/${version}`, `/engine/${newVersion}`),
|
|
759
|
-
'utf8',
|
|
760
|
-
);
|
|
761
|
-
|
|
762
|
-
fs.writeFileSync(
|
|
763
|
-
`./src/client/ssr/body/CacheControl.js`,
|
|
764
|
-
fs.readFileSync(`./src/client/ssr/body/CacheControl.js`, 'utf8').replaceAll(`v${version}`, `v${newVersion}`),
|
|
765
|
-
'utf8',
|
|
766
|
-
);
|
|
767
|
-
|
|
768
|
-
fs.writeFileSync(
|
|
769
|
-
`./bin/index.js`,
|
|
770
|
-
fs.readFileSync(`./bin/index.js`, 'utf8').replaceAll(`${version}`, `${newVersion}`),
|
|
755
|
+
`./src/index.js`,
|
|
756
|
+
fs.readFileSync(`./src/index.js`, 'utf8').replaceAll(`${version}`, `${newVersion}`),
|
|
771
757
|
'utf8',
|
|
772
758
|
);
|
|
773
759
|
|
package/bin/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import fs from 'fs-extra';
|
|
|
6
6
|
import { Command } from 'commander';
|
|
7
7
|
import { MongooseDB } from '../src/db/mongo/MongooseDB.js';
|
|
8
8
|
import { loggerFactory, underpostASCI } from '../src/server/logger.js';
|
|
9
|
+
import Underpost from '../src/index.js';
|
|
9
10
|
|
|
10
11
|
dotenv.config();
|
|
11
12
|
|
|
@@ -19,9 +20,7 @@ const globalBinFolder = `${shellExec(`npm root -g`, {
|
|
|
19
20
|
|
|
20
21
|
const program = new Command();
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
program.name('underpost').description(`underpost.net ci/cd cli ${version}`).version(version);
|
|
23
|
+
program.name('underpost').description(`underpost.net ci/cd cli ${Underpost.version}`).version(Underpost.version);
|
|
25
24
|
|
|
26
25
|
program
|
|
27
26
|
.command('new <app-name>')
|
|
@@ -30,7 +29,7 @@ program
|
|
|
30
29
|
console.log(
|
|
31
30
|
underpostASCI() +
|
|
32
31
|
`
|
|
33
|
-
|
|
32
|
+
${Underpost.version} https://www.nexodev.org/docs
|
|
34
33
|
`,
|
|
35
34
|
);
|
|
36
35
|
await logger.setUpInfo();
|
|
@@ -65,7 +64,7 @@ program
|
|
|
65
64
|
console.log(
|
|
66
65
|
underpostASCI() +
|
|
67
66
|
`
|
|
68
|
-
|
|
67
|
+
${Underpost.version} https://www.nexodev.org/docs
|
|
69
68
|
`,
|
|
70
69
|
);
|
|
71
70
|
shellCd(`${globalBinFolder}`);
|
package/bin/util.js
CHANGED
|
@@ -13,6 +13,7 @@ import { network } from '../src/server/network.js';
|
|
|
13
13
|
import { Config } from '../src/server/conf.js';
|
|
14
14
|
import { FileFactory } from '../src/api/file/file.service.js';
|
|
15
15
|
import { buildTextImg, faBase64Png, getBufferPngText } from '../src/server/client-icons.js';
|
|
16
|
+
import keyword_extractor from 'keyword-extractor';
|
|
16
17
|
|
|
17
18
|
const httpsAgent = new https.Agent({
|
|
18
19
|
rejectUnauthorized: false,
|
|
@@ -203,7 +204,24 @@ try {
|
|
|
203
204
|
shellExec(`git checkout jsdoc.json`);
|
|
204
205
|
break;
|
|
205
206
|
}
|
|
207
|
+
case 'get-keys': {
|
|
208
|
+
const sentence = fs.existsSync('./_')
|
|
209
|
+
? fs.readFileSync('./_', 'utf8')
|
|
210
|
+
: process.argv[3]
|
|
211
|
+
? process.argv[3]
|
|
212
|
+
: 'President Obama woke up Monday facing a Congressional defeat that many in both parties believed could hobble his presidency.';
|
|
213
|
+
|
|
214
|
+
// Extract the keywords
|
|
215
|
+
const extraction_result = keyword_extractor.extract(sentence, {
|
|
216
|
+
language: 'english',
|
|
217
|
+
remove_digits: true,
|
|
218
|
+
// return_changed_case: true,
|
|
219
|
+
// remove_duplicates: false,
|
|
220
|
+
});
|
|
206
221
|
|
|
222
|
+
console.log(extraction_result.join(', '));
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
207
225
|
default:
|
|
208
226
|
break;
|
|
209
227
|
}
|
package/conf.js
CHANGED
|
@@ -3,7 +3,7 @@ const DefaultConf = {
|
|
|
3
3
|
default: {
|
|
4
4
|
metadata: {
|
|
5
5
|
title: 'Demo App',
|
|
6
|
-
backgroundImage: '
|
|
6
|
+
backgroundImage: 'assets/background/white0-min.jpg',
|
|
7
7
|
description: 'Web application',
|
|
8
8
|
keywords: ['web', 'app', 'spa', 'demo', 'github-pages'],
|
|
9
9
|
author: 'https://github.com/underpostnet',
|
|
@@ -193,6 +193,13 @@ const DefaultConf = {
|
|
|
193
193
|
head: [],
|
|
194
194
|
body: [],
|
|
195
195
|
},
|
|
196
|
+
{
|
|
197
|
+
path: '/maintenance',
|
|
198
|
+
title: 'Server Maintenance',
|
|
199
|
+
client: 'Maintenance',
|
|
200
|
+
head: [],
|
|
201
|
+
body: [],
|
|
202
|
+
},
|
|
196
203
|
],
|
|
197
204
|
pages: [
|
|
198
205
|
{
|
package/docker-compose.yml
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"type": "module",
|
|
3
3
|
"main": "src/index.js",
|
|
4
4
|
"name": "underpost",
|
|
5
|
-
"version": "2.8.
|
|
5
|
+
"version": "2.8.1",
|
|
6
6
|
"description": "pwa api rest template",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",
|
|
@@ -55,7 +55,6 @@
|
|
|
55
55
|
"@fortawesome/fontawesome-free": "^6.4.2",
|
|
56
56
|
"@loadingio/css-spinner": "^2.0.2",
|
|
57
57
|
"@neodrag/vanilla": "^2.0.3",
|
|
58
|
-
"@xenova/transformers": "^2.17.2",
|
|
59
58
|
"adm-zip": "^0.5.10",
|
|
60
59
|
"ag-grid-community": "31.0.0",
|
|
61
60
|
"axios": "^1.5.1",
|
|
@@ -84,24 +83,26 @@
|
|
|
84
83
|
"html-minifier-terser": "^7.2.0",
|
|
85
84
|
"http-proxy-middleware": "^2.0.6",
|
|
86
85
|
"ignore-walk": "^6.0.4",
|
|
86
|
+
"iovalkey": "^0.2.1",
|
|
87
87
|
"is-admin": "^4.0.0",
|
|
88
88
|
"is-ip": "^5.0.1",
|
|
89
89
|
"jimp": "^0.22.12",
|
|
90
90
|
"joystick-controller": "^1.0.15",
|
|
91
91
|
"json-colorizer": "^2.2.2",
|
|
92
92
|
"jsonwebtoken": "^9.0.2",
|
|
93
|
+
"keyword-extractor": "^0.0.28",
|
|
93
94
|
"kill-port-process": "^3.2.0",
|
|
94
95
|
"log-update": "^6.0.0",
|
|
95
96
|
"mariadb": "^3.2.2",
|
|
96
97
|
"marked": "^12.0.2",
|
|
97
|
-
"mongoose": "^8.
|
|
98
|
+
"mongoose": "^8.9.5",
|
|
98
99
|
"morgan": "^1.10.0",
|
|
99
100
|
"nodemailer": "^6.9.9",
|
|
100
101
|
"nodemon": "^3.0.1",
|
|
101
102
|
"pathfinding": "^0.4.18",
|
|
102
103
|
"peer": "^1.0.2",
|
|
103
104
|
"peerjs": "^1.5.2",
|
|
104
|
-
"pixi.js": "7.4.
|
|
105
|
+
"pixi.js": "7.4.2",
|
|
105
106
|
"prom-client": "^15.1.2",
|
|
106
107
|
"public-ip": "^6.0.1",
|
|
107
108
|
"read": "^2.1.0",
|
|
@@ -114,18 +115,19 @@
|
|
|
114
115
|
"sortablejs": "^1.15.0",
|
|
115
116
|
"split-file": "^2.3.0",
|
|
116
117
|
"swagger-ui-express": "^5.0.0",
|
|
117
|
-
"systeminformation": "^5.
|
|
118
|
+
"systeminformation": "^5.23.7",
|
|
118
119
|
"uglify-js": "^3.17.4",
|
|
119
120
|
"validator": "^13.11.0",
|
|
120
|
-
"
|
|
121
|
-
"
|
|
121
|
+
"vanilla-jsoneditor": "^2.3.2",
|
|
122
|
+
"web3": "^4.13.0",
|
|
123
|
+
"winston": "^3.11.0"
|
|
122
124
|
},
|
|
123
125
|
"devDependencies": {
|
|
124
126
|
"clean-jsdoc-theme": "^4.3.0",
|
|
127
|
+
"easy-json-schema": "^0.0.2-beta",
|
|
125
128
|
"mocha": "^10.4.0",
|
|
126
129
|
"plantuml": "^0.0.2",
|
|
127
|
-
"swagger-autogen": "^2.23.7"
|
|
128
|
-
"easy-json-schema": "^0.0.2-beta"
|
|
130
|
+
"swagger-autogen": "^2.23.7"
|
|
129
131
|
},
|
|
130
132
|
"publishConfig": {
|
|
131
133
|
"provenance": true,
|
|
@@ -300,8 +300,10 @@ const Account = {
|
|
|
300
300
|
s(`.account-profile-image`).style.opacity = 0;
|
|
301
301
|
for (const inputData of this.formData)
|
|
302
302
|
if (s(`.${inputData.id}`)) s(`.${inputData.id}`).value = user[inputData.model];
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
if (LogIn.Scope.user.main.model.user.profileImage) {
|
|
304
|
+
s(`.account-profile-image`).src = LogIn.Scope.user.main.model.user.profileImage.imageSrc;
|
|
305
|
+
s(`.account-profile-image`).style.opacity = 1;
|
|
306
|
+
}
|
|
305
307
|
},
|
|
306
308
|
};
|
|
307
309
|
|
|
@@ -46,8 +46,8 @@ const Auth = {
|
|
|
46
46
|
) {
|
|
47
47
|
try {
|
|
48
48
|
localStorage.setItem('jwt', result.data.token);
|
|
49
|
-
await Auth.sessionIn();
|
|
50
49
|
await SignUp.Trigger(result.data);
|
|
50
|
+
await Auth.sessionIn();
|
|
51
51
|
} catch (error) {
|
|
52
52
|
logger.error(error);
|
|
53
53
|
localStorage.removeItem('jwt');
|
|
@@ -76,7 +76,7 @@ const Auth = {
|
|
|
76
76
|
await LogIn.Trigger({ user: data.user });
|
|
77
77
|
await Account.updateForm(data.user);
|
|
78
78
|
return { user: data.user };
|
|
79
|
-
}
|
|
79
|
+
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// anon guest session
|
|
@@ -344,7 +344,7 @@ const renderBubbleDialog = async function (
|
|
|
344
344
|
}
|
|
345
345
|
if (options.trianglePositionCss) cssTrianglePosition = options.trianglePositionCss;
|
|
346
346
|
return html` <div
|
|
347
|
-
class="${options?.classSelectors ? options.classSelectors : '
|
|
347
|
+
class="${options?.classSelectors ? options.classSelectors : 'inl'} bubble-dialog bubble-dialog-${id}"
|
|
348
348
|
${options.bubbleCss ? `style='${options.bubbleCss}'` : ''}
|
|
349
349
|
>
|
|
350
350
|
<style class="style-bubble-dialog-triangle-${id}">
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { _VERSION, CoreService } from '../../services/core/core.service.js';
|
|
1
2
|
import { Badge } from './Badge.js';
|
|
2
3
|
import { BtnIcon } from './BtnIcon.js';
|
|
3
4
|
import { rgbToHex } from './CommonJs.js';
|
|
@@ -79,7 +80,7 @@ const Docs = {
|
|
|
79
80
|
icon: html`<i class="fa-brands fa-osi"></i>`,
|
|
80
81
|
text: 'Source Docs',
|
|
81
82
|
url: function () {
|
|
82
|
-
return `${getProxyPath()}docs/engine
|
|
83
|
+
return `${getProxyPath()}docs/engine/${_VERSION}`;
|
|
83
84
|
},
|
|
84
85
|
},
|
|
85
86
|
{
|
|
@@ -24,13 +24,16 @@ const JoyStick = {
|
|
|
24
24
|
z-index: 3;
|
|
25
25
|
}
|
|
26
26
|
.joy-img-background-${id} {
|
|
27
|
-
width:
|
|
28
|
-
height:
|
|
27
|
+
width: 50%;
|
|
28
|
+
height: 50%;
|
|
29
29
|
opacity: 0.8;
|
|
30
|
+
transition: 0.1;
|
|
30
31
|
}
|
|
31
|
-
.dynamic-joystick-container-${id}:hover
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
.dynamic-joystick-container-${id}:hover {
|
|
33
|
+
}
|
|
34
|
+
.joy-img-background-${id}:hover {
|
|
35
|
+
width: 54%;
|
|
36
|
+
height: 54%;
|
|
34
37
|
opacity: 1;
|
|
35
38
|
}
|
|
36
39
|
</style>
|
|
@@ -65,12 +65,6 @@ const Modal = {
|
|
|
65
65
|
options.heightTopBar = options.heightTopBar + options.heightBottomBar;
|
|
66
66
|
options.heightBottomBar = 0;
|
|
67
67
|
}
|
|
68
|
-
const setCenterRestore = () => {
|
|
69
|
-
const ResponsiveData = Responsive.getResponsiveData();
|
|
70
|
-
top = `${ResponsiveData.height / 2 - height / 2}px`;
|
|
71
|
-
left = `${ResponsiveData.width / 2 - width / 2}px`;
|
|
72
|
-
};
|
|
73
|
-
setCenterRestore();
|
|
74
68
|
let transition = `opacity 0.3s, box-shadow 0.3s, bottom 0.3s`;
|
|
75
69
|
const originSlideMenuWidth = 320;
|
|
76
70
|
const collapseSlideMenuWidth = 50;
|
|
@@ -91,6 +85,12 @@ const Modal = {
|
|
|
91
85
|
onBarUiClose: {},
|
|
92
86
|
query: options.query ? `${window.location.search}` : undefined,
|
|
93
87
|
};
|
|
88
|
+
const setCenterRestore = () => {
|
|
89
|
+
const ResponsiveData = Responsive.getResponsiveData();
|
|
90
|
+
top = `${ResponsiveData.height / 2 - height / 2}px`;
|
|
91
|
+
left = `${ResponsiveData.width / 2 - width / 2}px`;
|
|
92
|
+
};
|
|
93
|
+
if (idModal !== 'main-body') setCenterRestore();
|
|
94
94
|
if (options && 'mode' in options) {
|
|
95
95
|
this.Data[idModal][options.mode] = {};
|
|
96
96
|
switch (options.mode) {
|
|
@@ -265,6 +265,7 @@ const Modal = {
|
|
|
265
265
|
<i class="fas fa-caret-up main-body-btn-ui-close"></i>
|
|
266
266
|
</div>
|
|
267
267
|
</div>
|
|
268
|
+
<div class="main-body-btn-container-custom"></div>
|
|
268
269
|
</div>
|
|
269
270
|
`,
|
|
270
271
|
);
|
|
@@ -77,6 +77,7 @@ const Panel = {
|
|
|
77
77
|
const { id } = obj;
|
|
78
78
|
|
|
79
79
|
setTimeout(async () => {
|
|
80
|
+
if (!s(`.${idPanel}`)) return;
|
|
80
81
|
LoadingAnimation.spinner.play(`.${idPanel}-img-spinner-${id}`, 'dual-ring');
|
|
81
82
|
if (options && options.callBackPanelRender)
|
|
82
83
|
await options.callBackPanelRender({
|
|
@@ -456,7 +456,13 @@ const PanelForm = {
|
|
|
456
456
|
});
|
|
457
457
|
|
|
458
458
|
// if (options.route === 'home') setTimeout(this.Data[idPanel].updatePanel);
|
|
459
|
-
|
|
459
|
+
setTimeout(() => {
|
|
460
|
+
if (
|
|
461
|
+
options.route !== 'home' &&
|
|
462
|
+
(!PanelForm.Data[idPanel].originData || PanelForm.Data[idPanel].originData.length === 0)
|
|
463
|
+
)
|
|
464
|
+
this.Data[idPanel].updatePanel();
|
|
465
|
+
});
|
|
460
466
|
|
|
461
467
|
if (options.parentIdModal) {
|
|
462
468
|
htmls(`.html-${options.parentIdModal}`, await renderSrrPanelData());
|
|
@@ -52,7 +52,10 @@ const SignUp = {
|
|
|
52
52
|
: Translate.Render(`no-valid-register`),
|
|
53
53
|
status: result.status,
|
|
54
54
|
});
|
|
55
|
-
if (result.status === 'success')
|
|
55
|
+
if (result.status === 'success') {
|
|
56
|
+
await Auth.signUpToken(result);
|
|
57
|
+
s(`.btn-close-${options.idModal}`).click();
|
|
58
|
+
}
|
|
56
59
|
});
|
|
57
60
|
s(`.btn-sign-up-i-have-account`).onclick = () => {
|
|
58
61
|
s(`.main-btn-log-in`).click();
|
|
@@ -460,6 +460,20 @@ const TranslateCore = {
|
|
|
460
460
|
es: 'Carga completada',
|
|
461
461
|
};
|
|
462
462
|
Translate.Data['play'] = { es: 'Jugar', en: 'Play' };
|
|
463
|
+
Translate.Data['pause'] = { es: 'Pausar', en: 'Pause' };
|
|
464
|
+
Translate.Data['stop'] = { es: 'Parar', en: 'Stop' };
|
|
465
|
+
Translate.Data['previous'] = { es: 'Anterior', en: 'Previous' };
|
|
466
|
+
Translate.Data['next'] = { es: 'Siguiente', en: 'Next' };
|
|
467
|
+
Translate.Data['buy'] = { es: 'comprar', en: 'Buy' };
|
|
468
|
+
Translate.Data['sell'] = { es: 'Vender', en: 'sell' };
|
|
469
|
+
|
|
470
|
+
Translate.Data['monday'] = { es: 'Lunes', en: 'Monday' };
|
|
471
|
+
Translate.Data['tuesday'] = { es: 'Martes', en: 'Tuesday' };
|
|
472
|
+
Translate.Data['wednesday'] = { es: 'Miércoles', en: 'Wednesday' };
|
|
473
|
+
Translate.Data['thursday'] = { es: 'Jueves', en: 'Thursday' };
|
|
474
|
+
Translate.Data['friday'] = { es: 'Viernes', en: 'Friday' };
|
|
475
|
+
Translate.Data['saturday'] = { es: 'Sábado', en: 'Saturday' };
|
|
476
|
+
Translate.Data['sunday'] = { es: 'Domingo', en: 'Sunday' };
|
|
463
477
|
},
|
|
464
478
|
};
|
|
465
479
|
|