
Product
Introducing Socket Scanning for OpenVSX Extensions
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
@kokojs/plugin-ufile
Advanced tools
用于上传文件到 [ufile 对象存储空间](https://doc.qima-inc.com/pages/viewpage.action?pageId=12987820)。
用于上传文件到 ufile 对象存储空间。
yarn add @kokojs/plugin-ufile --dev
安装完成后,在 koko.config.js 中添加如下配置:
module.exports = {
plugins: {
ufile: {},
},
};
stringpath.resolve(process.cwd(), 'dist')配置源文件地址路径,目录 / 文件。如果是目录会使用 tar 压缩后上传。
stringpath.resolve(process.cwd(), 'dist.tar.gz')压缩文件输出路径。
stringdist-[contenthash].tar.gz上传文件名称,[contenthash] 会被替换为文件内容的 hash 值。如果不使用 hash,将会导致同名文件被覆盖。
stringpath.resolve(process.cwd(), 'ufile.json')上传完成后,会将返回值保存在此文件中。如果error不为空,则上传发生错误。
{
"error": "",
"downloadUrl": "",
"filename": ""
}
string可以获取 bucket privateKey publicKey domain 的接口,返回值为 json
{
"bucket": "",
"publicKey": "",
"privateKey": "",
"domain": ""
}
执行 koko ufile 命令有四个参数。这些参数为了安全不建议保存在源码中,所以需要通过 命令行参数/接口 的方式传入。
如果没有配置
fetchAuthConfigApi,则命令必须传下面的参数
--bucket : ufile 空间名称--privateKey : 空间私钥--publicKey : 空间公钥--domain : 空间域名koko ufile --bucket xxx --publicKey xxx --privateKey xxx --domain xxx.ufileos.com
Jake(于成杰)、陈嘉涵。
FAQs
用于上传文件到 [ufile 对象存储空间](https://doc.qima-inc.com/pages/viewpage.action?pageId=12987820)。
We found that @kokojs/plugin-ufile demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies