Use string param

This commit is contained in:
the1812 2022-03-21 23:43:36 +08:00
parent 2ea9f3a0ce
commit 3e445f0ad7
3 changed files with 11 additions and 8 deletions

View File

@ -4,7 +4,7 @@ import { isNotHtml, matchPattern } from '@/core/utils'
import { useScopedConsole } from '@/core/utils/log'
const displayName = '网址参数清理'
const console = useScopedConsole({ name: displayName })
const console = useScopedConsole(displayName)
const entry = async () => {
if (isNotHtml()) {
return

View File

@ -14,7 +14,6 @@ import {
CheckSingleTypeUpdateConfig,
} from './utils'
const console = useScopedConsole({ name: '自动更新器' })
export const checkUpdate = async (config: CheckUpdateConfig) => {
const {
items,
@ -127,14 +126,18 @@ const checkByName = (method: CheckSingleTypeUpdate) => reload(
export const checkAllUpdate = async (config: CheckSingleTypeUpdateConfig) => {
const { options } = getComponentSettings(name)
console.groupCollapsed('开始检查更新')
console.log(await checkComponentsUpdate(config) || '暂无组件更新')
console.log(await checkPluginsUpdate(config) || '暂无插件更新')
console.log(await checkStylesUpdate(config) || '暂无样式更新')
const console = useScopedConsole('检查所有更新')
console.log('开始检查更新')
const updateMessages = [
await checkComponentsUpdate(config) || '暂无组件更新',
await checkPluginsUpdate(config) || '暂无插件更新',
await checkStylesUpdate(config) || '暂无样式更新',
]
options.lastUpdateCheck = Number(new Date())
options.lastInstalledVersion = meta.version
console.groupCollapsed('完成更新检查')
updateMessages.forEach(message => console.log(message))
console.groupEnd()
console.log('完成更新检查')
}
export const silentCheckUpdate = () => checkAllUpdate({
maxCount: getComponentSettings(name).options.maxUpdateCount,

View File

@ -5,7 +5,7 @@ import { getGeneralSettings } from './settings'
import { formatFilename } from './utils/formatters'
import { useScopedConsole } from './utils/log'
const console = useScopedConsole({ name: '文件下载' })
const console = useScopedConsole('文件下载')
/** 表示`DownloadPackage`中的一个文件 */
export interface PackageEntry {
/** 文件名 */