更新修改bug

main
ihzero 2024-05-01 02:44:31 +08:00
parent 453cef0e2e
commit 54a5926006
27 changed files with 1741 additions and 11 deletions

View File

@ -68,6 +68,7 @@
"@dcloudio/uni-automator": "3.0.0-3090920231225001",
"@dcloudio/uni-cli-shared": "3.0.0-3090920231225001",
"@dcloudio/uni-stacktracey": "3.0.0-3090920231225001",
"@dcloudio/uni-uts-v1": "3.0.0-3090920231225001",
"@dcloudio/vite-plugin-uni": "3.0.0-3090920231225001",
"@vue/runtime-core": "^3.2.45",
"sass": "^1.71.1",

View File

@ -74,6 +74,23 @@
"style": {
"navigationBarTitleText": "个人信息"
}
},
{
"path": "pages/upgrade/index",
"style": {
"disableScroll": true,
"disableSwipeBack": true,
"app-plus": {
"backgroundColorTop": "transparent",
"background": "transparent",
"titleNView": false,
"scrollIndicator": false,
"popGesture": "none",
"animationType": "fade-in",
"animationDuration": 200
}
}
}
],
"subPackages": [

View File

@ -66,7 +66,7 @@
>
<view class="text-white text-center">
<view class="text-40rpx">打卡</view>
<view class="mt-1">{{ timeFormat(newTime, 'hh:mm:ss') }}</view>
<view class="mt-1">{{ timeFormat(newTime, 'hh:MM:ss') }}</view>
</view>
</view>

View File

@ -47,7 +47,7 @@
v-if="current?.sign_status == 2 || current?.sign_status == 3"
>
<view class="text-hex-3c9cff">补卡申请></view>
<view>补卡申请</view>
<view>更新打卡</view>
</view>
</view>
</view>

View File

@ -88,6 +88,11 @@ import StoreDown from './components/store-down.vue'
import { useUserStore } from '@/store/modules/user'
import cuBadge from '@/components/cu-badge/index.vue'
import checkPermission from '@/utils/permission'
import checkUpdate from '@/pages/upgrade/check-update'
// #ifdef APP-PLUS
checkUpdate()
// #endif
const userStore = useUserStore()
const userInfo = computed(() => userStore.userInfo)
const unread_notifications = computed(

View File

@ -23,7 +23,7 @@
<uv-line color="#f5f5f5"></uv-line>
</view>
<view>
<Cell title="当前版本" :isLink="false">
<Cell @click="onCheckUpdate" title="当前版本" :isLink="false">
<view class="flex justify-end text-hex-999999 text-24rpx px-base">
v{{ varsion }}
</view>
@ -52,6 +52,7 @@ import Cell from '@/components/cell/index'
import { sys } from '@climblee/uv-ui/libs/function'
import { computed } from 'vue'
import { useUserStore } from '@/store/modules/user'
import checkUpdate from '@/pages/upgrade/check-update'
const modalRef = ref(null)
const userStore = useUserStore()
@ -73,4 +74,8 @@ const logout = () => {
url: '/pages/login/index',
})
}
const onCheckUpdate = () => {
checkUpdate()
}
</script>

View File

@ -0,0 +1,110 @@
import { http } from '@/utils/request';
export default function () {
// #ifdef APP
return new Promise((resolve, reject) => {
const systemInfo = uni.getSystemInfoSync();
const appId = systemInfo.appId;
const appVersion = systemInfo.appVersion; //systemInfo.appVersion
if (typeof appId === 'string' && typeof appVersion === 'string' && appId.length > 0 && appVersion.length > 0) {
plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
if (widgetInfo.version) {
let data = {
action: 'checkVersion',
appid: appId,
appVersion: appVersion,
wgtVersion: widgetInfo.version
};
http.get('/latest-app-versions').then(res => {
// console.log(res);
const resData = {
"android": {
"name": "v1.0.2",
"version": 102,
"title": "v.1.0.2",
"description": "1.xxx\n2.bbb",
"update_strategy": "wgt",
"is_force": true,
"apk_url": "http://localhost/storage/app-versions/v1.0.2_1714479188.apk",
"wgt_url": "http://localhost/storage/app-versions/v1.0.2_1714479188.wgt",
"release_at": 1714479289
},
"ios": {
"name": "v2.0.0",
"version": 200,
"title": "v2.0.0",
"description": "1.xxx\n2.bbb\n3.ccc",
"update_strategy": "apk",
"is_force": true,
"apk_url": "http://baidu.com",
"wgt_url": "http://localhost/storage/app-versions/v1.0.0_100_ios.wgt",
"release_at": 1714479106
}
}
// _id : string
// appid : string
// name : string
// title : string
// contents : string
// url : string // 安装包下载地址
// platform : Array<string> // Array<'Android' | 'iOS'>
// version : string // 版本号 1.0.0
// uni_platform : string // "android" | "ios" // 版本号 1.0.0
// stable_publish : boolean // 是否是稳定版
// is_mandatory : boolean // 是否强制更新
// is_silently : boolean | null // 是否静默更新
// create_env : string // "upgrade-center"
// create_date : number
// message : string
// code : number
// type : string // "native_app" | "wgt"
// store_list : StoreListItem[] | null
// min_uni_version : string | null // 升级 wgt 的最低 uni-app 版本
const info = resData[systemInfo.platform];
console.log(info);
const resInfo = {
name: info.name,
title: info.title,
contents: info.description,
url: info.apk_url || info.wgt_url,
platform: systemInfo.platform,
version: info.version,
uni_platform: systemInfo.platform,
stable_publish: true,
is_mandatory: info.is_force,
//静默更新
is_silently: false,
//101 wgt更新
//102 apk更新
// 0 无更新
type: info.update_strategy,
// code: info.update_strategy === 'wgt' ? 101 : 102
code: 0
}
resolve(resInfo);
}).catch(err => {
reject(err);
})
}
else {
reject('widgetInfo.version is EMPTY');
}
});
}
else {
reject('plus.runtime.appid is EMPTY');
}
});
// #endif
// #ifndef APP
return new Promise((resolve, reject) => {
reject({
message: '请在App中使用'
});
});
// #endif
}

View File

