Compare commits

...

284 Commits

Author SHA1 Message Date
xiaojunnuo
b745712791 v1.20.2 2024-02-28 11:17:55 +08:00
xiaojunnuo
7ee753ac85 build: prepare to build 2024-02-28 11:14:08 +08:00
xiaojunnuo
eea6b8ab5d chore: 2024-02-28 10:36:44 +08:00
xiaojunnuo
a135f5742c Merge remote-tracking branch 'origin/client_sync' into v2
# Conflicts:
#	packages/ui/certd-client/CHANGELOG.md
#	packages/ui/certd-client/package.json
2024-02-28 10:29:12 +08:00
xiaojunnuo
04adbb45d8 build: prepare to build 2024-02-28 10:25:07 +08:00
xiaojunnuo
62efb22f37 chore: 2024-02-28 10:24:37 +08:00
xiaojunnuo
5e98f05036 build: prepare to build 2024-02-28 10:23:15 +08:00
xiaojunnuo
292a7ecbe3 chore: 2024-02-28 10:23:15 +08:00
xiaojunnuo
4cea45bd87 build: prepare to build 2024-02-28 10:11:16 +08:00
xiaojunnuo
7f0b075529 chore: 2024-02-28 10:10:47 +08:00
xiaojunnuo
8c7ff5e0e8 chore: 2024-02-28 10:06:43 +08:00
xiaojunnuo
afea5a1623 build: prepare to build 2024-02-28 10:02:13 +08:00
xiaojunnuo
c60dd7f151 build: prepare to build 2024-02-28 09:49:29 +08:00
GitHub Actions Bot
92f9371156 🔱: [client] sync upgrade with 3 commits [trident-sync]
build: publish success
fix: 修复1.20.0版本子表行編輯情況下,删除无效的bug

Closes https://github.com/fast-crud/fast-crud/issues/362
2024-02-27 19:24:07 +00:00
xiaojunnuo
c5714ec6d9 chore: 2024-02-27 21:37:42 +08:00
xiaojunnuo
dd16386317 chore: 2024-02-27 21:35:22 +08:00
xiaojunnuo
7cf1f75eb9 Merge remote-tracking branch 'origin/v2' into v2 2024-02-27 21:33:58 +08:00
xiaojunnuo
cf28a00ccd Merge remote-tracking branch 'origin/v2' into v2 2024-02-27 21:32:39 +08:00
xiaojunnuo
9e48474f11 Merge remote-tracking branch 'origin/v2' into v2 2024-02-27 21:32:38 +08:00
xiaojunnuo
c327c0c995 chore: 2024-02-27 21:31:18 +08:00
xiaojunnuo
bb567da8c6 chore: 2024-02-27 21:31:17 +08:00
GitHub Actions Bot
3e3373b8c7 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2024-01-28 19:24:14 +00:00
GitHub Actions Bot
7d45db89bf 🔱: [client] sync upgrade with 2 commits [trident-sync]
perf: 行编辑也支持排他式激活

Closes https://github.com/fast-crud/fast-crud/issues/332
2024-01-25 19:23:52 +00:00
xiaojunnuo
849c145926 fix: 临时修复阿里云domainlist接口返回域名列表不全的问题,后续还需要增加翻页查询 2024-01-03 14:11:21 +08:00
xiaojunnuo
36a773df0b chore: dns 域名查询输出域名列表 2024-01-03 11:45:58 +08:00
GitHub Actions Bot
b2abf1490b 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2023-12-15 19:24:10 +00:00
xiaojunnuo
fd5aa63ef3 v1.2.1 2023-12-12 23:43:08 +08:00
xiaojunnuo
7e024cbcf7 build: prepare to build 2023-12-12 23:41:55 +08:00
xiaojunnuo
7050ee2354 chore: 2023-12-12 23:41:41 +08:00
xiaojunnuo
024e97d632 v1.2.0 2023-12-12 23:40:11 +08:00
xiaojunnuo
61479cd5fb build: prepare to build 2023-12-12 23:37:51 +08:00
xiaojunnuo
aaa322464d fix: 修复邮箱设置无效的bug 2023-12-12 23:35:41 +08:00
GitHub Actions Bot
02bfbd5019 🔱: [client] sync upgrade with 2 commits [trident-sync]
perf: 增加formWatch示例
2023-12-06 19:24:02 +00:00
GitHub Actions Bot
282f8b4e02 🔱: [client] sync upgrade with 5 commits [trident-sync]
chore:
chore:
chore: editRequest 判断form.id不为空
chore:
2023-11-23 19:24:19 +00:00
GitHub Actions Bot
3393bde820 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2023-11-22 19:24:09 +00:00
GitHub Actions Bot
2277c87908 🔱: [client] sync upgrade with 2 commits [trident-sync]
chore:
2023-11-21 19:24:11 +00:00
GitHub Actions Bot
2ea0c48853 🔱: [client] sync upgrade with 8 commits [trident-sync]
build: publish success
chore:
chore:
chore:
chore:
build: publish success
chore:
2023-11-20 19:24:12 +00:00
GitHub Actions Bot
28cbefde04 🔱: [client] sync upgrade with 2 commits [trident-sync]
feat(editable): editable优化重构,分三种模式:free、row、cell
2023-11-19 19:24:08 +00:00
GitHub Actions Bot
4e13843c78 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2023-11-08 19:24:13 +00:00
GitHub Actions Bot
a929f8429d 🔱: [client] sync upgrade with 2 commits [trident-sync]
build: publish success
2023-11-07 19:24:00 +00:00
xiaojunnuo
40f3f06ed3 chore: 2023-11-07 17:46:18 +08:00
xiaojunnuo
0a79c4c717 chore: 2023-11-07 16:17:46 +08:00
xiaojunnuo
712d789992 Merge remote-tracking branch 'origin/v2' into v2 2023-11-07 14:23:08 +08:00
xiaojunnuo
8de8b1a32e chore: 2023-11-07 14:22:17 +08:00
Greper
c2f565c73a Merge pull request #25 from certd/client_sync
[client] sync upgrade [trident-sync]
2023-11-01 03:24:17 +08:00
GitHub Actions Bot
1df036a811 🔱: [client] sync upgrade with 2 commits [trident-sync]
chore:
2023-10-31 19:24:08 +00:00
xiaojunnuo
9910a4fc7b chore: 2023-10-27 12:53:07 +08:00
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
xiaojunnuo
68eb4198f1 v1.1.1 2023-06-28 15:48:03 +08:00
xiaojunnuo
ef94607728 build: prepare to build 2023-06-28 15:46:58 +08:00
xiaojunnuo
4ccadbd2be build: prepare to build 2023-06-28 15:42:36 +08:00
xiaojunnuo
0643063b80 chore: auth 2023-06-28 15:42:10 +08:00
xiaojunnuo
d6c6ab932a chore: auth 2023-06-28 15:35:31 +08:00
xiaojunnuo
46004d2db8 chore: login 2023-06-28 15:18:36 +08:00
xiaojunnuo
620d1d4092 chore: clear file 2023-06-28 15:16:19 +08:00
xiaojunnuo
f30afac47e chore: 同步npm镜像 2023-06-28 14:34:22 +08:00
xiaojunnuo
1779e34773 chore: 1 2023-06-28 13:55:48 +08:00
xiaojunnuo
28f535f41c chore: 1 2023-06-28 13:54:17 +08:00
xiaojunnuo
e921f58d2f chore: 1 2023-06-28 13:45:19 +08:00
xiaojunnuo
301f6cc273 chore: off cron when remove 2023-06-28 12:46:29 +08:00
xiaojunnuo
f04e497999 chore: 1.1.0 2023-06-28 11:34:37 +08:00
xiaojunnuo
8db438d76b chore: 1.0.7 2023-06-28 10:29:16 +08:00
xiaojunnuo
af75e607ec chore: 1.0.7 2023-06-28 10:27:37 +08:00
xiaojunnuo
cd4b9527c3 v1.1.0 2023-06-28 10:23:14 +08:00
xiaojunnuo
ea8dc446ae build: prepare to build 2023-06-28 10:22:03 +08:00
xiaojunnuo
ba6270990b chore: 1.0.7 2023-06-28 10:21:32 +08:00
xiaojunnuo
df55f1066c chore: build set -e 2023-06-28 09:58:58 +08:00
xiaojunnuo
b562d661db chore: build +x 2023-06-28 09:57:20 +08:00
xiaojunnuo
aede78a0ec chore: build 2023-06-28 09:44:35 +08:00
xiaojunnuo
7e8c3fbab7 chore: 1 2023-06-27 23:17:32 +08:00
xiaojunnuo
6621601155 chore: 1 2023-06-27 23:06:08 +08:00
xiaojunnuo
1fbd585a46 chore: 1 2023-06-27 22:55:36 +08:00
xiaojunnuo
5a51c14de5 feat: cert download 2023-06-27 22:45:27 +08:00
xiaojunnuo
27a4c81c6d feat: 权限控制 2023-06-27 09:29:43 +08:00
xiaojunnuo
fdc25dc0d7 feat: config merge 2023-06-26 12:26:59 +08:00
xiaojunnuo
99522fb49a feat: save files 2023-06-25 23:45:13 +08:00
xiaojunnuo
671d273e2f feat: save files 2023-06-25 23:25:56 +08:00
xiaojunnuo
2851a33eb2 fix: 修复access选择类型trigger 2023-06-25 16:25:23 +08:00
xiaojunnuo
937e3fac19 feat: 邮件通知 2023-06-25 15:30:18 +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
xiaojunnuo
64afebecd4 chore: email 2023-06-07 23:36:42 +08:00
xiaojunnuo
4c324960e6 chore: 1 2023-06-07 23:10:33 +08: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
xiaojunnuo
f516b0931f chore: jwt key 2023-05-26 16:18:24 +08:00
xiaojunnuo
2297121eff chore: node 16 2023-05-26 14:43:38 +08:00
xiaojunnuo
0c2684d1cf chore: node 16 2023-05-26 14:39:51 +08:00
xiaojunnuo
4b4c5dba73 chore: node 16 2023-05-26 14:39:33 +08:00
xiaojunnuo
7b9d70e093 chore: node 16 2023-05-26 14:31:37 +08:00
xiaojunnuo
71a289b009 chore: node 16 2023-05-26 14:08:37 +08:00
xiaojunnuo
ddf98ff593 chore: node 16 2023-05-26 12:48:06 +08:00
xiaojunnuo
db8043ecb6 chore: node 16 2023-05-26 12:33:03 +08:00
xiaojunnuo
ea756cf0a4 chore: node 16 2023-05-26 10:54:30 +08:00
xiaojunnuo
8446a6d813 chore: node 16 2023-05-26 09:09:57 +08:00
xiaojunnuo
a18aaeacf7 chore: node 16 2023-05-26 01:40:03 +08:00
xiaojunnuo
58a43b3785 chore: node 16 2023-05-26 00:35:44 +08:00
xiaojunnuo
dd06f12582 v1.0.6 2023-05-26 00:22:36 +08:00
xiaojunnuo
d7dcc01c9f build: prepare to build 2023-05-26 00:19:30 +08:00
xiaojunnuo
66f56740b7 chore: node 16 2023-05-26 00:19:01 +08:00
xiaojunnuo
5bd042d9bc chore: node 16 2023-05-26 00:10:34 +08:00
xiaojunnuo
60921d9adf v1.0.5 2023-05-25 23:01:21 +08:00
xiaojunnuo
3a668f1f8b build: prepare to build 2023-05-25 22:57:44 +08:00
xiaojunnuo
609fe5f838 chore: node 16 2023-05-25 22:39:14 +08:00
xiaojunnuo
e29e528aa2 chore: pre publish 2023-05-25 20:46:56 +08:00
xiaojunnuo
e06c9e07fe chore: pre publish 2023-05-25 20:44:41 +08:00
xiaojunnuo
03ee28c380 chore: pre publish 2023-05-25 17:14:58 +08:00
xiaojunnuo
7474235283 chore: pre publish 2023-05-25 16:49:05 +08:00
xiaojunnuo
4eb6ae92d1 chore: pre publish 2023-05-25 16:48:23 +08:00
xiaojunnuo
0eeba2783b chore: pre publish 2023-05-25 16:44:17 +08:00
xiaojunnuo
8498fa75e3 chore: pre publish 2023-05-25 16:13:55 +08:00
xiaojunnuo
5556bc3a4b chore: pre publish 2023-05-25 15:17:58 +08:00
xiaojunnuo
998200e570 chore: pre publish 2023-05-25 13:43:32 +08:00
xiaojunnuo
420b835b09 v1.0.4 2023-05-25 12:49:04 +08:00
xiaojunnuo
cc3534cf00 build: prepare to build 2023-05-25 12:47:38 +08:00
xiaojunnuo
062a267a6f chore: pre publish 2023-05-25 12:47:16 +08:00
xiaojunnuo
98ee7fcd8c chore: pre publish 2023-05-25 12:38:29 +08:00
xiaojunnuo
e5ec9f4b62 Merge remote-tracking branch 'origin/v2' into v2 2023-05-25 12:28:40 +08:00
xiaojunnuo
b66bb21777 chore: 1 2023-05-25 12:28:30 +08:00
xiaojunnuo
f7e026a132 chore: eslint 2023-05-25 11:47:58 +08:00
xiaojunnuo
c12e56823e chore: 1 2023-05-25 11:37:58 +08:00
xiaojunnuo
042f8e9030 chore: 1 2023-05-25 11:37:11 +08:00
xiaojunnuo
9308950550 chore: 1 2023-05-25 10:51:13 +08:00
xiaojunnuo
a43c5b0824 v1.0.3 2023-05-25 10:47:33 +08:00
xiaojunnuo
ebdf9f4b5b build: prepare to build 2023-05-25 10:45:30 +08:00
xiaojunnuo
511be1f3ae chore: pre publish 2023-05-25 10:45:07 +08:00
xiaojunnuo
ceb0454277 chore: pre publish 2023-05-25 10:43:22 +08:00
xiaojunnuo
c553b017af chore: pre publish 2023-05-25 10:33:42 +08:00
xiaojunnuo
c553f63127 chore: pre publish 2023-05-25 10:08:40 +08:00
xiaojunnuo
152cb9b23a chore: 1 2023-05-25 00:46:44 +08:00
xiaojunnuo
5eff50e8fe chore: 1 2023-05-25 00:41:36 +08:00
xiaojunnuo
cddf01ee68 chore: 1.0.0 pre 2023-05-24 18:28:29 +08:00
xiaojunnuo
d968c4bbb9 chore: 1.0.0 pre 2023-05-24 18:09:33 +08: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
781 changed files with 14860 additions and 6985 deletions

