underpost 2.8.85 → 2.8.87

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 (70) hide show
  1. package/.env.development +7 -2
  2. package/.env.production +7 -2
  3. package/.env.test +7 -2
  4. package/.github/workflows/pwa-microservices-template-page.cd.yml +1 -1
  5. package/.github/workflows/release.cd.yml +37 -0
  6. package/README.md +7 -24
  7. package/bin/build.js +1 -0
  8. package/bin/db.js +1 -3
  9. package/bin/deploy.js +43 -368
  10. package/bin/file.js +16 -3
  11. package/bin/util.js +1 -56
  12. package/cli.md +46 -21
  13. package/conf.js +3 -3
  14. package/manifests/deployment/{dd-template-development → dd-default-development}/deployment.yaml +16 -16
  15. package/manifests/deployment/{dd-template-development → dd-default-development}/proxy.yaml +3 -3
  16. package/manifests/deployment/mongo-express/deployment.yaml +12 -12
  17. package/manifests/grafana/deployment.yaml +57 -0
  18. package/manifests/grafana/kustomization.yaml +7 -0
  19. package/manifests/grafana/pvc.yaml +12 -0
  20. package/manifests/grafana/service.yaml +14 -0
  21. package/manifests/maas/nvim.sh +91 -0
  22. package/manifests/maas/ssh-cluster-info.sh +14 -0
  23. package/manifests/prometheus/deployment.yaml +82 -0
  24. package/package.json +3 -12
  25. package/src/api/file/file.service.js +28 -8
  26. package/src/api/user/user.router.js +31 -5
  27. package/src/api/user/user.service.js +11 -38
  28. package/src/cli/cluster.js +45 -25
  29. package/src/cli/cron.js +12 -45
  30. package/src/cli/db.js +149 -19
  31. package/src/cli/deploy.js +41 -110
  32. package/src/cli/fs.js +1 -0
  33. package/src/cli/index.js +24 -7
  34. package/src/cli/monitor.js +1 -4
  35. package/src/cli/repository.js +15 -6
  36. package/src/cli/run.js +94 -16
  37. package/src/client/Default.index.js +0 -2
  38. package/src/client/components/core/Account.js +6 -2
  39. package/src/client/components/core/Content.js +11 -7
  40. package/src/client/components/core/Css.js +5 -1
  41. package/src/client/components/core/CssCore.js +12 -0
  42. package/src/client/components/core/FullScreen.js +19 -28
  43. package/src/client/components/core/Input.js +7 -1
  44. package/src/client/components/core/LogIn.js +3 -0
  45. package/src/client/components/core/LogOut.js +1 -1
  46. package/src/client/components/core/Modal.js +32 -43
  47. package/src/client/components/core/ObjectLayerEngine.js +229 -4
  48. package/src/client/components/core/ObjectLayerEngineModal.js +441 -0
  49. package/src/client/components/core/Recover.js +5 -2
  50. package/src/client/components/core/Scroll.js +65 -120
  51. package/src/client/components/core/SignUp.js +1 -0
  52. package/src/client/components/core/ToggleSwitch.js +15 -1
  53. package/src/client/components/core/VanillaJs.js +48 -2
  54. package/src/client/components/default/MenuDefault.js +2 -2
  55. package/src/client/components/default/RoutesDefault.js +3 -3
  56. package/src/client/public/default/assets/mailer/api-user-default-avatar.png +0 -0
  57. package/src/index.js +1 -1
  58. package/src/mailer/MailerProvider.js +37 -0
  59. package/src/server/client-build-docs.js +1 -1
  60. package/src/server/client-build-live.js +1 -1
  61. package/src/server/client-build.js +4 -12
  62. package/src/server/client-dev-server.js +1 -1
  63. package/src/server/client-icons.js +6 -78
  64. package/src/server/conf.js +83 -408
  65. package/src/server/proxy.js +2 -3
  66. package/src/server/runtime.js +1 -2
  67. package/src/server/start.js +5 -5
  68. package/test/api.test.js +3 -2
  69. package/docker-compose.yml +0 -67
  70. package/prometheus.yml +0 -36
