@certik/skynet 0.10.50 → 0.10.52

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.
package/CHANGELOG.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## 0.10.50
3
+ ## 0.10.52
4
4
 
5
- - Update slack postMessage to allow passing channelId directly
5
+ - Refactor: `getDateOnly` now accepts both date strings and date objects
6
+
7
+ ## 0.10.50 & 0.10.51
8
+
9
+ - Updated slack postMessage to allow passing channelId directly
6
10
  - BREAKING: Added key param for postGenieMessage
7
11
 
8
12
  ## 0.10.49
package/date.js CHANGED
@@ -3,7 +3,7 @@ const { arrayGroup } = require("./util");
3
3
  const MS_IN_A_DAY = 3600 * 24 * 1000;
4
4
 
5
5
  function getDateOnly(date) {
6
- return date.toISOString().split("T")[0];
6
+ return new Date(date).toISOString().split("T")[0];
7
7
  }
8
8
 
9
9
  function findDateAfter(date, n) {
package/opsgenie.js CHANGED
@@ -1,11 +1,11 @@
1
1
  const fetch = require("node-fetch");
2
2
  const md5 = require("md5");
3
3
 
4
- function getGenieKey() {
5
- return process.env.OPSGENIE_API_KEY;
4
+ function getGenieKey(key) {
5
+ return key || process.env.OPSGENIE_API_KEY;
6
6
  }
7
7
 
8
- function getGenieEndPoint(key) {
8
+ function getGenieEndPoint() {
9
9
  return process.env.OPSGENIE_END_POINT || "https://api.opsgenie.com/v2/alerts";
10
10
  }
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.10.50",
3
+ "version": "0.10.52",
4
4
  "description": "Skynet Shared JS library",
5
5
  "main": "index.js",
6
6
  "author": "CertiK Engineering",
@@ -35,4 +35,4 @@
35
35
  "sinon": "^14.0.0"
36
36
  },
37
37
  "license": "MIT"
38
- }
38
+ }