@friggframework/devtools 2.0.0--canary.398.53eac55.0 → 2.0.0--canary.397.878fefa.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.
@@ -1,11 +1,9 @@
1
1
  const { spawnSync } = require('child_process');
2
2
  const path = require('path');
3
3
 
4
- async function buildCommand(options) {
4
+ function buildCommand(options) {
5
5
  console.log('Building the serverless application...');
6
-
7
- // AWS discovery is now handled directly in serverless-template.js
8
- console.log('📦 Packaging serverless application...');
6
+ console.log('Hello from npm link world')
9
7
  const backendPath = path.resolve(process.cwd());
10
8
  const infrastructurePath = 'infrastructure.js';
11
9
  const command = 'serverless';
@@ -1,11 +1,8 @@
1
- const { spawn, spawnSync } = require('child_process');
1
+ const { spawn } = require('child_process');
2
2
  const path = require('path');
3
3
 
4
- async function deployCommand(options) {
4
+ function deployCommand(options) {
5
5
  console.log('Deploying the serverless application...');
6
-
7
- // AWS discovery is now handled directly in serverless-template.js
8
- console.log('🚀 Deploying serverless application...');
9
6
  const backendPath = path.resolve(process.cwd());
10
7
  const infrastructurePath = 'infrastructure.js';
11
8
  const command = 'serverless';
@@ -5,7 +5,6 @@ const { installCommand } = require('./install-command');
5
5
  const { startCommand } = require('./start-command'); // Assuming you have a startCommand module
6
6
  const { buildCommand } = require('./build-command');
7
7
  const { deployCommand } = require('./deploy-command');
8
- const { generateIamCommand } = require('./generate-iam-command');
9
8
 
10
9
  const program = new Command();
11
10
  program
@@ -34,15 +33,6 @@ program
34
33
  .option('-v, --verbose', 'enable verbose output')
35
34
  .action(deployCommand);
36
35
 
37
- program
38
- .command('generate-iam')
39
- .description('Generate IAM CloudFormation template based on app definition')
40
- .option('-o, --output <path>', 'output directory', 'backend/infrastructure')
41
- .option('-u, --user <name>', 'deployment user name', 'frigg-deployment-user')
42
- .option('-s, --stack-name <name>', 'CloudFormation stack name', 'frigg-deployment-iam')
43
- .option('-v, --verbose', 'enable verbose output')
44
- .action(generateIamCommand);
45
-
46
36
  program.parse(process.argv);
47
37
 
48
- module.exports = { installCommand, startCommand, buildCommand, deployCommand, generateIamCommand };
38
+ module.exports = { installCommand, startCommand, buildCommand, deployCommand };
@@ -1,10 +1,9 @@
1
1
  const path = require('path');
2
2
  const fs = require('fs-extra');
3
3
  const { composeServerlessDefinition } = require('./serverless-template');
4
-
5
4
  const { findNearestBackendPackageJson } = require('@friggframework/core');
6
5
 
7
- async function createFriggInfrastructure() {
6
+ function createFriggInfrastructure() {
8
7
  const backendPath = findNearestBackendPackageJson();
9
8
  if (!backendPath) {
10
9
  throw new Error('Could not find backend package.json');
@@ -19,14 +18,7 @@ async function createFriggInfrastructure() {
19
18
  const backend = require(backendFilePath);
20
19
  const appDefinition = backend.Definition;
21
20
 
22
- // const serverlessTemplate = require(path.resolve(
23
- // __dirname,
24
- // './serverless-template.js'
25
- // ));
26
- const definition = await composeServerlessDefinition(
27
- appDefinition,
28
- backend.IntegrationFactory
29
- );
21
+ const definition = composeServerlessDefinition(appDefinition);
30
22
 
31
23
  return {
32
24
  ...definition,