@tilework/mosaic-dev-utils
Advanced tools
Comparing version 0.1.6 to 0.2.1
const fetch = require('node-fetch'); | ||
const extIp = require('ext-ip')(); | ||
const logger = require('./logger'); | ||
const generateUUID = require('./uuid'); | ||
const { getSystemConfig } = require('./get-configuration-file'); | ||
@@ -16,3 +18,11 @@ | ||
this.setClientIdentifier(Date.now()); | ||
try { | ||
this.setClientIdentifier( | ||
generateUUID() | ||
); | ||
} catch (e) { | ||
this.setClientIdentifier( | ||
Date.now() | ||
); | ||
} | ||
} | ||
@@ -47,2 +57,3 @@ | ||
} | ||
const rawBody = { | ||
@@ -55,2 +66,10 @@ ...data, | ||
try { | ||
const ip = await extIp.get(); | ||
rawBody.uip = ip; | ||
} catch (e) { | ||
console.log(e); | ||
// Do nothing | ||
} | ||
if (this.lang !== UNKNOWN) { | ||
@@ -88,2 +107,3 @@ // get system language here | ||
); | ||
const jsonResponse = await res.json(); | ||
@@ -96,3 +116,3 @@ | ||
} catch (e) { | ||
console.log('Failed to report telemetry data'); | ||
} | ||
@@ -99,0 +119,0 @@ } |
@@ -57,4 +57,4 @@ const logger = require('@tilework/mosaic-dev-utils/logger'); | ||
try { | ||
const packagePath = getPackagePath(packageName); | ||
const packageJson = getPackageJson(packagePath); | ||
const packagePath = getPackagePath(packageName, cwd); | ||
const packageJson = getPackageJson(packagePath, cwd); | ||
@@ -61,0 +61,0 @@ acc.push({ |
{ | ||
"name": "@tilework/mosaic-dev-utils", | ||
"description": "Development utilities used by CSA.", | ||
"version": "0.1.6", | ||
"version": "0.2.1", | ||
"dependencies": { | ||
"chalk": "^4.1.0", | ||
"ext-ip": "^0.3.9", | ||
"mem-fs": "^1.2.0", | ||
@@ -16,3 +17,3 @@ "mem-fs-editor": "^7.0.1", | ||
}, | ||
"gitHead": "4b8cdb44b424bdd21c83ee529d781f827ec36665" | ||
"gitHead": "37be386393a60c3d3a94fa55783fc8f950e0905a" | ||
} |
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
26722
28
761
6
+ Addedext-ip@^0.3.9
+ Addedajv@6.12.6(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedext-ip@0.3.9(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.14.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)
- Removedcore-util-is@1.0.3(transitive)