From fb7345aacbc42a63a26fce89884ac1b49e76983e Mon Sep 17 00:00:00 2001 From: Caleb Everett Date: Mon, 5 Feb 2018 11:41:40 -0500 Subject: [PATCH] Changed to match instructions for contributions --- types/s3-download-stream/LICENSE | 21 ---------------- types/s3-download-stream/README.md | 16 ------------- types/s3-download-stream/package.json | 20 ++++------------ .../s3-download-stream-tests.ts | 18 ++++++++++++++ types/s3-download-stream/tsconfig.json | 24 +++++++++++++++++++ types/s3-download-stream/tslint.json | 1 + 6 files changed, 47 insertions(+), 53 deletions(-) delete mode 100644 types/s3-download-stream/LICENSE delete mode 100644 types/s3-download-stream/README.md create mode 100644 types/s3-download-stream/s3-download-stream-tests.ts create mode 100644 types/s3-download-stream/tsconfig.json create mode 100644 types/s3-download-stream/tslint.json diff --git a/types/s3-download-stream/LICENSE b/types/s3-download-stream/LICENSE deleted file mode 100644 index 5cf7c8db62..0000000000 --- a/types/s3-download-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Microsoft Corporation. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE diff --git a/types/s3-download-stream/README.md b/types/s3-download-stream/README.md deleted file mode 100644 index bed78317a2..0000000000 --- a/types/s3-download-stream/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/s3-download-stream` - -# Summary -This package contains type definitions for s3-download-stream (https://github.com/jb55/s3-download-stream). - -# Details -Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/s3-download-stream - -Additional Details - * Last updated: Mon, 05 Feb 2018 16:21:00 GMT - * Dependencies: stream, aws-sdk, node - * Global values: none - -# Credits -These definitions were written by Caleb Everett . diff --git a/types/s3-download-stream/package.json b/types/s3-download-stream/package.json index c1b46eab19..3711406140 100644 --- a/types/s3-download-stream/package.json +++ b/types/s3-download-stream/package.json @@ -1,18 +1,6 @@ { - "name": "@types/s3-download-stream", - "version": "0.1.0", - "description": "TypeScript definitions for s3-download-stream", - "main": "", - "repository": { - "type": "git", - "url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "license": "MIT", - "typeScriptVersion": "2.0", - "types": "index.d.ts", - "dependencies": { - "@types/node": "*", - "aws-sdk": "^2.188.0" - } + "private": true, + "dependencies": { + "aws-sdk": "^2.37.0" + } } diff --git a/types/s3-download-stream/s3-download-stream-tests.ts b/types/s3-download-stream/s3-download-stream-tests.ts new file mode 100644 index 0000000000..0e8e0b9e90 --- /dev/null +++ b/types/s3-download-stream/s3-download-stream-tests.ts @@ -0,0 +1,18 @@ +import * as S3Stream from "s3-download-stream"; +import * as AWS from "aws-sdk"; +import * as fs from "fs"; + +// Documentation for "params": +// http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getObject-property +var config = { + client: new AWS.S3({}), + concurrency: 6, + chunkSize: '512KB', + params: { + Key: 'key-name', + Bucket: 'bucket-name' + } +} + +S3Stream(config) + .pipe(fs.createWriteStream('/path/to/a/file')); diff --git a/types/s3-download-stream/tsconfig.json b/types/s3-download-stream/tsconfig.json new file mode 100644 index 0000000000..bf42854536 --- /dev/null +++ b/types/s3-download-stream/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "s3-download-stream-tests.ts" + ] +} diff --git a/types/s3-download-stream/tslint.json b/types/s3-download-stream/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/s3-download-stream/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }