Skip to content

Commit

Permalink
[chore]: adapt to API generator tool upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
LZS911 committed Mar 5, 2025
1 parent 3e99cae commit ba8d603
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 22 deletions.
36 changes: 36 additions & 0 deletions .apiforgerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"client": {
"sqle-ui": {
"project": "sqle-ui",
"output": "packages/shared/lib/api/sqle/service",
"branch": "main",
"swaggerPath": "",
"swaggerOutput": "",
"plugin": "dot-remove",
"template": "complex"
},
"dms-ui": {
"project": "dms-ui",
"output": "packages/shared/lib/api/base/service",
"branch": "main",
"swaggerPath": "",
"swaggerOutput": "",
"plugin": "simple-cleaner",
"template": "complex"
}
},
"mocks": {
"packages/shared/lib/api/sqle/service": {
"clientPath": "packages/shared/lib/api/sqle/service",
"output": "packages/sqle/src/testUtils/mockApi",
"utilsAlias": "@actiontech/shared/lib/testUtil/mockApi",
"serviceAlias": "@actiontech/shared/lib/api/sqle/service"
},
"packages/shared/lib/api/base/service": {
"clientPath": "packages/shared/lib/api/base/service",
"output": "packages/base/src/testUtils/mockApi",
"utilsAlias": "@actiontech/shared/lib/testUtil/mockApi",
"serviceAlias": "@actiontech/shared/lib/api/base/service"
}
}
}
20 changes: 0 additions & 20 deletions .apigeneratorrc

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"icon:docs:build": "pnpm --filter @actiontech/icons docs:build",
"icon:build": "pnpm --filter @actiontech/icons build",
"dms:g": "pnpm --filter @actiontech/cli-create-dms-page build && create-dms-page",
"api:g": "sh ./scripts/api/gen_api.sh"
"api_client:g": "sh ./scripts/api/gen_api.sh",
"api_mocks:g": "npm_config_registry=http://10.186.18.19:4873 pnpx @actiontech/cli api-mocks -y"
},
"keywords": [],
"author": "",
Expand Down
2 changes: 1 addition & 1 deletion scripts/api/gen_api.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

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

0 comments on commit ba8d603

Please sign in to comment.