underpost 3.1.3 → 3.2.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.
Files changed (92) hide show
  1. package/.env.example +0 -2
  2. package/.github/workflows/ghpkg.ci.yml +4 -4
  3. package/.github/workflows/npmpkg.ci.yml +28 -11
  4. package/.github/workflows/publish.ci.yml +6 -0
  5. package/.github/workflows/pwa-microservices-template-page.cd.yml +4 -5
  6. package/.github/workflows/pwa-microservices-template-test.ci.yml +3 -3
  7. package/.github/workflows/release.cd.yml +13 -8
  8. package/CHANGELOG.md +396 -1
  9. package/CLI-HELP.md +53 -6
  10. package/Dockerfile +4 -2
  11. package/README.md +3 -2
  12. package/bin/build.js +18 -12
  13. package/bin/deploy.js +177 -124
  14. package/bin/file.js +3 -0
  15. package/conf.js +3 -2
  16. package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +5 -2
  17. package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +5 -2
  18. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  19. package/manifests/deployment/dd-test-development/deployment.yaml +88 -74
  20. package/manifests/deployment/dd-test-development/proxy.yaml +13 -4
  21. package/manifests/deployment/playwright/deployment.yaml +1 -1
  22. package/nodemon.json +1 -1
  23. package/package.json +22 -15
  24. package/scripts/rhel-grpc-setup.sh +56 -0
  25. package/src/api/file/file.ref.json +18 -0
  26. package/src/api/user/user.service.js +8 -7
  27. package/src/cli/cluster.js +7 -7
  28. package/src/cli/db.js +726 -825
  29. package/src/cli/deploy.js +151 -93
  30. package/src/cli/env.js +19 -0
  31. package/src/cli/fs.js +5 -2
  32. package/src/cli/index.js +45 -2
  33. package/src/cli/kubectl.js +211 -0
  34. package/src/cli/release.js +284 -0
  35. package/src/cli/repository.js +434 -75
  36. package/src/cli/run.js +189 -34
  37. package/src/cli/secrets.js +73 -0
  38. package/src/cli/test.js +3 -3
  39. package/src/client/Default.index.js +3 -4
  40. package/src/client/components/core/AppStore.js +69 -0
  41. package/src/client/components/core/CalendarCore.js +2 -2
  42. package/src/client/components/core/DropDown.js +137 -17
  43. package/src/client/components/core/Keyboard.js +2 -2
  44. package/src/client/components/core/LogIn.js +2 -2
  45. package/src/client/components/core/LogOut.js +2 -2
  46. package/src/client/components/core/Modal.js +0 -1
  47. package/src/client/components/core/Panel.js +0 -1
  48. package/src/client/components/core/PanelForm.js +19 -19
  49. package/src/client/components/core/SocketIo.js +82 -29
  50. package/src/client/components/core/SocketIoHandler.js +75 -0
  51. package/src/client/components/core/Stream.js +143 -95
  52. package/src/client/components/core/Webhook.js +40 -7
  53. package/src/client/components/default/AppStoreDefault.js +5 -0
  54. package/src/client/components/default/LogInDefault.js +3 -3
  55. package/src/client/components/default/LogOutDefault.js +2 -2
  56. package/src/client/components/default/MenuDefault.js +5 -5
  57. package/src/client/components/default/SocketIoDefault.js +3 -51
  58. package/src/client/services/core/core.service.js +20 -8
  59. package/src/client/services/user/user.management.js +2 -2
  60. package/src/index.js +24 -1
  61. package/src/runtime/express/Dockerfile +4 -0
  62. package/src/runtime/express/Express.js +18 -1
  63. package/src/runtime/lampp/Dockerfile +13 -2
  64. package/src/runtime/lampp/Lampp.js +27 -4
  65. package/src/runtime/wp/Dockerfile +68 -0
  66. package/src/runtime/wp/Wp.js +639 -0
  67. package/src/server/auth.js +24 -1
  68. package/src/server/backup.js +57 -23
  69. package/src/server/client-build-docs.js +9 -2
  70. package/src/server/client-build.js +31 -31
  71. package/src/server/client-formatted.js +109 -57
  72. package/src/server/cron.js +23 -18
  73. package/src/server/ipfs-client.js +24 -1
  74. package/src/server/peer.js +8 -0
  75. package/src/server/runtime.js +25 -1
  76. package/src/server/start.js +3 -2
  77. package/src/ws/IoInterface.js +1 -10
  78. package/src/ws/IoServer.js +14 -33
  79. package/src/ws/core/channels/core.ws.chat.js +65 -20
  80. package/src/ws/core/channels/core.ws.mailer.js +113 -32
  81. package/src/ws/core/channels/core.ws.stream.js +90 -31
  82. package/src/ws/core/core.ws.connection.js +12 -33
  83. package/src/ws/core/core.ws.emit.js +10 -26
  84. package/src/ws/core/core.ws.server.js +25 -58
  85. package/src/ws/default/channels/default.ws.main.js +53 -12
  86. package/src/ws/default/default.ws.connection.js +26 -13
  87. package/src/ws/default/default.ws.server.js +30 -12
  88. package/src/client/components/default/ElementsDefault.js +0 -38
  89. package/src/ws/core/management/core.ws.chat.js +0 -8
  90. package/src/ws/core/management/core.ws.mailer.js +0 -16
  91. package/src/ws/core/management/core.ws.stream.js +0 -8
  92. package/src/ws/default/management/default.ws.main.js +0 -8
