@ostro-cloud/cli 1.0.0-alpha.5 → 1.0.0-alpha.7

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/ostro.js CHANGED
@@ -194,14 +194,14 @@ program
194
194
  // Doctor
195
195
  const SERVICES = [
196
196
  { name: 'Unified Console', host: 'console.ostro-cloud.com', path: '/api/health' },
197
- { name: 'Kubernetes Engine', host: 'console.ostro-cloud.com', path: '/kubernetes/api/health' },
198
- { name: 'Ostro Serverless', host: 'console.ostro-cloud.com', path: '/serverless/api/health' },
199
- { name: 'Ostro Bucket S3', host: 'console.ostro-cloud.com', path: '/storage/api/s3/health' },
200
- { name: 'Ostro Formation', host: 'console.ostro-cloud.com', path: '/formation/api/health' },
201
- { name: 'API Gateway', host: 'console.ostro-cloud.com', path: '/gateway/api/health' },
202
- { name: 'Ostro DNS', host: 'console.ostro-cloud.com', path: '/dns/api/health' },
203
- { name: 'Message Broker', host: 'console.ostro-cloud.com', path: '/broker/api/health' },
204
- { name: 'CloudWatch Logs', host: 'console.ostro-cloud.com', path: '/cloudwatch/api/health' }
197
+ { name: 'Kubernetes Engine', host: 'eks.ostro-cloud.com', path: '/api/health' },
198
+ { name: 'Ostro Serverless', host: 'serverless.ostro-cloud.com', path: '/api/health' },
199
+ { name: 'Ostro Bucket S3', host: 's3.ostro-cloud.com', path: '/api/health' },
200
+ { name: 'Ostro Formation', host: 'formation.ostro-cloud.com', path: '/health' },
201
+ { name: 'API Gateway', host: 'apigateway.ostro-cloud.com', path: '/api/health' },
202
+ { name: 'Ostro DNS', host: 'route53.ostro-cloud.com', path: '/api/health' },
203
+ { name: 'Message Broker', host: 'mq.ostro-cloud.com', path: '/api/health' },
204
+ { name: 'CloudWatch Logs', host: 'logs.ostro-cloud.com', path: '/api/health' }
205
205
  ];
206
206
 
207
207
  async function checkService(svc) {
package/lib/client.js CHANGED
@@ -38,12 +38,12 @@ const SERVICE_PATHS = {
38
38
 
39
39
  /**
40
40
  * Returns the base URL for a service.
41
- * Pattern: https://console.ostro-cloud.com/<service>
41
+ * Pattern: https://<service>.ostro-cloud.com
42
42
  */
43
- function defaultServiceUrl(service, _region, _domain) {
43
+ function defaultServiceUrl(service, _region, domain) {
44
44
  const seg = SERVICE_PATHS[service] || service;
45
- const host = process.env.OSTRO_CONSOLE_HOST || DEFAULT_CONSOLE_HOST;
46
- return `${host.replace(/\/+$/, '')}/${seg}`;
45
+ const d = domain || process.env.OSTRO_DOMAIN || DEFAULT_CLOUD_DOMAIN;
46
+ return `https://${seg}.${d}`;
47
47
  }
48
48
 
49
49
  function getStoredConfig() {
@@ -130,7 +130,7 @@ async function validateTemplate(options = {}) {
130
130
  const templateDir = path.dirname(path.resolve(templatePath));
131
131
  const stackName = options.stackName || path.basename(process.cwd());
132
132
 
133
- let effectiveParams = options.parameters || {};
133
+ let effectiveParams = parseParameters(options.parameters);
134
134
  if (typeof effectiveParams === 'string') {
135
135
  try { effectiveParams = JSON.parse(effectiveParams); } catch { effectiveParams = {}; }
136
136
  }
@@ -212,7 +212,7 @@ async function createStack(options = {}) {
212
212
  const formationUrl = resolveServiceUrl('formation', options.formationUrl);
213
213
  const templateDir = path.dirname(path.resolve(templatePath));
214
214
 
215
- let effectiveParams = options.parameters || {};
215
+ let effectiveParams = parseParameters(options.parameters);
216
216
  if (typeof effectiveParams === 'string') {
217
217
  try { effectiveParams = JSON.parse(effectiveParams); } catch { effectiveParams = {}; }
218
218
  }
@@ -288,7 +288,7 @@ async function deployStack(options = {}) {
288
288
  const formationUrl = resolveServiceUrl('formation', options.formationUrl);
289
289
  const templateDir = path.dirname(path.resolve(templatePath));
290
290
 
291
- let effectiveParams = options.parameters || {};
291
+ let effectiveParams = parseParameters(options.parameters);
292
292
  if (typeof effectiveParams === 'string') {
293
293
  try { effectiveParams = JSON.parse(effectiveParams); } catch { effectiveParams = {}; }
294
294
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ostro-cloud/cli",
3
- "version": "1.0.0-alpha.5",
3
+ "version": "1.0.0-alpha.7",
4
4
  "description": "Enterprise Command Line Interface (CLI) for Ostro Cloud Serverless, S3 Buckets, Kubernetes, and CloudFormation Orchestration",
5
5
  "main": "lib/index.js",
6
6
  "bin": {