@underpostnet/underpost 3.0.3 → 3.1.0

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 (82) hide show
  1. package/{.env.production → .env.example} +20 -2
  2. package/.github/workflows/ghpkg.ci.yml +1 -1
  3. package/.github/workflows/gitlab.ci.yml +1 -1
  4. package/.github/workflows/npmpkg.ci.yml +22 -7
  5. package/.github/workflows/publish.ci.yml +5 -5
  6. package/.github/workflows/pwa-microservices-template-page.cd.yml +3 -3
  7. package/.github/workflows/pwa-microservices-template-test.ci.yml +1 -1
  8. package/.github/workflows/release.cd.yml +3 -2
  9. package/.vscode/extensions.json +9 -8
  10. package/.vscode/settings.json +3 -2
  11. package/CHANGELOG.md +146 -1
  12. package/CLI-HELP.md +71 -52
  13. package/README.md +2 -2
  14. package/bin/build.js +4 -1
  15. package/bin/deploy.js +150 -208
  16. package/bin/file.js +2 -1
  17. package/bin/vs.js +3 -3
  18. package/conf.js +30 -13
  19. package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
  20. package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
  21. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  22. package/manifests/deployment/dd-test-development/deployment.yaml +52 -52
  23. package/manifests/deployment/dd-test-development/proxy.yaml +4 -4
  24. package/manifests/pv-pvc-dd.yaml +1 -1
  25. package/package.json +48 -43
  26. package/scripts/k3s-node-setup.sh +1 -1
  27. package/src/api/document/document.service.js +1 -1
  28. package/src/api/file/file.controller.js +3 -1
  29. package/src/api/file/file.service.js +28 -5
  30. package/src/api/user/user.router.js +10 -5
  31. package/src/api/user/user.service.js +7 -7
  32. package/src/cli/baremetal.js +6 -10
  33. package/src/cli/cloud-init.js +0 -3
  34. package/src/cli/db.js +54 -71
  35. package/src/cli/deploy.js +64 -12
  36. package/src/cli/env.js +4 -4
  37. package/src/cli/fs.js +0 -2
  38. package/src/cli/image.js +0 -3
  39. package/src/cli/index.js +27 -13
  40. package/src/cli/monitor.js +5 -6
  41. package/src/cli/repository.js +322 -35
  42. package/src/cli/run.js +118 -69
  43. package/src/cli/secrets.js +0 -3
  44. package/src/cli/ssh.js +1 -1
  45. package/src/client/components/core/AgGrid.js +20 -5
  46. package/src/client/components/core/Content.js +22 -3
  47. package/src/client/components/core/Docs.js +21 -4
  48. package/src/client/components/core/FileExplorer.js +71 -4
  49. package/src/client/components/core/Input.js +1 -1
  50. package/src/client/components/core/Modal.js +20 -6
  51. package/src/client/public/default/sitemap +3 -3
  52. package/src/client/public/test/sitemap +3 -3
  53. package/src/client.build.js +0 -3
  54. package/src/client.dev.js +0 -3
  55. package/src/db/DataBaseProvider.js +17 -2
  56. package/src/db/mariadb/MariaDB.js +14 -9
  57. package/src/db/mongo/MongooseDB.js +17 -1
  58. package/src/index.js +1 -1
  59. package/src/proxy.js +0 -3
  60. package/src/runtime/express/Express.js +7 -1
  61. package/src/runtime/lampp/Lampp.js +6 -13
  62. package/src/server/auth.js +6 -9
  63. package/src/server/backup.js +2 -3
  64. package/src/server/client-build-docs.js +178 -3
  65. package/src/server/client-build-live.js +9 -18
  66. package/src/server/client-build.js +175 -38
  67. package/src/server/client-dev-server.js +14 -13
  68. package/src/server/conf.js +357 -149
  69. package/src/server/cron.js +2 -1
  70. package/src/server/dns.js +28 -12
  71. package/src/server/downloader.js +0 -2
  72. package/src/server/logger.js +27 -9
  73. package/src/server/peer.js +0 -2
  74. package/src/server/process.js +1 -50
  75. package/src/server/proxy.js +4 -8
  76. package/src/server/runtime.js +5 -8
  77. package/src/server/ssr.js +0 -3
  78. package/src/server/start.js +5 -5
  79. package/src/server/tls.js +0 -2
  80. package/src/server.js +0 -4
  81. package/.env.development +0 -43
  82. package/.env.test +0 -43
