underpost 3.1.1 → 3.1.2

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ## 2026-03-15
4
4
 
5
+ ### cli-run
6
+
7
+ - Fix streamline deployment logic prevent override env files and redundant build workflows ([048fb8ff1](https://github.com/underpostnet/engine/commit/048fb8ff1cbb895c3c04cf8a84daa921fcbe6bf5))
8
+
9
+ ### engine-cyberia
10
+
11
+ - fix: update error handling for underpost passthrough to include 'env' command ([402a96176](https://github.com/underpostnet/engine/commit/402a961768db9753c2cdd7b067c548edcbd2f0b7))
12
+
13
+ ## New release v:3.1.1 (2026-03-14)
14
+
5
15
  ### cli-index
6
16
 
7
17
  - fix: add quiet option to dotenv config for improved error handling ([975448eb4](https://github.com/underpostnet/engine/commit/975448eb4d710cc8248a783240ce818b5fb9b891))
package/CLI-HELP.md CHANGED
@@ -1,4 +1,4 @@
1
- ## underpost ci/cd cli v3.1.1
1
+ ## underpost ci/cd cli v3.1.2
2
2
 
3
3
  ### Usage: `underpost [options] [command]`
4
4
  ```
@@ -854,7 +854,7 @@ Options:
854
854
  Runs specified scripts using various runners.
855
855
 
856
856
  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,release-cmt,deploy-test,sync-replica,tf-vae-test,spark-template,rmi,kill,secret,underpost-config,gpu-env,tf-gpu-test,deploy-job.
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.
858
858
  path The input value, identifier, or path for the operation.
859
859
 
860
860
  Options:
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.1.1)](https://socket.dev/npm/package/underpost/overview/3.1.1) [![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.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)
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.1.1
63
+ ## underpost ci/cd cli v3.1.2
64
64
 
65
65
  ### Usage: `underpost [options] [command]`
66
66
  ```
package/bin/deploy.js CHANGED
@@ -979,42 +979,6 @@ nvidia/gpu-operator \
979
979
  logger.info('All dependabot branches merged into master');
980
980
  break;
981
981
  }
982
-
983
- // Temporal fallback underpost legacy version handling
984
-
985
- case 'conf': {
986
- let subConf = process.argv[5] ?? '';
987
-
988
- if (!['current', 'clean', 'root'].includes(process.argv[3])) {
989
- const path = fs.existsSync(`./engine-private/replica/${process.argv[3]}`)
990
- ? `./engine-private/replica/${process.argv[3]}/.env.${process.argv[4]}`
991
- : `./engine-private/conf/${process.argv[3]}/.env.${process.argv[4]}`;
992
- dotenv.config({ path, override: true });
993
- }
994
-
995
- loadConf(process.argv[3], subConf);
996
- break;
997
- }
998
-
999
- case 'build-full-client': {
1000
- await Underpost.repo.client(process.argv[3], process.argv[4], process.argv[5], process.argv[6]);
1001
- break;
1002
- }
1003
-
1004
- case 'build-single-replica': {
1005
- const deployId = process.argv[3];
1006
- const host = process.argv[4];
1007
- const path = process.argv[5];
1008
- await Underpost.repo.client(deployId, '', host, path, {
1009
- singleReplica: true,
1010
- });
1011
- break;
1012
- }
1013
-
1014
- case 'sync-env-port': {
1015
- await Underpost.repo.client(undefined, '', '', '', { syncEnvPort: true });
1016
- break;
1017
- }
1018
982
  }
1019
983
  } catch (error) {
1020
984
  logger.error(error, error.stack);
@@ -23,7 +23,7 @@ spec:
23
23
  spec:
24
24
  containers:
25
25
  - name: dd-cron-backup
26
- image: underpost/underpost-engine:v3.1.1
26
+ image: underpost/underpost-engine:v3.1.2
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.1
26
+ image: underpost/underpost-engine:v3.1.2
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.1
20
+ image: localhost/rockylinux9-underpost:v3.1.2
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.1
103
+ image: localhost/rockylinux9-underpost:v3.1.2
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.1
21
+ image: localhost/rockylinux9-underpost:v3.1.2
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.1
106
+ image: localhost/rockylinux9-underpost:v3.1.2
107
107
 
108
108
  command:
109
109
  - /bin/sh
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "main": "src/index.js",
4
4
  "name": "underpost",
5
- "version": "3.1.1",
5
+ "version": "3.1.2",
6
6
  "description": "pwa api rest template",
7
7
  "scripts": {
8
8
  "start": "node --max-old-space-size=8192 src/server",
@@ -797,23 +797,12 @@ class UnderpostRepository {
797
797
  }
798
798
  }
799
799
  }
800
+
800
801
  if (confFilePath) fs.writeFileSync(confFilePath, JSON.stringify(serverConf, null, 4), 'utf-8');
801
- await buildClient();
802
- if (confFilePath && originalConfBackup) fs.writeFileSync(confFilePath, originalConfBackup, 'utf-8');
803
802
 
804
- if (singleReplicaHosts.length > 0) {
805
- for (const { host, path } of singleReplicaHosts) {
806
- await Underpost.repo.client(resolvedDeployId, '', host, path, {
807
- singleReplica: true,
808
- });
809
- }
810
- shellExec(`node bin env ${resolvedDeployId} ${process.env.NODE_ENV}`);
811
- }
803
+ await buildClient();
804
+ for (const replicaDeployId of deployIdSingleReplicas) await Underpost.repo.client(replicaDeployId);
812
805
 
813
- for (const replicaDeployId of deployIdSingleReplicas) {
814
- shellExec(`node bin env ${replicaDeployId} ${process.env.NODE_ENV}`);
815
- await Underpost.repo.client(replicaDeployId);
816
- }
817
806
  return resolve(true);
818
807
  }
819
808
  } catch (error) {
package/src/cli/run.js CHANGED
@@ -612,7 +612,7 @@ echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com
612
612
  image ? ` --image ${image}` : ''
613
613
  }${versions ? ` --versions ${versions}` : ''}${
614
614
  options.namespace ? ` --namespace ${options.namespace}` : ''
615
- }${timeoutFlags}${cmdString} dd ${env}`,
615
+ }${timeoutFlags}${cmdString} ${deployId} ${env}`,
616
616
  );
