@awsless/awsless 0.0.157 → 0.0.159

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
@@ -4453,6 +4453,17 @@ var Bucket = class extends Resource {
4453
4453
  ...this.attr("IndexDocument", this.props.website.indexDocument),
4454
4454
  ...this.attr("ErrorDocument", this.props.website.errorDocument)
4455
4455
  }
4456
+ } : {},
4457
+ ...this.props.cors ? {
4458
+ CorsConfiguration: {
4459
+ CorsRules: this.props.cors.map((rule) => ({
4460
+ ...this.attr("MaxAge", rule.maxAge),
4461
+ ...this.attr("AllowedHeaders", rule.headers),
4462
+ ...this.attr("AllowedMethods", rule.methods),
4463
+ ...this.attr("AllowedOrigins", rule.origins),
4464
+ ...this.attr("ExposedHeaders", rule.exposeHeaders)
4465
+ }))
4466
+ }
4456
4467
  } : {}
4457
4468
  };
4458
4469
  }
@@ -4927,7 +4938,17 @@ var storePlugin = definePlugin({
4927
4938
  for (const id of stackConfig.stores || []) {
4928
4939
  const bucket = new Bucket(id, {
4929
4940
  name: `store-${config2.app.name}-${stack.name}-${id}`,
4930
- accessControl: "private"
4941
+ accessControl: "private",
4942
+ cors: [
4943
+ // ---------------------------------------------
4944
+ // support for presigned post requests
4945
+ // ---------------------------------------------
4946
+ {
4947
+ origins: ["*"],
4948
+ methods: ["POST"]
4949
+ }
4950
+ // ---------------------------------------------
4951
+ ]
4931
4952
  });
4932
4953
  const custom = new CustomResource(id, {
4933
4954
  serviceToken: bootstrap2.import("feature-delete-bucket"),
@@ -4977,6 +4998,7 @@ var Table = class extends Resource {
4977
4998
  "dynamodb:DescribeTable",
4978
4999
  "dynamodb:PutItem",
4979
5000
  "dynamodb:GetItem",
5001
+ "dynamodb:UpdateItem",
4980
5002
  "dynamodb:DeleteItem",
4981
5003
  "dynamodb:TransactWrite",
4982
5004
  "dynamodb:BatchWriteItem",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.157",
3
+ "version": "0.0.159",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -29,9 +29,9 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@awsless/lambda": "^0.0.18",
32
- "@awsless/redis": "^0.0.10",
33
- "@awsless/s3": "^0.0.8",
32
+ "@awsless/s3": "^0.0.10",
34
33
  "@awsless/sns": "^0.0.7",
34
+ "@awsless/redis": "^0.0.10",
35
35
  "@awsless/sqs": "^0.0.7",
36
36
  "@awsless/ssm": "^0.0.7",
37
37
  "@awsless/validate": "^0.0.13",