@awsless/awsless 0.0.136 → 0.0.137

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/dist/bin.js CHANGED
@@ -5017,13 +5017,20 @@ var tablePlugin = definePlugin({
5017
5017
  });
5018
5018
  stack.add(table);
5019
5019
  if (props.stream) {
5020
+ const onFailure = getGlobalOnFailure(ctx);
5020
5021
  const lambda = toLambdaFunction(ctx, `stream-${id}`, props.stream.consumer);
5021
5022
  const source = new DynamoDBEventSource(id, lambda, {
5022
5023
  streamArn: table.streamArn,
5023
5024
  startingPosition: "latest",
5024
- onFailure: getGlobalOnFailure(ctx),
5025
+ onFailure,
5025
5026
  ...props.stream
5026
5027
  });
5028
+ if (onFailure) {
5029
+ lambda.addPermissions({
5030
+ actions: ["sqs:SendMessage", "sqs:GetQueueUrl"],
5031
+ resources: [onFailure]
5032
+ });
5033
+ }
5027
5034
  stack.add(lambda, source);
5028
5035
  }
5029
5036
  bind((lambda) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.136",
3
+ "version": "0.0.137",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -28,12 +28,12 @@
28
28
  }
29
29
  },
30
30
  "peerDependencies": {
31
- "@awsless/lambda": "^0.0.15",
32
- "@awsless/sns": "^0.0.7",
33
- "@awsless/redis": "^0.0.10",
34
31
  "@awsless/sqs": "^0.0.7",
35
- "@awsless/ssm": "^0.0.7",
32
+ "@awsless/sns": "^0.0.7",
36
33
  "@awsless/validate": "^0.0.10",
34
+ "@awsless/ssm": "^0.0.7",
35
+ "@awsless/redis": "^0.0.10",
36
+ "@awsless/lambda": "^0.0.15",
37
37
  "@awsless/weak-cache": "^0.0.1"
38
38
  },
39
39
  "dependencies": {
@@ -87,8 +87,8 @@
87
87
  "wrap-ansi": "^8.1.0",
88
88
  "zod": "^3.21.4",
89
89
  "zod-to-json-schema": "^3.22.3",
90
- "@awsless/graphql": "^0.0.6",
91
- "@awsless/code": "^0.0.10"
90
+ "@awsless/code": "^0.0.10",
91
+ "@awsless/graphql": "^0.0.6"
92
92
  },
93
93
  "scripts": {
94
94
  "test": "pnpm code test",