Socket
Socket
Sign inDemoInstall

urgot

Package Overview
Dependencies
40
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

2

dist/bin/options.js

@@ -8,3 +8,3 @@ export const files = {

class CreateApp {
onResponse(vlaue: unknown, context: Context) {
onResponse(value: unknown, context: Context) {
context.body = vlaue as object

@@ -11,0 +11,0 @@ }

@@ -27,2 +27,3 @@ /// <reference types="node" />

export declare class File {
#private;
stream: Stream.Readable;

@@ -37,2 +38,3 @@ name: string;

getRealMimeType(): Promise<FileType.FileTypeResult | undefined>;
get buffer(): Promise<Buffer>;
}

@@ -39,0 +41,0 @@ declare type Params = {

@@ -10,2 +10,3 @@ import * as FileType from 'file-type';

encoding = '';
#buffer;
constructor(stream) {

@@ -15,4 +16,14 @@ this.stream = stream;

async getRealMimeType() {
return await FileType.fileTypeFromStream(this.stream);
return await FileType.fileTypeFromBuffer(await this.buffer);
}
get buffer() {
return new Promise((resolve, reject) => {
if (this.#buffer)
resolve(this.#buffer);
const buffers = [];
this.stream.on('error', reject);
this.stream.on('data', (chunk) => buffers.push(chunk));
this.stream.on('end', () => resolve(Buffer.concat(buffers)));
});
}
}

@@ -19,0 +30,0 @@ const parseBody = (response, options) => {

{
"name": "urgot",
"version": "1.1.0",
"version": "1.1.1",
"description": "a Node.js web framework",

@@ -5,0 +5,0 @@ "type": "module",

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