underpost 2.8.871 → 2.8.873

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 (81) hide show
  1. package/.env.development +2 -1
  2. package/.env.production +2 -1
  3. package/.env.test +2 -1
  4. package/.github/workflows/ghpkg.ci.yml +1 -1
  5. package/.github/workflows/npmpkg.ci.yml +1 -1
  6. package/.github/workflows/pwa-microservices-template-page.cd.yml +1 -1
  7. package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
  8. package/.github/workflows/release.cd.yml +2 -2
  9. package/README.md +66 -36
  10. package/bin/build.js +4 -0
  11. package/bin/deploy.js +4 -0
  12. package/cli.md +88 -87
  13. package/conf.js +2 -1
  14. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  15. package/manifests/deployment/dd-test-development/deployment.yaml +138 -0
  16. package/manifests/deployment/dd-test-development/proxy.yaml +26 -0
  17. package/package.json +6 -3
  18. package/src/api/core/core.router.js +2 -1
  19. package/src/api/default/default.controller.js +6 -1
  20. package/src/api/default/default.router.js +6 -2
  21. package/src/api/default/default.service.js +10 -1
  22. package/src/api/file/file.router.js +2 -1
  23. package/src/api/test/test.router.js +1 -1
  24. package/src/api/user/postman_collection.json +216 -0
  25. package/src/api/user/user.controller.js +25 -60
  26. package/src/api/user/user.model.js +29 -7
  27. package/src/api/user/user.router.js +6 -3
  28. package/src/api/user/user.service.js +80 -32
  29. package/src/cli/baremetal.js +33 -3
  30. package/src/cli/cloud-init.js +11 -0
  31. package/src/cli/deploy.js +5 -2
  32. package/src/cli/index.js +1 -0
  33. package/src/cli/lxd.js +7 -0
  34. package/src/cli/repository.js +1 -0
  35. package/src/cli/run.js +18 -5
  36. package/src/cli/ssh.js +20 -6
  37. package/src/client/components/core/Account.js +2 -1
  38. package/src/client/components/core/AgGrid.js +30 -8
  39. package/src/client/components/core/Auth.js +98 -55
  40. package/src/client/components/core/CalendarCore.js +3 -4
  41. package/src/client/components/core/CommonJs.js +1 -2
  42. package/src/client/components/core/Content.js +2 -1
  43. package/src/client/components/core/Css.js +2 -1
  44. package/src/client/components/core/CssCore.js +2 -1
  45. package/src/client/components/core/Docs.js +4 -4
  46. package/src/client/components/core/FileExplorer.js +3 -3
  47. package/src/client/components/core/JoyStick.js +2 -2
  48. package/src/client/components/core/LoadingAnimation.js +2 -2
  49. package/src/client/components/core/LogIn.js +16 -23
  50. package/src/client/components/core/LogOut.js +5 -1
  51. package/src/client/components/core/Logger.js +4 -1
  52. package/src/client/components/core/Modal.js +17 -27
  53. package/src/client/components/core/ObjectLayerEngineModal.js +2 -1
  54. package/src/client/components/core/Pagination.js +207 -0
  55. package/src/client/components/core/Panel.js +3 -11
  56. package/src/client/components/core/PanelForm.js +6 -15
  57. package/src/client/components/core/Recover.js +2 -2
  58. package/src/client/components/core/Router.js +205 -33
  59. package/src/client/components/core/SignUp.js +1 -2
  60. package/src/client/components/core/Stream.js +1 -1
  61. package/src/client/components/core/VanillaJs.js +0 -83
  62. package/src/client/components/core/Worker.js +2 -2
  63. package/src/client/components/default/LogInDefault.js +0 -6
  64. package/src/client/components/default/LogOutDefault.js +0 -16
  65. package/src/client/components/default/MenuDefault.js +4 -3
  66. package/src/client/components/default/RoutesDefault.js +3 -2
  67. package/src/client/services/core/core.service.js +6 -2
  68. package/src/client/services/default/default.management.js +115 -18
  69. package/src/client/services/default/default.service.js +9 -4
  70. package/src/client/services/user/user.management.js +6 -0
  71. package/src/client/services/user/user.service.js +11 -4
  72. package/src/client/ssr/head/DefaultScripts.js +1 -0
  73. package/src/index.js +24 -2
  74. package/src/runtime/lampp/Lampp.js +89 -2
  75. package/src/runtime/xampp/Xampp.js +48 -1
  76. package/src/server/auth.js +518 -155
  77. package/src/server/conf.js +19 -1
  78. package/src/server/runtime.js +62 -221
  79. package/src/server/ssl.js +1 -2
  80. package/src/server/ssr.js +85 -0
  81. package/src/server/valkey.js +2 -1
