@jayfong/x-server 1.26.0 → 1.26.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.
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.3](https://github.com/jfWorks/x-server/compare/v1.26.2...v1.26.3) (2022-05-03)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * hexoid 构建问题 ([0620d5a](https://github.com/jfWorks/x-server/commit/0620d5a3ea3ffe3d552a68aeaa51330abde70585))
11
+
12
+ ### [1.26.2](https://github.com/jfWorks/x-server/compare/v1.26.1...v1.26.2) (2022-05-03)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * defineTask ([8b32f5c](https://github.com/jfWorks/x-server/commit/8b32f5c4b068ac5c03030901dffa599df4fb6cf6))
18
+
19
+ ### [1.26.1](https://github.com/jfWorks/x-server/compare/v1.26.0...v1.26.1) (2022-05-03)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * defineTask ([7d5a5d2](https://github.com/jfWorks/x-server/commit/7d5a5d247a63301dc46042238a6d31f7f4cb5423))
25
+
5
26
  ## [1.26.0](https://github.com/jfWorks/x-server/compare/v1.25.0...v1.26.0) (2022-05-02)
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({
@@ -9,9 +9,13 @@ var _bull = _interopRequireDefault(require("bull"));
9
9
 
10
10
  var _x = require("../x");
11
11
 
12
- async function defineTask(options) {
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({
@@ -1,2 +1,2 @@
1
1
  import type { XTask } from './types';
2
- export declare function defineTask<T>(options: XTask.Options<T>): Promise<XTask.Task<T>>;
2
+ export declare function defineTask<T>(options: XTask.Options<T>): XTask.Task<T>;
@@ -1,8 +1,12 @@
1
1
  import Queue from 'bull';
2
2
  import { x } from "../x";
3
- export async function defineTask(options) {
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.0",
3
+ "version": "1.26.3",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",