diff --git a/lib/index.js b/lib/index.js index 90300d4..071cd84 100644 --- a/lib/index.js +++ b/lib/index.js @@ -24,15 +24,22 @@ class S3Database { if (!this.config.bucket) { throw new Error('s3 storage requires a bucket'); } - this.logger.debug({ - config: JSON.stringify({ - bucket: (0, getConfigValue_1.default)('AWS_BUCKET', this.config), - endpoint: (0, getConfigValue_1.default)('AWS_ENDPOINT', this.config), - region: (0, getConfigValue_1.default)('AWS_REGION', this.config), - accessKeyId: (0, getConfigValue_1.default)('AWS_ACCESS_KEY_ID', this.config), - secretAccessKey: (0, getConfigValue_1.default)('AWS_SECRET_ACCESS_KEY', this.config), - }, null, 4), - }, 'S3 ENV/CONFIG VARS: @{config}'); + // this.logger.debug( + // { + // config: JSON.stringify( + // { + // bucket: getConfigValue('AWS_BUCKET', this.config), + // endpoint: getConfigValue('AWS_ENDPOINT', this.config), + // region: getConfigValue('AWS_REGION', this.config), + // accessKeyId: getConfigValue('AWS_ACCESS_KEY_ID', this.config), + // secretAccessKey: getConfigValue('AWS_SECRET_ACCESS_KEY', this.config), + // }, + // null, + // 4 + // ), + // }, + // 'S3 ENV/CONFIG VARS: @{config}' + // ); this.config.bucket = (0, getConfigValue_1.default)('AWS_BUCKET', this.config); this.config.keyPrefix = (0, getConfigValue_1.default)('AWS_KEY_PREFIX', this.config); this.config.endpoint = (0, getConfigValue_1.default)('AWS_ENDPOINT', this.config); @@ -189,7 +196,7 @@ class S3Database { Bucket: bucket, Key: `${keyPrefix}verdaccio-s3-db.json`, }, (err, response) => { - this.logger.debug({ err: JSON.stringify(err, null, 4), response: JSON.stringify(response, null, 4) }, 's3: [_getData] Err: @{err} Response: @{response}'); + // this.logger.debug({ err: JSON.stringify(err, null, 4), response: JSON.stringify(response, null, 4) }, 's3: [_getData] Err: @{err} Response: @{response}'); if (err) { const s3Err = (0, s3Errors_1.convertS3Error)(err); this.logger.error({ err: s3Err.message }, 's3: [_getData] err: @{err}'); diff --git a/package-lock.json b/package-lock.json index 7b5623f..fd13507 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "": { "name": "@fleetbase/verdaccio-fleetbase-s3-storage", "version": "0.0.1", - "license": "MIT", + "license": "AGPL-3.0-or-later", "dependencies": { "@verdaccio/commons-api": "10.2.0", "@verdaccio/streams": "10.2.1", diff --git a/package.json b/package.json index 890aa75..3473446 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fleetbase/verdaccio-fleetbase-s3-storage", - "version": "0.0.1", + "version": "0.0.2", "description": "AWS S3 storage implementation for Verdaccio modified for Fleetbase extensions.", "keywords": [ "fleetbase", diff --git a/src/index.ts b/src/index.ts index b5a3214..a4f0d8c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,22 +27,22 @@ export default class S3Database implements IPluginStorage { throw new Error('s3 storage requires a bucket'); } - this.logger.debug( - { - config: JSON.stringify( - { - bucket: getConfigValue('AWS_BUCKET', this.config), - endpoint: getConfigValue('AWS_ENDPOINT', this.config), - region: getConfigValue('AWS_REGION', this.config), - accessKeyId: getConfigValue('AWS_ACCESS_KEY_ID', this.config), - secretAccessKey: getConfigValue('AWS_SECRET_ACCESS_KEY', this.config), - }, - null, - 4 - ), - }, - 'S3 ENV/CONFIG VARS: @{config}' - ); + // this.logger.debug( + // { + // config: JSON.stringify( + // { + // bucket: getConfigValue('AWS_BUCKET', this.config), + // endpoint: getConfigValue('AWS_ENDPOINT', this.config), + // region: getConfigValue('AWS_REGION', this.config), + // accessKeyId: getConfigValue('AWS_ACCESS_KEY_ID', this.config), + // secretAccessKey: getConfigValue('AWS_SECRET_ACCESS_KEY', this.config), + // }, + // null, + // 4 + // ), + // }, + // 'S3 ENV/CONFIG VARS: @{config}' + // ); this.config.bucket = getConfigValue('AWS_BUCKET', this.config); this.config.keyPrefix = getConfigValue('AWS_KEY_PREFIX', this.config); @@ -223,7 +223,7 @@ export default class S3Database implements IPluginStorage { Key: `${keyPrefix}verdaccio-s3-db.json`, }, (err, response) => { - this.logger.debug({ err: JSON.stringify(err, null, 4), response: JSON.stringify(response, null, 4) }, 's3: [_getData] Err: @{err} Response: @{response}'); + // this.logger.debug({ err: JSON.stringify(err, null, 4), response: JSON.stringify(response, null, 4) }, 's3: [_getData] Err: @{err} Response: @{response}'); if (err) { const s3Err: VerdaccioError = convertS3Error(err); this.logger.error({ err: s3Err.message }, 's3: [_getData] err: @{err}');