@mbc-cqrs-serverless/cli 0.1.44-beta.0 → 0.1.45-beta.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.
- package/package.json +2 -2
- package/templates/.env.local +1 -0
- package/templates/infra/libs/infra-stack.ts +3 -0
- package/templates/infra/test/__snapshots__/infra.test.ts.snap +10 -0
- package/templates/infra-local/cognito-local/package-lock.json +11 -9
- package/templates/infra-local/elasticmq.conf +5 -0
- package/templates/infra-local/serverless.yml +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mbc-cqrs-serverless/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45-beta.0",
|
|
4
4
|
"description": "a CLI to get started with MBC CQRS serverless framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mbc",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@faker-js/faker": "^8.3.1"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "6dfc72e062a7c97915aca77c3f2438e198785d1f"
|
|
53
53
|
}
|
package/templates/.env.local
CHANGED
|
@@ -30,6 +30,7 @@ SFN_COMMAND_ARN=arn:aws:states:ap-northeast-1:101010101010:stateMachine:command
|
|
|
30
30
|
SNS_ENDPOINT=http://localhost:4002
|
|
31
31
|
SNS_REGION=ap-northeast-1
|
|
32
32
|
SNS_TOPIC_ARN=arn:aws:sns:ap-northeast-1:101010101010:CqrsSnsTopic
|
|
33
|
+
SNS_ALARM_TOPIC_ARN=arn:aws:sns:ap-northeast-1:101010101010:AlarmSnsTopic
|
|
33
34
|
# Cognito endpoint, useful for local development
|
|
34
35
|
COGNITO_URL=http://localhost:9229
|
|
35
36
|
COGNITO_USER_POOL_ID=local_2G7noHgW
|
|
@@ -334,6 +334,7 @@ export class InfraStack extends cdk.Stack {
|
|
|
334
334
|
S3_BUCKET_NAME: ddbBucket.bucketName,
|
|
335
335
|
SFN_COMMAND_ARN: commandSfnArn,
|
|
336
336
|
SNS_TOPIC_ARN: mainSns.topicArn,
|
|
337
|
+
SNS_ALARM_TOPIC_ARN: alarmSns.topicArn,
|
|
337
338
|
COGNITO_USER_POOL_ID: userPool.userPoolId,
|
|
338
339
|
APPSYNC_ENDPOINT: appSyncApi.graphqlUrl,
|
|
339
340
|
SES_FROM_EMAIL: props.config.fromEmailAddress,
|
|
@@ -838,6 +839,7 @@ export class InfraStack extends cdk.Stack {
|
|
|
838
839
|
ddbBucket.grantReadWrite(lambdaApi)
|
|
839
840
|
publicBucket.grantReadWrite(lambdaApi)
|
|
840
841
|
mainSns.grantPublish(lambdaApi)
|
|
842
|
+
alarmSns.grantPublish(lambdaApi)
|
|
841
843
|
taskSqs.grantSendMessages(lambdaApi)
|
|
842
844
|
notifySqs.grantSendMessages(lambdaApi)
|
|
843
845
|
appSyncApi.grantMutation(lambdaApi)
|
|
@@ -912,6 +914,7 @@ export class InfraStack extends cdk.Stack {
|
|
|
912
914
|
ddbBucket.grantReadWrite(taskRole)
|
|
913
915
|
publicBucket.grantReadWrite(taskRole)
|
|
914
916
|
mainSns.grantPublish(taskRole)
|
|
917
|
+
alarmSns.grantPublish(taskRole)
|
|
915
918
|
taskSqs.grantSendMessages(taskRole)
|
|
916
919
|
notifySqs.grantSendMessages(taskRole)
|
|
917
920
|
appSyncApi.grantMutation(taskRole)
|
|
@@ -642,6 +642,9 @@ exports[`snapshot test for InfraStack 1`] = `
|
|
|
642
642
|
},
|
|
643
643
|
"SES_FROM_EMAIL": "noreply@mbc-cqrs-serverless.mbc-net.com",
|
|
644
644
|
"SFN_COMMAND_ARN": "arn:aws:states:ap-northeast-1:101010101010:stateMachine:dev-cdk-test-deploy-command-handler",
|
|
645
|
+
"SNS_ALARM_TOPIC_ARN": {
|
|
646
|
+
"Ref": "alarmsnsFB7BBC3B",
|
|
647
|
+
},
|
|
645
648
|
"SNS_TOPIC_ARN": {
|
|
646
649
|
"Ref": "mainsnsC0381B34",
|
|
647
650
|
},
|
|
@@ -994,6 +997,13 @@ exports[`snapshot test for InfraStack 1`] = `
|
|
|
994
997
|
"Ref": "mainsnsC0381B34",
|
|
995
998
|
},
|
|
996
999
|
},
|
|
1000
|
+
{
|
|
1001
|
+
"Action": "sns:Publish",
|
|
1002
|
+
"Effect": "Allow",
|
|
1003
|
+
"Resource": {
|
|
1004
|
+
"Ref": "alarmsnsFB7BBC3B",
|
|
1005
|
+
},
|
|
1006
|
+
},
|
|
997
1007
|
{
|
|
998
1008
|
"Action": [
|
|
999
1009
|
"sqs:SendMessage",
|
|
@@ -919,10 +919,9 @@
|
|
|
919
919
|
}
|
|
920
920
|
},
|
|
921
921
|
"node_modules/express": {
|
|
922
|
-
"version": "4.21.
|
|
923
|
-
"resolved": "https://registry.npmjs.org/express/-/express-4.21.
|
|
924
|
-
"integrity": "sha512-
|
|
925
|
-
"license": "MIT",
|
|
922
|
+
"version": "4.21.2",
|
|
923
|
+
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
|
924
|
+
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
|
|
926
925
|
"dependencies": {
|
|
927
926
|
"accepts": "~1.3.8",
|
|
928
927
|
"array-flatten": "1.1.1",
|
|
@@ -943,7 +942,7 @@
|
|
|
943
942
|
"methods": "~1.1.2",
|
|
944
943
|
"on-finished": "2.4.1",
|
|
945
944
|
"parseurl": "~1.3.3",
|
|
946
|
-
"path-to-regexp": "0.1.
|
|
945
|
+
"path-to-regexp": "0.1.12",
|
|
947
946
|
"proxy-addr": "~2.0.7",
|
|
948
947
|
"qs": "6.13.0",
|
|
949
948
|
"range-parser": "~1.2.1",
|
|
@@ -958,6 +957,10 @@
|
|
|
958
957
|
},
|
|
959
958
|
"engines": {
|
|
960
959
|
"node": ">= 0.10.0"
|
|
960
|
+
},
|
|
961
|
+
"funding": {
|
|
962
|
+
"type": "opencollective",
|
|
963
|
+
"url": "https://opencollective.com/express"
|
|
961
964
|
}
|
|
962
965
|
},
|
|
963
966
|
"node_modules/fast-redact": {
|
|
@@ -1854,10 +1857,9 @@
|
|
|
1854
1857
|
}
|
|
1855
1858
|
},
|
|
1856
1859
|
"node_modules/path-to-regexp": {
|
|
1857
|
-
"version": "0.1.
|
|
1858
|
-
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.
|
|
1859
|
-
"integrity": "sha512-
|
|
1860
|
-
"license": "MIT"
|
|
1860
|
+
"version": "0.1.12",
|
|
1861
|
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
|
1862
|
+
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ=="
|
|
1861
1863
|
},
|
|
1862
1864
|
"node_modules/picomatch": {
|
|
1863
1865
|
"version": "2.3.1",
|
|
@@ -40,6 +40,10 @@ custom:
|
|
|
40
40
|
['notification-action', 'command-status', 'task-status'],
|
|
41
41
|
}
|
|
42
42
|
queue: http://localhost:9324/101010101010/notification-queue
|
|
43
|
+
- topic:
|
|
44
|
+
topicName: AlarmSnsTopic
|
|
45
|
+
rawMessageDelivery: 'true'
|
|
46
|
+
queue: http://localhost:9324/101010101010/alarm-queue
|
|
43
47
|
# host: 0.0.0.0 # Optional, defaults to 127.0.0.1 if not provided to serverless-offline
|
|
44
48
|
# sns-endpoint: http://127.0.0.1:4567 # Optional. Only if you want to use a custom SNS provider endpoint
|
|
45
49
|
# sns-subscribe-endpoint: http://127.0.0.1:3000 # Optional. Only if you want to use a custom subscribe endpoint from SNS to send messages back to
|