@ -0,0 +1,184 @@
function callCheckVersion() {
// #ifdef APP-PLUS
return new Promise((resolve, reject) => {
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
let data = {
action: 'checkVersion',
appid: plus.runtime.appid,
appVersion: plus.runtime.version,
wgtVersion: widgetInfo.version
}
uniCloud.callFunction({
name: 'uni-upgrade-center',
data,
success: (e) => {
resolve(e)
},
fail: (error) => {
reject(error)
}
})
})
})
// #endif
// #ifndef APP-PLUS
return new Promise((resolve, reject) => {})
// #endif
}
// 推荐再App.vue中使用
const PACKAGE_INFO_KEY = '__package_info__'
export default function() {
// #ifdef APP-PLUS
return new Promise((resolve, reject) => {
callCheckVersion().then(async (e) => {
if (!e.result) return;
const {
code,
message,
is_silently, // 是否静默更新
url, // 安装包下载地址
platform, // 安装包平台
type // 安装包类型
} = e.result;
// 此处逻辑仅为实例,可自行编写
if (code > 0) {
// 腾讯云和阿里云下载链接不同,需要处理一下,阿里云会原样返回
const {
fileList
} = await uniCloud.getTempFileURL({
fileList: [url]
});
if (fileList[0].tempFileURL)
e.result.url = fileList[0].tempFileURL;
resolve(e)
// 静默更新只有wgt有
if (is_silently) {
uni.downloadFile({
url: e.result.url,
success: res => {
if (res.statusCode == 200) {
// 下载好直接安装,下次启动生效
plus.runtime.install(res.tempFilePath, {
force: false
});
}
}
});
return;
}
/**
* 提示升级一
* 使用 uni.showModal
*/
// return updateUseModal(e.result)
/**
* 提示升级二
* 官方适配的升级弹窗可自行替换资源适配UI风格
*/
uni.setStorageSync(PACKAGE_INFO_KEY, e.result)
uni.navigateTo({
url: `/uni_modules/uni-upgrade-center-app/pages/upgrade-popup?local_storage_key=${PACKAGE_INFO_KEY}`,
fail: (err) => {
console.error('更新弹框跳转失败', err)
uni.removeStorageSync(PACKAGE_INFO_KEY)
}
})
return
} else if (code < 0) {
// TODO 云函数报错处理
console.error(message)
return reject(e)
}
return resolve(e)
}).catch(err => {
// TODO 云函数报错处理
console.error(err.message)
reject(err)
})
});
// #endif
}
/**
* 使用 uni.showModal 升级
*/
function updateUseModal(packageInfo) {
const {
title, // 标题
contents, // 升级内容
is_mandatory, // 是否强制更新
url, // 安装包下载地址
platform, // 安装包平台
type // 安装包类型
} = packageInfo;
let isWGT = type === 'wgt'
let isiOS = !isWGT ? platform.includes('iOS') : false;
let confirmText = isiOS ? '立即跳转更新' : '立即下载更新'
return uni.showModal({
title,
content: contents,
showCancel: !is_mandatory,
confirmText,
success: res => {
if (res.cancel) return;
// 安装包下载
if (isiOS) {
plus.runtime.openURL(url);
return;
}
uni.showToast({
title: '后台下载中……',
duration: 1000
});
// wgt 和 安卓下载更新
downloadTask = uni.downloadFile({
url,
success: res => {
if (res.statusCode !== 200) {
console.error('下载安装包失败', err);
return;
}
// 下载好直接安装,下次启动生效
plus.runtime.install(res.tempFilePath, {
force: false
}, () => {
if (is_mandatory) {
//更新完重启app
plus.runtime.restart();
return;
}
uni.showModal({
title: '安装成功是否重启?',
success: res => {
if (res.confirm) {
//更新完重启app
plus.runtime.restart();
}
}
});
}, err => {
uni.showModal({
title: '更新失败',
content: err
.message,
showCancel: false
});
});
}
});
}
});
}

View File

@ -0,0 +1,124 @@
import callCheckVersion from "./call-check-version";
// Recommend using in App.vue
const PACKAGE_INFO_KEY = '__package_info__';
export default function () {
return new Promise((resolve, reject) => {
callCheckVersion().then(async (uniUpgradeCenterResult) => {
console.log('uniUpgradeCenterResult', uniUpgradeCenterResult);
const code = uniUpgradeCenterResult.code;
const message = uniUpgradeCenterResult.message;
const url = uniUpgradeCenterResult.url;
if (code > 0) {
if (uniUpgradeCenterResult.is_silently) {
uni.downloadFile({
url,
success: res => {
if (res.statusCode == 200) {
plus.runtime.install(res.tempFilePath, {
force: false
});
}
}
});
return;
}
uni.setStorageSync(PACKAGE_INFO_KEY, uniUpgradeCenterResult);
uni.navigateTo({
url: `/pages/upgrade/index?local_storage_key=${PACKAGE_INFO_KEY}`,
fail: (err) => {
console.error('Update dialog navigation failed', err);
uni.removeStorageSync(PACKAGE_INFO_KEY);
}
});
return resolve(uniUpgradeCenterResult);
} else if (code < 0) {
console.error(message);
return reject(uniUpgradeCenterResult);
}
return resolve(uniUpgradeCenterResult);
}).catch((err) => {
reject(err);
});
});
}
function updateUseModal(packageInfo) {
const {
title,
contents,
is_mandatory,
url,
type,
platform
} = packageInfo;
let isWGT = type === 'wgt';
let isiOS = !isWGT ? platform.includes('iOS') : false;
let confirmText = isiOS ? '立即跳转更新' : '立即下载更新';
return uni.showModal({
title,
content: contents,
showCancel: !is_mandatory,
confirmText,
success: res => {
if (res.cancel) return;
if (isiOS) {
plus.runtime.openURL(url);
return;
}
uni.showToast({
title: '后台下载中……',
duration: 1000
});
uni.downloadFile({
url,
success: res => {
if (res.statusCode !== 200) {
console.error('Download package failed');
return;
}
plus.runtime.install(res.tempFilePath, {
force: false
}, () => {
if (is_mandatory) {
plus.runtime.restart();
return;
}
uni.showModal({
title: '安装成功是否重启?',
success: res => {
if (res.confirm) {
plus.runtime.restart();
}
}
});
}, err => {
uni.showModal({
title: '更新失败',
content: err.message,
showCancel: false
});
});
}
});
}
});
}

View File

