Skip to content

Commit

Permalink
Remove unused code and update metadata function
Browse files Browse the repository at this point in the history
  • Loading branch information
msudgh committed Feb 24, 2024
1 parent 60d5660 commit 249e0ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"build": "rm -rf ./dist && tsc -p tsconfig.build.json",
"build:watch": "tsc -p tsconfig.build.json -w",
"build:type-check": "tsc -p tsconfig.build.json --noEmit",
"test": "jest --verbose",
"test:watch": "jest --watch",
"test:coverage": "jest --no-cache --coverage",
"test": "jest . --verbose",
"test:watch": "jest . --watch",
"test:coverage": "jest . --no-cache --coverage",
"format": "prettier --write \"**/*.{ts,js,md,json,yaml,yml}\"",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
Expand Down Expand Up @@ -68,14 +68,14 @@
},
"lint-staged": {
"*.ts": [
"pnpm test"
"npm run test"
],
"*.{ts,js}": [
"pnpm run lint",
"pnpm run format"
"npm run lint",
"npm run format"
],
"*.{json,md,yaml}": [
"pnpm run format"
"npm run format"
]
}
}
6 changes: 1 addition & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class SyncCloudStorage implements ServerlessPlugin {
servicePath: string
config: Custom
logging: ServerlessPlugin.Logging
taskProcess?: ServerlessPlugin.Progress
client: S3Client
readonly _storages: Storage[] = []

Expand Down Expand Up @@ -78,7 +77,6 @@ class SyncCloudStorage implements ServerlessPlugin {
: undefined

return new S3Client({
// ...credentials,
endpoint,
})
}
Expand Down Expand Up @@ -155,11 +153,9 @@ class SyncCloudStorage implements ServerlessPlugin {
* const result = await this.metadata()
*/
async metadata() {
const updatedMetadata = await Promise.allSettled(
return await Promise.allSettled(
this._storages.map((bucket) => syncMetadata(this.client, bucket))
)

return updatedMetadata
}

/**
Expand Down

0 comments on commit 249e0ad

Please sign in to comment.