Compare commits

...

156 Commits

Author SHA1 Message Date
xiaojunnuo
9933afc8b7 v1.2.0 2023-10-27 12:39:19 +08:00
xiaojunnuo
1d89d4b0bc build: prepare to build 2023-10-27 12:37:53 +08:00
xiaojunnuo
a8a84d58d9 chore: 2023-10-27 12:37:42 +08:00
xiaojunnuo
80fee524a8 build: prepare to build 2023-10-27 12:36:01 +08:00
xiaojunnuo
4ca2ee52b7 build: prepare to build 2023-10-27 12:28:39 +08:00
xiaojunnuo
6638be81a0 chore: 2023-10-27 12:28:30 +08:00
xiaojunnuo
6ced0e5e43 chore: 2023-10-27 12:26:33 +08:00
xiaojunnuo
e36518dbe5 build: prepare to build 2023-10-27 12:26:15 +08:00
xiaojunnuo
70d8bb60e7 build: prepare to build 2023-10-27 12:21:59 +08:00
xiaojunnuo
3c919f6b23 build: prepare to build 2023-10-27 12:16:38 +08:00
xiaojunnuo
0cb566d2f3 chore: 2023-10-27 12:16:20 +08:00
xiaojunnuo
e137b6baaa chore: 2023-10-27 12:14:18 +08:00
xiaojunnuo
58faeea838 build: prepare to build 2023-10-27 12:13:47 +08:00
xiaojunnuo
47200e9f35 build: prepare to build 2023-10-27 12:10:46 +08:00
xiaojunnuo
5ad8cc668f chore: 2023-10-27 12:08:53 +08:00
xiaojunnuo
e7704171f7 Merge branch 'client_sync' into v2
# Conflicts:
#	packages/ui/certd-client/CHANGELOG.md
#	packages/ui/certd-client/package.json
#	packages/ui/certd-client/src/api/tools.ts
#	packages/ui/certd-client/src/components/index.ts
#	packages/ui/certd-client/src/main.ts
#	packages/ui/certd-client/src/plugin/fast-crud/index.tsx
#	packages/ui/certd-client/src/plugin/index.ts
#	packages/ui/certd-client/src/router/source/framework.ts
#	packages/ui/certd-client/src/store/modules/page.ts
#	packages/ui/certd-client/src/style/common.less
#	packages/ui/certd-client/src/utils/util.env.ts
#	packages/ui/certd-client/src/views/crud/form/independent/index.vue
#	packages/ui/certd-client/src/views/framework/register/index.vue
#	packages/ui/certd-client/vite.config.ts
2023-10-27 11:54:38 +08:00
xiaojunnuo
c43718652a build: prepare to build 2023-10-27 11:01:02 +08:00
GitHub Actions Bot
461a12e909 🔱: [client] sync upgrade with 5 commits [trident-sync]
build: publish success
perf: component.name局部引用无需shallowRef包裹
build: publish success
build: publish success
2023-10-26 19:24:28 +00:00
GitHub Actions Bot
afb682e3eb 🔱: [client] sync upgrade with 3 commits [trident-sync]
build: publish success
feat: 新特性,CrudOptionsPlugin
2023-10-25 19:24:07 +00:00
GitHub Actions Bot
31384fbce5 🔱: [client] sync upgrade with 2 commits [trident-sync]
perf: 优化文档搜索
2023-10-24 19:24:06 +00:00
Greper
c7cfd7a8a0 Merge pull request #23 from Jijun/Jijun-patch-1
bugfix: domain match
2023-10-09 16:58:36 +08:00
Ranger
717e50fd5c bugfix: domain match
if you have more domain like below :
aeqxiu.cn
beqxiu.cn
eqxiu.cn
then endwith will match the random domain
2023-10-09 16:50:02 +08:00
GitHub Actions Bot
2ffc7d19f1 🔱: [client] sync upgrade with 3 commits [trident-sync]
build: publish success
chore:
2023-09-26 19:24:11 +00:00
GitHub Actions Bot
d857021df5 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2023-09-23 19:24:21 +00:00
GitHub Actions Bot
2ee864ccaf 🔱: [client] sync upgrade with 3 commits [trident-sync]
chore:
build: publish success
2023-09-16 19:24:09 +00:00
GitHub Actions Bot
018dfed128 🔱: [client] sync upgrade with 4 commits [trident-sync]
build: publish success
chore:  keepName: true,
perf: table select 支持返回object对象

https://github.com/fast-crud/fast-crud/issues/241
2023-09-13 19:24:15 +00:00
GitHub Actions Bot
90e4545210 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2023-09-12 19:23:50 +00:00
GitHub Actions Bot
4a4b16b010 🔱: [client] sync upgrade with 2 commits [trident-sync]
perf: table-select支持跨页选择
2023-09-11 19:24:00 +00:00
GitHub Actions Bot
8701303012 🔱: [client] sync upgrade with 3 commits [trident-sync]
perf: dict.getNodesByValues 修改为单例模式也可以运行,无需配置prototype,优化性能
chore: 各ui支持table-select
2023-09-09 19:24:09 +00:00
GitHub Actions Bot
9788aefcc1 🔱: [client] sync upgrade with 12 commits [trident-sync]
chore: 1.16.11
chore: 1.16.10
chore:
chore:
chore:
build: publish success
perf: 组件独立使用示例

https://github.com/fast-crud/fast-crud/issues/226
perf: 导出增加 onlyShow 和 columnFilter配置

https://github.com/fast-crud/fast-crud/issues/229
Merge remote-tracking branch 'origin/main'
perf: 表单labelWidth演示

https://github.com/fast-crud/fast-crud/issues/230
perf: 翻页后自动滚动到顶部

https://github.com/fast-crud/fast-crud/issues/232
2023-09-03 19:24:05 +00:00
GitHub Actions Bot
ed08ef1604 🔱: [client] sync upgrade with 6 commits [trident-sync]
chore:
chore:
fix: 修复无法嵌套路由的bug
build: publish success
build: publish success
2023-08-21 19:24:03 +00:00
GitHub Actions Bot
adce70a5e5 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2023-08-20 19:24:13 +00:00
GitHub Actions Bot
d5978f64e1 🔱: [client] sync upgrade with 2 commits [trident-sync]
chore:
2023-08-19 19:23:55 +00:00
GitHub Actions Bot
45215debcc 🔱: [client] sync upgrade with 4 commits [trident-sync]
build: publish success
chore:
perf: 增加查看表单使用单元格组件示例

https://github.com/fast-crud/fast-crud/issues/219
2023-08-18 19:24:07 +00:00
GitHub Actions Bot
919eef55a1 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2023-08-10 19:24:03 +00:00
GitHub Actions Bot
8c529eed46 🔱: [client] sync upgrade with 2 commits [trident-sync]
chore:
2023-08-09 19:24:03 +00:00
GitHub Actions Bot
7909c2cd46 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2023-08-07 19:24:11 +00:00
GitHub Actions Bot
b1ac396bf1 🔱: [client] sync upgrade with 4 commits [trident-sync]
build: publish success
chore:
chore:
2023-08-05 19:24:03 +00:00
GitHub Actions Bot
d5eb4a1900 🔱: [client] sync upgrade with 6 commits [trident-sync]
chore:
feat: antdv4 支持
perf: 升级依赖版本
Merge remote-tracking branch 'origin/main'
chore: antdv4 start
2023-08-04 19:23:57 +00:00
GitHub Actions Bot
b8eb27441c 🔱: [client] sync upgrade with 3 commits [trident-sync]
Merge remote-tracking branch 'origin/main'
feat: 重构search,支持search.validatedForm直接修改查询表单数据,修复tab变化后清空查询表单的bug

https://github.com/fast-crud/fast-crud/issues/215
2023-08-03 19:24:08 +00:00
GitHub Actions Bot
de1494710a 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2023-07-24 19:24:03 +00:00
GitHub Actions Bot
e3b05ac77f 🔱: [client] sync upgrade with 3 commits [trident-sync]
build: publish success
refactor: fs-images-format images prop define
2023-07-23 19:24:04 +00:00
GitHub Actions Bot
32c8e9482c 🔱: [client] sync upgrade with 2 commits [trident-sync]
fix: 修复hello world 返回数据格式错误
2023-07-10 19:24:06 +00:00
xiaojunnuo
4d3c86dba1 chore: 2023-07-10 13:57:26 +08:00
xiaojunnuo
28449c348e v1.1.6 2023-07-10 13:00:22 +08:00
xiaojunnuo
bb9cf7b93c build: prepare to build 2023-07-10 12:58:33 +08:00
xiaojunnuo
eb861083ad build: prepare to build 2023-07-10 11:56:18 +08:00
xiaojunnuo
b133505086 chore: 2023-07-10 11:56:04 +08:00
xiaojunnuo
0f0cae713a chore: 2023-07-10 11:55:47 +08:00
xiaojunnuo
56cfce86e4 chore: 2023-07-10 11:55:28 +08:00
xiaojunnuo
e950322232 fix: 修复上传证书到腾讯云失败的bug 2023-07-10 11:52:38 +08:00
xiaojunnuo
14de21ee64 refactor: doc 2023-07-06 15:18:41 +08:00
xiaojunnuo
22712eae96 refactor: doc 2023-07-06 15:14:56 +08:00
xiaojunnuo
86d1033324 refactor: doc 2023-07-06 15:13:20 +08:00
GitHub Actions Bot
b4c4dc2c2e 🔱: [client] sync upgrade with 5 commits [trident-sync]
build: publish success
chore:
chore:
perf: 优化export,支持查询导出
2023-07-04 19:24:06 +00:00
xiaojunnuo
671f0142bc refactor: doc 2023-07-04 15:03:34 +08:00
xiaojunnuo
ab4bdc7be6 refactor: doc 2023-07-04 14:56:40 +08:00
xiaojunnuo
0859e60b23 refactor: doc 2023-07-04 14:38:41 +08:00
xiaojunnuo
e69c2d8b0c refactor: doc 2023-07-04 14:38:31 +08:00
xiaojunnuo
186e058f3d refactor: doc 2023-07-04 14:37:13 +08:00
xiaojunnuo
ed5af59040 refactor: doc 2023-07-04 14:29:18 +08:00
xiaojunnuo
0da312f755 refactor: doc 2023-07-04 14:28:27 +08:00
xiaojunnuo
dc646d9a45 refactor: doc 2023-07-04 14:21:14 +08:00
xiaojunnuo
109e01bb60 refactor: doc 2023-07-04 14:19:55 +08:00
xiaojunnuo
657fad06fb refactor: doc 2023-07-04 14:14:31 +08:00
xiaojunnuo
3e014c876d refactor: doc 2023-07-04 14:12:19 +08:00
xiaojunnuo
d14dd51359 refactor: doc 2023-07-04 14:11:43 +08:00
xiaojunnuo
70f876c445 refactor: doc 2023-07-04 14:00:40 +08:00
xiaojunnuo
9d8d51d88d refactor: doc 2023-07-04 13:57:31 +08:00
xiaojunnuo
57037f20cc refactor: doc 2023-07-04 13:46:57 +08:00
xiaojunnuo
4f2f509819 refactor: doc 2023-07-04 13:06:37 +08:00
GitHub Actions Bot
474fd77970 🔱: [client] sync upgrade with 3 commits [trident-sync]
fix: 修复search.value第一次查询无效的bug