@ -0,0 +1,611 @@
<template>
<view class="mask flex-center">
<view class="content botton-radius">
<view class="content-top">
<text class="content-top-text">{{title}}</text>
<image class="content-top" style="top: 0;" width="100%" height="100%" src="/static/bg_top.png">
</image>
</view>
<view class="content-header"></view>
<view class="content-body">
<view class="title">
<text>{{subTitle}}</text>
<text class="content-body-version">{{version}}</text>
</view>
<view class="body">
<scroll-view class="box-des-scroll" scroll-y="true">
<text class="box-des">
{{contents}}
</text>
</scroll-view>
</view>
<view class="footer flex-center">
<template v-if="isAppStore">
<button class="content-button" style="border: none;color: #fff;" plain @click="jumpToAppStore">
{{downLoadBtnTextiOS}}
</button>
</template>
<template v-else>
<template v-if="!downloadSuccess">
<view class="progress-box flex-column" v-if="downloading">
<progress class="progress" :percent="downLoadPercent" activeColor="#3DA7FF" show-info
stroke-width="10"/>
<view style="width:100%;font-size: 28rpx;display: flex;justify-content: space-around;">
<text>{{downLoadingText}}</text>
<text>({{downloadedSize}}/{{packageFileSize}}M)</text>
</view>
</view>
<button v-else class="content-button" style="border: none;color: #fff;" plain @click="updateApp">
{{downLoadBtnText}}
</button>
</template>
<button v-else-if="downloadSuccess && !installed" class="content-button" style="border: none;color: #fff;"
plain :loading="installing" :disabled="installing" @click="installPackage">
{{installing ? '正在安装……' : '下载完成,立即安装'}}
</button>
<button v-else-if="installed && !isWGT" class="content-button" style="border: none;color: #fff;"
plain :loading="installing" :disabled="installing" @click="installPackage">
安装未完成点击安装
</button>
<button v-else-if="installed && isWGT" class="content-button" style="border: none;color: #fff;" plain
@click="restart">
安装完毕点击重启
</button>
</template>
</view>
</view>
<image v-if="!is_mandatory" class="close-img" src="/static/app_update_close.png" @click.stop="closeUpdate">
</image>
</view>
</view>
</template>
<script>
// #ifdef APP
import { createNotificationProgress, cancelNotificationProgress, finishNotificationProgress } from '@/uni_modules/uts-progressNotification'
// #endif
const localFilePathKey = 'UNI_ADMIN_UPGRADE_CENTER_LOCAL_FILE_PATH'
const platform_iOS = 'iOS';
const platform_Android = 'Android';
let downloadTask = null;
let openSchemePromise
/**
* 对比版本号如需要请自行修改判断规则
* 支持比对 ("3.0.0.0.0.1.0.1", "3.0.0.0.0.1") ("3.0.0.1", "3.0") ("3.1.1", "3.1.1.1") 之类的
* @param {Object} v1
* @param {Object} v2
* v1 > v2 return 1
* v1 < v2 return -1
* v1 == v2 return 0
*/
function compare(v1 = '0', v2 = '0') {
v1 = String(v1).split('.')
v2 = String(v2).split('.')
const minVersionLens = Math.min(v1.length, v2.length);
let result = 0;
for (let i = 0; i < minVersionLens; i++) {
const curV1 = Number(v1[i])
const curV2 = Number(v2[i])
if (curV1 > curV2) {
result = 1
break;
} else if (curV1 < curV2) {
result = -1
break;
}
}
if (result === 0 && (v1.length !== v2.length)) {
const v1BiggerThenv2 = v1.length > v2.length;
const maxLensVersion = v1BiggerThenv2 ? v1 : v2;
for (let i = minVersionLens; i < maxLensVersion.length; i++) {
const curVersion = Number(maxLensVersion[i])
if (curVersion > 0) {
v1BiggerThenv2 ? result = 1 : result = -1
break;
}
}
}
return result;
}
export default {
data() {
return {
//
installForBeforeFilePath: '',
//
installed: false,
installing: false,
//
downloadSuccess: false,
downloading: false,
downLoadPercent: 0,
downloadedSize: 0,
packageFileSize: 0,
tempFilePath: '', //
//
title: '更新日志',
contents: '',
version: '',
is_mandatory: false,
url: '',
platform: [],
store_list: null,
//
subTitle: '发现新版本',
downLoadBtnTextiOS: '立即跳转更新',
downLoadBtnText: '立即下载更新',
downLoadingText: '安装包下载中,请稍后'
}
},
onLoad({
local_storage_key
}) {
if (!local_storage_key) {
console.error('local_storage_key为空请检查后重试')
uni.navigateBack()
return;
};
const localPackageInfo = uni.getStorageSync(local_storage_key);
if (!localPackageInfo) {
console.error('安装包信息为空,请检查后重试')
uni.navigateBack()
return;
};
const requiredKey = ['version', 'url', 'type']
for (let key in localPackageInfo) {
if (requiredKey.indexOf(key) !== -1 && !localPackageInfo[key]) {
console.error(`参数 ${key} 必填,请检查后重试`)
uni.navigateBack()
return;
}
}
Object.assign(this, localPackageInfo)
console.log(localPackageInfo);
this.checkLocalStoragePackage()
},
onBackPress() {
if (this.is_mandatory) return true
if (!this.needNotificationProgress) downloadTask && downloadTask.abort()
},
onHide() {
openSchemePromise = null
},
computed: {
isWGT() {
return this.type === 'wgt'
},
isiOS() {
return !this.isWGT ? this.platform.indexOf(platform_iOS) !== -1 : false;
},
isAndroid() {
return this.platform.indexOf(platform_Android) !== -1
},
isAppStore() {
return this.isiOS || (!this.isiOS && !this.isWGT && this.url.indexOf('.apk') === -1)
},
needNotificationProgress() {
return this.platform.indexOf(platform_iOS) === -1 && !this.is_mandatory
}
},
methods: {
checkLocalStoragePackage() {
//
const localFilePathRecord = uni.getStorageSync(localFilePathKey)
if (localFilePathRecord) {
const {
version,
savedFilePath,
installed
} = localFilePathRecord
//
if (!installed && compare(version, this.version) === 0) {
this.downloadSuccess = true;
this.installForBeforeFilePath = savedFilePath;
this.tempFilePath = savedFilePath
} else {
//
this.deleteSavedFile(savedFilePath)
}
}
},
askAbortDownload() {
uni.showModal({
title: '是否取消下载?',
cancelText: '否',
confirmText: '是',
success: res => {
if (res.confirm) {
downloadTask && downloadTask.abort()
cancelNotificationProgress()
uni.navigateBack()
}
}
});
},
async closeUpdate() {
if (this.downloading) {
if (this.is_mandatory) {
return uni.showToast({
title: '下载中,请稍后……',
icon: 'none',
duration: 500
})
}
if (!this.needNotificationProgress) {
this.askAbortDownload()
return;
}
}
if (!this.needNotificationProgress && this.downloadSuccess && this.tempFilePath) {
//
await this.saveFile(this.tempFilePath, this.version)
}
uni.navigateBack()
},
updateApp() {
this.checkStoreScheme()
.catch(() => {
this.downloadPackage()
})
.finally(() => {
openSchemePromise = null
})
},
//
checkStoreScheme() {
const storeList = (this.store_list || []).filter(item => item.enable)
if (storeList && storeList.length) {
storeList
.sort((cur, next) => next.priority - cur.priority)
.map(item => item.scheme)
.reduce((promise, cur, curIndex) => {
openSchemePromise = (promise || (promise = Promise.reject())).catch(() => {
return new Promise((resolve, reject) => {
plus.runtime.openURL(cur, (err) => {
reject(err)
})
})
})
return openSchemePromise
}, openSchemePromise)
return openSchemePromise
}
return Promise.reject()
},
downloadPackage() {
this.downloading = true;
//
downloadTask = uni.downloadFile({
url: this.url,
success: res => {
if (res.statusCode == 200) {
// fix: wgt wgt
if (this.isWGT && res.tempFilePath.split('.').slice(-1)[0] !== 'wgt') {
const failCallback = (e) => {
console.log('[FILE RENAME FAIL]', JSON.stringify(e));
}
plus.io.resolveLocalFileSystemURL(res.tempFilePath, (entry) => {
entry.getParent((parent) => {
const newName = `new_wgt_${Date.now()}.wgt`
entry.copyTo(parent, newName, (res) => {
this.tempFilePath = res.fullPath
this.downLoadComplete()
}, failCallback)
}, failCallback)
}, failCallback);
} else {
this.tempFilePath = res.tempFilePath
this.downLoadComplete()
}
}
}
});
downloadTask.onProgressUpdate(res => {
this.downLoadPercent = res.progress;
this.downloadedSize = (res.totalBytesWritten / Math.pow(1024, 2)).toFixed(2);
this.packageFileSize = (res.totalBytesExpectedToWrite / Math.pow(1024, 2)).toFixed(2);
if (this.needNotificationProgress && !this.downloadSuccess) {
createNotificationProgress({
title: "升级中心正在下载安装包……",
content: `${this.downLoadPercent}%`,
progress: this.downLoadPercent,
onClick: () => {
this.askAbortDownload()
}
})
}
});
if (this.needNotificationProgress) {
uni.navigateBack()
}
},
downLoadComplete() {
this.downloadSuccess = true;
this.downloading = false;
this.downLoadPercent = 0
this.downloadedSize = 0
this.packageFileSize = 0
downloadTask = null;
if (this.needNotificationProgress) {
finishNotificationProgress({
title: "安装升级包",
content: "下载完成"
})
this.installPackage();
return
}
//
if (this.is_mandatory) {
this.installPackage();
}
},
installPackage() {
// #ifdef APP-PLUS
// wgt
if (this.isWGT) {
this.installing = true;
}
plus.runtime.install(this.tempFilePath, {
force: false
}, async res => {
this.installing = false;
this.installed = true;
// wgt
if (this.isWGT) {
//
if (this.is_mandatory) {
uni.showLoading({
icon: 'none',
title: '安装成功,正在重启……'
})
setTimeout(() => {
uni.hideLoading()
this.restart();
}, 1000)
}
} else {
const localFilePathRecord = uni.getStorageSync(localFilePathKey)
uni.setStorageSync(localFilePathKey, {
...localFilePathRecord,
installed: true
})
}
}, async err => {
//
if (this.installForBeforeFilePath) {
await this.deleteSavedFile(this.installForBeforeFilePath)
this.installForBeforeFilePath = '';
}
//
this.installing = false;
this.installed = false;
uni.showModal({
title: '更新失败,请重新下载',
content: err.message,
showCancel: false
});
});
// wgt
if (!this.isWGT && !this.is_mandatory) {
uni.navigateBack()
}
// #endif
},
restart() {
this.installed = false;
// #ifdef APP-PLUS
//app
plus.runtime.restart();
// #endif
},
saveFile(tempFilePath, version) {
return new Promise((resolve, reject) => {
uni.saveFile({
tempFilePath,
success({
savedFilePath
}) {
uni.setStorageSync(localFilePathKey, {
version,
savedFilePath
})
},
complete() {
resolve()
}
})
})
},
deleteSavedFile(filePath) {
uni.removeStorageSync(localFilePathKey)
return uni.removeSavedFile({
filePath
})
},
jumpToAppStore() {
plus.runtime.openURL(this.url);
}
}
}
</script>
<style lang="scss">
page {
background: transparent;
}
.flex-center {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
justify-content: center;
align-items: center;
}
.mask {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .65);
}
.botton-radius {
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.content {
position: relative;
top: 0;
width: 600rpx;
background-color: #fff;
box-sizing: border-box;
padding: 0 50rpx;
font-family: Source Han Sans CN;
}
.text {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
line-height: 200px;
text-align: center;
color: #FFFFFF;
}
.content-top {
position: absolute;
top: -195rpx;
left: 0;
width: 600rpx;
height: 270rpx;
}
.content-top-text {
font-size: 45rpx;
font-weight: bold;
color: #F8F8FA;
position: absolute;
top: 120rpx;
left: 50rpx;
z-index: 1;
}
.content-header {
height: 70rpx;
}
.title {
font-size: 33rpx;
font-weight: bold;
color: #3DA7FF;
line-height: 38px;
}
.content-body-version {
padding-left: 10px;
color: #fff;
font-size: 10px;
margin-left: 5px;
padding: 2px 4px;
border-radius: 10px;
background: #50aefd;
}
.footer {
height: 150rpx;
display: flex;
align-items: center;
justify-content: space-around;
}
.box-des-scroll {
box-sizing: border-box;
padding: 0 40rpx;
height: 200rpx;
text-align: left;
}
.box-des {
font-size: 26rpx;
color: #000000;
line-height: 50rpx;
}
.progress-box {
width: 100%;
}
.progress {
width: 90%;
height: 40rpx;
/* border-radius: 35px; */
}
.close-img {
width: 70rpx;
height: 70rpx;
z-index: 1000;
position: absolute;
bottom: -120rpx;
left: calc(50% - 70rpx / 2);
}
.content-button {
text-align: center;
flex: 1;
font-size: 30rpx;
font-weight: 400;
color: #FFFFFF;
border-radius: 40rpx;
margin: 0 18rpx;
height: 80rpx;
line-height: 80rpx;
background: linear-gradient(to right, #1785ff, #3DA7FF);
}
.flex-column {
display: flex;
flex-direction: column;
align-items: center;
}
</style>

View File

@ -29,11 +29,10 @@
</uv-input>
</uv-form-item>
<uv-line color="#f5f5f5"></uv-line>
<uv-form-item required label="性别" prop="sex">
<uv-form-item required label="性别" prop="sex" @click="openPicker">
<uv-input
placeholder="请选择性别"
@click="openPicker"
readonly
disabled
inputAlign="right"
:border="`none`"
v-model="form.sex"
@ -59,7 +58,7 @@
>
<uv-input
placeholder="请选择日期"
required
disabled
inputAlign="right"
:border="`none`"
v-model="form.first_work_time"

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,24 @@
## 1.1.02024-03-08
修复uniapp打包报错问题
## 1.0.92024-02-29
去除代码过时警告
## 1.0.82023-12-21
去除app-ios目录
## 1.0.72023-12-11
去除无用代码
## 1.0.62023-12-11
修改文档
## 1.0.52023-12-11
1.修改插件名称
2.修改插件引入方式为import导入
## 1.0.42023-11-30
1. createNotificationProgress增加`onClick`回调
2.修复在小米部分系统上通知消息会归类于不重要通知的bug
## 1.0.32023-11-28
更新截图
## 1.0.22023-11-28
修改资源的包名
## 1.0.12023-11-28
更新文档
## 1.0.02023-11-28
Android通知栏显示进度插件

View File

@ -0,0 +1,83 @@
{
"id": "uts-progressNotification",
"displayName": "uts-progressNotification",
"version": "1.1.0",
"description": "uts-progressNotification",
"keywords": [
"uts-progressNotification"
],
"repository": "",
"engines": {
"HBuilderX": "^3.91"
},
"dcloudext": {
"type": "uts",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "插件不采集任何数据",
"permissions": "TargetSDKVersion33以上时需配置\n`android.permission.POST_NOTIFICATIONS`"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {
"app-android": {
"minVersion": "19"
},
"app-ios": "n"
},
"H5-mobile": {
"Safari": "n",
"Android Browser": "n",
"微信浏览器(Android)": "n",
"QQ浏览器(Android)": "n"
},
"H5-pc": {
"Chrome": "n",
"IE": "n",
"Edge": "n",
"Firefox": "n",
"Safari": "n"
},
"小程序": {
"微信": "n",
"阿里": "n",
"百度": "n",
"字节跳动": "n",
"QQ": "n",
"钉钉": "n",
"快手": "n",
"飞书": "n",
"京东": "n"
},
"快应用": {
"华为": "n",
"联盟": "n"
}
}
}
}
}

