underpost 3.1.2 → 3.2.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 (98) hide show
  1. package/.env.example +0 -2
  2. package/.github/workflows/ghpkg.ci.yml +4 -4
  3. package/.github/workflows/npmpkg.ci.yml +38 -7
  4. package/.github/workflows/pwa-microservices-template-page.cd.yml +3 -4
  5. package/.github/workflows/pwa-microservices-template-test.ci.yml +3 -3
  6. package/.github/workflows/release.cd.yml +4 -4
  7. package/CHANGELOG.md +365 -1
  8. package/CLI-HELP.md +55 -3
  9. package/README.md +7 -3
  10. package/bin/build.js +18 -12
  11. package/bin/deploy.js +205 -225
  12. package/bin/file.js +3 -0
  13. package/conf.js +4 -10
  14. package/jsdoc.json +1 -1
  15. package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +1 -1
  16. package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +1 -1
  17. package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
  18. package/manifests/deployment/dd-test-development/deployment.yaml +72 -50
  19. package/manifests/deployment/dd-test-development/proxy.yaml +13 -4
  20. package/manifests/deployment/playwright/deployment.yaml +1 -1
  21. package/nodemon.json +1 -1
  22. package/package.json +21 -14
  23. package/scripts/ports-ls.sh +2 -0
  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 +76 -242
  29. package/src/cli/deploy.js +104 -65
  30. package/src/cli/env.js +1 -0
  31. package/src/cli/fs.js +2 -1
  32. package/src/cli/index.js +50 -1
  33. package/src/cli/kubectl.js +211 -0
  34. package/src/cli/release.js +284 -0
  35. package/src/cli/repository.js +328 -112
  36. package/src/cli/run.js +283 -69
  37. package/src/cli/test.js +3 -3
  38. package/src/client/Default.index.js +3 -4
  39. package/src/client/components/core/Alert.js +2 -2
  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/Docs.js +9 -2
  43. package/src/client/components/core/DropDown.js +129 -17
  44. package/src/client/components/core/Keyboard.js +2 -2
  45. package/src/client/components/core/LogIn.js +2 -2
  46. package/src/client/components/core/LogOut.js +2 -2
  47. package/src/client/components/core/Modal.js +0 -1
  48. package/src/client/components/core/Panel.js +0 -1
  49. package/src/client/components/core/PanelForm.js +19 -19
  50. package/src/client/components/core/RichText.js +1 -2
  51. package/src/client/components/core/SocketIo.js +82 -29
  52. package/src/client/components/core/SocketIoHandler.js +75 -0
  53. package/src/client/components/core/Stream.js +143 -95
  54. package/src/client/components/core/Webhook.js +40 -7
  55. package/src/client/components/default/AppStoreDefault.js +5 -0
  56. package/src/client/components/default/LogInDefault.js +3 -3
  57. package/src/client/components/default/LogOutDefault.js +2 -2
  58. package/src/client/components/default/MenuDefault.js +5 -5
  59. package/src/client/components/default/SocketIoDefault.js +3 -51
  60. package/src/client/services/core/core.service.js +20 -8
  61. package/src/client/services/user/user.management.js +2 -2
  62. package/src/client/ssr/body/404.js +15 -11
  63. package/src/client/ssr/body/500.js +15 -11
  64. package/src/client/ssr/body/SwaggerDarkMode.js +285 -0
  65. package/src/client/ssr/offline/NoNetworkConnection.js +11 -10
  66. package/src/client/ssr/pages/Test.js +11 -10
  67. package/src/index.js +24 -1
  68. package/src/runtime/express/Express.js +26 -9
  69. package/src/runtime/lampp/Dockerfile +9 -2
  70. package/src/runtime/lampp/Lampp.js +4 -3
  71. package/src/runtime/wp/Dockerfile +64 -0
  72. package/src/runtime/wp/Wp.js +497 -0
  73. package/src/server/auth.js +30 -6
  74. package/src/server/backup.js +19 -1
  75. package/src/server/client-build-docs.js +51 -110
  76. package/src/server/client-build.js +55 -64
  77. package/src/server/client-formatted.js +109 -57
  78. package/src/server/conf.js +19 -15
  79. package/src/server/ipfs-client.js +24 -1
  80. package/src/server/peer.js +8 -0
  81. package/src/server/runtime.js +25 -1
  82. package/src/server/start.js +21 -8
  83. package/src/ws/IoInterface.js +1 -10
  84. package/src/ws/IoServer.js +14 -33
  85. package/src/ws/core/channels/core.ws.chat.js +65 -20
  86. package/src/ws/core/channels/core.ws.mailer.js +113 -32
  87. package/src/ws/core/channels/core.ws.stream.js +90 -31
  88. package/src/ws/core/core.ws.connection.js +12 -33
  89. package/src/ws/core/core.ws.emit.js +10 -26
  90. package/src/ws/core/core.ws.server.js +25 -58
  91. package/src/ws/default/channels/default.ws.main.js +53 -12
  92. package/src/ws/default/default.ws.connection.js +26 -13
  93. package/src/ws/default/default.ws.server.js +30 -12
  94. package/src/client/components/default/ElementsDefault.js +0 -38
  95. package/src/ws/core/management/core.ws.chat.js +0 -8
  96. package/src/ws/core/management/core.ws.mailer.js +0 -16
  97. package/src/ws/core/management/core.ws.stream.js +0 -8
  98. package/src/ws/default/management/default.ws.main.js +0 -8
