@@ -36,21 +36,21 @@ export async function handler(_argv: ReturnType<typeof builder>['argv']): Promis
36
36
37
37
for ( const publishes of eitherHandler . right . publishes ?? [ ] ) {
38
38
if ( 'eventbridge' in publishes ) {
39
- constants [ camelcase ( `eventbridge_ ${ publishes . eventbridge . eventBusId } ` ) ] =
40
- `STARCHART_EVENTBRIDGE_${ publishes . eventbridge . eventBusId . replace ( / [ ^ a - z A - Z 0 - 9 ] + / g , '_' ) . toUpperCase ( ) } `
39
+ const _eventBusId = publishes . eventbridge . eventBusId . replace ( / [ ^ a - z A - Z 0 - 9 ] + / g , '_' )
40
+ constants [ camelcase ( `eventbridge_ ${ _eventBusId } ` ) ] = `STARCHART_EVENTBRIDGE_${ _eventBusId . toUpperCase ( ) } `
41
41
} else if ( 'sqs' in publishes ) {
42
- constants [ camelcase ( `sqs_ ${ publishes . sqs . queueId } ` ) ] =
43
- `STARCHART_SQS_${ publishes . sqs . queueId . replace ( / [ ^ a - z A - Z 0 - 9 ] + / g , '_' ) . toUpperCase ( ) } _QUEUE_URL`
42
+ const _queueId = publishes . sqs . queueId . replace ( / [ ^ a - z A - Z 0 - 9 ] + / g , '_' )
43
+ constants [ camelcase ( `sqs_ ${ _queueId } ` ) ] = `STARCHART_SQS_${ _queueId . toUpperCase ( ) } _QUEUE_URL`
44
44
}
45
45
}
46
46
47
47
for ( const resource of eitherHandler . right . resources ?? [ ] ) {
48
48
if ( 'dynamodb' in resource ) {
49
- constants [ camelcase ( `dynamodb_ ${ resource . dynamodb . tableId } ` ) ] =
50
- `STARCHART_${ resource . dynamodb . tableId . replace ( / [ ^ a - z A - Z 0 - 9 ] + / g , '_' ) . toUpperCase ( ) } _TABLE_NAME`
49
+ const _tableId = resource . dynamodb . tableId . replace ( / [ ^ a - z A - Z 0 - 9 ] + / g , '_' )
50
+ constants [ camelcase ( `dynamodb_ ${ _tableId } ` ) ] = `STARCHART_${ _tableId . toUpperCase ( ) } _TABLE_NAME`
51
51
} else if ( 's3' in resource ) {
52
- constants [ camelcase ( `s3_ ${ resource . s3 . bucketId } ` ) ] =
53
- `STARCHART_${ resource . s3 . bucketId . replace ( / [ ^ a - z A - Z 0 - 9 ] + / g , '_' ) . toUpperCase ( ) } _BUCKET_NAME`
52
+ const _bucketId = resource . s3 . bucketId . replace ( / [ ^ a - z A - Z 0 - 9 ] + / g , '_' )
53
+ constants [ camelcase ( `s3_ ${ _bucketId } ` ) ] = `STARCHART_${ _bucketId . toUpperCase ( ) } _BUCKET_NAME`
54
54
}
55
55
56
56
// @todo add secrets and parameters
0 commit comments