Skip to content

Commit 034b850

Browse files
committed
Update github repo package
1 parent ad9595a commit 034b850

File tree

11 files changed

+54
-20
lines changed

11 files changed

+54
-20
lines changed

bin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const globalBinFolder = `${shellExec(`npm root -g`, {
1919

2020
const program = new Command();
2121

22-
const version = '2.7.93';
22+
const version = '2.7.94';
2323

2424
program.name('underpost').description(`underpost.net ci/cd cli ${version}`).version(version);
2525

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ services:
5858
cpus: '0.25'
5959
memory: 20M
6060
labels: # labels in Compose file instead of Dockerfile
61-
engine.version: '2.7.93'
61+
engine.version: '2.7.94'
6262
networks:
6363
- load-balancer
6464

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"type": "module",
33
"main": "src/index.js",
44
"name": "@underpostnet/underpost",
5-
"version": "2.7.93",
5+
"version": "2.7.94",
66
"description": "pwa api rest template",
77
"scripts": {
88
"start": "env-cmd -f .env.production node --max-old-space-size=8192 src/server",

src/api/core/core.service.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ const CoreService = {
99
/** @type {import('./core.model.js').CoreModel} */
1010
const Core = DataBaseProvider.instance[`${options.host}${options.path}`].mongoose.models.Core;
1111
if (req.path.startsWith('/sh')) {
12-
shellExec(req.body.sh, { stdout: true, async: true });
13-
return {
14-
status: 'success',
15-
message: 'Command "' + req.body.sh + '" running',
16-
};
12+
if (req.body.print) return shellExec(req.body.sh, { stdout: true });
13+
shellExec(req.body.sh, { async: true });
14+
return 'Command "' + req.body.sh + '" running';
1715
}
1816
return await new Core(req.body).save();
1917
},

src/client/components/core/Docs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const Docs = {
7979
icon: html`<i class="fa-brands fa-osi"></i>`,
8080
text: 'Source Docs',
8181
url: function () {
82-
return `${getProxyPath()}docs/engine/2.7.93`;
82+
return `${getProxyPath()}docs/engine/2.7.94`;
8383
},
8484
},
8585
{

src/client/components/core/Modal.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,18 +1535,18 @@ const Modal = {
15351535
Responsive.Event['h-ui-hide-' + idModal] = () => {
15361536
setTimeout(() => {
15371537
if (!s(`.${idModal}`) || !s(`.main-body-btn-ui-close`)) return;
1538-
if (s(`.btn-restore-${idModal}`).style.display !== 'none') {
1538+
if (s(`.btn-restore-${idModal}`) && s(`.btn-restore-${idModal}`).style.display !== 'none') {
15391539
s(`.${idModal}`).style.height = s(`.main-body-btn-ui-close`).classList.contains('hide')
15401540
? `${window.innerHeight}px`
15411541
: `${
15421542
window.innerHeight -
15431543
(options.heightTopBar ? options.heightTopBar : heightDefaultTopBar) -
15441544
(options.heightBottomBar ? options.heightBottomBar : heightDefaultBottomBar)
15451545
}px`;
1546-
s(`.${idModal}`).style.top = s(`.main-body-btn-ui-close`).classList.contains('hide')
1547-
? `0px`
1548-
: `${options.heightTopBar ? options.heightTopBar : heightDefaultTopBar}px`;
15491546
}
1547+
s(`.${idModal}`).style.top = s(`.main-body-btn-ui-close`).classList.contains('hide')
1548+
? `0px`
1549+
: `${options.heightTopBar ? options.heightTopBar : heightDefaultTopBar}px`;
15501550
});
15511551
};
15521552
Responsive.Event['h-ui-hide-' + idModal]();

src/client/components/core/Scroll.js

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { borderChar } from './Css.js';
2+
import { Modal } from './Modal.js';
23
import { append, s } from './VanillaJs.js';
34

45
const Scroll = {
@@ -17,7 +18,7 @@ const Scroll = {
1718
scrollHandler: async function () {
1819
for (const selector in Scroll.data) await Scroll.data[selector].callback(Scroll.getScrollPosition(selector));
1920
},
20-
addEvent: function (selector = '', callback = () => {}) {
21+
addEvent: function (selector = '', callback = (position = 0) => {}) {
2122
Scroll.data[selector].callback = callback;
2223
},
2324
removeEvent: function (selector) {
@@ -30,6 +31,13 @@ const Scroll = {
3031
behavior: options.behavior || 'smooth',
3132
});
3233
},
34+
topRefreshEvents: {},
35+
addTopRefreshEvent: function (options = { id: '', callback: () => {}, condition: () => {} }) {
36+
this.topRefreshEvents[options.id] = options;
37+
},
38+
removeTopRefreshEvent: function (id = '') {
39+
delete this.topRefreshEvents[id];
40+
},
3341
pullTopRefresh: function () {
3442
append(
3543
'body',
@@ -68,6 +76,15 @@ const Scroll = {
6876
});
6977

7078
document.addEventListener('touchmove', (e) => {
79+
if (
80+
!Object.keys(Scroll.topRefreshEvents).find((event) => Scroll.topRefreshEvents[event].condition()) ||
81+
(!s(`.btn-bar-center-icon-close`).classList.contains('hide') &&
82+
!s(
83+
`.btn-icon-menu-mode-${Modal.Data['modal-menu'].options.mode !== 'slide-menu-right' ? 'left' : 'right'}`,
84+
).classList.contains('hide'))
85+
)
86+
return;
87+
7188
const touchY = e.touches[0].clientY;
7289
const touchDiff = touchY - touchstartY;
7390

@@ -87,11 +104,26 @@ const Scroll = {
87104
// console.warn('touchend');
88105
s(`.pull-refresh-icon-container`).style.top = '-60px';
89106
if (reload) {
90-
location.reload();
91-
// console.warn('reload');
107+
for (const event of Object.keys(Scroll.topRefreshEvents))
108+
if (Scroll.topRefreshEvents[event].condition()) Scroll.topRefreshEvents[event].callback();
92109
}
93110
reload = false;
94111
});
112+
Scroll.addTopRefreshEvent({
113+
id: 'main-body',
114+
callback: () => {
115+
location.reload();
116+
},
117+
condition: () => {
118+
return (
119+
s('.main-body') &&
120+
s('.main-body').scrollTop === 0 &&
121+
!Object.keys(Modal.Data).find(
122+
(idModal) => !['modal-menu', 'main-body', 'bottom-bar', 'main-body-top'].includes(idModal),
123+
)
124+
);
125+
},
126+
});
95127
},
96128
};
97129

src/client/components/core/Translate.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ const TranslateCore = {
106106
en: 'Enter your WhatsApp number, including your country code.',
107107
es: 'Número de WhatsApp, recuerda colocar el código de tu país',
108108
};
109+
Translate.Data['¿'] = {
110+
en: '',
111+
es: '¿',
112+
};
109113
Translate.Data['color-copy'] = { es: 'color copiado en el portapapeles', en: 'color copied to clipboard' };
110114
Translate.Data['pallet-colors'] = { en: 'pallet colors', es: 'paleta de colores' };
111115
Translate.Data['fullscreen'] = { en: 'Fullscreen', es: 'Pantalla completa' };

src/client/ssr/body/CacheControl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ SrrComponent = ({ ttiLoadTimeLimit }) => {
109109
const CacheControl = ${CacheControl};
110110
CacheControl({ ttiLoadTimeLimit: ${ttiLoadTimeLimit ? ttiLoadTimeLimit : 1000 * 70 * 1} });
111111
</script>
112-
<div class="clean-cache-container">v2.7.93</div>
112+
<div class="clean-cache-container">v2.7.94</div>
113113
`;
114114
};

0 commit comments

Comments
 (0)