@abtnode/router-provider 1.16.39-beta-20250215-130252-43410928 → 1.16.39-beta-20250218-132815-6baaf20e

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
@@ -268,7 +268,8 @@ const getNginxStatus = async (configPath) => {
268
268
 
269
269
  const compressFile = ({ sourceFile, targetFile, options = {} }) => {
270
270
  if (fs.existsSync(targetFile)) {
271
- fs.unlinkSync(targetFile);
271
+ fs.truncateSync(targetFile, 0);
272
+ fs.rmSync(targetFile, { force: true });
272
273
  }
273
274
 
274
275
  const stream = tar.c(options, [sourceFile]).pipe(fs.createWriteStream(targetFile));
@@ -290,7 +291,8 @@ const rotateNginxLogFile = async ({ file, cwd, nginxPid, retain }) => {
290
291
  if (fs.existsSync(file) && !fs.existsSync(targetLogfile)) {
291
292
  try {
292
293
  if (fs.existsSync(uncompressedTargetLogfile)) {
293
- fs.unlinkSync(uncompressedTargetLogfile);
294
+ fs.truncateSync(uncompressedTargetLogfile, 0);
295
+ fs.rmSync(uncompressedTargetLogfile, { force: true });
294
296
  }
295
297
 
296
298
  fs.moveSync(file, uncompressedTargetLogfile);
@@ -307,7 +309,8 @@ const rotateNginxLogFile = async ({ file, cwd, nginxPid, retain }) => {
307
309
  throw new Error(error);
308
310
  } finally {
309
311
  if (fs.existsSync(uncompressedTargetLogfile)) {
310
- fs.unlinkSync(uncompressedTargetLogfile);
312
+ fs.truncateSync(uncompressedTargetLogfile, 0);
313
+ fs.rmSync(uncompressedTargetLogfile, { force: true });
311
314
  }
312
315
  }
313
316
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/router-provider",
3
- "version": "1.16.39-beta-20250215-130252-43410928",
3
+ "version": "1.16.39-beta-20250218-132815-6baaf20e",
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.39-beta-20250215-130252-43410928",
36
- "@abtnode/logger": "1.16.39-beta-20250215-130252-43410928",
37
- "@abtnode/router-templates": "1.16.39-beta-20250215-130252-43410928",
38
- "@abtnode/util": "1.16.39-beta-20250215-130252-43410928",
35
+ "@abtnode/constant": "1.16.39-beta-20250218-132815-6baaf20e",
36
+ "@abtnode/logger": "1.16.39-beta-20250218-132815-6baaf20e",
37
+ "@abtnode/router-templates": "1.16.39-beta-20250218-132815-6baaf20e",
38
+ "@abtnode/util": "1.16.39-beta-20250218-132815-6baaf20e",
39
39
  "@arcblock/http-proxy": "^1.19.1",
40
40
  "@arcblock/is-valid-domain": "^1.0.5",
41
41
  "axios": "^1.7.9",
@@ -60,5 +60,5 @@
60
60
  "bluebird": "^3.7.2",
61
61
  "fs-extra": "^11.2.0"
62
62
  },
63
- "gitHead": "83b35e2f9759a3f1aa0343c112aedaddf79a8e55"
63
+ "gitHead": "731bfe1a4ad07e92bd9e28fa1627648fbf485326"
64
64
  }