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

ripple-emulator

Package Overview
Dependencies
Maintainers
5
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ripple-emulator - npm Package Compare versions

Comparing version 0.9.22 to 0.9.23

11

doc/CHANGELOG.md

@@ -0,1 +1,12 @@

## v0.9.23 - Jun 26, 2014
* RIPPLE-63 Ripple should default to local proxy, not remote
https://github.com/apache/incubator-ripple/pull/25
* Fix RIPPLE-61: search for locally installed cordova module before expecting to find it globally installed
https://github.com/apache/incubator-ripple/pull/24
* Fix RIPPLE-60 - proxy not detecting json properly
https://github.com/apache/incubator-ripple/pull/23
## v0.9.22 - Apr 24, 2014

@@ -2,0 +13,0 @@

54

lib/server/emulate/hosted.js

@@ -127,2 +127,13 @@ /*

function localInjection() {
var cordovaPrepare;
try {
cordovaPrepare = require.resolve('cordova') ? require('cordova/src/prepare') : null;
}
catch (e) {
console.log('INFO: '.green +
'Could not find cordova as a local module. Expecting to find it installed globally.');
}
function inject(file, req, res) {

@@ -165,19 +176,32 @@ fs.readFile(file, "utf-8", function (err, data) {

return function (req, res, next) {
var callback = function (err) {
if (err) {
console.error('Failed to execute command: cordova prepare. '.red +
'Make sure you\'ve installed cordova.'.red);
}
// make ripple compatible with phonegap
// as of version 3.0 phonegap uses phonegap.js instead of cordova.js
// but the files are identical
if (req.query.phonegap) {
var path = './platforms/' + req.staticPlatform + '/assets/www';
fs.readFile(path + '/cordova.js', function(err, data) {
if(err) throw err;
console.log('... copying cordova.js to phonegap.js');
fs.writeFileSync(path + '/phonegap.js', data);
});
}
console.log('... done.');
handle(req, res, next);
};
if (req.query.enableripple && req.staticPlatform) {
console.log('refreshing project (platform: ' + req.staticPlatform + ') ...');
exec('cordova prepare ' + req.staticPlatform, function () {
// make ripple compatible with phonegap
// as of version 3.0 phonegap uses phonegap.js instead of cordova.js
// but the files are identical
if(req.query.phonegap) {
var path = './platforms/' + req.staticPlatform + '/assets/www';
fs.readFile(path + '/cordova.js', function(err, data) {
if(err) throw err;
console.log('... copying cordova.js to phonegap.js');
fs.writeFileSync(path + '/phonegap.js', data);
});
}
console.log('... done.');
handle(req, res, next);
});
if (!!cordovaPrepare) {
cordovaPrepare({ platforms: [ req.staticPlatform ] }).then(callback).done();
}
else {
exec('cordova prepare ' + req.staticPlatform, callback);
}
}

@@ -184,0 +208,0 @@ else {

@@ -86,3 +86,3 @@ /*

if (Object.keys(req.body).length > 0) {
if (req.get("content-type") === "application/json") {
if (req.is("json")) {
proxyReqData.body = JSON.stringify(req.body);

@@ -89,0 +89,0 @@ } else {

{
"name": "ripple-emulator",
"version": "0.9.22",
"version": "0.9.23",
"description": "A browser based html5 mobile application development and testing tool",

@@ -5,0 +5,0 @@ "homepage": "http://ripple.incubator.apache.org/",

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