Socket
Socket
Sign inDemoInstall

iceflow-server

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iceflow-server - npm Package Compare versions

Comparing version 0.1.9 to 0.2.0

32

lib/HttpService.js

@@ -113,8 +113,6 @@ 'use strict';

//breaks up the action, the url structure determines what action to use by convention, example /page/do = getPageDo
const frags = _.compact(specOptions.action.split('/'));
//check to convert to show action or not
const file = frags[1] ? (isNaN(frags[1]) ? frags[1] : 'Show') : '';
const dirData= this.getDirDateFromRoute(specOptions.action);
//require the action
const action = !req.testMode ? require('../../../server/api/actions/' + frags[0] + '/get' + file) : require('../tests/stubs/action')(req.testMode);
const action = !req.testMode ? require('../../../server/api/actions/' + dirData.dir + '/get' + dirData.file) : require('../tests/stubs/action')(req.testMode);
const requestData = {

@@ -390,4 +388,28 @@ url: (specOptions.api ? conf.apis[specOptions.api] : '/api') + specOptions.action

getDirDateFromRoute(route){
//breaks up the action, the url structure determines what action to use by convention, example /page/do = getPageDo
const frags = _.compact(route.split('/'));
const dir = frags.shift();
var file = '';
if(frags.length === 1){
file += frags[0] ? (isNaN(frags[0]) ? '_' + frags[0].toLowerCase() : '_show') : '';
}else if(frags.length > 1){
let tail = frags.pop();
if(!isNaN(tail)){
frags.push('_show');
}
file += '_' + frags.join('_');
}
return {
file: file.toLowerCase(),
dir : dir
};
}
}
module.exports = new HttpService();

2

package.json

@@ -66,3 +66,3 @@ {

},
"version": "0.1.9"
"version": "0.2.0"
}

@@ -216,3 +216,3 @@ #Iceflow Server

would get api/actions/users/getExample.js
would get api/actions/users/get_example.js

@@ -223,3 +223,3 @@ {

would get api/actions/users/getShow.js. Numeric values for a specific resource get converted to getShow.
would get api/actions/users/get_show.js. Numeric values for a specific resource get converted to getShow.

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