@plugin-light/cli 1.0.13 → 1.0.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plugin-light/cli",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "homepage": "https://novlan1.github.io/docs/plugin-light/zh/plugin-light-cli.html",
5
5
  "bugs": {
6
6
  "url": "https://github.com/novlan1/plugin-light/issues"
@@ -22,8 +22,8 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "axios": "^1.12.2",
25
- "t-comm": "^3.0.3",
26
- "@plugin-light/shared": "^1.0.2"
25
+ "t-comm": "^3.0.24",
26
+ "@plugin-light/shared": "^1.0.9"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "rm -rf lib && rollup -c",
@@ -29,7 +29,7 @@ const ignorePushOrigin = process.argv.includes('--ignorePushOrigin');
29
29
 
30
30
 
31
31
  function getPwd() {
32
- const list = execCommand(`pnpm -r --filter="${publishPackage}" exec pwd`, process.cwd(), {
32
+ const list = execCommand(`pnpm -r --filter="${publishPackage}" exec pwd | tail -1`, process.cwd(), {
33
33
  stdio: 'pipe',
34
34
  line: -1,
35
35
  }).split('\n')
@@ -1,22 +1,14 @@
1
1
  const path = require('path');
2
2
 
3
- const { batchSendWxRobotMarkdown, genVersionTip } = require('t-comm');
3
+ const { sendVersionTip: sendVersionTipCore } = require('../version-tip/index');
4
+
4
5
 
5
6
  function sendVersionTip(pwd) {
6
7
  const webhookUrl = 'COMMON_ROBOT___407e108c-ab38-4a2b-9e83-6580de69f0d7';
7
- console.log('[webhookUrl]: ', webhookUrl);
8
8
 
9
- const content = genVersionTip({
9
+ sendVersionTipCore({
10
10
  appInfo: require(path.resolve(pwd, './package.json')),
11
- showNpmLink: false,
12
11
  readmeFilePath: path.resolve(pwd, './CHANGELOG.md'),
13
- });
14
-
15
- console.log('content:\n', content);
16
-
17
- batchSendWxRobotMarkdown({
18
- content,
19
- chatId: 'ALL',
20
12
  webhookUrl,
21
13
  });
22
14
  }
@@ -0,0 +1,35 @@
1
+ const { batchSendWxRobotMarkdown, genVersionTip } = require('t-comm');
2
+
3
+
4
+ function sendVersionTip({
5
+ readmeFilePath,
6
+ appInfo,
7
+ publisher,
8
+ webhookUrl,
9
+ }) {
10
+ console.log('[webhookUrl]: ', webhookUrl);
11
+ if (!webhookUrl) {
12
+ console.warn('WebhookUrl is empty, skip send version tip');
13
+ return;
14
+ }
15
+
16
+ const content = genVersionTip({
17
+ appInfo,
18
+ showNpmLink: false,
19
+ readmeFilePath,
20
+ publisher: publisher || process.env.creator || '',
21
+ });
22
+
23
+ console.log('content:\n', content);
24
+
25
+ batchSendWxRobotMarkdown({
26
+ content,
27
+ chatId: 'ALL',
28
+ webhookUrl,
29
+ });
30
+ }
31
+
32
+ module.exports = {
33
+ sendVersionTip,
34
+ };
35
+