@plugin-light/cli 1.0.15 → 1.0.18

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/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # 本地发布
2
2
 
3
3
  <p align="center">
4
- <img src="https://img.shields.io/npm/dw/@plugin-light/plugin-light-cli">
5
- <img src="https://img.shields.io/npm/unpacked-size/@plugin-light/plugin-light-cli">
6
- <img src="https://img.shields.io/npm/v/@plugin-light/plugin-light-cli">
7
- <img src="https://img.shields.io/npm/l/@plugin-light/plugin-light-cli">
8
- <img src="https://img.shields.io/github/last-commit/novlan1/plugin-light">
9
- <img src="https://img.shields.io/github/created-at/novlan1/plugin-light">
4
+ <img src="https://img.shields.io/npm/dw/@plugin-light/cli">
5
+ <img src="https://img.shields.io/npm/unpacked-size/@plugin-light/cli">
6
+ <img src="https://img.shields.io/npm/v/@plugin-light/cli">
7
+ <img src="https://img.shields.io/npm/l/@plugin-light/cli">
8
+ <img src="https://img.shields.io/badge/TypeScript-strict-blue?logo=typescript&logoColor=white" alt="TypeScript strict">
9
+ <img src="https://img.shields.io/badge/created-2022--01-blue?logo=github&logoColor=white">
10
10
  </p>
11
11
 
12
12
  可以在 `nodejs` 或 `bash` 中使用。
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "@plugin-light/cli",
3
- "version": "1.0.15",
3
+ "version": "1.0.18",
4
+ "description": "本地发布",
5
+ "keywords": [
6
+ "plugin-light",
7
+ "plugin-light-cli"
8
+ ],
4
9
  "homepage": "https://novlan1.github.io/docs/plugin-light/zh/plugin-light-cli.html",
5
10
  "bugs": {
6
11
  "url": "https://github.com/novlan1/plugin-light/issues"
@@ -21,9 +26,16 @@
21
26
  "bin"
22
27
  ],
23
28
  "dependencies": {
29
+ "@tdesign/uniapp": "^0.7.3",
30
+ "@tdesign/uniapp-chat": "^0.2.1",
24
31
  "axios": "^1.12.2",
25
- "t-comm": "^3.0.24",
26
- "@plugin-light/shared": "^1.0.9"
32
+ "t-comm": "latest",
33
+ "@plugin-light/const": "^0.1.6",
34
+ "@plugin-light/shared": "^1.0.25"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public",
38
+ "registry": "https://registry.npmjs.org/"
27
39
  },
28
40
  "scripts": {
29
41
  "build": "rm -rf lib && rollup -c",
@@ -1,10 +1,12 @@
1
1
  const path = require('path');
2
2
 
3
+ const { WEBHOOK_URL_MAP } = require('@plugin-light/const');
4
+
3
5
  const { sendVersionTip: sendVersionTipCore } = require('../version-tip/index');
4
6
 
5
7
 
6
8
  function sendVersionTip(pwd) {
7
- const webhookUrl = 'COMMON_ROBOT___407e108c-ab38-4a2b-9e83-6580de69f0d7';
9
+ const webhookUrl = WEBHOOK_URL_MAP.RD_ROBOT;
8
10
 
9
11
  sendVersionTipCore({
10
12
  appInfo: require(path.resolve(pwd, './package.json')),
@@ -1,11 +1,17 @@
1
- const { batchSendWxRobotMarkdown, genVersionTip } = require('t-comm');
1
+ const {
2
+ batchSendWxRobotMarkdown,
3
+ genVersionTip,
4
+ resolveNpmLink,
5
+ collectPackageSize,
6
+ } = require('t-comm');
2
7
 
3
8
 
4
- function sendVersionTip({
9
+ async function sendVersionTip({
5
10
  readmeFilePath,
6
11
  appInfo,
7
12
  publisher,
8
13
  webhookUrl,
14
+ registry,
9
15
  }) {
10
16
  console.log('[webhookUrl]: ', webhookUrl);
11
17
  if (!webhookUrl) {
@@ -13,11 +19,16 @@ function sendVersionTip({
13
19
  return;
14
20
  }
15
21
 
22
+ const packageSize = await collectPackageSize(appInfo, { registry });
23
+
16
24
  const content = genVersionTip({
17
25
  appInfo,
18
- showNpmLink: false,
26
+ showNpmLink: true,
19
27
  readmeFilePath,
20
28
  publisher: publisher || process.env.creator || '',
29
+ pipelineUrl: process.env.BK_CI_BUILD_URL || '',
30
+ packageSize,
31
+ npmLink: resolveNpmLink(appInfo.name),
21
32
  });
22
33
 
23
34
  console.log('content:\n', content);
@@ -32,4 +43,3 @@ function sendVersionTip({
32
43
  module.exports = {
33
44
  sendVersionTip,
34
45
  };
35
-