@@ -20,8 +20,8 @@ RUN dnf -y update && \
20
20
  perl && \
21
21
  dnf clean all
22
22
 
23
- # --- Download and install XAMPP
24
- RUN curl -L -o /tmp/xampp-linux-installer.run "https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/7.4.33/xampp-linux-x64-7.4.33-0-installer.run" && \
23
+ # --- Download and install XAMPP (PHP 8.2)
24
+ RUN curl -L -o /tmp/xampp-linux-installer.run "https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.2.12/xampp-linux-x64-8.2.12-0-installer.run" && \
25
25
  chmod +x /tmp/xampp-linux-installer.run && \
26
26
  bash -c "/tmp/xampp-linux-installer.run --mode unattended" && \
27
27
  ln -sf /opt/lampp/lampp /usr/bin/lampp
@@ -31,6 +31,13 @@ RUN mkdir -p /opt/lampp/htdocs && \
31
31
  chown -R root:root /opt/lampp/htdocs && \
32
32
  chmod -R a+rX /opt/lampp/htdocs
33
33
 
34
+ # Add XAMPP binaries and /usr/local/bin to PATH for all shells
35
+ ENV PATH="/opt/lampp/bin:/usr/local/bin:${PATH}"
36
+ RUN echo 'export PATH="/opt/lampp/bin:/usr/local/bin:${PATH}"' > /etc/profile.d/lampp.sh
37
+
38
+ # Provide a no-op sendmail so PHP plugins don't error on mail calls
39
+ RUN printf '#!/bin/sh\ncat > /dev/null\n' > /usr/sbin/sendmail && chmod +x /usr/sbin/sendmail
40
+
34
41
  # Install Node.js
35
42
  RUN curl -fsSL https://rpm.nodesource.com/setup_24.x | bash -
36
43
  RUN dnf install nodejs -y
@@ -40,6 +47,10 @@ RUN dnf clean all
40
47
  RUN node --version
41
48
  RUN npm --version
42
49
 
50
+ # Create non-root user for secure container execution (cron jobs, init containers)
51
+ # Deployment containers override to root via securityContext when npm install -g is needed
52
+ RUN useradd -m -u 1000 -s /bin/bash dd
53
+
43
54
  # Set working directory
44
55
  WORKDIR /home/dd
45
56
 
