-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: axios set proxy https agent, timeout tip (#10853)
* feat: use system proxy, timeout log * fix: files add compiled, deps lock * feat: socks proxy * feat: basic prompt for umi command
- Loading branch information
1 parent
fc122e7
commit aa16d22
Showing
16 changed files
with
214 additions
and
17 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{"name":"https-proxy-agent","version":"5.0.1","author":"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)","license":"MIT","types":"dist/index"} |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{"name":"socks-proxy-agent","version":"7.0.0","author":{"email":"nathan@tootallnate.net","name":"Nathan Rajlich","url":"http://n8.io/"},"license":"MIT","typings":"dist/index.d.ts"} |
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const BUILD_PROMPT = ` | ||
umi build 命令用于构建项目.有以下功能: | ||
- 通过COMPRESS环境变量值为 none,让构建不进行压缩。 | ||
环境变量需要在命令前传递,如:COMPRESS=none umi build | ||
基于以上知识,根据我的要求,返回我应该使用的命令,只需返回这条命令,不包括任何其他信息,不做任何提示 | ||
`; | ||
|
||
export default BUILD_PROMPT; |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const COMMAND_PROMPT = ` | ||
umi 命令行有以下功能: | ||
- dev 启动本地开发服务器,进行项目的开发与调试 | ||
- build 构建项目 | ||
- generate 创建或生成文件,以使某些功能生效,可用于生效ts | ||
- config 查看所有或某个配置,或修改删除某个配置 | ||
基于以上知识,根据我的要求,返回我应该使用的命令,只返回命令名称,如:dev,不清楚用哪个命令时统一用config,不需要任何其他信息 | ||
`; | ||
|
||
export default COMMAND_PROMPT; |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const CONFIG_PROMPT = ` | ||
umi config 命令用于查看或修改配置,有以下功能: | ||
- 传递 list 参数,列举当前项目所有配置 | ||
- 传递 get,配置名,两个参数查看该配置的具体值 | ||
- 传递 set,配置名,配置值,三个参数修改配置 | ||
- 传递 remove,配置名,配置值,三个参数去除配置 | ||
配置的ts类型如下,类型属性对应配置名: | ||
\` | ||
interface IConfig { | ||
alias?: Record<string, string>; | ||
autoCSSModules?: boolean; | ||
base?: string; | ||
/** copy file to dist */ | ||
copy?: { from: string; to: string; }[] | string[]; | ||
cssLoader?: { [key: string]: any }; | ||
cssMinifier?: "esbuild" | "none" | "cssnano" | "pacelCSS"; | ||
define?: { [key: string]: any }; | ||
depTranspiler?: "babel" | "swc" | "esbuild" | "none"; | ||
/** change source-map type */ | ||
devtool: 'eval'|'eval-cheap-source-map'|'eval-cheap-module-source-map'|'eval-source-map'|'cheap-source-map'|'cheap-module-source-map'|'source-map'|'inline-cheap-source-map'|'inline-cheap-module-source-map'|'inline-source-map'; | ||
hash?: boolean; | ||
ignoreMomentLocale?: boolean; | ||
jsMinifier?: "swc" | "esbuild" | "none" | "terser" | "uglifyJs"; | ||
jsMinifierOptions?: { [key: string]: any }; | ||
lessLoader?: { lessOptions: any }; | ||
mfsu?: {} | false; | ||
outputPath?: string; | ||
polyfill?: any; | ||
publicPath?: string; | ||
sassLoader?: { [key: string]: any }; | ||
targets?: { [key: string]: any }; | ||
writeToDisk?: boolean; | ||
babelLoaderCustomize?: string; | ||
esbuildMinifyIIFE?: boolean; | ||
} | ||
\` | ||
基于以上知识,根据我的要求,返回我应该使用的命令,只需返回这条命令,不包括任何其他信息,不做任何提示 | ||
`; | ||
export default CONFIG_PROMPT; |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const DEV_PROMPT = ` | ||
umi dev 命令用于启动本地开发服务器.有以下功能: | ||
- 通过PORT 环境变量指定开发服务器启动指定端口 | ||
- 通过MOCK 环境变量为none,来去除mock | ||
环境变量的使用方法是在命令之前加入环境变量,如: | ||
PORT=10 umi dev | ||
MOCK=none umi dev | ||
基于以上知识,根据我的要求,返回我应该使用的命令,只需返回这条命令,不包括任何其他信息,不做任何提示 | ||
`; | ||
|
||
export default DEV_PROMPT; |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const GEN_PROMPT = ` | ||
umi g 用于增量生成文件或启用功能,有以下功能: | ||
- 不加任何参数,直接执行选择 | ||
- 通过参数tsconfig,启用typescript | ||
基于以上知识,根据我的要求,返回我应该使用的命令,只需返回这条命令,不包括任何其他信息,不做任何提示 | ||
`; | ||
|
||
export default GEN_PROMPT; |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import build from './build'; | ||
import commands from './commands'; | ||
import config from './config'; | ||
import dev from './dev'; | ||
import generate from './generate'; | ||
|
||
const prompts: Record<string, string> = { | ||
commands, | ||
dev, | ||
build, | ||
generate, | ||
config, | ||
}; | ||
|
||
export default prompts; |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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