Skip to content

Commit 2eb918a

Browse files
authored
Merge pull request #605 from actiontech/chore/upgrad-api-tools-config
[chore]: adapt to API generator tool upgrade
2 parents 3e99cae + ba8d603 commit 2eb918a

File tree

4 files changed

+39
-22
lines changed

4 files changed

+39
-22
lines changed

.apiforgerc

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"client": {
3+
"sqle-ui": {
4+
"project": "sqle-ui",
5+
"output": "packages/shared/lib/api/sqle/service",
6+
"branch": "main",
7+
"swaggerPath": "",
8+
"swaggerOutput": "",
9+
"plugin": "dot-remove",
10+
"template": "complex"
11+
},
12+
"dms-ui": {
13+
"project": "dms-ui",
14+
"output": "packages/shared/lib/api/base/service",
15+
"branch": "main",
16+
"swaggerPath": "",
17+
"swaggerOutput": "",
18+
"plugin": "simple-cleaner",
19+
"template": "complex"
20+
}
21+
},
22+
"mocks": {
23+
"packages/shared/lib/api/sqle/service": {
24+
"clientPath": "packages/shared/lib/api/sqle/service",
25+
"output": "packages/sqle/src/testUtils/mockApi",
26+
"utilsAlias": "@actiontech/shared/lib/testUtil/mockApi",
27+
"serviceAlias": "@actiontech/shared/lib/api/sqle/service"
28+
},
29+
"packages/shared/lib/api/base/service": {
30+
"clientPath": "packages/shared/lib/api/base/service",
31+
"output": "packages/base/src/testUtils/mockApi",
32+
"utilsAlias": "@actiontech/shared/lib/testUtil/mockApi",
33+
"serviceAlias": "@actiontech/shared/lib/api/base/service"
34+
}
35+
}
36+
}

.apigeneratorrc

-20
This file was deleted.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"icon:docs:build": "pnpm --filter @actiontech/icons docs:build",
2929
"icon:build": "pnpm --filter @actiontech/icons build",
3030
"dms:g": "pnpm --filter @actiontech/cli-create-dms-page build && create-dms-page",
31-
"api:g": "sh ./scripts/api/gen_api.sh"
31+
"api_client:g": "sh ./scripts/api/gen_api.sh",
32+
"api_mocks:g": "npm_config_registry=http://10.186.18.19:4873 pnpx @actiontech/cli api-mocks -y"
3233
},
3334
"keywords": [],
3435
"author": "",

scripts/api/gen_api.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
npm_config_registry=http://10.186.18.19:4873 pnpx @actiontech/cli api-gen -y "$@" && pnpm --filter @actiontech/shared api:exports:g
3+
npm_config_registry=http://10.186.18.19:4873 pnpx @actiontech/cli api-client -y "$@" && pnpm --filter @actiontech/shared api:exports:g

0 commit comments

Comments
 (0)