@@ -169,9 +169,9 @@ class LamppService {
169
169
  shellCd(`./engine-private/setup`);
170
170
 
171
171
  if (!process.argv.includes(`server`)) {
172
- // Download and run the XAMPP installer
172
+ // Download and run the XAMPP installer (PHP 8.2)
173
173
  shellExec(
174
- `curl -Lo xampp-linux-installer.run https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/7.4.30/xampp-linux-x64-7.4.30-1-installer.run?from_af=true`,
174
+ `curl -Lo xampp-linux-installer.run https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.2.12/xampp-linux-x64-8.2.12-0-installer.run`,
175
175
  );
176
176
  shellExec(`sudo chmod +x xampp-linux-installer.run`);
177
177
  shellExec(
@@ -237,14 +237,37 @@ Listen ${port}
237
237
 
238
238
  <VirtualHost *:${port}>
239
239
  DocumentRoot "${documentRoot}"
240
- ServerName ${host}:${port}
240
+ ServerName ${host}
241
+ UseCanonicalName Off
242
+ ServerSignature Off
241
243
 
242
244
  <Directory "${documentRoot}">
243
- Options Indexes FollowSymLinks MultiViews
245
+ Options FollowSymLinks MultiViews
244
246
  AllowOverride All
245
247
  Require all granted
246
248
  </Directory>
247
249
 
250
+ # Block access to .git directories and files
251
+ RedirectMatch 404 /\\.git
252
+
253
+ # Block access to hidden dotfiles (.env, .htpasswd, etc.)
254
+ <FilesMatch "^\\.(env|htpasswd|htaccess\\.bak|DS_Store)">
255
+ Require all denied
256
+ </FilesMatch>
257
+
258
+ # Block access to sensitive engine files
259
+ <FilesMatch "(wp-config\\.php\\.bak|wp-config-sample\\.php|\\.sql|\\.sql\\.gz)$">
260
+ Require all denied
261
+ </FilesMatch>
262
+
263
+ # Security headers
264
+ <IfModule mod_headers.c>
265
+ Header always set X-Content-Type-Options "nosniff"
266
+ Header always set X-Frame-Options "SAMEORIGIN"
267
+ Header always set Referrer-Policy "strict-origin-when-cross-origin"
268
+ Header always unset X-Powered-By
269
+ </IfModule>
270
+
248
271
  ${
249
272
  redirect
250
273
  ? `
@@ -0,0 +1,68 @@
1
+ FROM rockylinux:9
2
+
3
+ # Update and install required packages
4
+ RUN dnf -y update && \
5
+ dnf -y install epel-release && \
6
+ dnf -y install --allowerasing \
7
+ bzip2 \
8
+ sudo \
9
+ curl \
10
+ unzip \
11
+ net-tools \
12
+ openssh-server \
13
+ nano \
14
+ vim-enhanced \
15
+ less \
16
+ openssl-devel \
17
+ wget \
18
+ git \
19
+ gnupg2 \
20
+ libnsl \
21
+ perl && \
22
+ dnf clean all
23
+
24
+ # --- Download and install XAMPP (PHP 8.2)
25
+ RUN curl -L -o /tmp/xampp-linux-installer.run "https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.2.12/xampp-linux-x64-8.2.12-0-installer.run" && \
26
+ chmod +x /tmp/xampp-linux-installer.run && \
27
+ bash -c "/tmp/xampp-linux-installer.run --mode unattended" && \
28
+ ln -sf /opt/lampp/lampp /usr/bin/lampp
29
+
30
+ # --- Create /xampp/htdocs (static root) and set permissions
31
+ RUN mkdir -p /opt/lampp/htdocs && \
32
+ chown -R root:root /opt/lampp/htdocs && \
33
+ chmod -R a+rX /opt/lampp/htdocs
34
+
35
+ # Add XAMPP binaries and /usr/local/bin to PATH for all shells
36
+ ENV PATH="/opt/lampp/bin:/usr/local/bin:${PATH}"
37
+ RUN echo 'export PATH="/opt/lampp/bin:/usr/local/bin:${PATH}"' > /etc/profile.d/lampp.sh
38
+
39
+ # Provide a no-op sendmail so WP plugins don't error on mail calls
40
+ RUN printf '#!/bin/sh\ncat > /dev/null\n' > /usr/sbin/sendmail && chmod +x /usr/sbin/sendmail
41
+
42
+ # Install WP-CLI
43
+ RUN curl -sL https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -o /usr/local/bin/wp && \
44
+ chmod +x /usr/local/bin/wp && \
45
+ wp --info --allow-root
46
+
47
+ # Install Node.js
48
+ RUN curl -fsSL https://rpm.nodesource.com/setup_24.x | bash -
49
+ RUN dnf install nodejs -y
50
+ RUN dnf clean all
51
+
52
+ # Verify Node.js and npm versions
53
+ RUN node --version
54
+ RUN npm --version
55
+
56
+ # Create non-root user for secure container execution (cron jobs, init containers)
57
+ # Deployment containers override to root via securityContext when npm install -g is needed
58
+ RUN useradd -m -u 1000 -s /bin/bash dd
59
+
60
+ # Set working directory
61
+ WORKDIR /home/dd
62
+
63
+ EXPOSE 22
64
+ EXPOSE 80
65
+ EXPOSE 443
66
+ EXPOSE 3000-3100
67
+ EXPOSE 4000-4100
68
+