mali-applet-ui 1.1.45 → 1.1.47

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
@@ -5,6 +5,7 @@ export function getPlatformName(platform: string): string
5
5
  export function getSubModuleName(module: string): string
6
6
  export function parseEnv(dirPath: string): Record<string, string>
7
7
  export function initEnv(dirPath: string, defaultEnv: Record<string, string>): Record<string, string>
8
+ export function initManifestConfig(dirPath: string, manifestJson: any): void
8
9
  export function initManifestEnv(dirPath: string, manifestJson: any): Record<string, string>
9
10
  export function uploadWxMiniprogram(version: string): void
10
11
  export function getSCSSAdditionalData(): string
package/env/index.js CHANGED
@@ -130,6 +130,12 @@ function initEnv (rootPath) {
130
130
  return conf
131
131
  }
132
132
 
133
+ function initManifestConfig (rootPath, manifestJson) {
134
+ if (!fs.existsSync(path.resolve(rootPath, 'src/manifest.json'))) {
135
+ fs.writeFileSync(path.resolve(rootPath, 'src/manifest.json'), JSON.stringify(manifestJson, null, 2))
136
+ }
137
+ }
138
+
133
139
  function initManifestEnv (rootPath, manifestJson) {
134
140
  const envConfig = initEnv(rootPath)
135
141
  if (process.env.VUE_APP_MP_APPID) {
@@ -174,8 +180,6 @@ function uploadWxMiniprogram (rootPath, version) {
174
180
  return new Promise((resolve, reject) => {
175
181
  if (['mp-weixin', 'mp-qiwei'].includes(process.env.VUE_APP_PLATFORM_NAME)) {
176
182
  const projectConfig = parseJSONFile(rootPath, `${process.env.UNI_OUTPUT_DIR}/project.config.json`)
177
- console.log('projectConfig', projectConfig)
178
- console.log('projectPath=', path.resolve(rootPath, process.env.UNI_OUTPUT_DIR))
179
183
  const options = {
180
184
  appid: projectConfig.appid,
181
185
  type: 'miniProgram',
@@ -190,8 +194,6 @@ function uploadWxMiniprogram (rootPath, version) {
190
194
  robot,
191
195
  sourceMapSavePath: path.resolve(rootPath, 'sm.zip')
192
196
  }).then((res) => {
193
- console.log('sm==', path.resolve(rootPath, 'sm.zip'))
194
- console.log('get success', res)
195
197
  compressing.zip.uncompress(path.resolve(rootPath, 'sm.zip'), 'temp').then(() => {
196
198
  const rest = JSON.parse(fs.readFileSync(path.resolve(rootPath, 'temp/__FULL__/app-service.js.map')))
197
199
  const vArr = rest.wx.userVersion.match(/(\d+).(\d+).(\d+)/)
@@ -203,21 +205,19 @@ function uploadWxMiniprogram (rootPath, version) {
203
205
  desc: fixDesc,
204
206
  robot
205
207
  }).then((res) => {
206
- console.log('ci.upload success', res)
207
208
  resolve()
208
209
  }).catch((e) => {
209
- console.log('ci.upload err', e)
210
210
  reject(e)
211
211
  })
212
212
  } else {
213
213
  const e = {}
214
- console.error('version error')
214
+ console.log(e)
215
215
  reject(e)
216
216
  }
217
217
  deleteFolder(path.resolve(rootPath, 'temp'))
218
218
  fs.unlinkSync(path.resolve(rootPath, 'sm.zip'))
219
219
  }).catch((e) => {
220
- console.log('compressing err', res)
220
+ console.log(e)
221
221
  reject(e)
222
222
  })
223
223
  }).catch(e => {
@@ -228,19 +228,19 @@ function uploadWxMiniprogram (rootPath, version) {
228
228
  desc: '修复bug',
229
229
  robot: 1
230
230
  }).then((res) => {
231
- console.log('ci.upload success', res)
232
231
  resolve()
233
232
  }).catch((e) => {
234
- console.log('ci.upload err', e)
233
+ console.log(e)
235
234
  reject(e)
236
235
  })
237
236
  } else {
238
- console.log(e.message)
237
+ console.log(e)
239
238
  reject(e)
240
239
  }
241
240
  })
242
241
  } else {
243
242
  const e = {}
243
+ console.log(e)
244
244
  reject(e)
245
245
  }
246
246
  })
@@ -305,7 +305,7 @@ function sendQyWechatMsg (webhook, opts) {
305
305
 
306
306
  function getBuildSuccessMsg (description) {
307
307
  return `
308
- # <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), description, '-', getEnvName(process.env.VUE_APP_MODE), '已更新'].join('')}</font>
308
+ # <font color="info">${[getCustomName(process.env.VUE_APP_CUSTOM_MODULE), description, '-', getEnvName(process.env.VUE_APP_MODE), '体验版已更新'].join('')}</font>
309
309
  >> 构建时间:<font color="comment">${XEUtils.toDateString(XEUtils.toStringDate(process.env.VUE_APP_PUBLISH_DATE, 'yyyyMMddHHmmss'), 'yyyy-MM-dd HH:mm:ss')}</font>
310
310
  <font color="comment">-自动化发版</font>`
311
311
  }
@@ -317,6 +317,7 @@ exports.getPlatformName = getPlatformName
317
317
  exports.getSubModuleName = getSubModuleName
318
318
  exports.parseEnv = parseEnv
319
319
  exports.initEnv = initEnv
320
+ exports.initManifestConfig = initManifestConfig
320
321
  exports.initManifestEnv = initManifestEnv
321
322
  exports.uploadWxMiniprogram = uploadWxMiniprogram
322
323
  exports.getSCSSAdditionalData = getSCSSAdditionalData
@@ -332,6 +333,7 @@ module.exports = {
332
333
  getSubModuleName,
333
334
  parseEnv,
334
335
  initEnv,
336
+ initManifestConfig,
335
337
  initManifestEnv,
336
338
  uploadWxMiniprogram,
337
339
  getSCSSAdditionalData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.1.45",
3
+ "version": "1.1.47",
4
4
  "description": "码里UI-小程序组件库(vue2)",
5
5
  "files": [
6
6
  "lib",