warframe-nexus-query 2.2.1 → 2.2.2
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/index.js +7 -7
- package/package.json +2 -6
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { readdir, unlink, rmdir } from 'node:fs/promises';
|
|
2
|
+
import { existsSync as exists } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
4
|
|
|
5
5
|
import md from 'node-md-config';
|
|
6
6
|
|
|
@@ -138,13 +138,13 @@ export default class PriceCheckQuerier {
|
|
|
138
138
|
this.logger.log('no market fetcher, or skipMarket was true');
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
if (
|
|
142
|
-
const files = await
|
|
141
|
+
if (exists(`${global.__basedir}/tmp`)) {
|
|
142
|
+
const files = await readdir(`${global.__basedir}/tmp`);
|
|
143
143
|
let allSuccess = true;
|
|
144
144
|
await Promise.all(
|
|
145
145
|
files.map(async (file) => {
|
|
146
146
|
try {
|
|
147
|
-
await
|
|
147
|
+
await unlink(join(global.__basedir, 'tmp', file));
|
|
148
148
|
} catch (e) {
|
|
149
149
|
allSuccess = false;
|
|
150
150
|
this.logger.debug(`Couldn't delete ${file}`);
|
|
@@ -153,7 +153,7 @@ export default class PriceCheckQuerier {
|
|
|
153
153
|
);
|
|
154
154
|
|
|
155
155
|
if (allSuccess) {
|
|
156
|
-
await
|
|
156
|
+
await rmdir(`${global.__basedir}/tmp`);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "warframe-nexus-query",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Query prices form nexus-stats.com and warframe.market.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"warframe",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build:docs": "jsdoc -c jsdoc-config.json -d docs",
|
|
33
|
-
"coverage": "npm test && c8 report --reporter=text-lcov | coveralls",
|
|
33
|
+
"coverage": "npm test && c8 report --reporter=text-lcov | npx coveralls",
|
|
34
34
|
"lint": "eslint index.js lib/ test/",
|
|
35
35
|
"lint:fix": "eslint index.js lib/ test/ --fix",
|
|
36
36
|
"prepare": "husky && npx install-peerdeps @wfcd/eslint-config@latest -S",
|
|
@@ -38,9 +38,6 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"flat-cache": "^6.1.19",
|
|
41
|
-
"get-image-colors": "^4.0.1",
|
|
42
|
-
"image-downloader": "^4.0.2",
|
|
43
|
-
"json-fetch-cache": "^1.2.6",
|
|
44
41
|
"json-query": "^2.2.2",
|
|
45
42
|
"node-md-config": "^2.0.1",
|
|
46
43
|
"numeral": "^2.0.6"
|
|
@@ -52,7 +49,6 @@
|
|
|
52
49
|
"@wfcd/eslint-config": "^1.6.1",
|
|
53
50
|
"c8": "^10.1.2",
|
|
54
51
|
"chai": "^6.0.1",
|
|
55
|
-
"coveralls": "^3.1.1",
|
|
56
52
|
"husky": "^9.0.11",
|
|
57
53
|
"install-peerdeps": "^3.0.3",
|
|
58
54
|
"lint-staged": "^16.0.0",
|