package/CLI-HELP.md CHANGED
@@ -1,4 +1,4 @@
1
- ## underpost ci/cd cli v3.0.3
1
+ ## underpost ci/cd cli v3.1.0
2
2
 
3
3
  ### Usage: `underpost [options] [command]`
4
4
  ```
@@ -8,6 +8,7 @@
8
8
 
9
9
  Commands:
10
10
  new [options] [app-name] Initializes a new Underpost project, service, or configuration.
11
+ client [options] [deploy-id] [sub-conf] [host] [path] Builds client assets, single replicas, and/or syncs environment ports.
11
12
  start [options] <deploy-id> [env] Initiates application servers, build pipelines, or other defined services based on the deployment ID.
12
13
  clone [options] <uri> Clones a specified GitHub repository into the current directory.
13
14
  pull [options] <path> <uri> Pulls the latest changes from a specified GitHub repository.
@@ -62,6 +63,9 @@ Options:
62
63
  (pwa-microservices-template)
63
64
  --sync-conf Sync configuration to private repositories
64
65
  (requires --deploy-id)
66
+ --sync-start Sync start scripts in deploy ID package.json
67
+ with root package.json (use 'dd' as
68
+ --deploy-id to sync all dd.router)
65
69
  --purge Remove deploy ID conf and all related
66
70
  repositories (requires --deploy-id)
67
71
  --dev Sets the development cli context
@@ -73,6 +77,26 @@ Options:
73
77
  ```
74
78
 
75
79
 
80
+ ### `client` :
81
+ ```
82
+ Usage: underpost client [options] [deploy-id] [sub-conf] [host] [path]
83
+
84
+ Builds client assets, single replicas, and/or syncs environment ports.
85
+
86
+ Arguments:
87
+ deploy-id The deployment ID to build. (default: "dd-default")
88
+ sub-conf The sub-configuration for the build. (default: "")
89
+ host Comma-separated hosts to filter the build. (default: "")
90
+ path Comma-separated paths to filter the build. (default: "")
91
+
92
+ Options:
93
+ --sync-env-port Sync environment port assignments across all deploy IDs
94
+ --single-replica Build single replica folders instead of full client
95
+ -h, --help display help for command
96
+
97
+ ```
98
+
99
+
76
100
  ### `start` :
77
101
  ```
78
102
  Usage: underpost start [options] <deploy-id> [env]
@@ -110,7 +134,7 @@ Arguments:
110
134
 
111
135
  Options:
112
136
  --bare Performs a bare clone, downloading only the .git files.
113
- -g8 Uses the g8 repository extension for cloning.
137
+ --g8 Uses the g8 repository extension for cloning.
114
138
  -h, --help display help for command
115
139
 
116
140
  ```
@@ -128,7 +152,7 @@ Arguments:
128
152
  uri The URI of the GitHub repository (e.g., "username/repository").
129
153
 
130
154
  Options:
131
- -g8 Uses the g8 repository extension for pulling.
155
+ --g8 Uses the g8 repository extension for pulling.
132
156
  -h, --help display help for command
133
157
 
134
158
  ```
@@ -145,8 +169,8 @@ Arguments:
145
169
  path The absolute or relative directory path of
146
170
  the repository.
147
171
  commit-type The type of commit to perform. Options:
148
- feat, fix, docs, style, refactor, perf,
149
- ci, cd, infra, build, test, chore, revert,
172
+ feat, fix, docs, style, refactor, perf, ci,
173
+ cd, infra, build, test, chore, revert,
150
174
  backup.
151
175
  module-tag Optional: Sets a specific module tag for
152
176
  the commit.
@@ -160,8 +184,8 @@ Options:
160
184
  --empty Allows committing with empty files.
161
185
  --copy Copies the generated commit message to the
162
186
  clipboard.
163
- --info Displays information about available
164
- commit types.
187
+ --info Displays information about available commit
188
+ types.
165
189
  --diff Shows the current git diff changes.
166
190
  --edit Edit last commit.
167
191
  --deploy-id <deploy-id> Sets the deployment configuration ID for
@@ -171,8 +195,8 @@ Options:
171
195
  hashes of commits.
172
196
  --extension <extension> specific file extensions of commits.
173
197
  --changelog [latest-n] Print plain the changelog of the specified
174
- number of latest n commits, if no number
175
- is provided it will get the changelog to
198
+ number of latest n commits, if no number is
199
+ provided it will get the changelog to
176
200
  latest ci integration
177
201
  --changelog-build Builds a CHANGELOG.md file based on the
178
202
  commit history
@@ -181,6 +205,7 @@ Options:
181
205
  --changelog-no-hash Excludes commit hashes from the generated
182
206
  changelog entries (used with
183
207
  --changelog-build).
208
+ -b Shows the current Git branch name.
184
209
  -h, --help display help for command
185
210
 
186
211
  ```