https://github.com/fast-crud/fast-crud/issues/208
build: publish success
2023-07-03 19:24:01 +00:00
xiaojunnuo
d2fad719fa refactor: cancel tip 2023-07-03 22:24:16 +08:00
xiaojunnuo
6a3955a1d6 refactor: cancel tip 2023-07-03 22:09:47 +08:00
xiaojunnuo
dceb33006a refactor: cacheControl 2023-07-03 18:19:00 +08:00
xiaojunnuo
a096a43c56 v1.1.5 2023-07-03 17:59:34 +08:00
xiaojunnuo
8114a33d20 build: prepare to build 2023-07-03 17:57:54 +08:00
xiaojunnuo
9f3adddd41 refactor: cacheControl 2023-07-03 17:57:26 +08:00
xiaojunnuo
05f74ab654 refactor: cacheControl 2023-07-03 17:43:21 +08:00
xiaojunnuo
0317118cd9 refactor: 1.1.4 2023-07-03 13:42:48 +08:00
xiaojunnuo
461de8d269 refactor: 1.1.4 2023-07-03 12:39:03 +08:00
xiaojunnuo
b258e92620 v1.1.4 2023-07-03 12:30:41 +08:00
xiaojunnuo
f6148ef1fb build: prepare to build 2023-07-03 12:25:26 +08:00
xiaojunnuo
457da594be build: prepare to build 2023-07-03 11:53:44 +08:00
xiaojunnuo
891a43ae67 perf: flush log 2023-07-03 11:53:11 +08:00
xiaojunnuo
bc65c0a786 perf: cancel task 2023-07-03 11:45:32 +08:00
xiaojunnuo
3eeb1f77aa perf: timeout 2023-07-03 11:16:46 +08:00
xiaojunnuo
91be6826b9 perf: flush logger 2023-07-03 10:54:03 +08:00
xiaojunnuo
f87eee3b9f fix: 成功图标转动的问题 2023-07-03 10:31:25 +08:00
xiaojunnuo
b4e17691c4 chore: index update fast 2023-07-03 10:29:06 +08:00
xiaojunnuo
cce372aeba chore: env config 2023-07-03 10:14:22 +08:00
xiaojunnuo
b5a8a9e08a chore: deploy 2023-07-03 10:05:50 +08:00
xiaojunnuo
35632da284 chore: deploy 2023-07-03 09:33:18 +08:00
xiaojunnuo
02a9b0d16c chore: 1.1.3 2023-07-03 09:25:52 +08:00
xiaojunnuo
d1809e0f7d v1.1.3 2023-07-03 09:22:33 +08:00
xiaojunnuo
abb4a7c0f9 build: prepare to build 2023-07-03 09:21:35 +08:00
xiaojunnuo
cd6fa8b15c chore: 1.1.2 2023-07-03 09:20:10 +08:00
xiaojunnuo
ecfcada802 v1.1.2 2023-07-03 09:18:03 +08:00
xiaojunnuo
f8ec5ae253 build: prepare to build 2023-07-03 09:16:50 +08:00
xiaojunnuo
832ba5c8fb chore: static cache 2023-07-03 09:15:52 +08:00
GitHub Actions Bot
6fda0d6896 🔱: [client] sync upgrade with 8 commits [trident-sync]
chore: 1.14.4
chore: 1.14.3
fix: export lib
chore: 1.14.2
refactor: import
refactor: import
perf: 导入支持
2023-07-02 19:23:56 +00:00
GitHub Actions Bot
a8edaf4dfa 🔱: [client] sync upgrade with 2 commits [trident-sync]
perf: 导出重构
2023-07-01 19:23:57 +00:00
GitHub Actions Bot
e11b7802c2 🔱: [client] sync upgrade with 8 commits [trident-sync]
perf: export 功能
perf: export 功能
chore: 自定义组件onChange
perf: naiveui 自定义组件支持change validation
chore:
perf: 自定义组件支持触发validation
chore:
2023-06-30 19:24:21 +00:00
GitHub Actions Bot
aa0c5972fb 🔱: [client] sync upgrade with 6 commits [trident-sync]
chore:
perf: v-model editable-row示例
chore: mock tip
fix: 修复行编辑模式下,render、conditionalRender无效的bug
fix: 修复行编辑初始化无效的bug
2023-06-29 19:24:00 +00:00
xiaojunnuo
fa8e91cdcd chore: lodash-es 2023-06-29 17:29:36 +08:00
xiaojunnuo
e5d902663b chore: lodash-es 2023-06-29 17:20:47 +08:00
xiaojunnuo
042535536e chore: pref 2023-06-29 17:19:05 +08:00
xiaojunnuo
6d3063437c chore: pref 2023-06-29 16:45:16 +08:00
xiaojunnuo
3db4d04e4c chore: pref 2023-06-29 16:42:08 +08:00
xiaojunnuo
96f9eab5cd chore: env 2023-06-29 10:34:52 +08:00
xiaojunnuo
1e641b83c1 chore: env 2023-06-29 09:31:26 +08:00
xiaojunnuo
3791d92d67 chore: token expire 2023-06-29 08:56:09 +08:00
xiaojunnuo
2bcab76f5a chore: change password 2023-06-28 23:15:37 +08:00
xiaojunnuo
f5493c542b chore: get random value 2023-06-28 22:10:52 +08:00
GitHub Actions Bot
47cb00857c 🔱: [client] sync upgrade with 2 commits [trident-sync]
chore: 1.14.1
2023-06-16 19:24:07 +00:00
GitHub Actions Bot
7904e05b4a 🔱: [client] sync upgrade with 5 commits [trident-sync]
chore: 1.14.0
chore: 1
feat: crudBinding.value.table.columns由array改成map
chore: 1
2023-06-09 19:24:11 +00:00
GitHub Actions Bot
c4fe19f2e6 🔱: [client] sync upgrade with 3 commits [trident-sync]
chore: 1.13.12
chore: 1.13.11
2023-06-08 19:24:03 +00:00
GitHub Actions Bot
9db57f0517 🔱: [client] sync upgrade with 6 commits [trident-sync]
perf: search校验失败后,refresh保持原来的formData
perf(search): validation支持

https://github.com/fast-crud/fast-crud/issues/200
chore: 增加search render示例
chore: 增加search render示例
chore: jsx文档
2023-06-07 19:24:02 +00:00
GitHub Actions Bot
164b90a22f 🔱: [client] sync upgrade with 3 commits [trident-sync]
chore: jsx文档
chore: jsx文档
2023-06-06 19:24:01 +00:00
GitHub Actions Bot
dc735a8aa2 🔱: [client] sync upgrade with 4 commits [trident-sync]
chore: 1.13.10
chore: 1.13.9
fix: 恢复search插槽
2023-05-31 19:24:04 +00:00
GitHub Actions Bot
02466ea0bd 🔱: [client] sync upgrade with 3 commits [trident-sync]
chore: 一些小优化
chore: doc
2023-05-23 19:24:05 +00:00
GitHub Actions Bot
59f22ab17e 🔱: [client] sync upgrade with 3 commits [trident-sync]
chore: 1.13.8
perf(form): 支持conditionalRender
2023-05-22 19:23:55 +00:00
GitHub Actions Bot
2db9343e0f 🔱: [client] sync upgrade with 2 commits [trident-sync]
refactor: 1.13.7
2023-05-19 19:23:53 +00:00
GitHub Actions Bot
36b3a53ab2 🔱: [client] sync upgrade with 2 commits [trident-sync]
fix: 修复rowhandle 排列不整齐的问题
2023-05-17 19:24:06 +00:00
GitHub Actions Bot
dc8c42a820 🔱: [client] sync upgrade with 4 commits [trident-sync]
refactor:  修复login页面logo错位问题
refactor:  移除fs-bpmn
refactor:  publishConfig 恢复
2023-05-15 19:24:01 +00:00
GitHub Actions Bot
2bd5d0bd8e 🔱: [client] sync upgrade with 5 commits [trident-sync]
refactor: 1.13.6
refactor: proxy
refactor: 1.13.5
refactor: tabs remove 样式
2023-05-13 19:24:08 +00:00
GitHub Actions Bot
c9ac5ae963 🔱: [client] sync upgrade with 3 commits [trident-sync]
refactor: 1.13.4
perf: 服务端过滤示例
2023-05-06 19:24:02 +00:00
GitHub Actions Bot
49487419d2 🔱: [client] sync upgrade with 3 commits [trident-sync]
fix: 修复helloworld,添加记录无效的bug
fix: 1.13.3
2023-05-04 19:24:12 +00:00
GitHub Actions Bot
508fe69cf8 🔱: [client] sync upgrade with 3 commits [trident-sync]
docs: vModel支持trim、number doc
perf: vModel支持trim、number

https://github.com/fast-crud/fast-crud/issues/182
2023-04-28 19:24:08 +00:00
GitHub Actions Bot
3e4a8f230f 🔱: [client] sync upgrade with 4 commits [trident-sync]
refactor: 1.13.2
refactor: fs-bpmn 1.0.14
refactor: fs-bpmn 1.0.14
2023-04-20 19:24:50 +00:00
GitHub Actions Bot
a62230c195 🔱: [client] sync upgrade with 3 commits [trident-sync]
fix: _index列 被conditionalRender影响的bug
refactor:
2023-04-19 19:24:05 +00:00
GitHub Actions Bot
1173fb1e90 🔱: [client] sync upgrade with 3 commits [trident-sync]
Merge remote-tracking branch 'origin/main'
perf: 优化fs-images-format 加载失败时的显示
2023-04-18 19:24:09 +00:00
GitHub Actions Bot
529648a30c 🔱: [client] sync upgrade with 3 commits [trident-sync]
refactor: bpmn 1.0.10
refactor: bpmn 1.0.9
2023-04-17 19:26:40 +00:00
GitHub Actions Bot
82b6b9ccb2 🔱: [client] sync upgrade with 2 commits [trident-sync]
refactor: fs-bpmn 1.0.8
2023-04-15 19:23:59 +00:00
GitHub Actions Bot
71244a4eb8 🔱: [client] sync upgrade with 2 commits [trident-sync]
fix: 修复 文件上传accept问题
2023-04-12 19:24:06 +00:00
GitHub Actions Bot
32fd424295 🔱: [client] sync upgrade with 3 commits [trident-sync]
refactor: 1.13.1
refactor:
2023-04-10 19:23:56 +00:00
GitHub Actions Bot
5746042d68 🔱: [client] sync upgrade with 9 commits [trident-sync]
refactor: bpmn 1.0.6
Merge remote-tracking branch 'origin/main'
refactor: bpmn 1.0.6
Merge branch 'main' of https://github.com/fast-crud/fs-admin-antdv
perf: toolbar按钮显隐配置,保存按钮,对话框样式优化
refactor: 1.13.0
refactor: 1.13.0
feat: FsComponentRender组件重构

修复选择联动示例报错的bug
2023-04-07 19:23:58 +00:00
GitHub Actions Bot
e76fb235aa 🔱: [client] sync upgrade with 4 commits [trident-sync]
refactor: 1.12.2
refactor: card layout style
perf: 新增table.conditionalRender配置,条件渲染
2023-04-06 19:24:11 +00:00
GitHub Actions Bot
47e13312b1 🔱: [client] sync upgrade with 2 commits [trident-sync]
refactor: 1.12.1
2023-04-04 19:24:00 +00:00
GitHub Actions Bot
55e05afe0e 🔱: [client] sync upgrade with 8 commits [trident-sync]
perf: 增加自定义组件示例
Merge remote-tracking branch 'origin/main'
refactor: fs-bpmn
refactor: integration fs-bpmn
refactor: 集成fs-bpmn
refactor:
refactor: 优化i18n
2023-04-03 19:24:05 +00:00
GitHub Actions Bot
aebce2f241 🔱: [client] sync upgrade with 21 commits [trident-sync]
refactor: 1.12.0
refactor: 多行查询优化
perf: 优化多行查询示例
feat(search): search支持自定义布局

search支持自定义布局,search.layout、search.collapse转移到 search.container之下。如果想使用原来的search组件,请配置search.is=fs-search-v1
refactor: 1.11.10
fix: 修复列设置显隐和禁用无效的bug
refactor: 1.11.9
refactor: 1.11.9
perf: 增加表单字段render示例
refactor: 删除无用的index
Merge remote-tracking branch 'origin/main'
refactor: circle check
refactor: circle check
refactor: 1.11.8
refactor: upload demo test
perf: 优化dict性能
refactor: debug
fix: 修复当limit=1时,上传文件删光后,再选择文件上传第一次无效的bug

https://github.com/fast-crud/fast-crud/issues/166
refactor: 1.11.7
refactor: 1.11.6
...
2023-03-31 19:24:21 +00:00
GitHub Actions Bot
aa3207fca5 🔱: [client] sync upgrade with 2 commits [trident-sync]
feat(search): search支持自定义布局

BREAKING CHANGE: search支持自定义布局,search.layout、search.collapse转移到 search.container之下。如果想使用原来的search组件,请配置search.is=fs-search-v1
2023-03-30 19:23:57 +00:00
GitHub Actions Bot
ce8df34b49 🔱: [client] sync upgrade with 3 commits [trident-sync]
refactor: 1.11.10
fix: 修复列设置显隐和禁用无效的bug
2023-03-29 19:23:55 +00:00
GitHub Actions Bot
8aa8c5d8ae 🔱: [client] sync upgrade with 5 commits [trident-sync]
refactor: 1.11.9
refactor: 1.11.9
perf: 增加表单字段render示例
refactor: 删除无用的index
2023-03-28 19:24:02 +00:00
GitHub Actions Bot
e7628bdbdd 🔱: [client] sync upgrade with 8 commits [trident-sync]
Merge remote-tracking branch 'origin/main'
refactor: circle check
refactor: circle check
refactor: 1.11.8
refactor: upload demo test
perf: 优化dict性能
refactor: debug
2023-03-24 19:24:06 +00:00
GitHub Actions Bot
b9dd4a35db 🔱: [client] sync upgrade with 2 commits [trident-sync]
fix: 修复当limit=1时,上传文件删光后,再选择文件上传第一次无效的bug

https://github.com/fast-crud/fast-crud/issues/166
2023-03-23 19:24:01 +00:00
GitHub Actions Bot
040b2e8a53 🔱: [client] sync upgrade with 11 commits [trident-sync]
refactor: 1.11.7
refactor: 1.11.6
refactor: 1.11.5
refactor: ui interface
refactor: ui interface
refactor: ui interface
refactor: 1.11.4
fix: 多级表头列设置不显示bug
fix: tabs,修复连续触发两次查询的bug

