forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formatted types/s* packages with dprint (DefinitelyTyped#66540)
* Formatted types/s* packages with dprint * Fixed introduced issues * Fix introduced issues
- Loading branch information
1 parent
3a2e6cb
commit b84746a
Showing
1,599 changed files
with
86,597 additions
and
80,615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import * as S3Stream from "s3-download-stream"; | ||
import * as AWS from "aws-sdk2-types"; | ||
import * as fs from "fs"; | ||
import * as S3Stream from "s3-download-stream"; | ||
|
||
// Documentation for "params": | ||
// http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#getObject-property | ||
const config = { | ||
client: new AWS.S3({}), | ||
concurrency: 6, | ||
chunkSize: '512KB', | ||
chunkSize: "512KB", | ||
params: { | ||
Key: 'key-name', | ||
Bucket: 'bucket-name' | ||
} | ||
Key: "key-name", | ||
Bucket: "bucket-name", | ||
}, | ||
}; | ||
|
||
S3Stream(config).pipe(fs.createWriteStream('/path/to/a/file')); | ||
S3Stream(config).pipe(fs.createWriteStream("/path/to/a/file")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,41 @@ | ||
//NOTE: Does require GM (https://github.com/aheckmann/gm) thus requires GraphicsMagick (http://www.graphicsmagick.org/) or ImageMagick (http://www.imagemagick.org/) | ||
// NOTE: Does require GM (https://github.com/aheckmann/gm) thus requires GraphicsMagick (http://www.graphicsmagick.org/) or ImageMagick (http://www.imagemagick.org/) | ||
|
||
import Upload = require('s3-uploader'); | ||
import Upload = require("s3-uploader"); | ||
declare var console: { log(x: any): void }; | ||
|
||
var s3VersionOriginal = { | ||
original: true | ||
original: true, | ||
}; | ||
|
||
var s3VersionHeader = { | ||
suffix: '-header', | ||
suffix: "-header", | ||
quality: 100, | ||
maxHeight: 300, | ||
maxWidth: 600 | ||
} | ||
maxWidth: 600, | ||
}; | ||
|
||
var s3Config = { | ||
awsAccessKeyId: 'awsKeyId', | ||
awsSecretAccessKey: 'awsSecretAccessKey', | ||
awsBucketPath: '', | ||
awsBucketRegion: 'us-east-1' /*Whatever region s3 is located*/, | ||
awsBucketAcl: 'public-read', | ||
awsAccessKeyId: "awsKeyId", | ||
awsSecretAccessKey: "awsSecretAccessKey", | ||
awsBucketPath: "", | ||
awsBucketRegion: "us-east-1", /*Whatever region s3 is located*/ | ||
awsBucketAcl: "public-read", | ||
awsHttpTimeout: 60000, | ||
versions: [s3VersionOriginal, s3VersionHeader] | ||
} | ||
versions: [s3VersionOriginal, s3VersionHeader], | ||
}; | ||
|
||
var client = new Upload('bucketName', s3Config); | ||
var client = new Upload("bucketName", s3Config); | ||
|
||
client.upload('/images/File.png', s3Config, function (err, images, meta) { | ||
client.upload("/images/File.png", s3Config, function(err, images, meta) { | ||
var returnVal: boolean = false; | ||
if (err) { | ||
console.log(err); | ||
} | ||
else { | ||
} else { | ||
if (images.length >= 2) { | ||
var originalImageUrl = images[0].url; | ||
var headerImageUrl = images[1].url; | ||
|
||
console.log('Original: ' + originalImageUrl + ' headerImageUrl: ' + headerImageUrl); | ||
console.log("Original: " + originalImageUrl + " headerImageUrl: " + headerImageUrl); | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.