-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: remove config controller and service * fix: use class implement proxy middleware * fix: 插件中间件热更新功能完成 * fix: use routing-controllers to replace old controller regist * fix: move socket logic to a single controller * fix: rename plugin-manager to plugin-service * fix: 删除无用 interface,证书移到 service 目录下 * fix: core/App 下的目录结构修改,上提一级 * fix: 证书信息相关类属性移动到 https server 中 * fix: 修复重构bug,移动部分文件路径 * fix: move middleware dir * fix: optimize cert storage and service * fix: remove ip and user middleware * fix: http-traffic 去除 userId 依赖 * fix: delete some webui monitor unused file * fix: move webui to src directory * fix: add vuex-class lib, fix tsconfig * fix: 监控页重构——记录列表显示 * fix: move webui outer again * fix: open strictNullCheck, change some client type * fix: repair response headers error * fix: make body-collapse a vue component * fix: button icon * fix: move intro page and left-menu to ts * fix: api to ts * fix: plugins 页面 ts 化 * fix: webui mock-data 部分重构 * fix: mock 数据 service 层删除 userId 依赖 * fix: profile controller 修改 * fix: change some table align and width * fix: host 部分重构 * fix: 转发规则 node 部分删除 userId 参数 * fix: 规则转发部分重构 * fix: remove plugin-example, test files and cli publish script * fix: host 规则添加重复检测 * fix: 添加插件升级功能 * fix: plugin service 抽取公共方法 * fix: disable remote rule edit * fix: service 方法整理,plugin 功能测试 * fix: remove console * fix: remove some dependencies * fix: create rule no response * fix: 修复 gui 中 service 方法的错误使用 * fix: 异步加载 GUI Application,避免 profile 初始化错误 * fix: 修改开发打包配置, * fix: 升级 devDependencies * fix: update tray icon image * v5.0.0-beta.1 * fix: update build script * fix: revert mobx-react version * fix: update npm version * fix: 添加清理证书功能 * fix: 添加证书初始化的平台判断 * fix: 调整菜单项 * fix: 添加旧版数据备份 * fix: add LAN ip to ignore pattern
- Loading branch information
Showing
266 changed files
with
11,500 additions
and
36,302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,14 @@ | ||
'use strict'; | ||
|
||
process.env.BABEL_ENV = 'main'; | ||
const merge = require('webpack-merge'); | ||
const webpackNodeBaseConfig = require('../webpack.config.node-base'); | ||
const { rootResolve } = require('../utils'); | ||
|
||
const webpack = require('webpack'); | ||
const nodeExternals = require('webpack-node-externals'); | ||
const FriendlyErrorsWebpackPlugin = require('friendly-errors-webpack-plugin'); | ||
const { rootResolve, runtimePathDefine, webpackAlias } = require('../utils'); | ||
|
||
const isDev = process.env.NODE_ENV !== 'production'; | ||
|
||
const mainConfig = { | ||
mode: process.env.NODE_ENV, | ||
const mainConfig = merge(webpackNodeBaseConfig, { | ||
target: 'node', | ||
entry: { | ||
main: rootResolve('src/cli/index.ts'), | ||
}, | ||
externals: [nodeExternals()], | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.ts$/, | ||
use: [ | ||
{ | ||
loader: 'awesome-typescript-loader', | ||
options: {}, | ||
}, | ||
], | ||
exclude: /node_modules/, | ||
}, | ||
{ | ||
test: /\.node$/, | ||
use: 'node-loader', | ||
}, | ||
], | ||
}, | ||
node: { | ||
__dirname: isDev, | ||
__filename: isDev, | ||
}, | ||
output: { | ||
filename: '[name].js', | ||
libraryTarget: 'commonjs2', | ||
path: rootResolve('dist'), | ||
}, | ||
plugins: [new webpack.NoEmitOnErrorsPlugin()], | ||
resolve: { | ||
alias: webpackAlias, | ||
extensions: ['.js', '.ts', '.json', '.node'], | ||
}, | ||
}; | ||
|
||
if (isDev) { | ||
/** | ||
* Adjust mainConfig for development settings | ||
*/ | ||
mainConfig.plugins.push( | ||
new webpack.DefinePlugin({ | ||
...runtimePathDefine, | ||
}), | ||
new FriendlyErrorsWebpackPlugin(), | ||
); | ||
} else { | ||
/** | ||
* Adjust mainConfig for production settings | ||
*/ | ||
mainConfig.plugins.push( | ||
new webpack.DefinePlugin({ | ||
'process.env.NODE_ENV': '"production"', | ||
}), | ||
); | ||
|
||
} | ||
}); | ||
|
||
module.exports = mainConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.