ante-erp-cli 1.11.40 → 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.40",
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);
package/src/utils/ssl.js CHANGED
@@ -128,12 +128,14 @@ export async function obtainSSLCertificate(config) {
128
128
  * @param {string} [config.guardianAppDomain] - Guardian App domain URL (optional)
129
129
  * @param {string} [config.facialAppDomain] - Facial Web domain URL (optional)
130
130
  * @param {string} [config.posAppDomain] - POS App domain URL (optional)
131
+ * @param {string} [config.clientAppDomain] - Client App domain URL (optional)
131
132
  * @param {number} [config.frontendPort=8080] - Frontend port
132
133
  * @param {number} [config.apiPort=3001] - API port
133
134
  * @param {number} [config.gateAppPort=8081] - Gate App port
134
135
  * @param {number} [config.guardianAppPort=8082] - Guardian App port
135
136
  * @param {number} [config.facialWebPort=8083] - Facial Web port
136
137
  * @param {number} [config.posAppPort=8084] - POS App port
138
+ * @param {number} [config.clientAppPort=9005] - Client App port
137
139
  * @returns {Promise<void>}
138
140
  */
139
141
  export async function updateNginxForSSL(config) {
@@ -144,12 +146,14 @@ export async function updateNginxForSSL(config) {
144
146
  guardianAppDomain,
145
147
  facialAppDomain,
146
148
  posAppDomain,
149
+ clientAppDomain,
147
150
  frontendPort = 8080,
148
151
  apiPort = 3001,
149
152
  gateAppPort = 8081,
150
153
  guardianAppPort = 8082,
151
154
  facialWebPort = 8083,
152
- posAppPort = 8084
155
+ posAppPort = 8084,
156
+ clientAppPort = 9005
153
157
  } = config;
154
158
  const spinner = ora('Updating NGINX configuration for HTTPS...').start();
155
159
 
@@ -176,12 +180,14 @@ export async function updateNginxForSSL(config) {
176
180
  guardianAppDomain,
177
181
  facialAppDomain,
178
182
  posAppDomain,
183
+ clientAppDomain,
179
184
  frontendPort,
180
185
  apiPort,
181
186
  gateAppPort,
182
187
  guardianAppPort,
183
188
  facialWebPort,
184
189
  posAppPort,
190
+ clientAppPort,
185
191
  ssl: true
186
192
  });
187
193