@awsless/awsless 0.0.532 → 0.0.534

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
@@ -87,15 +87,19 @@ var createCloudFrontKvsProvider = ({ profile, region }) => {
87
87
  const validateInput = (state2) => {
88
88
  return z.object({
89
89
  kvsArn: z.string(),
90
- keys: z.array(z.object({ key: z.string(), value: z.string() })),
91
- eTag: z.string().optional()
90
+ keys: z.array(
91
+ z.object({
92
+ key: z.string(),
93
+ value: z.string()
94
+ })
95
+ )
92
96
  }).parse(state2);
93
97
  };
94
98
  const formatOutput = (output) => {
95
99
  return {
96
- eTag: output.ETag,
97
- itemCount: output.ItemCount,
98
- totalSizeInBytes: output.TotalSizeInBytes
100
+ eTag: output?.ETag,
101
+ itemCount: output?.ItemCount ?? 0,
102
+ totalSizeInBytes: output?.TotalSizeInBytes ?? 0
99
103
  };
100
104
  };
101
105
  const bulkUpdate = async (props) => {
@@ -108,6 +112,9 @@ var createCloudFrontKvsProvider = ({ profile, region }) => {
108
112
  let result;
109
113
  let ifMatch = prev.ETag;
110
114
  for (const mutations of batches) {
115
+ if (mutations.length === 0) {
116
+ continue;
117
+ }
111
118
  result = await client.send(
112
119
  new UpdateKeysCommand({
113
120
  KvsARN: props.arn,
@@ -4498,6 +4505,7 @@ var rpcFeature = defineFeature({
4498
4505
  // Name: name,
4499
4506
  // // Feature: ''
4500
4507
  // },
4508
+ waitForDeployment: false,
4501
4509
  comment: name,
4502
4510
  enabled: true,
4503
4511
  aliases: domainName ? [domainName] : void 0,
@@ -4894,15 +4902,6 @@ var siteFeature = defineFeature({
4894
4902
  });
4895
4903
  });
4896
4904
  }
4897
- const kvs = new $15.aws.cloudfront.KeyValueStore(group, "kvs", {
4898
- name,
4899
- comment: "Store for static assets"
4900
- });
4901
- const keys = [];
4902
- new ImportKeys(group, "keys", {
4903
- kvsArn: kvs.arn,
4904
- keys
4905
- });
4906
4905
  const versions = [];
4907
4906
  let functionUrl;
4908
4907
  if (props.ssr) {
@@ -4923,6 +4922,7 @@ var siteFeature = defineFeature({
4923
4922
  authorizationType: "AWS_IAM"
4924
4923
  });
4925
4924
  }
4925
+ let kvs;
4926
4926
  let bucket;
4927
4927
  if (props.static) {
4928
4928
  bucket = new $15.aws.s3.Bucket(group, "bucket", {
@@ -4964,6 +4964,15 @@ var siteFeature = defineFeature({
4964
4964
  bucket.arn.pipe((arn) => `${arn}/*`)
4965
4965
  ]
4966
4966
  });
4967
+ kvs = new $15.aws.cloudfront.KeyValueStore(group, "kvs", {
4968
+ name,
4969
+ comment: "Store for static assets"
4970
+ });
4971
+ const keys = [];
4972
+ new ImportKeys(group, "keys", {
4973
+ kvsArn: kvs.arn,
4974
+ keys
4975
+ });
4967
4976
  ctx.onReady(() => {
4968
4977
  if (typeof props.static === "string" && bucket) {
4969
4978
  const files = glob2.sync("**", {
@@ -5079,13 +5088,10 @@ var siteFeature = defineFeature({
5079
5088
  comment: `Viewer Request - ${name}`,
5080
5089
  publish: true,
5081
5090
  code: getViewerRequestFunctionCode(domainName, bucket, functionUrl),
5082
- keyValueStoreAssociations: [kvs.arn]
5091
+ keyValueStoreAssociations: kvs ? [kvs.arn] : void 0
5083
5092
  });
5084
5093
  const distribution = new $15.aws.cloudfront.Distribution(group, "distribution", {
5085
- // name,
5086
- // tags: {
5087
- // Name: name,
5088
- // },
5094
+ waitForDeployment: false,
5089
5095
  comment: name,
5090
5096
  enabled: true,
5091
5097
  aliases: domainName ? [domainName] : void 0,
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.532",
3
+ "version": "0.0.534",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -35,19 +35,19 @@
35
35
  "peerDependencies": {
36
36
  "@awsless/big-float": "^0.0.6",
37
37
  "@awsless/clui": "^0.0.7",
38
- "@awsless/dynamodb": "^0.1.5",
39
38
  "@awsless/json": "^0.0.10",
40
39
  "@awsless/mqtt": "^0.0.2",
40
+ "@awsless/dynamodb": "^0.1.5",
41
41
  "@awsless/lambda": "^0.0.33",
42
- "@awsless/s3": "^0.0.21",
43
42
  "@awsless/open-search": "^0.0.21",
44
- "@awsless/ssm": "^0.0.7",
45
43
  "@awsless/redis": "^0.0.14",
44
+ "@awsless/s3": "^0.0.21",
45
+ "@awsless/iot": "^0.0.3",
46
46
  "@awsless/validate": "^0.0.19",
47
- "@awsless/weak-cache": "^0.0.1",
48
47
  "@awsless/sns": "^0.0.10",
49
- "@awsless/iot": "^0.0.3",
50
- "@awsless/sqs": "^0.0.8"
48
+ "@awsless/sqs": "^0.0.8",
49
+ "@awsless/ssm": "^0.0.7",
50
+ "@awsless/weak-cache": "^0.0.1"
51
51
  },
52
52
  "dependencies": {
53
53
  "@arcanyx/cidr-slicer": "^0.3.0",
@@ -131,15 +131,15 @@
131
131
  "zod": "^3.24.2",
132
132
  "zod-to-json-schema": "^3.24.3",
133
133
  "@awsless/big-float": "^0.0.6",
134
- "@awsless/formation": "^0.0.77",
134
+ "@awsless/clui": "^0.0.7",
135
135
  "@awsless/duration": "^0.0.3",
136
- "@awsless/code": "^0.0.10",
137
- "@awsless/graphql": "^0.0.9",
138
- "@awsless/size": "^0.0.2",
136
+ "@awsless/formation": "^0.0.77",
139
137
  "@awsless/json": "^0.0.10",
138
+ "@awsless/size": "^0.0.2",
139
+ "@awsless/ts-file-cache": "^0.0.12",
140
140
  "@awsless/validate": "^0.0.19",
141
- "@awsless/clui": "^0.0.7",
142
- "@awsless/ts-file-cache": "^0.0.12"
141
+ "@awsless/code": "^0.0.10",
142
+ "@awsless/graphql": "^0.0.9"
143
143
  },
144
144
  "devDependencies": {
145
145
  "@node-rs/bcrypt": "^1.10.5",