@certik/skynet 0.8.11 → 0.8.12

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,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.12
4
+
5
+ - Added `log` library for use with AWS Athena
6
+
3
7
  ## 0.8.11
4
8
 
5
9
  - Improved `updateRecordByKeys` in `dynamodb` library to support fields deletion
package/examples/indexer CHANGED
@@ -36,7 +36,12 @@ async function check({ protocol, state, verbose }) {
36
36
 
37
37
  const app = indexer({
38
38
  name: "LibSkynetExampleIndexer",
39
- selector: { protocol: { type: "string", description: "which chain to index" } },
39
+ selector: {
40
+ protocol: {
41
+ type: "string",
42
+ description: "which chain to index"
43
+ }
44
+ },
40
45
 
41
46
  build: {
42
47
  func: build,
package/log.js ADDED
@@ -0,0 +1,17 @@
1
+ var inline = {};
2
+ inline.log = function (...args) {
3
+ let line = `${new Date().toISOString()}\t`;
4
+
5
+ // Convert to string and filter out newline to tabs (AWS Athena)
6
+ for (let i = 0, l = args.length; i < l; i++) {
7
+ // Certain objects don't get converted
8
+ // Note using JSON.stringfy may be too slow for large objects
9
+ line += `${args[i]} `.replace(/\n/gm, "\t");
10
+ }
11
+
12
+ console.log(line.trim());
13
+ };
14
+
15
+ module.exports = {
16
+ inline,
17
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.8.11",
3
+ "version": "0.8.12",
4
4
  "description": "Skynet Shared JS library",
5
5
  "main": "index.js",
6
6
  "author": "CertiK Engineering",