underpost 3.1.2 → 3.1.3

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.
@@ -10,6 +10,14 @@ on:
10
10
  description: 'Changelog message for the build'
11
11
  required: false
12
12
  default: ''
13
+ deploy_conf_id:
14
+ description: 'Engine conf ID to dispatch after build (e.g., engine-core, engine-cyberia)'
15
+ required: false
16
+ default: ''
17
+ deploy_type:
18
+ description: 'Deployment type for the engine conf CD (sync-and-deploy or init)'
19
+ required: false
20
+ default: ''
13
21
  permissions:
14
22
  contents: write
15
23
  packages: write
@@ -83,5 +91,11 @@ jobs:
83
91
  git add .
84
92
  git config user.name 'underpostnet'
85
93
  git config user.email 'fcoverdugoa@underpost.net'
86
- underpost cmt . ci package-pwa-microservices-template-ghpkg "$LAST_COMMIT_MESSAGE"
94
+ COMMIT_MSG="$LAST_COMMIT_MESSAGE"
95
+ DEPLOY_CONF_ID="${{ github.event.inputs.deploy_conf_id }}"
96
+ DEPLOY_TYPE="${{ github.event.inputs.deploy_type }}"
97
+ if [ -n "$DEPLOY_CONF_ID" ] && [ -n "$DEPLOY_TYPE" ]; then
98
+ COMMIT_MSG=$(printf '%s\n[cd:%s:%s]' "$COMMIT_MSG" "$DEPLOY_CONF_ID" "$DEPLOY_TYPE")
99
+ fi
100
+ underpost cmt . ci package-pwa-microservices-template-ghpkg "$COMMIT_MSG"
87
101
  underpost push . underpostnet/pwa-microservices-template
package/CHANGELOG.md CHANGED
@@ -1,6 +1,47 @@
1
1
  # Changelog
2
2
 
