
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@pigjs/deploy
Advanced tools
@pigjs/deploy 是一个非常轻量级前端部署工具
npm i @pigjs/deploy -g
// 也可以安装到项目中
npm i @pigjs/deploy -save
// 服务器配置
interface ServerConfig {
/** 服务器地址 */
host: string;
/** 端口 */
port: number;
/** 服务器用户名 */
username: string;
/** 服务器密钥 */
password?: string;
/** 服务器密钥地址 */
privateKey?: string;
/** 密钥密码 */
passphrase?: string;
/** 服务器上部署的地址 */
webDir: string;
/** 项目版本管理 */
webVersion?: {
/** 版本存放地址 */
sourceDir: string;
/** 最大存放几个版本 默认 5个 */
maxLimit?: number;
};
}
// .deployrc.js 配置文件
interface DeployConfig {
/** 服务器配置 */
serverConfig: ServerConfig[];
/** 打包命令 */
script: string;
/** 本地打包文件目录 */
distPath: string;
/** 运行目录 */
cwd?: string;
/** 用户自定义配置文件地址 */
customPath?: string;
/** 部署完成之后,是否删除打包文件 */
delDistFile?: boolean;
plugins?: {
/** 上传过程中 过滤某些文件 */
uploadValidate?: (itemPath: string) => boolean;
/** 上传完成后允许用户自定义一些操作 */
useUploadDone?: (command) => Promise<void> | void;
};
}
const commands = ['revert', 'deploy'] as const;
// 自定义命令调用
interface Commands extends DeployConfig {
/** 命令 */
command: typeof commands[number];
/** 是否需要读取配置文件 */
readConfigFile?: boolean;
}
// package.json
{
"script": {
"deploy": "pig-deploy deploy --config ./config/deploy",
"deploy:revert": "pig-deploy revert --config ./config/deploy"
}
}
你也可以在项目根目录下创建 .deployrc.js 文件 或者在 package.json 中 --config 指定配置文件
如果你不是在终端中直接调用 deploy 的,想集成到插件中的,你可以使用自定义调用
import deploy,{Commands} from '@pigjs/deploy'
const commands:Commands {
// 配置信息
}
deploy(commands)
pig-deploy revert --config=配置文件地址
pig-deploy deploy --config=配置文件地址
FAQs
A front-end lightweight deployment tool
We found that @pigjs/deploy 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.