ante-erp-cli 1.11.41 → 1.11.42

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/bin/ante-cli.js CHANGED
@@ -245,9 +245,9 @@ dbCmd
245
245
  .option('--redis', 'Expose only Redis')
246
246
  .option('--mongodb', 'Expose only MongoDB')
247
247
  .option('--all', 'Expose all databases (default)', true)
248
- .option('--postgres-port <port>', 'Custom host port for PostgreSQL (default: random)')
249
- .option('--redis-port <port>', 'Custom host port for Redis (default: random)')
250
- .option('--mongodb-port <port>', 'Custom host port for MongoDB (default: random)')
248
+ .option('--postgres-port <port>', 'Custom host port for PostgreSQL (default: 64541)')
249
+ .option('--redis-port <port>', 'Custom host port for Redis (default: 61066)')
250
+ .option('--mongodb-port <port>', 'Custom host port for MongoDB (default: 50167)')
251
251
  .option('--force', 'Skip confirmation prompts')
252
252
  .option('--no-restart', 'Don\'t restart services automatically')
253
253
  .action(exposeDbPorts);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ante-erp-cli",
3
- "version": "1.11.41",
3
+ "version": "1.11.42",
4
4
  "description": "Comprehensive CLI tool for managing ANTE ERP self-hosted installations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -80,15 +80,15 @@ function displaySecurityWarning() {
80
80
  * Display database exposure information
81
81
  */
82
82
  function displayExposureInfo(databases) {
83
- console.log(chalk.cyan('This will expose the following ports:'));
83
+ console.log(chalk.cyan('This will expose the following databases with default ports:'));
84
84
  databases.forEach((db) => {
85
85
  const dbInfo = {
86
- postgres: { name: 'PostgreSQL', port: 5432 },
87
- redis: { name: 'Redis', port: 6379 },
88
- mongodb: { name: 'MongoDB', port: 27017 },
86
+ postgres: { name: 'PostgreSQL', port: 64541 },
87
+ redis: { name: 'Redis', port: 61066 },
88
+ mongodb: { name: 'MongoDB', port: 50167 },
89
89
  };
90
90
  if (dbInfo[db]) {
91
- console.log(chalk.cyan(` • ${dbInfo[db].name}: ${dbInfo[db].port}`));
91
+ console.log(chalk.cyan(` • ${dbInfo[db].name}: Host Port ${dbInfo[db].port}`));
92
92
  }
93
93
  });
94
94
  console.log();
@@ -61,21 +61,21 @@ const DATABASE_PORTS = {
61
61
  name: 'PostgreSQL',
62
62
  service: 'postgres',
63
63
  containerPort: 5432,
64
- defaultHostPort: 5432,
64
+ defaultHostPort: 64541,
65
65
  connectionExample: (host, hostPort, password) => `postgresql://ante:${password}@${host}:${hostPort}/ante_db`,
66
66
  },
67
67
  redis: {
68
68
  name: 'Redis',
69
69
  service: 'redis',
70
70
  containerPort: 6379,
71
- defaultHostPort: 6379,
71
+ defaultHostPort: 61066,
72
72
  connectionExample: (host, hostPort, password) => `redis://${host}:${hostPort} (password: ${password})`,
73
73
  },
74
74
  mongodb: {
75
75
  name: 'MongoDB',
76
76
  service: 'mongodb',
77
77
  containerPort: 27017,
78
- defaultHostPort: 27017,
78
+ defaultHostPort: 50167,
79
79
  connectionExample: (host, hostPort, password) => `mongodb://ante:${password}@${host}:${hostPort}/ante`,
80
80
  },
81
81
  };
@@ -153,8 +153,8 @@ export async function exposeDatabasePorts(composeFile, options = {}) {
153
153
  (p) => !p.toString().includes(DATABASE_PORTS.postgres.containerPort.toString())
154
154
  );
155
155
 
156
- // Find available port
157
- const hostPort = await findAvailablePort(postgresPort);
156
+ // Find available port (use fixed default if no custom port specified)
157
+ const hostPort = await findAvailablePort(postgresPort || DATABASE_PORTS.postgres.defaultHostPort);
158
158
  const portMapping = `${hostPort}:${DATABASE_PORTS.postgres.containerPort}`;
159
159
 
160
160
  doc.services.postgres.ports.push(portMapping);
@@ -172,8 +172,8 @@ export async function exposeDatabasePorts(composeFile, options = {}) {
172
172
  (p) => !p.toString().includes(DATABASE_PORTS.redis.containerPort.toString())
173
173
  );
174
174
 
175
- // Find available port
176
- const hostPort = await findAvailablePort(redisPort);
175
+ // Find available port (use fixed default if no custom port specified)
176
+ const hostPort = await findAvailablePort(redisPort || DATABASE_PORTS.redis.defaultHostPort);
177
177
  const portMapping = `${hostPort}:${DATABASE_PORTS.redis.containerPort}`;
178
178
 
179
179
  doc.services.redis.ports.push(portMapping);
@@ -191,8 +191,8 @@ export async function exposeDatabasePorts(composeFile, options = {}) {
191
191
  (p) => !p.toString().includes(DATABASE_PORTS.mongodb.containerPort.toString())
192
192
  );
193
193
 
194
- // Find available port
195
- const hostPort = await findAvailablePort(mongodbPort);
194
+ // Find available port (use fixed default if no custom port specified)
195
+ const hostPort = await findAvailablePort(mongodbPort || DATABASE_PORTS.mongodb.defaultHostPort);
196
196
  const portMapping = `${hostPort}:${DATABASE_PORTS.mongodb.containerPort}`;
197
197
 
198
198
  doc.services.mongodb.ports.push(portMapping);