package/.env.development CHANGED
@@ -1,7 +1,12 @@
1
- DEPLOY_ID=dd-template
1
+ DEPLOY_ID=dd-default
2
+ DEFAULT_DEPLOY_ID=dd-default
2
3
  NODE_ENV=development
3
4
  PORT=4000
4
5
  JWT_SECRET=test
5
6
  EXPIRE=168
6
7
  NODE_OPTIONS=--max-old-space-size=8192
7
- BASE_API=api
8
+ BASE_API=api
9
+ DEFAULT_DEPLOY_HOST=default.net
10
+ DEFAULT_DEPLOY_PATH=/
11
+ DEFAULT_ADMIN_EMAIL=admin@default.net
12
+ DEFAULT_ADMIN_PASSWORD=changethis
package/.env.production CHANGED
@@ -1,7 +1,12 @@
1
- DEPLOY_ID=dd-template
1
+ DEPLOY_ID=dd-default
2
+ DEFAULT_DEPLOY_ID=dd-default
2
3
  NODE_ENV=production
3
4
  PORT=3000
4
5
  JWT_SECRET=test
5
6
  EXPIRE=168
6
7
  NODE_OPTIONS=--max-old-space-size=8192
7
- BASE_API=api
8
+ BASE_API=api
9
+ DEFAULT_DEPLOY_HOST=default.net
10
+ DEFAULT_DEPLOY_PATH=/
11
+ DEFAULT_ADMIN_EMAIL=admin@default.net
12
+ DEFAULT_ADMIN_PASSWORD=changethis
package/.env.test CHANGED
@@ -1,7 +1,12 @@
1
- DEPLOY_ID=dd-template
1
+ DEPLOY_ID=dd-default
2
+ DEFAULT_DEPLOY_ID=dd-default
2
3
  NODE_ENV=test
3
4
  PORT=5000
4
5
  JWT_SECRET=test
5
6
  EXPIRE=168
6
7
  NODE_OPTIONS=--max-old-space-size=8192
7
- BASE_API=api
8
+ BASE_API=api
9
+ DEFAULT_DEPLOY_HOST=default.net
10
+ DEFAULT_DEPLOY_PATH=/
11
+ DEFAULT_ADMIN_EMAIL=admin@default.net
12
+ DEFAULT_ADMIN_PASSWORD=changethis
@@ -54,7 +54,7 @@ jobs:
54
54
  npm install -g underpost
55
55
  npm install
56
56
  node bin/deploy update-default-conf ghpkg
57
- env-cmd -f .env.production node bin/deploy build-full-client github-pages underpostnet.github.io /pwa-microservices-template-ghpkg
57
+ env-cmd -f .env.production node bin/deploy build-full-client dd-github-pages underpostnet.github.io /pwa-microservices-template-ghpkg
58
58
  # git lfs install
59
59
  # git lfs track
60
60
  # git lfs ls-files