package/CLI-HELP.md CHANGED
@@ -1,4 +1,4 @@
1
- ## underpost ci/cd cli v3.1.2
1
+ ## underpost ci/cd cli v3.2.0
2
2
 
3
3
  ### Usage: `underpost [options] [command]`
4
4
  ```
@@ -34,6 +34,7 @@ Commands:
34
34
  run [options] <runner-id> [path] Runs specified scripts using various runners.
35
35
  lxd [options] Manages LXD virtual machines as K3s nodes (control plane or workers).
36
36
  baremetal [options] [workflow-id] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
37
+ release [options] [version] Release orchestrator for building new versions and deploying releases of the Underpost CLI.
37
38
  help [command] display help for command
38
39
 
39
40
  ```
@@ -92,6 +93,9 @@ Arguments:
92
93
  Options:
93
94
  --sync-env-port Sync environment port assignments across all deploy IDs
94
95
  --single-replica Build single replica folders instead of full client
96
+ --build-zip Create zip files of the builds
97
+ --lite-build Skip full build (default is full build)
98
+ --icons-build Build icons
95
99
  -h, --help display help for command
96
100
 
97
101
  ```
@@ -118,6 +122,8 @@ Options:
118
122
  process.
119
123
  --underpost-quickly-install Uses Underpost Quickly Install for dependency
120
124
  installation.
125
+ --skip-pull-base Skips cloning repositories, uses current
126
+ workspace code directly.
121
127
  -h, --help display help for command
122
128
 
123
129
  ```
@@ -178,7 +184,7 @@ Arguments:
178
184
  message for the commit.
179
185
 
180
186
  Options:
181
- --log <latest-n> Shows commit history from the specified
187
+ --log [latest-n] Shows commit history from the specified
182
188
  number of latest n path commits.
183
189
  --last-msg <latest-n> Displays the last n commit message.
184
190
  --empty Allows committing with empty files.
@@ -205,7 +211,14 @@ Options:
205
211
  --changelog-no-hash Excludes commit hashes from the generated
206
212
  changelog entries (used with
207
213
  --changelog-build).
214
+ --unpush With --log, automatically sets range to
215
+ unpushed commits ahead of remote.
208
216
  -b Shows the current Git branch name.
217
+ -p [branch] Shows the reflog for the specified branch.
218
+ --bc <commit-hash> Shows branches that contain the specified
219
+ commit.
220
+ --is-remote-repo <url-repo> Checks whether a remote Git repository URL
221
+ is reachable. Prints true or false.
209
222
  -h, --help display help for command
210
223
 
