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

fh-fhc

Package Overview
Dependencies
Maintainers
2
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fh-fhc - npm Package Compare versions

Comparing version 0.7.14-167 to 0.7.15-168

lib/appendpoints.js

4

bin/fhc.js

@@ -59,2 +59,3 @@ #!/usr/bin/env node

var cmd = fhc.commands[fhc.command];
cmd(fhc.argv, function(err, data) {

@@ -70,3 +71,4 @@ if (err) return errorHandler(err);

// display table if both requested and supported..
if (!conf.json && conf.table && cmd.table) {
if (!conf.json && conf.table && cmd.table) {
if (cmd.message) console.log(cmd.message);
console.log(cmd.table.toString());

@@ -73,0 +75,0 @@ output.write("", errorHandler);

@@ -42,4 +42,6 @@ exports.login = require('./lib/login.js');

exports.deploytarget = require('./lib/deploy-target.js');
exports.secureendpoints = require('./lib/secureendpoints.js');
exports.appendpoints = require('./lib/appendpoints.js');

@@ -32,3 +32,3 @@

// read app to get widget guid and cloud type
read([appId], function (err, res) {
read([appId], function (err, res) {
if(err) return cb(err);

@@ -40,8 +40,9 @@

var nodejs = 'boolean' === typeof inst.nodejs ? inst.nodejs : (inst.nodejs === 'true' ? true : false);
var key = inst.apiKey;
if (nodejs) {
if ("live" === target) {
doLiveAct(appId, funct, data, cb);
doLiveAct(appId, funct, data, key, cb);
}else {
doDevAct(appId, funct, data, cb);
doDevAct(appId, funct, data, key, cb);
}

@@ -60,3 +61,3 @@ } else {

// TODO - full development proxy (no proxy through millicore)
// millicore act call
function doMillicoreAct(appId, widgId, funct, data, cb) {

@@ -73,4 +74,4 @@ log.silly(widgId, "widgId");

// TODO - cache the endpoint lookup (so we don't have to call every time)
function doAct(appEnv, appId, funct, data, cb) {
// nodejs act call
function doAct(appEnv, appId, funct, data, key, cb) {
log.silly(appEnv, "Act call appEnv");

@@ -86,4 +87,8 @@ log.silly(appId, "Act call appId");

var headers = {
"X-FH-AUTH-APP": key
};
// post to /cloud
request({uri: appUrl + "cloud/" + funct, method: 'POST', json: data}, function (err, response, body) {
request({uri: appUrl + "cloud/" + funct, headers: headers, method: 'POST', json: data}, function (err, response, body) {
if(err) return cb(err);

@@ -99,9 +104,9 @@ log.verbose(response.statusCode, "Act call response statusCode");

// Do our live action
function doLiveAct(appId, funct, data, cb) {
doAct('live', appId, funct, data, cb);
function doLiveAct(appId, funct, data, key, cb) {
doAct('live', appId, funct, data, key, cb);
}
// Do our dev action
function doDevAct(appId, funct, data, cb) {
doAct('development', appId, funct, data, cb);
function doDevAct(appId, funct, data, key, cb) {
doAct('development', appId, funct, data, key, cb);
}

@@ -108,0 +113,0 @@

@@ -100,5 +100,7 @@ process.title = "fhc";

,'ping'
,'appendpoints'
,'read'
,'resources'
,'search'
,'secureendpoints'
,'stage'

@@ -105,0 +107,0 @@ ,'stats'

@@ -5,3 +5,3 @@ {

"keywords" : [ "cli", "feedhenry" ],
"version": "0.7.14-167",
"version": "0.7.15-168",
"preferGlobal" : true,

@@ -8,0 +8,0 @@ "homepage" : "http://git.io/fh-fhc",

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

0.7.14-167
0.7.15-168
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