package/.env.development CHANGED
@@ -3,7 +3,8 @@ DEFAULT_DEPLOY_ID=dd-default
3
3
  NODE_ENV=development
4
4
  PORT=4000
5
5
  JWT_SECRET=test
6
- EXPIRE=168
6
+ REFRESH_EXPIRE_MINUTES=5
7
+ ACCESS_EXPIRE_MINUTES=1440
7
8
  NODE_OPTIONS=--max-old-space-size=8192
8
9
  BASE_API=api
9
10
  DEFAULT_DEPLOY_HOST=default.net
package/.env.production CHANGED
@@ -3,7 +3,8 @@ DEFAULT_DEPLOY_ID=dd-default
3
3
  NODE_ENV=production
4
4
  PORT=3000
5
5
  JWT_SECRET=test
6
- EXPIRE=168
6
+ REFRESH_EXPIRE_MINUTES=5
7
+ ACCESS_EXPIRE_MINUTES=1440
7
8
  NODE_OPTIONS=--max-old-space-size=8192
8
9
  BASE_API=api
9
10
  DEFAULT_DEPLOY_HOST=default.net
package/.env.test CHANGED
@@ -3,7 +3,8 @@ DEFAULT_DEPLOY_ID=dd-default
3
3
  NODE_ENV=test
4
4
  PORT=5000
5
5
  JWT_SECRET=test
6
- EXPIRE=168
6
+ REFRESH_EXPIRE_MINUTES=5
7
+ ACCESS_EXPIRE_MINUTES=1440
7
8
  NODE_OPTIONS=--max-old-space-size=8192
8
9
  BASE_API=api
9
10
  DEFAULT_DEPLOY_HOST=default.net
@@ -14,7 +14,7 @@ jobs:
14
14
  name: Update github repo package Jobs
15
15
  runs-on: ubuntu-latest
16
16
  container:
17
- image: rockylinux/rockylinux:9
17
+ image: quay.io/rockylinux/rockylinux:9
18
18
  permissions:
19
19
  contents: write
20
20
  packages: write
@@ -14,7 +14,7 @@ jobs:
14
14
  name: Update npm repo package Jobs
15
15
  runs-on: ubuntu-latest
16
16
  container:
17
- image: rockylinux/rockylinux:9
17
+ image: quay.io/rockylinux/rockylinux:9
18
18
  permissions:
19
19
  contents: write
20
20
  packages: write
@@ -30,7 +30,7 @@ jobs:
30
30
  url: ${{ steps.deployment.outputs.page_url }}
31
31
  runs-on: ubuntu-latest
32
32
  container:
33
- image: rockylinux/rockylinux:9
33
+ image: quay.io/rockylinux/rockylinux:9
34
34
  steps:
35
35
  - name: Checkout
36
36
  uses: actions/checkout@v4
@@ -7,7 +7,7 @@ jobs:
7
7
  name: Template Test
8
8
  runs-on: ubuntu-latest
9
9
  container:
10
- image: rockylinux/rockylinux:9
10
+ image: quay.io/rockylinux/rockylinux:9
11
11
  options: --entrypoint /bin/bash
12
12
  steps:
13
13
  - name: Clone repository
@@ -2,7 +2,7 @@ name: CD | Release deployment | remote ssh
2
2
 
3
3
  on:
4
4
  workflow_run:
5
- workflows: ['CI | Publish npm package']
5
+ workflows: ["CI | Publish npm package"]
6
6
  types:
7
7
  - completed
8
8
 
@@ -34,4 +34,4 @@ jobs:
34
34
  node bin run --dev pull
35
35
  underpost run secret
36
36
  underpost run underpost-config