211
224
  ```
@@ -505,6 +518,12 @@ Options:
505
518
  machine network configuration.
506
519
  --kubeadm Enables the kubeadm context for deployment
507
520
  operations.
521
+ --k3s Enables the k3s context for deployment
522
+ operations.
523
+ --kind Enables the kind context for deployment
524
+ operations.
525
+ --git-clean Runs git clean on volume mount paths
526
+ before copying.
508
527
  --etc-hosts Enables the etc-hosts context for
509
528
  deployment operations.
510
529
  --restore-hosts Restores default `/etc/hosts` entries.
@@ -854,7 +873,7 @@ Options:
854
873
  Runs specified scripts using various runners.
855
874
 
856
875
  Arguments:
857
- runner-id The runner ID to run. Options: dev-cluster,ipfs-expose,metadata,svc-ls,svc-rm,ssh-deploy-info,dev-hosts-expose,dev-hosts-restore,cluster-build,template-deploy,template-deploy-image,clean,pull,release-deploy,ssh-deploy,ide,crypto-policy,sync,stop,ssh-deploy-stop,ssh-deploy-db-rollback,ssh-deploy-db,ssh-deploy-db-status,tz,get-proxy,instance-promote,instance,ls-deployments,host-update,dd-container,ip-info,db-client,git-conf,promote,metrics,cluster,deploy,disk-clean,disk-devices,disk-usage,dev,service,etc-hosts,sh,log,ps,ptls,deploy-test,tf-vae-test,spark-template,rmi,kill,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job.
876
+ runner-id The runner ID to run. Options: dev-cluster,ipfs-expose,metadata,svc-ls,svc-rm,ssh-deploy-info,dev-hosts-expose,dev-hosts-restore,cluster-build,template-deploy,template-deploy-local,template-deploy-image,docker-image,clean,pull,release-deploy,ssh-deploy,ide,crypto-policy,sync,stop,ssh-deploy-stop,ssh-deploy-db-rollback,ssh-deploy-db,ssh-deploy-db-status,tz,get-proxy,instance-promote,instance,ls-deployments,host-update,dd-container,ip-info,db-client,git-conf,promote,metrics,cluster,deploy,disk-clean,disk-devices,disk-usage,dev,service,etc-hosts,sh,log,ps,pid-info,background,ports,deploy-test,tf-vae-test,spark-template,rmi,kill,generate-pass,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job.
858
877
  path The input value, identifier, or path for the operation.
859
878
 
860
879
  Options:
@@ -901,6 +920,7 @@ Options:
901
920
  --kubeadm Sets the kubeadm cluster context for the runner execution.
902
921
  --k3s Sets the k3s cluster context for the runner execution.
903
922
  --kind Sets the kind cluster context for the runner execution.
923
+ --git-clean Runs git clean on volume mount paths before copying.
904
924
  --log-type <log-type> Sets the log type for the runner execution.
905
925
  --deploy-id <deploy-id> Sets deploy id context for the runner execution.
906
926
  --user <user> Sets user context for the runner execution.
@@ -918,8 +938,10 @@ Options:
918
938
  --monitor-status-delta-ms <milliseconds> Sets the polling interval in milliseconds for status monitoring (default: 1000).
919
939
  --monitor-status-max-attempts <attempts> Sets the maximum number of status check attempts (default: 600).
920
940
  --dry-run Preview operations without executing them.
941
+ --from-n-commit <n> Number of commits back to use for message propagation in template-deploy (default: 1, last commit only).
921
942
  --create-job-now After applying cron manifests, immediately create a Job from each CronJob (forwarded to cron runner).
922
943
  --host-aliases <host-aliases> Adds entries to the Pod /etc/hosts via hostAliases. Format: semicolon-separated entries of "ip=hostname1,hostname2" (e.g., "127.0.0.1=foo.local,bar.local;10.1.2.3=foo.remote,bar.remote").
944
+ --copy Copies the runner output to the clipboard (supported by: generate-pass, template-deploy-local).
923
945
  -h, --help display help for command
924
946
 
925
947
  ```
@@ -1032,4 +1054,34 @@ Options:
1032
1054
  -h, --help display help for command
1033
1055
 
