@friggframework/devtools 2.0.0--canary.531.f4960d7.0 → 2.0.0--canary.531.5ea5dab.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.
@@ -377,6 +377,11 @@ class IntegrationBuilder extends InfrastructureBuilder {
377
377
  Ref: queueReference,
378
378
  };
379
379
 
380
+ // Add queue ARN to environment (needed for EventBridge Scheduler targeting)
381
+ result.environment[`${integrationName.toUpperCase()}_QUEUE_ARN`] = {
382
+ 'Fn::GetAtt': [queueReference, 'Arn'],
383
+ };
384
+
380
385
  // Add queue name to custom section
381
386
  result.custom[queueReference] = queueName;
382
387
 
@@ -390,9 +395,41 @@ class IntegrationBuilder extends InfrastructureBuilder {
390
395
  // Add queue URL to environment for Lambda functions
391
396
  result.environment[`${integrationName.toUpperCase()}_QUEUE_URL`] = decision.physicalId;
392
397
 
398
+ // Derive ARN from URL (needed for EventBridge Scheduler targeting)
399
+ // URL format: https://sqs.{region}.amazonaws.com/{account-id}/{queue-name}
400
+ // ARN format: arn:aws:sqs:{region}:{account-id}:{queue-name}
401
+ const queueArn = this.deriveArnFromQueueUrl(decision.physicalId);
402
+ if (queueArn) {
403
+ result.environment[`${integrationName.toUpperCase()}_QUEUE_ARN`] = queueArn;
404
+ }
405
+
393
406
  console.log(` ✓ Using external queue: ${decision.physicalId}`);
394
407
  }
395
408
 
409
+ /**
410
+ * Derive SQS ARN from queue URL
411
+ * @param {string} queueUrl - SQS queue URL
412
+ * @returns {string|null} - SQS ARN or null if URL format is unrecognized
413
+ */
414
+ deriveArnFromQueueUrl(queueUrl) {
415
+ try {
416
+ // URL format: https://sqs.{region}.amazonaws.com/{account-id}/{queue-name}
417
+ const url = new URL(queueUrl);
418
+ const hostParts = url.hostname.split('.');
419
+ const region = hostParts[1]; // e.g., 'us-east-1'
420
+ const pathParts = url.pathname.split('/').filter(Boolean);
421
+ const accountId = pathParts[0];
422
+ const queueName = pathParts[1];
423
+
424
+ if (region && accountId && queueName) {
425
+ return `arn:aws:sqs:${region}:${accountId}:${queueName}`;
426
+ }
427
+ } catch (error) {
428
+ console.warn(` ⚠ Could not derive ARN from queue URL: ${queueUrl}`);
429
+ }
430
+ return null;
431
+ }
432
+
396
433
  /**
397
434
  * Capitalize first letter of string (e.g., 'slack' -> 'Slack')
398
435
  */
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.531.f4960d7.0",
4
+ "version": "2.0.0--canary.531.5ea5dab.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.531.f4960d7.0",
29
- "@friggframework/schemas": "2.0.0--canary.531.f4960d7.0",
30
- "@friggframework/test": "2.0.0--canary.531.f4960d7.0",
28
+ "@friggframework/core": "2.0.0--canary.531.5ea5dab.0",
29
+ "@friggframework/schemas": "2.0.0--canary.531.5ea5dab.0",
30
+ "@friggframework/test": "2.0.0--canary.531.5ea5dab.0",
31
31
  "@hapi/boom": "^10.0.1",
32
32
  "@inquirer/prompts": "^5.3.8",
33
33
  "axios": "^1.7.2",
@@ -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.531.f4960d7.0",
59
- "@friggframework/prettier-config": "2.0.0--canary.531.f4960d7.0",
58
+ "@friggframework/eslint-config": "2.0.0--canary.531.5ea5dab.0",
59
+ "@friggframework/prettier-config": "2.0.0--canary.531.5ea5dab.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": "f4960d75fb2d6fd3cd3fea23fdbda7e6d151beed"
91
+ "gitHead": "5ea5dabaae4cbfd82a68377cfb0d516d93a88bb9"
92
92
  }