anl 1.6.4 → 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.zh.md CHANGED
@@ -6,11 +6,11 @@
6
6
 
7
7
  an-cli 是 前端命令行工具,包含以下命令:
8
8
 
9
- > `anl type`:基于 Swagger JSON 自动生成 TypeScript 类型定义和 API 请求函数的命令行工具。
9
+ - `anl type` 命令:基于 Swagger JSON 自动生成 TypeScript 类型定义和 API 请求函数的命令行工具。
10
10
 
11
- > `anl lint`: 生成 react 或 vue 项目 eslint、stylelint、prettier、commitLint、VSCode相关配置
11
+ - `anl lint` 命令: 生成 react 或 vue 项目 eslint、stylelint、prettier、commitLint、VSCode相关配置
12
12
 
13
- > `anl git`: 生成 git 本地配置,可选的的功能有 gitflow 标准分支创建、git commit messages 主题、git 自定义命令配置
13
+ - `anl git` 命令: 生成 git 本地配置,可选的的功能有 gitflow 标准分支创建、git commit messages 主题、git 自定义命令配置
14
14
 
15
15
  ## 功能特点
16
16
 
@@ -31,15 +31,23 @@ an-cli 是 前端命令行工具,包含以下命令:
31
31
  - 🔄 CommitLint 提交规范
32
32
  - 📦 VSCode 编辑器配置
33
33
 
34
+ - `anl git`
35
+ - 🔍 多种功能可选安装
36
+ - 🎨 标准 git flow 分支创建
37
+ - 🎯 符合 CommitLint 提交规范的主题自动设置
38
+ - 🔄 提供 git 自定义命令配置以及入口
39
+ - 📦 自动化生成 0 配置
40
+
34
41
  ## 安装
35
42
 
36
43
  > [!NOTE]
37
- >
38
44
  > 需要全局安装
39
45
 
40
46
  ```bash
41
47
  $ npm install anl -g
48
+ ```
42
49
 
50
+ ```bash
43
51
  $ yarn global add anl
44
52
  ```
45
53
 
@@ -50,27 +58,37 @@ $ yarn global add anl
50
58
  > 1. 如果初次使用,不清楚会产生什么结果,建议先执行命令,观察会在项目中发生什么变化,然后在结合文档,进一步修改配置,再次生成,最终达到自己理想中的样子
51
59
  > 2. 或者跟着下面步骤 一步一步做,就会有收获
52
60
 
53
- # anl type 命令
61
+ # `anl type` 命令使用说明
54
62
 
55
- ## 使用说明
63
+ > 请在项目根目录执行 `anl type` 命令
56
64
 
57
- 1. 执行命令
65
+ ## 配置文件说明
58
66
 
59
- ```bash
60
- $ anl type
61
- ```
67
+ - 首次执行 `anl type`, 命令,会在*项目根目录下*, _自动创建_ 以 `an.config.json` 为名的配置文件(手动创建也可以)初始化配置模板。
62
68
 
63
- 2. 配置文件说明
69
+ - 执行 `anl type` 命令时,会找用户项目根目录下的 `an.config.json` 配置文件,并读取其配置信息,生成对应的axios封装、配置、接口列表、接口请求及每个接口请求参数及响应的TS类型
64
70
 
65
- - 首次执行 `anl type`, 命令,会在*项目根目录下*, _自动创建_ 以 `an.config.json` 为名的配置文件(手动创建也可以)。
66
- - 执行 `anl type` 命令时,会找用户项目根目录下的 `an.config.json` 配置文件,并读取其配置信息,生成对应的axios封装、配置、接口列表、接口请求及响应类型
67
71
  - 配置文件内的配置项是可自由修改的
68
72
 