View File

@ -0,0 +1,71 @@
# uts-progressNotification
## 使用说明
Android平台创建显示进度的通知栏消息
**注意: 需要自定义基座,否则点击通知栏消息不会拉起应用**
### 导入
需要import导入插件
### createNotificationProgress(options : CreateNotificationProgressOptions) : void,
创建显示进度的通知栏消息
参数说明
```
export type CreateNotificationProgressOptions = {
/**
* 通知标题
* @defaultValue 应用名称
*/
title ?: string | null
/**
* 通知内容
*/
content : string,
/**
* 进度
*/
progress : number,
/**
* 点击通知消息回调
* @defaultValue null
*/
onClick? : (() => void) | null
}
```
### finishNotificationProgress(options: FinishNotificationProgressOptions) : void
完成时调用的API比如下载完成后需要显示下载完成并隐藏进度时调用。
参数说明
```
export type FinishNotificationProgressOptions = {
/**
* 通知标题
* @defaultValue 应用名称
*/
title ?: string | null
/**
* 通知内容
*/
content : string,
/**
* 点击通知消息回调
*/
onClick : () => void
}
```
### cancelNotificationProgress() : void
取消通知消息显示

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
package="uts.sdk.modules.utsProgressNotification">
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<application>
<activity android:name="uts.sdk.modules.utsProgressNotification.TransparentActivity"
android:theme="@style/DCNotificationProgressTranslucentTheme" android:hardwareAccelerated="true"
android:screenOrientation="user" android:exported="true">
</activity>
</application>
</manifest>

