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

impress

Package Overview
Dependencies
Maintainers
4
Versions
719
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

impress - npm Package Compare versions

Comparing version 3.0.12 to 3.0.13

7

lib/application.js

@@ -22,4 +22,3 @@ 'use strict';

const NAMESPACES = { node, npm, metarhia, process };
const POLY = { fetch: metarhia.metautil.fetch };
const SANDBOX = { ...COMMON_CONTEXT, ...ERRORS, ...NAMESPACES, ...POLY };
const SANDBOX = { ...COMMON_CONTEXT, ...ERRORS, ...NAMESPACES };

@@ -75,5 +74,6 @@ const ERR_INIT = 'Can not initialize an Application';

async load() {
async load({ invoke }) {
this.startWatch();
this.createSandbox();
this.sandbox.application.invoke = invoke;
this.sandbox.application.emit('loading');

@@ -96,2 +96,3 @@ await this.parallel([

this.sandbox.application.emit('loaded');
await this.start();
}

@@ -98,0 +99,0 @@

@@ -109,11 +109,18 @@ 'use strict';

const { size } = stat;
const range = metarhia.metautil.parseRange(transport.req.headers.range);
const { start, end = size - 1 } = range;
if (start >= end || start >= size || end >= size) {
file = this.find(filePath, 416);
return void transport.write(file.data, 416, fileExt);
const options = { size };
let code = 200;
const { headers } = transport.req;
if (headers.range) {
const range = metarhia.metautil.parseRange(headers.range);
const { start, end = size - 1 } = range;
if (start >= end || start >= size || end >= size) {
file = this.find(filePath, 416);
return void transport.write(file.data, 416, fileExt);
}
options.start = start;
options.end = end;
code = 206;
}
const options = { start, end, size };
const readable = node.fs.createReadStream(absPath, options);
return void transport.write(readable, 206, fileExt, options);
return void transport.write(readable, code, fileExt, options);
}

@@ -120,0 +127,0 @@ }

@@ -99,7 +99,5 @@ 'use strict';

await application.load();
application.sandbox.application.invoke = invoke;
await application.start();
await application.load({ invoke });
console.info(`Application started in worker ${threadId}`);
parentPort.postMessage({ name: 'started', kind: workerData.kind });
})().catch(logError(`Can not start worker ${threadId}`));
{
"name": "impress",
"version": "3.0.12",
"version": "3.0.13",
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>",

@@ -41,3 +41,3 @@ "description": "Enterprise application server for Node.js",

"type": "git",
"url": "https://github.com/metarhia/impress"
"url": "git+https://github.com/metarhia/impress.git"
},

@@ -63,3 +63,3 @@ "bugs": {

"engines": {
"node": "18 || 20"
"node": "18 || 20 || 21"
},

@@ -72,3 +72,3 @@ "dependencies": {

"metautil": "^3.15.0",
"metavm": "^1.3.0",
"metavm": "^1.4.0",
"metawatch": "^1.1.1"

@@ -75,0 +75,0 @@ },

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