@architect/functions
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "@architect/functions", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "architect run commands", | ||
@@ -5,0 +5,0 @@ "main": "index", |
@@ -7,3 +7,3 @@ var session = require('../session').client(process.env.SESSION_TABLE_NAME || 'arc-sessions') | ||
// ensure only valid command keys | ||
var allowed = ['location', 'session', 'json'] | ||
var allowed = ['location', 'session', 'json', 'status'] | ||
Object.keys(cmds).forEach(k=> { | ||
@@ -15,3 +15,3 @@ if (!allowed.includes(k)) { | ||
// ensure not both location and html | ||
// ensure not both location and json | ||
var hasLocationAndJson = cmds.hasOwnProperty('location') && cmds.hasOwnProperty('json') | ||
@@ -48,2 +48,5 @@ if (hasLocationAndJson) { | ||
} | ||
else if (cmds.status) { | ||
callback(JSON.stringify({statusCode:cmds.status, json:cmds.json || {} })) | ||
} | ||
else { | ||
@@ -50,0 +53,0 @@ callback(null, cmds) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37088
832