@@ -198,7 +223,7 @@ Arguments:
198
223
 
199
224
  Options:
200
225
  -f Forces the push, overwriting the remote repository history.
201
- -g8 Uses the g8 repository extension for pushing.
226
+ --g8 Uses the g8 repository extension for pushing.
202
227
  -h, --help display help for command
203
228
 
204
229
  ```
@@ -282,11 +307,10 @@ Options:
282
307
  Manages Underpost configurations using various operators.
283
308
 
284
309
  Arguments:
285
- operator The configuration operation to perform. Options:
286
- set, delete, get, list, clean.
310
+ operator The configuration operation to perform. Options: set,
311
+ delete, get, list, clean.
287
312
  key Optional: The specific configuration key to manage.
288
- value Optional: The value to set for the configuration
289
- key.
313
+ value Optional: The value to set for the configuration key.
290
314
 
291
315
  Options:
292
316
  --plain Prints the configuration value in plain text.
@@ -295,8 +319,8 @@ Options:
295
319
  --deploy-id <deploy-id> Sets the deployment configuration ID for the
296
320
  operation context.
297
321
  --build Sets the build context for the operation.
298
- --copy Copies the configuration value to the clipboard
299
- (only for get operation).
322
+ --copy Copies the configuration value to the clipboard (only
323
+ for get operation).
300
324
  -h, --help display help for command
301
325
 
302
326
  ```
@@ -337,8 +361,8 @@ Options:
337
361
  --ban-egress-clear Clears all banned egress IP addresses.
338
362
  --ban-both-add Adds IP addresses to both banned ingress and egress
339
363
  lists.
340
- --ban-both-remove Removes IP addresses from both banned ingress and
341
- egress lists.
364
+ --ban-both-remove Removes IP addresses from both banned ingress and egress
365
+ lists.
342
366
  -h, --help display help for command
343
367
 
