Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
saqqdy committed May 10, 2024
2 parents d40271a + 4a20992 commit f6133e0
Show file tree
Hide file tree
Showing 76 changed files with 2,704 additions and 720 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"prepatch",
"promisify",
"pty",
"Qrcode",
"readdir",
"readme",
"readonly",
Expand Down
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

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

## 2024.03.17 v6.4.0

Expand Down
12 changes: 6 additions & 6 deletions build/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,20 @@ export const packages: PackageManifest[] = [
display: 'gitmars go'
},
{
name: 'api',
pkgName: '@gitmars/api',
name: 'build',
pkgName: '@gitmars/build',
buildTask: 'bundle',
iife: false,
browser: false,
display: 'gitmars api'
display: 'gitmars build'
},
{
name: 'build',
pkgName: '@gitmars/build',
name: 'api',
pkgName: '@gitmars/api',
buildTask: 'bundle',
iife: false,
browser: false,
display: 'gitmars build'
display: 'gitmars api'
},
{
name: 'core',
Expand Down
3 changes: 3 additions & 0 deletions build/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,16 @@ function createEntry(config: Config) {
'fast-glob',
'find-up',
'inquirer',
'jimp',
'jsqr',
'js-cool',
'lcid',
'load-yml',
'micromatch',
'node-apollo',
'ora',
'os-lang',
'qrcode',
'semver-diff',
'shelljs',
'slash',
Expand Down
32 changes: 22 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@gitmars/monorepo",
"description": "这是一个git工作流工具",
"version": "7.0.0-beta.24",
"packageManager": "pnpm@9.0.6",
"version": "7.0.0",
"packageManager": "pnpm@9.1.0",
"main": "index.js",
"files": [
"static",
Expand Down Expand Up @@ -46,17 +46,17 @@
"@node-kit/extra.fs": "^3.2.0",
"chalk": "^4.1.2",
"debug": "^4.3.4",
"js-cool": "^5.19.0",
"js-cool": "^5.19.1",
"morgan": "^1.10.0",
"os-lang": "^3.2.0"
},
"devDependencies": {
"@babel/preset-env": "^7.24.4",
"@babel/preset-env": "^7.24.5",
"@babel/preset-typescript": "^7.24.1",
"@esbuild-kit/cjs-loader": "^2.4.4",
"@esbuild-kit/esm-loader": "^2.6.5",
"@eslint-sets/eslint-config-ts": "^5.13.0",
"@microsoft/api-extractor": "^7.43.1",
"@microsoft/api-extractor": "^7.43.3",
"@pnpm/logger": "^5.0.0",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-babel": "^6.0.4",
Expand All @@ -67,13 +67,13 @@
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@types/gulp": "^4.0.17",
"@types/node": "^20.12.7",
"@types/node": "^20.12.11",
"@types/rollup-plugin-css-only": "^3.1.3",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"consola": "^3.2.3",
"cross-env": "^7.0.3",
"esbuild": "^0.20.2",
"esbuild": "^0.21.1",
"eslint": "^8.57.0",
"fast-glob": "^3.3.2",
"gulp": "^5.0.0",
Expand All @@ -86,7 +86,7 @@
"reinstaller": "^3.0.2",
"rimraf": "^5.0.5",
"rm-all": "^1.1.1",
"rollup": "^4.16.4",
"rollup": "^4.17.2",
"rollup-plugin-add-banner": "^1.1.0",
"rollup-plugin-css-only": "^4.5.2",
"rollup-plugin-esbuild": "^6.1.1",
Expand All @@ -96,9 +96,9 @@
"rollup-plugin-visualizer": "^5.12.0",
"tsnd": "^1.1.0",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^3.17.1",
"typedoc-plugin-markdown": "^4.0.1",
"typescript": "^5.4.5",
"unplugin-vue-define-options": "^1.4.3",
"unplugin-vue-define-options": "^1.4.4",
"zx": "^8.0.2"
},
"peerDependencies": {
Expand Down Expand Up @@ -131,6 +131,18 @@
}
}
},
"workspaces": [
"packages/utils",
"packages/git",
"packages/hook",
"packages/cache",
"packages/go",
"packages/api",
"packages/build",
"packages/core",
"packages/gitmars",
"packages/docs"
],
"keywords": [
"gitmars",
"git",
Expand Down
5 changes: 3 additions & 2 deletions packages/api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@gitmars/api",
"description": "gitmars api",
"version": "7.0.0-beta.24",
"version": "7.0.0",
"private": false,
"main": "./dist/index.cjs.js",
"module": "./dist/index.esm-bundler.js",
Expand All @@ -27,6 +27,7 @@
"src": "src"
},
"dependencies": {
"@gitmars/build": "workspace:*",
"@gitmars/core": "workspace:*",
"@gitmars/git": "workspace:*",
"@gitmars/utils": "workspace:*",
Expand All @@ -37,7 +38,7 @@
},
"devDependencies": {
"@eslint-sets/eslint-config-ts": "^5.13.0",
"@types/node": "^20.12.7",
"@types/node": "^20.12.11",
"@types/shelljs": "^0.8.15",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
Expand Down
16 changes: 15 additions & 1 deletion packages/api/src/index.default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ import {
getMergeRequestNotesList,
updateMergeRequestNotes
} from './mergeRequestNotes'
import {
getAuditStatus,
getAuthorizerListWithAllDetail,
getPreAuthQrCode,
getTrialQrCode,
submitAudit
} from './miniprogram'

export type * from './types'
export default {
Expand All @@ -33,9 +40,16 @@ export default {
acceptMergeRequest,
updateMergeRequest,
deleteMergeRequest,
// mergeRequestNotes
createMergeRequestNotes,
deleteMergeRequestNotes,
getMergeRequestNotesDetail,
getMergeRequestNotesList,
updateMergeRequestNotes
updateMergeRequestNotes,
// miniprogram
getAuthorizerListWithAllDetail,
getAuditStatus,
getTrialQrCode,
submitAudit,
getPreAuthQrCode
}
24 changes: 4 additions & 20 deletions packages/api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
export { default as getUserInfo } from './getUserInfo'
export {
createMergeRequest,
getMergeRequestList,
getMergeRequestCommits,
getMergeRequestCloseIssues,
getMergeRequestParticipants,
getMergeRequestChanges,
getMergeRequestDiffVersions,
acceptMergeRequest,
updateMergeRequest,
deleteMergeRequest
} from './mergeRequest'
export {
createMergeRequestNotes,
deleteMergeRequestNotes,
getMergeRequestNotesDetail,
getMergeRequestNotesList,
updateMergeRequestNotes
} from './mergeRequestNotes'
export * from './mergeRequest'
export * from './mergeRequestNotes'
export * from './miniprogram'

export { default } from './index.default'
export type * from './index.default'
export type * from './types'
export const version = '__VERSION__' as string
68 changes: 68 additions & 0 deletions packages/api/src/miniprogram/authorization.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { post } from '../request/miniprogram'

const URL_PREFIX = '/api/component/weixin/authorization'

export interface GetAuthorizerListWithAllDetailOptions {
current?: number
limit?: number
keyword?: string
}
export interface GetAuthorizerListWithAllDetailItem {
auth_time: number
authorization_info: {
authorizer_appid: string
func_info: Record<string, unknown>
}
authorizer_appid: string
authorizer_info: {
MiniProgramInfo: Record<string, unknown>
account_status: number
alias: string
basic_config: Record<string, unknown>
business_info: Record<string, unknown>
head_img: string
idc: number
nick_name: string
principal_name: string
qrcode_url: string
register_type: number
service_type_info: Record<string, unknown>
signature: string
user_name: string
verify_type_info: Record<string, unknown>
}
release_info: {
release_desc: string
release_time: number
release_version: string
}
}
export interface GetAuthorizerListWithAllDetail {
total: number
list: GetAuthorizerListWithAllDetailItem[]
current: number
limit: number // max is 500
}
/**
* getAuthorizerListWithAllDetail
*
* @param options - options
* @returns data
*/
export async function getAuthorizerListWithAllDetail<
T extends GetAuthorizerListWithAllDetailOptions
>(options?: T) {
const { current = 1, limit = 50, keyword } = options || {}
return post<GetAuthorizerListWithAllDetail>({
url: `${URL_PREFIX}/getAuthorizerListWithAllDetail`,
data: {
current,
limit,
keyword
}
})
}

export default {
getAuthorizerListWithAllDetail
}
30 changes: 30 additions & 0 deletions packages/api/src/miniprogram/clients.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { get } from '../request/miniprogram'

const URL_PREFIX = '/api/component/clients'

export interface GetClientsConfig {
appID: string
extJson: string
config: string
createTime: string
updateTime: string
id: string
}
/**
* get clients config by appID
*
* @param appID - miniprogram appID
* @returns data
*/
export async function getClientsConfig(appID: string) {
return get<GetClientsConfig>({
url: `${URL_PREFIX}/configuration/getConfig`,
data: {
appID
}
})
}

export default {
getClientsConfig
}
4 changes: 4 additions & 0 deletions packages/api/src/miniprogram/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './authorization'
export * from './mpManage'
export * from './ticket'
export * from './clients'
Loading

0 comments on commit f6133e0

Please sign in to comment.