https://github.com/fast-crud/fast-crud/issues/161
perf: 文本复制组件优化
2023-03-22 19:23:53 +00:00
GitHub Actions Bot
af25254628 🔱: [client] sync upgrade with 3 commits [trident-sync]
refactor: 1.11.3
refactor: 1.11.2
2023-03-21 19:24:02 +00:00
GitHub Actions Bot
0c673a54cd 🔱: [client] sync upgrade with 2 commits [trident-sync]
refactor: docs
2023-03-19 19:23:51 +00:00
GitHub Actions Bot
9f1f36774d 🔱: [client] sync upgrade with 5 commits [trident-sync]
refactor: 1
refactor: 1.11.1
refactor: 1.11.1
perf: useFs优化,增加context:UseFsContext
2023-03-17 19:23:57 +00:00
GitHub Actions Bot
6ec697b010 🔱: [client] sync upgrade with 12 commits [trident-sync]
refactor: 1.11.0
refactor: 1.11.0
refactor: 1.11.0
refactor: 1.11.0
refactor: ts化
refactor: ts化
feat: 全面TS化
perf: 全面ts化
refactor: 继续优化ts
perf: ts定义优化
fix: 修复wangeditor无法上传视频的bug
2023-03-16 19:24:01 +00:00
GitHub Actions Bot
f344c58f26 🔱: [client] sync upgrade with 4 commits [trident-sync]
perf: DynamicallyCrudOptions 动态CrudOptions
refactor: doc cover
refactor: doc cover
2023-03-13 19:24:02 +00:00
GitHub Actions Bot
263b0fa455 🔱: [client] sync upgrade with 6 commits [trident-sync]
Merge remote-tracking branch 'origin/main'
refactor: fsRefValue初步
refactor: deploy
Merge remote-tracking branch 'origin/main'
refactor: 1.10.0
2023-03-12 19:23:59 +00:00
GitHub Actions Bot
a634c8f2d1 🔱: [client] sync upgrade with 6 commits [trident-sync]
refactor: deploy
refactor: deploy
refactor: 1.10.0
refactor: 1
perf: 增加s3示例
2023-03-11 19:23:57 +00:00
GitHub Actions Bot
336faa46b2 🔱: [client] sync upgrade with 4 commits [trident-sync]
perf: upload sdk换成aws-s3
feat: upload 支持s3 minio

https://github.com/fast-crud/fast-crud/issues/149
feat: fs-form-wrapper支持多实例

https://github.com/fast-crud/fast-crud/issues/150
2023-03-10 19:24:05 +00:00
GitHub Actions Bot
52a167c647 🔱: [client] sync upgrade with 9 commits [trident-sync]
perf: 完善文档,完善部分types
perf: 优化d.ts类型
perf: 日期增加week、month、year、quarter类型
feat: resetCrudOptions 示例
feat: tabs快捷查询组件
fix: 行编辑支持多级表头

https://github.com/fast-crud/fast-crud/issues/143
perf: antdv 增加自定义表头示例

https://github.com/fast-crud/fast-crud/issues/141
perf: 表单下方按钮支持context

https://github.com/fast-crud/fast-crud/issues/142
2023-03-09 19:24:01 +00:00
597 changed files with 8852 additions and 5639 deletions

2
.gitignore vendored
View File

@@ -1,3 +1,4 @@
./packages/core/lego
# IntelliJ project files
.vscode/
node_modules/
@@ -32,3 +33,4 @@ gen
/pnpm-lock.yaml
docker/image/workspace
/packages/core/lego

View File