344
368
  ```
@@ -364,8 +388,8 @@ Options:
364
388
  --mongodb Initializes the cluster with a MongoDB
365
389
  statefulset.
366
390
  --mongo-db-host <host> Set custom mongo db host
367
- --postgresql Initializes the cluster with a
368
- PostgreSQL statefulset.
391
+ --postgresql Initializes the cluster with a PostgreSQL
392
+ statefulset.
369
393
  --mongodb4 Initializes the cluster with a MongoDB
370
394
  4.4 service.
371
395
  --valkey Initializes the cluster with a Valkey
@@ -380,10 +404,10 @@ Options:
380
404
  GPU base resources and environment
381
405
  settings.
382
406
  --ns-use <ns-name> Switches the current Kubernetes context
383
- to the specified namespace (creates if
384
- it doesn't exist).
385
- --kubeadm Initializes the cluster using kubeadm
386
- for control plane management.
407
+ to the specified namespace (creates if it
408
+ doesn't exist).
409
+ --kubeadm Initializes the cluster using kubeadm for
410
+ control plane management.
387
411
  --pod-network-cidr <cidr> Sets custom pod network CIDR for kubeadm
388
412
  cluster initialization (defaults to
389
413
  "192.168.0.0/16").
@@ -392,15 +416,15 @@ Options:
392
416
  to "localhost:6443").
393
417
  --grafana Initializes the cluster with a Grafana
394
418
  deployment.
395
- --prom [hosts] Initializes the cluster with a
396
- Prometheus Operator deployment and
397
- monitor scrap for specified hosts.
419
+ --prom [hosts] Initializes the cluster with a Prometheus
420
+ Operator deployment and monitor scrap for
421
+ specified hosts.
398
422
  --dev Initializes a development-specific
399
423
  cluster configuration.
400
424
  --list-pods Displays detailed information about all
401
425
  pods.
402
- --pull-image Sets an optional associated image to
403
- pull during initialization.
426
+ --pull-image Sets an optional associated image to pull
427
+ during initialization.
404
428
  --init-host Installs necessary Kubernetes node CLI
405
429
  tools (e.g., kind, kubeadm, docker,
406
430
  podman, helm).
@@ -414,8 +438,8 @@ Options:
414
438
  (Lightweight Kubernetes).
415
439
  --hosts <hosts> A comma-separated list of cluster
416
440
  hostnames or IP addresses.
417
- --remove-volume-host-paths Removes specified volume host paths
418
- after execution.
441
+ --remove-volume-host-paths Removes specified volume host paths after
442
+ execution.
419
443
  --namespace <namespace> Kubernetes namespace for cluster
420
444
  operations (defaults to "default").
421
445
  --replicas <replicas> Sets a custom number of replicas for
@@ -479,8 +503,8 @@ Options:
479
503
  --status Retrieves current network traffic data
480
504
  from resource deployments and the host
481
505
  machine network configuration.
482
- --kubeadm Enables the kubeadm context for
483
- deployment operations.
506
+ --kubeadm Enables the kubeadm context for deployment
507
+ operations.
484
508
  --etc-hosts Enables the etc-hosts context for
485
509
  deployment operations.
486
510
  --restore-hosts Restores default `/etc/hosts` entries.
@@ -533,8 +557,8 @@ clusters.
533
557
 
534
558
  Options:
535
559
  --build Builds a Docker image using Podman,
536
- optionally saves it as a tar archive,
537
- and loads it into a specified Kubernetes
560
+ optionally saves it as a tar archive, and
561
+ loads it into a specified Kubernetes
538
562
  cluster (Kind, Kubeadm, or K3s).
539
563
  --ls Lists all available Underpost Dockerfile
540
564
  images.
@@ -551,8 +575,8 @@ Options:
551
575
  "rockylinux9-underpost" image.
552
576
  --spec Get current cached list of container
553
577
  images used by all pods
554
- --namespace <namespace> Kubernetes namespace for image
555
- operations (defaults to "default").
578
+ --namespace <namespace> Kubernetes namespace for image operations
579
+ (defaults to "default").
556
580
  --kind Set kind cluster env image context
557
581
  management.
558
582
  --kubeadm Set kubeadm cluster env image context
@@ -561,8 +585,7 @@ Options:
561
585
  management.
562
586
  --node-name Set node name for kubeadm or k3s cluster
563
587
  env image context management.
564
- --reset Performs a build without using the
565
- cache.
588
+ --reset Performs a build without using the cache.
566
589
  --dev Use development mode.
567
590
  --pull-dockerhub <dockerhub-image> Sets a custom Docker Hub image for base
568
591
  image pulls.
@@ -790,32 +813,30 @@ services.
790
813
 
791
814
  Options:
792
815
  --deploy-id <deploy-id> Sets deploy id context for ssh operations.
793
- --generate Generates new ssh credential and stores it in
794
- current private keys file storage.
816
+ --generate Generates new ssh credential and stores it in current
817
+ private keys file storage.
795
818
  --user <user> Sets custom ssh user
796
819
  --password <password> Sets custom ssh password
797
820
  --host <host> Sets custom ssh host
798
821
  --port <port> Sets custom ssh port
799
822
  --filter <filter> Filters ssh user credentials from current private
800
823
  keys file storage.
801
- --groups <groups> Sets comma-separated ssh user groups for the ssh
802
- user credential.
824
+ --groups <groups> Sets comma-separated ssh user groups for the ssh user
825
+ credential.
803
826
  --user-add Adds a new ssh user credential to current private
804
827
  keys file storage.
805
828
  --user-remove Removes an existing ssh user credential from current
806
829
  private keys file storage.
807
830
  --user-ls Lists all ssh user credentials from current private
808
831
  keys file storage.
809
- --start Starts an SSH session with the specified
810
- credentials.
832
+ --start Starts an SSH session with the specified credentials.
811
833
  --reset Resets ssh configuration and deletes all stored
812
834
  credentials.
813
835
  --keys-list Lists all ssh keys from current private keys file
814
836
  storage.
815
837
  --hosts-list Lists all ssh hosts from current private keys file
816
838
  storage.
817
- --disable-password Disables password authentication for the SSH
818
- session.
839
+ --disable-password Disables password authentication for the SSH session.
819
840
  --key-test Tests the SSH key using ssh-keygen.
820
841
  --stop Stops the SSH service.
821
842
  --status Checks the status of the SSH service.
@@ -864,7 +885,6 @@ Options:
864
885
  --force Forces operation, overriding any warnings or conflicts.
865
886
  --tls Enables TLS for the runner execution.
866
887
  --reset Resets the runner state before execution.
867
- --terminal Enables terminal mode for interactive script execution.
868
888
  --dev-proxy-port-offset <port-offset> Sets a custom port offset for development proxy.
869
889
  --host-network Enables host network mode for the runner execution.
870
890
  --requests-memory <requests-memory> Requests memory limit for the runner execution.
@@ -931,8 +951,8 @@ Options:
931
951
  --delete-vm <vm-name> Stop and delete the specified VM.
932
952
  --init-vm <vm-name> Run k3s-node-setup.sh on the specified VM
933
953
  (use with --control or --worker).
934
- --info-vm <vm-name> Display full configuration and status for
935
- the specified VM.
954
+ --info-vm <vm-name> Display full configuration and status for the
955
+ specified VM.
936
956
  --test <vm-name> Run connectivity and health checks on the
937
957
  specified VM.
938
958
  --root-size <gb-size> Root disk size in GiB for --create-vm
@@ -947,8 +967,7 @@ Options:
947
967
  "k3s-control:80,443").
948
968
  --workflow-id <workflow-id> Workflow ID to execute via runWorkflow.
949
969
  --vm-id <vm-name> Target VM name for workflow execution.
950
- --deploy-id <deploy-id> Deployment ID context for workflow
951
- execution.
970
+ --deploy-id <deploy-id> Deployment ID context for workflow execution.
952
971
  --namespace <namespace> Kubernetes namespace context (defaults to
953
972
  "default").
954
973
  -h, --help display help for command
package/README.md CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  <div align="center">
18
18
 
19
- [![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.ci.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/3.0.3)](https://socket.dev/npm/package/underpost/overview/3.0.3) [![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)
19
+ [![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.ci.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/3.1.0)](https://socket.dev/npm/package/underpost/overview/3.1.0) [![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)
20
20
 
21
21
  </div>
22
22
 
@@ -60,7 +60,7 @@ npm run dev
60
60
 
61
61
  <a target="_top" href="https://www.nexodev.org/docs?cid=src">See Docs here.</a>
62
62
 
63
- ## underpost ci/cd cli v3.0.3
63
+ ## underpost ci/cd cli v3.1.0
64
64
 
65
65
  ### Usage: `underpost [options] [command]`
66
66
  ```
