@friggframework/devtools 2.0.0--canary.398.4f043c8.0 → 2.0.0--canary.397.5f65dbd.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/frigg-cli/build-command/index.js +2 -4
- package/frigg-cli/deploy-command/index.js +2 -5
- package/frigg-cli/index.js +1 -11
- package/infrastructure/create-frigg-infrastructure.js +2 -10
- package/infrastructure/serverless-template.js +48 -659
- package/package.json +5 -9
- package/test/index.js +2 -4
- package/test/mock-integration.js +4 -14
- package/frigg-cli/generate-iam-command.js +0 -115
- package/infrastructure/AWS-DISCOVERY-TROUBLESHOOTING.md +0 -245
- package/infrastructure/AWS-IAM-CREDENTIAL-NEEDS.md +0 -594
- package/infrastructure/DEPLOYMENT-INSTRUCTIONS.md +0 -268
- package/infrastructure/GENERATE-IAM-DOCS.md +0 -253
- package/infrastructure/IAM-POLICY-TEMPLATES.md +0 -175
- package/infrastructure/README-TESTING.md +0 -332
- package/infrastructure/WEBSOCKET-CONFIGURATION.md +0 -105
- package/infrastructure/__tests__/fixtures/mock-aws-resources.js +0 -391
- package/infrastructure/__tests__/helpers/test-utils.js +0 -277
- package/infrastructure/aws-discovery.js +0 -568
- package/infrastructure/aws-discovery.test.js +0 -373
- package/infrastructure/build-time-discovery.js +0 -206
- package/infrastructure/build-time-discovery.test.js +0 -375
- package/infrastructure/frigg-deployment-iam-stack.yaml +0 -377
- package/infrastructure/iam-generator.js +0 -696
- package/infrastructure/iam-generator.test.js +0 -169
- package/infrastructure/iam-policy-basic.json +0 -210
- package/infrastructure/iam-policy-full.json +0 -280
- package/infrastructure/integration.test.js +0 -383
- package/infrastructure/run-discovery.js +0 -110
- package/infrastructure/serverless-template.test.js +0 -541
- 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
|
-
|
|
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
|
|
1
|
+
const { spawn } = require('child_process');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
|
|
4
|
-
|
|
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';
|
package/frigg-cli/index.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
-
|
|
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,
|