From ba046ff0b9a40a271313993b36eed16c21a1de00 Mon Sep 17 00:00:00 2001 From: Masoud Ghorbani Date: Fri, 9 Feb 2024 23:05:21 +0100 Subject: [PATCH] Add ACL to S3 bucket and object uploads (#5) * Add ACL to S3 bucket and object uploads * Update comments * Update ACL value to undefined and add new function createValidInputFixtureWithACLBucketOwner * Add extractAfterSubdirectory function and use it in getLocalFiles * Remove commented out code for S3 credentials * Add commands to SyncCloudStorage class * Refactor tags method and handle error when getting existing tags * test: added test case for getLocalFiles * Improved multiple files test case * Fix storage existence check and remove unnecessary code --- .eslintrc.json | 12 +- docs/global.html | 4 +- docs/index.html | 3 +- docs/index.js.html | 39 ++- ...ule-SyncCloudStorage-SyncCloudStorage.html | 2 +- docs/module-SyncCloudStorage.html | 4 +- docs/providers_local_objects.js.html | 10 +- docs/providers_s3_buckets.js.html | 34 ++- docs/providers_s3_credentials.js.html | 2 +- docs/providers_s3_objects.js.html | 3 +- docs/utils_objects.js.html | 27 ++- docs/utils_tags.js.html | 2 +- package.json | 6 +- src/index.ts | 68 +++--- src/providers/local/objects.ts | 10 +- src/providers/s3/buckets.ts | 51 ++-- src/providers/s3/objects.ts | 99 ++++---- src/types.ts | 2 +- src/utils/objects.ts | 27 +++ test/assets/giraffe-multiple/README.md | 3 + test/assets/giraffe-multiple/sub/README.md | 3 + test/index.test.ts | 225 ++++++++++++++++-- test/providers/local.test.ts | 30 +++ test/schemas/input.fixture.ts | 26 +- 24 files changed, 516 insertions(+), 176 deletions(-) create mode 100644 test/assets/giraffe-multiple/README.md create mode 100644 test/assets/giraffe-multiple/sub/README.md create mode 100644 test/providers/local.test.ts diff --git a/.eslintrc.json b/.eslintrc.json index 3e6fa50..0c978fb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,7 +10,8 @@ "plugins": ["import"], "parserOptions": { "ecmaVersion": 2023, - "sourceType": "module" + "sourceType": "module", + "project": "./tsconfig.json" }, "rules": { "semi": "off", @@ -52,7 +53,8 @@ ], "no-console": 2, "no-unused-vars": 2, - "@typescript-eslint/no-unused-vars": ["error"] + "@typescript-eslint/no-unused-vars": ["error"], + "import/named": "error" }, "env": { "node": true @@ -64,7 +66,11 @@ "import/resolver": { "typescript": { "alwaysTryTypes": true, - "project": "./tsconfig.json" + "project": [ + "./tsconfig.json", + "./src/tsconfig.json", + "./test/tsconfig.json" + ] } } } diff --git a/docs/global.html b/docs/global.html index 283394c..852c1e9 100644 --- a/docs/global.html +++ b/docs/global.html @@ -218,7 +218,7 @@
Parameters:
Source:
@@ -292,7 +292,7 @@

Home

Modules