@mbc-cqrs-serverless/cli 0.1.43-beta.0 → 0.1.44-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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mbc-cqrs-serverless/cli",
3
- "version": "0.1.43-beta.0",
3
+ "version": "0.1.44-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": "ba6fe38347775dddd091df2fe8b5a27e83006bd6"
52
+ "gitHead": "f665caba932043dd90272d60d408203737daa7bd"
53
53
  }
@@ -72,7 +72,7 @@ export class InfraStack extends cdk.Stack {
72
72
  mfa: cdk.aws_cognito.Mfa.OFF,
73
73
  accountRecovery: cdk.aws_cognito.AccountRecovery.NONE,
74
74
  customAttributes: {
75
- tenant_code: new cdk.aws_cognito.StringAttribute({
75
+ tenant: new cdk.aws_cognito.StringAttribute({
76
76
  mutable: true,
77
77
  maxLen: 50,
78
78
  }),
@@ -697,9 +697,15 @@ export class InfraStack extends cdk.Stack {
697
697
  transformData,
698
698
  cdk.aws_stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
699
699
  )
700
+ const setTtlCommand = lambdaInvoke(
701
+ 'set_ttl_command',
702
+ historyCopy,
703
+ cdk.aws_stepfunctions.IntegrationPattern.REQUEST_RESPONSE,
704
+ )
705
+
700
706
  const waitPrevCommand = lambdaInvoke(
701
707
  'wait_prev_command',
702
- historyCopy,
708
+ setTtlCommand,
703
709
  cdk.aws_stepfunctions.IntegrationPattern.WAIT_FOR_TASK_TOKEN,
704
710
  )
705
711
 
@@ -713,7 +719,7 @@ export class InfraStack extends cdk.Stack {
713
719
  )
714
720
  .when(
715
721
  cdk.aws_stepfunctions.Condition.numberEquals('$.result', 0),
716
- historyCopy,
722
+ setTtlCommand,
717
723
  )
718
724
  .when(
719
725
  cdk.aws_stepfunctions.Condition.numberEquals('$.result', 1),
@@ -242,7 +242,7 @@ exports[`snapshot test for InfraStack 1`] = `
242
242
  "Arn",
243
243
  ],
244
244
  },
245
- "","Payload":{"input.$":"$","context.$":"$$"}}},"check_version_result":{"Type":"Choice","Choices":[{"Variable":"$.result","NumericEquals":0,"Next":"history_copy"},{"Variable":"$.result","NumericEquals":1,"Next":"wait_prev_command"},{"Variable":"$.result","NumericEquals":-1,"Next":"fail"}],"Default":"wait_prev_command"},"wait_prev_command":{"Next":"history_copy","Retry":[{"ErrorEquals":["Lambda.ClientExecutionTimeoutException","Lambda.ServiceException","Lambda.AWSLambdaException","Lambda.SdkClientException"],"IntervalSeconds":2,"MaxAttempts":6,"BackoffRate":2}],"Type":"Task","OutputPath":"$.Payload[0][0]","Resource":"arn:",
245
+ "","Payload":{"input.$":"$","context.$":"$$"}}},"check_version_result":{"Type":"Choice","Choices":[{"Variable":"$.result","NumericEquals":0,"Next":"set_ttl_command"},{"Variable":"$.result","NumericEquals":1,"Next":"wait_prev_command"},{"Variable":"$.result","NumericEquals":-1,"Next":"fail"}],"Default":"wait_prev_command"},"wait_prev_command":{"Next":"set_ttl_command","Retry":[{"ErrorEquals":["Lambda.ClientExecutionTimeoutException","Lambda.ServiceException","Lambda.AWSLambdaException","Lambda.SdkClientException"],"IntervalSeconds":2,"MaxAttempts":6,"BackoffRate":2}],"Type":"Task","OutputPath":"$.Payload[0][0]","Resource":"arn:",
246
246
  {
247
247
  "Ref": "AWS::Partition",
248
248
  },
@@ -253,7 +253,18 @@ exports[`snapshot test for InfraStack 1`] = `
253
253
  "Arn",
254
254
  ],
255
255
  },
256
- "","Payload":{"input.$":"$","context.$":"$$","taskToken.$":"$$.Task.Token"}}},"history_copy":{"Next":"transform_data","Retry":[{"ErrorEquals":["Lambda.ClientExecutionTimeoutException","Lambda.ServiceException","Lambda.AWSLambdaException","Lambda.SdkClientException"],"IntervalSeconds":2,"MaxAttempts":6,"BackoffRate":2}],"Type":"Task","OutputPath":"$.Payload[0][0]","Resource":"arn:",
256
+ "","Payload":{"input.$":"$","context.$":"$$","taskToken.$":"$$.Task.Token"}}},"set_ttl_command":{"Next":"history_copy","Retry":[{"ErrorEquals":["Lambda.ClientExecutionTimeoutException","Lambda.ServiceException","Lambda.AWSLambdaException","Lambda.SdkClientException"],"IntervalSeconds":2,"MaxAttempts":6,"BackoffRate":2}],"Type":"Task","OutputPath":"$.Payload[0][0]","Resource":"arn:",
257
+ {
258
+ "Ref": "AWS::Partition",
259
+ },
260
+ ":states:::lambda:invoke","Parameters":{"FunctionName":"",
261
+ {
262
+ "Fn::GetAtt": [
263
+ "lambdaapi893CD94E",
264
+ "Arn",
265
+ ],
266
+ },
267
+ "","Payload":{"input.$":"$","context.$":"$$"}}},"history_copy":{"Next":"transform_data","Retry":[{"ErrorEquals":["Lambda.ClientExecutionTimeoutException","Lambda.ServiceException","Lambda.AWSLambdaException","Lambda.SdkClientException"],"IntervalSeconds":2,"MaxAttempts":6,"BackoffRate":2}],"Type":"Task","OutputPath":"$.Payload[0][0]","Resource":"arn:",
257
268
  {
258
269
  "Ref": "AWS::Partition",
259
270
  },
@@ -11,7 +11,7 @@
11
11
  "Value": "admin@test.com"
12
12
  },
