@abtnode/analytics 1.17.12 → 1.17.13-beta-20260512-042419-7b556a38

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.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +19 -7
package/index.js CHANGED
@@ -14,11 +14,11 @@ exports.getJsonResultPath = getJsonResultPath;
14
14
  /* eslint-disable @typescript-eslint/comma-dangle */
15
15
  const fs_extra_1 = __importDefault(require("fs-extra"));
16
16
  const path_1 = __importDefault(require("path"));
17
- const tar_1 = __importDefault(require("tar"));
18
17
  const shelljs_1 = __importDefault(require("shelljs"));
19
18
  const debug_1 = __importDefault(require("debug"));
20
19
  const child_process_1 = require("child_process");
21
20
  const run_script_1 = __importDefault(require("@abtnode/util/lib/run-script"));
21
+ const safe_tar_1 = require("@abtnode/util/lib/safe-tar");
22
22
  const GOACCESS_CONFIG = path_1.default.join(__dirname, 'goaccess.conf');
23
23
  const ANALYTICS_DIR = '.analytics';
24
24
  const debug = (0, debug_1.default)('@abtnode/analytics');
@@ -44,7 +44,7 @@ async function decompressLog(source, tmpDir) {
44
44
  if (fs_extra_1.default.existsSync(dest)) {
45
45
  fs_extra_1.default.removeSync(dest);
46
46
  }
47
- await tar_1.default.x({ file: source, C: tmpDir });
47
+ await (0, safe_tar_1.safeTarExtract)({ file: source, cwd: tmpDir });
48
48
  return dest;
49
49
  }
50
50
  function splitLogByGroup(filePath, dataDir, date, groups) {
@@ -85,7 +85,7 @@ async function processLogForGroup(dataDir, date, group) {
85
85
  fs_extra_1.default.removeSync(group.log);
86
86
  return group;
87
87
  }
88
- // FIXME: @wangshijun does `LANG` work on any location
88
+ // FIXME: does `LANG` work on any location
89
89
  const env = { ...process.env, LANG: 'en_US.UTF-8' };
90
90
  const command = `goaccess --no-query-string --no-html-last-updated --html-prefs='{"theme":"bright","perPage":10}' --log-file ${group.log} --config-file ${GOACCESS_CONFIG}`;
91
91
  await Promise.all([
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.17.12",
6
+ "version": "1.17.13-beta-20260512-042419-7b556a38",
7
7
  "description": "Lib to help blocklet developers to get insights of their blocklet",
8
8
  "main": "index.js",
9
9
  "files": [
@@ -17,17 +17,29 @@
17
17
  "build:core-analytics": "npm run build",
18
18
  "build": "npm run clean && tsc"
19
19
  },
20
- "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
20
+ "author": {
21
+ "name": "ArcBlock",
22
+ "email": "blocklet@arcblock.io",
23
+ "url": "https://github.com/ArcBlock"
24
+ },
21
25
  "license": "Apache-2.0",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/ArcBlock/blocklet-server.git",
29
+ "directory": "core/analytics"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/ArcBlock/blocklet-server/issues"
33
+ },
34
+ "homepage": "https://github.com/ArcBlock/blocklet-server/tree/main/core/analytics#readme",
22
35
  "dependencies": {
23
- "@abtnode/util": "1.17.12",
36
+ "@abtnode/util": "1.17.13-beta-20260512-042419-7b556a38",
24
37
  "debug": "^4.4.1",
25
38
  "fs-extra": "^11.2.0",
26
- "shelljs": "^0.8.5",
27
- "tar": "^6.1.11"
39
+ "shelljs": "^0.8.5"
28
40
  },
29
41
  "devDependencies": {
30
- "@abtnode/types": "1.17.12",
42
+ "@abtnode/types": "1.17.13-beta-20260512-042419-7b556a38",
31
43
  "@arcblock/eslint-config-ts": "^0.3.3",
32
44
  "@types/node": "^22.7.5",
33
45
  "@typescript-eslint/eslint-plugin": "^5.42.0",
@@ -36,5 +48,5 @@
36
48
  "eslint": "^8.57.0",
37
49
  "prettier": "^3.3.2"
38
50
  },
39
- "gitHead": "a851c46d35a66372b7aa8fb5d7eed7d26980da8a"
51
+ "gitHead": "2d9bc75c45b999ed599bb396e93cf5f2d53c4d52"
40
52
  }