@friggframework/devtools 2.0.0-next.43 → 2.0.0-next.44

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.
@@ -3,7 +3,18 @@ const path = require('path');
3
3
 
4
4
  async function buildCommand(options) {
5
5
  console.log('Building the serverless application...');
6
-
6
+
7
+ // Suppress AWS SDK warning message about maintenance mode
8
+ process.env.AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE = '1';
9
+
10
+ // Skip AWS discovery for local builds (unless --production flag is set)
11
+ if (!options.production) {
12
+ process.env.FRIGG_SKIP_AWS_DISCOVERY = 'true';
13
+ console.log('🏠 Building in local mode (use --production flag for production builds with AWS discovery)');
14
+ } else {
15
+ console.log('🚀 Building in production mode with AWS discovery enabled');
16
+ }
17
+
7
18
  // AWS discovery is now handled directly in serverless-template.js
8
19
  console.log('📦 Packaging serverless application...');
9
20
  const backendPath = path.resolve(process.cwd());
@@ -63,6 +63,13 @@ async function dbSetupCommand(options = {}) {
63
63
  const dbTypeResult = getDatabaseType();
64
64
  if (dbTypeResult.error) {
65
65
  console.error(chalk.red('❌ ' + dbTypeResult.error));
66
+
67
+ // Show stack trace in verbose mode for debugging
68
+ if (verbose && dbTypeResult.stack) {
69
+ console.error(chalk.gray('\nStack trace:'));
70
+ console.error(chalk.gray(dbTypeResult.stack));
71
+ }
72
+
66
73
  console.error(getDatabaseTypeNotConfiguredError());
67
74
  process.exit(1);
68
75
  }
@@ -37,6 +37,7 @@ program
37
37
  .description('Build the serverless application')
38
38
  .option('-s, --stage <stage>', 'deployment stage', 'dev')
39
39
  .option('-v, --verbose', 'enable verbose output')
40
+ .option('-p, --production', 'build for production (enables AWS discovery)')
40
41
  .action(buildCommand);
41
42
 
42
43
  program
@@ -50,7 +50,10 @@ function getDatabaseType() {
50
50
  // Convert thrown errors to error object format for CLI
51
51
  // Strip [Frigg] prefix from error messages for cleaner CLI output
52
52
  const errorMessage = error.message.replace(/^\[Frigg\]\s*/, '');
53
- return { error: errorMessage };
53
+ return {
54
+ error: errorMessage,
55
+ stack: error.stack // Include stack trace for debugging
56
+ };
54
57
  }
55
58
  }
56
59