View File

@ -0,0 +1,62 @@
import Activity from "android.app.Activity";
import Bundle from 'android.os.Bundle';
import Build from 'android.os.Build';
import View from 'android.view.View';
import Color from 'android.graphics.Color';
import WindowManager from 'android.view.WindowManager';
import { globalNotificationProgressFinishCallBack, globalNotificationProgressCallBack } from './callbacks.uts';
import { ACTION_DOWNLOAD_FINISH, ACTION_DOWNLOAD_PROGRESS } from "./constant.uts"
export class TransparentActivity extends Activity {
constructor() {
super()
}
@Suppress("DEPRECATION")
override onCreate(savedInstanceState : Bundle | null) {
super.onCreate(savedInstanceState)
this.fullScreen(this)
const action = this.getIntent().getAction()
if (action == ACTION_DOWNLOAD_FINISH) {
setTimeout(() => {
globalNotificationProgressFinishCallBack()
globalNotificationProgressFinishCallBack = () => { }
}, 100)
this.overridePendingTransition(0, 0)
}
if (action == ACTION_DOWNLOAD_PROGRESS) {
setTimeout(() => {
globalNotificationProgressCallBack?.()
globalNotificationProgressCallBack = () => { }
}, 100)
this.overridePendingTransition(0, 0)
}
setTimeout(() => {
this.finish()
}, 20)
}
@Suppress("DEPRECATION")
private fullScreen(activity : Activity) {
if (Build.VERSION.SDK_INT >= 19) {
if (Build.VERSION.SDK_INT >= 21) {
const window = activity.getWindow();
const decorView = window.getDecorView();
const option = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
decorView.setSystemUiVisibility(option);
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(Color.TRANSPARENT);
} else {
const window = activity.getWindow();
const attributes = window.getAttributes();
const flagTranslucentStatus = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
attributes.flags |= flagTranslucentStatus;
window.setAttributes(attributes);
}
}
}
}

View File

@ -0,0 +1,4 @@
export let globalNotificationProgressCallBack : (() => void) | null = () => { }
export let globalNotificationProgressFinishCallBack = () => { }

View File

@ -0,0 +1,3 @@
{
"minSdkVersion": "19"
}

View File

@ -0,0 +1,2 @@
export const ACTION_DOWNLOAD_FINISH = "ACTION_DOWNLOAD_FINISH"
export const ACTION_DOWNLOAD_PROGRESS = "ACTION_DOWNLOAD_PROGRESS"

View File

