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.
fw-new-app
Advanced tools
$ npm install fw-new-app -g
$ fw-new-app <项目名|路径>
修改 /cofig/env.js 的默认导出
$ fw-new-app <项目名|路径> --upgrade
例如:
$ fw-new-app my-new-project
$ cd my-new-project/
$ npm start
在已建项目中公共文件中写的代码,可能被覆盖。升级时,请确认后在提交 commit 。
升级是会先删除以下文件:
const needDeleteFiles = [
'src/interface',
'src/components',
'src/e2e',
'src/layouts',
'src/locales',
'src/services',
'src/models',
'src/utils',
'src/assets',
'src/defaultSettings.ts',
'src/global.less',
'config/config.js',
'config/plugin.config.js',
'config/router.config.js',
'tsconfig.json',
'.eslintrc.js',
];
如果有些在里面的逻辑务必先自行移出来。
config里需自行新建entity.js文件并在里面配置项目路由,更新项目前需自行备份路由配置。 以下为entity.js文件格式:
/**
* 当前环境 dev | test | ''
* 空字符串表示线上环境
* */
export const env = 'dev';
/**
* 在本地开发调试中,需要配置的对应子服务
* 该子服务与服务端对应的子系统前缀保持一致
*/
export const curServer = 'erp';
/** 当前项目对应的路由配置, baseURL: pages */
export const routers = [
{
path: 'admin/system',
component: './SystemManagement'
},
{
path: 'admin/privilege',
component: './PrivilegeManagement'
},
{
path: 'admin/privilege/**/:id',
component: './PrivilegeManagement/components/Children',
},
];
升级项目会覆盖以下文件:
const overridePaths = [
'src/interface',
'src/components',
'src/e2e',
'src/layouts',
'src/locales',
'src/services',
'src/models',
'src/pages',
'src/utils',
'src/assets',
'src/defaultSettings.js',
'src/global.less',
'config/config.js',
'config/plugin.config.js',
'tsconfig.json',
'.eslintrc.js',
];
可以配置以下字段从以上文件中过滤指定文件:
const overrideFilter = [
'src/services/config.js',
'src/pages/document.ejs',
]
FAQs
fw fed cli
We found that fw-new-app 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.