@jayfong/x-server 1.26.1 → 1.26.4

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/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.26.4](https://github.com/jfWorks/x-server/compare/v1.26.3...v1.26.4) (2022-05-03)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * bull ([5c92fc2](https://github.com/jfWorks/x-server/commit/5c92fc2f54c6e7ddcc237553d840b72af27d8630))
11
+
12
+ ### [1.26.3](https://github.com/jfWorks/x-server/compare/v1.26.2...v1.26.3) (2022-05-03)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * hexoid 构建问题 ([0620d5a](https://github.com/jfWorks/x-server/commit/0620d5a3ea3ffe3d552a68aeaa51330abde70585))
18
+
19
+ ### [1.26.2](https://github.com/jfWorks/x-server/compare/v1.26.1...v1.26.2) (2022-05-03)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * defineTask ([8b32f5c](https://github.com/jfWorks/x-server/commit/8b32f5c4b068ac5c03030901dffa599df4fb6cf6))
25
+
5
26
  ### [1.26.1](https://github.com/jfWorks/x-server/compare/v1.26.0...v1.26.1) (2022-05-03)
6
27
 
7
28
 
@@ -55,7 +55,16 @@ class BuildUtil {
55
55
  name: item,
56
56
  version: itemPkgContent.version
57
57
  };
58
- })); // 构建
58
+ })); // fix: hexoid 构建问题
59
+
60
+ try {
61
+ const hexoidPackageJsonFile = require.resolve('hexoid/package.json');
62
+
63
+ const pkg = await _fsExtra.default.readJson(hexoidPackageJsonFile);
64
+ delete pkg.module;
65
+ await _fsExtra.default.writeJson(hexoidPackageJsonFile, pkg);
66
+ } catch {} // 构建
67
+
59
68
 
60
69
  await _fsExtra.default.emptyDir(distDir);
61
70
  await esbuild.build({
@@ -99,7 +108,7 @@ class BuildUtil {
99
108
  filter: /\/bull\/lib\/commands\/index\.js$/
100
109
  }, async args => {
101
110
  let js = await _fsExtra.default.readFile(args.path, 'utf-8');
102
- js = js.replace('loadScripts(__dirname)', 'loadScripts("./assets/bull/commands")');
111
+ js = js.replace(/__dirname/g, '"./assets/bull/commands"');
103
112
  await _fsExtra.default.copy(_nodePath.default.dirname(require.resolve('bull/lib/commands/index.js')), _nodePath.default.join(distDir, 'assets/bull/commands'));
104
113
  return {
105
114
  contents: js,
@@ -11,7 +11,11 @@ var _x = require("../x");
11
11
 
12
12
  function defineTask(options) {
13
13
  const queue = new _bull.default(options.name, {
14
- redis: _x.x.redis.options,
14
+ redis: { ..._x.x.redis.options,
15
+ // https://github.com/OptimalBits/bull/issues/2186
16
+ maxRetriesPerRequest: null,
17
+ enableReadyCheck: false
18
+ },
15
19
  prefix: `${_x.x.appId}_task`
16
20
  });
17
21
  queue.process(async job => {
@@ -31,7 +31,16 @@ export class BuildUtil {
31
31
  name: item,
32
32
  version: itemPkgContent.version
33
33
  };
34
- })); // 构建
34
+ })); // fix: hexoid 构建问题
35
+
36
+ try {
37
+ const hexoidPackageJsonFile = require.resolve('hexoid/package.json');
38
+
39
+ const pkg = await fs.readJson(hexoidPackageJsonFile);
40
+ delete pkg.module;
41
+ await fs.writeJson(hexoidPackageJsonFile, pkg);
42
+ } catch {} // 构建
43
+
35
44
 
36
45
  await fs.emptyDir(distDir);
37
46
  await esbuild.build({
@@ -75,7 +84,7 @@ export class BuildUtil {
75
84
  filter: /\/bull\/lib\/commands\/index\.js$/
76
85
  }, async args => {
77
86
  let js = await fs.readFile(args.path, 'utf-8');
78
- js = js.replace('loadScripts(__dirname)', 'loadScripts("./assets/bull/commands")');
87
+ js = js.replace(/__dirname/g, '"./assets/bull/commands"');
79
88
  await fs.copy(path.dirname(require.resolve('bull/lib/commands/index.js')), path.join(distDir, 'assets/bull/commands'));
80
89
  return {
81
90
  contents: js,
@@ -2,7 +2,11 @@ import Queue from 'bull';
2
2
  import { x } from "../x";
3
3
  export function defineTask(options) {
4
4
  const queue = new Queue(options.name, {
5
- redis: x.redis.options,
5
+ redis: { ...x.redis.options,
6
+ // https://github.com/OptimalBits/bull/issues/2186
7
+ maxRetriesPerRequest: null,
8
+ enableReadyCheck: false
9
+ },
6
10
  prefix: `${x.appId}_task`
7
11
  });
8
12
  queue.process(async job => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "1.26.1",
3
+ "version": "1.26.4",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",