core-3nweb-client-lib 0.52.2 → 0.52.3

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.
@@ -125,9 +125,9 @@ ${(0, error_1.stringifyErr)(err)}`;
125
125
  logError(err, 'Unhandled exception');
126
126
  });
127
127
  }
128
- // XXX add cleaner
129
128
  async function removeOlderLogs() {
130
- const logs = (await (0, async_fs_node_1.readdir)(utilDir).catch(exc => {
129
+ const logsDir = (0, path_1.join)(utilDir, exports.LOGS_FOLDER);
130
+ const logs = (await (0, async_fs_node_1.readdir)(logsDir).catch(exc => {
131
131
  logError(exc, `Error when removing older logs`);
132
132
  return [];
133
133
  }))
@@ -135,7 +135,7 @@ ${(0, error_1.stringifyErr)(err)}`;
135
135
  const tsCutOff = Date.now() - 4 * 24 * 12 * 60 * 60 * 1000;
136
136
  for (const fName of logs) {
137
137
  try {
138
- const fPath = (0, path_1.join)(utilDir, fName);
138
+ const fPath = (0, path_1.join)(logsDir, fName);
139
139
  const fStats = await (0, async_fs_node_1.stat)(fPath);
140
140
  if (fStats.birthtimeMs < tsCutOff) {
141
141
  await (0, async_fs_node_1.unlink)(fPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-3nweb-client-lib",
3
- "version": "0.52.2",
3
+ "version": "0.52.3",
4
4
  "description": "3NWeb client core library, embeddable into different environments",
5
5
  "main": "build/lib-index.js",
6
6
  "types": "build/lib-index.d.ts",