21
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,21 @@
> 感谢您支持certd请按如下规范提交issue
> 如果有条件,请尽量在[github上提交](https://github.com/certd/certd/issues)
## 一、问题描述
`请在此处简要描述你所遇到的问题,必要时请贴出相关截图辅助理解和定位`
### 复现步骤
`请描述复现问题的详细步骤`
`如果非示例页面的问题,最好能提供最小复现示例的代码、或者仓库链接`
### 报错截图
`请贴出报错日志截图`
### 效果截图
`请贴出效果截图`
#### 1. 期望效果
#### 2. 实际效果

35
.github/workflows/sync-to-gitee.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: sync-to-gitee
on:
push:
branches: ['v2']
pull_request:
branches: ['v2']
# schedule:
# - # 国际时间 19:17 执行北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间
# - cron: '17 19 * * *'
permissions:
contents: read
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout work repo # 1. 检出当前仓库(certd-sync-work)
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set git user # 2. 给git命令设置用户名和邮箱,↙↙↙ 改成你的name和email
run: |
git config --global user.name "xiaojunnuo"
git config --global user.email "xiaojunnuo@qq.com"
- name: Set git token # 3. 给git命令设置token用于push到目标仓库
uses: de-vri-es/setup-git-credentials@v2
with: # token 格式为: username:password
credentials: https://${{secrets.PUSH_TOKEN_GITEE}}@gitee.com
- name: push to gitee # 4. 执行同步
run: |
git remote add upstream https://gitee.com/certd/certd
git push --set-upstream upstream v2

4
.gitignore vendored
View File

@@ -1,3 +1,4 @@
./packages/core/lego
# IntelliJ project files
.vscode/
node_modules/
@@ -30,3 +31,6 @@ gen
/packages/test
/test/own
/pnpm-lock.yaml
docker/image/workspace
/packages/core/lego

View File

@@ -3,6 +3,94 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.2](https://github.com/certd/certd/compare/v1.2.1...v1.20.2) (2024-02-28)
### Bug Fixes
* 临时修复阿里云domainlist接口返回域名列表不全的问题后续还需要增加翻页查询 ([849c145](https://github.com/certd/certd/commit/849c145926984762bd9dbec87bd91cd047fc0855))
## [1.2.1](https://github.com/certd/certd/compare/v1.2.0...v1.2.1) (2023-12-12)
### Bug Fixes
* 修复邮箱设置无效的bug ([aaa3224](https://github.com/certd/certd/commit/aaa322464d0f65e924d1850995540d396ee24d25))
**Note:** Version bump only for package root
# [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
# [1.1.0](https://github.com/certd/certd/compare/v1.0.6...v1.1.0) (2023-06-28)
### Bug Fixes
* 修复access选择类型trigger ([2851a33](https://github.com/certd/certd/commit/2851a33eb2510f038fadb55da29512597a4ba512))
### Features
* 权限控制 ([27a4c81](https://github.com/certd/certd/commit/27a4c81c6d70e70abb3892c3ea58d4719988808a))
* 邮件通知 ([937e3fa](https://github.com/certd/certd/commit/937e3fac19cd03b8aa91db8ba03fda7fcfbacea2))
* cert download ([5a51c14](https://github.com/certd/certd/commit/5a51c14de521cb8075a80d2ae41a16e6d5281259))
* config merge ([fdc25dc](https://github.com/certd/certd/commit/fdc25dc0d795555cffacc4572648ec158988fbbb))
* save files ([99522fb](https://github.com/certd/certd/commit/99522fb49adb42c1dfdf7bec3dd52d641158285b))
* save files ([671d273](https://github.com/certd/certd/commit/671d273e2f9136d16896536b0ca127cf372f1619))
## [1.0.6](https://github.com/certd/certd/compare/v1.0.5...v1.0.6) (2023-05-25)
**Note:** Version bump only for package root
## [1.0.5](https://github.com/certd/certd/compare/v1.0.4...v1.0.5) (2023-05-25)
**Note:** Version bump only for package root
## [1.0.4](https://github.com/certd/certd/compare/v1.0.3...v1.0.4) (2023-05-25)
**Note:** Version bump only for package root
## [1.0.3](https://github.com/certd/certd/compare/v1.0.2...v1.0.3) (2023-05-25)
**Note:** Version bump only for package root
## [1.0.2](https://github.com/certd/certd/compare/v1.0.1...v1.0.2) (2023-05-24)
**Note:** Version bump only for package root

228
README.md
View File

@@ -1,139 +1,125 @@
# 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
mkdir certd
cd certd
wget https://raw.githubusercontent.com/certd/certd/v2/docker/run/docker-compose.yaml
# 或者使用gitee地址
wget https://gitee.com/certd/certd/raw/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是插件化安装
export CERTD_VERSION=1.2.0
docker compose up -d
#如果docker compose是独立安装
export CERTD_VERSION=1.2.0
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)
加作者好友
<p align="center">
<img height="230" src="./doc/images/me.png">
</p>
## 快速开始
本案例演示如何配置自动申请证书并部署到阿里云CDN然后快要到期前自动更新证书并重新部署
## 捐赠
媳妇儿说:“一天到晚搞开源,也不管管老婆孩子!😡😡😡”
拜托各位捐赠支持一下,让媳妇儿开心开心,我也能有更多时间进行开源项目,感谢🙏🙏🙏
<p align="center">
<img height="380" src="./doc/images/donate.png">
</p>
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无法访问的问题

103
deploy.js
View File

@@ -1,58 +1,81 @@
const http = require("axios")
const exec = require('child_process').exec;
import http from 'axios'
import fs from 'fs'
//builder
function execute(cmd){
return new Promise((resolve,reject)=>{
console.log("cmd executing: " + cmd)
exec(cmd, function(error, stdout, stderr) {
if(error){
console.error(error);
console.info(stderr)
reject(error)
}
else{
console.info(stdout)
console.log("success");
resolve(true)
//读取 packages/core/pipline/package.json的版本号
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) {
return new Promise((resolve, reject) => {
// 读取目录下的文件和目录列表
fs.readdir(directoryPath, {withFileTypes: true}, (err, files) => {
if (err) {
console.log('无法读取目录:', err);
reject(err)
return;
}
// 过滤仅保留目录
const directories = files
.filter(file => file.isDirectory())
.map(directory => directory.name);
console.log('目录列表:', directories);
resolve(directories)
});
})
}
async function build(){
await execute("cd ./packages/fast-admin/fs-admin-antdv/ && npm run build")
await execute("cd ./packages/fast-admin/fs-admin-element/ && npm run build")
await execute("cd ./packages/fast-admin/fs-admin-naive-ui/ && npm run build")
await execute("npm run docs:build")
async function getAllPackages() {
const base = await getPackages("./packages/core")
const plugins = await getPackages("./packages/plugins")
return base.concat(plugins)
}
async function sync() {
const packages = await getAllPackages()
for (const pkg of packages) {
await http({
url: `http://registry-direct.npmmirror.com/@certd/${pkg}/sync?sync_upstream=true`,
method: 'PUT',
headers: {
"Content-Type": "application/json"
},
data: {}
})
console.log(`sync success:${pkg}`)
await sleep(10000)
}
}
// curl -X PUT https://registry-direct.npmmirror.com/@certd/plugin-cert/sync?sync_upstream=true
// trigger
const certdImageBuild = "http://flow-openapi.aliyun.com/pipeline/webhook/4zgFk3i4RZEMGuQzlOcI"
const webhooks = [certdImageBuild]
const naive = "http://flow-openapi.aliyun.com/pipeline/webhook/Zm3TJyDtyFZgV4dtJiD1"
const doc = "http://flow-openapi.aliyun.com/pipeline/webhook/soOYdQ5sF3kLjTPJGmIO"
const antdv = "http://flow-openapi.aliyun.com/pipeline/webhook/HiL0uVYxfUnBzIMJZVXB"
const element = "http://flow-openapi.aliyun.com/pipeline/webhook/uFTI0XJ9RgqnofX7jpRD"
const webhooks = [doc,naive,antdv,element]
async function sleep(time){
async function sleep(time) {
return new Promise(resolve => {
setTimeout(resolve,time)
setTimeout(resolve, time)
})
}
async function trigger(){
async function triggerBuild() {
await sleep(60000)
for (const webhook of webhooks) {
await http({
url:webhook,
method:'POST',
headers:{
url: webhook,
method: 'POST',
headers: {
"Content-Type": "application/json"
},
data:{}
data: {
'CERTD_VERSION': certdVersion
}
})
console.log(`webhook success:${webhook}`)
await sleep(1000)
@@ -60,11 +83,13 @@ async function trigger(){
}
async function start(){
async function start() {
// await build()
console.log("等待60秒")
await sleep(60*1000)
await trigger()
await sleep(60 * 1000)
await sync()
await sleep(60 * 1000)
await triggerBuild()
}
start()

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

BIN
doc/images/donate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

BIN
doc/images/me.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 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

18
docker/image/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
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
#RUN pm2 install pm2-logrotate
ADD ./workspace/certd-server/ /app/
RUN yarn install --production --registry=https://registry.npmmirror.com
#RUN yarn install --production
RUN npm run build
#CMD ["pm2-runtime", "start", "./bootstrap.js","--name", "certd","-i","1"]
CMD ["npm", "run","start"]

37
docker/image/build.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
set -e
echo "请先输入一个版本号:"
read version
echo "您输入的版本号是: $version"
echo "登录aliyun镜像仓库"
sudo docker login --username=252959493@qq.com registry.cn-shenzhen.aliyuncs.com
build=$(pwd)
cd ../../
root=$(pwd)
echo "安装依赖"
#pnpm install --registry=https://registry.npmmirror.com
pnpm install
echo "client build"
cd $root/packages/ui/certd-client
pnpm run build
echo "client build success"
echo "server build"
cd $root/packages/ui/certd-server
pnpm run build
echo "server build success"
echo "rm node_modules"
rm ./node_modules -rf
echo "copy to workspace"
mkdir -p $build/workspace/certd-server
\cp ./* $build/workspace/certd-server -rf
\cp ../certd-client/dist/* $build/workspace/certd-server/public/ -rf
#export TAG=$version
#sudo -E docker compose build
#sudo -E docker compose push

View File

@@ -0,0 +1,15 @@
version: '3.3' # 指定docker-compose 版本
services: # 要拉起的服务们
certd:
build:
context: ./
dockerfile: Dockerfile
image: registry.cn-shenzhen.aliyuncs.com/handsfree/certd:${TAG}
container_name: certd # 容器名
restart: unless-stopped # 重启
ports: # 端口映射
- "7001:7001"
environment:
- TZ=Asia/Shanghai
- node_sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/sqlite3

9
docker/run/Dockerfile Normal file
View File

@@ -0,0 +1,9 @@
FROM registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest
EXPOSE 7001
RUN npm run build
#RUN npm install pm2 -g --registry=https://registry.npmmirror.com
#CMD ["pm2-runtime", "start", "./bootstrap.js","--name", "certd","-i","1","--", "-p", "7001"]
CMD ["npm","run", "start"]

13
docker/run/build.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
set -e
# 判断$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

@@ -0,0 +1,23 @@
version: '3.3'
services:
certd:
# 镜像 # ↓↓↓↓↓ --- 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: # 环境变量
- 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.0.2"
"version": "1.20.2"
}

View File

@@ -1,23 +1,27 @@
{
"name": "root",
"version": "1.0.3",
"private": true,
"type": "module",
"devDependencies": {
"@lerna-lite/cli": "^2.4.0",
"@lerna-lite/run": "^2.4.0",
"@lerna-lite/publish": "^2.4.0"
"@lerna-lite/cli": "^3.2.1",
"@lerna-lite/publish": "^3.2.1",
"@lerna-lite/run": "^3.2.1",
"@lerna-lite/version": "^3.2.1"
},
"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",
"publish": "npm run proxy && npm run prepublishOnly1 && lerna publish --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\""
"before-build": "cd ./packages/core/acme-client && time /t >build.md && git add ./build.md && git commit -m \"build: prepare to build\"",
"deploy1": "node deploy.js"
},
"license": "MIT",
"license": "AGPL-3.0",
"dependencies": {
"axios": "^1.4.0",
"lodash": "^4.17.21"
},
"workspaces": [

View File

@@ -3,6 +3,64 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.2](https://github.com/publishlab/node-acme-client/compare/v1.2.1...v1.20.2) (2024-02-28)
**Note:** Version bump only for package @certd/acme-client
## [1.2.1](https://github.com/publishlab/node-acme-client/compare/v1.2.0...v1.2.1) (2023-12-12)
**Note:** Version bump only for package @certd/acme-client
**Note:** Version bump only for package @certd/acme-client
# [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
# [1.1.0](https://github.com/publishlab/node-acme-client/compare/v1.0.6...v1.1.0) (2023-06-28)
**Note:** Version bump only for package @certd/acme-client
## [1.0.6](https://github.com/publishlab/node-acme-client/compare/v1.0.5...v1.0.6) (2023-05-25)
**Note:** Version bump only for package @certd/acme-client
## [1.0.5](https://github.com/publishlab/node-acme-client/compare/v1.0.4...v1.0.5) (2023-05-25)
**Note:** Version bump only for package @certd/acme-client
## [1.0.4](https://github.com/publishlab/node-acme-client/compare/v1.0.3...v1.0.4) (2023-05-25)
**Note:** Version bump only for package @certd/acme-client
## [1.0.3](https://github.com/publishlab/node-acme-client/compare/v1.0.2...v1.0.3) (2023-05-25)
**Note:** Version bump only for package @certd/acme-client
## [1.0.2](https://github.com/publishlab/node-acme-client/compare/v1.0.1...v1.0.2) (2023-05-24)
**Note:** Version bump only for package @certd/acme-client

View File

@@ -1 +1 @@
18:05
11:14

View File

@@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client",
"private": false,
"author": "nmorsman",
"version": "1.0.2",
"version": "1.20.2",
"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

@@ -12,6 +12,7 @@
"mocha": true
},
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-explicit-any": "off",

View File

@@ -0,0 +1,2 @@
node_modules
src

View File

@@ -3,6 +3,80 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.2](https://github.com/certd/certd/compare/v1.2.1...v1.20.2) (2024-02-28)
**Note:** Version bump only for package @certd/pipeline
## [1.2.1](https://github.com/certd/certd/compare/v1.2.0...v1.2.1) (2023-12-12)
**Note:** Version bump only for package @certd/pipeline
**Note:** Version bump only for package @certd/pipeline
# [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
# [1.1.0](https://github.com/certd/certd/compare/v1.0.6...v1.1.0) (2023-06-28)
### Bug Fixes
* 修复access选择类型trigger ([2851a33](https://github.com/certd/certd/commit/2851a33eb2510f038fadb55da29512597a4ba512))
### Features
* 邮件通知 ([937e3fa](https://github.com/certd/certd/commit/937e3fac19cd03b8aa91db8ba03fda7fcfbacea2))
* cert download ([5a51c14](https://github.com/certd/certd/commit/5a51c14de521cb8075a80d2ae41a16e6d5281259))
* save files ([99522fb](https://github.com/certd/certd/commit/99522fb49adb42c1dfdf7bec3dd52d641158285b))
* save files ([671d273](https://github.com/certd/certd/commit/671d273e2f9136d16896536b0ca127cf372f1619))
## [1.0.6](https://github.com/certd/certd/compare/v1.0.5...v1.0.6) (2023-05-25)
**Note:** Version bump only for package @certd/pipeline
## [1.0.5](https://github.com/certd/certd/compare/v1.0.4...v1.0.5) (2023-05-25)
**Note:** Version bump only for package @certd/pipeline
## [1.0.4](https://github.com/certd/certd/compare/v1.0.3...v1.0.4) (2023-05-25)
**Note:** Version bump only for package @certd/pipeline
## [1.0.3](https://github.com/certd/certd/compare/v1.0.2...v1.0.3) (2023-05-25)
**Note:** Version bump only for package @certd/pipeline
## [1.0.2](https://github.com/certd/certd/compare/v1.0.1...v1.0.2) (2023-05-24)
**Note:** Version bump only for package @certd/pipeline

View File

@@ -1 +0,0 @@
export * from "./src";

View File

@@ -1,61 +1,60 @@
{
"name": "@certd/pipeline",
"private": false,
"version": "1.0.2",
"version": "1.20.2",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
"publishConfig": {
"main": "./dist/pipeline.umd.js",
"module": "./dist/pipeline.mjs",
"main": "./dist/bundle.js",
"module": "./dist/bundle.mjs",
"types": "./dist/d/index.d.ts"
},
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"build": "rollup -c",
"build2": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
},
"dependencies": {
"@certd/acme-client": "^1.0.2",
"axios": "^0.21.1",
"dayjs": "^1.11.6",
"lodash": "^4.17.21",
"log4js": "^6.3.0",
"node-forge": "^0.10.0",
"qs": "^6.9.4",
"reflect-metadata": "^0.1.13"
"axios": "^1.4.0",
"node-forge": "^1.3.1",
"nodemailer": "^6.9.3",
"qs": "^6.11.2"
},
"devDependencies": {
"@alicloud/cs20151215": "^3.0.3",
"@alicloud/openapi-client": "^0.4.0",
"@alicloud/pop-core": "^1.7.10",
"@midwayjs/bootstrap": "^3.9.1",
"@midwayjs/cache": "^3.9.0",
"@midwayjs/cli": "^1.3.21",
"@midwayjs/core": "^3.0.0",
"@midwayjs/decorator": "^3.0.0",
"@midwayjs/koa": "^3.9.0",
"@midwayjs/logger": "^2.17.0",
"@midwayjs/typeorm": "^3.9.0",
"@midwayjs/validate": "^3.9.0",
"@certd/acme-client": "^1.20.2",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.0.0",
"@types/chai": "^4.3.3",
"@types/chai": "^4.3.5",
"@types/lodash": "^4.14.194",
"@types/mocha": "^10.0.0",
"@types/node-forge": "^1.3.0",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"chai": "^4.3.6",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"@types/mocha": "^10.0.1",
"@types/node-forge": "^1.3.2",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "^5.59.7",
"@typescript-eslint/parser": "^5.59.7",
"chai": "^4.3.7",
"dayjs": "^1.11.7",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"mocha": "^10.1.0",
"lodash": "^4.17.21",
"log4js": "^6.9.1",
"mocha": "^10.2.0",
"reflect-metadata": "^0.1.13",
"rollup": "^3.7.4",
"rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-visualizer": "^5.8.2",
"ts-node": "^10.9.1",
"typescript": "^4.8.4",
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
"tslib": "^2.5.2",
"typescript": "^5.0.4",
"vite": "^4.3.8",
"vue-tsc": "^1.6.5"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -0,0 +1,43 @@
const resolve = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
//const Typescript = require("rollup-plugin-typescript2");
const Typescript = require("@rollup/plugin-typescript");
const json = require("@rollup/plugin-json");
const terser = require("@rollup/plugin-terser");
module.exports = {
input: "src/index.ts",
output: {
file: "dist/bundle.js",
format: "cjs",
},
plugins: [
// 解析第三方依赖
resolve(),
// 识别 commonjs 模式第三方依赖
commonjs(),
Typescript({
target: "esnext",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: ["./node_modules/**", "./src/**/*.vue"],
allowSyntheticDefaultImports: true,
}),
json(),
terser(),
],
external: [
"vue",
"lodash",
"dayjs",
"@certd/acme-client",
"@certd/pipeline",
"@certd/plugin-cert",
"@certd/plugin-aliyun",
"@certd/plugin-tencent",
"@certd/plugin-huawei",
"@certd/plugin-host",
"@certd/plugin-tencent",
"@certd/plugin-util",
],
};

View File

@@ -1,7 +1,7 @@
import { ConcurrencyStrategy, Pipeline, ResultType, Runnable, RunStrategy, Stage, Step, Task } from "../d.ts";
import { ConcurrencyStrategy, NotificationWhen, Pipeline, ResultType, Runnable, RunStrategy, Stage, Step, Task } from "../d.ts";
import _ from "lodash";
import { RunHistory, RunnableCollection } from "./run-history";
import { AbstractTaskPlugin, PluginDefine, pluginRegistry } from "../plugin";
import { AbstractTaskPlugin, PluginDefine, pluginRegistry, TaskInstanceContext } from "../plugin";
import { ContextFactory, IContext } from "./context";
import { IStorage } from "./storage";
import { logger } from "../utils/util.log";
@@ -10,31 +10,37 @@ import { request } from "../utils/util.request";
import { IAccessService } from "../access";
import { RegistryItem } from "../registry";
import { Decorator } from "../decorator";
import { IEmailService } from "../service";
import { FileStore } from "./file-store";
import { TimeoutPromise } from "../utils/util.promise";
export class Executor {
export type ExecutorOptions = {
userId: any;
pipeline: Pipeline;
runtime!: RunHistory;
storage: IStorage;
onChanged: (history: RunHistory) => Promise<void>;
accessService: IAccessService;
emailService: IEmailService;
fileRootDir?: string;
};
export class Executor {
pipeline: Pipeline;
runtime!: RunHistory;
contextFactory: ContextFactory;
logger: Logger;
pipelineContext!: IContext;
lastStatusMap!: RunnableCollection;
lastRuntime!: RunHistory;
options: ExecutorOptions;
canceled = false;
onChanged: (history: RunHistory) => void;
constructor(options: {
userId: any;
pipeline: Pipeline;
storage: IStorage;
onChanged: (history: RunHistory) => Promise<void>;
accessService: IAccessService;
}) {
constructor(options: ExecutorOptions) {
this.options = options;
this.pipeline = _.cloneDeep(options.pipeline);
this.onChanged = async (history: RunHistory) => {
await options.onChanged(history);
};
this.accessService = options.accessService;
this.userId = options.userId;
this.pipeline.userId = this.userId;
this.pipeline.userId = options.userId;
this.contextFactory = new ContextFactory(options.storage);
this.logger = logger;
this.pipelineContext = this.contextFactory.getContext("pipeline", this.pipeline.id);
@@ -42,9 +48,16 @@ export class Executor {
async init() {
const lastRuntime = await this.pipelineContext.getObj(`lastRuntime`);
this.lastRuntime = lastRuntime;
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();
@@ -52,10 +65,16 @@ export class Executor {
// 读取last
this.runtime = new RunHistory(runtimeId, trigger, this.pipeline);
this.logger.info(`pipeline.${this.pipeline.id} start`);
await this.notification("start");
await this.runWithHistory(this.pipeline, "pipeline", async () => {
await this.runStages(this.pipeline);
});
if (this.lastRuntime && this.lastRuntime.pipeline.status?.status === ResultType.error) {
await this.notification("turnToSuccess");
}
await this.notification("success");
} catch (e) {
await this.notification("error", e);
this.logger.error("pipeline 执行失败", e);
} finally {
await this.pipelineContext.setObj("lastRuntime", this.runtime);
@@ -88,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);
}
}
@@ -163,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);
@@ -176,32 +204,83 @@ 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;
}
}
});
const context: any = {
logger: this.runtime._loggers[step.id],
accessService: this.accessService,
pipelineContext: this.pipelineContext,
const taskCtx: TaskInstanceContext = {
pipeline: this.pipeline,
step,
lastStatus,
userContext: this.contextFactory.getContext("user", this.userId),
http: request,
logger: currentLogger,
accessService: this.options.accessService,
emailService: this.options.emailService,
pipelineContext: this.pipelineContext,
userContext: this.contextFactory.getContext("user", this.options.userId),
fileStore: new FileStore({
scope: this.pipeline.id,
parent: this.runtime.id,
rootDir: this.options.fileRootDir,
}),
};
Decorator.inject(define.autowire, instance, context);
instance.setCtx(taskCtx);
await instance.onInstance();
await instance.execute();
if (instance.result.clearLastStatus) {
if (instance._result.clearLastStatus) {
this.lastStatusMap.clear();
}
//输出到output context
_.forEach(define.output, (item, key) => {
step!.status!.output[key] = instance[key];
step.status!.output[key] = instance[key];
const stepOutputKey = `step.${step.id}.${key}`;
this.runtime.context[stepOutputKey] = instance[key];
});
step.status!.files = instance.getFiles();
}
async notification(when: NotificationWhen, error?: any) {
if (!this.pipeline.notifications) {
return;
}
let subject = "";
let content = "";
if (when === "start") {
subject = `【CertD】开始执行${this.pipeline.title}, buildId:${this.runtime.id}`;
content = subject;
} else if (when === "success") {
subject = `【CertD】执行成功${this.pipeline.title}, buildId:${this.runtime.id}`;
content = subject;
} else if (when === "turnToSuccess") {
subject = `【CertD】执行成功错误转成功${this.pipeline.title}, buildId:${this.runtime.id}`;
content = subject;
} else if (when === "error") {
subject = `【CertD】执行失败${this.pipeline.title}, buildId:${this.runtime.id}`;
content = `<pre>${error.message}</pre>`;
} else {
return;
}
for (const notification of this.pipeline.notifications) {
if (!notification.when.includes(when)) {
continue;
}
if (notification.type === "email") {
this.options.emailService?.send({
userId: this.pipeline.userId,
subject,
content,
receivers: notification.options.receivers,
});
}
}
}
}

View File

@@ -0,0 +1,50 @@
import { fileUtils } from "../utils/util.file";
import dayjs from "dayjs";
import path from "path";
import fs from "fs";
export type FileStoreOptions = {
rootDir?: string;
scope: string;
parent: string;
};
export class FileStore {
rootDir: string;
scope: string;
parent: string;
constructor(options?: FileStoreOptions) {
this.rootDir = fileUtils.getFileRootDir(options?.rootDir);
this.scope = options?.scope || "0";
this.parent = options?.parent || "0";
}
readFile(filePath: string) {
if (!fs.existsSync(filePath)) {
return null;
}
return fs.readFileSync(filePath);
}
writeFile(filename: string, file: Buffer) {
const localPath = this.buildFilePath(filename);
fs.writeFileSync(localPath, file);
return localPath;
}
private buildFilePath(filename: string) {
const parentDir = path.join(this.rootDir, this.scope + "", this.parent + "", dayjs().format("YYYY-MM-DD"));
if (!fs.existsSync(parentDir)) {
fs.mkdirSync(parentDir, { recursive: true });
}
return path.join(parentDir, filename);
}
deleteByParent(scope: string, parent: string) {
const dir = path.join(this.rootDir, scope, parent);
if (fs.existsSync(dir)) {
fs.unlinkSync(dir);
}
}
}

View File

@@ -2,3 +2,4 @@ export * from "./executor";
export * from "./run-history";
export * from "./context";
export * from "./storage";
export * from "./file-store";

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);
@@ -119,25 +132,25 @@ export class RunnableCollection {
this.collection = map;
}
private each<T extends Runnable>(list: T[], exec: (item: Runnable) => void) {
static each<T extends Runnable>(list: T[], exec: (item: Runnable) => void) {
list.forEach((item) => {
exec(item);
if (item.runnableType === "pipeline") {
// @ts-ignore
this.each<Stage>(item.stages, exec);
RunnableCollection.each<Stage>(item.stages, exec);
} else if (item.runnableType === "stage") {
// @ts-ignore
this.each<Task>(item.tasks, exec);
RunnableCollection.each<Task>(item.tasks, exec);
} else if (item.runnableType === "task") {
// @ts-ignore
this.each<Step>(item.steps, exec);
RunnableCollection.each<Step>(item.steps, exec);
}
});
}
private toMap(pipeline: Pipeline) {
public toMap(pipeline: Pipeline) {
const map: RunnableMap = {};
this.each(pipeline.stages, (item) => {
RunnableCollection.each(pipeline.stages, (item) => {
map[item.id] = item;
});
return map;
@@ -151,7 +164,7 @@ export class RunnableCollection {
if (!this.pipeline) {
return;
}
this.each(this.pipeline.stages, (item) => {
RunnableCollection.each(this.pipeline.stages, (item) => {
item.status = undefined;
});
}

View File

@@ -1,7 +1,6 @@
import fs from "fs";
import path from "path";
import { fileUtils } from "../utils/util.file";
export interface IStorage {
get(scope: string, namespace: string, version: string, key: string): Promise<string | null>;
@@ -12,15 +11,7 @@ export interface IStorage {
export class FileStorage implements IStorage {
root: string;
constructor(rootDir?: string) {
if (rootDir == null) {
const userHome = process.env.HOME || process.env.USERPROFILE;
rootDir = userHome + "/.certd/storage/";
}
this.root = rootDir;
if (!fs.existsSync(this.root)) {
fs.mkdirSync(this.root, { recursive: true });
}
this.root = fileUtils.getFileRootDir(rootDir);
}
async remove(scope: string, namespace: string, version: string, key: string): Promise<void> {

View File

@@ -55,22 +55,40 @@ export type Trigger = {
type: string;
};
export type FileItem = {
id: string;
filename: string;
path: string;
};
export type Runnable = {
id: string;
title: string;
strategy?: RunnableStrategy;
runnableType?: string; // pipeline, stage, task , step
status?: HistoryResult;
timeout?: number;
default?: {
[key: string]: any;
};
};
export type EmailOptions = {
receivers: string[];
};
export type NotificationWhen = "error" | "success" | "turnToSuccess" | "start";
export type NotificationType = "email" | "url";
export type Notification = {
type: NotificationType;
when: NotificationWhen[];
options: EmailOptions;
};
export type Pipeline = Runnable & {
version?: number;
userId: any;
stages: Stage[];
triggers: Trigger[];
notifications?: Notification[];
};
export type Context = {
@@ -88,6 +106,7 @@ export enum ResultType {
start = "start",
success = "success",
error = "error",
canceled = "canceled",
skip = "skip",
none = "none",
}
@@ -101,6 +120,7 @@ export type HistoryResultGroup = {
export type HistoryResult = {
input: any;
output: any;
files?: FileItem[];
/**
* 任务状态
*/

View File

@@ -1,9 +1,10 @@
import "util";
export * from "./core";
export * from "./d.ts";
export * from "./access";
export * from "./registry";
export * from "./plugin";
export * from "./utils";
export * from "./midway";
export * from "./context";
export * from "./decorator";
export * from "./service";

View File

@@ -1,52 +0,0 @@
import { Config, Configuration, Inject, Logger } from "@midwayjs/decorator";
// @ts-ignore
import { ILogger } from "@midwayjs/logger";
import { IMidwayContainer, MidwayDecoratorService } from "@midwayjs/core";
// ... (see below) ...
@Configuration({
namespace: "pipeline",
//importConfigs: [join(__dirname, './config')],
})
export class PipelineConfiguration {
@Config()
// @ts-ignore
config;
@Logger()
// @ts-ignore
logger: ILogger;
@Inject()
// @ts-ignore
decoratorService: MidwayDecoratorService;
async onReady(container: IMidwayContainer) {
this.logger.info("pipeline install");
//this.implPropertyDecorator(container);
this.logger.info("pipeline installed");
}
// implPropertyDecorator(container: IMidwayContainer) {
// this.logger.info("初始化 property decorator");
// // 实现装饰器
// this.decoratorService.registerPropertyHandler(CLASS_INPUTS_KEY, (propertyName, meta) => {
// return undefined;
// });
//
// const autowireWhiteList: any = {
// logger: true,
// };
// this.decoratorService.registerPropertyHandler(CLASS_AUTOWIRE_KEY, (propertyName, meta) => {
// // eslint-disable-next-line no-debugger
// debugger;
// const className = meta.name;
// if (autowireWhiteList[className]) {
// //在白名单里面,注入
// return container.get(className);
// }
// this.logger.warn(`autowire failed:${className} class is not in white list`);
// return undefined;
// });
// }
}

View File

@@ -1,5 +0,0 @@
// src/index.ts
export { PipelineConfiguration } from "./configuration";
// export * from './controller/user';
// export * from './controller/api';
// export * from './service/user';

View File

@@ -1,5 +1,11 @@
import { Registrable } from "../registry";
import { FormItemProps } from "../d.ts";
import { FileItem, FormItemProps, Pipeline, Runnable, Step } from "../d.ts";
import { FileStore } from "../core/file-store";
import { Logger } from "log4js";
import { IAccessService } from "../access";
import { IEmailService } from "../service";
import { IContext } from "../core";
import { AxiosInstance } from "axios";
export enum ContextScope {
global,
@@ -7,16 +13,11 @@ export enum ContextScope {
runtime,
}
export type Storage = {
scope: ContextScope;
path: string;
};
export type TaskOutputDefine = {
title: string;
value?: any;
storage?: Storage;
};
export type TaskInputDefine = FormItemProps;
export type PluginDefine = Registrable & {
@@ -31,6 +32,12 @@ export type PluginDefine = Registrable & {
autowire?: {
[key: string]: any;
};
reference?: {
src: string;
dest: string;
type: "computed";
}[];
};
export type ITaskPlugin = {
@@ -41,15 +48,66 @@ export type ITaskPlugin = {
export type TaskResult = {
clearLastStatus?: boolean;
files?: FileItem[];
};
export type TaskInstanceContext = {
pipeline: Pipeline;
step: Step;
logger: Logger;
accessService: IAccessService;
emailService: IEmailService;
pipelineContext: IContext;
userContext: IContext;
http: AxiosInstance;
fileStore: FileStore;
lastStatus?: Runnable;
};
export abstract class AbstractTaskPlugin implements ITaskPlugin {
result: TaskResult = {};
_result: TaskResult = { clearLastStatus: false, files: [] };
ctx!: TaskInstanceContext;
clearLastStatus() {
this.result.clearLastStatus = true;
this._result.clearLastStatus = true;
}
getFiles() {
return this._result.files;
}
setCtx(ctx: TaskInstanceContext) {
this.ctx = ctx;
}
randomFileId() {
return Math.random().toString(36).substring(2, 9);
}
linkFile(file: FileItem) {
this._result.files!.push({
...file,
id: this.randomFileId(),
});
}
saveFile(filename: string, file: Buffer) {
const filePath = this.ctx.fileStore.writeFile(filename, file);
this._result.files!.push({
id: this.randomFileId(),
filename,
path: filePath,
});
}
get pipeline() {
return this.ctx.pipeline;
}
get step() {
return this.ctx.step;
}
async onInstance(): Promise<void> {
return;
}
abstract execute(): Promise<void>;
}

View File

@@ -3,12 +3,11 @@ import { pluginRegistry } from "./registry";
import { PluginDefine, TaskInputDefine, TaskOutputDefine } from "./api";
import { Decorator } from "../decorator";
import { AUTOWIRE_KEY } from "../decorator";
import "reflect-metadata";
// 提供一个唯一 key
export const PLUGIN_CLASS_KEY = "pipeline:plugin";
export function IsTaskPlugin(define: PluginDefine): ClassDecorator {
console.log("IsTaskPlugin");
return (target: any) => {
target = Decorator.target(target);
@@ -61,3 +60,11 @@ export function TaskOutput(output?: TaskOutputDefine): PropertyDecorator {
Reflect.defineMetadata(PLUGIN_OUTPUT_KEY, output, target, propertyKey);
};
}
export const PLUGIN_DOWNLOAD_KEY = "pipeline:plugin:download";
export function TaskDownload(output?: TaskOutputDefine): PropertyDecorator {
return (target, propertyKey) => {
target = Decorator.target(target, propertyKey);
Reflect.defineMetadata(PLUGIN_DOWNLOAD_KEY, output, target, propertyKey);
};
}

View File

@@ -1,4 +1,3 @@
import { ILogger } from "@midwayjs/logger";
import { ITaskPlugin } from "../api";
import { IsTaskPlugin, TaskInput } from "../decorator";
import { Autowire } from "../../decorator";
@@ -17,10 +16,6 @@ export class EchoPlugin implements ITaskPlugin {
})
test?: string;
@Autowire()
// @ts-ignore
logger: ILogger;
onInstance(): Promise<void> {
throw new Error("Method not implemented.");
}

View File

@@ -0,0 +1,10 @@
export type EmailSend = {
userId: number;
subject: string;
content: string;
receivers: string[];
};
export interface IEmailService {
send(email: EmailSend): Promise<void>;
}

View File

@@ -0,0 +1 @@
export * from "./email";

View File

@@ -0,0 +1,16 @@
import fs from "fs";
function getFileRootDir(rootDir?: string) {
if (rootDir == null) {
const userHome = process.env.HOME || process.env.USERPROFILE;
rootDir = userHome + "/.certd/storage/";
}
if (!fs.existsSync(rootDir)) {
fs.mkdirSync(rootDir, { recursive: true });
}
return rootDir;
}
export const fileUtils = {
getFileRootDir,
};

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

@@ -1,4 +1,4 @@
import { Autowire, ILogger, IsTaskPlugin, ITaskPlugin, TaskInput, TaskOutput } from "../src";
import { Autowire, IsTaskPlugin, ITaskPlugin, TaskInput, TaskOutput } from "../src";
@IsTaskPlugin({
name: "EchoPlugin",
@@ -14,9 +14,6 @@ export class EchoPlugin implements ITaskPlugin {
})
cert!: any;
@Autowire()
logger!: ILogger;
@TaskOutput({
title: "cert info",
})

View File

@@ -1,8 +1,9 @@
{
"compilerOptions": {
"importHelpers": false,
"target": "ESNext",
"useDefineForClassFields": true,
"module": "commonjs",
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
@@ -13,8 +14,10 @@
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"outDir": "./dist/ts"
"paths": {
"tslib" : ["./node_modules/tslib/tslib.d.ts"]
}
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue","test/**/*.ts"],
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue","test/**/*.ts","rollup.config.ts"],
}

View File

@@ -1,17 +1,20 @@
import { defineConfig } from "vite";
import visualizer from "rollup-plugin-visualizer";
import typescript from "@rollup/plugin-typescript";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [],
build: {
target: "es2015",
lib: {
entry: "src/index.ts",
name: "pipeline",
name: "CertdPipeline",
},
rollupOptions: {
plugins: [
visualizer(),
typescript({
target: "esnext",
target: "es2015",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
@@ -19,15 +22,36 @@ export default defineConfig({
allowSyntheticDefaultImports: true,
}),
],
external: ["vue", "lodash", "dayjs", "@fast-crud/fast-crud"],
external: [
"vue",
"lodash",
"dayjs",
"@certd/acme-client",
"@certd/plugin-cert",
"@certd/plugin-aliyun",
"@certd/plugin-tencent",
"@certd/plugin-huawei",
"@certd/plugin-host",
"@certd/plugin-tencent",
"@certd/plugin-util",
"log4js",
"@midwayjs/core",
"@midwayjs/decorator",
],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: "Vue",
lodash: "_",
dayjs: "dayjs",
"@fast-crud/fast-crud": "FastCrud",
"@certd/plugin-cert": "CertdPluginCert",
"@certd/acme-client": "CertdAcmeClient",
"@certd/plugin-aliyun": "CertdPluginAliyun",
"@certd/plugin-host": "CertdPluginHost",
"@certd/plugin-huawei": "CertdPluginHuawei",
"@certd/plugin-util": "CertdPluginUtil",
log4js: "log4js",
"@midwayjs/core": "MidwayjsCore",
"@midwayjs/decorator": "MidwayjsDecorator",
},
},
},

View File

@@ -12,6 +12,7 @@
"mocha": true
},
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-explicit-any": "off",

View File

@@ -0,0 +1,2 @@
node_modules
src

View File

@@ -3,6 +3,70 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.2](https://github.com/certd/certd/compare/v1.2.1...v1.20.2) (2024-02-28)
### Bug Fixes
* 临时修复阿里云domainlist接口返回域名列表不全的问题后续还需要增加翻页查询 ([849c145](https://github.com/certd/certd/commit/849c145926984762bd9dbec87bd91cd047fc0855))
## [1.2.1](https://github.com/certd/certd/compare/v1.2.0...v1.2.1) (2023-12-12)
**Note:** Version bump only for package @certd/plugin-aliyun
**Note:** Version bump only for package @certd/plugin-aliyun
# [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
# [1.1.0](https://github.com/certd/certd/compare/v1.0.6...v1.1.0) (2023-06-28)
### Features
* save files ([671d273](https://github.com/certd/certd/commit/671d273e2f9136d16896536b0ca127cf372f1619))
## [1.0.6](https://github.com/certd/certd/compare/v1.0.5...v1.0.6) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.0.5](https://github.com/certd/certd/compare/v1.0.4...v1.0.5) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.0.4](https://github.com/certd/certd/compare/v1.0.3...v1.0.4) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.0.3](https://github.com/certd/certd/compare/v1.0.2...v1.0.3) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-aliyun
## [1.0.2](https://github.com/certd/certd/compare/v1.0.1...v1.0.2) (2023-05-24)
**Note:** Version bump only for package @certd/plugin-aliyun

View File

@@ -1 +0,0 @@
export * from "./src";

View File

@@ -1,38 +1,39 @@
{
"name": "@certd/plugin-aliyun",
"private": false,
"version": "1.0.2",
"version": "1.20.2",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
"publishConfig": {
"main": "./dist/plugin-aliyun.umd.js",
"module": "./dist/plugin-aliyun.mjs",
"types": "./dist/es/plugin-aliyun.d.ts"
"main": "./dist/bundle.js",
"module": "./dist/bundle.mjs",
"types": "./dist/d/index.d.ts"
},
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"build1": "vue-tsc --noEmit && vite build",
"build": "rollup -c",
"preview": "vite preview"
},
"dependencies": {
"@alicloud/cs20151215": "^3.0.3",
"@alicloud/openapi-client": "^0.4.0",
"@alicloud/pop-core": "^1.7.10",
"@certd/acme-client": "^1.0.2",
"@certd/pipeline": "^1.0.2",
"@certd/plugin-cert": "^1.0.2",
"@certd/plugin-util": "^1.0.2",
"dayjs": "^1.11.6",
"lodash": "^4.17.21",
"node-forge": "^0.10.0"
},
"devDependencies": {
"@alicloud/cs20151215": "^3.0.3",
"@alicloud/openapi-client": "^0.4.0",
"@alicloud/pop-core": "^1.7.10",
"@certd/acme-client": "^1.20.2",
"@certd/pipeline": "^1.20.2",
"@certd/plugin-cert": "^1.20.2",
"@certd/plugin-util": "^1.20.2",
"@midwayjs/core": "^3.0.0",
"@midwayjs/decorator": "^3.0.0",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.0.0",
"@types/chai": "^4.3.3",
"@types/lodash": "^4.14.186",
"@types/mocha": "^10.0.0",
@@ -40,17 +41,23 @@
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"chai": "^4.3.6",
"dayjs": "^1.11.6",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"lodash": "^4.17.21",
"log4js": "^6.7.1",
"mocha": "^10.1.0",
"rollup": "^3.7.4",
"rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-visualizer": "^5.8.2",
"ts-node": "^10.9.1",
"tslib": "^2.5.2",
"typescript": "^4.8.4",
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -0,0 +1,43 @@
const resolve = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
//const Typescript = require("rollup-plugin-typescript2");
const Typescript = require("@rollup/plugin-typescript");
const json = require("@rollup/plugin-json");
const terser = require("@rollup/plugin-terser");
module.exports = {
input: "src/index.ts",
output: {
file: "dist/bundle.js",
format: "cjs",
},
plugins: [
// 解析第三方依赖
resolve(),
// 识别 commonjs 模式第三方依赖
commonjs(),
Typescript({
target: "esnext",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: ["./node_modules/**", "./src/**/*.vue"],
allowSyntheticDefaultImports: true,
}),
json(),
terser(),
],
external: [
"vue",
"lodash",
"dayjs",
"@certd/acme-client",
"@certd/pipeline",
"@certd/plugin-cert",
"@certd/plugin-aliyun",
"@certd/plugin-tencent",
"@certd/plugin-huawei",
"@certd/plugin-host",
"@certd/plugin-tencent",
"@certd/plugin-util",
],
};

View File

@@ -29,6 +29,7 @@ export class AliyunDnsProvider implements IDnsProvider {
async getDomainList() {
const params = {
RegionId: "cn-hangzhou",
PageSize: 100,
};
const requestOption = {
@@ -42,14 +43,16 @@ export class AliyunDnsProvider implements IDnsProvider {
async matchDomain(dnsRecord: string) {
const list = await this.getDomainList();
let domain = null;
const domainList = [];
for (const item of list) {
domainList.push(item.DomainName);
if (_.endsWith(dnsRecord, item.DomainName)) {
domain = item.DomainName;
break;
}
}
if (!domain) {
throw new Error("can not find Domain ," + dnsRecord);
throw new Error(`can not find Domain :${dnsRecord} ,list: ${JSON.stringify(domainList)}`);
}
return domain;
}

View File

@@ -1,3 +1,3 @@
export * from "./access";
export * from "./dns-provider";
export * from "./plugin";
export * from "./access/index";
export * from "./dns-provider/index";
export * from "./plugin/index";

View File

@@ -1,9 +1,9 @@
import { AbstractTaskPlugin, Autowire, IAccessService, ILogger, IsTaskPlugin, RunStrategy, TaskInput, utils } from "@certd/pipeline";
import { AbstractTaskPlugin, IAccessService, ILogger, IsTaskPlugin, RunStrategy, TaskInput, utils } from "@certd/pipeline";
// @ts-ignore
import { ROAClient } from "@alicloud/pop-core";
import { AliyunAccess } from "../../access";
import { K8sClient } from "@certd/plugin-util";
import { appendTimeSuffix } from "../../utils";
import { appendTimeSuffix } from "../../utils/index";
import { CertInfo } from "@certd/plugin-cert";
@IsTaskPlugin({
@@ -103,11 +103,13 @@ export class DeployCertToAliyunAckIngressPlugin extends AbstractTaskPlugin {
})
accessId!: string;
@Autowire()
accessService!: IAccessService;
@Autowire()
logger!: ILogger;
async onInstance(): Promise<void> {
this.accessService = this.ctx.accessService;
this.logger = this.ctx.logger;
}
async execute(): Promise<void> {
console.log("开始部署证书到阿里云cdn");
const { regionId, ingressClass, clusterId, isPrivateIpAddress, cert } = this;

View File

@@ -1,4 +1,4 @@
import { AbstractTaskPlugin, Autowire, IAccessService, ILogger, IsTaskPlugin, RunStrategy, TaskInput } from "@certd/pipeline";
import { AbstractTaskPlugin, IAccessService, ILogger, IsTaskPlugin, RunStrategy, TaskInput } from "@certd/pipeline";
import dayjs from "dayjs";
import Core from "@alicloud/pop-core";
import RPCClient from "@alicloud/pop-core";
@@ -17,7 +17,7 @@ import { AliyunAccess } from "../../access";
export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
@TaskInput({
title: "CDN加速域名",
helper: "你在阿里云上配置的CDN加速域名比如certd.docmirror.cn",
helper: "你在阿里云上配置的CDN加速域名比如:certd.docmirror.cn",
required: true,
})
domainName!: string;
@@ -49,13 +49,13 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
})
accessId!: string;
@Autowire()
accessService!: IAccessService;
@Autowire()
logger!: ILogger;
// eslint-disable-next-line @typescript-eslint/no-empty-function
async onInstance() {}
async onInstance() {
this.accessService = this.ctx.accessService;
this.logger = this.ctx.logger;
}
async execute(): Promise<void> {
console.log("开始部署证书到阿里云cdn");
const access = (await this.accessService.getById(this.accessId)) as AliyunAccess;

View File

@@ -1,3 +1,3 @@
export * from "./deploy-to-cdn";
export * from "./deploy-to-ack-ingress";
export * from "./upload-to-aliyun";
export * from "./deploy-to-cdn/index";
export * from "./deploy-to-ack-ingress/index";
export * from "./upload-to-aliyun/index";

View File

@@ -1,4 +1,4 @@
import { AbstractTaskPlugin, Autowire, IAccessService, IsTaskPlugin, RunStrategy, TaskInput, TaskOutput } from "@certd/pipeline";
import { AbstractTaskPlugin, IAccessService, IsTaskPlugin, RunStrategy, TaskInput, TaskOutput } from "@certd/pipeline";
import Core from "@alicloud/pop-core";
import { AliyunAccess } from "../../access";
import { appendTimeSuffix, checkRet, ZoneOptions } from "../../utils";
@@ -59,14 +59,13 @@ export class UploadCertToAliyun extends AbstractTaskPlugin {
})
aliyunCertId!: string;
@Autowire()
accessService!: IAccessService;
@Autowire()
logger!: Logger;
// eslint-disable-next-line @typescript-eslint/no-empty-function
async onInstance() {}
async onInstance() {
this.accessService = this.ctx.accessService;
this.logger = this.ctx.logger;
}
async execute(): Promise<void> {
console.log("开始部署证书到阿里云cdn");

View File

@@ -1,8 +1,9 @@
{
"compilerOptions": {
"importHelpers": false,
"target": "ESNext",
"useDefineForClassFields": true,
"module": "commonjs",
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
@@ -12,7 +13,11 @@
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"experimentalDecorators": true
"experimentalDecorators": true,
"paths": {
"tslib" : ["./node_modules/tslib/tslib.d.ts"]
}
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue","test/**/*.ts"],
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue","test/**/*.ts","rollup.config.ts"],
}

View File

@@ -1,4 +1,7 @@
import { defineConfig } from "vite";
import visualizer from "rollup-plugin-visualizer";
import typescript from "@rollup/plugin-typescript";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [],
@@ -8,15 +11,45 @@ export default defineConfig({
name: "pipeline",
},
rollupOptions: {
external: ["vue", "lodash", "dayjs", "@fast-crud/fast-crud"],
plugins: [
// @ts-ignore
visualizer(),
// @ts-ignore
typescript({
target: "esnext",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: ["./node_modules/**", "./src/**/*.vue"],
allowSyntheticDefaultImports: true,
}),
],
external: [
"vue",
"lodash",
"dayjs",
"@certd/acme-client",
"@certd/pipeline",
"@certd/plugin-cert",
"@certd/plugin-aliyun",
"@certd/plugin-tencent",
"@certd/plugin-huawei",
"@certd/plugin-host",
"@certd/plugin-tencent",
"@certd/plugin-util",
],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
vue: "Vue",
"lodash": "_",
lodash: "_",
dayjs: "dayjs",
"@fast-crud/fast-crud": "FastCrud",
"@certd/plugin-cert": "CertdPluginCert",
"@certd/acme-client": "CertdAcmeClient",
"@certd/pipeline": "CertdPluginPipeline",
"@certd/plugin-aliyun": "CertdPluginAliyun",
"@certd/plugin-host": "CertdPluginHost",
"@certd/plugin-huawei": "CertdPluginHuawei",
"@certd/plugin-util": "CertdPluginUtil",
},
},
},

View File

@@ -12,6 +12,7 @@
"mocha": true
},
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/no-explicit-any": "off",

View File

@@ -0,0 +1,2 @@
node_modules
src

View File

@@ -3,6 +3,68 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.20.2](https://github.com/certd/certd/compare/v1.2.1...v1.20.2) (2024-02-28)
**Note:** Version bump only for package @certd/plugin-all
## [1.2.1](https://github.com/certd/certd/compare/v1.2.0...v1.2.1) (2023-12-12)
**Note:** Version bump only for package @certd/plugin-all
**Note:** Version bump only for package @certd/plugin-all
# [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
# [1.1.0](https://github.com/certd/certd/compare/v1.0.6...v1.1.0) (2023-06-28)
**Note:** Version bump only for package @certd/plugin-all
## [1.0.6](https://github.com/certd/certd/compare/v1.0.5...v1.0.6) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-all
## [1.0.5](https://github.com/certd/certd/compare/v1.0.4...v1.0.5) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-all
## [1.0.4](https://github.com/certd/certd/compare/v1.0.3...v1.0.4) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-all
## [1.0.3](https://github.com/certd/certd/compare/v1.0.2...v1.0.3) (2023-05-25)
**Note:** Version bump only for package @certd/plugin-all
## [1.0.2](https://github.com/certd/certd/compare/v1.0.1...v1.0.2) (2023-05-24)
**Note:** Version bump only for package @certd/plugin-all

View File

@@ -1 +0,0 @@
export * from "./src";

View File

@@ -1,52 +1,52 @@
{
"name": "@certd/plugin-all",
"private": false,
"version": "1.0.2",
"version": "1.20.2",
"main": "./src/index.ts",
"module": "./src/index.ts",
"types": "./src/index.ts",
"publishConfig": {
"main": "./dist/plugin-all.umd.js",
"module": "./dist/plugin-all.mjs",
"types": "./dist/es/plugin-all.d.ts"
"main": "./dist/bundle.js",
"module": "./dist/bundle.mjs",
"types": "./dist/d/index.d.ts"
},
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"build2": " vite build",
"build": "rollup -c",
"preview": "vite preview"
},
"dependencies": {
"@certd/plugin-aliyun": "^1.0.2",
"@certd/plugin-cert": "^1.0.2",
"@certd/plugin-host": "^1.0.2",
"@certd/plugin-huawei": "^1.0.2",
"@certd/plugin-tencent": "^1.0.2"
},
"devDependencies": {
"@alicloud/cs20151215": "^3.0.3",
"@alicloud/openapi-client": "^0.4.0",
"@alicloud/pop-core": "^1.7.10",
"@certd/pipeline": "^1.0.2",
"@midwayjs/core": "^3.0.0",
"@midwayjs/decorator": "^3.0.0",
"@types/chai": "^4.3.3",
"@certd/pipeline": "^1.20.2",
"@certd/plugin-aliyun": "^1.20.2",
"@certd/plugin-cert": "^1.20.2",
"@certd/plugin-host": "^1.20.2",
"@certd/plugin-huawei": "^1.20.2",
"@certd/plugin-tencent": "^1.20.2",
"@rollup/plugin-commonjs": "^23.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^11.0.0",
"@types/chai": "^4.3.5",
"@types/jest": "^26.0.24",
"@types/lodash": "^4.14.186",
"@types/mocha": "^10.0.0",
"@types/node-forge": "^1.3.0",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"chai": "^4.3.6",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"log4js": "^6.7.1",
"mocha": "^10.1.0",
"rollup": "^3.7.4",
"rollup-plugin-typescript2": "^0.34.1",
"rollup-plugin-visualizer": "^5.8.2",
"ts-node": "^10.9.1",
"tslib": "^2.5.2",
"typescript": "^4.8.4",
"vite": "^3.1.0",
"vue-tsc": "^0.38.9"
},
"gitHead": "5950e1cae7cf30ebfc5128c15c7d1b0d101cbbb8"
"gitHead": "b258e926209fef4cc4d633b0383eb54e26c516f9"
}

View File

@@ -0,0 +1,43 @@
const resolve = require("@rollup/plugin-node-resolve");
const commonjs = require("@rollup/plugin-commonjs");
//const Typescript = require("rollup-plugin-typescript2");
const Typescript = require("@rollup/plugin-typescript");
const json = require("@rollup/plugin-json");
const terser = require("@rollup/plugin-terser");
module.exports = {
input: "src/index.ts",
output: {
file: "dist/bundle.js",
format: "cjs",
},
plugins: [
// 解析第三方依赖
resolve(),
// 识别 commonjs 模式第三方依赖
commonjs(),
Typescript({
target: "esnext",
rootDir: "src",
declaration: true,
declarationDir: "dist/d",
exclude: ["./node_modules/**", "./src/**/*.vue"],
allowSyntheticDefaultImports: true,
}),
json(),
terser(),
],
external: [
"vue",
"lodash",
"dayjs",
"@certd/acme-client",
"@certd/pipeline",
"@certd/plugin-cert",
"@certd/plugin-aliyun",
"@certd/plugin-tencent",
"@certd/plugin-huawei",
"@certd/plugin-host",
"@certd/plugin-tencent",
"@certd/plugin-util",
],
};

View File

@@ -7,6 +7,7 @@ import "../../src";
import "../plugin/echo-plugin";
describe("pipeline-hauwei-test", function () {
it("#pipeline", async function () {
//@ts-ignore
this.timeout(120000);
async function onChanged(history: RunHistory) {
console.log("changed:");

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,18 +1,26 @@
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";
describe("pipeline", function () {
it("#pipeline", async function () {
//@ts-ignore
this.timeout(120000);
async function onChanged(history: RunHistory) {
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

@@ -2,7 +2,7 @@
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
"module": "commonjs",
"module": "ESNext",
"moduleResolution": "Node",
"strict": true,
"jsx": "preserve",
@@ -12,7 +12,10 @@
"esModuleInterop": true,
"lib": ["ESNext", "DOM"],
"skipLibCheck": true,
"experimentalDecorators": true
"experimentalDecorators": true,
"paths": {
"tslib" : ["./node_modules/tslib/tslib.d.ts"]
}
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue","test/**/*.ts"],
}

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