@jayfong/x-server 1.26.2 → 1.26.5

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.5](https://github.com/jfWorks/x-server/compare/v1.26.4...v1.26.5) (2022-05-06)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * export MailServiceSendOptions type ([7c47c23](https://github.com/jfWorks/x-server/commit/7c47c23a0d2f4d9a08f49e66a0155e282518257f))
11
+
12
+ ### [1.26.4](https://github.com/jfWorks/x-server/compare/v1.26.3...v1.26.4) (2022-05-03)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * bull ([5c92fc2](https://github.com/jfWorks/x-server/commit/5c92fc2f54c6e7ddcc237553d840b72af27d8630))
18
+
19
+ ### [1.26.3](https://github.com/jfWorks/x-server/compare/v1.26.2...v1.26.3) (2022-05-03)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * hexoid 构建问题 ([0620d5a](https://github.com/jfWorks/x-server/commit/0620d5a3ea3ffe3d552a68aeaa51330abde70585))
25
+
5
26
  ### [1.26.2](https://github.com/jfWorks/x-server/compare/v1.26.1...v1.26.2) (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,
@@ -16,7 +16,7 @@ class MailService {
16
16
  this.transporter = void 0;
17
17
  }
18
18
 
19
- async send(data) {
19
+ async send(options) {
20
20
  if (!this.transporter) {
21
21
  this.transporter = _nodemailer.default.createTransport({
22
22
  host: this.options.host,
@@ -32,7 +32,7 @@ class MailService {
32
32
  _x.x.dispose.add(() => this.transporter.close());
33
33
  }
34
34
 
35
- return this.transporter.sendMail(data);
35
+ return this.transporter.sendMail(options);
36
36
  }
37
37
 
38
38
  }
@@ -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,
@@ -7,12 +7,14 @@ export interface MailServiceOptions {
7
7
  user: string;
8
8
  pass: string;
9
9
  }
10
+ export interface MailServiceSendOptions extends nodemailer.SendMailOptions {
11
+ }
10
12
  export declare class MailService implements BaseService {
11
13
  private options;
12
14
  serviceName: string;
13
15
  private transporter;
14
16
  constructor(options: MailServiceOptions);
15
- send(data: nodemailer.SendMailOptions): Promise<any>;
17
+ send(options: MailServiceSendOptions): Promise<any>;
16
18
  }
17
19
  declare module '../x' {
18
20
  interface X {
@@ -7,7 +7,7 @@ export class MailService {
7
7
  this.transporter = void 0;
8
8
  }
9
9
 
10
- async send(data) {
10
+ async send(options) {
11
11
  if (!this.transporter) {
12
12
  this.transporter = nodemailer.createTransport({
13
13
  host: this.options.host,
@@ -22,7 +22,7 @@ export class MailService {
22
22
  x.dispose.add(() => this.transporter.close());
23
23
  }
24
24
 
25
- return this.transporter.sendMail(data);
25
+ return this.transporter.sendMail(options);
26
26
  }
27
27
 
28
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jayfong/x-server",
3
- "version": "1.26.2",
3
+ "version": "1.26.5",
4
4
  "license": "ISC",
5
5
  "sideEffects": false,
6
6
  "main": "lib/_cjs/index.js",