@friggframework/devtools 2.0.0--canary.474.aa465e4.0 → 2.0.0--canary.474.213c7d9.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.
@@ -89,6 +89,45 @@ describe('CLI Command: deploy', () => {
89
89
  );
90
90
  });
91
91
 
92
+ it('should spawn serverless with --force flag when force option is true', async () => {
93
+ await deployCommand({ stage: 'dev', force: true });
94
+
95
+ expect(spawn).toHaveBeenCalledWith(
96
+ 'osls',
97
+ ['deploy', '--config', 'infrastructure.js', '--stage', 'dev', '--force'],
98
+ expect.objectContaining({
99
+ cwd: expect.any(String),
100
+ stdio: 'inherit'
101
+ })
102
+ );
103
+ });
104
+
105
+ it('should spawn serverless without --force flag when force option is false', async () => {
106
+ await deployCommand({ stage: 'dev', force: false });
107
+
108
+ expect(spawn).toHaveBeenCalledWith(
109
+ 'osls',
110
+ ['deploy', '--config', 'infrastructure.js', '--stage', 'dev'],
111
+ expect.objectContaining({
112
+ cwd: expect.any(String),
113
+ stdio: 'inherit'
114
+ })
115
+ );
116
+ });
117
+
118
+ it('should spawn serverless without --force flag when force option is undefined', async () => {
119
+ await deployCommand({ stage: 'dev' });
120
+
121
+ expect(spawn).toHaveBeenCalledWith(
122
+ 'osls',
123
+ ['deploy', '--config', 'infrastructure.js', '--stage', 'dev'],
124
+ expect.objectContaining({
125
+ cwd: expect.any(String),
126
+ stdio: 'inherit'
127
+ })
128
+ );
129
+ });
130
+
92
131
  it('should use process.cwd() as working directory', async () => {
93
132
  await deployCommand({ stage: 'dev' });
94
133
 
@@ -146,6 +146,11 @@ function executeServerlessDeployment(environment, options) {
146
146
  options.stage,
147
147
  ];
148
148
 
149
+ // Add --force flag if force option is true
150
+ if (options.force === true) {
151
+ serverlessArgs.push('--force');
152
+ }
153
+
149
154
  const childProcess = spawn(COMMANDS.SERVERLESS, serverlessArgs, {
150
155
  cwd: path.resolve(process.cwd()),
151
156
  stdio: 'inherit',
@@ -45,6 +45,7 @@ program
45
45
  .description('Deploy the serverless application')
46
46
  .option('-s, --stage <stage>', 'deployment stage', 'dev')
47
47
  .option('-v, --verbose', 'enable verbose output')
48
+ .option('-f, --force', 'force deployment (bypasses caching for layers and functions)')
48
49
  .action(deployCommand);
49
50
 
50
51
  program
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@friggframework/devtools",
3
3
  "prettier": "@friggframework/prettier-config",
4
- "version": "2.0.0--canary.474.aa465e4.0",
4
+ "version": "2.0.0--canary.474.213c7d9.0",
5
5
  "dependencies": {
6
6
  "@aws-sdk/client-ec2": "^3.835.0",
7
7
  "@aws-sdk/client-kms": "^3.835.0",
@@ -11,8 +11,8 @@
11
11
  "@babel/eslint-parser": "^7.18.9",
12
12
  "@babel/parser": "^7.25.3",
13
13
  "@babel/traverse": "^7.25.3",
14
- "@friggframework/schemas": "2.0.0--canary.474.aa465e4.0",
15
- "@friggframework/test": "2.0.0--canary.474.aa465e4.0",
14
+ "@friggframework/schemas": "2.0.0--canary.474.213c7d9.0",
15
+ "@friggframework/test": "2.0.0--canary.474.213c7d9.0",
16
16
  "@hapi/boom": "^10.0.1",
17
17
  "@inquirer/prompts": "^5.3.8",
18
18
  "axios": "^1.7.2",
@@ -34,8 +34,8 @@
34
34
  "serverless-http": "^2.7.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@friggframework/eslint-config": "2.0.0--canary.474.aa465e4.0",
38
- "@friggframework/prettier-config": "2.0.0--canary.474.aa465e4.0",
37
+ "@friggframework/eslint-config": "2.0.0--canary.474.213c7d9.0",
38
+ "@friggframework/prettier-config": "2.0.0--canary.474.213c7d9.0",
39
39
  "aws-sdk-client-mock": "^4.1.0",
40
40
  "aws-sdk-client-mock-jest": "^4.1.0",
41
41
  "jest": "^30.1.3",
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "aa465e49207b1725bc36827e65efdd54ad879337"
73
+ "gitHead": "213c7d97e55af514edda57bfad6eecfbb0d35314"
74
74
  }