@aws-sdk/stream-collector-browser
Advanced tools
Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.streamCollector = function (stream) { | ||
return new Promise(function (resolve, reject) { | ||
var reader = new FileReader(); | ||
reader.onload = function () { return resolve(new Uint8Array(reader.result)); }; | ||
reader.onabort = function () { return reject(new Error("Read aborted")); }; | ||
reader.onerror = function () { return reject(reader.error); }; | ||
reader.readAsArrayBuffer(stream); | ||
}); | ||
return new Response(stream) | ||
.arrayBuffer() | ||
.then(function (arrayBuffer) { return new Uint8Array(arrayBuffer); }); | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFFYSxRQUFBLGVBQWUsR0FBb0IsVUFDOUMsTUFBWTtJQUVaLE9BQUEsSUFBSSxPQUFPLENBQWEsVUFBQyxPQUFPLEVBQUUsTUFBTTtRQUN0QyxJQUFNLE1BQU0sR0FBRyxJQUFJLFVBQVUsRUFBRSxDQUFDO1FBQ2hDLE1BQU0sQ0FBQyxNQUFNLEdBQUcsY0FBTSxPQUFBLE9BQU8sQ0FBQyxJQUFJLFVBQVUsQ0FBQyxNQUFNLENBQUMsTUFBcUIsQ0FBQyxDQUFDLEVBQXJELENBQXFELENBQUM7UUFDNUUsTUFBTSxDQUFDLE9BQU8sR0FBRyxjQUFNLE9BQUEsTUFBTSxDQUFDLElBQUksS0FBSyxDQUFDLGNBQWMsQ0FBQyxDQUFDLEVBQWpDLENBQWlDLENBQUM7UUFDekQsTUFBTSxDQUFDLE9BQU8sR0FBRyxjQUFNLE9BQUEsTUFBTSxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUMsRUFBcEIsQ0FBb0IsQ0FBQztRQUM1QyxNQUFNLENBQUMsaUJBQWlCLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDbkMsQ0FBQyxDQUFDO0FBTkYsQ0FNRSxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgU3RyZWFtQ29sbGVjdG9yIH0gZnJvbSBcIkBhd3Mtc2RrL3R5cGVzXCI7XG5cbmV4cG9ydCBjb25zdCBzdHJlYW1Db2xsZWN0b3I6IFN0cmVhbUNvbGxlY3RvciA9IChcbiAgc3RyZWFtOiBCbG9iXG4pOiBQcm9taXNlPFVpbnQ4QXJyYXk+ID0+XG4gIG5ldyBQcm9taXNlPFVpbnQ4QXJyYXk+KChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICBjb25zdCByZWFkZXIgPSBuZXcgRmlsZVJlYWRlcigpO1xuICAgIHJlYWRlci5vbmxvYWQgPSAoKSA9PiByZXNvbHZlKG5ldyBVaW50OEFycmF5KHJlYWRlci5yZXN1bHQgYXMgQXJyYXlCdWZmZXIpKTtcbiAgICByZWFkZXIub25hYm9ydCA9ICgpID0+IHJlamVjdChuZXcgRXJyb3IoXCJSZWFkIGFib3J0ZWRcIikpO1xuICAgIHJlYWRlci5vbmVycm9yID0gKCkgPT4gcmVqZWN0KHJlYWRlci5lcnJvcik7XG4gICAgcmVhZGVyLnJlYWRBc0FycmF5QnVmZmVyKHN0cmVhbSk7XG4gIH0pO1xuIl19 | ||
//# sourceMappingURL=index.js.map |
@@ -6,2 +6,44 @@ # Change Log | ||
# [1.0.0-alpha.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/stream-collector-browser@0.1.0-preview.2...@aws-sdk/stream-collector-browser@1.0.0-alpha.3) (2020-01-22) | ||
### Features | ||
* add support for browser streaming ([#721](https://github.com/aws/aws-sdk-js-v3/issues/721)) ([133430c](https://github.com/aws/aws-sdk-js-v3/commit/133430c)) | ||
# 0.9.0 (2020-01-09) | ||
# 0.6.0 (2019-10-30) | ||
# 0.3.0 (2019-09-09) | ||
### Features | ||
* commit all clients ([#324](https://github.com/aws/aws-sdk-js-v3/issues/324)) ([cb268ed](https://github.com/aws/aws-sdk-js-v3/commit/cb268ed)) | ||
# 0.2.0 (2019-07-12) | ||
### Features | ||
* add npm badges for individual packages ([#251](https://github.com/aws/aws-sdk-js-v3/issues/251)) ([8adc10c](https://github.com/aws/aws-sdk-js-v3/commit/8adc10c)) | ||
* update jest v20 to v24 ([#243](https://github.com/aws/aws-sdk-js-v3/issues/243)) ([1e156ab](https://github.com/aws/aws-sdk-js-v3/commit/1e156ab)) | ||
# 0.1.0 (2019-04-19) | ||
# [1.0.0-alpha.2](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/stream-collector-browser@0.1.0-preview.2...@aws-sdk/stream-collector-browser@1.0.0-alpha.2) (2020-01-09) | ||
@@ -8,0 +50,0 @@ |
{ | ||
"name": "@aws-sdk/stream-collector-browser", | ||
"version": "1.0.0-alpha.2", | ||
"version": "1.0.0-alpha.3", | ||
"description": "Provides a way to store the contents of a stream into a Uint8Array", | ||
"scripts": { | ||
"prepublishOnly": "tsc", | ||
"pretest": "tsc -p tsconfig.test.json", | ||
"test": "jest --coverage" | ||
"pretest": "tsc -p tsconfig.json", | ||
"test": "karma start karma.conf.js" | ||
}, | ||
@@ -18,3 +18,3 @@ "author": { | ||
"dependencies": { | ||
"@aws-sdk/types": "^1.0.0-alpha.2", | ||
"@aws-sdk/types": "^1.0.0-alpha.3", | ||
"tslib": "^1.8.0" | ||
@@ -24,5 +24,11 @@ }, | ||
"@types/jest": "^24.0.12", | ||
"jest": "^24.7.1", | ||
"jasmine-core": "^3.5.0", | ||
"karma": "^4.4.1", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-jasmine": "^2.0.1", | ||
"karma-typescript": "^4.1.1", | ||
"puppeteer": "^2.0.0", | ||
"source-map": "^0.7.3", | ||
"typescript": "~3.4.0" | ||
} | ||
} |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
20235
9
51
9
2