verdaccio-aws-s3-storage
Advanced tools
Comparing version 9.1.0 to 9.2.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [9.2.0](https://github.com/verdaccio/monorepo/compare/v9.1.0...v9.2.0) (2020-01-28) | ||
### Features | ||
* **verdaccio-aws-s3-storage:** Allow endpoint to be configurable ([#319](https://github.com/verdaccio/monorepo/issues/319)) ([1191dcd](https://github.com/verdaccio/monorepo/commit/1191dcd829b7d9f2dd0b4fab4910f4dc9d697565)) | ||
# [9.1.0](https://github.com/verdaccio/monorepo/compare/v9.0.0...v9.1.0) (2020-01-25) | ||
@@ -8,0 +19,0 @@ |
@@ -48,2 +48,3 @@ "use strict"; | ||
this.config.keyPrefix = (0, _setConfigValue.default)(this.config.keyPrefix); | ||
this.config.endpoint = (0, _setConfigValue.default)(this.config.endpoint); | ||
this.config.region = (0, _setConfigValue.default)(this.config.region); | ||
@@ -253,3 +254,3 @@ this.config.accessKeyId = (0, _setConfigValue.default)(this.config.accessKeyId); | ||
this.logger.error({ | ||
s3Err | ||
err: s3Err.message | ||
}, 's3: [_getData] err: @{err}'); | ||
@@ -256,0 +257,0 @@ |
@@ -124,7 +124,7 @@ "use strict"; | ||
this.logger.error({ | ||
err | ||
err: err.message | ||
}, 's3: [S3PackageManager _getData] aws @{err}'); | ||
const error = (0, _s3Errors.convertS3Error)(err); | ||
this.logger.error({ | ||
error | ||
error: err.message | ||
}, 's3: [S3PackageManager _getData] @{error}'); | ||
@@ -207,3 +207,3 @@ reject(error); | ||
this.logger.error({ | ||
s3Err | ||
s3Err: s3Err.message | ||
}, 's3: [S3PackageManager createPackage error] @s3Err'); | ||
@@ -251,3 +251,3 @@ callback(s3Err); | ||
this.logger.error({ | ||
err | ||
err: err.message | ||
}, 's3: [S3PackageManager readPackage] @{err}'); | ||
@@ -287,9 +287,9 @@ callback(err); | ||
this.logger.error({ | ||
convertedErr | ||
}, 's3: [S3PackageManager writeTarball headObject] @convertedErr'); | ||
error: convertedErr.message | ||
}, 's3: [S3PackageManager writeTarball headObject] @{error}'); | ||
if ((0, _s3Errors.is404Error)(convertedErr) === false) { | ||
this.logger.error({ | ||
convertedErr | ||
}, 's3: [S3PackageManager writeTarball headObject] non a 404 emit error'); | ||
error: convertedErr.message | ||
}, 's3: [S3PackageManager writeTarball headObject] non a 404 emit error: @{error}'); | ||
uploadStream.emit('error', convertedErr); | ||
@@ -308,3 +308,3 @@ } else { | ||
this.logger.error({ | ||
error | ||
error: error.message | ||
}, 's3: [S3PackageManager writeTarball managedUpload send] emit error @{error}'); | ||
@@ -315,3 +315,3 @@ uploadStream.emit('error', error); | ||
data | ||
}, 's3: [S3PackageManager writeTarball managedUpload send] response @data'); | ||
}, 's3: [S3PackageManager writeTarball managedUpload send] response @{data}'); | ||
resolve(); | ||
@@ -436,3 +436,3 @@ } | ||
this.logger.error({ | ||
error | ||
error: error.message | ||
}, 's3: [S3PackageManager readTarball readTarballStream event] error @{error}'); | ||
@@ -439,0 +439,0 @@ }); |
{ | ||
"name": "verdaccio-aws-s3-storage", | ||
"version": "9.1.0", | ||
"version": "9.2.0", | ||
"description": "AWS S3 storage implementation for Verdaccio", | ||
@@ -56,3 +56,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "26ddd6afbc9d9c47937c5944f24cb76199a44f49" | ||
"gitHead": "edecf55e0e58f1d456c8bc3b546e0afe89efb10b" | ||
} |
# verdaccio-aws-s3-storage | ||
📦 AWS S3 storage plugin for verdaccio | ||
📦 AWS S3 storage plugin for Verdaccio | ||
@@ -14,12 +14,21 @@ [![verdaccio (latest)](https://img.shields.io/npm/v/verdaccio-aws-s3-storage/latest.svg)](https://www.npmjs.com/package/verdaccio-aws-s3-storage) | ||
[![Twitter followers](https://img.shields.io/twitter/follow/verdaccio_npm.svg?style=social&label=Follow)](https://twitter.com/verdaccio_npm) | ||
[![Github](https://img.shields.io/github/stars/verdaccio/verdaccio.svg?style=social&label=Stars)](https://github.com/verdaccio/verdaccio/stargazers) | ||
[![backers](https://opencollective.com/verdaccio/tiers/backer/badge.svg?label=Backer&color=brightgreen)](https://opencollective.com/verdaccio) | ||
[![stackshare](https://img.shields.io/badge/Follow%20on-StackShare-blue.svg?logo=stackshare&style=flat)](https://stackshare.io/verdaccio) | ||
Based on [`verdaccio-s3-storage`](https://github.com/Remitly/verdaccio-s3-storage) built in Typescript + other features. | ||
🚧 Alpha testing | ||
> This plugin was forked based on [`verdaccio-s3-storage`](https://github.com/Remitly/verdaccio-s3-storage) built in Typescript + other features added along | ||
the time. Both plugins might have vary in behaviour since then, we recommend use the AWS plugin on this repo due | ||
is under control of Verdaccio community and constantly upated. | ||
**See it in action** in our [Docker + LocalStack + Verdaccio 4 + S3 Plugin example](https://github.com/verdaccio/docker-examples/tree/master/amazon-s3-docker-example). | ||
## See it in action | ||
### Requirements | ||
* Test on [Docker + LocalStack + Verdaccio 4 + S3 Plugin example](https://github.com/verdaccio/docker-examples/tree/master/amazon-s3-docker-example). | ||
* Using `docker-compose` on this repo based on [**verdaccio-minio**](https://github.com/barolab/verdaccio-minio) developed by [barolab](https://github.com/barolab). | ||
* Feel free to propose new ways to run this plugin. | ||
* AWS Account | ||
### Basic Requirements | ||
* AWS Account (in case you are using the cloud) | ||
* Verdaccio server (4.0) (for 3.x use `verdaccio-s3-storage` instead) | ||
@@ -31,4 +40,2 @@ | ||
> This plugin is not supported in the version `2.x` | ||
## Usage | ||
@@ -61,2 +68,3 @@ | ||
- `region` | ||
- `endpoint` | ||
- `accessKeyID` | ||
@@ -70,2 +78,3 @@ - `secretAccessKey` | ||
keyPrefix: S3_KEY_PREFIX # If an environment variable named S3_KEY_PREFIX is set, it will use that value. Otherwise assumes the bucket is named 'S3_KEY_PREFIX' | ||
endpoint: S3_ENDPOINT # If an environment variable named S3_ENDPOINT is set, it will use that value. Otherwise assumes the bucket is named 'S3_ENDPOINT' | ||
... | ||
@@ -93,6 +102,6 @@ ``` | ||
* config.yaml, see [verdaccio documentation](https://verdaccio.org/docs/en/configuration.html) | ||
* `config.yaml`, see [verdaccio documentation](https://verdaccio.org/docs/en/configuration.html) | ||
* The provided docker file allows to test the plugin, with no need for main verdaccio application | ||
* The provided docker-compose also provides minio in orchestration as a local substitute for S3 backend | ||
* registry.envs set as follows. This file does not exist on the repo and should be generated after cloning the project. | ||
* Create and set content of `registry.envs` as follows. This file does not exist on the repo and should be generated manually after cloning the project. | ||
@@ -107,3 +116,14 @@ ``` | ||
## Execute the docker image for testing | ||
> You need the latest docker installed in your computer | ||
```bash | ||
docker-compose up | ||
``` | ||
> By default there is no bucket created, **you might need to browse `http://127.0.0.1:9000/minio/` and create | ||
the example bucket manually named `rise`** and then restart `docker-compose up`. | ||
The default values should work out of the box. If you change anything, make sure the corresponding variables are set in | ||
other parts of the ingredient as well. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45439
821
124