@@ -0,0 +1,37 @@
1
+ name: CD | Release deployment | remote ssh
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: ['CI | Publish npm package']
6
+ types:
7
+ - completed
8
+
9
+ jobs:
10
+ after-publish:
11
+ if: github.repository == 'underpostnet/pwa-microservices-template' || startsWith(github.event.head_commit.message, 'cd(ssh-release)')
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - name: Run remote deploy via SSH
15
+ uses: appleboy/ssh-action@v1.2.2
16
+ with:
17
+ # Remote host (secret)
18
+ host: ${{ secrets.SSH_HOST }}
19
+ # Remote user (secret)
20
+ username: ${{ secrets.SSH_USERNAME }}
21
+ # Private key (secret) — the PEM contents (not a path)
22
+ key: ${{ secrets.SSH_PRIV_KEY }}
23
+ # Remote port (optional)
24
+ port: ${{ secrets.SSH_PORT }}
25
+ # Optional: if your private key has a passphrase, add:
26
+ # passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
27
+ # Commands to run on the remote VM
28
+ script: |
29
+ set -e
30
+ echo "Starting remote release deploy"
31
+ cd /home/dd/engine
32
+ npm install -g underpost
33
+ underpost config set GITHUB_TOKEN ${{ secrets.GITHUB_TOKEN }}
34
+ node bin run --dev pull
35
+ underpost run secret
36
+ underpost run underpost-config
37
+ underpost run release-deploy
package/README.md CHANGED
@@ -1,16 +1,10 @@
1
1
  <p align="center">
2
- <img src="https://underpost.net/assets/splash/apple-touch-icon-precomposed.png" alt="underpost.net"/>
2
+ <img src="https://underpost.net/assets/splash/apple-touch-icon-precomposed.png" alt="underpost engine core server"/>
3
3
  </p>
4
4
 
5
5
  <div align="center">
6
6
 
7
- ### underpost.net
8
-
9
- </div>
10
-
11
- <div align="center">
12
-
13
- template
7
+ <h1>underpost</h1>
14
8
 
15
9
  </div>
16
10
 
@@ -35,12 +29,6 @@ template
35
29
 
36
30
 
37
31
 
38
-
39
-
40
-
41
-
42
-
43
-
44
32
 
45
33
 
46
34
 
@@ -51,7 +39,7 @@ template
51
39
  <!-- badges -->
52
40
 
53
41
 
