mali-applet-ui 1.1.48 → 1.1.49

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
@@ -9,14 +9,35 @@ export function initManifestConfig(dirPath: string, manifestJson: any): void
9
9
  export function initManifestEnv(dirPath: string, manifestJson: any): Record<string, string>
10
10
  export function uploadWxMiniprogram(version: string): void
11
11
  export function getSCSSAdditionalData(envConfig?: an): string
12
+
13
+ /**
14
+ * 发送邮件通知
15
+ * @param options
16
+ */
12
17
  export function sendMail(options: {
13
18
  receivedBy: string | string[]
14
19
  subject: string
15
20
  html: string
16
21
  })
22
+
23
+ /**
24
+ * 推送企微群机器人消息
25
+ * @param webhook 机器人地址
26
+ * @param params
27
+ */
17
28
  export function sendQyWechatMsg(webhook: string, params: {
18
29
  content: string
19
30
  mentionedList?: string[]
20
31
  mentionedMobileList?: string[]
21
32
  })
33
+
34
+ /**
35
+ * 获取默认开始编译的消息文本
36
+ * @param description
37
+ */
38
+ export function getBuildMsg(description: string, time?: number): string
39
+ /**
40
+ * 获取默认编译成功的消息文本
41
+ * @param description
42
+ */
22
43
  export function getBuildSuccessMsg(description: string): string
package/env/index.js CHANGED
@@ -90,11 +90,11 @@ function parseJSONFile (dirPath, name) {
90
90
  }
91
91
 
92
92
  function getSCSSAdditionalData (conf) {
93
- const envConfig = conf || process.env
93
+ const envConfig = conf || process.env || {}
94
94
  const rest = [
95
95
  '@import "./src/uni.scss";',
96
96
  `@import "${pack.name}/style/variable.scss";`,
97
- `$global-static-url: '${envConfig.VUE_APP_PUBLIC_RESOURCES_URL}';`
97
+ envConfig.VUE_APP_PUBLIC_RESOURCES_URL ? `$global-static-url: '${envConfig.VUE_APP_PUBLIC_RESOURCES_URL}';` : ''
98
98
  ]
99
99
  for (const name in envConfig) {
100
100
  if (/^VUE_SCSS_DEFINE_/.test(name)) {
@@ -304,9 +304,18 @@ function sendQyWechatMsg (webhook, opts) {
304
304
  })
305
305
  }
306
306
 
307
+ function getBuildMsg (description, time) {
308
+ return `
309
+ # <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), description, `(${getPlatformName(process.env.VUE_APP_PLATFORM_NAME)}小程序)`].join('')}</font> 【${getEnvName(process.env.VUE_APP_MODE)}】 开始构建
310
+ >> 构建时间:<font color="comment">${XEUtils.toDateString(XEUtils.toStringDate(process.env.VUE_APP_PUBLISH_DATE, 'yyyyMMddHHmmss'), 'yyyy-MM-dd HH:mm:ss')}</font>
311
+ >> 预计用时:<font color="comment">${time || 15}分钟</font>
312
+ <font color="comment">-自动化发版</font>
313
+ `
314
+ }
315
+
307
316
  function getBuildSuccessMsg (description) {
308
317
  return `
309
- # <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), description, `(${getPlatformName(process.env.VUE_APP_PLATFORM_NAME)}小程序)`, '-', getEnvName(process.env.VUE_APP_MODE), '体验版已更新'].join('')}</font>
318
+ # <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), description, `(${getPlatformName(process.env.VUE_APP_PLATFORM_NAME)}小程序)`].join('')}</font> 【${getEnvName(process.env.VUE_APP_MODE)}】 <font color="info">体验版更新成功</font>
310
319
  >> 构建时间:<font color="comment">${XEUtils.toDateString(XEUtils.toStringDate(process.env.VUE_APP_PUBLISH_DATE, 'yyyyMMddHHmmss'), 'yyyy-MM-dd HH:mm:ss')}</font>
311
320
  <font color="comment">-自动化发版</font>`
312
321
  }
@@ -324,6 +333,7 @@ exports.uploadWxMiniprogram = uploadWxMiniprogram
324
333
  exports.getSCSSAdditionalData = getSCSSAdditionalData
325
334
  exports.sendMail = sendMail
326
335
  exports.sendQyWechatMsg = sendQyWechatMsg
336
+ exports.getBuildMsg = getBuildMsg
327
337
  exports.getBuildSuccessMsg = getBuildSuccessMsg
328
338
 
329
339
  module.exports = {
@@ -340,5 +350,6 @@ module.exports = {
340
350
  getSCSSAdditionalData,
341
351
  sendMail,
342
352
  sendQyWechatMsg,
353
+ getBuildMsg,
343
354
  getBuildSuccessMsg
344
355
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.48",
3
+ "version": "1.1.49",
4
4
  "description": "码里UI-小程序组件库(vue2)",
5
5
  "files": [
6
6
  "lib",