Closed ppsite closed 3 years ago
permissions: [ "storage", "cookies", "https://*/*", "http://*/*" ],
这种情况下会报错:
ValidationError: "permissions[2]" must be one of [activeTab, alarms, background, bookmarks, browsingData, certificateProvider, clipboardRead, clipboardWrite, contentSettings, contextMenus, cookies, debugger, declarativeContent, declarativeNetRequest, declarativeNetRequestFeedback, declarativeWebRequest, desktopCapture, displaySource, dns, documentScan, downloads, enterprise.deviceAttributes, enterprise.hardwarePlatform, enterprise.networkingAttributes, enterprise.platformKeys, experimental, fileBrowserHandler, fileSystemProvider, fontSettings, gcm, geolocation, history, identity, idle, idltest, login, loginScreenStorage, loginState, management, nativeMessaging, notifications, pageCapture, platformKeys, power, printerProvider, printing, printingMetrics, privacy, processes, proxy, scripting, search, sessions, signedInDevices, storage, system.cpu, system.display, system.memory, system.storage, tabCapture, tabGroups, tabs, topSites, tts, ttsEngine, unlimitedStorage, vpnProvider, wallpaper, webNavigation, webRequest, webRequestBlocking]
查看 Permissions 定义,说明是支持 string 类型的
// types/Mainifest.ts export type Permissions = SpecialPermissions | KnownPermissions | string;
查看校验器
// src/functions/configSchema.ts manifest 校验器中不支持其他类型
对 umjs 不熟悉,有心无力,还请大神修复下校验器!
收到,正在修复
666, 大佬速度呀!
我研究了下 Umijs Joi, 没搞明白怎么验证才能支持;
原来竟然这么解决;
👍;
大佬能否加个微信(hsdtsyl),想跟你学学!
有点问题,我可能还要发个版。等 0.3.5
https://github.com/arvinxx/umi-plugin-extensions/releases/tag/v0.3.5 已修复
🐛 bug 描述
这种情况下会报错:
🚑 源码分析
查看 Permissions 定义,说明是支持 string 类型的
查看校验器
需求
对 umjs 不熟悉,有心无力,还请大神修复下校验器!