mali-applet-ui 1.1.47 → 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
@@ -8,15 +8,36 @@ export function initEnv(dirPath: string, defaultEnv: Record<string, string>): Re
8
8
  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
- export function getSCSSAdditionalData(): string
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
@@ -89,16 +89,17 @@ function parseJSONFile (dirPath, name) {
89
89
  return {}
90
90
  }
91
91
 
92
- function getSCSSAdditionalData () {
92
+ function getSCSSAdditionalData (conf) {
93
+ const envConfig = conf || process.env || {}
93
94
  const rest = [
94
95
  '@import "./src/uni.scss";',
95
96
  `@import "${pack.name}/style/variable.scss";`,
96
- `$global-static-url: '${process.env.VUE_APP_PUBLIC_RESOURCES_URL}';`
97
+ envConfig.VUE_APP_PUBLIC_RESOURCES_URL ? `$global-static-url: '${envConfig.VUE_APP_PUBLIC_RESOURCES_URL}';` : ''
97
98
  ]
98
- for (const name in process.env) {
99
+ for (const name in envConfig) {
99
100
  if (/^VUE_SCSS_DEFINE_/.test(name)) {
100
101
  const varName = name.replace('VUE_SCSS_DEFINE_', '').replace(/_/g, '-').toLowerCase()
101
- rest.push(`$${varName}: ${process.env[name]};`)
102
+ rest.push(`$${varName}: ${envConfig[name]};`)
102
103
  }
103
104
  }
104
105
  return rest.join('\n')
@@ -303,9 +304,18 @@ function sendQyWechatMsg (webhook, opts) {
303
304
  })
304
305
  }
305
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
+
306
316
  function getBuildSuccessMsg (description) {
307
317
  return `
308
- # <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), description, '-', 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>
309
319
  >> 构建时间:<font color="comment">${XEUtils.toDateString(XEUtils.toStringDate(process.env.VUE_APP_PUBLISH_DATE, 'yyyyMMddHHmmss'), 'yyyy-MM-dd HH:mm:ss')}</font>
310
320
  <font color="comment">-自动化发版</font>`
311
321
  }
@@ -323,6 +333,7 @@ exports.uploadWxMiniprogram = uploadWxMiniprogram
323
333
  exports.getSCSSAdditionalData = getSCSSAdditionalData
324
334
  exports.sendMail = sendMail
325
335
  exports.sendQyWechatMsg = sendQyWechatMsg
336
+ exports.getBuildMsg = getBuildMsg
326
337
  exports.getBuildSuccessMsg = getBuildSuccessMsg
327
338
 
328
339
  module.exports = {
@@ -339,5 +350,6 @@ module.exports = {
339
350
  getSCSSAdditionalData,
340
351
  sendMail,
341
352
  sendQyWechatMsg,
353
+ getBuildMsg,
342
354
  getBuildSuccessMsg
343
355
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.47",
3
+ "version": "1.1.49",
4
4
  "description": "码里UI-小程序组件库(vue2)",
5
5
  "files": [
6
6
  "lib",