@particle-network/analytics
Advanced tools
Comparing version 0.1.2 to 0.1.3
// src/bi.ts | ||
import { v4 } from "uuid"; | ||
import { sha256 } from "hash.js"; | ||
var AcitveLoginType = /* @__PURE__ */ ((AcitveLoginType2) => { | ||
@@ -28,4 +27,2 @@ AcitveLoginType2["PARTICLE"] = "particle"; | ||
active(params) { | ||
const auth = this.options.auth; | ||
const macKey = sha256().update(auth.username + auth.password).digest("hex").toLowerCase(); | ||
const timestamp = Math.round(new Date().getTime() / 1e3); | ||
@@ -39,4 +36,3 @@ const randomStr = v4(); | ||
projectUuid: project_uuid, | ||
projectKey: project_key, | ||
mac_key: macKey | ||
projectKey: project_key | ||
}; | ||
@@ -43,0 +39,0 @@ const headers = { |
@@ -5,3 +5,2 @@ "use strict"; | ||
const uuid_1 = require("uuid"); | ||
const hash_js_1 = require("hash.js"); | ||
var AcitveLoginType; | ||
@@ -31,7 +30,2 @@ (function (AcitveLoginType) { | ||
active(params) { | ||
const auth = this.options.auth; | ||
const macKey = (0, hash_js_1.sha256)() | ||
.update(auth.username + auth.password) | ||
.digest('hex') | ||
.toLowerCase(); | ||
const timestamp = Math.round(new Date().getTime() / 1000); | ||
@@ -46,3 +40,2 @@ const randomStr = (0, uuid_1.v4)(); | ||
projectKey: project_key, | ||
mac_key: macKey, | ||
}; | ||
@@ -49,0 +42,0 @@ const headers = { |
@@ -27,6 +27,2 @@ export declare enum AcitveLoginType { | ||
}; | ||
auth: { | ||
username: string; | ||
password: string; | ||
}; | ||
} | ||
@@ -33,0 +29,0 @@ export interface SendActiveParams { |
{ | ||
"name": "@particle-network/analytics", | ||
"private": false, | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"files": [ | ||
@@ -26,3 +26,3 @@ "lib", | ||
}, | ||
"gitHead": "82cb70c924baa0df722172a88cb2a68e897c9cb4" | ||
"gitHead": "9c4153aafeeeb8ca1b964fd9c04ba03efcd848fa" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
23842
184