@geekmidas/cli 0.47.0 → 0.48.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.
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { __require, getAppBuildOrder, getDependencyEnvVars, getDeployTargetError
3
3
  import { getAppNameFromCwd, loadAppConfig, loadConfig, loadWorkspaceConfig, parseModuleConfig } from "./config-C3LSBNSl.mjs";
4
4
  import { ConstructGenerator, EndpointGenerator, OPENAPI_OUTPUT_PATH, OpenApiTsGenerator, generateOpenApi, openapiCommand, resolveOpenApiConfig } from "./openapi-C3C-BzIZ.mjs";
5
5
  import { getKeyPath, maskPassword, readStageSecrets, secretsExist, setCustomSecret, toEmbeddableSecrets, writeStageSecrets } from "./storage-Dhst7BhI.mjs";
6
- import { DokployApi } from "./dokploy-api-CMWlWq7-.mjs";
6
+ import { DokployApi } from "./dokploy-api-DvzIDxTj.mjs";
7
7
  import { encryptSecrets } from "./encryption-BC4MAODn.mjs";
8
8
  import { generateReactQueryCommand } from "./openapi-react-query-ZoP9DPbY.mjs";
9
9
  import { createRequire } from "node:module";
@@ -253,7 +253,7 @@ const logger$11 = console;
253
253
  * Validate Dokploy token by making a test API call
254
254
  */
255
255
  async function validateDokployToken(endpoint, token) {
256
- const { DokployApi: DokployApi$1 } = await import("./dokploy-api-DQvi9iZa.mjs");
256
+ const { DokployApi: DokployApi$1 } = await import("./dokploy-api-BN3V57z1.mjs");
257
257
  const api = new DokployApi$1({
258
258
  baseUrl: endpoint,
259
259
  token
@@ -2828,8 +2828,8 @@ ENV NODE_ENV=production
2828
2828
  ENV PORT=${port}
2829
2829
 
2830
2830
  # Health check
2831
- HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \\
2832
- CMD wget -q --spider http://localhost:${port}${healthCheckPath} || exit 1
2831
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \\
2832
+ CMD wget -qO- http://localhost:${port}${healthCheckPath} > /dev/null 2>&1 || exit 1
2833
2833
 
2834
2834
  # Switch to non-root user
2835
2835
  USER hono
@@ -2911,8 +2911,8 @@ COPY --from=builder --chown=hono:nodejs /app/.gkm/server/dist/server.mjs ./
2911
2911
  ENV NODE_ENV=production
2912
2912
  ENV PORT=${port}
2913
2913
 
2914
- HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \\
2915
- CMD wget -q --spider http://localhost:${port}${healthCheckPath} || exit 1
2914
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \\
2915
+ CMD wget -qO- http://localhost:${port}${healthCheckPath} > /dev/null 2>&1 || exit 1
2916
2916
 
2917
2917
  USER hono
2918
2918
 
@@ -2948,8 +2948,8 @@ ENV NODE_ENV=production
2948
2948
  ENV PORT=${port}
2949
2949
 
2950
2950
  # Health check
2951
- HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \\
2952
- CMD wget -q --spider http://localhost:${port}${healthCheckPath} || exit 1
2951
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \\
2952
+ CMD wget -qO- http://localhost:${port}${healthCheckPath} > /dev/null 2>&1 || exit 1
2953
2953
 
2954
2954
  # Switch to non-root user
2955
2955
  USER hono
@@ -3141,10 +3141,6 @@ COPY --from=builder --chown=nextjs:nodejs /app/${appPath}/.next/standalone ./
3141
3141
  COPY --from=builder --chown=nextjs:nodejs /app/${appPath}/.next/static ./${appPath}/.next/static
3142
3142
  COPY --from=builder --chown=nextjs:nodejs /app/${appPath}/public ./${appPath}/public
3143
3143
 
3144
- # Health check
3145
- HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \\
3146
- CMD wget -q --spider http://localhost:${port}/ || exit 1
3147
-
3148
3144
  USER nextjs
3149
3145
 
3150
3146
  EXPOSE ${port}
@@ -3237,8 +3233,8 @@ COPY --from=builder --chown=hono:nodejs /app/${appPath}/.gkm/server/dist/server.
3237
3233
  ENV NODE_ENV=production
3238
3234
  ENV PORT=${port}
3239
3235
 
3240
- HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \\
3241
- CMD wget -q --spider http://localhost:${port}${healthCheckPath} || exit 1
3236
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \\
3237
+ CMD wget -qO- http://localhost:${port}${healthCheckPath} > /dev/null 2>&1 || exit 1
3242
3238
 
3243
3239
  USER hono
3244
3240
 
@@ -3347,8 +3343,8 @@ COPY --from=builder --chown=app:nodejs /app/${appPath}/dist/index.mjs ./
3347
3343
  ENV NODE_ENV=production
3348
3344
  ENV PORT=${port}
3349
3345
 
3350
- HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \\
3351
- CMD wget -q --spider http://localhost:${port}${healthCheckPath} || exit 1
3346
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \\
3347
+ CMD wget -qO- http://localhost:${port}${healthCheckPath} > /dev/null 2>&1 || exit 1
3352
3348
 
3353
3349
  USER app
3354
3350
 
@@ -3927,7 +3923,7 @@ function setRedisId(state, redisId) {
3927
3923
  * API Documentation: https://developers.hostinger.com/
3928
3924
  * Authentication: Bearer token from hpanel.hostinger.com/profile/api
3929
3925
  */
3930
- const HOSTINGER_API_BASE = "https://api.hostinger.com";
3926
+ const HOSTINGER_API_BASE = "https://developers.hostinger.com";
3931
3927
  /**
3932
3928
  * Hostinger API error
3933
3929
  */
@@ -4060,7 +4056,7 @@ var HostingerApi = class {
4060
4056
  name: subdomain,
4061
4057
  type: "A",
4062
4058
  ttl,
4063
- records: [ip]
4059
+ records: [{ content: ip }]
4064
4060
  }]);
4065
4061
  return true;
4066
4062
  }
@@ -4144,7 +4140,6 @@ function printDnsRecordsSimple(records, rootDomain) {
4144
4140
  */
4145
4141
  async function promptForToken(message) {
4146
4142
  const { stdin: stdin$1, stdout: stdout$1 } = await import("node:process");
4147
- const readline$1 = await import("node:readline/promises");
4148
4143
  if (!stdin$1.isTTY) throw new Error("Interactive input required for Hostinger token.");
4149
4144
  stdout$1.write(message);
4150
4145
  return new Promise((resolve$1) => {
@@ -4239,7 +4234,7 @@ async function createHostingerRecords(records, rootDomain, ttl) {
4239
4234
  name: record.subdomain,
4240
4235
  type: "A",
4241
4236
  ttl,
4242
- records: [record.value]
4237
+ records: [{ content: record.value }]
4243
4238
  }]);
4244
4239
  results.push({
4245
4240
  ...record,
@@ -5437,14 +5432,15 @@ async function workspaceDeployCommand(workspace, options) {
5437
5432
  const dnsConfig = workspace.deploy.dns;
5438
5433
  if (dnsConfig && appHostnames.size > 0) {
5439
5434
  const dnsResult = await orchestrateDns(appHostnames, dnsConfig, creds.endpoint);
5440
- if (dnsResult?.success && appDomainIds.size > 0) {
5435
+ if (dnsResult?.success && appHostnames.size > 0) {
5441
5436
  logger$1.log("\n🔒 Validating domains for SSL certificates...");
5442
- for (const [appName, domainId] of appDomainIds) try {
5443
- await api.validateDomain(domainId);
5444
- logger$1.log(` ✓ ${appName}: SSL validation triggered`);
5437
+ for (const [appName, hostname] of appHostnames) try {
5438
+ const result = await api.validateDomain(hostname);
5439
+ if (result.isValid) logger$1.log(` ✓ ${appName}: ${hostname} ${result.resolvedIp}`);
5440
+ else logger$1.log(` ⚠ ${appName}: ${hostname} not valid`);
5445
5441
  } catch (validationError) {
5446
5442
  const message = validationError instanceof Error ? validationError.message : "Unknown error";
5447
- logger$1.log(` ⚠ ${appName}: SSL validation failed - ${message}`);
5443
+ logger$1.log(` ⚠ ${appName}: validation failed - ${message}`);
5448
5444
  }
5449
5445
  }
5450
5446
  }