@awsless/awsless 0.0.67 → 0.0.69

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
@@ -97,6 +97,12 @@ var formatName = (name) => {
97
97
  return paramCase2(name);
98
98
  };
99
99
  var formatArn = (props) => {
100
+ if (!props.resource) {
101
+ return sub("arn:${AWS::Partition}:${service}:${AWS::Region}:${AWS::AccountId}", props);
102
+ }
103
+ if (!props.resourceName) {
104
+ return sub("arn:${AWS::Partition}:${service}:${AWS::Region}:${AWS::AccountId}:${resource}", props);
105
+ }
100
106
  return sub("arn:${AWS::Partition}:${service}:${AWS::Region}:${AWS::AccountId}:${resource}${seperator}${resourceName}", {
101
107
  seperator: "/",
102
108
  ...props
@@ -1635,8 +1641,7 @@ var Queue = class extends Resource {
1635
1641
  resources: [
1636
1642
  formatArn({
1637
1643
  service: "sqs",
1638
- resource: "queue",
1639
- resourceName: this.name
1644
+ resource: this.name
1640
1645
  })
1641
1646
  ]
1642
1647
  };
@@ -1,4 +1,4 @@
1
- import { S3Client, DeleteObjectsCommand, ListObjectsV2Command, GetObjectCommand } from '@aws-sdk/client-s3';
1
+ import { S3Client, PutObjectCommand, DeleteObjectsCommand, ListObjectsV2Command, GetObjectCommand } from '@aws-sdk/client-s3';
2
2
  import require$$0$4, { createReadStream, createWriteStream } from 'fs';
3
3
  import { pipeline } from 'stream/promises';
4
4
  import require$$1$1 from 'util';
@@ -11,7 +11,6 @@ import require$$6 from 'assert';
11
11
  import require$$0$5, { join as join$1, extname } from 'path';
12
12
  import { readdir, stat } from 'fs/promises';
13
13
  import { createHash } from 'crypto';
14
- import { Upload } from '@aws-sdk/lib-storage';
15
14
 
16
15
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
17
16
 
@@ -28223,18 +28222,27 @@ const sync = async (sourceBucketName, sourceObjectKey, sourceObjectVersion, dest
28223
28222
  };
28224
28223
  const uploadFiles = (bucketName, files)=>{
28225
28224
  return Promise.all(files.map(async (file)=>{
28226
- const upload = new Upload({
28227
- client,
28228
- params: {
28229
- Bucket: bucketName,
28230
- Key: file.key,
28231
- Body: createReadStream(join$1(contentsDirectory, file.key)),
28232
- ContentType: getContentType(file.key),
28233
- CacheControl: getCacheControl(file.key)
28234
- }
28235
- });
28236
- await upload.done();
28225
+ await client.send(new PutObjectCommand({
28226
+ Bucket: bucketName,
28227
+ Key: file.key,
28228
+ Body: createReadStream(join$1(contentsDirectory, file.key)),
28229
+ ContentType: getContentType(file.key),
28230
+ CacheControl: getCacheControl(file.key)
28231
+ }));
28237
28232
  }));
28233
+ // return Promise.all(files.map(async file => {
28234
+ // const upload = new Upload({
28235
+ // client,
28236
+ // params: {
28237
+ // Bucket: bucketName,
28238
+ // Key: file.key,
28239
+ // Body: createReadStream(join(contentsDirectory, file.key)),
28240
+ // ContentType: getContentType(file.key),
28241
+ // CacheControl: getCacheControl(file.key),
28242
+ // }
28243
+ // })
28244
+ // await upload.done()
28245
+ // }))
28238
28246
  };
28239
28247
  const deleteFiles = async (bucketName, files)=>{
28240
28248
  await client.send(new DeleteObjectsCommand({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -25,8 +25,8 @@
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@awsless/lambda": "^0.0.6",
28
- "@awsless/sns": "^0.0.6",
29
28
  "@awsless/sqs": "^0.0.6",
29
+ "@awsless/sns": "^0.0.6",
30
30
  "@awsless/ssm": "^0.0.7"
31
31
  },
32
32
  "dependencies": {