@friggframework/devtools 2.0.0--canary.608.03436383054a.0 → 2.0.0--canary.608.e6b65ff.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.
@@ -196,8 +196,6 @@ class IntegrationBuilder extends InfrastructureBuilder {
196
196
  );
197
197
  }
198
198
 
199
- // App-level FIFO queue for dispatch:'queue' events — one per app,
200
- // independent of per-integration queue ownership.
201
199
  this.createUserActionQueue(result, functionPackageConfig, usePrismaLayer);
202
200
 
203
201
  for (const integration of appDefinition.integrations) {
@@ -477,13 +475,9 @@ class IntegrationBuilder extends InfrastructureBuilder {
477
475
  }
478
476
 
479
477
  /**
480
- * Create the app-level FIFO queue + FIFO DLQ + worker used by integration
481
- * events declared with `dispatch: 'queue'`.
482
- *
483
- * A single queue serves every integration: `MessageGroupId = integrationId`
484
- * (set by the producer) serializes events per integration while letting
485
- * distinct integrations process in parallel. Always created, like the
486
- * InternalErrorQueue — idle cost is ~$0.
478
+ * App-level FIFO queue + DLQ + worker for `dispatch: 'queue'` events. One
479
+ * queue serves all integrations; MessageGroupId = integrationId serializes
480
+ * per integration. Always created, like the InternalErrorQueue.
487
481
  */
488
482
  createUserActionQueue(result, functionPackageConfig, usePrismaLayer = true) {
489
483
  const queueName =
@@ -504,10 +498,8 @@ class IntegrationBuilder extends InfrastructureBuilder {
504
498
  },
505
499
  };
506
500
 
507
- // ContentBasedDeduplication is intentionally OMITTED. The producer
508
- // supplies a unique MessageDeduplicationId per send, so two distinct
509
- // requests with identical bodies both run — content-based dedup would
510
- // hash the body and silently drop the second within the 5-min window.
501
+ // No ContentBasedDeduplication: the producer sends a unique dedup id so
502
+ // two distinct requests with identical bodies both run (not deduped).
511
503
  result.resources.FriggUserActionQueue = {
512
504
  Type: 'AWS::SQS::Queue',
513
505
  Properties: {
@@ -524,13 +516,10 @@ class IntegrationBuilder extends InfrastructureBuilder {
524
516
  },
525
517
  };
526
518
 
527
- // Expose the queue URL to ALL Lambdas — both the HTTP handlers that
528
- // produce events and the worker that consumes them.
529
519
  result.environment.USER_ACTION_QUEUE_URL = {
530
520
  Ref: 'FriggUserActionQueue',
531
521
  };
532
522
 
533
- // Any message in the FIFO DLQ is a failed eventual event.
534
523
  result.resources.FriggUserActionDLQAlarm = {
535
524
  Type: 'AWS::CloudWatch::Alarm',
536
525
  Properties: {
@@ -555,9 +544,8 @@ class IntegrationBuilder extends InfrastructureBuilder {
555
544
  },
556
545
  };
557
546
 
558
- // Single app-level worker. NO reservedConcurrency: FIFO already
559
- // serializes per MessageGroupId; capping at 1 would serialize across
560
- // ALL integrations and kill cross-integration parallelism.
547
+ // No reservedConcurrency: FIFO already serializes per group; capping
548
+ // would serialize across all integrations.
561
549
  result.functions.userActionQueueWorker = {
562
550
  handler:
563
551
  'node_modules/@friggframework/core/handlers/workers/user-action-worker.userActionQueueWorker',
@@ -751,9 +751,7 @@ describe('IntegrationBuilder', () => {
751
751
 
752
752
  const functionKeys = Object.keys(result.functions);
753
753
 
754
- // Expected order: dlqProcessor + userActionQueueWorker (both
755
- // app-level, created before the integration loop), then webhook,
756
- // integration, queueWorker.
754
+ // App-level functions (dlqProcessor, userActionQueueWorker) come first.
757
755
  expect(functionKeys).toEqual([
758
756
  'dlqProcessor',
759
757
  'userActionQueueWorker',
@@ -426,9 +426,7 @@ function generateIAMCloudFormation(options = {}) {
426
426
  ],
427
427
  Resource: [
428
428
  { 'Fn::Sub': 'arn:aws:sqs:*:${AWS::AccountId}:*frigg*' },
429
- // IAM wildcard matching is case-sensitive; the app-level FIFO
430
- // queue is named "...-FriggUserActionQueue.fifo", which the
431
- // lowercase "*frigg*" glob would not match.
429
+ // Case-sensitive: lowercase "*frigg*" won't match "FriggUserActionQueue.fifo".
432
430
  { 'Fn::Sub': 'arn:aws:sqs:*:${AWS::AccountId}:*Frigg*' },
433
431
  {
434
432
  'Fn::Sub':
@@ -205,8 +205,7 @@ Resources:
205
205
  - 'sqs:UntagQueue'
206
206
  Resource:
207
207
  - !Sub 'arn:aws:sqs:*:${AWS::AccountId}:*frigg*'
208
- # Case-sensitive glob: the app-level FIFO queue is named
209
- # "...-FriggUserActionQueue.fifo" which "*frigg*" would not match.
208
+ # Case-sensitive: lowercase "*frigg*" won't match "FriggUserActionQueue.fifo".
210
209
  - !Sub 'arn:aws:sqs:*:${AWS::AccountId}:*Frigg*'
211
210
  - !Sub 'arn:aws:sqs:*:${AWS::AccountId}:internal-error-queue-*'
212
211
 
@@ -196,9 +196,7 @@ function createBaseDefinition(
196
196
  ],
197
197
  Resource: [
198
198
  { 'Fn::GetAtt': ['InternalErrorQueue', 'Arn'] },
199
- // Explicit ARN: the per-integration glob below ends in
200
- // "-*Queue" and does NOT match the ".fifo" suffix, so the
201
- // app-level FIFO queue must be listed directly.
199
+ // Explicit: the "-*Queue" glob below doesn't match ".fifo".
202
200
  { 'Fn::GetAtt': ['FriggUserActionQueue', 'Arn'] },
203
201
  {
204
202
  'Fn::Join': [
@@ -134,8 +134,7 @@ describe('Base Definition Factory', () => {
134
134
  );
135
135
  expect(sqsPermission).toBeDefined();
136
136
 
137
- // The per-integration glob ends in "-*Queue" and won't match the
138
- // ".fifo" app-level queue, so its ARN must be listed explicitly.
137
+ // The "-*Queue" glob doesn't match ".fifo", so the ARN is explicit.
139
138
  expect(sqsPermission.Resource).toContainEqual({
140
139
  'Fn::GetAtt': ['FriggUserActionQueue', 'Arn'],
141
140
  });
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.608.03436383054a.0",
4
+ "version": "2.0.0--canary.608.e6b65ff.0",
5
5
  "bin": {
6
6
  "frigg": "./frigg-cli/index.js"
7
7
  },
@@ -25,9 +25,9 @@
25
25
  "@babel/eslint-parser": "^7.18.9",
26
26
  "@babel/parser": "^7.25.3",
27
27
  "@babel/traverse": "^7.25.3",
28
- "@friggframework/core": "2.0.0--canary.608.03436383054a.0",
29
- "@friggframework/schemas": "2.0.0--canary.608.03436383054a.0",
30
- "@friggframework/test": "2.0.0--canary.608.03436383054a.0",
28
+ "@friggframework/core": "2.0.0--canary.608.e6b65ff.0",
29
+ "@friggframework/schemas": "2.0.0--canary.608.e6b65ff.0",
30
+ "@friggframework/test": "2.0.0--canary.608.e6b65ff.0",
31
31
  "@hapi/boom": "^10.0.1",
32
32
  "@inquirer/prompts": "^5.3.8",
33
33
  "axios": "^1.18.0",
@@ -55,8 +55,8 @@
55
55
  "validate-npm-package-name": "^5.0.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@friggframework/eslint-config": "2.0.0--canary.608.03436383054a.0",
59
- "@friggframework/prettier-config": "2.0.0--canary.608.03436383054a.0",
58
+ "@friggframework/eslint-config": "2.0.0--canary.608.e6b65ff.0",
59
+ "@friggframework/prettier-config": "2.0.0--canary.608.e6b65ff.0",
60
60
  "aws-sdk-client-mock": "^4.1.0",
61
61
  "aws-sdk-client-mock-jest": "^4.1.0",
62
62
  "jest": "^30.1.3",
@@ -88,5 +88,5 @@
88
88
  "publishConfig": {
89
89
  "access": "public"
90
90
  },
91
- "gitHead": "03436383054a3ee70bd4de8f13a1907890a627da"
91
+ "gitHead": "e6b65ff3bf4a3b3e7777a1f2a6cf1cecd24bedd7"
92
92
  }