Skip to content

Commit f6133e0

Browse files
committed
Merge branch 'dev'
2 parents d40271a + 4a20992 commit f6133e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2704
-720
lines changed

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"prepatch",
9191
"promisify",
9292
"pty",
93+
"Qrcode",
9394
"readdir",
9495
"readme",
9596
"readonly",

CHANGELOG.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44

55
1. 重构项目,合理规划代码
66
2. 新增`build-mp`指令构建小程序
7-
3. `end` `combine` 指令支持批量操作
8-
4. `build`指令改造成可选参数形式,project参数取消必填限制
9-
5. 构建配置支持在list里面设置token
10-
6. 清理不需要的依赖包
11-
7. 升级依赖包
7+
3. 新增`miniprogram`指令操作小程序
8+
4. `end` `combine` 指令支持批量操作
9+
5. `build`指令改造成可选参数形式,project参数取消必填限制
10+
6. 构建配置支持在list里面设置token
11+
7. 清理不需要的依赖包
12+
8. 升级依赖包
1213

1314
## 2024.03.17 v6.4.0
1415

build/packages.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,20 @@ export const packages: PackageManifest[] = [
4444
display: 'gitmars go'
4545
},
4646
{
47-
name: 'api',
48-
pkgName: '@gitmars/api',
47+
name: 'build',
48+
pkgName: '@gitmars/build',
4949
buildTask: 'bundle',
5050
iife: false,
5151
browser: false,
52-
display: 'gitmars api'
52+
display: 'gitmars build'
5353
},
5454
{
55-
name: 'build',
56-
pkgName: '@gitmars/build',
55+
name: 'api',
56+
pkgName: '@gitmars/api',
5757
buildTask: 'bundle',
5858
iife: false,
5959
browser: false,
60-
display: 'gitmars build'
60+
display: 'gitmars api'
6161
},
6262
{
6363
name: 'core',

build/rollup.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,16 @@ function createEntry(config: Config) {
229229
'fast-glob',
230230
'find-up',
231231
'inquirer',
232+
'jimp',
233+
'jsqr',
232234
'js-cool',
233235
'lcid',
234236
'load-yml',
235237
'micromatch',
236238
'node-apollo',
237239
'ora',
238240
'os-lang',
241+
'qrcode',
239242
'semver-diff',
240243
'shelljs',
241244
'slash',

package.json

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "@gitmars/monorepo",
33
"description": "这是一个git工作流工具",
4-
"version": "7.0.0-beta.24",
5-
"packageManager": "pnpm@9.0.6",
4+
"version": "7.0.0",
5+
"packageManager": "pnpm@9.1.0",
66
"main": "index.js",
77
"files": [
88
"static",
@@ -46,17 +46,17 @@
4646
"@node-kit/extra.fs": "^3.2.0",
4747
"chalk": "^4.1.2",
4848
"debug": "^4.3.4",
49-
"js-cool": "^5.19.0",
49+
"js-cool": "^5.19.1",
5050
"morgan": "^1.10.0",
5151
"os-lang": "^3.2.0"
5252
},
5353
"devDependencies": {
54-
"@babel/preset-env": "^7.24.4",
54+
"@babel/preset-env": "^7.24.5",
5555
"@babel/preset-typescript": "^7.24.1",
5656
"@esbuild-kit/cjs-loader": "^2.4.4",
5757
"@esbuild-kit/esm-loader": "^2.6.5",
5858
"@eslint-sets/eslint-config-ts": "^5.13.0",
59-
"@microsoft/api-extractor": "^7.43.1",
59+
"@microsoft/api-extractor": "^7.43.3",
6060
"@pnpm/logger": "^5.0.0",
6161
"@rollup/plugin-alias": "^5.1.0",
6262
"@rollup/plugin-babel": "^6.0.4",
@@ -67,13 +67,13 @@
6767
"@rollup/plugin-terser": "^0.4.4",
6868
"@rollup/plugin-typescript": "^11.1.6",
6969
"@types/gulp": "^4.0.17",
70-
"@types/node": "^20.12.7",
70+
"@types/node": "^20.12.11",
7171
"@types/rollup-plugin-css-only": "^3.1.3",
7272
"@vitejs/plugin-vue": "^5.0.4",
7373
"@vitejs/plugin-vue-jsx": "^3.1.0",
7474
"consola": "^3.2.3",
7575
"cross-env": "^7.0.3",
76-
"esbuild": "^0.20.2",
76+
"esbuild": "^0.21.1",
7777
"eslint": "^8.57.0",
7878
"fast-glob": "^3.3.2",
7979
"gulp": "^5.0.0",
@@ -86,7 +86,7 @@
8686
"reinstaller": "^3.0.2",
8787
"rimraf": "^5.0.5",
8888
"rm-all": "^1.1.1",
89-
"rollup": "^4.16.4",
89+
"rollup": "^4.17.2",
9090
"rollup-plugin-add-banner": "^1.1.0",
9191
"rollup-plugin-css-only": "^4.5.2",
9292
"rollup-plugin-esbuild": "^6.1.1",
@@ -96,9 +96,9 @@
9696
"rollup-plugin-visualizer": "^5.12.0",
9797
"tsnd": "^1.1.0",
9898
"typedoc": "^0.25.13",
99-
"typedoc-plugin-markdown": "^3.17.1",
99+
"typedoc-plugin-markdown": "^4.0.1",
100100
"typescript": "^5.4.5",
101-
"unplugin-vue-define-options": "^1.4.3",
101+
"unplugin-vue-define-options": "^1.4.4",
102102
"zx": "^8.0.2"
103103
},
104104
"peerDependencies": {
@@ -131,6 +131,18 @@
131131
}
132132
}
133133
},
134+
"workspaces": [
135+
"packages/utils",
136+
"packages/git",
137+
"packages/hook",
138+
"packages/cache",
139+
"packages/go",
140+
"packages/api",
141+
"packages/build",
142+
"packages/core",
143+
"packages/gitmars",
144+
"packages/docs"
145+
],
134146
"keywords": [
135147
"gitmars",
136148
"git",

packages/api/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@gitmars/api",
33
"description": "gitmars api",
4-
"version": "7.0.0-beta.24",
4+
"version": "7.0.0",
55
"private": false,
66
"main": "./dist/index.cjs.js",
77
"module": "./dist/index.esm-bundler.js",
@@ -27,6 +27,7 @@
2727
"src": "src"
2828
},
2929
"dependencies": {
30+
"@gitmars/build": "workspace:*",
3031
"@gitmars/core": "workspace:*",
3132
"@gitmars/git": "workspace:*",
3233
"@gitmars/utils": "workspace:*",
@@ -37,7 +38,7 @@
3738
},
3839
"devDependencies": {
3940
"@eslint-sets/eslint-config-ts": "^5.13.0",
40-
"@types/node": "^20.12.7",
41+
"@types/node": "^20.12.11",
4142
"@types/shelljs": "^0.8.15",
4243
"cross-env": "^7.0.3",
4344
"eslint": "^8.57.0",

packages/api/src/index.default.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ import {
1818
getMergeRequestNotesList,
1919
updateMergeRequestNotes
2020
} from './mergeRequestNotes'
21+
import {
22+
getAuditStatus,
23+
getAuthorizerListWithAllDetail,
24+
getPreAuthQrCode,
25+
getTrialQrCode,
26+
submitAudit
27+
} from './miniprogram'
2128

2229
export type * from './types'
2330
export default {
@@ -33,9 +40,16 @@ export default {
3340
acceptMergeRequest,
3441
updateMergeRequest,
3542
deleteMergeRequest,
43+
// mergeRequestNotes
3644
createMergeRequestNotes,
3745
deleteMergeRequestNotes,
3846
getMergeRequestNotesDetail,
3947
getMergeRequestNotesList,
40-
updateMergeRequestNotes
48+
updateMergeRequestNotes,
49+
// miniprogram
50+
getAuthorizerListWithAllDetail,
51+
getAuditStatus,
52+
getTrialQrCode,
53+
submitAudit,
54+
getPreAuthQrCode
4155
}

packages/api/src/index.ts

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
11
export { default as getUserInfo } from './getUserInfo'
2-
export {
3-
createMergeRequest,
4-
getMergeRequestList,
5-
getMergeRequestCommits,
6-
getMergeRequestCloseIssues,
7-
getMergeRequestParticipants,
8-
getMergeRequestChanges,
9-
getMergeRequestDiffVersions,
10-
acceptMergeRequest,
11-
updateMergeRequest,
12-
deleteMergeRequest
13-
} from './mergeRequest'
14-
export {
15-
createMergeRequestNotes,
16-
deleteMergeRequestNotes,
17-
getMergeRequestNotesDetail,
18-
getMergeRequestNotesList,
19-
updateMergeRequestNotes
20-
} from './mergeRequestNotes'
2+
export * from './mergeRequest'
3+
export * from './mergeRequestNotes'
4+
export * from './miniprogram'
215

226
export { default } from './index.default'
23-
export type * from './index.default'
7+
export type * from './types'
248
export const version = '__VERSION__' as string
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import { post } from '../request/miniprogram'
2+
3+
const URL_PREFIX = '/api/component/weixin/authorization'
4+
5+
export interface GetAuthorizerListWithAllDetailOptions {
6+
current?: number
7+
limit?: number
8+
keyword?: string
9+
}
10+
export interface GetAuthorizerListWithAllDetailItem {
11+
auth_time: number
12+
authorization_info: {
13+
authorizer_appid: string
14+
func_info: Record<string, unknown>
15+
}
16+
authorizer_appid: string
17+
authorizer_info: {
18+
MiniProgramInfo: Record<string, unknown>
19+
account_status: number
20+
alias: string
21+
basic_config: Record<string, unknown>
22+
business_info: Record<string, unknown>
23+
head_img: string
24+
idc: number
25+
nick_name: string
26+
principal_name: string
27+
qrcode_url: string
28+
register_type: number
29+
service_type_info: Record<string, unknown>
30+
signature: string
31+
user_name: string
32+
verify_type_info: Record<string, unknown>
33+
}
34+
release_info: {
35+
release_desc: string
36+
release_time: number
37+
release_version: string
38+
}
39+
}
40+
export interface GetAuthorizerListWithAllDetail {
41+
total: number
42+
list: GetAuthorizerListWithAllDetailItem[]
43+
current: number
44+
limit: number // max is 500
45+
}
46+
/**
47+
* getAuthorizerListWithAllDetail
48+
*
49+
* @param options - options
50+
* @returns data
51+
*/
52+
export async function getAuthorizerListWithAllDetail<
53+
T extends GetAuthorizerListWithAllDetailOptions
54+
>(options?: T) {
55+
const { current = 1, limit = 50, keyword } = options || {}
56+
return post<GetAuthorizerListWithAllDetail>({
57+
url: `${URL_PREFIX}/getAuthorizerListWithAllDetail`,
58+
data: {
59+
current,
60+
limit,
61+
keyword
62+
}
63+
})
64+
}
65+
66+
export default {
67+
getAuthorizerListWithAllDetail
68+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { get } from '../request/miniprogram'
2+
3+
const URL_PREFIX = '/api/component/clients'
4+
5+
export interface GetClientsConfig {
6+
appID: string
7+
extJson: string
8+
config: string
9+
createTime: string
10+
updateTime: string
11+
id: string
12+
}
13+
/**
14+
* get clients config by appID
15+
*
16+
* @param appID - miniprogram appID
17+
* @returns data
18+
*/
19+
export async function getClientsConfig(appID: string) {
20+
return get<GetClientsConfig>({
21+
url: `${URL_PREFIX}/configuration/getConfig`,
22+
data: {
23+
appID
24+
}
25+
})
26+
}
27+
28+
export default {
29+
getClientsConfig
30+
}

packages/api/src/miniprogram/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export * from './authorization'
2+
export * from './mpManage'
3+
export * from './ticket'
4+
export * from './clients'

0 commit comments

Comments
 (0)