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

b2g-scripts

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

b2g-scripts - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

2

package.json
{
"name": "b2g-scripts",
"version": "0.3.0",
"version": "0.4.0",
"author": "James Lal <jlal@mozilla.com>",

@@ -5,0 +5,0 @@ "description": "B2G/Gaia Helper Scripts",

@@ -19,2 +19,7 @@ var Server = require('../lib/script')({

forward: {
alias: 'f',
desc: 'Forward all paths without extension to index.html'
},
port: {

@@ -77,15 +82,20 @@ alias: 'p',

var HAS_EXTENSION = /\.[a-zA-Z9-9]+(\?(.*))?$/
var SHARED = /^\/?shared/
require('http').createServer(function (request, response) {
request.addListener('end', function () {
var host = request.headers.host,
app = host.split('.')[0];
var host = request.headers.host;
var app = host.split('.')[0];
if(apps[app]) {
if(apps[app] && !SHARED.test(request.url)) {
var url;
if(argv.forward && !HAS_EXTENSION.test(request.url)) {
request.url = fsPath.join('/' + apps[app], app, 'index.html');
} else {
request.url = fsPath.join('/' + apps[app], app, request.url);
file.serve(
request, response
);
} else {
file.serve(request, response);
}
}
file.serve(request, response);
});

@@ -92,0 +102,0 @@ }).listen(port);

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