Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bytescale/sdk

Package Overview
Dependencies
Maintainers
2
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bytescale/sdk - npm Package Compare versions

Comparing version 3.23.1 to 3.24.0

4

dist/types/public/shared/UrlBuilderTypes.d.ts

@@ -46,2 +46,6 @@ /**

/**
* The base URL of the Bytescale CDN. (Excludes trailing "/".)
*/
cdnUrl?: string;
/**
* Forces the browser to display a download prompt for the file, instead of displaying the file in the browser.

@@ -48,0 +52,0 @@ *

2

package.json
{
"name": "@bytescale/sdk",
"version": "3.23.1",
"version": "3.24.0",
"description": "Bytescale JavaScript SDK",

@@ -5,0 +5,0 @@ "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)",

@@ -18,6 +18,17 @@ // import randomGen from "random-seed";

// Ensure the chunk size is small enough to cause enough entropy (as we pick a new character for reach chunk).
const minRandomBlocks = 10;
const maxChunkSize = Math.min(64 * 1024, Math.ceil(sizeInBytes / minRandomBlocks));
let producedSize = 0;
let iteration = 0;
return new Readable({
read(readSize) {
read(requestedReadSize) {
const maxRequestedReadSize = Math.min(requestedReadSize, maxChunkSize);
// This ensures streams of the same size are unique, else they would have the same contents, assuming chunk size is the same.
// We use 0.8-1 to prevent really small chunks, which may create inefficiencies.
const randomness = randomBetween(0.8, 1);
let readSize = Math.ceil(maxRequestedReadSize * randomness);
let shouldEnd = false;

@@ -52,2 +63,6 @@

function randomBetween(min: number, max: number): number {
return Math.random() * (max - min) + min;
}
async function writeToDisk(reader: NodeJS.ReadableStream, path: string): Promise<void> {

@@ -54,0 +69,0 @@ await new Promise((resolve, reject) => {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc