New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

asset-pipe-build-server

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asset-pipe-build-server - npm Package Compare versions

Comparing version 1.0.0-alpha.8 to 1.0.0-alpha.9

lib/schemas.js

35

lib/main.js

@@ -7,3 +7,6 @@ 'use strict';

const express = require('express');
const { validationError: ValidationError } = require('error-obj');
const params = require('./params');
const schemas = require('./schemas');

@@ -45,21 +48,27 @@

if (error) {
return next(new Error());
return next(new Error('Failed parsing postBundle POST-body'));
}
let uri = `${(req.secure ? 'https://' : 'http://') + req.headers.host}/bundle/`;
schemas.ids.validate(bodyObj, (validationError, value) => {
if (validationError) {
return next(new ValidationError(validationError));
}
bodyObj.forEach((fileName, index, arr) => {
arr[index] = this.sink.reader(fileName);
});
let uri = `${(req.secure ? 'https://' : 'http://') + req.headers.host}/bundle/`;
const writer = this.sink.writer('js', (id, fileName) => {
uri += fileName;
res.status(200).json({
file: fileName,
uri,
id,
value.forEach((fileName, index, arr) => {
arr[index] = this.sink.reader(fileName);
});
const writer = this.sink.writer('js', (id, fileName) => {
uri += fileName;
res.status(200).json({
file: fileName,
uri,
id,
});
});
reader(value).pipe(writer);
});
reader(bodyObj).pipe(writer);
});

@@ -66,0 +75,0 @@ };

'use strict';
const validators = require('./validators.js');
const errors = require('error-obj');
const { validationError: ValidationError } = require('error-obj');
const schemas = require('./schemas');
/**

@@ -15,5 +16,5 @@ * Validate the "fileName" parameter

module.exports.fileName = (req, res, next, param) => {
validators.fileName.validate(param, (error, value) => {
schemas.fileName.validate(param, (error, value) => {
if (error) {
return next(new errors.validationError(error)); // eslint-disable-line
return next(new ValidationError(error));
}

@@ -20,0 +21,0 @@

{
"name": "asset-pipe-build-server",
"version": "1.0.0-alpha.8",
"version": "1.0.0-alpha.9",
"author": "Amedia",

@@ -24,5 +24,2 @@ "description": "Asset pipe build server",

],
"engines": {
"node": "6.x"
},
"bugs": {

@@ -32,4 +29,4 @@ "url": "https://github.com/asset-pipe/asset-pipe-build-server/issues"

"dependencies": {
"asset-pipe-js-reader": "1.0.0-alpha.2",
"asset-pipe-sink-fs": "1.0.0-alpha.3",
"asset-pipe-js-reader": "1.0.0-alpha.5",
"asset-pipe-sink-fs": "1.0.0-alpha.5",
"body": "5.1.0",

@@ -44,3 +41,3 @@ "bole": "3.0.2",

"hbs": "4.0.1",
"joi": "10.2.2",
"joi": "^10.2.2",
"request": "2.79.0"

@@ -47,0 +44,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