Socket
Socket
Sign inDemoInstall

@ntegral/nestjs-s3

Package Overview
Dependencies
82
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

10

dist/common/s3.util.js

@@ -5,2 +5,3 @@ "use strict";

const S3 = require("aws-sdk/clients/s3");
const https = require("https");
function createS3Client(options) {

@@ -13,2 +14,11 @@ AWS.config.update({

});
if (options.maxSockets) {
AWS.config.update({
httpOptions: {
agent: new https.Agent({
maxSockets: options.maxSockets
})
}
});
}
let version = options.apiVersion === undefined ? '2006-03-01' : options.apiVersion;

@@ -15,0 +25,0 @@ let params = {

1

dist/interfaces/s3-options.interface.d.ts

@@ -8,2 +8,3 @@ import { ModuleMetadata, Type } from "@nestjs/common/interfaces";

apiVersion?: string;
maxSockets?: number;
}

@@ -10,0 +11,0 @@ export interface S3ConfigOptionsFactory {

import { S3ConfigOptions } from "../interfaces/s3-options.interface";
import * as AWS from 'aws-sdk/global';
import * as S3 from 'aws-sdk/clients/s3';
import * as https from 'https';

@@ -12,2 +13,11 @@ export function createS3Client(options: S3ConfigOptions): S3 {

});
if (options.maxSockets) {
AWS.config.update({
httpOptions: {
agent: new https.Agent({
maxSockets: options.maxSockets
})
}
});
}
let version = options.apiVersion === undefined ? '2006-03-01' : options.apiVersion;

@@ -14,0 +24,0 @@ let params: S3.ClientConfiguration = {

3

lib/interfaces/s3-options.interface.ts

@@ -8,3 +8,4 @@ import { ModuleMetadata, Type } from "@nestjs/common/interfaces";

sessionToken?: string;
apiVersion?: string
apiVersion?: string;
maxSockets?: number;
}

@@ -11,0 +12,0 @@

@@ -10,3 +10,3 @@ {

"name": "@ntegral/nestjs-s3",
"version": "1.0.2",
"version": "1.0.3",
"description": "Provides an injectable s3 client to provide s3 storage access from nestjs modules",

@@ -13,0 +13,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc