@dexto/analytics 1.2.2 → 1.2.4
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/dist/state.cjs +2 -2
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +2 -2
- package/package.json +2 -2
package/dist/state.cjs
CHANGED
|
@@ -39,8 +39,6 @@ var import_crypto = require("crypto");
|
|
|
39
39
|
var import_module = require("module");
|
|
40
40
|
var import_core = require("@dexto/core");
|
|
41
41
|
const import_meta = {};
|
|
42
|
-
const requireCJS = (0, import_module.createRequire)(import_meta.url);
|
|
43
|
-
const { machineIdSync } = requireCJS("node-machine-id");
|
|
44
42
|
const STATE_DIR = (0, import_core.getDextoGlobalPath)("telemetry");
|
|
45
43
|
const STATE_FILE = path.join(STATE_DIR, "state.json");
|
|
46
44
|
async function loadState() {
|
|
@@ -70,6 +68,8 @@ async function saveState(state) {
|
|
|
70
68
|
}
|
|
71
69
|
function computeDistinctId() {
|
|
72
70
|
try {
|
|
71
|
+
const requireCJS = (0, import_module.createRequire)(import_meta.url);
|
|
72
|
+
const { machineIdSync } = requireCJS("node-machine-id");
|
|
73
73
|
const id = machineIdSync(true);
|
|
74
74
|
if (typeof id === "string" && id.length > 0) return `DEXTO-${id}`;
|
|
75
75
|
} catch {
|
package/dist/state.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAKD;;;GAGG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC,CAqBzD;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAGpE"}
|
package/dist/state.js
CHANGED
|
@@ -3,8 +3,6 @@ import * as path from "path";
|
|
|
3
3
|
import os from "os";
|
|
4
4
|
import { randomUUID, createHash } from "crypto";
|
|
5
5
|
import { createRequire } from "module";
|
|
6
|
-
const requireCJS = createRequire(import.meta.url);
|
|
7
|
-
const { machineIdSync } = requireCJS("node-machine-id");
|
|
8
6
|
import { getDextoGlobalPath } from "@dexto/core";
|
|
9
7
|
const STATE_DIR = getDextoGlobalPath("telemetry");
|
|
10
8
|
const STATE_FILE = path.join(STATE_DIR, "state.json");
|
|
@@ -35,6 +33,8 @@ async function saveState(state) {
|
|
|
35
33
|
}
|
|
36
34
|
function computeDistinctId() {
|
|
37
35
|
try {
|
|
36
|
+
const requireCJS = createRequire(import.meta.url);
|
|
37
|
+
const { machineIdSync } = requireCJS("node-machine-id");
|
|
38
38
|
const id = machineIdSync(true);
|
|
39
39
|
if (typeof id === "string" && id.length > 0) return `DEXTO-${id}`;
|
|
40
40
|
} catch {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dexto/analytics",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"node-machine-id": "^1.1.12",
|
|
17
|
-
"@dexto/core": "1.2.
|
|
17
|
+
"@dexto/core": "1.2.4"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|