@abtnode/router-provider 1.16.13-beta-d17a7de4 → 1.16.13-beta-90ded76f

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/lib/nginx/util.js CHANGED
@@ -7,7 +7,7 @@ const fs = require('fs-extra');
7
7
  const { NginxConfFile } = require('nginx-conf');
8
8
  const shelljs = require('shelljs');
9
9
  const findProcess = require('find-process');
10
- const moment = require('moment');
10
+ const dayjs = require('@abtnode/util/lib/dayjs');
11
11
  const { MAX_UPLOAD_FILE_SIZE, MAX_NGINX_WORKER_CONNECTIONS, ROUTER_CACHE_GROUPS } = require('@abtnode/constant');
12
12
  const formatBackSlash = require('@abtnode/util/lib/format-back-slash');
13
13
  const { deleteOldLogfiles } = require('@abtnode/logger');
@@ -239,8 +239,7 @@ const compressFile = ({ sourceFile, targetFile, options = {} }) => {
239
239
  const stream = tar.c(options, [sourceFile]).pipe(fs.createWriteStream(targetFile));
240
240
  return new Promise((resolve, reject) => {
241
241
  stream.on('error', (err) => reject(err));
242
-
243
- stream.on('finish', () => resolve());
242
+ stream.on('finish', () => resolve(true));
244
243
  });
245
244
  };
246
245
 
@@ -249,7 +248,7 @@ const compressFile = ({ sourceFile, targetFile, options = {} }) => {
249
248
  * refer: https://www.nginx.com/resources/wiki/start/topics/examples/logrotation/
250
249
  */
251
250
  const rotateNginxLogFile = async ({ file, cwd, nginxPid, retain }) => {
252
- const dateStr = moment().subtract(1, 'days').format('YYYY-MM-DD');
251
+ const dateStr = dayjs().subtract(1, 'days').format('YYYY-MM-DD');
253
252
  const uncompressedTargetLogfile = path.join(cwd, `${path.basename(file, '.log')}-${dateStr}.log`);
254
253
  const targetLogfile = path.join(cwd, `${path.basename(file, '.log')}-${dateStr}.log.gz`);
255
254
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/router-provider",
3
- "version": "1.16.13-beta-d17a7de4",
3
+ "version": "1.16.13-beta-90ded76f",
4
4
  "description": "Routing engine implementations for abt node",
5
5
  "author": "polunzh <polunzh@gmail.com>",
6
6
  "homepage": "https://github.com/ArcBlock/blocklet-server#readme",
@@ -32,10 +32,10 @@
32
32
  "url": "https://github.com/ArcBlock/blocklet-server/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@abtnode/constant": "1.16.13-beta-d17a7de4",
36
- "@abtnode/logger": "1.16.13-beta-d17a7de4",
37
- "@abtnode/router-templates": "1.16.13-beta-d17a7de4",
38
- "@abtnode/util": "1.16.13-beta-d17a7de4",
35
+ "@abtnode/constant": "1.16.13-beta-90ded76f",
36
+ "@abtnode/logger": "1.16.13-beta-90ded76f",
37
+ "@abtnode/router-templates": "1.16.13-beta-90ded76f",
38
+ "@abtnode/util": "1.16.13-beta-90ded76f",
39
39
  "@arcblock/http-proxy": "^1.19.1",
40
40
  "axios": "^0.27.2",
41
41
  "debug": "^4.3.4",
@@ -46,7 +46,6 @@
46
46
  "is-valid-domain": "^0.1.6",
47
47
  "lodash": "^4.17.21",
48
48
  "lru-cache": "^7.14.0",
49
- "moment": "^2.29.4",
50
49
  "nginx-conf": "^1.7.0",
51
50
  "object-hash": "^3.0.0",
52
51
  "port-used": "^2.0.8",
@@ -60,5 +59,5 @@
60
59
  "bluebird": "^3.7.2",
61
60
  "fs-extra": "^10.1.0"
62
61
  },
63
- "gitHead": "f14750f3b9feeafe80ee88499b2b4a061c2c28c4"
62
+ "gitHead": "e6d4b88fe2cb45e00e5d745e1cd148dc76a019a4"
64
63
  }