69
- 3. `an.config.json`配置项示例
73
+ - 关于 `an.config.json` 配置文件
74
+
75
+ - 配置文件必须在项目根目录下
76
+
77
+ - 配置文件名称不可更改
78
+
79
+ - 具体参数说明请看[配置项说明](#配置项说明)
80
+
81
+ - 按照自己的需要更新配置文件,然后再次执行 `anl type` 命令,会依照配置文件中的指定配置信息生成,生成对应的类型信息
82
+
83
+ > [!NOTE]
84
+ >
85
+ > 如果不清楚这些配置,可以先执行 anl type 命令,将类型先生成,然后检查项目目录,结合配置项说明,调整配置项,再次生成,逐步验证配置项目作用,完成最终配置
86
+
70
87
 
71
- - 配置文件必须在项目根目录下,不可移动位置
72
- - 配置文件名称不可更改
73
- - 具体参数说明请看[配置项说明](#配置项说明)
88
+
89
+ ## 配置项说明
90
+
91
+ #### 配置文件示例
74
92
 
75
93
  ```json
76
94
  {
@@ -101,17 +119,7 @@ $ anl type
101
119
  }
102
120
  ```
103
121
 
104
- 3. 按照自己的需要更新配置文件,然后再次执行 `anl type` 命令,会依照配置文件中的指定配置信息生成,生成对应的类型信息
105
-
106
- ```bash
107
- $ anl type
108
- ```
109
-
110
- > [!NOTE]
111
- >
112
- > 如果不清楚这些配置,可以先执行 anl type 命令,将类型先生成,然后检查项目目录,结合配置项说明,调整配置项,再次生成,最终达到想要的效果
113
-
114
- ## 配置项说明
122
+ #### 配置项说明
115
123
 
116
124
  | 配置项 | 类型 | 必填 | 说明 |
117
125
  | ------------------------ | ------------------------------------- | ---- | ---------------------------------------------------------- |
@@ -127,20 +135,20 @@ $ anl type
127
135
  | includeInterface | Array<{path: string, method: string}> | 否 | 需要包含的接口列表,如果设置了此项,则只会生成列表中的接口 |
128
136
  | excludeInterface | Array<{path: string, method: string}> | 否 | 需要排除的接口列表,如果设置了此项,则会排除列表中的接口 |
129
137
 
130
- ## 生成的文件结构
138
+ #### 配置项与生成的文件对应关系
131
139
 
132
- - 这个文件结构是根据配置文件生成的
140
+ > 文件结构是依据配置文件产生的
133
141
 
134
142
  ```
135
143
  project/
136
144
  ├── apps/
137
- │ ├── types/
145
+ │ ├── types/ # 由 saveTypeFolderPath 配置项指定
138
146
  │ │ ├── models/ # 所有类型定义文件(不包含枚举类型)
139
147
  │ │ ├── connectors/ # API 类型定义(接口定义文件)
140
- │ │ └── enums/ # 枚举类型定义
141
- │ └── api/
148
+ │ │ └── enums/ # 枚举数据类型定义:由 saveEnumFolderPath 配置项指定
149
+ │ └── api/ # 请求文件:由 saveApiListFolderPath 配置项指定
142
150
  │ ├── fetch.ts # 请求方法实现
143
- │ └── index.ts # API 请求函数
151
+ │ └── index.ts # API 请求函数列表
144
152
  ```
145
153
 
146
154
  ## 生成的代码示例
@@ -0,0 +1,89 @@
1
+
2
+ const types = {
3
+ features: {
4
+ description: '一项新功能',
5
+ title: 'Features',
6
+ emoji: '💡',
7
+ subject: 'feat',
8
+ },
9
+ bugfix: {
10
+ description: '一个错误修复(开发/测试环境)',
11
+ title: 'Bug Fixes',
12
+ emoji: '🐛',
13
+ subject: 'fix',
14
+ },
15
+ hotfix: {
16
+ description: '一个错误修复(生产环境)',
17
+ title: 'Hot Fixes',
18
+ emoji: '🔥',
19
+ subject: 'fix',
20
+ },
21
+ chore: {
22
+ description: "日常工作、杂项",
23
+ title: 'Chores',
24
+ emoji: '💻',
25
+ subject: 'chore',
26
+ },
27
+ config: {
28
+ description: '配置相关更改',
29
+ title: 'Configuration',
30
+ emoji: '🛠️',
31
+ subject: 'config',
32
+ },
33
+ style: {
34
+ description: '不影响代码意义的变更(空白、格式、缺少分号等)或者样式文件更改(css、less、scss、sass、stylus、styl)',
35
+ title: 'Styles',
36
+ emoji: '💎',
37
+ subject: 'style',
38
+ },
39
+ refactor: {
40
+ description: '代码更改既未修复错误也未添加功能(代码重构)',
41
+ title: 'Code Refactoring',
42
+ emoji: '🛸',
43
+ subject: 'refactor',
44
+ },
45
+ performance: {
46
+ description: '性能优化,提高性能(优化代码)',
47
+ title: 'Performance Improvements',
48
+ emoji: '🚀',
49
+ subject: 'perf',
50
+ },
51
+ revert: {
52
+ description: '撤销之前的提交',
53
+ title: 'Reverts',
54
+ emoji: '💣',
55
+ subject: 'revert',
56
+ },
57
+ document: {
58
+ description: '文档相关更改(README.md、CHANGELOG.md)',
59
+ title: 'Documentation',
60
+ emoji: '📚',
61
+ subject: 'docs',
62
+ },
63
+ test: {
64
+ description: '添加缺失的测试或纠正现有测试(测试代码)',
65
+ title: 'Tests',
66
+ emoji: '🪤',
67
+ subject: 'test',
68
+ },
69
+ cicd: {
70
+ description: '更改CI / CD配置文件和脚本(示例范围:Travis、Circle、BrowserStack、SauceLabs)',
71
+ title: 'Continuous Integrations',
72
+ emoji: '💿',
73
+ subject: 'ci',
74
+ },
75
+ build: {
76
+ description: '影响构建系统或外部依赖项的更改(例如范围:gulp、broccoli、npm、webpack、rollup、vite、esbuild、webpack)',
77
+ title: 'Builds',
78
+ emoji: '📦',
79
+ subject: 'build',
80
+ },
81
+ release: {
82
+ description: '发布版本',
83
+ title: 'Releases',
84
+ emoji: '🎉',
85
+ subject: 'release',
86
+ },
87
+ }
88
+
89
+ module.exports = { types };
@@ -0,0 +1,2 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -0,0 +1,18 @@
1
+ [alias]
2
+ nb = "!f() { SCRIPT_DIR=\"$(git rev-parse --show-toplevel)/.gitscripts\"; if [ \"$OS\" = \"Windows_NT\" ]; then \"$SCRIPT_DIR/random-branch.bat\" \"$@\"; else bash \"$SCRIPT_DIR/random-branch.sh\" \"$@\"; fi; }; f"
3
+
4
+ # 删除已合并的本地分支,排除 stage、develop 和 release/* 分支
5
+ rmm = "!git branch --merged | grep -v '\\*\\|stage\\|develop\\|release/' | xargs -n 1 git branch -d"
6
+
7
+ # 强制删除所有本地分支(已合并和未合并),排除 stage、develop 和 release/* 分支
8
+ rma = "!git branch | grep -v '\\*\\|stage\\|develop\\|release/' | xargs -n 1 git branch -D"
9
+
10
+ # 将 develop 分支覆盖到 stage 分支
11
+ ovstage = "!f() { git checkout stage && git fetch origin && git reset --hard origin/develop && git push -f origin stage; }; f"
12
+
13
+ # 将 develop 分支覆盖到 uat 分支
14
+ ovuat = "!f() { git checkout uat && git fetch origin && git reset --hard origin/develop && git push -f origin uat; }; f"
15
+
16
+
17
+ [log]
18
+ date = format:%Y-%m-%d %H:%M:%S
@@ -0,0 +1,58 @@
1
+ #!/bin/sh
2
+
3
+ # 设置字符编码
4
+ export LANG=zh_CN.UTF-8
5
+ export LC_ALL=zh_CN.UTF-8
6
+
7
+ # 获取当前分支名称
8
+ BRANCH_NAME=$(git symbolic-ref --short HEAD)
9
+
10
+ # 提取分支前缀
11
+ BRANCH_PREFIX=$(echo "$BRANCH_NAME" | cut -d'/' -f1)
12
+
13
+ # 读取提交信息
14
+ COMMIT_MSG_FILE=$1
15
+ COMMIT_MSG=$(cat "$COMMIT_MSG_FILE")
16
+
17
+ # 仓库根目录
18
+ REPO_ROOT=$(git rev-parse --show-toplevel)
19
+
20
+ # 从脚本获取 {emoji, subject}(JSON)
21
+ META=$(node "$REPO_ROOT/.githooks/get-commit-emoji.js" "$BRANCH_PREFIX")
22
+
23
+ EMOJI=$(printf "%s" "$META" | node -e 'const fs=require("fs");try{const m=JSON.parse(fs.readFileSync(0,"utf8"));process.stdout.write(m.emoji||"");}catch(e){process.stdout.write("")}' )
24
+ SUBJECT_TYPE=$(printf "%s" "$META" | node -e 'const fs=require("fs");try{const m=JSON.parse(fs.readFileSync(0,"utf8"));process.stdout.write(m.subject||"");}catch(e){process.stdout.write("")}' )
25
+
26
+ # 如果 subject 为空但拿到了 emoji,则根据 emoji 反查 subject 作为回退
27
+ if [ -z "$SUBJECT_TYPE" ] && [ -n "$EMOJI" ]; then
28
+ SUBJECT_TYPE=$(node -e "const t=require(process.argv[1]).types; const e=process.argv[2]; for (const k in t){ if((t[k].emoji||'')===e){ process.stdout.write(t[k].subject||''); break; } }" "$REPO_ROOT/.commit-type.js" "$EMOJI")
29
+ fi
30
+
31
+ # 去除已存在的前缀(例如:features: 或 feat: 等),并去除前后空白
32
+ RAW_MSG=$(printf "%s" "$COMMIT_MSG" | sed -E "s/^[^::]+[::][[:space:]]*//" | sed -E 's/^[[:space:]]+|[[:space:]]+$//g')
33
+
34
+ # 构造新的提交信息:subject: message emoji(使用英文冒号+空格,emoji 后置)
35
+ if [ -n "$SUBJECT_TYPE" ]; then
36
+ NEW_MSG="${SUBJECT_TYPE}: ${RAW_MSG}"
37
+ else
38
+ NEW_MSG="$COMMIT_MSG"
39
+ fi
40
+
41
+ if [ -n "$EMOJI" ]; then
42
+ NEW_MSG="${NEW_MSG} ${EMOJI}"
43
+ fi
44
+
45
+ printf "%s" "$NEW_MSG" > "$COMMIT_MSG_FILE"
46
+
47
+ # 读取更新后的提交信息
48
+ UPDATED_MSG=$(cat "$COMMIT_MSG_FILE")
49
+
50
+ # 检查主题是否为空(去除 type 与冒号后的内容)
51
+ SUBJECT=$(echo "$UPDATED_MSG" | sed -E "s/^[^::]+[::][[:space:]]*//" | tr -d '[:space:]')
52
+ if [ -z "$SUBJECT" ]; then
53
+ echo "错误:提交信息的主题不能为空"
54
+ exit 1
55
+ fi
56
+
57
+ # 最后使用 commitlint 进行其他规则检查
58
+ npx --no-install commitlint --edit "$COMMIT_MSG_FILE"
@@ -0,0 +1,16 @@
1
+
2
+ const { types } = require('../.commit-type.js');
3
+
4
+ const typeToMeta = {};
5
+
6
+ // 从 commitlint 配置中提取 type 到 emoji/subject 的映射
7
+ Object.entries(types).forEach(([type, config]) => {
8
+ typeToMeta[type] = { emoji: config.emoji || '', subject: config.subject || '' };
9
+ });
10
+
11
+ // 获取传入的分支类型
12
+ const branchType = process.argv[2];
13
+ const meta = typeToMeta[branchType] || { emoji: '', subject: '' };
14
+
15
+ // 以 JSON 输出,方便 shell 精确解析
16
+ process.stdout.write(JSON.stringify(meta));
@@ -0,0 +1,10 @@
1
+ const { types } = require('../.commit-type.js');
2
+
3
+ const output = Object.entries(types).map(([type, config]) => ({
4
+ type,
5
+ description: config.description,
6
+ emoji: config.emoji,
7
+ }));
8
+
9
+
10
+ console.log(JSON.stringify(output));
@@ -0,0 +1,97 @@
1
+ @echo off
2
+ setlocal EnableDelayedExpansion
3
+
4
+ :: 获取脚本所在目录的绝对路径
5
+ set "SCRIPT_DIR=%~dp0"
6
+
7
+ :: 检查 jq 是否已安装
8
+ where jq >nul 2>nul
9
+ if errorlevel 1 (
10
+ echo 错误:未找到 jq 命令。请先安装 jq。
11
+ echo 可以使用以下命令安装:
12
+ echo Windows ^(Chocolatey^): choco install jq
13
+ echo Windows ^(Scoop^): scoop install jq
14
+ echo 或者从以下地址下载:
15
+ echo https://stedolan.github.io/jq/download/
16
+ exit /b 1
17
+ )
18
+
19
+ :: 使用 Node.js 读取配置文件
20
+ for /f "delims=" %%i in ('node "%SCRIPT_DIR%get-branch-types.js"') do set "BRANCH_TYPES_JSON=%%i"
21
+
22
+ :: 如果 Node.js 命令执行失败,显示错误并退出
23
+ if errorlevel 1 (
24
+ echo 错误:无法读取分支类型配置
25
+ exit /b 1
26
+ )
27
+
28
+ :: 使用临时文件存储解析后的数据
29
+ echo %BRANCH_TYPES_JSON% | jq -r ".[].type" > "%temp%\types.txt"
30
+ echo %BRANCH_TYPES_JSON% | jq -r ".[].description" > "%temp%\descriptions.txt"
31
+ echo %BRANCH_TYPES_JSON% | jq -r ".[].emoji" > "%temp%\emojis.txt"
32
+
33
+ :: 读取数据到数组
34
+ set i=0
35
+ for /f "delims=" %%a in (%temp%\types.txt) do (
36
+ set "TYPES[!i!]=%%a"
37
+ set /a i+=1
38
+ )
39
+ set TYPE_COUNT=%i%
40
+
41
+ set i=0
42
+ for /f "delims=" %%a in (%temp%\descriptions.txt) do (
43
+ set "DESCRIPTIONS[!i!]=%%a"
44
+ set /a i+=1
45
+ )
46
+
47
+ set i=0
48
+ for /f "delims=" %%a in (%temp%\emojis.txt) do (
49
+ set "EMOJIS[!i!]=%%a"
50
+ set /a i+=1
51
+ )
52
+
53
+ :: 删除临时文件
54
+ del "%temp%\types.txt" "%temp%\descriptions.txt" "%temp%\emojis.txt"
55
+
56
+ :: 如果提供了命令行参数,直接使用它
57
+ if not "%~1"=="" (
58
+ set BRANCH_TYPE=%~1
59
+ ) else (
60
+ :: 显示选项列表
61
+ echo 请选择分支类型 (输入数字选择):
62
+ for /l %%i in (0,1,%TYPE_COUNT%) do (
63
+ if %%i lss %TYPE_COUNT% (
64
+ echo %%i. !EMOJIS[%%i]! !TYPES[%%i]!: !DESCRIPTIONS[%%i]!
65
+ )
66
+ )
67
+
68
+ :: 获取用户输入
69
+ set /p "choice=请输入选择的数字: "
70
+ set "BRANCH_TYPE=!TYPES[%choice%]!"
71
+ )
72
+
73
+ :: 生成随机后缀
74
+ set "chars=0123456789abcdefghijklmnopqrstuvwxyz"
75
+ set "RANDOM_SUFFIX="
76
+ for /L %%i in (1,1,3) do (
77
+ set /a "rand=!random! %% 36"
78
+ for %%j in (!rand!) do set "RANDOM_SUFFIX=!RANDOM_SUFFIX!!chars:~%%j,1!"
79
+ )
80
+
81
+ :: 获取当前日期
82
+ for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime /value') do set datetime=%%I
83
+ set "CURRENT_DATE=%datetime:~0,8%"
84
+
85
+ :: 创建分支名
86
+ if "%BRANCH_TYPE%"=="release" (
87
+ set "BRANCH_NAME=%BRANCH_TYPE%/%CURRENT_DATE%"
88
+ ) else (
89
+ set "BRANCH_NAME=%BRANCH_TYPE%/%CURRENT_DATE%-%RANDOM_SUFFIX%"
90
+ )
91
+
92
+ :: 创建并切换到新分支
93
+ git checkout -b "%BRANCH_NAME%"
94
+
95
+ echo 已创建并切换到新分支: %BRANCH_NAME%
96
+
97
+ endlocal
@@ -0,0 +1,102 @@
1
+ #!/bin/bash
2
+
3
+ # 获取脚本所在目录的绝对路径
4
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
+
6
+ # 检查 jq 是否已安装
7
+ if ! command -v jq &> /dev/null; then
8
+ echo "错误:未找到 jq 命令。请先安装 jq。"
9
+ echo "可以使用以下命令安装:"
10
+ echo " MacOS: brew install jq"
11
+ echo " Ubuntu/Debian: sudo apt-get install jq"
12
+ echo " CentOS/RHEL: sudo yum install jq"
13
+ echo " Windows: choco install jq"
14
+ echo " Windows: scoop install jq"
15
+ exit 1
16
+ fi
17
+
18
+ # 使用 Node.js 读取配置文件
19
+ BRANCH_TYPES_JSON=$(node "$SCRIPT_DIR/get-branch-types.js")
20
+
21
+ # 如果 Node.js 命令执行失败,显示错误并退出
22
+ if [ $? -ne 0 ]; then
23
+ echo "错误:无法读取分支类型配置"
24
+ exit 1
25
+ fi
26
+
27
+ # 替换 readarray 命令,使用 while 循环读取数组
28
+ TYPES=()
29
+ while IFS= read -r line; do
30
+ TYPES+=("$line")
31
+ done < <(echo "$BRANCH_TYPES_JSON" | jq -r '.[].type')
32
+
33
+ DESCRIPTIONS=()
34
+ while IFS= read -r line; do
35
+ DESCRIPTIONS+=("$line")
36
+ done < <(echo "$BRANCH_TYPES_JSON" | jq -r '.[].description')
37
+
38
+ EMOJIS=()
39
+ while IFS= read -r line; do
40
+ EMOJIS+=("$line")
41
+ done < <(echo "$BRANCH_TYPES_JSON" | jq -r '.[].emoji')
42
+
43
+ # 始终弹出分支类型选择
44
+ # 删除参数作为分支类型的逻辑
45
+ # 弹出类型选择
46
+ index=0
47
+ while true; do
48
+ for i in "${!TYPES[@]}"; do
49
+ if [ "$i" -eq "$index" ]; then
50
+ tput setaf 2 # 设置绿色
51
+ echo "> ${EMOJIS[$i]} ${TYPES[$i]}: ${DESCRIPTIONS[$i]}"
52
+ tput sgr0 # 重置颜色
53
+ else
54
+ echo " ${EMOJIS[$i]} ${TYPES[$i]}: ${DESCRIPTIONS[$i]}"
55
+ fi
56
+ done
57
+
58
+ # 读取用户输入
59
+ read -rsn1 input
60
+ case "$input" in
61
+ $'\x1b') # 处理箭头键
62
+ read -rsn2 input
63
+ if [ "$input" == "[A" ]; then
64
+ ((index--))
65
+ if [ "$index" -lt 0 ]; then
66
+ index=$((${#TYPES[@]} - 1))
67
+ fi
68
+ elif [ "$input" == "[B" ]; then
69
+ ((index++))
70
+ if [ "$index" -ge "${#TYPES[@]}" ]; then
71
+ index=0
72
+ fi
73
+ fi
74
+ ;;
75
+ "") # 回车键确认选择
76
+ BRANCH_TYPE=${TYPES[$index]}
77
+ break
78
+ ;;
79
+ esac
80
+ tput cuu ${#TYPES[@]} # 光标上移
81
+ tput el # 清除行
82
+
83
+ done
84
+
85
+ # 判断参数,决定分支名后缀
86
+ if [ $# -eq 1 ]; then
87
+ SUFFIX="$1"
88
+ else
89
+ SUFFIX=$(openssl rand -hex 8 | tr -dc 'a-z0-9' | head -c 3)
90
+ fi
91
+
92
+ # 生成分支名
93
+ if [ "$BRANCH_TYPE" = "release" ]; then
94
+ BRANCH_NAME="${BRANCH_TYPE}/$(date +%Y%m%d)"
95
+ else
96
+ BRANCH_NAME="${BRANCH_TYPE}/$(date +%Y%m%d)-${SUFFIX}"
97
+ fi
98
+
99
+ # 创建并切换到新分支
100
+ git checkout -b "$BRANCH_NAME"
101
+
102
+ echo "已创建并切换到新分支: $BRANCH_NAME"
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.6.4",i="FE command line tool",s="bin/an-cli.js",p={dev:"rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript -w",build:"rimraf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",pub:"bash publish.sh",ts:"tsc ./src/int.ts --noEmit --watch",blink:"npm run build && npm link","sync-docs":"node scripts/sync-docs.js"},l={anl:"bin/an-cli.js"},o="Gleason <bianliuzhu@gmail.com>",t={"@commitlint/cli":"^17.4.3","@commitlint/config-conventional":"^17.4.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","@rollup/plugin-typescript":"^8.3.0","@types/inquirer":"^9.0.7","@types/shelljs":"^0.8.11","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","cross-env":"^7.0.3",eslint:"^8.7.0",husky:"^8.0.3","openapi-types":"^12.1.3",prettier:"^3.3.2",rimraf:"^5.0.7",rollup:"^2.64.0","rollup-plugin-cleandir":"^2.0.0","rollup-plugin-copy":"^3.5.0","rollup-plugin-terser":"^7.0.2",typescript:"^4.5.4"},r={"app-root-path":"^3.1.0",cac:"^6.7.12",chalk:"4.*","clear-console":"^1.1.0",commander:"14.0.1",figures:"^6.1.0",inquirer:"^10.1.8","log-symbols":"^5.1.0",ora:"5.*","progress-estimator":"^0.3.0",shelljs:"^0.8.5"},n=["typescript","cli","typescript 脚手架","ts 脚手架","ts-cli","脚手架"],c=["package.json","README.md","lib","template"],u={type:"git",url:"https://github.com/bianliuzhu/an-cli.git"},a="commonjs",m={name:"anl",version:e,description:i,main:s,scripts:p,bin:l,author:o,license:"ISC",devDependencies:t,dependencies:r,keywords:n,files:c,repository:u,type:a};exports.author=o,exports.bin=l,exports.default=m,exports.dependencies=r,exports.description=i,exports.devDependencies=t,exports.files=c,exports.keywords=n,exports.license="ISC",exports.main=s,exports.name="anl",exports.repository=u,exports.scripts=p,exports.type=a,exports.version=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e="1.6.5",i="FE command line tool",s="bin/an-cli.js",p={dev:"rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript -w",build:"rimraf lib && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",pub:"bash publish.sh",ts:"tsc ./src/int.ts --noEmit --watch",blink:"npm run build && npm link","sync-docs":"node scripts/sync-docs.js"},l={anl:"bin/an-cli.js"},o="Gleason <bianliuzhu@gmail.com>",t={"@commitlint/cli":"^17.4.3","@commitlint/config-conventional":"^17.4.3","@rollup/plugin-commonjs":"^21.0.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.1.3","@rollup/plugin-typescript":"^8.3.0","@types/inquirer":"^9.0.7","@types/shelljs":"^0.8.11","@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","cross-env":"^7.0.3",eslint:"^8.7.0",husky:"^8.0.3","openapi-types":"^12.1.3",prettier:"^3.3.2",rimraf:"^5.0.7",rollup:"^2.64.0","rollup-plugin-cleandir":"^2.0.0","rollup-plugin-copy":"^3.5.0","rollup-plugin-terser":"^7.0.2",typescript:"^4.5.4"},r={"app-root-path":"^3.1.0",cac:"^6.7.12",chalk:"4.*","clear-console":"^1.1.0",commander:"14.0.1",figures:"^6.1.0",inquirer:"^10.1.8","log-symbols":"^5.1.0",ora:"5.*","progress-estimator":"^0.3.0",shelljs:"^0.8.5"},n=["typescript","cli","typescript 脚手架","ts 脚手架","ts-cli","脚手架"],c=["package.json","README.md","lib","template"],u={type:"git",url:"https://github.com/bianliuzhu/an-cli.git"},a="commonjs",m={name:"anl",version:e,description:i,main:s,scripts:p,bin:l,author:o,license:"ISC",devDependencies:t,dependencies:r,keywords:n,files:c,repository:u,type:a};exports.author=o,exports.bin=l,exports.default=m,exports.dependencies=r,exports.description=i,exports.devDependencies=t,exports.files=c,exports.keywords=n,exports.license="ISC",exports.main=s,exports.name="anl",exports.repository=u,exports.scripts=p,exports.type=a,exports.version=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anl",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "FE command line tool",
5
5
  "main": "bin/an-cli.js",
6
6
  "scripts": {