13
13
  {
14
- "Name": "custom:tenant_code",
14
+ "Name": "custom:tenant",
15
15
  "Value": "mbc"
16
16
  },
17
17
  {
@@ -261,7 +261,7 @@
261
261
  }
262
262
  },
263
263
  {
264
- "Name": "custom:tenant_code",
264
+ "Name": "custom:tenant",
265
265
  "AttributeDataType": "String",
266
266
  "DeveloperOnlyAttribute": false,
267
267
  "Mutable": true,
@@ -187,7 +187,7 @@ stepFunctions:
187
187
  Choices:
188
188
  - Variable: $.result
189
189
  NumericEquals: 0
190
- Next: history_copy
190
+ Next: set_ttl_command
191
191
  - Variable: $.result
192
192
  NumericEquals: 1
193
193
  Next: wait_prev_command
@@ -213,6 +213,24 @@ stepFunctions:
213
213
  MaxAttempts: 5
214
214
  BackoffRate: 2
215
215
  OutputPath: $.Payload[0][0]
216
+ Next: set_ttl_command
217
+ set_ttl_command:
218
+ Type: Task
219
+ Resource: arn:aws:states:::lambda:invoke
220
+ Parameters:
221
+ FunctionName: arn:aws:lambda:ap-northeast-1:101010101010:function:serverless-example-dev-main
222
+ Payload:
223
+ input.$: $
224
+ context.$: $$
225
+ Retry:
226
+ - ErrorEquals:
227
+ - Lambda.ServiceException
228
+ - Lambda.AWSLambdaException
229
+ - Lambda.SdkClientException
230
+ IntervalSeconds: 2
231
+ MaxAttempts: 5
232
+ BackoffRate: 2
233
+ OutputPath: $.Payload[0][0]
216
234
  Next: history_copy
217
235
  history_copy:
218
236
  Type: Task