@friggframework/devtools 2.0.0--canary.461.2d5ab00.0 → 2.0.0--canary.461.4c872e7.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.
@@ -320,6 +320,8 @@ class MigrationBuilder extends InfrastructureBuilder {
320
320
  // Add IAM permissions for S3 (migration status storage)
321
321
  // Migration functions need to read/write migration status in S3
322
322
  // to avoid chicken-and-egg dependency on User/Process tables
323
+
324
+ // Object-level permissions (put, get, delete)
323
325
  result.iamStatements.push({
324
326
  Effect: 'Allow',
325
327
  Action: [
@@ -338,6 +340,13 @@ class MigrationBuilder extends InfrastructureBuilder {
338
340
  },
339
341
  });
340
342
 
343
+ // Bucket-level permissions (list objects, needed to check if migration status exists)
344
+ result.iamStatements.push({
345
+ Effect: 'Allow',
346
+ Action: ['s3:ListBucket'],
347
+ Resource: { 'Fn::GetAtt': ['FriggMigrationStatusBucket', 'Arn'] },
348
+ });
349
+
341
350
  console.log(' ✓ Added S3 IAM permissions for migration status tracking');
342
351
 
343
352
  console.log(`[${this.name}] ✅ Migration infrastructure configuration completed`);
@@ -246,6 +246,42 @@ describe('MigrationBuilder', () => {
246
246
  });
247
247
  });
248
248
 
249
+ it('should add S3 IAM permissions including ListBucket', async () => {
250
+ const appDef = {
251
+ database: {
252
+ postgres: {
253
+ enable: true,
254
+ },
255
+ },
256
+ };
257
+
258
+ const result = await builder.build(appDef, {});
259
+
260
+ // Should have object-level permissions
261
+ expect(result.iamStatements).toContainEqual(
262
+ expect.objectContaining({
263
+ Effect: 'Allow',
264
+ Action: expect.arrayContaining([
265
+ 's3:PutObject',
266
+ 's3:GetObject',
267
+ 's3:DeleteObject',
268
+ ]),
269
+ Resource: expect.objectContaining({
270
+ 'Fn::Join': expect.anything(),
271
+ }),
272
+ })
273
+ );
274
+
275
+ // Should have bucket-level ListBucket permission (needed to check if objects exist)
276
+ expect(result.iamStatements).toContainEqual(
277
+ expect.objectContaining({
278
+ Effect: 'Allow',
279
+ Action: ['s3:ListBucket'],
280
+ Resource: { 'Fn::GetAtt': ['FriggMigrationStatusBucket', 'Arn'] },
281
+ })
282
+ );
283
+ });
284
+
249
285
  it('should only include Prisma layer in worker (router doesn\'t need database)', async () => {
250
286
  const appDef = {
251
287
  database: {
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.461.2d5ab00.0",
4
+ "version": "2.0.0--canary.461.4c872e7.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.461.2d5ab00.0",
15
- "@friggframework/test": "2.0.0--canary.461.2d5ab00.0",
14
+ "@friggframework/schemas": "2.0.0--canary.461.4c872e7.0",
15
+ "@friggframework/test": "2.0.0--canary.461.4c872e7.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.461.2d5ab00.0",
38
- "@friggframework/prettier-config": "2.0.0--canary.461.2d5ab00.0",
37
+ "@friggframework/eslint-config": "2.0.0--canary.461.4c872e7.0",
38
+ "@friggframework/prettier-config": "2.0.0--canary.461.4c872e7.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": "2d5ab0050ff82c5337c813367541b12f8489d427"
73
+ "gitHead": "4c872e770d1fddbd8689bf5ec2e26b6d21ae1d2f"
74
74
  }