@@ -3,6 +3,45 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
* 🔱: [client] sync upgrade with 2 commits [trident-sync] ([aa3207f](https://github.com/certd/certd/commit/aa3207fca5f15f7c3da789989d99c8ae7d1c4551))
### BREAKING CHANGES
* search支持自定义布局search.layout、search.collapse转移到 search.container之下。如果想使用原来的search组件请配置search.is=fs-search-v1
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
### Bug Fixes
* 修复上传证书到腾讯云失败的bug ([e950322](https://github.com/certd/certd/commit/e950322232e19d1263b8552eefa5b0150fd7864e))
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package root
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Bug Fixes
* 成功图标转动的问题 ([f87eee3](https://github.com/certd/certd/commit/f87eee3b9ff1ef9874e79a81fe0ed7104cb9ee8c))
### Performance Improvements
* cancel task ([bc65c0a](https://github.com/certd/certd/commit/bc65c0a786360c087fe95cad93ec6a87804cc5ee))
* flush log ([891a43a](https://github.com/certd/certd/commit/891a43ae6716ff98ed06643f7da2e35199ee195c))
* flush logger ([91be682](https://github.com/certd/certd/commit/91be6826b902e0f302b1a6cbdb1d24e15914c18d))
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package root
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package root
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package root

217
README.md
View File

@@ -1,139 +1,108 @@
# CertD
CertD 是一个帮助你全自动申请和部署SSL证书的工具。
CertD 是一个免费全自动申请和部署SSL证书的工具。
后缀D取自linux守护进程的命名风格意为证书守护进程。
## 特性
## 一、特性
本项目不仅支持证书申请过程自动化,还可以自动化部署证书,让你的证书永不过期。
* 全自动申请证书
* 全自动部署证书(目前支持服务器上传部署、阿里云、腾讯云等)
* 可与CI/DI工具结合使用
* 全自动申请证书(支持阿里云、腾讯云、华为云注册的域名)
* 全自动部署证书(目前支持服务器上传部署、部署到阿里云、腾讯云等)
* 支持通配符域名
* 支持多个域名打到一个证书上
* 邮件通知
* 证书自动更新
* 免费、免费、免费([阿里云单个通配符域名证书最便宜也要1800/年](https://yundun.console.aliyun.com/?p=cas#/certExtend/buy/cn-hangzhou)
## 二、在线体验
官方Demo地址自助注册后体验
https://certd.handsfree.work/
> 注意数据将不定期清理,生产使用请自行部署
> 包含敏感信息,务必自己本地部署进行生产使用
## 三、使用教程
本案例演示如何配置自动申请证书并部署到阿里云CDN然后快要到期前自动更新证书并重新部署
![演示](./doc/images/5-view.png)
![演示](./doc/images/9-start.png)
![演示](./doc/images/10-1-log.png)
![演示](./doc/images/13-3-download.png)
![演示](./doc/images/13-1-result.png)
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
-------> [点我查看详细使用步骤演示](./step.md) <--------
↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
## 四、本地docker部署
### 1. 安装docker、docker-compose
1.1 安装docker
https://docs.docker.com/engine/install/
1.2 安装docker-compose
https://docs.docker.com/compose/install/linux/
### 2. 下载docker-compose.yaml文件
```bash
mdkir certd
cd certd
wget https://github.com/certd/certd/blob/v2/docker/run/docker-compose.yaml
# 根据需要修改里面的配置
# 1.修改镜像版本号
# 2.配置数据保存路径
# 3.配置certd_auth_jwt_secret
vi docker-compose.yaml
```
> 镜像版本号与release版本号同步
https://github.com/certd/certd/releases
### 3. 运行
```bash
# 如果docker compose是插件化安装
docker compose up -d
#如果docker compose是独立安装
docker-compose up -d
```
### 4. 访问
http://your_server_ip:7001
默认账号密码admin/123456
记得修改密码
## 五、一些说明
## 免费证书申请说明
* 本项目ssl证书提供商为letencrypt
* 申请过程遵循acme协议
* 需要验证域名所有权一般有两种方式目前本项目仅支持dns-01
* http-01 在网站根目录下放置一份txt文件
* dns-01 需要给域名添加txt解析记录域名只能用这种方式
* 需要验证域名所有权一般有两种方式目前本项目仅支持dns-01
* http-01 在网站根目录下放置一份txt文件
* dns-01 需要给域名添加txt解析记录通配符域名只能用这种方式
* 证书续期:
* 实际上acme并没有续期概念。
* 我们所说的续期,其实就是按照全套流程重新申请一份新证书。
* 免费证书过期时间90天以后可能还会缩短所以自动化部署必不可少
* 设置每天自动运行当证书过期前20天会自动重新申请证书并部署
## 六、联系作者
如有疑问欢迎加入群聊请备注certd
* QQ群141236433
* 微信群:
![](https://ai.handsfree.work/images/exchange_wxqroup.png)
## 快速开始
本案例演示如何配置自动申请证书并部署到阿里云CDN然后快要到期前自动更新证书并重新部署
1. 环境准备
安装[nodejs](https://nodejs.org/zh-cn/)
2. 生成node项目
通过ui生成 https://certd.docmirror.cn/
开始生成证书,先填写域名,支持将多个域名打到一个证书上
![](./doc/step1.png)
配置证书详细信息
![](./doc/step2.png)
配置证书部署流程
![](./doc/step3.png)
配置好之后点击导出按钮导出一个node项目包
4. 运行
将导出的压缩包解压,然后执行如下命令,即可开始申请证书并部署
```
npm install
npm run certd
```
5. 执行效果
生成的证书默认会存储在 `${home}/.certd/${email}/certs/${domain}/current`目录下
```
[2021-01-08T16:15:04.681] [INFO] certd - 任务完成
[2021-01-08T16:15:04.681] [INFO] certd - ---------------------------任务结果总览--------------------------
[2021-01-08T16:15:04.682] [INFO] certd - 【更新证书】--------------------------------------- [success]
证书申请成功
[2021-01-08T16:15:04.682] [INFO] certd - 【流程1-部署到阿里云CDN】---------------------------- [success] 执行成功
[2021-01-08T16:15:04.682] [INFO] certd - └【上传到阿里云】-------------------------------- [success] 执行成功
[2021-01-08T16:15:04.682] [INFO] certd - └【部署证书到CDN】------------------------------- [success] 执行成功
```
6. 证书续期
实际上没有证书续期的概念,只有重新生成一份新的证书,然后重新部署证书
所以每天定时运行即可当证书过期日前20天时会重新申请新的证书然后执行部署任务。
7. 其他说明
证书的部署任务执行后会记录执行结果,已经成功过的不会重复执行
所以当你临时需要将证书部署到其他地方时,直接追加部署任务,然后再次运行即可
## CI/DI集成与自动续期重新部署
集成前将以上导出的node项目提交到内网git仓库或者私有git仓库由于包含敏感信息不要提交到公开git仓库
### jenkins任务
1. 创建任务
选择构建自由风格的任务
2. 配置git
配置cert-run的git地址
3. 构建触发器
配置 `H 3 * * *` 每天凌晨3点-4点执行一次
4. 构建环境
勾选 `Provide Node & npm bin/ folder to PATH`提供nodejs运行环境
如果没有此选项需要jenkins安装`nodejs`插件
5. 构建
执行shell
```
npm install --production #执行过一次之后,就可以注释掉,加快执行速度
npm run post
```
6. 构建后操作
邮件通知
配置你的邮箱地址,可以在执行失败时收到邮件通知。
## API
先列个提纲,待完善
参数示例参考https://gitee.com/certd/certd/blob/master/test/options.js
### 授权提供者
用于dns验证接口调用
#### aliyun
#### dnspod
### deploy插件
部署任务插件
#### 阿里云
##### 上传到阿里云
type = uploadCertToAliyun
##### 部署到阿里云DNS
type = deployCertToAliyunCDN
##### 部署到阿里云CLB
type = deployCertToAliyunCLB
#### 腾讯云
##### 上传到腾讯云
type = uploadCertToTencent
##### 部署到腾讯云DNS
type = deployCertToTencentDNS
##### 部署到腾讯云CLB
type = deployCertToTencentCLB
##### 部署到腾讯云TKE-ingress
type = deployCertToTencentTKEIngress
### 更多部署插件
等你来提需求
## 七、我的其他项目
* [袖手GPT](https://ai.handsfree.work/) ChatGPT国内可用无需FQ每日免费额度
* [fast-crud](https://gitee.com/fast-crud/fast-crud/) 基于vue3的crud快速开发框架
* [dev-sidecar](https://github.com/docmirror/dev-sidecar/) 直连访问github工具无需FQ解决github无法访问的问题

View File

@@ -2,8 +2,10 @@ import http from 'axios'
import fs from 'fs'
//读取 packages/core/pipline/package.json的版本号
import { default as packageJson } from './packages/core/pipeline/package.json' assert { type: "json" };
console.log("certdVersion", packageJson.version)
import {default as packageJson} from './packages/core/pipeline/package.json' assert {type: "json"};
const certdVersion = packageJson.version
console.log("certdVersion", certdVersion)
// 同步npmmirror的包
async function getPackages(directoryPath) {
@@ -28,18 +30,18 @@ async function getPackages(directoryPath) {
}
async function getAllPackages(){
async function getAllPackages() {
const base = await getPackages("./packages/core")
const plugins =await getPackages("./packages/plugins")
const plugins = await getPackages("./packages/plugins")
return base.concat(plugins)
}
async function sync(){
async function sync() {
const packages = await getAllPackages()
for(const pkg of packages){
for (const pkg of packages) {
await http({
url: `https://registry-direct.npmmirror.com/@certd/${pkg}/sync?sync_upstream=true`,
url: `http://registry-direct.npmmirror.com/@certd/${pkg}/sync?sync_upstream=true`,
method: 'PUT',
headers: {
"Content-Type": "application/json"
@@ -49,7 +51,6 @@ async function sync(){
console.log(`sync success:${pkg}`)
await sleep(1000)
}
await sleep(60000)
}
// curl -X PUT https://registry-direct.npmmirror.com/@certd/plugin-cert/sync?sync_upstream=true
@@ -86,6 +87,7 @@ async function start() {
console.log("等待60秒")
await sleep(60 * 1000)
await sync()
await sleep(60 * 1000)
await triggerBuild()
}

BIN
doc/images/1-add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

BIN
doc/images/10-1-log.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
doc/images/11-1-error.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
doc/images/11-2-error.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
doc/images/13-1-result.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
doc/images/13-2-result.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
doc/images/14-timer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
doc/images/15-1-email.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
doc/images/15-2-email.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
doc/images/3-add-access.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
doc/images/5-view.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
doc/images/6-1-add-task.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
doc/images/6-2-add-task.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
doc/images/6-3-add-task.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
doc/images/9-start.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -1,6 +1,7 @@
FROM registry.cn-shenzhen.aliyuncs.com/handsfree/node:16-alpine
EXPOSE 7001
ENV NODE_ENV production
ENV MIDWAY_SERVER_ENV production
WORKDIR /app/
#RUN npm install cross-env -g --registry=https://registry.npmmirror.com
#RUN npm install pm2 -g --registry=https://registry.npmmirror.com

View File

@@ -11,4 +11,5 @@ services: # 要拉起的服务们
- "7001:7001"
environment:
- TZ=Asia/Shanghai
- node_sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/sqlite3

View File

@@ -1,7 +1,13 @@
#!/bin/bash
set -e
echo "请先输入一个版本号(如 1.0.6)"
read version
echo "您输入的版本号是: $version"
export TAG="$version"
# 判断$CERTD_VERSION 是否存在
if [ -n "$CERTD_VERSION" ]; then
echo "CERTD_VERSION is set = $CERTD_VERSION"
else
echo "CERTD_VERSION is not set"
echo "请先输入一个版本号(如 1.0.6)"
read CERTD_VERSION
fi
echo "您输入的版本号是: $CERTD_VERSION"
sudo -E docker compose up -d

View File

@@ -1,20 +1,23 @@
version: '3.3' # 指定docker-compose 版本
services: # 要拉起的服务们
version: '3.3'
services:
certd:
# build:
# context: ./
# dockerfile: Dockerfile
# ↓↓↓↓↓ 修改镜像版本号
image: registry.cn-shenzhen.aliyuncs.com/handsfree/certd:${TAG}
# 镜像 # ↓↓↓↓↓ --- 1、 修改镜像版本号或者干脆写成latest
image: registry.cn-shenzhen.aliyuncs.com/handsfree/certd:${CERTD_VERSION}
container_name: certd # 容器名
restart: unless-stopped # 重启
volumes:
# ↓↓↓↓↓ 修改数据库以及证书存储路径
# ↓↓↓↓↓ ------------------------------------------------------- 2、 修改数据库以及证书存储路径
- /data/certd:/app/data
ports: # 端口映射
- "7001:7001"
environment:
environment: # 环境变量
- TZ=Asia/Shanghai
- certd_auth_jwt_secret=changeme
# ↑↑↑↑↑ 注意修改成你的自定义密钥
# ↑↑↑↑↑ ---------------------------------- 3、 修改成你的自定义密钥
# 设置环境变量即可自定义certd配置
# 服务端配置项见: packages/ui/certd-server/src/config/config.default.ts
# 服务端配置规则: certd_ + 配置项, 点号用_代替
# 如jwt密钥配置为 auth.jwt.secret则设置环境变量 certd_auth_jwt_secret=changeme
# 客户端配置项见: packages/ui/certd-client/.env
# 按实际名称配置环境变量即可,如: VITE_APP_API=http://localhost:7001

View File

@@ -9,5 +9,5 @@
}
},
"npmClient": "pnpm",
"version": "1.1.1"
"version": "1.2.0"
}

View File

@@ -11,12 +11,12 @@
"scripts": {
"start": "lerna bootstrap --hoist",
"i-all": "lerna link && lerna exec npm install ",
"publish": "npm run proxy && npm run prepublishOnly1 && lerna publish --conventional-commits && npm run afterpublishOnly && npm run deploy",
"publish": "npm run proxy && npm run prepublishOnly1 && lerna publish 1.2.0 --conventional-commits && npm run afterpublishOnly && npm run deploy1",
"afterpublishOnly": "",
"proxy": "npm config set proxy=http://127.0.0.1:10809",
"prepublishOnly1": "npm run before-build && lerna run build ",
"before-build": "cd ./packages/core/acme-client && time /t >build.md && git add ./build.md && git commit -m \"build: prepare to build\"",
"deploy": "node deploy.js"
"deploy1": "node deploy.js"
},
"license": "MIT",
"dependencies": {

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/publishlab/node-acme-client/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/acme-client
## [1.1.6](https://github.com/publishlab/node-acme-client/compare/v1.1.5...v1.1.6) (2023-07-10)
**Note:** Version bump only for package @certd/acme-client
## [1.1.5](https://github.com/publishlab/node-acme-client/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/acme-client
## [1.1.4](https://github.com/publishlab/node-acme-client/compare/v1.1.3...v1.1.4) (2023-07-03)
**Note:** Version bump only for package @certd/acme-client
## [1.1.3](https://github.com/publishlab/node-acme-client/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/acme-client
## [1.1.2](https://github.com/publishlab/node-acme-client/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/acme-client
## [1.1.1](https://github.com/publishlab/node-acme-client/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/acme-client

View File

@@ -1 +1 @@
15:46
12:37

View File

@@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client",
"private": false,
"author": "nmorsman",
"version": "1.1.1",
"version": "1.2.0",
"main": "src/index.js",
"types": "types",
"license": "MIT",
@@ -58,5 +58,5 @@
"bugs": {
"url": "https://github.com/publishlab/node-acme-client/issues"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -3,6 +3,37 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/pipeline
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
### Bug Fixes
* 修复上传证书到腾讯云失败的bug ([e950322](https://github.com/certd/certd/commit/e950322232e19d1263b8552eefa5b0150fd7864e))
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/pipeline
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Performance Improvements
* cancel task ([bc65c0a](https://github.com/certd/certd/commit/bc65c0a786360c087fe95cad93ec6a87804cc5ee))
* flush log ([891a43a](https://github.com/certd/certd/commit/891a43ae6716ff98ed06643f7da2e35199ee195c))
* flush logger ([91be682](https://github.com/certd/certd/commit/91be6826b902e0f302b1a6cbdb1d24e15914c18d))
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/pipeline
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/pipeline
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/pipeline

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/pipeline",
"private": false,
"version": "1.1.1",
"version": "1.2.0",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@@ -20,11 +20,10 @@
"axios": "^1.4.0",
"node-forge": "^1.3.1",
"nodemailer": "^6.9.3",
"qs": "^6.11.2",
"uuid": "^8.3.2"
"qs": "^6.11.2"
},
"devDependencies": {
"@certd/acme-client": "^1.1.1",
"@certd/acme-client": "^1.2.0",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@@ -57,5 +56,5 @@
"vite": "^4.3.8",
"vue-tsc": "^1.6.5"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -12,6 +12,7 @@ import { RegistryItem } from "../registry";
import { Decorator } from "../decorator";
import { IEmailService } from "../service";
import { FileStore } from "./file-store";
import { TimeoutPromise } from "../utils/util.promise";
export type ExecutorOptions = {
userId: any;
@@ -31,6 +32,7 @@ export class Executor {
lastStatusMap!: RunnableCollection;
lastRuntime!: RunHistory;
options: ExecutorOptions;
canceled = false;
onChanged: (history: RunHistory) => void;
constructor(options: ExecutorOptions) {
this.options = options;
@@ -50,6 +52,12 @@ export class Executor {
this.lastStatusMap = new RunnableCollection(lastRuntime?.pipeline);
}
async cancel() {
this.canceled = true;
this.runtime?.cancel(this.pipeline);
await this.onChanged(this.runtime);
}
async run(runtimeId: any = 0, triggerType: string) {
try {
await this.init();
@@ -99,17 +107,24 @@ export class Executor {
return ResultType.skip;
}
}
try {
await run();
this.runtime.success(runnable);
const intervalFlushLogId = setInterval(async () => {
await this.onChanged(this.runtime);
}, 5000);
const timeout = runnable.timeout ?? 20 * 60 * 1000;
try {
if (this.canceled) {
throw new Error("task canceled");
}
await TimeoutPromise(run, timeout);
this.runtime.success(runnable);
return ResultType.success;
} catch (e: any) {
this.runtime.error(runnable, e);
await this.onChanged(this.runtime);
throw e;
} finally {
this.runtime.finally(runnable);
clearInterval(intervalFlushLogId);
await this.onChanged(this.runtime);
}
}
@@ -174,6 +189,8 @@ export class Executor {
}
private async runStep(step: Step) {
const currentLogger = this.runtime._loggers[step.id];
const lastStatus = this.lastStatusMap.get(step.id);
//执行任务
const plugin: RegistryItem<AbstractTaskPlugin> = pluginRegistry.get(step.type);
@@ -187,7 +204,11 @@ export class Executor {
if (item.component?.name === "pi-output-selector") {
const contextKey = step.input[key];
if (contextKey != null) {
step.input[key] = this.runtime.context[contextKey];
const value = this.runtime.context[contextKey];
if (value == null) {
currentLogger.warn(`[step init] input ${define.title} is null`);
}
step.input[key] = value;
}
}
});
@@ -197,7 +218,7 @@ export class Executor {
step,
lastStatus,
http: request,
logger: this.runtime._loggers[step.id],
logger: currentLogger,
accessService: this.options.accessService,
emailService: this.options.emailService,
pipelineContext: this.pipelineContext,

View File

@@ -92,6 +92,19 @@ export class RunHistory {
this.logError(runnable, e);
}
cancel(runnable: Runnable) {
const now = new Date().getTime();
const status = runnable.status;
_.merge(status, {
status: ResultType.canceled,
endTime: now,
result: ResultType.canceled,
message: "用户取消",
});
this.log(runnable, "任务取消");
}
log(runnable: Runnable, text: string) {
// @ts-ignore
this._loggers[runnable.id].info(`[${runnable.title}]<id:${runnable.id}> [${runnable.runnableType}]`, text);

View File

@@ -66,6 +66,7 @@ export type Runnable = {
strategy?: RunnableStrategy;
runnableType?: string; // pipeline, stage, task , step
status?: HistoryResult;
timeout?: number;
default?: {
[key: string]: any;
};
@@ -87,7 +88,7 @@ export type Pipeline = Runnable & {
userId: any;
stages: Stage[];
triggers: Trigger[];
notifications: Notification[];
notifications?: Notification[];
};
export type Context = {
@@ -105,6 +106,7 @@ export enum ResultType {
start = "start",
success = "success",
error = "error",
canceled = "canceled",
skip = "skip",
none = "none",
}

View File

@@ -6,7 +6,7 @@ import { IAccessService } from "../access";
import { IEmailService } from "../service";
import { IContext } from "../core";
import { AxiosInstance } from "axios";
import { v4 as uuidv4 } from "uuid";
export enum ContextScope {
global,
pipeline,
@@ -78,16 +78,19 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
this.ctx = ctx;
}
randomFileId() {
return Math.random().toString(36).substring(2, 9);
}
linkFile(file: FileItem) {
this._result.files!.push({
...file,
id: uuidv4(),
id: this.randomFileId(),
});
}
saveFile(filename: string, file: Buffer) {
const filePath = this.ctx.fileStore.writeFile(filename, file);
this._result.files!.push({
id: uuidv4(),
id: this.randomFileId(),
filename,
path: filePath,
});

View File

@@ -8,7 +8,6 @@ import "reflect-metadata";
export const PLUGIN_CLASS_KEY = "pipeline:plugin";
export function IsTaskPlugin(define: PluginDefine): ClassDecorator {
console.log("IsTaskPlugin");
return (target: any) => {
target = Decorator.target(target);

View File

@@ -0,0 +1,13 @@
export function TimeoutPromise(callback: () => Promise<void>, ms = 30 * 1000) {
let timeout: any;
return Promise.race([
callback(),
new Promise((resolve, reject) => {
timeout = setTimeout(() => {
reject(new Error(`Task timeout in ${ms} ms`));
}, ms);
}),
]).finally(() => {
clearTimeout(timeout);
});
}

View File

@@ -3,6 +3,32 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Performance Improvements
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/plugin-aliyun

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-aliyun",
"private": false,
"version": "1.1.1",
"version": "1.2.0",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@@ -23,10 +23,10 @@
"node-forge": "^0.10.0"
},
"devDependencies": {
"@certd/acme-client": "^1.1.1",
"@certd/pipeline": "^1.1.1",
"@certd/plugin-cert": "^1.1.1",
"@certd/plugin-util": "^1.1.1",
"@certd/acme-client": "^1.2.0",
"@certd/pipeline": "^1.2.0",
"@certd/plugin-cert": "^1.2.0",
"@certd/plugin-util": "^1.2.0",
"@midwayjs/core": "^3.0.0",
"@midwayjs/decorator": "^3.0.0",
"@rollup/plugin-commonjs": "^23.0.4",
@@ -59,5 +59,5 @@
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/plugin-all
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
### Bug Fixes
* 修复上传证书到腾讯云失败的bug ([e950322](https://github.com/certd/certd/commit/e950322232e19d1263b8552eefa5b0150fd7864e))
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-all
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Performance Improvements
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-all
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-all
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/plugin-all

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-all",
"private": false,
"version": "1.1.1",
"version": "1.2.0",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@@ -17,12 +17,12 @@
"preview": "vite preview"
},
"devDependencies": {
"@certd/pipeline": "^1.1.1",
"@certd/plugin-aliyun": "^1.1.1",
"@certd/plugin-cert": "^1.1.1",
"@certd/plugin-host": "^1.1.1",
"@certd/plugin-huawei": "^1.1.1",
"@certd/plugin-tencent": "^1.1.1",
"@certd/pipeline": "^1.2.0",
"@certd/plugin-aliyun": "^1.2.0",
"@certd/plugin-cert": "^1.2.0",
"@certd/plugin-host": "^1.2.0",
"@certd/plugin-huawei": "^1.2.0",
"@certd/plugin-tencent": "^1.2.0",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@@ -48,5 +48,5 @@
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -1,6 +1,7 @@
import { IAccessService } from "@certd/pipeline";
import { EmailSend, IAccessService, IEmailService } from "@certd/pipeline";
import { AliyunAccess } from "@certd/plugin-aliyun";
import { aliyunSecret } from "../user.secret";
export class AccessServiceTest implements IAccessService {
async getById(id: any): Promise<any> {
return {
@@ -8,3 +9,10 @@ export class AccessServiceTest implements IAccessService {
} as AliyunAccess;
}
}
export class EmailServiceTest implements IEmailService {
send(email: EmailSend): Promise<void> {
console.log("send email", email);
return Promise.resolve(undefined);
}
}

View File

@@ -58,6 +58,17 @@ export const pipeline: Pipeline = {
runStrategy: RunStrategy.SkipWhenSucceed,
},
},
{
id: generateId(),
title: "上传证书到腾讯云",
type: "EchoPlugin",
input: {
cert: "cert",
},
strategy: {
runStrategy: RunStrategy.SkipWhenSucceed,
},
},
],
},
],

View File

@@ -1,7 +1,7 @@
import "mocha";
import { Executor, FileStorage, RunHistory } from "@certd/pipeline";
import { pipeline } from "./pipeline.define";
import { AccessServiceTest } from "./access-service-test";
import { AccessServiceTest, EmailServiceTest } from "./access-service-test";
import "../../src";
import "../plugin/echo-plugin";
@@ -13,7 +13,14 @@ describe("pipeline", function () {
console.log("changed:");
}
const executor = new Executor({ userId: "test", pipeline, onChanged, accessService: new AccessServiceTest(), storage: new FileStorage() });
const executor = new Executor({
userId: "test",
pipeline,
onChanged,
accessService: new AccessServiceTest(),
emailService: new EmailServiceTest(),
storage: new FileStorage(),
});
await executor.run(1, "user");
// expect(define.name).eq("EchoPlugin");
});

View File

@@ -3,6 +3,32 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/plugin-cert
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
**Note:** Version bump only for package @certd/plugin-cert
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-cert
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Performance Improvements
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-cert
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-cert
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/plugin-cert

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-cert",
"private": false,
"version": "1.1.1",
"version": "1.2.0",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@@ -17,8 +17,8 @@
"preview": "vite preview"
},
"dependencies": {
"@certd/acme-client": "^1.1.1",
"@certd/pipeline": "^1.1.1",
"@certd/acme-client": "^1.2.0",
"@certd/pipeline": "^1.2.0",
"jszip": "^3.10.1",
"node-forge": "^0.10.0"
},
@@ -57,5 +57,5 @@
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -3,6 +3,32 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/plugin-host
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
**Note:** Version bump only for package @certd/plugin-host
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-host
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Performance Improvements
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-host
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-host
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/plugin-host

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-host",
"private": false,
"version": "1.1.1",
"version": "1.2.0",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@@ -17,8 +17,8 @@
"preview": "vite preview"
},
"dependencies": {
"@certd/pipeline": "^1.1.1",
"@certd/plugin-cert": "^1.1.1",
"@certd/pipeline": "^1.2.0",
"@certd/plugin-cert": "^1.2.0",
"ssh2": "^0.8.9"
},
"devDependencies": {
@@ -57,5 +57,5 @@
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -3,6 +3,32 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/plugin-huawei
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
**Note:** Version bump only for package @certd/plugin-huawei
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-huawei
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Performance Improvements
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-huawei
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-huawei
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/plugin-huawei

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-huawei",
"private": false,
"version": "1.1.1",
"version": "1.2.0",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@@ -17,10 +17,10 @@
"preview": "vite preview"
},
"dependencies": {
"@certd/acme-client": "^1.1.1",
"@certd/pipeline": "^1.1.1",
"@certd/plugin-cert": "^1.1.1",
"@certd/plugin-util": "^1.1.1",
"@certd/acme-client": "^1.2.0",
"@certd/pipeline": "^1.2.0",
"@certd/plugin-cert": "^1.2.0",
"@certd/plugin-util": "^1.2.0",
"axios": "^0.27.2",
"dayjs": "^1.11.6",
"lodash": "^4.17.21",
@@ -59,5 +59,5 @@
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
### Bug Fixes
* 修复上传证书到腾讯云失败的bug ([e950322](https://github.com/certd/certd/commit/e950322232e19d1263b8552eefa5b0150fd7864e))
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Performance Improvements
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-tencent
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/plugin-tencent

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-tencent",
"private": false,
"version": "1.1.1",
"version": "1.2.0",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@@ -17,9 +17,9 @@
"preview": "vite preview"
},
"dependencies": {
"@certd/pipeline": "^1.1.1",
"@certd/plugin-cert": "^1.1.1",
"@certd/plugin-util": "^1.1.1",
"@certd/pipeline": "^1.2.0",
"@certd/plugin-cert": "^1.2.0",
"@certd/plugin-util": "^1.2.0",
"tencentcloud-sdk-nodejs": "^4.0.44"
},
"devDependencies": {
@@ -58,5 +58,5 @@
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -7,13 +7,20 @@ import { IsAccess, AccessInput } from "@certd/pipeline";
})
export class DnspodAccess {
@AccessInput({
title: "token",
title: "端点",
component: {
placeholder: "开放接口token",
placeholder: "endpoint",
name: "a-select",
vModel: "value",
options: [
{ value: "https://dnsapi.cn", label: "中国站" },
{ value: "https://api.dnspod.com", label: "国际站" },
],
},
rules: [{ required: true, message: "该项必填" }],
})
token = "";
endpoint = "";
@AccessInput({
title: "账户id",
component: {
@@ -22,6 +29,15 @@ export class DnspodAccess {
rules: [{ required: true, message: "该项必填" }],
})
id = "";
@AccessInput({
title: "token",
component: {
placeholder: "开放接口token",
},
rules: [{ required: true, message: "该项必填" }],
})
token = "";
}
new DnspodAccess();

View File

@@ -20,9 +20,11 @@ export class DnspodDnsProvider implements IDnsProvider {
loginToken: any;
endpoint = "";
async onInstance() {
const access: DnspodAccess = this.access as DnspodAccess;
this.loginToken = access.id + "," + access.token;
this.endpoint = access.endpoint || "https://dnsapi.cn";
}
async doRequest(options: any, successCodes: string[] = []) {
@@ -51,7 +53,7 @@ export class DnspodDnsProvider implements IDnsProvider {
async getDomainList() {
const ret = await this.doRequest({
url: "https://dnsapi.cn/Domain.List",
url: this.access.endpoint + "/Domain.List",
});
this.logger.debug("dnspod 域名列表:", ret.domains);
return ret.domains;
@@ -66,7 +68,7 @@ export class DnspodDnsProvider implements IDnsProvider {
const ret = await this.doRequest(
{
url: "https://dnsapi.cn/Record.Create",
url: this.access.endpoint + "/Record.Create",
formData: {
domain,
sub_domain: rr,
@@ -87,7 +89,7 @@ export class DnspodDnsProvider implements IDnsProvider {
const domain = await this.matchDomain(fullRecord);
const ret = await this.doRequest({
url: "https://dnsapi.cn/Record.Remove",
url: this.access.endpoint + "/Record.Remove",
formData: {
domain,
record_id: record.id,
@@ -101,7 +103,7 @@ export class DnspodDnsProvider implements IDnsProvider {
const list = await this.getDomainList();
let domain = null;
for (const item of list) {
if (_.endsWith(dnsRecord, item.name)) {
if (_.endsWith(dnsRecord, "." + item.name)) {
domain = item;
break;
}

View File

@@ -47,6 +47,17 @@ export class DeployToCdnPlugin extends AbstractTaskPlugin {
})
domainName!: string;
@TaskInput({
title: "CDN接口",
helper: "CDN接口端点",
component: {
name: "a-select",
type: "tencent",
},
required: true,
})
endpoint!: string;
accessService!: IAccessService;
logger!: ILogger;

View File

@@ -87,7 +87,7 @@ export class DeployCertToTencentTKEIngressPlugin extends AbstractTaskPlugin {
this.logger = this.ctx.logger;
}
async execute(): Promise<void> {
const accessProvider = this.accessService.getById(this.accessId);
const accessProvider = await this.accessService.getById(this.accessId);
const tkeClient = this.getTkeClient(accessProvider, this.region);
const kubeConfigStr = await this.getTkeKubeConfig(tkeClient, this.clusterId);

View File

@@ -52,7 +52,7 @@ export class UploadToTencentPlugin extends AbstractTaskPlugin {
async execute(): Promise<void> {
const { accessId, name, cert } = this;
const accessProvider = this.accessService.getById(accessId);
const accessProvider = await this.accessService.getById(accessId);
const certName = this.appendTimeSuffix(name || cert.domain);
const client = this.getClient(accessProvider);
@@ -96,7 +96,7 @@ export class UploadToTencentPlugin extends AbstractTaskPlugin {
// async rollback({ input }) {
// const { accessId } = input;
// const accessProvider = this.accessService.getById(accessId);
// const accessProvider = await this.accessService.getById(accessId);
// const client = this.getClient(accessProvider);
//
// const { tencentCertId } = context;

View File

@@ -3,6 +3,32 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
**Note:** Version bump only for package @certd/plugin-util
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
**Note:** Version bump only for package @certd/plugin-util
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-util
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Performance Improvements
* timeout ([3eeb1f7](https://github.com/certd/certd/commit/3eeb1f77aa2922f3545f3d2067f561d95621d54f))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-util
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/plugin-util
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/plugin-util

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-util",
"private": false,
"version": "1.1.1",
"version": "1.2.0",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
@@ -21,7 +21,7 @@
"shelljs": "^0.8.5"
},
"devDependencies": {
"@certd/pipeline": "^1.1.1",
"@certd/pipeline": "^1.2.0",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
@@ -44,5 +44,5 @@
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -0,0 +1,463 @@
/** @type {import('dependency-cruiser').IConfiguration} */
module.exports = {
forbidden: [
/* rules from the 'recommended' preset: */
{
name: 'no-circular',
severity: 'warn',
comment:
'This dependency is part of a circular relationship. You might want to revise ' +
'your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ',
from: {},
to: {
circular: true
}
},
{
name: 'no-orphans',
comment:
"This is an orphan module - it's likely not used (anymore?). Either use it or " +
"remove it. If it's logical this module is an orphan (i.e. it's a config file), " +
"add an exception for it in your dependency-cruiser configuration. By default " +
"this rule does not scrutinize dot-files (e.g. .eslintrc.js), TypeScript declaration " +
"files (.d.ts), tsconfig.json and some of the babel and webpack configs.",
severity: 'warn',
from: {
orphan: true,
pathNot: [
'(^|/)\\.[^/]+\\.(js|cjs|mjs|ts|json)$', // dot files
'\\.d\\.ts$', // TypeScript declaration files
'(^|/)tsconfig\\.json$', // TypeScript config
'(^|/)(babel|webpack)\\.config\\.(js|cjs|mjs|ts|json)$' // other configs
]
},
to: {},
},
{
name: 'no-deprecated-core',
comment:
'A module depends on a node core module that has been deprecated. Find an alternative - these are ' +
"bound to exist - node doesn't deprecate lightly.",
severity: 'warn',
from: {},
to: {
dependencyTypes: [
'core'
],
path: [
'^(v8\/tools\/codemap)$',
'^(v8\/tools\/consarray)$',
'^(v8\/tools\/csvparser)$',
'^(v8\/tools\/logreader)$',
'^(v8\/tools\/profile_view)$',
'^(v8\/tools\/profile)$',
'^(v8\/tools\/SourceMap)$',
'^(v8\/tools\/splaytree)$',
'^(v8\/tools\/tickprocessor-driver)$',
'^(v8\/tools\/tickprocessor)$',
'^(node-inspect\/lib\/_inspect)$',
'^(node-inspect\/lib\/internal\/inspect_client)$',
'^(node-inspect\/lib\/internal\/inspect_repl)$',
'^(async_hooks)$',
'^(punycode)$',
'^(domain)$',
'^(constants)$',
'^(sys)$',
'^(_linklist)$',
'^(_stream_wrap)$'
],
}
},
{
name: 'not-to-deprecated',
comment:
'This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later ' +
'version of that module, or find an alternative. Deprecated modules are a security risk.',
severity: 'warn',
from: {},
to: {
dependencyTypes: [
'deprecated'
]
}
},
{
name: 'no-non-package-json',
severity: 'error',
comment:
"This module depends on an npm package that isn't in the 'dependencies' section of your package.json. " +
"That's problematic as the package either (1) won't be available on live (2 - worse) will be " +
"available on live with an non-guaranteed version. Fix it by adding the package to the dependencies " +
"in your package.json.",
from: {},
to: {
dependencyTypes: [
'npm-no-pkg',
'npm-unknown'
]
}
},
{
name: 'not-to-unresolvable',
comment:
"This module depends on a module that cannot be found ('resolved to disk'). If it's an npm " +
'module: add it to your package.json. In all other cases you likely already know what to do.',
severity: 'error',
from: {},
to: {
couldNotResolve: true
}
},
{
name: 'no-duplicate-dep-types',
comment:
"Likely this module depends on an external ('npm') package that occurs more than once " +
"in your package.json i.e. bot as a devDependencies and in dependencies. This will cause " +
"maintenance problems later on.",
severity: 'warn',
from: {},
to: {
moreThanOneDependencyType: true,
// as it's pretty common to have a type import be a type only import
// _and_ (e.g.) a devDependency - don't consider type-only dependency
// types for this rule
dependencyTypesNot: ["type-only"]
}
},
/* rules you might want to tweak for your specific situation: */
{
name: 'not-to-test',
comment:
"This module depends on code within a folder that should only contain tests. As tests don't " +
"implement functionality this is odd. Either you're writing a test outside the test folder " +
"or there's something in the test folder that isn't a test.",
severity: 'error',
from: {
pathNot: '^(tests)'
},
to: {
path: '^(tests)'
}
},
{
name: 'not-to-spec',
comment:
'This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. ' +
"If there's something in a spec that's of use to other modules, it doesn't have that single " +
'responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.',
severity: 'error',
from: {},
to: {
path: '\\.(spec|test)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$'
}
},
{
name: 'not-to-dev-dep',
severity: 'error',
comment:
"This module depends on an npm package from the 'devDependencies' section of your " +
'package.json. It looks like something that ships to production, though. To prevent problems ' +
"with npm packages that aren't there on production declare it (only!) in the 'dependencies'" +
'section of your package.json. If this module is development only - add it to the ' +
'from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration',
from: {
path: '^(src)',
pathNot: '\\.(spec|test)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$'
},
to: {
dependencyTypes: [
'npm-dev'
]
}
},
{
name: 'optional-deps-used',
severity: 'info',
comment:
"This module depends on an npm package that is declared as an optional dependency " +
"in your package.json. As this makes sense in limited situations only, it's flagged here. " +
"If you're using an optional dependency here by design - add an exception to your" +
"dependency-cruiser configuration.",
from: {},
to: {
dependencyTypes: [
'npm-optional'
]
}
},
{
name: 'peer-deps-used',
comment:
"This module depends on an npm package that is declared as a peer dependency " +
"in your package.json. This makes sense if your package is e.g. a plugin, but in " +
"other cases - maybe not so much. If the use of a peer dependency is intentional " +
"add an exception to your dependency-cruiser configuration.",
severity: 'warn',
from: {},
to: {
dependencyTypes: [
'npm-peer'
]
}
}
],
options: {
/* conditions specifying which files not to follow further when encountered:
- path: a regular expression to match
- dependencyTypes: see https://github.com/sverweij/dependency-cruiser/blob/master/doc/rules-reference.md#dependencytypes-and-dependencytypesnot
for a complete list
*/
doNotFollow: {
path: 'node_modules'
},
/* conditions specifying which dependencies to exclude
- path: a regular expression to match
- dynamic: a boolean indicating whether to ignore dynamic (true) or static (false) dependencies.
leave out if you want to exclude neither (recommended!)
*/
// exclude : {
// path: '',
// dynamic: true
// },
/* pattern specifying which files to include (regular expression)
dependency-cruiser will skip everything not matching this pattern
*/
// includeOnly : '',
/* dependency-cruiser will include modules matching against the focus
regular expression in its output, as well as their neighbours (direct
dependencies and dependents)
*/
// focus : '',
/* list of module systems to cruise */
// moduleSystems: ['amd', 'cjs', 'es6', 'tsd'],
/* prefix for links in html and svg output (e.g. 'https://github.com/you/yourrepo/blob/develop/'
to open it on your online repo or `vscode://file/${process.cwd()}/` to
open it in visual studio code),
*/
// prefix: '',
/* false (the default): ignore dependencies that only exist before typescript-to-javascript compilation
true: also detect dependencies that only exist before typescript-to-javascript compilation
"specify": for each dependency identify whether it only exists before compilation or also after
*/
tsPreCompilationDeps: true,
/*
list of extensions to scan that aren't javascript or compile-to-javascript.
Empty by default. Only put extensions in here that you want to take into
account that are _not_ parsable.
*/
// extraExtensionsToScan: [".json", ".jpg", ".png", ".svg", ".webp"],
/* if true combines the package.jsons found from the module up to the base
folder the cruise is initiated from. Useful for how (some) mono-repos
manage dependencies & dependency definitions.
*/
// combinedDependencies: false,
/* if true leave symlinks untouched, otherwise use the realpath */
// preserveSymlinks: false,
/* TypeScript project file ('tsconfig.json') to use for
(1) compilation and
(2) resolution (e.g. with the paths property)
The (optional) fileName attribute specifies which file to take (relative to
dependency-cruiser's current working directory). When not provided
defaults to './tsconfig.json'.
*/
tsConfig: {
fileName: 'tsconfig.json'
},
/* Webpack configuration to use to get resolve options from.
The (optional) fileName attribute specifies which file to take (relative
to dependency-cruiser's current working directory. When not provided defaults
to './webpack.conf.js'.
The (optional) `env` and `args` attributes contain the parameters to be passed if
your webpack config is a function and takes them (see webpack documentation
for details)
*/
// webpackConfig: {
// fileName: './webpack.config.js',
// env: {},
// args: {},
// },
/* Babel config ('.babelrc', '.babelrc.json', '.babelrc.json5', ...) to use
for compilation (and whatever other naughty things babel plugins do to
source code). This feature is well tested and usable, but might change
behavior a bit over time (e.g. more precise results for used module
systems) without dependency-cruiser getting a major version bump.
*/
// babelConfig: {
// fileName: './.babelrc'
// },
/* List of strings you have in use in addition to cjs/ es6 requires
& imports to declare module dependencies. Use this e.g. if you've
re-declared require, use a require-wrapper or use window.require as
a hack.
*/
// exoticRequireStrings: [],
/* options to pass on to enhanced-resolve, the package dependency-cruiser
uses to resolve module references to disk. You can set most of these
options in a webpack.conf.js - this section is here for those
projects that don't have a separate webpack config file.
Note: settings in webpack.conf.js override the ones specified here.
*/
enhancedResolveOptions: {
/* List of strings to consider as 'exports' fields in package.json. Use
['exports'] when you use packages that use such a field and your environment
supports it (e.g. node ^12.19 || >=14.7 or recent versions of webpack).
If you have an `exportsFields` attribute in your webpack config, that one
will have precedence over the one specified here.
*/
exportsFields: ["exports"],
/* List of conditions to check for in the exports field. e.g. use ['imports']
if you're only interested in exposed es6 modules, ['require'] for commonjs,
or all conditions at once `(['import', 'require', 'node', 'default']`)
if anything goes for you. Only works when the 'exportsFields' array is
non-empty.
If you have a 'conditionNames' attribute in your webpack config, that one will
have precedence over the one specified here.
*/
conditionNames: ["import", "require", "node", "default"],
/*
The extensions, by default are the same as the ones dependency-cruiser
can access (run `npx depcruise --info` to see which ones that are in
_your_ environment. If that list is larger than what you need (e.g.
it contains .js, .jsx, .ts, .tsx, .cts, .mts - but you don't use
TypeScript you can pass just the extensions you actually use (e.g.
[".js", ".jsx"]). This can speed up the most expensive step in
dependency cruising (module resolution) quite a bit.
*/
// extensions: [".js", ".jsx", ".ts", ".tsx", ".d.ts"],
/*
If your TypeScript project makes use of types specified in 'types'
fields in package.jsons of external dependencies, specify "types"
in addition to "main" in here, so enhanced-resolve (the resolver
dependency-cruiser uses) knows to also look there. You can also do
this if you're not sure, but still use TypeScript. In a future version
of dependency-cruiser this will likely become the default.
*/
mainFields: ["main", "types"],
},
reporterOptions: {
dot: {
/* pattern of modules that can be consolidated in the detailed
graphical dependency graph. The default pattern in this configuration
collapses everything in node_modules to one folder deep so you see
the external modules, but not the innards your app depends upon.
*/
collapsePattern: 'node_modules/(@[^/]+/[^/]+|[^/]+)',
/* Options to tweak the appearance of your graph.See
https://github.com/sverweij/dependency-cruiser/blob/master/doc/options-reference.md#reporteroptions
for details and some examples. If you don't specify a theme
don't worry - dependency-cruiser will fall back to the default one.
*/
// theme: {
// graph: {
// /* use splines: "ortho" for straight lines. Be aware though
// graphviz might take a long time calculating ortho(gonal)
// routings.
// */
// splines: "true"
// },
// modules: [
// {
// criteria: { matchesFocus: true },
// attributes: {
// fillcolor: "lime",
// penwidth: 2,
// },
// },
// {
// criteria: { matchesFocus: false },
// attributes: {
// fillcolor: "lightgrey",
// },
// },
// {
// criteria: { matchesReaches: true },
// attributes: {
// fillcolor: "lime",
// penwidth: 2,
// },
// },
// {
// criteria: { matchesReaches: false },
// attributes: {
// fillcolor: "lightgrey",
// },
// },
// {
// criteria: { source: "^src/model" },
// attributes: { fillcolor: "#ccccff" }
// },
// {
// criteria: { source: "^src/view" },
// attributes: { fillcolor: "#ccffcc" }
// },
// ],
// dependencies: [
// {
// criteria: { "rules[0].severity": "error" },
// attributes: { fontcolor: "red", color: "red" }
// },
// {
// criteria: { "rules[0].severity": "warn" },
// attributes: { fontcolor: "orange", color: "orange" }
// },
// {
// criteria: { "rules[0].severity": "info" },
// attributes: { fontcolor: "blue", color: "blue" }
// },
// {
// criteria: { resolved: "^src/model" },
// attributes: { color: "#0000ff77" }
// },
// {
// criteria: { resolved: "^src/view" },
// attributes: { color: "#00770077" }
// }
// ]
// }
},
archi: {
/* pattern of modules that can be consolidated in the high level
graphical dependency graph. If you use the high level graphical
dependency graph reporter (`archi`) you probably want to tweak
this collapsePattern to your situation.
*/
collapsePattern: '^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)',
/* Options to tweak the appearance of your graph.See
https://github.com/sverweij/dependency-cruiser/blob/master/doc/options-reference.md#reporteroptions
for details and some examples. If you don't specify a theme
for 'archi' dependency-cruiser will use the one specified in the
dot section (see above), if any, and otherwise use the default one.
*/
// theme: {
// },
},
"text": {
"highlightFocused": true
},
}
}
};
// generated: dependency-cruiser@12.11.0 on 2023-03-24T14:11:38.647Z

View File

@@ -16,14 +16,10 @@ module.exports = {
tsx: true
}
},
extends: [
"plugin:vue/vue3-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier"
],
extends: ["plugin:vue/vue3-recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended", "prettier"],
rules: {
//"max-len": [0, 200, 2, { ignoreUrls: true }],
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off",
@@ -32,8 +28,6 @@ module.exports = {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
// "@typescript-eslint/no-unused-vars": [

View File

@@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [1.2.0](https://github.com/certd/certd/compare/v1.1.6...v1.2.0) (2023-10-27)
* 🔱: [client] sync upgrade with 2 commits [trident-sync] ([aa3207f](https://github.com/certd/certd/commit/aa3207fca5f15f7c3da789989d99c8ae7d1c4551))
### BREAKING CHANGES
* search支持自定义布局search.layout、search.collapse转移到 search.container之下。如果想使用原来的search组件请配置search.is=fs-search-v1
## [1.1.6](https://github.com/certd/certd/compare/v1.1.5...v1.1.6) (2023-07-10)
**Note:** Version bump only for package @certd/ui-client
## [1.1.5](https://github.com/certd/certd/compare/v1.1.4...v1.1.5) (2023-07-03)
**Note:** Version bump only for package @certd/ui-client
## [1.1.4](https://github.com/certd/certd/compare/v1.1.3...v1.1.4) (2023-07-03)
### Bug Fixes
* 成功图标转动的问题 ([f87eee3](https://github.com/certd/certd/commit/f87eee3b9ff1ef9874e79a81fe0ed7104cb9ee8c))
### Performance Improvements
* cancel task ([bc65c0a](https://github.com/certd/certd/commit/bc65c0a786360c087fe95cad93ec6a87804cc5ee))
* flush log ([891a43a](https://github.com/certd/certd/commit/891a43ae6716ff98ed06643f7da2e35199ee195c))
## [1.1.3](https://github.com/certd/certd/compare/v1.1.2...v1.1.3) (2023-07-03)
**Note:** Version bump only for package @certd/ui-client
## [1.1.2](https://github.com/certd/certd/compare/v1.1.1...v1.1.2) (2023-07-03)
**Note:** Version bump only for package @certd/ui-client
## [1.1.1](https://github.com/certd/certd/compare/v1.1.0...v1.1.1) (2023-06-28)
**Note:** Version bump only for package @certd/ui-client

View File

@@ -34,3 +34,4 @@ https://github.com/fast-crud/fs-server-js

View File

@@ -1,12 +1,12 @@
{
"name": "@certd/ui-client",
"version": "1.1.1",
"version": "1.2.0",
"private": true,
"scripts": {
"dev": "vite",
"dev:pm": "vite --mode pm",
"dev:force": "vite --force",
"debug": "vite --mode debug",
"debug": "vite --mode debug --open",
"debug:pm": "vite --mode debugpm",
"debug:force": "vite --force --mode debug",
"build": "vite build ",
@@ -15,101 +15,108 @@
"pretty-quick": "pretty-quick",
"lint-fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/",
"upgrade": "yarn upgrade-interactive --latest",
"tsc": "vue-tsc --noEmit --skipLibCheck"
"tsc": "vue-tsc --noEmit --skipLibCheck",
"circle:check": "pnpm dependency-cruise --validate --output-type err-html -f dependency-report.html src",
"afterPubPush": "git add . && git commit -m \"build: publish success\" && git push"
},
"author": "Greper",
"license": "MIT",
"dependencies": {
"@ant-design/colors": "^6.0.0",
"@ant-design/icons-vue": "^6.0.1",
"@certd/acme-client": "^1.1.1",
"@certd/pipeline": "^1.1.1",
"@fast-crud/fast-crud": "^1.13.8",
"@fast-crud/fast-extends": "^1.13.8",
"@fast-crud/ui-antdv": "^1.13.8",
"@fast-crud/ui-interface": "^1.13.8",
"@iconify/iconify": "^3.0.1",
"@iconify/json": "^2.1.151",
"@ant-design/colors": "^7.0.0",
"@ant-design/icons-vue": "^6.1.0",
"@aws-sdk/client-s3": "^3.383.0",
"@aws-sdk/s3-request-presigner": "^3.383.0",
"@fast-crud/fast-crud": "^1.18.3",
"@fast-crud/fast-extends": "^1.18.3",
"@fast-crud/ui-antdv": "^1.18.3",
"@fast-crud/ui-interface": "^1.18.3",
"@iconify/iconify": "^3.1.1",
"@iconify/json": "^2.2.98",
"@purge-icons/generated": "^0.9.0",
"@soerenmartius/vue3-clipboard": "^0.1.2",
"ant-design-vue": "^3.2.15",
"axios": "^1.2.1",
"ant-design-vue": "^3.2.20",
"axios": "^1.3.4",
"axios-mock-adapter": "^1.21.2",
"base64-js": "^1.5.1",
"better-scroll": "^2.5.0",
"china-division": "^2.4.0",
"core-js": "^3.26.1",
"cos-js-sdk-v5": "^1.4.15-beta.0",
"better-scroll": "^2.5.1",
"china-division": "^2.6.1",
"core-js": "^3.32.0",
"cos-js-sdk-v5": "^1.4.19",
"cropperjs": "^1.5.13",
"dayjs": "^1.11.7",
"deepdash-es": "5.3.5",
"highlight.js": "^11.7.0",
"dayjs": "^1.11.9",
"highlight.js": "^11.8.0",
"humanize-duration": "^3.27.3",
"lodash-es": "^4.17.21",
"mitt": "^3.0.0",
"mitt": "^3.0.1",
"nanoid": "^4.0.0",
"nprogress": "^0.2.0",
"object-assign": "^4.1.1",
"pinia": "2.0.28",
"pinia": "2.1.6",
"qiniu-js": "^3.4.1",
"sortablejs": "^1.14.0",
"vue": "^3.2.45",
"sortablejs": "^1.15.0",
"vue": "^3.3.4",
"vue-cropperjs": "^5.0.0",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.5",
"vuedraggable": "^4.0.1"
"vue-router": "^4.2.4",
"vuedraggable": "^2.24.3"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-node-resolve": "^15.0.1",
"@types/chai": "^4.3.4",
"@types/lodash": "^4.14.195",
"@certd/pipeline": "^1.2.0",
"@rollup/plugin-commonjs": "^25.0.3",
"@rollup/plugin-node-resolve": "^15.1.0",
"@types/chai": "^4.3.5",
"@types/lodash-es": "^4.17.8",
"@types/mocha": "^10.0.1",
"@types/node": "^18.11.15",
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"@vitejs/plugin-legacy": "^3.0.1",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vue/compiler-sfc": "^3.2.45",
"@vue/eslint-config-typescript": "^11.0.2",
"@vue/test-utils": "^2.2.6",
"@types/node": "^20.4.7",
"@types/nprogress": "^0.2.0",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"@vitejs/plugin-legacy": "^4.1.1",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"@vue/compiler-sfc": "^3.3.4",
"@vue/eslint-config-typescript": "^11.0.3",
"@vue/test-utils": "^2.4.1",
"autoprefixer": "^10.4.14",
"caller-path": "^4.0.0",
"chai": "^4.3.7",
"eslint": "8.29.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.26.0",
"dependency-cruiser": "^13.1.1",
"dot": "^1.1.3",
"eslint": "8.46.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.0.1",
"eslint-plugin-vue": "^9.8.0",
"esno": "^0.16.3",
"husky": "^8.0.2",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-vue": "^9.16.1",
"esno": "^0.17.0",
"husky": "^8.0.3",
"less": "^4.1.3",
"less-loader": "^11.0.0",
"lint-staged": "^13.1.0",
"postcss": "^8.4.23",
"prettier": "2.8.1",
"less-loader": "^11.1.3",
"lint-staged": "^13.2.3",
"postcss": "^8.4.27",
"prettier": "3.0.1",
"pretty-quick": "^3.1.3",
"rimraf": "^3.0.2",
"rollup": "^3.7.4",
"rollup-plugin-visualizer": "^5.8.2",
"stylelint": "^14.16.0",
"stylelint-config-prettier": "^9.0.4",
"stylelint-order": "^5.0.0",
"tailwindcss": "^3.3.2",
"rimraf": "^5.0.1",
"rollup": "^3.27.2",
"rollup-plugin-visualizer": "^5.9.2",
"stylelint": "^15.10.2",
"stylelint-config-prettier": "^9.0.5",
"stylelint-order": "^6.0.3",
"tailwindcss": "^3.3.5",
"terser": "^5.19.2",
"ts-node": "^10.9.1",
"typescript": "4.9.4",
"vite": "^4.0.1",
"typescript": "5.1.6",
"unplugin-vue-define-options": "^1.3.14",
"vite": "^4.4.8",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-optimize-persist": "^0.1.2",
"vite-plugin-package-config": "^0.1.1",
"vite-plugin-purge-icons": "^0.9.2",
"vite-plugin-theme": "^0.8.1",
"vite-plugin-windicss": "^1.8.10",
"vue-eslint-parser": "^9.1.0",
"vue-tsc": "^0.40.13",
"vite-plugin-theme": "^0.8.6",
"vite-plugin-windicss": "^1.9.0",
"vue-eslint-parser": "^9.3.1",
"vue-tsc": "^1.8.8",
"windicss": "^3.5.6"
},
"husky": {

View File

@@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1,6 @@
name,mobile
张三,18603040102
李四,18603040103
王五,18603040104
赵六,18603040105
田七,18603040106
1 name mobile
2 张三 18603040102
3 李四 18603040103
4 王五 18603040104
5 赵六 18603040105
6 田七 18603040106

View File

@@ -4,10 +4,10 @@
</a-config-provider>
</template>
<script>
<script lang="ts">
import zhCN from "ant-design-vue/es/locale/zh_CN";
import enUS from "ant-design-vue/es/locale/en_US";
import { provide, ref, nextTick } from "vue";
import { provide, ref, nextTick, getCurrentInstance } from "vue";
import { usePageStore } from "/src/store/modules/page";
import { useResourceStore } from "/src/store/modules/resource";
import { useSettingStore } from "/@/store/modules/settings";
@@ -16,7 +16,7 @@ import "dayjs/locale/en";
import dayjs from "dayjs";
export default {
name: "App",
setup() {
setup(props: any, ctx: any) {
//刷新页面方法
const routerEnabled = ref(true);
const locale = ref(zhCN);
@@ -25,7 +25,7 @@ export default {
await nextTick();
routerEnabled.value = true;
}
function localeChanged(value) {
function localeChanged(value: any) {
console.log("locale changed:", value);
if (value === "zh-cn") {
locale.value = zhCN;

View File

@@ -1,5 +1,5 @@
import axios from "axios";
import { get } from "lodash";
import { get } from "lodash-es";
import Adapter from "axios-mock-adapter";
import { errorLog, errorCreate } from "./tools";
import { env } from "/src/utils/util.env";

View File

@@ -49,13 +49,14 @@ export function responseError(data = {}, msg = "请求失败", code = 500) {
* @param {Error} error 错误对象
*/
export function errorLog(error: any) {
if (error?.response?.data?.message) {
error.message = error?.response?.data?.message;
}
// 打印到控制台
console.error("errorLog", error);
let message = error.message;
if (error.response?.data?.message) {
message = error.response.data.message;
}
// 显示提示
uiContext.get().notification.error({ message: error.message });
uiContext.get().notification.error({ message });
}
/**

View File

@@ -16,7 +16,7 @@ export default {
}
},
emits: ["update:modelValue"],
setup(props, ctx) {
setup(props:any, ctx:any) {
const options = ref<any[]>([]);
async function onCreate() {
@@ -35,7 +35,7 @@ export default {
}
onCreate();
function onChanged(value) {
function onChanged(value:any) {
ctx.emit("update:modelValue", value);
}
return {

View File

@@ -1,15 +1,18 @@
<template>
<pre class="fs-highlight hljs" v-html="highlightHTML"></pre>
<pre class="fs-highlight hljs" v-html="highlightHTMLRef"></pre>
</template>
<script>
<script lang="ts">
// 相关文档
// https://highlightjs.org/usage/
// http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
import highlight from "highlight.js";
import { ref, watch } from "vue";
import { defineComponent, Ref } from "vue";
import "../highlight-styles/github-gist.css";
import htmlFormat from "./libs/htmlFormat";
export default {
//@ts-ignore
import htmlFormat from "./libs/htmlFormat.js";
export default defineComponent({
name: "FsHighlight",
props: {
code: {
@@ -28,34 +31,31 @@ export default {
default: ""
}
},
data() {
setup(props: any, ctx: any) {
const highlightHTMLRef: Ref = ref("");
watch(
() => {
return props.code;
},
() => {
doHighlight();
},
{
immediate: true
}
);
function doHighlight() {
const code = props.formatHtml ? htmlFormat(props.code) : props.code;
highlightHTMLRef.value = (highlight as any).highlightAuto(code, [props.lang, "html", "javascript", "json", "css", "scss", "less"]).value;
}
return {
highlightHTML: ""
highlightHTMLRef,
doHighlight
};
},
watch: {
code() {
this.highlight();
}
},
mounted() {
this.highlight();
},
methods: {
highlight() {
const code = this.formatHtml ? htmlFormat(this.code) : this.code;
this.highlightHTML = highlight.highlightAuto(code, [
this.lang,
"html",
"javascript",
"json",
"css",
"scss",
"less"
]).value;
}
}
};
});
</script>
<style lang="less">

View File

@@ -4,7 +4,7 @@ import PiDnsProviderSelector from "./dns-provider-selector/index.vue";
import PiOutputSelector from "../views/certd/pipeline/pipeline/component/output-selector/index.vue";import PiEditable from "./editable.vue";
import { CheckCircleOutlined, InfoCircleOutlined, UndoOutlined } from "@ant-design/icons-vue";
export default {
install(app) {
install(app:any) {
app.component("PiContainer", PiContainer);
app.component("PiAccessSelector", PiAccessSelector);
app.component("PiEditable", PiEditable);

View File

@@ -1,20 +1,13 @@
import { createI18n } from "vue-i18n";
//
import enFsLocale from "@fast-crud/fast-crud/dist/locale/lang/en.js";
import zhFsLocale from "@fast-crud/fast-crud/dist/locale/lang/zh-cn.js";
import en from "./locale/en";
import zh from "./locale/zh_CN";
const messages = {
en: {
label: "English",
// 定义您自己的字典,但是请不要和 `fs` 重复,这样会导致 fast-crud 内部组件的翻译失效.
fs: enFsLocale.fs,
...en
},
"zh-cn": {
label: "简体中文",
// 定义您自己的字典,但是请不要和 `fs` 重复,这样会导致 fast-crud 内部组件的翻译失效.
fs: zhFsLocale.fs,
...zh
}
};

View File

@@ -1,56 +0,0 @@
<template>
<div class="fs-contentmenu-list" @click="rowClick">
<div
v-for="item in menulist"
:key="item.value"
:data-value="item.value"
class="fs-contentmenu-item"
flex="cross:center main:center"
>
<d2-icon v-if="item.icon" :name="item.icon" />
<div class="fs-contentmenu-item-title" flex-box="1">
{{ item.title }}
</div>
</div>
</div>
</template>
<script>
export default {
name: "FsContextmenuList",
props: {
menulist: {
type: Array,
default: () => []
}
},
methods: {
rowClick(event) {
let target = event.target;
while (!target.dataset.value) {
target = target.parentNode;
}
this.$emit("rowClick", target.dataset.value);
}
}
};
</script>
<style lang="less">
.fs-contentmenu-list {
.fs-contentmenu-item {
padding: 8px 20px 8px 15px;
margin: 0;
font-size: 14px;
color: #606266;
cursor: pointer;
&:hover {
background: #ecf5ff;
color: #66b1ff;
}
.fs-contentmenu-item-title {
margin-left: 10px;
}
}
}
</style>

View File

@@ -1,68 +0,0 @@
<template>
<div v-show="flag" class="fs-contextmenu" :style="style">
<slot />
</div>
</template>
<script>
export default {
name: "FsContextmenu",
props: {
visible: {
type: Boolean,
default: false
},
x: {
type: Number,
default: 0
},
y: {
type: Number,
default: 0
}
},
computed: {
flag: {
get() {
if (this.visible) {
// 注册全局监听事件 [ 目前只考虑鼠标解除触发 ]
window.addEventListener("mousedown", this.watchContextmenu);
}
return this.visible;
},
set(newVal) {
this.$emit("update:visible", newVal);
}
},
style() {
return {
left: this.x + "px",
top: this.y + "px",
display: this.visible ? "block" : "none "
};
}
},
mounted() {
// 将菜单放置到body下
document.querySelector("body").appendChild(this.$el);
},
methods: {
watchContextmenu(event) {
if (!this.$el.contains(event.target) || event.button !== 0) this.flag = false;
window.removeEventListener("mousedown", this.watchContextmenu);
}
}
};
</script>
<style>
.fs-contextmenu {
position: absolute;
padding: 5px 0;
z-index: 2018;
background: #fff;
border: 1px solid #cfd7e5;
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
</style>

View File

@@ -22,16 +22,16 @@
</a-dropdown>
</template>
<script>
<script lang="ts">
import i18n from "../../../i18n";
import { computed, inject } from "vue";
import _ from "lodash";
import _ from "lodash-es";
export default {
name: "FsLocale",
setup() {
const languages = computed(() => {
const map = i18n.global.messages?.value || {};
const list = [];
const map: any = i18n.global.messages?.value || {};
const list: any = [];
_.forEach(map, (item, key) => {
list.push({
key,
@@ -44,9 +44,9 @@ export default {
return i18n.global.locale.value;
});
const routerReload = inject("fn:router.reload");
const localeChanged = inject("fn:locale.changed");
const changeLocale = (change) => {
const routerReload: any = inject("fn:router.reload");
const localeChanged: any = inject("fn:locale.changed");
const changeLocale = (change: any) => {
i18n.global.locale.value = change.key;
routerReload();
localeChanged(change.key);

View File

@@ -1,14 +1,13 @@
import { useRoute, useRouter } from "vue-router";
import { ref, watch, onMounted, onUnmounted, resolveComponent, nextTick, defineComponent } from "vue";
import getEachDeep from "deepdash-es/getEachDeep";
import _ from "lodash";
import _ from "lodash-es";
import BScroll from "better-scroll";
import "./index.less";
const eachDeep = getEachDeep(_);
import { utils } from "@fast-crud/fast-crud";
function useBetterScroll(enabled = true) {
let bsRef = ref(null);
let asideMenuRef = ref();
const bsRef = ref(null);
const asideMenuRef = ref();
let onOpenChange = () => {};
if (enabled) {
@@ -71,7 +70,7 @@ export default defineComponent({
scroll: {}
},
setup(props, ctx) {
async function open(path) {
async function open(path: any) {
if (path == null) {
return;
}
@@ -90,23 +89,24 @@ export default defineComponent({
console.error("导航失败", e);
}
}
function onSelect(item) {
function onSelect(item: any) {
open(item.key);
}
const FsIcon = resolveComponent("FsIcon");
const fsIcon = resolveComponent("FsIcon");
const buildMenus = (children) => {
const slots = [];
const buildMenus = (children: any) => {
const slots: any = [];
if (children == null) {
return slots;
}
for (let sub of children) {
const title = () => {
for (const sub of children) {
const title: any = () => {
if (sub?.meta?.icon) {
// @ts-ignore
return (
<div class={"menu-item-title"}>
<FsIcon class={"anticon"} icon={sub.meta.icon} />
<fsIcon class={"anticon"} icon={sub.meta.icon} />
<span>{sub.title}</span>
</div>
);
@@ -147,16 +147,16 @@ export default defineComponent({
const route = useRoute();
const router = useRouter();
function openSelectedParents(fullPath) {
function openSelectedParents(fullPath: any) {
if (!props.expandSelected) {
return;
}
if (props.menus == null) {
return;
}
const keys = [];
const keys: any = [];
let changed = false;
eachDeep(props.menus, (value, key, parent, context) => {
utils.deepdash.forEachDeep(props.menus, (value: any, key: any, parent: any, context: any) => {
if (value == null) {
return;
}
@@ -170,7 +170,7 @@ export default defineComponent({
}
});
if (keys.length > 0) {
for (let key of keys) {
for (const key of keys) {
if (openKeys.value.indexOf(key) === -1) {
openKeys.value.push(key);
changed = true;
@@ -180,7 +180,7 @@ export default defineComponent({
return changed;
}
const { asideMenuRef, onOpenChange } = useBetterScroll(props.scroll);
const { asideMenuRef, onOpenChange } = useBetterScroll(props.scroll as any);
watch(
() => {

View File

@@ -5,7 +5,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent, ref, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
export default defineComponent({
@@ -23,7 +23,7 @@ export default defineComponent({
{ immediate: true }
);
const middle = "/fast-crud/fs-admin-antdv/tree/main/src/views";
function goSource(prefix) {
function goSource(prefix: any) {
const path = router.currentRoute.value.fullPath;
window.open(prefix + middle + path + "/index.vue");
}

View File

@@ -2,22 +2,8 @@
<div class="fs-multiple-page-control-group">
<div class="fs-multiple-page-control-content">
<div class="fs-multiple-page-control-content-inner">
<a-tabs
class="fs-multiple-page-control fs-multiple-page-sort"
:active-key="page.getCurrent"
type="editable-card"
hide-add
@tabClick="handleClick"
@edit="handleTabEdit"
@contextmenu="handleContextmenu"
>
<a-tab-pane
v-for="item in page.getOpened"
:key="item.fullPath"
:tab="item.meta?.title || '未命名'"
:name="item.fullPath"
:closable="isTabClosable(item)"
/>
<a-tabs class="fs-multiple-page-control fs-multiple-page-sort" :active-key="page.getCurrent" type="editable-card" hide-add @tabClick="handleClick" @edit="handleTabEdit">
<a-tab-pane v-for="item in page.getOpened" :key="item.fullPath" :tab="item.meta?.title || '未命名'" :name="item.fullPath" :closable="isTabClosable(item)" />
</a-tabs>
<!-- <fs-contextmenu v-model:visible="contextmenuFlag" :x="contentmenuX" :y="contentmenuY">-->
<!-- <fs-contextmenu-list-->
@@ -33,7 +19,7 @@
<span class="iconify" data-icon="ion:close-circle" data-inline="false"></span>
<template #icon><DownOutlined /></template>
<template #overlay>
<a-menu @click="(command) => handleControlItemClick(command)">
<a-menu @click="(command:any) => handleControlItemClick(command)">
<a-menu-item key="left">
<fs-icon name="arrow-left" class="fs-mr-10" />
关闭左侧
@@ -57,8 +43,7 @@
</div>
</template>
<script>
import Sortable from "sortablejs";
<script lang="ts">
import { usePageStore } from "../../../store/modules/page";
import { computed } from "vue";
export default {
@@ -119,14 +104,14 @@ export default {
* @description 计算某个标签页是否可关闭
* @param {Object} page 其中一个标签页
*/
isTabClosable(page) {
isTabClosable(page: any) {
return page.name !== "index";
},
/**
* @description 右键菜单功能点击
* @param {Object} event 事件
*/
handleContextmenu(event) {
handleContextmenu(event: any) {
let target = event.target;
// fix https://github.com/fs-projects/fs-admin/issues/54
let flag = false;
@@ -148,7 +133,7 @@ export default {
* @description 右键菜单的 row-click 事件
* @param {String} command 事件类型
*/
contextmenuClick(command) {
contextmenuClick(command: any) {
this.handleControlItemClick(command, this.tagName);
},
/**
@@ -156,7 +141,7 @@ export default {
* @param {String} command 事件类型
* @param {String} tagName tab 名称
*/
handleControlItemClick(command, tagName = null) {
handleControlItemClick(command: any, tagName: any = null) {
//if (tagName) this.contextmenuFlag = false;
const params = { pageSelect: tagName };
switch (command.key) {
@@ -182,9 +167,9 @@ export default {
* @param {object} tab 标签
* @param {object} event 事件
*/
handleClick(tab) {
handleClick(tab: any) {
// 找到点击的页面在 tag 列表里是哪个
const page = this.page.getOpened.find((page) => page.fullPath === tab);
const page = this.page.getOpened.find((page: any) => page.fullPath === tab);
if (page) {
const { name, params, query } = page;
this.$router.push({ name, params, query });
@@ -194,12 +179,12 @@ export default {
* @description 点击 tab 上的删除按钮触发这里
* @param {String} tagName tab 名称
*/
handleTabEdit(tagName, action) {
handleTabEdit(tagName: any, action: any) {
if (action === "remove") {
this.close({ tagName });
}
}
}
} as any
};
</script>
<style lang="less">
@@ -217,6 +202,11 @@ export default {
}
//antdv
.fs-multiple-page-control-group {
.ant-tabs-tab-remove {
display: flex;
justify-content: center;
align-items: center;
}
.ant-tabs-bar {
margin: 0;
border-bottom: 1px solid #f0f0f0;

View File

@@ -14,7 +14,7 @@
</div>
</template>
<script>
<script lang="ts">
import { defineComponent, ref } from "vue";
const colorListDefine = [
{
@@ -60,7 +60,7 @@ export default defineComponent({
emits: ["change"],
setup(props, ctx) {
const colorList = ref(colorListDefine);
function changeColor(color) {
function changeColor(color: any) {
ctx.emit("change", color);
}
return {

View File

@@ -1,23 +1,13 @@
<template>
<div class="fs-theme" @click="show()">
<fs-iconify icon="ion:sparkles-outline" />
<a-drawer
v-model:visible="visible"
title="主题设置"
placement="right"
width="350px"
:closable="false"
@after-visible-change="afterVisibleChange"
>
<fs-theme-color-picker
:primary-color="setting.getTheme.primaryColor"
@change="setting.setPrimaryColor"
></fs-theme-color-picker>
<a-drawer v-model:visible="visible" title="主题设置" placement="right" width="350px" :closable="false" @after-visible-change="afterVisibleChange">
<fs-theme-color-picker :primary-color="setting.getTheme.primaryColor" @change="setting.setPrimaryColor"></fs-theme-color-picker>
</a-drawer>
</div>
</template>
<script>
<script lang="ts">
import { ref, defineComponent } from "vue";
import FsThemeColorPicker from "./color-picker.vue";
import { useSettingStore } from "/@/store/modules/settings";

View File

@@ -10,7 +10,7 @@
</template>
</a-dropdown>
</template>
<script>
<script lang="ts">
import { defineComponent } from "vue";
import { useUserStore } from "/src/store/modules/user";
import { Modal } from "ant-design-vue";

View File

@@ -58,7 +58,7 @@
</a-layout>
</template>
<script>
<script lang="ts">
import { computed, onErrorCaptured, ref } from "vue";
import FsMenu from "./components/menu/index.jsx";
import FsLocale from "./components/locale/index.vue";
@@ -152,6 +152,11 @@ export default {
background: #f6f6f6;
display: flex;
justify-content: space-between;
> div {
height: auto;
padding: 5px;
}
}
.header-buttons {
display: flex;

View File

@@ -25,7 +25,7 @@
</div>
</div>
</template>
<script>
<script lang="ts">
export default {
name: "LayoutOutside"
};
@@ -75,7 +75,10 @@ export default {
.top {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.header {
height: 44px;
line-height: 44px;

View File

@@ -2,16 +2,19 @@ import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import Antd from "ant-design-vue";
import "ant-design-vue/dist/antd.less";
import "./style/common.less";
import "./mock";
import i18n from "./i18n";
import store from "./store";
import components from "./components";
import plugin from "./plugin/";
// 正式项目请删除mock避免影响性能
//import "./mock";
// @ts-ignore
const app = createApp(App);
// 尽量
app.use(Antd);
app.use(router);
app.use(i18n);

Some files were not shown because too many files have changed in this diff Show More