@architect/functions
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "@architect/functions", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "architect run commands", | ||
@@ -5,0 +5,0 @@ "main": "index", |
@@ -7,6 +7,6 @@ var session = require('../session').client(process.env.SESSION_TABLE_NAME || 'arc-sessions') | ||
// ensure only valid command keys | ||
var allowed = ['location', 'session', 'html'] | ||
var allowed = ['location', 'session', 'html', 'status'] | ||
Object.keys(cmds).forEach(k=> { | ||
if (!allowed.includes(k)) { | ||
throw Error(k + ' unknown key. Only location, session and html allowed') | ||
throw Error(k + ' unknown key. Only location, session, status and html allowed') | ||
} | ||
@@ -47,2 +47,5 @@ }) | ||
} | ||
else if (cmds.status) { | ||
callback(JSON.stringify({statusCode:cmds.status, html:cmds.html || 'not found'})) | ||
} | ||
else { | ||
@@ -49,0 +52,0 @@ callback(null, cmds) |
Sorry, the diff of this file is not supported yet
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
36957
829