1034
1056
  ```
1057
+
1058
+
1059
+ ### `release` :
1060
+ ```
1061
+ Usage: underpost release [options] [version]
1062
+
1063
+ Release orchestrator for building new versions and deploying releases of the
1064
+ Underpost CLI.
1065
+
1066
+ Arguments:
1067
+ version The new version string to set (e.g., "3.1.4"). Defaults
1068
+ to current version.
1069
+
1070
+ Options:
1071
+ --build Builds a new version: tests template, bumps versions,
1072
+ rebuilds manifests and configs.
1073
+ --deploy Deploys the release: syncs secrets, commits, and pushes
1074
+ to remote repositories.
1075
+ --ci-push <deploy-id> Local equivalent of engine-*.ci.yml: builds
1076
+ dd-{deploy-id} and pushes to the engine-{deploy-id}
1077
+ repository. Accepts the suffix (e.g., "cyberia"),
1078
+ "dd-cyberia", or "engine-cyberia".
1079
+ --message <message> Commit message for --ci-push or --pwa-build (defaults
1080
+ to last commit of the engine repository).
1081
+ --pwa-build Runs the pwa-microservices-template update flow: always
1082
+ re-clones, syncs engine sources, installs, builds, and
1083
+ pushes.
1084
+ -h, --help display help for command
1085
+
1086
+ ```
1035
1087
 
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.ci.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.2)](https://socket.dev/npm/package/underpost/overview/3.1.2) [![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.ci.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.2.0)](https://socket.dev/npm/package/underpost/overview/3.2.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,8 @@ 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.1.2
63
+ <!-- cli-index-start -->
64
+ ## underpost ci/cd cli v3.2.0
64
65
 
65
66
  ### Usage: `underpost [options] [command]`
66
67
  ```
@@ -70,6 +71,7 @@ npm run dev
70
71
 
71
72
  Commands:
72
73
  new [options] [app-name] Initializes a new Underpost project, service, or configuration.
74
+ client [options] [deploy-id] [sub-conf] [host] [path] Builds client assets, single replicas, and/or syncs environment ports.
73
75
  start [options] <deploy-id> [env] Initiates application servers, build pipelines, or other defined services based on the deployment ID.
74
76
  clone [options] <uri> Clones a specified GitHub repository into the current directory.
75
77
  pull [options] <path> <uri> Pulls the latest changes from a specified GitHub repository.
@@ -93,10 +95,12 @@ Commands:
93
95
  monitor [options] <deploy-id> [env] Manages health server monitoring for specified deployments.
94
96
  ssh [options] Manages SSH credentials and sessions for remote access to cluster nodes or services.
95
97
  run [options] <runner-id> [path] Runs specified scripts using various runners.
96
- lxd [options] Manages LXD containers and virtual machines.
98
+ lxd [options] Manages LXD virtual machines as K3s nodes (control plane or workers).
97
99
  baremetal [options] [workflow-id] Manages baremetal server operations, including installation, database setup, commissioning, and user management.
100
+ release [options] [version] Release orchestrator for building new versions and deploying releases of the Underpost CLI.
98
101
  help [command] display help for command
99
102
 
