@mbc-cqrs-serverless/cli 0.1.44-beta.0 → 0.1.46-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/appsync-simulator/package-lock.json +11 -7
- 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.46-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": "d26aec8cdbfe866052eb2724e1c5b723802d508b"
|
|
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",
|
|
@@ -1768,9 +1768,9 @@
|
|
|
1768
1768
|
}
|
|
1769
1769
|
},
|
|
1770
1770
|
"node_modules/express": {
|
|
1771
|
-
"version": "4.21.
|
|
1772
|
-
"resolved": "https://registry.npmjs.org/express/-/express-4.21.
|
|
1773
|
-
"integrity": "sha512-
|
|
1771
|
+
"version": "4.21.2",
|
|
1772
|
+
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
|
1773
|
+
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
|
|
1774
1774
|
"license": "MIT",
|
|
1775
1775
|
"dependencies": {
|
|
1776
1776
|
"accepts": "~1.3.8",
|
|
@@ -1792,7 +1792,7 @@
|
|
|
1792
1792
|
"methods": "~1.1.2",
|
|
1793
1793
|
"on-finished": "2.4.1",
|
|
1794
1794
|
"parseurl": "~1.3.3",
|
|
1795
|
-
"path-to-regexp": "0.1.
|
|
1795
|
+
"path-to-regexp": "0.1.12",
|
|
1796
1796
|
"proxy-addr": "~2.0.7",
|
|
1797
1797
|
"qs": "6.13.0",
|
|
1798
1798
|
"range-parser": "~1.2.1",
|
|
@@ -1807,6 +1807,10 @@
|
|
|
1807
1807
|
},
|
|
1808
1808
|
"engines": {
|
|
1809
1809
|
"node": ">= 0.10.0"
|
|
1810
|
+
},
|
|
1811
|
+
"funding": {
|
|
1812
|
+
"type": "opencollective",
|
|
1813
|
+
"url": "https://opencollective.com/express"
|
|
1810
1814
|
}
|
|
1811
1815
|
},
|
|
1812
1816
|
"node_modules/external-editor": {
|
|
@@ -3398,9 +3402,9 @@
|
|
|
3398
3402
|
"license": "MIT"
|
|
3399
3403
|
},
|
|
3400
3404
|
"node_modules/path-to-regexp": {
|
|
3401
|
-
"version": "0.1.
|
|
3402
|
-
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.
|
|
3403
|
-
"integrity": "sha512-
|
|
3405
|
+
"version": "0.1.12",
|
|
3406
|
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
|
3407
|
+
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
|
|
3404
3408
|
"license": "MIT"
|
|
3405
3409
|
},
|
|
3406
3410
|
"node_modules/path-type": {
|
|
@@ -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
|