package/bin/build.js CHANGED
@@ -176,7 +176,8 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
176
176
  fs.writeFileSync(`${basePath}/bin/index.js`, fs.readFileSync(`./bin/cyberia.js`, 'utf8'), 'utf8');
177
177
  fs.copyFileSync(`./src/api/object-layer/README.md`, `${basePath}/README.md`);
178
178
  fs.copySync(`./hardhat`, `${basePath}/hardhat`);
179
- fs.copySync(`./hardhat/white-paper.md`, `${basePath}/white-paper.md`);
179
+ fs.copySync(`./hardhat/WHITE-PAPER.md`, `${basePath}/WHITE-PAPER.md`);
180
+ fs.copyFileSync(`./jsdoc.${confName}.json`, `${basePath}/jsdoc.json`);
180
181
  for (const path of [
181
182
  '/src/client/ssr/pages/CyberiaServerMetrics.js',
182
183
  '/src/server/object-layer.js',
@@ -184,6 +185,8 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
184
185
  '/src/server/shape-generator.js',
185
186
  '/src/server/semantic-layer-generator.js',
186
187
  '/test/shape-generator.test.js',
188
+ '/src/server/besu-genesis-generator.js',
189
+ '/.github/workflows/hardhat.ci.yml',
187
190
  ])
188
191
  fs.copySync(`.${path}`, `${basePath}${path}`);
189
192