100
103
  ```
104
+ <!-- cli-index-end -->
101
105
 
102
106
  <a target="_top" href="https://github.com/underpostnet/pwa-microservices-template/blob/master/CLI-HELP.md">See CLI Docs here.</a>
package/bin/build.js CHANGED
@@ -169,21 +169,22 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
169
169
  packageJson.description = 'Cyberia Engine - Object Layer and Assets Management Microservice';
170
170
  const { CyberiaDependencies } = await import(`../src/client/components/cyberia-portal/CommonCyberiaPortal.js`);
171
171
  packageJson.dependencies = {
172
- ...packageJson.dependencies,
172
+ ...originPackageJson.dependencies,
173
173
  ...CyberiaDependencies,
174
174
  };
175
- packageJson.overrides = originPackageJson.overrides;
176
175
  fs.writeFileSync(`${basePath}/bin/index.js`, fs.readFileSync(`./bin/cyberia.js`, 'utf8'), 'utf8');
177
176
  fs.copyFileSync(`./src/api/object-layer/README.md`, `${basePath}/README.md`);
178
177
  fs.copySync(`./hardhat`, `${basePath}/hardhat`);
179
178
  fs.copySync(`./hardhat/WHITE-PAPER.md`, `${basePath}/WHITE-PAPER.md`);
180
- fs.copyFileSync(`./jsdoc.${confName}.json`, `${basePath}/jsdoc.json`);
181
179
  for (const path of [
180
+ '/src/grpc/cyberia',
182
181
  '/src/client/ssr/pages/CyberiaServerMetrics.js',
183
182
  '/src/server/object-layer.js',
184
183
  '/src/server/atlas-sprite-sheet-generator.js',
185
184
  '/src/server/shape-generator.js',
186
185
  '/src/server/semantic-layer-generator.js',
186
+ '/src/server/semantic-layer-generator-floor.js',
187
+ '/src/server/semantic-layer-generator-skin.js',
187
188
  '/test/shape-generator.test.js',
188
189
  '/src/server/besu-genesis-generator.js',
189
190
  '/.github/workflows/hardhat.ci.yml',
@@ -203,25 +204,30 @@ const { DefaultConf } = await import(`../conf.${confName}.js`);
203
204
  fs.copySync(`./src/cli`, `${basePath}/src/cli`);
204
205
  if (!fs.existsSync(`${basePath}/images`)) fs.mkdirSync(`${basePath}/images`);
205
206
 
206
- const env = process.argv.includes('development') ? 'development' : 'production';
207
- const deploymentsFiles = ['proxy.yaml', 'deployment.yaml', 'secret.yaml'];
208
- // remove engine-private of .dockerignore for local testing
209
- for (const file of deploymentsFiles) {
210
- if (fs.existsSync(`./manifests/deployment/${confName}-${env}/${file}`)) {
211
- fs.copyFileSync(`./manifests/deployment/${confName}-${env}/${file}`, `${basePath}/${file}`);
212
- }
213
- }
214
-
215
207
  fs.copyFileSync(`./.github/workflows/${repoName}.ci.yml`, `${basePath}/.github/workflows/${repoName}.ci.yml`);
216
208
  fs.copyFileSync(`./.github/workflows/${repoName}.cd.yml`, `${basePath}/.github/workflows/${repoName}.cd.yml`);
217
209
 
210
+ if (fs.existsSync(`./jsdoc.${confName}.json`)) {
211
+ fs.copyFileSync(`./jsdoc.${confName}.json`, `${basePath}/jsdoc.json`);
212
+ fs.copyFileSync(`./jsdoc.${confName}.json`, `${basePath}/jsdoc.${confName}.json`);
213
+ }
214
+
215
+ if (fs.existsSync(`./manifests/deployment/${confName}-development`))
216
+ fs.copySync(
217
+ `./manifests/deployment/${confName}-development`,
218
+ `${basePath}/manifests/deployment/${confName}-development`,
219
+ );
220
+
218
221
  // Copy conf.<deploy-id>.js to conf.js for the respective deployment
219
222
  fs.copyFileSync(`./conf.${confName}.js`, `${basePath}/conf.js`);
220
223
  fs.copyFileSync(`./manifests/deployment/${confName}-development/proxy.yaml`, `${basePath}/proxy.yaml`);
221
224
  fs.copyFileSync(`./manifests/deployment/${confName}-development/deployment.yaml`, `${basePath}/deployment.yaml`);
225
+ const pvPvcPath = `./manifests/deployment/${confName}-development/pv-pvc.yaml`;
226
+ if (fs.existsSync(pvPvcPath)) fs.copyFileSync(pvPvcPath, `${basePath}/pv-pvc.yaml`);
222
227
 
223
228
  if (fs.existsSync(`./src/ws/${confName.split('-')[1]}`)) {
224
229
  fs.copySync(`./src/ws/${confName.split('-')[1]}`, `${basePath}/src/ws/${confName.split('-')[1]}`);
225
230
  }
231
+ fs.copyFileSync(`.gitignore`, `${basePath}/.gitignore`);
226
232
  shellExec(`cd ${basePath} && npm install --ignore-scripts`);
227
233
  }