@friggframework/devtools 2.0.0--canary.398.a314355.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.
Files changed (30) hide show
  1. package/frigg-cli/build-command/index.js +2 -4
  2. package/frigg-cli/deploy-command/index.js +2 -5
  3. package/frigg-cli/index.js +1 -11
  4. package/infrastructure/create-frigg-infrastructure.js +2 -10
  5. package/infrastructure/serverless-template.js +27 -599
  6. package/package.json +5 -9
  7. package/test/mock-integration.js +4 -14
  8. package/frigg-cli/generate-iam-command.js +0 -115
  9. package/infrastructure/AWS-DISCOVERY-TROUBLESHOOTING.md +0 -245
  10. package/infrastructure/AWS-IAM-CREDENTIAL-NEEDS.md +0 -561
  11. package/infrastructure/DEPLOYMENT-INSTRUCTIONS.md +0 -268
  12. package/infrastructure/GENERATE-IAM-DOCS.md +0 -253
  13. package/infrastructure/IAM-POLICY-TEMPLATES.md +0 -172
  14. package/infrastructure/README-TESTING.md +0 -332
  15. package/infrastructure/WEBSOCKET-CONFIGURATION.md +0 -105
  16. package/infrastructure/__tests__/fixtures/mock-aws-resources.js +0 -391
  17. package/infrastructure/__tests__/helpers/test-utils.js +0 -277
  18. package/infrastructure/aws-discovery.js +0 -460
  19. package/infrastructure/aws-discovery.test.js +0 -373
  20. package/infrastructure/build-time-discovery.js +0 -206
  21. package/infrastructure/build-time-discovery.test.js +0 -375
  22. package/infrastructure/frigg-deployment-iam-stack.yaml +0 -365
  23. package/infrastructure/iam-generator.js +0 -696
  24. package/infrastructure/iam-generator.test.js +0 -169
  25. package/infrastructure/iam-policy-basic.json +0 -196
  26. package/infrastructure/iam-policy-full.json +0 -266
  27. package/infrastructure/integration.test.js +0 -383
  28. package/infrastructure/run-discovery.js +0 -110
  29. package/infrastructure/serverless-template.test.js +0 -498
  30. package/test/auther-definition-tester.js +0 -125
@@ -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,