Compare View

switch
from
...
to
 
Commits (2)

Changes

Showing 2 changed files Inline Diff

1 "use strict"; 1 "use strict";
2 2
3 const simpleGit = require('simple-git'); 3 const simpleGit = require('simple-git');
4 const macaddress = require('macaddress'); 4 const macaddress = require('macaddress');
5 const machineid = require('node-machine-id'); 5 const machineid = require('node-machine-id');
6 const sha1 = require('sha1'); 6 const sha1 = require('sha1');
7 7
8 const matrix = { 8 const matrix = {
9 host_id: {} 9 host_id: {}
10 }; 10 };
11 11
12 // get active git version 12 // get active git version
13 simpleGit(process.cwd()).raw( 13 simpleGit(process.cwd()).raw(
14 ['describe'], 14 ['describe'],
15 function(err, result) { 15 function(err, result) {
16 if (!err) { 16 if (!err) {
17 if (result) { 17 if (result) {
18 result = result.trim(); 18 result = result.trim();
19 } 19 }
20 matrix.version_active = result; 20 matrix.version_active = result;
21 } 21 }
22 } 22 }
23 ) 23 )
24 24
25 macaddress.one(function(err, mac) { 25 macaddress.one(function(err, mac) {
26 if (err) return; 26 if (err) return;
27 27
28 matrix.host_id.mac = mac; 28 matrix.host_id.mac = mac;
29 }) 29 })
30 30
31 matrix.host_id.machineid = machineid.machineIdSync(); 31 matrix.host_id.machineid = machineid.machineIdSync();
32 32
33 matrix.host_id_hash = sha1('KOMODO' + matrix.host_id.machineid + matrix.host_id.mac); 33 matrix.host_id_hash = sha1('KOMODO' + matrix.host_id.machineid + matrix.host_id.mac);
34 34
35 module.exports = matrix; 35 module.exports = matrix;
36 36
1 { 1 {
2 "name": "komodo-sdk", 2 "name": "komodo-sdk",
3 "version": "1.15.2", 3 "version": "1.15.3",
4 "description": "SDK for Komodo", 4 "description": "SDK for Komodo",
5 "main": "index.js", 5 "main": "index.js",
6 "scripts": { 6 "scripts": {
7 "test": "mocha", 7 "test": "mocha",
8 "postversion": "git push && git push --tags" 8 "postversion": "git push && git push --tags"
9 }, 9 },
10 "repository": { 10 "repository": {
11 "type": "git", 11 "type": "git",
12 "url": "git@gitlab.kodesumber.com:komodo/komodo-sdk.git" 12 "url": "git@gitlab.kodesumber.com:komodo/komodo-sdk.git"
13 }, 13 },
14 "keywords": [ 14 "keywords": [
15 "ppob", 15 "ppob",
16 "payment", 16 "payment",
17 "komodo" 17 "komodo"
18 ], 18 ],
19 "author": "Adhidarma Hadiwinoto <gua@adhisimon.org>", 19 "author": "Adhidarma Hadiwinoto <gua@adhisimon.org>",
20 "license": "ISC", 20 "license": "ISC",
21 "dependencies": { 21 "dependencies": {
22 "basic-auth": "^2.0.0", 22 "basic-auth": "^2.0.0",
23 "body-parser": "^1.18.2", 23 "body-parser": "^1.18.2",
24 "express": "^4.16.2", 24 "express": "^4.16.2",
25 "express-session": "^1.15.6", 25 "express-session": "^1.15.6",
26 "lru-cache": "^4.1.1", 26 "lru-cache": "^4.1.1",
27 "macaddress": "^0.2.8", 27 "macaddress": "^0.2.8",
28 "moment": "^2.19.1", 28 "moment": "^2.19.1",
29 "node-machine-id": "^1.1.10", 29 "node-machine-id": "^1.1.10",
30 "node-natural-sort": "^0.8.6", 30 "node-natural-sort": "^0.8.6",
31 "numeral": "^2.0.6", 31 "numeral": "^2.0.6",
32 "nunjucks": "^3.0.1", 32 "nunjucks": "^3.0.1",
33 "redis": "^2.8.0", 33 "redis": "^2.8.0",
34 "request": "^2.81.0", 34 "request": "^2.81.0",
35 "sha1": "^1.1.1", 35 "sha1": "^1.1.1",
36 "simple-git": "^1.80.1", 36 "simple-git": "^1.80.1",
37 "strftime": "^0.10.0", 37 "strftime": "^0.10.0",
38 "uniqid": "^4.1.1", 38 "uniqid": "^4.1.1",
39 "uuid": "^3.1.0", 39 "uuid": "^3.1.0",
40 "winston": "^2.3.1", 40 "winston": "^2.3.1",
41 "winston-circular-buffer": "^1.0.0", 41 "winston-circular-buffer": "^1.0.0",
42 "winston-daily-rotate-file": "^1.4.6" 42 "winston-daily-rotate-file": "^1.4.6"
43 } 43 }
44 } 44 }
45 45