mali-applet-ui 1.1.38 → 1.1.40

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 CHANGED
@@ -1,12 +1,13 @@
1
1
  export function getEnvCode(mode: string): string
2
2
  export function getEnvName(mode: string): string
3
+ export function getCustomName(custom: string): string
3
4
  export function getPlatformName(platform: string): string
4
5
  export function getSubModuleName(module: string): string
5
6
  export function parseEnv(dirPath: string): Record<string, string>
6
7
  export function initEnv(dirPath: string, defaultEnv: Record<string, string>): Record<string, string>
7
8
  export function initManifestEnv(dirPath: string, manifestJson: any): Record<string, string>
8
9
  export function uploadWxMiniprogram(version: string): void
9
- export function getSCSSAdditionalData(envConfig: any): string
10
+ export function getSCSSAdditionalData(): string
10
11
  export function sendMail(options: {
11
12
  receivedBy: string | string[]
12
13
  subject: string
@@ -16,4 +17,5 @@ export function sendQyWechatMsg(webhook: string, params: {
16
17
  content: string
17
18
  mentionedList?: string[]
18
19
  mentionedMobileList?: string[]
19
- })
20
+ })
21
+ export function getBuildSuccessMsg(): string
package/env/index.js CHANGED
@@ -213,6 +213,7 @@ function uploadWxMiniprogram (rootPath, version) {
213
213
  }
214
214
  deleteFolder(path.resolve(rootPath, 'temp'))
215
215
  fs.unlinkSync(path.resolve(rootPath, 'sm.zip'))
216
+
216
217
  resolve()
217
218
  })
218
219
  }).catch(e => {
@@ -264,8 +265,8 @@ function sendQyWechatMsg (webhook, params) {
264
265
  throw new Error('企微机器人 webhook 地址不能为空')
265
266
  }
266
267
  return axios.post(webhook, {
267
- msgtype: 'markdown',
268
- markdown: {
268
+ msgtype: params.msgtype || 'markdown',
269
+ [params.msgtype || 'markdown']: {
269
270
  content: params.content || '',
270
271
  mentioned_list: params.mentionedList || [],
271
272
  mentioned_mobile_list: params.mentionedMobileList || []
@@ -275,8 +276,16 @@ function sendQyWechatMsg (webhook, params) {
275
276
  })
276
277
  }
277
278
 
279
+ function getBuildSuccessMsg () {
280
+ return `
281
+ # <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), pack.description, '-', getEnvName(process.env.VUE_APP_MODE), '已更新'].join('')}</font>
282
+ >> 构建时间:<font color="comment">${XEUtils.toDateString(XEUtils.toStringDate(process.env.VUE_APP_PUBLISH_DATE, 'yyyyMMddHHmmss'), 'yyyy-MM-dd HH:mm:ss')}</font>
283
+ <font color="comment">-自动化发版</font>`
284
+ }
285
+
278
286
  exports.getEnvCode = getEnvCode
279
287
  exports.getEnvName = getEnvName
288
+ exports.getCustomName = getCustomName
280
289
  exports.getPlatformName = getPlatformName
281
290
  exports.getSubModuleName = getSubModuleName
282
291
  exports.parseEnv = parseEnv
@@ -286,10 +295,12 @@ exports.uploadWxMiniprogram = uploadWxMiniprogram
286
295
  exports.getSCSSAdditionalData = getSCSSAdditionalData
287
296
  exports.sendMail = sendMail
288
297
  exports.sendQyWechatMsg = sendQyWechatMsg
298
+ exports.getBuildSuccessMsg = getBuildSuccessMsg
289
299
 
290
300
  module.exports = {
291
301
  getEnvCode,
292
302
  getEnvName,
303
+ getCustomName,
293
304
  getPlatformName,
294
305
  getSubModuleName,
295
306
  parseEnv,
@@ -298,5 +309,6 @@ module.exports = {
298
309
  uploadWxMiniprogram,
299
310
  getSCSSAdditionalData,
300
311
  sendMail,
301
- sendQyWechatMsg
312
+ sendQyWechatMsg,
313
+ getBuildSuccessMsg
302
314
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.38",
3
+ "version": "1.1.40",
4
4
  "description": "码里UI-小程序组件库(vue2)",
5
5
  "files": [
6
6
  "lib",