3
- ## 2026-03-15
3
+ ## 2026-03-17
4
+
5
+ ### cli-run
6
+
7
+ - feat: Add 'pid-info' and 'background' methods to enhance process management in CLI ([30afedf4d](https://github.com/underpostnet/engine/commit/30afedf4d17aca20d91f5ad065d979bd42951741))
8
+
9
+ ### server-start
10
+
11
+ - feat: Add option to skip pulling base code in build process and update configuration for error handling ([3f8d7b09b](https://github.com/underpostnet/engine/commit/3f8d7b09b70270de9b0213b74d9683aad125d732))
12
+
13
+ ### github-actions
14
+
15
+ - feat: Update CI workflows to improve commit message handling and deployment conditions ([2a4884a1e](https://github.com/underpostnet/engine/commit/2a4884a1e3cbf04eeb4999b1ff38e2c8b4cf41cc))
16
+ - feat: Add deploy_type option to CI workflows and enhance changelog message propagation ([d222753ec](https://github.com/underpostnet/engine/commit/d222753ec66cbb1ce3cccc54d7eebea3f144e8b8))
17
+
18
+ ### docs
19
+
20
+ - feat: Update changelog, CLI help, and documentation with new commands and options ([124c8b2af](https://github.com/underpostnet/engine/commit/124c8b2aff6aae21b57abeca66281cdfba3aaaf8))
21
+ - feat: Update CLI documentation and enhance README with versioning and command index ([e6eb668d4](https://github.com/underpostnet/engine/commit/e6eb668d4007dc828f1b946c36ea369aaea6e2d4))
22
+ - feat: Enhance documentation configuration and remove obsolete options in build processes ([3437e1488](https://github.com/underpostnet/engine/commit/3437e14884d54202c8a0bbdcef47edfa03528fb7))
23
+
24
+ ### client-underpost
25
+
26
+ - feat: Refactor styles in RichText and CssUnderpost components for improved typography ([ee1d12335](https://github.com/underpostnet/engine/commit/ee1d123354afb0826ef5f942a07feeeb6eb40c7b))
27
+
28
+ ### client-core
29
+
30
+ - feat: Update links to open in the top frame and enhance iframe sandboxing ([8ec50df8d](https://github.com/underpostnet/engine/commit/8ec50df8d2eaaf210254930351a783c1d4409d5d))
31
+
32
+ ### cli-client
33
+
34
+ - feat: Add sync-conf command and enhance build options for client assets ([ad8b96242](https://github.com/underpostnet/engine/commit/ad8b96242431b9a23b3cf3b4345294938552784f))
35
+
36
+ ### swagger
37
+
38
+ - fix: update security middleware to ensure correct CSP headers for Swagger UI ([ef7dd5243](https://github.com/underpostnet/engine/commit/ef7dd52434191f4f910a7192007ebca5af16932b))
39
+
40
+ ### scripts
41
+
42
+ - Add missing package installation command in ports-ls.sh ([e13253366](https://github.com/underpostnet/engine/commit/e13253366f5dfd029f2a12e031b5f995efb269ac))
43
+
44
+ ## New release v:3.1.2 (2026-03-15)
4
45
 
5
46
  ### cli-run
6
47
 
package/CLI-HELP.md CHANGED
@@ -1,4 +1,4 @@
1
- ## underpost ci/cd cli v3.1.2
1
+ ## underpost ci/cd cli v3.1.3
2
2
 
3
3
  ### Usage: `underpost [options] [command]`
4
4
  ```
@@ -92,6 +92,9 @@ Arguments:
92
92
  Options:
93
93
  --sync-env-port Sync environment port assignments across all deploy IDs
94
94
  --single-replica Build single replica folders instead of full client
95
+ --build-zip Create zip files of the builds
96
+ --lite-build Skip full build (default is full build)
97
+ --icons-build Build icons
95
98
  -h, --help display help for command
96
99
 
97
100
  ```
@@ -118,6 +121,8 @@ Options:
118
121
  process.
119
122
  --underpost-quickly-install Uses Underpost Quickly Install for dependency
120
123
  installation.
124
+ --skip-pull-base Skips cloning repositories, uses current
125
+ workspace code directly.
121
126
  -h, --help display help for command
122
127
 
123
128
  ```
@@ -854,7 +859,7 @@ Options:
854
859
  Runs specified scripts using various runners.
855
860
 
856
861
  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.
862
+ 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,pid-info,background,ports,deploy-test,tf-vae-test,spark-template,rmi,kill,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job.
858
863
  path The input value, identifier, or path for the operation.
859
864
 
860
865
  Options:
@@ -918,6 +923,7 @@ Options:
918
923
  --monitor-status-delta-ms <milliseconds> Sets the polling interval in milliseconds for status monitoring (default: 1000).
919
924
  --monitor-status-max-attempts <attempts> Sets the maximum number of status check attempts (default: 600).
920
925
  --dry-run Preview operations without executing them.
926
+ --from-n-commit <n> Number of commits back to use for message propagation in template-deploy (default: 1, last commit only).
921
927
  --create-job-now After applying cron manifests, immediately create a Job from each CronJob (forwarded to cron runner).
922
928
  --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").
923
929
  -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.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.1.3)](https://socket.dev/npm/package/underpost/overview/3.1.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)
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.1.3
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,11 @@ 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.
98
100
  help [command] display help for command
99
101
 
100
102
  ```
103
+ <!-- cli-index-end -->
101
104
 
102
105
  <a target="_top" href="https://github.com/underpostnet/pwa-microservices-template/blob/master/CLI-HELP.md">See CLI Docs here.</a>
package/bin/deploy.js CHANGED
@@ -187,6 +187,7 @@ try {
187
187
  const deployPackage = JSON.parse(fs.readFileSync(filePah, 'utf8'));
188
188
  deployPackage.dependencies = originPackage.dependencies;
189
189
  deployPackage.devDependencies = originPackage.devDependencies;
190
+ deployPackage.overrides = originPackage.overrides;
190
191
  fs.writeFileSync(filePah, JSON.stringify(deployPackage, null, 4), 'utf8');
191
192
  }
192
193
  }
@@ -708,71 +709,6 @@ nvidia/gpu-operator \
708
709
  break;
709
710
  }
710
711
 
711
- case 'udpate-version-files': {
712
- const oldNpmVersion = process.argv[3];
713
- const oldNodeVersion = process.argv[4];
714
- const oldNodeMajorVersion = oldNodeVersion.split('.')[0];
715
- const nodeVersion = shellExec(`node --version`, { stdout: true }).trim().replace('v', '');
716
- const newNodeMajorVersion = nodeVersion.split('.')[0];
717
- const npmVersion = shellExec(`npm --version`, { stdout: true }).trim();
718
-
719
- fs.writeFileSync(
720
- `README.md`,
721
- fs
722
- .readFileSync(`README.md`, 'utf8')
723
- .replaceAll(oldNodeVersion, nodeVersion)
724
- .replaceAll(oldNpmVersion, npmVersion),
725
- );
726
- fs.writeFileSync(
727
- `src/client/public/nexodev/docs/references/Getting started.md`,
728
- fs
729
- .readFileSync(`src/client/public/nexodev/docs/references/Getting started.md`, 'utf8')
730
- .replaceAll(oldNodeVersion, nodeVersion)
731
- .replaceAll(oldNpmVersion, npmVersion),
732
- );
733
-
734
- const workflowFiles = [
735
- `./.github/workflows/coverall.ci.yml`,
736
-
737
- `./.github/workflows/engine-core.ci.yml`,
738
-
739
- `./.github/workflows/engine-cyberia.ci.yml`,
740
-
741
- `./.github/workflows/engine-lampp.ci.yml`,
742
-
743
- `./.github/workflows/engine-test.ci.yml`,
744
-
745
- `./.github/workflows/ghpkg.ci.yml`,
746
-
747
- `./.github/workflows/npmpkg.ci.yml`,
748
-
749
- `./.github/workflows/publish.ci.yml`,
750
-
751
- `./.github/workflows/pwa-microservices-template-page.cd.yml`,
752
-
753
- `./.github/workflows/pwa-microservices-template-test.ci.yml`,
754
-
755
- `./.github/workflows/test-api-rest.cd.yml`,
756
-
757
- `./src/runtime/lampp/Dockerfile`,
758
-
759
- `./Dockerfile`,
760
- ];
761
-
762
- workflowFiles.forEach((file) => {
763
- fs.writeFileSync(
764
- file,
765
- fs
766
- .readFileSync(file, 'utf8')
767
- .replaceAll(oldNodeMajorVersion + '.x', newNodeMajorVersion + '.x')
768
- .replaceAll(oldNodeVersion, nodeVersion)
769
- .replaceAll(oldNpmVersion, npmVersion),
770
- );
771
- });
772
- pbcopy(`nvm alias default v${nodeVersion}`);
773
- break;
774
- }
775
-
776
712
  case 'tls': {
777
713
  fs.mkdirSync(`./engine-private/ssl/localhost`, { recursive: true });
778
714
  const targetDir = `./engine-private/ssl/${process.argv[3] ? process.argv[3] : 'localhost'}`;
@@ -854,6 +790,34 @@ nvidia/gpu-operator \
854
790
  break;
855
791
  }
856
792
 
793
+ case 'sync-conf': {
794
+ const originPackageJson = JSON.parse(fs.readFileSync(`./package.json`, 'utf8'));
795
+ for (const deployId of ['dd-cron'].concat(
796
+ fs.readFileSync(`./engine-private/deploy/dd.router`, 'utf8').split(','),
797
+ )) {
798
+ for (const file of fs.readdirSync(`./engine-private/conf/${deployId}/`)) {
799
+ const deployPackage = JSON.parse(fs.readFileSync(`./engine-private/conf/${deployId}/package.json`, 'utf8'));
800
+ deployPackage.overrides = originPackageJson.overrides;
801
+ fs.writeFileSync(
802
+ `./engine-private/conf/${deployId}/package.json`,
803
+ JSON.stringify(deployPackage, null, 4),
804
+ 'utf8',
805
+ );
806
+ if (file.startsWith('conf.server') && file.endsWith('.json')) {
807
+ const filePath = `./engine-private/conf/${deployId}/${file}`;
808
+ const confObj = JSON.parse(fs.readFileSync(filePath, 'utf8'));
809
+ for (const host of Object.keys(confObj)) {
810
+ for (const path of Object.keys(confObj[host])) {
811
+ }
812
+ }
813
+ fs.writeFileSync(filePath, JSON.stringify(confObj, null, 4), 'utf8');
814
+ logger.info(`sync-conf`, { deployId, file });
815
+ }
816
+ }
817
+ }
818
+ break;
819
+ }
820
+
857
821
  case 'cyberia': {
858
822
  const { CyberiaDependencies } = await import(`../src/client/components/cyberia-portal/CommonCyberiaPortal.js`);
859
823
  for (const dep of Object.keys(CyberiaDependencies)) {
@@ -863,43 +827,6 @@ nvidia/gpu-operator \
863
827
  break;
864
828
  }
865
829
 
866
- case 'cyberia-hardhat': {
867
- shellExec(`cd ./hardhat && npm install --include=dev`);
868
- break;
869
- }
870
-
871
- case 'cyberia-docs': {
872
- // Copy custom cyberia jsdoc to project root for docs build
873
- const cyberiaJsDocPath = `./jsdoc.dd-cyberia.json`;
874
- if (fs.existsSync(cyberiaJsDocPath)) {
875
- logger.info('copying custom cyberia jsdoc.json to project root');
876
- fs.copySync(cyberiaJsDocPath, `./jsdoc.json`);
877
- }
878
-
879
- // Generate hardhat coverage report for docs inclusion
880
- if (fs.existsSync(`./hardhat/package.json`)) {
881
- logger.info('generating hardhat coverage report for cyberia docs');
882
- try {
883
- shellExec(`cd ./hardhat && NODE_ENV=development npx hardhat coverage`);
884
- } catch (e) {
885
- logger.warn('hardhat coverage generation failed, continuing', e.message);
886
- }
887
- }
888
-
889
- // Prepare cyberia docs references directory with hardhat README and WHITE-PAPER
890
- const cyberiaDocsRefsDir = `./src/client/public/cyberia/docs/references`;
891
- fs.mkdirSync(cyberiaDocsRefsDir, { recursive: true });
892
- if (fs.existsSync(`./hardhat/README.md`)) {
893
- fs.copySync(`./hardhat/README.md`, `${cyberiaDocsRefsDir}/Hardhat Module.md`);
894
- logger.info('copied hardhat README.md to cyberia docs references');
895
- }
896
- if (fs.existsSync(`./hardhat/WHITE-PAPER.md`)) {
897
- fs.copySync(`./hardhat/WHITE-PAPER.md`, `${cyberiaDocsRefsDir}/White Paper.md`);
898
- logger.info('copied hardhat WHITE-PAPER.md to cyberia docs references');
899
- }
900
- break;
901
- }
902
-
903
830
  case 'pw': {
904
831
  const help = `node bin/deploy pw <script-path> <from-path-in-pod> [to-path-on-local]`;
905
832
  const scriptPath = process.argv[3];
package/conf.js CHANGED
@@ -156,7 +156,7 @@ const DefaultConf = /**/ {
156
156
  ssr: {
157
157
  Default: {
158
158
  head: ['Seo', 'Pwa', 'Css', 'DefaultScripts', 'Production'],
159
- body: ['CacheControl', 'DefaultSplashScreen'],
159
+ body: ['CacheControl', 'DefaultSplashScreen', '404', '500', 'SwaggerDarkMode'],
160
160
  mailer: { userVerifyEmail: 'DefaultVerifyEmail', userRecoverEmail: 'DefaultRecoverEmail' },
161
161
  offline: [
162
162
  { path: '/offline', title: 'No Network Connection', client: 'NoNetworkConnection', head: [], body: [] },
@@ -172,11 +172,6 @@ const DefaultConf = /**/ {
172
172
  runtime: 'nodejs',
173
173
  apis: ['default', 'core', 'user', 'test', 'file', 'document'],
174
174
  origins: [],
175
- minifyBuild: false,
176
- iconsBuild: false,
177
- liteBuild: true,
178
- docsBuild: false,
179
- offlineBuild: false,
180
175
  ws: 'core',
181
176
  peer: true,
182
177
  proxy: [80, 443],
@@ -214,8 +209,6 @@ const DefaultConf = /**/ {
214
209
  runtime: 'nodejs',
215
210
  apis: [],
216
211
  origins: [],
217
- minifyBuild: false,
218
- liteBuild: true,
219
212
  proxy: [80, 443],
220
213
  },
221
214
  },
package/jsdoc.json CHANGED
@@ -22,7 +22,7 @@
22
22
  "search": true,
23
23
  "title": "Nexodev - ERP, CRM Development & Cloud DevOps Services",
24
24
  "homepageTitle": "Docs",
25
- "favicon": "./public/www.nexodev.org/",
25
+ "favicon": "./public/www.nexodev.org/favicon.ico",
26
26
  "displayModuleHeader": true,
27
27
  "includeFilesListInHomepage": true,
28
28
  "sections": ["Namespaces", "Tutorials"],
@@ -23,7 +23,7 @@ spec:
23
23
  spec:
24
24
  containers:
25
25
  - name: dd-cron-backup
26
- image: underpost/underpost-engine:v3.1.2
26
+ image: underpost/underpost-engine:v3.1.3
27
27
  command:
28
28
  - /bin/sh
29
29
  - -c
@@ -23,7 +23,7 @@ spec:
23
23
  spec:
24
24
  containers:
25
25
  - name: dd-cron-dns
26
- image: underpost/underpost-engine:v3.1.2
26
+ image: underpost/underpost-engine:v3.1.3
27
27
  command:
28
28
  - /bin/sh
29
29
  - -c
@@ -17,7 +17,7 @@ spec:
17
17
  spec:
18
18
  containers:
19
19
  - name: dd-default-development-blue
20
- image: localhost/rockylinux9-underpost:v3.1.2
20
+ image: localhost/rockylinux9-underpost:v3.1.3
21
21
  # resources:
22
22
  # requests:
23
23
  # memory: "124Ki"
@@ -100,7 +100,7 @@ spec:
100
100
  spec:
101
101
  containers:
102
102
  - name: dd-default-development-green
103
- image: localhost/rockylinux9-underpost:v3.1.2
103
+ image: localhost/rockylinux9-underpost:v3.1.3
104
104
  # resources:
105
105
  # requests:
106
106
  # memory: "124Ki"
@@ -18,7 +18,7 @@ spec:
18
18
  spec:
19
19
  containers:
20
20
  - name: dd-test-development-blue
21
- image: localhost/rockylinux9-underpost:v3.1.2
21
+ image: localhost/rockylinux9-underpost:v3.1.3
22
22
 
23
23
  command:
24
24
  - /bin/sh
@@ -103,7 +103,7 @@ spec:
103
103
  spec:
104
104
  containers:
105
105
  - name: dd-test-development-green
106
- image: localhost/rockylinux9-underpost:v3.1.2
106
+ image: localhost/rockylinux9-underpost:v3.1.3
107
107
 
108
108
  command:
109
109
  - /bin/sh
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "type": "module",
3
3
  "main": "src/index.js",
4
4
  "name": "underpost",
5
- "version": "3.1.2",
5
+ "version": "3.1.3",
6
6
  "description": "pwa api rest template",
7
7
  "scripts": {
8
- "start": "node --max-old-space-size=8192 src/server",
8
+ "start": "node --max-old-space-size=8192 src/server dd-core",
9
9
  "build": "node bin client",
10
10
  "test": "NODE_ENV=test c8 mocha",
11
11
  "dev": "NODE_ENV=development nodemon src/server",
@@ -3,6 +3,8 @@ set -euo pipefail
3
3
 
4
4
  BASHRC="$HOME/.bashrc"
5
5
 
6
+ sudo dnf install -y iproute lsof nmap-ncat net-tools procps-ng
7
+
6
8
  # Check whether a "ports" function is already defined
7
9
  if grep -Eq '^\s*(function\s+ports|ports\s*\(\))' "$BASHRC"; then
8
10
  echo "The 'ports' function already exists in $BASHRC. Nothing was changed."
package/src/cli/index.js CHANGED
@@ -45,6 +45,9 @@ program
45
45
  .argument('[path]', 'Comma-separated paths to filter the build.', '')
46
46
  .option('--sync-env-port', 'Sync environment port assignments across all deploy IDs')
47
47
  .option('--single-replica', 'Build single replica folders instead of full client')
48
+ .option('--build-zip', 'Create zip files of the builds')
49
+ .option('--lite-build', 'Skip full build (default is full build)')
50
+ .option('--icons-build', 'Build icons')
48
51
  .description('Builds client assets, single replicas, and/or syncs environment ports.')
49
52
  .action(Underpost.repo.client);
50
53
 
@@ -58,6 +61,7 @@ program
58
61
  .option('--run', 'Starts application servers and monitors their health.')
59
62
  .option('--build', 'Triggers the client-side application build process.')
60
63
  .option('--underpost-quickly-install', 'Uses Underpost Quickly Install for dependency installation.')
64
+ .option('--skip-pull-base', 'Skips cloning repositories, uses current workspace code directly.')
61
65
  .action(Underpost.start.callback)
62
66
  .description('Initiates application servers, build pipelines, or other defined services based on the deployment ID.');
63
67
 
@@ -622,6 +626,10 @@ program
622
626
  'Sets the maximum number of status check attempts (default: 600).',
623
627
  )
624
628
  .option('--dry-run', 'Preview operations without executing them.')
629
+ .option(
630
+ '--from-n-commit <n>',
631
+ 'Number of commits back to use for message propagation in template-deploy (default: 1, last commit only).',
632
+ )
625
633
  .option(
626
634
  '--create-job-now',
627
635
  'After applying cron manifests, immediately create a Job from each CronJob (forwarded to cron runner).',
@@ -144,8 +144,6 @@ class UnderpostRepository {
144
144
  }
145
145
 
146
146
  if (options.changelog !== undefined || options.changelogBuild) {
147
- const ciIntegrationPrefix = 'ci(package-pwa-microservices-';
148
- const ciIntegrationVersionPrefix = 'New release v:';
149
147
  const releaseMatch = 'New release v:';
150
148
  // Helper: parse [<tag>] commits into grouped sections
151
149
  const buildSectionChangelog = (commits) => {
@@ -273,39 +271,13 @@ class UnderpostRepository {
273
271
  fs.writeFileSync(changelogPath, `# Changelog\n\n${changelog}`);
274
272
  logger.info('CHANGELOG.md built at', changelogPath);
275
273
  } else {
276
- // --changelog [latest-n]: print changelog of last N commits or since last release
274
+ // --changelog [latest-n]: print changelog of last N commits (default: 1)
277
275
  const hasExplicitCount =
278
276
  options.changelog !== undefined && options.changelog !== true && !isNaN(parseInt(options.changelog));
279
- const scanLimit = hasExplicitCount ? parseInt(options.changelog) : 500;
277
+ const scanLimit = hasExplicitCount ? parseInt(options.changelog) : 1;
280
278
  const allCommits = fetchHistory(scanLimit);
281
279
 
282
- let commits;
283
- if (!hasExplicitCount) {
284
- let boundaryIndex = -1;
285
-
286
- // New boundary: deploy hash stored in config via `underpost config set LAST_CI_DEPLOY_HASH`
287
- const lastDeployHash = shellExec('underpost config get LAST_CI_DEPLOY_HASH --plain', {
288
- stdout: true,
289
- silent: true,
290
- disableLog: true,
291
- }).trim();
292
- if (lastDeployHash && lastDeployHash !== 'undefined' && lastDeployHash !== 'null') {
293
- boundaryIndex = allCommits.findIndex((c) => c.fullHash === lastDeployHash || c.hash === lastDeployHash);
294
- }
295
-
296
- // Fallback: old CI integration commit boundary
297
- if (boundaryIndex < 0) {
298
- boundaryIndex = allCommits.findIndex(
299
- (c) => c.message.startsWith(ciIntegrationPrefix) && !c.message.match(ciIntegrationVersionPrefix),
300
- );
301
- }
302
-
303
- commits = boundaryIndex >= 0 ? allCommits.slice(0, boundaryIndex) : allCommits;
304
- } else {
305
- commits = allCommits;
306
- }
307
-
308
- const sections = buildVersionSections(commits);
280
+ const sections = buildVersionSections(allCommits);
309
281
  let changelog = renderSections(sections);
310
282
  console.log(changelog || `No changelog entries found.\n`);
311
283
  }
@@ -624,6 +596,9 @@ class UnderpostRepository {
624
596
  * @param {object} [options] - Build options.
625
597
  * @param {boolean} [options.syncEnvPort=false] - If true, syncs environment port assignments across all deploy IDs.
626
598
  * @param {boolean} [options.singleReplica=false] - If true, builds single replica folders instead of full client.
599
+ * @param {boolean} [options.buildZip=false] - If true, creates zip files of the builds.
600
+ * @param {boolean} [options.liteBuild=false] - If true, skips full build (default is full build).
601
+ * @param {boolean} [options.iconsBuild=false] - If true, builds icons.
627
602
  * @returns {Promise<boolean>} A promise that resolves when the build is complete.
628
603
  * @memberof UnderpostRepository
629
604
  */
@@ -635,6 +610,9 @@ class UnderpostRepository {
635
610
  options = {
636
611
  syncEnvPort: false,
637
612
  singleReplica: false,
613
+ buildZip: false,
614
+ liteBuild: false,
615
+ iconsBuild: false,
638
616
  },
639
617
  ) {
640
618
  return new Promise(async (resolve, reject) => {
@@ -784,8 +762,6 @@ class UnderpostRepository {
784
762
  if (argHost.length && argPath.length && (!argHost.includes(host) || !argPath.includes(path))) {
785
763
  delete serverConf[host][path];
786
764
  } else {
787
- serverConf[host][path].liteBuild = false;
788
- serverConf[host][path].minifyBuild = process.env.NODE_ENV === 'production' ? true : false;
789
765
  if (serverConf[host][path].singleReplica && serverConf[host][path].replicas) {
790
766
  singleReplicaHosts.push({ host, path });
791
767
  deployIdSingleReplicas = deployIdSingleReplicas.concat(
@@ -797,10 +773,11 @@ class UnderpostRepository {
797
773
  }
798
774
  }
799
775
  }
800
-
801
- if (confFilePath) fs.writeFileSync(confFilePath, JSON.stringify(serverConf, null, 4), 'utf-8');
802
-
803
- await buildClient();
776
+ await buildClient({
777
+ buildZip: options.buildZip || false,
778
+ fullBuild: options.liteBuild ? false : true,
779
+ iconsBuild: options.iconsBuild || false,
780
+ });
804
781
  for (const replicaDeployId of deployIdSingleReplicas) await Underpost.repo.client(replicaDeployId);
805
782
 
806
783
  return resolve(true);
@@ -1207,6 +1184,29 @@ Prevent build private config repo.`,
1207
1184
  }
1208
1185
  logger.info('Dispatched workflow', `${repo} -> ${workflowFile}`, inputs.job ? `(job: ${inputs.job})` : '');
1209
1186
  },
1187
+
1188
+ /**
1189
+ * Sanitizes a markdown changelog string into a compact message format.
1190
+ * Strips date headers, converts section tags to `[tag]` prefixes, removes bullet markers and special characters.
1191
+ * @param {string} message - The raw markdown changelog output.
1192
+ * @returns {string} The sanitized single-line or multi-line compact message.
1193
+ * @memberof UnderpostRepository
1194
+ */
1195
+ sanitizeChangelogMessage(message) {
1196
+ if (!message) return '';
1197
+ return message
1198
+ .replace(/^##\s+\d{4}-\d{2}-\d{2}\s*/gm, '')
1199
+ .replace(/^###\s+(\S+)\s*/gm, '[$1] ')
1200
+ .replace(/^- /gm, '')
1201
+ .replaceAll('"', '')
1202
+ .replaceAll('`', '')
1203
+ .split('\n')
1204
+ .map((l) => l.trim())
1205
+ .filter(Boolean)
1206
+ .join('\n')
1207
+ .trim()
1208
+ .replaceAll('] - ', '] ');
1209
+ },
1210
1210
  };
1211
1211
  }
1212
1212