@ -0,0 +1,159 @@
import Build from 'android.os.Build';
import Context from 'android.content.Context';
import NotificationManager from 'android.app.NotificationManager';
import NotificationChannel from 'android.app.NotificationChannel';
import Notification from 'android.app.Notification';
import Intent from 'android.content.Intent';
import ComponentName from 'android.content.ComponentName';
import PendingIntent from 'android.app.PendingIntent';
import { CreateNotificationProgressOptions, FinishNotificationProgressOptions } from '../interface.uts';
import { ACTION_DOWNLOAD_FINISH, ACTION_DOWNLOAD_PROGRESS } from "./constant.uts"
import { globalNotificationProgressFinishCallBack, globalNotificationProgressCallBack } from './callbacks.uts';
export { TransparentActivity } from './TransparentActivity.uts';
const DOWNLOAD_PROGRESS_NOTIFICATION_ID : Int = 7890
const DC_DOWNLOAD_CHANNEL_ID = "下载文件"
const DC_DOWNLOAD_CHANNEL_NAME = "用于显示现在进度的渠道"
let notificationBuilder : Notification.Builder | null = null
let timeId = -1
let histroyProgress = 0
let isProgress = false
export function createNotificationProgress(options : CreateNotificationProgressOptions) : void {
const { content, progress, onClick } = options
if (progress == 100) {
clearTimeout(timeId)
const context = UTSAndroid.getAppContext() as Context
realCreateNotificationProgress(options.title ?? getAppName(context), content, progress, onClick)
reset()
return
}
histroyProgress = progress
if (timeId != -1) {
return
}
const context = UTSAndroid.getAppContext() as Context
if (!isProgress) {
realCreateNotificationProgress(options.title ?? getAppName(context), content, histroyProgress, onClick)
isProgress = true
} else {
timeId = setTimeout(() => {
realCreateNotificationProgress(options.title ?? getAppName(context), content, histroyProgress, onClick)
timeId = -1
}, 1000)
}
}
export function cancelNotificationProgress() : void {
const context = UTSAndroid.getAppContext() as Context
const notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.cancel(DOWNLOAD_PROGRESS_NOTIFICATION_ID)
reset()
}
function realCreateNotificationProgress(title : string, content : string, progress : number, cb : (() => void) | null) : void {
globalNotificationProgressCallBack = cb
const context = UTSAndroid.getAppContext() as Context
const notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
createDownloadChannel(notificationManager)
const builder = createNotificationBuilder(context)
builder.setProgress(100, progress.toInt(), false)
builder.setContentTitle(title)
builder.setContentText(content)
builder.setContentIntent(createPendingIntent(context, ACTION_DOWNLOAD_PROGRESS));
notificationManager.notify(DOWNLOAD_PROGRESS_NOTIFICATION_ID, builder.build())
}
export function finishNotificationProgress(options : FinishNotificationProgressOptions) {
globalNotificationProgressFinishCallBack = options.onClick
const context = UTSAndroid.getAppContext() as Context
const notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
createDownloadChannel(notificationManager)
const builder = createNotificationBuilder(context)
builder.setProgress(0, 0, false)
builder.setContentTitle(options.title ?? getAppName(context))
builder.setContentText(options.content)
//小米rom setOngoing未false的时候会被通知管理器归为不重要通知
// builder.setOngoing(false)
builder.setAutoCancel(true);
builder.setContentIntent(createPendingIntent(context, ACTION_DOWNLOAD_FINISH));
notificationManager.notify(DOWNLOAD_PROGRESS_NOTIFICATION_ID, builder.build())
reset()
}
function reset() {
isProgress = false
notificationBuilder = null
histroyProgress = 0
if (timeId != -1) {
clearTimeout(timeId)
timeId = -1
}
}
function createPendingIntent(context : Context, action : string) : PendingIntent {
const i = new Intent(action);
i.setComponent(new ComponentName(context.getPackageName(), "uts.sdk.modules.utsProgressNotification.TransparentActivity"));
let flags = PendingIntent.FLAG_ONE_SHOT;
if (Build.VERSION.SDK_INT >= 23) {
flags = PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE;
}
return PendingIntent.getActivity(context, DOWNLOAD_PROGRESS_NOTIFICATION_ID, i, flags);
}
function createDownloadChannel(notificationManager : NotificationManager) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
const channel = new NotificationChannel(
DC_DOWNLOAD_CHANNEL_ID,
DC_DOWNLOAD_CHANNEL_NAME,
NotificationManager.IMPORTANCE_LOW
)
notificationManager.createNotificationChannel(channel)
}
}
@Suppress("DEPRECATION")
function createNotificationBuilder(context : Context) : Notification.Builder {
if (notificationBuilder == null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
notificationBuilder = new Notification.Builder(context, DC_DOWNLOAD_CHANNEL_ID)
} else {
notificationBuilder = new Notification.Builder(context)
}
notificationBuilder!.setSmallIcon(context.getApplicationInfo().icon)
notificationBuilder!.setOngoing(true)
notificationBuilder!.setSound(null)
}
return notificationBuilder!
}
@Suppress("DEPRECATION")
function getAppName(context : Context) : string {
let appName = ""
try {
const packageManager = context.getPackageManager()
const applicationInfo = packageManager.getApplicationInfo(context.getPackageName(), 0)
appName = packageManager.getApplicationLabel(applicationInfo) as string
} catch (e : Exception) {
e.printStackTrace()
}
return appName
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="DCNotificationProgressTranslucentTheme">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
</resources>

View File

@ -0,0 +1,46 @@
export type CreateNotificationProgressOptions = {
/**
* 通知标题
* @defaultValue 应用名称
*/
title ?: string | null
/**
* 通知内容
*/
content : string,
/**
* 进度
*/
progress : number,
/**
* 点击通知消息回调
* @defaultValue null
*/
onClick? : (() => void) | null
}
export type FinishNotificationProgressOptions = {
/**
* 通知标题
* @defaultValue 应用名称
*/
title ?: string | null
/**
* 通知内容
*/
content : string,
/**
* 点击通知消息回调
*/
onClick : () => void
}
export type CreateNotificationProgress = (options : CreateNotificationProgressOptions) => void;
export type CancelNotificationProgress = () => void;
export type FinishNotificationProgress = (options: FinishNotificationProgressOptions) => void

View File

@ -2,13 +2,16 @@ import Request from 'luch-request';
import { useGlobSetting } from '@/config';
import { useUserStoreWithOut } from '@/store/modules/user';
const { apiUrl } = useGlobSetting();
const systemInfo = uni.getSystemInfoSync();
const http = new Request();
http.setConfig((config) => {
config.baseURL = apiUrl;
config.timeout = 10000;
config.header = Object.assign({
Accept: 'application/json'
Accept: 'application/json',
// 'app-cli-os': android/ios,
// 'app-cli-version': 100
}, config.header);
/* 设置全局配置 */
config.validateStatus = (statusCode) => {
@ -74,7 +77,12 @@ http.interceptors.response.use(async (response) => {
}
return response.data;
}, (error) => {
return error;
console.log(error);
uni.showToast({
title: error.errMsg,
icon: 'none'
})
return Promise.reject(error);
});
export { http };
export const Method = {

192
yarn.lock
View File

@ -1426,6 +1426,71 @@
"@dcloudio/uni-shared" "3.0.0-3090920231225001"
debug "^4.3.3"
"@dcloudio/uni-uts-v1@3.0.0-3090920231225001":
version "3.0.0-3090920231225001"
resolved "https://registry.npmmirror.com/@dcloudio/uni-uts-v1/-/uni-uts-v1-3.0.0-3090920231225001.tgz#a6aca922ef84c19eb64105b632a0453c33007af7"
integrity sha512-6SpUeOAhCy2sr48/vUVZGDGpmktwKo7lWnVvdRzOfUbTCVnEdr+TR1kLJMEXGnalHDopVUluzCvLWqsHflV1yw==
dependencies:
"@dcloudio/uts" "3.0.0-3090920231225001"
"@rollup/pluginutils" "^5.0.5"
"@vue/shared" "3.2.47"
adm-zip "^0.5.9"
android-versions "^1.8.1"
colors "^1.4.0"
fast-glob "^3.2.11"
find-cache-dir "^3.3.2"
fs-extra "^10.0.0"
graphlib "^2.1.8"
jsonc-parser "^3.0.0"
lodash "^4.17.21"
md5-file "^5.0.0"
object-hash "^3.0.0"
semver "^7.5.4"
source-map "^0.7.4"
source-map-js "^1.0.2"
"@dcloudio/uts-darwin-arm64@3.0.0-3090920231225001":
version "3.0.0-3090920231225001"
resolved "https://registry.npmmirror.com/@dcloudio/uts-darwin-arm64/-/uts-darwin-arm64-3.0.0-3090920231225001.tgz#13771d974c5e4d36ed9af32855d31573e77a37c2"
integrity sha512-QsCqVlIaOiXEdDv4XdeAdcgoxdk2QE+4n5vYSLVYft8KWuP6seweYki+My2TByBPxMGUBRQ9GRzM14qNM9CmXg==
"@dcloudio/uts-darwin-x64@3.0.0-3090920231225001":
version "3.0.0-3090920231225001"
resolved "https://registry.npmmirror.com/@dcloudio/uts-darwin-x64/-/uts-darwin-x64-3.0.0-3090920231225001.tgz#5517fae6cb74236d4c05e682e061e03675d1b4d6"
integrity sha512-15l9geqR1IIzhEkTqLFicNsmM6ZFP++a9QL5d9vmPDXNIxePw95bv9iNHgJMEKlxm+Cif1qInpgtLlyimiRZKw==
"@dcloudio/uts-linux-x64-gnu@3.0.0-3090920231225001":
version "3.0.0-3090920231225001"
resolved "https://registry.npmmirror.com/@dcloudio/uts-linux-x64-gnu/-/uts-linux-x64-gnu-3.0.0-3090920231225001.tgz#af6a1fc0a91711b4c0afede63095e007a9f6e4b8"
integrity sha512-R7Zjyyg1ezZVEfM88M/wm6mQIZjknF9SHUHdYhwjrRG07yuGxFHf8jTi3pIpRJ92pkIWcWPcODxYo+AyVjdCtw==
"@dcloudio/uts-linux-x64-musl@3.0.0-3090920231225001":
version "3.0.0-3090920231225001"
resolved "https://registry.npmmirror.com/@dcloudio/uts-linux-x64-musl/-/uts-linux-x64-musl-3.0.0-3090920231225001.tgz#217e09d5d076959f551ebf2ed14d3c75201d1e38"
integrity sha512-zOEqEhPHZwbaJnZB4ATGVlQ9NjbSx4OCc4oIlfwL7/AyHLNob5g80xtsKE5zcvGccPF7+aiMPcbwXowk5zJYQw==
"@dcloudio/uts-win32-ia32-msvc@3.0.0-3090920231225001":
version "3.0.0-3090920231225001"
resolved "https://registry.npmmirror.com/@dcloudio/uts-win32-ia32-msvc/-/uts-win32-ia32-msvc-3.0.0-3090920231225001.tgz#1822e015f83e5bfe7908299a802583c59cfeb784"
integrity sha512-HltDzVGQtLBbaYVeWDxNmC0wdeFcf22YBjCqFimbEtYPIGFY7FPQ/68l0m0LjvGtq7NdjjN6m28s0SUSB+PD3Q==
"@dcloudio/uts-win32-x64-msvc@3.0.0-3090920231225001":
version "3.0.0-3090920231225001"
resolved "https://registry.npmmirror.com/@dcloudio/uts-win32-x64-msvc/-/uts-win32-x64-msvc-3.0.0-3090920231225001.tgz#0eaa808182e5427bf4f342112c91de4a7d447d19"
integrity sha512-DuP8g2Afjk/dgx58KXsAOJTtPoZrtEN2fC1jB3SQbkq0Hd0TIYx/iqqWmrBSk3Y2GwOMvdrWqIKFjkFhRNFS5w==
"@dcloudio/uts@3.0.0-3090920231225001":
version "3.0.0-3090920231225001"
resolved "https://registry.npmmirror.com/@dcloudio/uts/-/uts-3.0.0-3090920231225001.tgz#4d4c13c6202d8d4c9d3eed5771a0d2a5b0cd9ef2"
integrity sha512-lwhXowKE08PK4bfhmAs/LzNnRao9w7RAZ8tujAWTiI2WOqp7lPpHBCVzH0wmx1iWWOsPZcevyYvszashov3DtQ==
optionalDependencies:
"@dcloudio/uts-darwin-arm64" "3.0.0-3090920231225001"
"@dcloudio/uts-darwin-x64" "3.0.0-3090920231225001"
"@dcloudio/uts-linux-x64-gnu" "3.0.0-3090920231225001"
"@dcloudio/uts-linux-x64-musl" "3.0.0-3090920231225001"
"@dcloudio/uts-win32-ia32-msvc" "3.0.0-3090920231225001"
"@dcloudio/uts-win32-x64-msvc" "3.0.0-3090920231225001"
"@dcloudio/vite-plugin-uni@3.0.0-3090920231225001":
version "3.0.0-3090920231225001"
resolved "https://registry.npmmirror.com/@dcloudio/vite-plugin-uni/-/vite-plugin-uni-3.0.0-3090920231225001.tgz"
@ -2703,6 +2768,18 @@ address@^1.1.2:
resolved "https://registry.npmmirror.com/address/-/address-1.2.2.tgz"
integrity sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==
adm-zip@^0.5.9:
version "0.5.12"
resolved "https://registry.npmmirror.com/adm-zip/-/adm-zip-0.5.12.tgz#87786328e91d54b37358d8a50f954c4cd73ba60b"
integrity sha512-6TVU49mK6KZb4qG6xWaaM4C7sA/sgUMLy/JYMOzkcp3BvVLpW0fXDFQiIzAuxFCt/2+xD7fNIiPFAoLZPhVNLQ==
android-versions@^1.8.1:
version "1.9.0"
resolved "https://registry.npmmirror.com/android-versions/-/android-versions-1.9.0.tgz#433d53fc6ed5ba2b8d3c2801cb5da3964013274d"
integrity sha512-13O2B6PQMEM4ej9n13ePRQeckrCoKbZrvuzlLvK+9s2QmncpHDbYzZxhgapN32sJNoifN6VAHexLnd/6CYrs7Q==
dependencies:
semver "^7.5.2"
ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-3.2.1.tgz"
@ -2926,11 +3003,21 @@ colorette@^2.0.20:
resolved "https://registry.npmmirror.com/colorette/-/colorette-2.0.20.tgz"
integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==
colors@^1.4.0:
version "1.4.0"
resolved "https://registry.npmmirror.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78"
integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==
commander@^2.20.0:
version "2.20.3"
resolved "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.npmmirror.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==
compare-versions@^3.6.0:
version "3.6.0"
resolved "https://registry.npmmirror.com/compare-versions/-/compare-versions-3.6.0.tgz"
@ -3344,6 +3431,23 @@ finalhandler@1.2.0:
statuses "2.0.1"
unpipe "~1.0.0"
find-cache-dir@^3.3.2:
version "3.3.2"
resolved "https://registry.npmmirror.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b"
integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==
dependencies:
commondir "^1.0.1"
make-dir "^3.0.2"
pkg-dir "^4.1.0"
find-up@^4.0.0:
version "4.1.0"
resolved "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
dependencies:
locate-path "^5.0.0"
path-exists "^4.0.0"
find-up@^5.0.0:
version "5.0.0"
resolved "https://registry.npmmirror.com/find-up/-/find-up-5.0.0.tgz"
@ -3446,6 +3550,13 @@ graceful-fs@^4.1.6, graceful-fs@^4.2.0:
resolved "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
graphlib@^2.1.8:
version "2.1.8"
resolved "https://registry.npmmirror.com/graphlib/-/graphlib-2.1.8.tgz#5761d414737870084c92ec7b5dbcb0592c9d35da"
integrity sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==
dependencies:
lodash "^4.17.15"
gzip-size@^6.0.0:
version "6.0.0"
resolved "https://registry.npmmirror.com/gzip-size/-/gzip-size-6.0.0.tgz"
@ -3706,6 +3817,13 @@ localstorage-polyfill@^1.0.1:
resolved "https://registry.npmmirror.com/localstorage-polyfill/-/localstorage-polyfill-1.0.1.tgz"
integrity sha512-m4iHVZxFH5734oQcPKU08025gIz2+4bjWR9lulP8ZYxEJR0BpA0w32oJmkzh8y3UI9ci7xCBehQDc3oA1X+VHw==
locate-path@^5.0.0:
version "5.0.0"
resolved "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
dependencies:
p-locate "^4.1.0"
locate-path@^6.0.0:
version "6.0.0"
resolved "https://registry.npmmirror.com/locate-path/-/locate-path-6.0.0.tgz"
@ -3723,6 +3841,11 @@ lodash.debounce@^4.0.8:
resolved "https://registry.npmmirror.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz"
integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==
lodash@^4.17.15, lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz"
@ -3730,6 +3853,13 @@ lru-cache@^5.1.1:
dependencies:
yallist "^3.0.2"
lru-cache@^6.0.0:
version "6.0.0"
resolved "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
dependencies:
yallist "^4.0.0"
luch-request@^3.1.1:
version "3.1.1"
resolved "https://registry.npmmirror.com/luch-request/-/luch-request-3.1.1.tgz"
@ -3751,6 +3881,18 @@ magic-string@^0.30.0, magic-string@^0.30.1, magic-string@^0.30.5, magic-string@^
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"
make-dir@^3.0.2:
version "3.1.0"
resolved "https://registry.npmmirror.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==
dependencies:
semver "^6.0.0"
md5-file@^5.0.0:
version "5.0.0"
resolved "https://registry.npmmirror.com/md5-file/-/md5-file-5.0.0.tgz#e519f631feca9c39e7f9ea1780b63c4745012e20"
integrity sha512-xbEFXCYVWrSx/gEKS1VPlg84h/4L20znVIulKw6kMfmBUAZNAnF00eczz9ICMl+/hjQGo5KSXRxbL/47X3rmMw==
mdn-data@2.0.30:
version "2.0.30"
resolved "https://registry.npmmirror.com/mdn-data/-/mdn-data-2.0.30.tgz"
@ -3919,6 +4061,11 @@ npm-run-path@^4.0.1:
dependencies:
path-key "^3.0.0"
object-hash@^3.0.0:
version "3.0.0"
resolved "https://registry.npmmirror.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9"
integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==
object-inspect@^1.13.1:
version "1.13.1"
resolved "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.1.tgz"
@ -3959,6 +4106,13 @@ os-locale-s-fix@^1.0.8-fix-1:
dependencies:
lcid "^3.0.0"
p-limit@^2.2.0:
version "2.3.0"
resolved "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
dependencies:
p-try "^2.0.0"
p-limit@^3.0.2:
version "3.1.0"
resolved "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz"
@ -3966,6 +4120,13 @@ p-limit@^3.0.2:
dependencies:
yocto-queue "^0.1.0"
p-locate@^4.1.0:
version "4.1.0"
resolved "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
dependencies:
p-limit "^2.2.0"
p-locate@^5.0.0:
version "5.0.0"
resolved "https://registry.npmmirror.com/p-locate/-/p-locate-5.0.0.tgz"
@ -3973,6 +4134,11 @@ p-locate@^5.0.0:
dependencies:
p-limit "^3.0.2"
p-try@^2.0.0:
version "2.2.0"
resolved "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
pako@^1.0.5:
version "1.0.11"
resolved "https://registry.npmmirror.com/pako/-/pako-1.0.11.tgz"
@ -4089,6 +4255,13 @@ pixelmatch@^4.0.2:
dependencies:
pngjs "^3.0.0"
pkg-dir@^4.1.0:
version "4.2.0"
resolved "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
dependencies:
find-up "^4.0.0"
pkg-types@^1.0.3:
version "1.0.3"
resolved "https://registry.npmmirror.com/pkg-types/-/pkg-types-1.0.3.tgz"
@ -4358,11 +4531,18 @@ scule@^1.1.1:
resolved "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz"
integrity sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==
semver@^6.3.1:
semver@^6.0.0, semver@^6.3.1:
version "6.3.1"
resolved "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
semver@^7.5.2, semver@^7.5.4:
version "7.6.0"
resolved "https://registry.npmmirror.com/semver/-/semver-7.6.0.tgz#1a46a4db4bffcccd97b743b5005c8325f23d4e2d"
integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==
dependencies:
lru-cache "^6.0.0"
send@0.18.0:
version "0.18.0"
resolved "https://registry.npmmirror.com/send/-/send-0.18.0.tgz"
@ -4463,6 +4643,11 @@ source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1:
resolved "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
source-map@^0.7.4:
version "0.7.4"
resolved "https://registry.npmmirror.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656"
integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==
sourcemap-codec@^1.4.8:
version "1.4.8"
resolved "https://registry.npmmirror.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz"
@ -4844,6 +5029,11 @@ yallist@^3.0.2:
resolved "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz"
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
yaml@^1.10.2:
version "1.10.2"
resolved "https://registry.npmmirror.com/yaml/-/yaml-1.10.2.tgz"