@fnproject/fdk 0.0.84 → 0.0.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/fn-fdk.js +9 -0
  2. package/package.json +3 -4
package/fn-fdk.js CHANGED
@@ -362,6 +362,7 @@ function canonHeader (h) {
362
362
  const first = h.substr(0, 1)
363
363
  return first.toUpperCase() + last.toLowerCase()
364
364
  }
365
+ return ''
365
366
  }).join('-')
366
367
  }
367
368
 
@@ -444,6 +445,14 @@ class HTTPGatewayContext {
444
445
  this.ctx.setResponseHeader('Fn-Http-Status', status)
445
446
  }
446
447
 
448
+ /**
449
+ * Returns the HTTP status code of the HTTP response
450
+ * @returns {string}
451
+ */
452
+ get statusCode () {
453
+ return this.ctx.getResponseHeader('Fn-Http-Status')
454
+ }
455
+
447
456
  /**
448
457
  * Sets a response header to zero or more values
449
458
  * @param key {string}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fnproject/fdk",
3
- "version": "0.0.84",
3
+ "version": "0.0.85",
4
4
  "description": "Function Developer Kit for Fn",
5
5
  "main": "fn-fdk.js",
6
6
  "scripts": {
@@ -26,9 +26,8 @@
26
26
  },
27
27
  "devDependencies": {
28
28
  "rewire": "5.0.0",
29
- "sinon": "^9.0.1",
30
29
  "standard": "17.1.2",
31
- "tape": "^4.13.2",
32
- "tmp": "0.1.0"
30
+ "tape": "^5.9.0",
31
+ "tmp": "^0.2.3"
33
32
  }
34
33
  }