Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
deploy vue project —— 自动化部署
1、执行 build 命令
2、自动压缩打包后的文件夹
3、连接服务器,创建部署目录及备份目录(用于回退版本)
4、scp 将打包后的压缩包上传到服务器指定路径
5、利用已有的服务器连接,在服务器端解压压缩包
6、删除本地的打包文件及压缩包,部署完成
7、支持回退版本
$ npm i deployvue -D
1、参考 添加本机的 SSH 公钥到服务器 进行本机与服务器连接的准备工作;
2、执行 deployvue init
,在生成的 deploy.config.js
中进行自定义设置;
3、在 package.json
中新增 deploy
相关命令,即可使用 npm run deploy
或 npm run deploy:staging
进行正式环境或测试环境部署
// package.json
"scripts": {
"build": "vue-cli-service build",
"build:staging": "vue-cli-service build --mode staging",
"deploy": "deployvue build && deployvue deploy && deployvue clean",
"deploy:staging": "deployvue build -e staging && deployvue deploy -e staging && deployvue clean"
}
# 查看版本
$ deployvue -V / --version
# 初始化项目的部署配置文件
$ deployvue init
# 打包项目代码
$ deployvue build -e staging / deployvue build
# 部署到指定环境的服务器
$ deployvue deploy -e staging / deployvue deploy
# 回退到上一次部署的版本
$ deployvue rollback -e staging / deployvue rollback
# 清理本地打包临时文件
$ deployvue clean
deployvue build 等同于 deployvue build -e production
相关随笔:写一个 Vue 项目的自动化部署插件
deployvue
├─README.md
├─package-lock.json
├─package.json
├─init
| └deploy.config.js
├─bin
| ├─index.js
| ├─tools
| | ├─SSHGroup.js
| | ├─deployConfig.js
| | ├─file.js
| | └index.js
| ├─actions
| | ├─build.js
| | ├─clean.js
| | ├─deploy.js
| | ├─init.js
| | └rollback.js
FAQs
deploy vue project
The npm package deployvue receives a total of 2 weekly downloads. As such, deployvue popularity was classified as not popular.
We found that deployvue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.