54
- [![Node.js CI](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [![Test](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/coverall.yml) [![Downloads](https://img.shields.io/npm/dm/underpost.svg)](https://www.npmjs.com/package/underpost) [![Socket Badge](https://socket.dev/api/badge/npm/package/underpost/2.8.85)](https://socket.dev/npm/package/underpost/overview/2.8.85) [![Coverage Status](https://coveralls.io/repos/github/underpostnet/engine/badge.svg?branch=master)](https://coveralls.io/github/underpostnet/engine?branch=master) [![Version](https://img.shields.io/npm/v/underpost.svg)](https://www.npmjs.org/package/underpost) [![License](https://img.shields.io/npm/l/underpost.svg)](https://www.npmjs.com/package/underpost)
42
+ [![Node.js CI](https://github.com/underpostnet/engine/actions/workflows/docker-image.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/docker-image.yml) [![Test](https://github.com/underpostnet/engine/actions/workflows/coverall.ci.yml/badge.svg?branch=master)](https://github.com/underpostnet/engine/actions/workflows/coverall.yml) [![Downloads](https://img.shields.io/npm/dm/underpost.svg)](https://www.npmjs.com/package/underpost) [![Socket Badge](https://socket.dev/api/badge/npm/package/underpost/2.8.87)](https://socket.dev/npm/package/underpost/overview/2.8.87) [![Coverage Status](https://coveralls.io/repos/github/underpostnet/engine/badge.svg?branch=master)](https://coveralls.io/github/underpostnet/engine?branch=master) [![Version](https://img.shields.io/npm/v/underpost.svg)](https://www.npmjs.org/package/underpost) [![License](https://img.shields.io/npm/l/underpost.svg)](https://www.npmjs.com/package/underpost)
55
43
 
56
44
 
57
45
  <!-- end-badges -->
@@ -69,12 +57,6 @@ template
69
57
 
70
58
 
71
59
 
72
-
73
-
74
-
75
-
76
-
77
-
78
60
 
79
61
 
80
62
 
@@ -88,7 +70,7 @@ template
88
70
 
89
71
  #### Base template for pwa/api-rest projects.
90
72
 
91
- Develop, build, deploy, test, monitor, and manage multiple runtime applications on virtual machines or container instances.
73
+ <div style="font-size: 20px;"><em>End2end</em> continuous integration and continuous deployment cloud to applications federation tools. Develop, build, deploy, test, monitor, and manage multiple runtime applications on virtual machines or container instances.</div>
92
74
 
93
75
  </div>
94
76
 
@@ -126,7 +108,7 @@ Run dev client server
126
108
  npm run dev
127
109
  ```
128
110
  <!-- -->
129
- ## underpost ci/cd cli v2.8.85
111
+ ## underpost ci/cd cli v2.8.87
130
112
 
131
113
  ### Usage: `underpost [options] [command]`
132
114
  ```
@@ -135,7 +117,7 @@ npm run dev
135
117
  -h, --help display help for command
136
118
 
137
119
  Commands:
138
- new <app-name> Initializes a new Underpost project with a predefined structure.
120
+ new [options] <app-name> Initializes a new Underpost project with a predefined structure.
139
121
  start [options] <deploy-id> [env] Initiates application servers, build pipelines, or other defined services based on the deployment ID.
140
122
  clone [options] <uri> Clones a specified GitHub repository into the current directory.
141
123
  pull [options] <path> <uri> Pulls the latest changes from a specified GitHub repository.
@@ -151,6 +133,7 @@ Commands:
151
133
  dockerfile-pull-base-images [options] Pulls required Underpost Dockerfile base images and optionally loads them into clusters.
152
134
  install Quickly imports Underpost npm dependencies by copying them.
153
135
  db [options] <deploy-list> Manages database operations, including import, export, and collection management.
136
+ metadata [options] [deploy-id] [host] [path] Manages cluster metadata operations, including import and export.
154
137
  script [options] <operator> <script-name> [script-value] Supports a variety of built-in Underpost global scripts, their preset lifecycle events, and arbitrary custom scripts.
155
138
  cron [options] [deploy-list] [job-list] Manages cron jobs, including initialization, execution, and configuration updates.
156
139
  fs [options] [path] Manages file storage, defaulting to file upload operations.
package/bin/build.js CHANGED
@@ -156,6 +156,7 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
156
156
  switch (confName) {
157
157
  case 'dd-cyberia':
158
158
  fs.copyFileSync(`./bin/cyberia.js`, `${basePath}/bin/cyberia.js`);
159
+ fs.copyFileSync(`./bin/cyberia.js`, `${basePath}/bin/cyberia0.js`);
159
160
  break;
160
161
 
161
162
  default:
package/bin/db.js CHANGED
@@ -4,7 +4,7 @@ import { loggerFactory } from '../src/server/logger.js';
4
4
  import { MariaDB } from '../src/db/mariadb/MariaDB.js';
5
5
  import { Xampp } from '../src/runtime/xampp/Xampp.js';
6
6
  import { Lampp } from '../src/runtime/lampp/Lampp.js';
7
- import { getCapVariableName, getRestoreCronCmd, loadConf, splitFileFactory } from '../src/server/conf.js';
7
+ import { getCapVariableName, loadConf, splitFileFactory } from '../src/server/conf.js';
8
8
  import { DataBaseProvider } from '../src/db/DataBaseProvider.js';
9
9
  import { hashPassword } from '../src/server/auth.js';
10
10
 
@@ -104,7 +104,6 @@ try {
104
104
  }
105
105
  break;
106
106
  case 'import':
107
- shellExec(await getRestoreCronCmd({ host, path, conf: confServer, deployId }));
108
107
  break;
109
108
  case 'init-xampp-service':
110
109
  await Xampp.initService();
@@ -182,7 +181,6 @@ try {
182
181
  break;
183
182
  case 'import':
184
183
  // mongorestore -d <database_name> <directory_backup>
185
- shellExec(await getRestoreCronCmd({ host, path, conf: confServer, deployId }));
186
184
  break;
187
185
  case 'init-service':
188
186
  break;