mali-ui-plus 1.1.1 → 1.1.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/env/index.d.ts +22 -1
- package/env/index.js +14 -4
- package/lib/mali-ui-plus.common.js +307 -173
- package/lib/mali-ui-plus.umd.js +307 -173
- package/lib/mali-ui-plus.umd.min.js +1 -1
- package/package.json +3 -3
- package/types/card.d.ts +1 -1
- package/types/date-picker.d.ts +1 -0
- package/types/quarter-picker.d.ts +1 -0
- package/types/select.d.ts +1 -0
package/env/index.d.ts
CHANGED
|
@@ -1,19 +1,40 @@
|
|
|
1
1
|
export function getEnvCode(mode: string): string
|
|
2
2
|
export function getEnvName(mode: string): string
|
|
3
|
-
export function parseEnv(dirPath: string): Record<string, string>
|
|
4
3
|
export function getCustomName(custom: string): string
|
|
5
4
|
export function getPlatformName(platform: string): string
|
|
6
5
|
export function getSubModuleName(module: string): string
|
|
6
|
+
export function parseEnv(dirPath: string): Record<string, string>
|
|
7
7
|
export function initEnv(dirPath: string, defaultEnv: Record<string, string>): Record<string, string>
|
|
8
8
|
export function getSCSSAdditionalData(envConfig?: any): string
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 发送邮件通知
|
|
12
|
+
* @param options
|
|
13
|
+
*/
|
|
9
14
|
export function sendMail(options: {
|
|
10
15
|
receivedBy: string | string[]
|
|
11
16
|
subject: string
|
|
12
17
|
html: string
|
|
13
18
|
})
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 推送企微群机器人消息
|
|
22
|
+
* @param webhook 机器人地址
|
|
23
|
+
* @param params
|
|
24
|
+
*/
|
|
14
25
|
export function sendQyWechatMsg(webhook: string, params: {
|
|
15
26
|
content: string
|
|
16
27
|
mentionedList?: string[]
|
|
17
28
|
mentionedMobileList?: string[]
|
|
18
29
|
})
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 获取默认开始编译的消息文本
|
|
33
|
+
* @param description
|
|
34
|
+
*/
|
|
35
|
+
export function getBuildMsg(description: string, time?: number): string
|
|
36
|
+
/**
|
|
37
|
+
* 获取默认编译成功的消息文本
|
|
38
|
+
* @param description
|
|
39
|
+
*/
|
|
19
40
|
export function getBuildSuccessMsg(description: string): string
|
package/env/index.js
CHANGED
|
@@ -81,8 +81,7 @@ function parseEnvFile (dirPath, name) {
|
|
|
81
81
|
function getSCSSAdditionalData (conf) {
|
|
82
82
|
const envConfig = conf || process.env
|
|
83
83
|
const rest = [
|
|
84
|
-
`@import "${pack.name}/style/variable.scss"
|
|
85
|
-
`$global-static-url: '${envConfig.VUE_APP_PUBLIC_RESOURCES_URL}';`
|
|
84
|
+
`@import "${pack.name}/style/variable.scss";`
|
|
86
85
|
]
|
|
87
86
|
for (const name in envConfig) {
|
|
88
87
|
if (/^VUE_SCSS_DEFINE_/.test(name)) {
|
|
@@ -156,10 +155,19 @@ function sendQyWechatMsg (webhook, params) {
|
|
|
156
155
|
})
|
|
157
156
|
}
|
|
158
157
|
|
|
159
|
-
function
|
|
158
|
+
function getBuildMsg (description, time) {
|
|
160
159
|
return `
|
|
161
|
-
# <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), description, '
|
|
160
|
+
# <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), description, '(PC端)'].join('')}</font> 【${getEnvName(process.env.VUE_APP_MODE)}】 开始构建
|
|
162
161
|
>> 构建时间:<font color="comment">${XEUtils.toDateString(XEUtils.toStringDate(process.env.VUE_APP_PUBLISH_DATE, 'yyyyMMddHHmmss'), 'yyyy-MM-dd HH:mm:ss')}</font>
|
|
162
|
+
>> 预计用时:<font color="comment">${time || 15}分钟</font>
|
|
163
|
+
<font color="comment">-自动化发版</font>
|
|
164
|
+
`
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function getBuildSuccessMsg (description) {
|
|
168
|
+
return `
|
|
169
|
+
# <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), description, '(PC端)'].join('')}</font> 【${getEnvName(process.env.VUE_APP_MODE)}】 <font color="info">发版成功</font>
|
|
170
|
+
>> 部署时间:<font color="comment">${XEUtils.toDateString(XEUtils.toStringDate(process.env.VUE_APP_PUBLISH_DATE, 'yyyyMMddHHmmss'), 'yyyy-MM-dd HH:mm:ss')}</font>
|
|
163
171
|
${process.env.VUE_APP_URL ? `>> 访问地址:[${process.env.VUE_APP_URL}](${process.env.VUE_APP_URL})` : ''}
|
|
164
172
|
<font color="comment">-自动化发版</font>
|
|
165
173
|
`
|
|
@@ -175,6 +183,7 @@ exports.initEnv = initEnv
|
|
|
175
183
|
exports.getSCSSAdditionalData = getSCSSAdditionalData
|
|
176
184
|
exports.sendMail = sendMail
|
|
177
185
|
exports.sendQyWechatMsg = sendQyWechatMsg
|
|
186
|
+
exports.getBuildMsg = getBuildMsg
|
|
178
187
|
exports.getBuildSuccessMsg = getBuildSuccessMsg
|
|
179
188
|
|
|
180
189
|
module.exports = {
|
|
@@ -188,5 +197,6 @@ module.exports = {
|
|
|
188
197
|
getSCSSAdditionalData,
|
|
189
198
|
sendMail,
|
|
190
199
|
sendQyWechatMsg,
|
|
200
|
+
getBuildMsg,
|
|
191
201
|
getBuildSuccessMsg
|
|
192
202
|
}
|