37
- underpost run release-deploy
37
+ underpost run ssh-deploy engine-test
package/README.md CHANGED
@@ -31,6 +31,21 @@
31
31
 
32
32
 
33
33
 
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
34
49
 
35
50
 
36
51
 
@@ -40,7 +55,7 @@
40
55
  <!-- badges -->
41
56
 
42
57
 
43
- [![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.871)](https://socket.dev/npm/package/underpost/overview/2.8.871) [![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)
58
+ [![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.873)](https://socket.dev/npm/package/underpost/overview/2.8.873) [![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)
44
59
 
45
60
 
46
61
  <!-- end-badges -->
@@ -60,6 +75,21 @@
60
75
 
61
76
 
62
77
 
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
63
93
 
64
94
 
65
95
 
@@ -110,44 +140,44 @@ Run dev client server
110
140
  npm run dev
111
141
  ```
112
142
  <!-- -->
113
- ## underpost ci/cd cli v2.8.871
143
+ ## underpost ci/cd cli v2.8.873
114
144
 
115
145
  ### Usage: `underpost [options] [command]`
116
-
117
- ```
118
- Options:
119
- -V, --version output the version number
120
- -h, --help display help for command
146
+ ```
147
+ Options:
148
+ -V, --version output the version number
149
+ -h, --help display help for command
121
150
 
122
151
  Commands:
123
- new [options] <app-name> Initializes a new Underpost project with a predefined structure.
124
- start [options] <deploy-id> [env] Initiates application servers, build pipelines, or other defined services based on the deployment ID.
125
- clone [options] <uri> Clones a specified GitHub repository into the current directory.
126
- pull [options] <path> <uri> Pulls the latest changes from a specified GitHub repository.
127
- cmt [options] <path> <commit-type> [module-tag] [message] Manages commits to a GitHub repository, supporting various commit types and options.
128
- push [options] <path> <uri> Pushes committed changes from a local repository to a remote GitHub repository.
129
- env <deploy-id> [env] Sets environment variables and configurations related to a specific deployment ID.
130
- config [options] <operator> [key] [value] Manages Underpost configurations using various operators.
131
- root Displays the root path of the npm installation.
132
- cluster [options] [pod-name] Manages Kubernetes clusters, defaulting to Kind cluster initialization.
133
- deploy [options] [deploy-list] [env] Manages application deployments, defaulting to deploying development pods.
134
- secret [options] <platform> Manages secrets for various platforms.
135
- dockerfile-image-build [options] Builds a Docker image from a specified Dockerfile with various options for naming, saving, and loading.
136
- dockerfile-pull-base-images [options] Pulls required Underpost Dockerfile base images and optionally loads them into clusters.
137
- install Quickly imports Underpost npm dependencies by copying them.
138
- db [options] <deploy-list> Manages database operations, including import, export, and collection management.
139
- metadata [options] [deploy-id] [host] [path] Manages cluster metadata operations, including import and export.
140
- script [options] <operator> <script-name> [script-value] Supports a variety of built-in Underpost global scripts, their preset lifecycle events, and arbitrary custom scripts.
141
- cron [options] [deploy-list] [job-list] Manages cron jobs, including initialization, execution, and configuration updates.
142
- fs [options] [path] Manages file storage, defaulting to file upload operations.
143
- test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
144
- monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
145
- ssh [options] Import and start ssh server and client based on current default deployment ID.
146
- run [options] <runner-id> [path] Runs a script from the specified path.
147
- lxd [options] Manages LXD containers and virtual machines.
148
- baremetal [options] [workflow-id] [hostname] [ip-address] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
149
- help [command] display help for command
150
-
152
+ new [options] <app-name> Initializes a new Underpost project with a predefined structure.
153
+ start [options] <deploy-id> [env] Initiates application servers, build pipelines, or other defined services based on the deployment ID.
154
+ clone [options] <uri> Clones a specified GitHub repository into the current directory.
155
+ pull [options] <path> <uri> Pulls the latest changes from a specified GitHub repository.
156
+ cmt [options] <path> <commit-type> [module-tag] [message] Manages commits to a GitHub repository, supporting various commit types and options.
157
+ push [options] <path> <uri> Pushes committed changes from a local repository to a remote GitHub repository.
158
+ env <deploy-id> [env] Sets environment variables and configurations related to a specific deployment ID.
159
+ config [options] <operator> [key] [value] Manages Underpost configurations using various operators.
160
+ root Displays the root path of the npm installation.
161
+ cluster [options] [pod-name] Manages Kubernetes clusters, defaulting to Kind cluster initialization.
162
+ deploy [options] [deploy-list] [env] Manages application deployments, defaulting to deploying development pods.
163
+ secret [options] <platform> Manages secrets for various platforms.
164
+ dockerfile-image-build [options] Builds a Docker image from a specified Dockerfile with various options for naming, saving, and loading.
165
+ dockerfile-pull-base-images [options] Pulls required Underpost Dockerfile base images and optionally loads them into clusters.
166
+ install Quickly imports Underpost npm dependencies by copying them.
167
+ db [options] <deploy-list> Manages database operations, including import, export, and collection management.
168
+ metadata [options] [deploy-id] [host] [path] Manages cluster metadata operations, including import and export.
169
+ script [options] <operator> <script-name> [script-value] Supports a variety of built-in Underpost global scripts, their preset lifecycle events, and arbitrary custom scripts.
170
+ cron [options] [deploy-list] [job-list] Manages cron jobs, including initialization, execution, and configuration updates.
171
+ fs [options] [path] Manages file storage, defaulting to file upload operations.
172
+ test [options] [deploy-list] Manages and runs tests, defaulting to the current Underpost default test suite.
173
+ monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
174
+ ssh [options] Import and start ssh server and client based on current default deployment ID.
175
+ run [options] <runner-id> [path] Runs a script from the specified path.
176
+ lxd [options] Manages LXD containers and virtual machines.
177
+ baremetal [options] [workflow-id] [hostname] [ip-address] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
178
+ help [command] display help for command
179
+
151
180
  ```
152
-
181
+
153
182
  <a target="_top" href="https://github.com/underpostnet/pwa-microservices-template/blob/master/cli.md">See complete CLI Docs here.</a>
183
+
package/bin/build.js CHANGED
@@ -191,6 +191,10 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
191
191
  fs.copyFileSync(`./.github/workflows/${repoName}.ci.yml`, `${basePath}/.github/workflows/${repoName}.ci.yml`);
192
192
  fs.copyFileSync(`./.github/workflows/${repoName}.cd.yml`, `${basePath}/.github/workflows/${repoName}.cd.yml`);
193
193
 
194
+ fs.copyFileSync(`./conf.${confName}.js`, `${basePath}/conf.js`);
195
+ fs.copyFileSync(`./manifests/deployment/${confName}-development/proxy.yaml`, `${basePath}/proxy.yaml`);
196
+ fs.copyFileSync(`./manifests/deployment/${confName}-development/deployment.yaml`, `${basePath}/deployment.yaml`);
197
+
194
198
  if (fs.existsSync(`./src/ws/${confName.split('-')[1]}`)) {
195
199
  fs.copySync(`./src/ws/${confName.split('-')[1]}`, `${basePath}/src/ws/${confName.split('-')[1]}`);
196
200
  }
package/bin/deploy.js CHANGED
@@ -372,6 +372,7 @@ try {
372
372
  shellExec(`node bin run kill 4002`);
373
373
  shellExec(`node bin run kill 4003`);
374
374
  shellExec(`npm run update-template`);
375
+ shellExec(`cd ../pwa-microservices-template && npm install`);
375
376
  shellExec(`cd ../pwa-microservices-template && npm run build && timeout 5s npm run dev`, {
376
377
  async: true,
377
378
  });
@@ -448,6 +449,9 @@ try {
448
449
  shellExec(
449
450
  `node bin deploy --kubeadm --build-manifest --sync --info-router --replicas 1 --node ${node} dd production`,
450
451
  );
452
+ shellExec(
453
+ `node bin deploy --kubeadm --build-manifest --sync --info-router --replicas 1 --node ${node} dd development `,
454
+ );
451
455
  for (const deployId of fs.readFileSync(`./engine-private/deploy/dd.router`, 'utf8').split(`,`)) {
452
456
  fs.copySync(
453
457
  `./engine-private/conf/${deployId}/build/development/deployment.yaml`,