617
617
 
618
618
  if (isDeployRunnerContext(path, options)) {
@@ -1583,20 +1583,6 @@ EOF
1583
1583
  shellExec(`chmod +x ${options.underpostRoot}/scripts/ports-ls.sh`);
1584
1584
  shellExec(`${options.underpostRoot}/scripts/ports-ls.sh`);
1585
1585
  },
1586
- /**
1587
- * @method release-cmt
1588
- * @description Commits and pushes a new release for the `engine` repository with a message indicating the new version.
1589
- * @param {string} path - The input value, identifier, or path for the operation.
1590
- * @param {Object} options - The default underpost runner options for customizing workflow
1591
- * @memberof UnderpostRun
1592
- */
1593
- 'release-cmt': async (path, options = DEFAULT_OPTION) => {
1594
- shellExec(`underpost run pull`);
1595
- shellExec(`underpost run secret`);
1596
- shellCd(`/home/dd/engine`);
1597
- shellExec(`underpost cmt --empty . ci engine ' New engine release $(underpost --version)'`);
1598
- shellExec(`underpost push . ${process.env.GITHUB_USERNAME}/engine`, { silent: true });
1599
- },
1600
1586
 
1601
1587
  /**
1602
1588
  * @method deploy-test
@@ -1623,40 +1609,6 @@ EOF
1623
1609
  shellExec(`node bin run sync${baseClusterCommand} --deploy-id-cron-jobs none dd-test --cmd "${cmd}"`);
1624
1610
  },
1625
1611
 
1626
- /**
1627
- * @method sync-replica
1628
- * @description Syncs a replica for the dd.router
1629
- * @param {string} path - The input value, identifier, or path for the operation.
1630
- * @param {Object} options - The default underpost runner options for customizing workflow
1631
- * @memberof UnderpostRun
1632
- */
1633
- 'sync-replica': async (path, options = DEFAULT_OPTION) => {
1634
- const env = options.dev ? 'development' : 'production';
1635
- const baseCommand = options.dev ? 'node bin' : 'underpost';
1636
-
1637
- for (let deployId of fs.readFileSync(`./engine-private/deploy/dd.router`, 'utf8').split(',')) {
1638
- deployId = deployId.trim();
1639
- const _path = '/single-replica';
1640
- const confServer = loadConfServerJson(`./engine-private/conf/${deployId}/conf.server.json`);
1641
- shellExec(`${baseCommand} env ${deployId} ${env}`);
1642
- for (const host of Object.keys(confServer))
1643
- if (_path in confServer[host])
1644
- await Underpost.repo.client(deployId, '', host, _path, {
1645
- singleReplica: true,
1646
- });
1647
- const node = options.nodeName
1648
- ? options.nodeName
1649
- : !options.kubeadm && !options.k3s
1650
- ? 'kind-control-plane'
1651
- : os.hostname();
1652
- // deployId, replicas, versions, image, node
1653
- let defaultPath = [deployId, 1, ``, ``, node];
1654
- shellExec(`${baseCommand} run${options.dev === true ? ' --dev' : ''} --build sync ${defaultPath}`);
1655
- await Underpost.repo.client(deployId);
1656
- }
1657
- if (isDeployRunnerContext(path, options)) shellExec(`${baseCommand} run promote ${path} production`);
1658
- },
1659
-
1660
1612
  /**
1661
1613
  * @method tf-vae-test
1662
1614
  * @description Creates and runs a job pod (`tf-vae-test`) that installs TensorFlow dependencies, clones the TensorFlow docs, and runs the CVAE tutorial script, with a terminal monitor attached.
package/src/index.js CHANGED
@@ -42,7 +42,7 @@ class Underpost {
42
42
  * @type {String}
43
43
  * @memberof Underpost
44
44
  */
45
- static version = 'v3.1.1';
45
+ static version = 'v3.1.2';
46
46
 
47
47
  /**
48
48
  * Required Node.js major version