release: v0.4.1 - GitLab支持、迁移优化、Bug修复
Some checks failed
Release / build-windows (push) Has been cancelled
Some checks failed
Release / build-windows (push) Has been cancelled
✨ 新功能: - GitLab 平台完整支持(16+7 个 API 方法、前端图标/选择器) - Release 同步支持手动输入 Token 🐛 Bug 修复: - 自建平台凭证匹配(BaseURL 优先精确匹配) - Gitea 迁移 API service 字段类型修复(HTTP 422) - 构建时不再覆盖已有 config.yaml(数据丢失问题) - 错误信息显示实际 URL 🔨 改进: - 源平台开启代理时自动跳过 Gitea 原生迁移,改用本地代理中转 - Push 超时从 30s 提升到 10 分钟 - 设置 http.postBuffer=500MB,push --all 失败自动逐分支推送 - 新增 RunWithProxyTimeout 方法
This commit is contained in:
@@ -75,6 +75,21 @@ export function AddRemote(path, name, url) {
|
||||
return $Call.ByID(3697916441, path, name, url);
|
||||
}
|
||||
|
||||
/**
|
||||
* BatchMigrateProjects 批量迁移项目到目标平台
|
||||
* @param {string[]} projectPaths
|
||||
* @param {string} targetCredPlatform
|
||||
* @param {string} targetCredUsername
|
||||
* @param {string} description
|
||||
* @param {boolean} $private
|
||||
* @returns {$CancellablePromise<$models.MigrateResult[]>}
|
||||
*/
|
||||
export function BatchMigrateProjects(projectPaths, targetCredPlatform, targetCredUsername, description, $private) {
|
||||
return $Call.ByID(1641390103, projectPaths, targetCredPlatform, targetCredUsername, description, $private).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType1($result);
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* BatchPull 批量拉取指定项目
|
||||
* @param {string[]} paths
|
||||
@@ -83,7 +98,7 @@ export function AddRemote(path, name, url) {
|
||||
*/
|
||||
export function BatchPull(paths, remote) {
|
||||
return $Call.ByID(758996647, paths, remote).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType1($result);
|
||||
return $$createType3($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -95,7 +110,7 @@ export function BatchPull(paths, remote) {
|
||||
*/
|
||||
export function BatchPush(paths, remote) {
|
||||
return $Call.ByID(794082076, paths, remote).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType1($result);
|
||||
return $$createType3($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -105,7 +120,7 @@ export function BatchPush(paths, remote) {
|
||||
*/
|
||||
export function CheckGitInstalled() {
|
||||
return $Call.ByID(464620426).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType2($result);
|
||||
return $$createType4($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -221,7 +236,7 @@ export function FetchProject(path, remote) {
|
||||
*/
|
||||
export function GetAllProjectOverview() {
|
||||
return $Call.ByID(2453130151).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType4($result);
|
||||
return $$createType6($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -231,7 +246,7 @@ export function GetAllProjectOverview() {
|
||||
*/
|
||||
export function GetAppSettings() {
|
||||
return $Call.ByID(428589026).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType6($result);
|
||||
return $$createType8($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -242,7 +257,7 @@ export function GetAppSettings() {
|
||||
*/
|
||||
export function GetBranches(path) {
|
||||
return $Call.ByID(1686190192, path).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType8($result);
|
||||
return $$createType10($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -275,7 +290,7 @@ export function GetCommitFileDiff(path, hash, filePath) {
|
||||
*/
|
||||
export function GetCommitFiles(path, hash) {
|
||||
return $Call.ByID(2420707876, path, hash).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType10($result);
|
||||
return $$createType12($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -287,7 +302,7 @@ export function GetCommitFiles(path, hash) {
|
||||
*/
|
||||
export function GetCommitLog(path, count) {
|
||||
return $Call.ByID(1281870789, path, count).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType12($result);
|
||||
return $$createType14($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -308,7 +323,7 @@ export function GetConflictFileContent(projectPath, filePath) {
|
||||
*/
|
||||
export function GetConflictFiles(path) {
|
||||
return $Call.ByID(2446806137, path).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType14($result);
|
||||
return $$createType16($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -318,7 +333,7 @@ export function GetConflictFiles(path) {
|
||||
*/
|
||||
export function GetCredentials() {
|
||||
return $Call.ByID(4214051290).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType16($result);
|
||||
return $$createType18($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -358,7 +373,7 @@ export function GetFileDiffStaged(projectPath, filePath) {
|
||||
*/
|
||||
export function GetGitGlobalConfig() {
|
||||
return $Call.ByID(154811497).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType18($result);
|
||||
return $$createType20($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -368,7 +383,7 @@ export function GetGitGlobalConfig() {
|
||||
*/
|
||||
export function GetGroups() {
|
||||
return $Call.ByID(1600884836).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType20($result);
|
||||
return $$createType22($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -379,7 +394,7 @@ export function GetGroups() {
|
||||
*/
|
||||
export function GetProjectChangedFiles(path) {
|
||||
return $Call.ByID(2302591462, path).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType22($result);
|
||||
return $$createType24($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -399,7 +414,7 @@ export function GetProjectProxy(path) {
|
||||
*/
|
||||
export function GetProjectStatus(path) {
|
||||
return $Call.ByID(3451089027, path).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType24($result);
|
||||
return $$createType26($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -409,7 +424,7 @@ export function GetProjectStatus(path) {
|
||||
*/
|
||||
export function GetProjectTree() {
|
||||
return $Call.ByID(651189689).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType26($result);
|
||||
return $$createType28($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -421,7 +436,21 @@ export function GetProjectTree() {
|
||||
*/
|
||||
export function GetRemoteBranches(path, remote) {
|
||||
return $Call.ByID(994796370, path, remote).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType8($result);
|
||||
return $$createType10($result);
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* GetRemoteReleases 获取指定远程仓库的 Release 列表
|
||||
* overrideToken: 前端传入的 Token,优先于凭证中的 Token
|
||||
* @param {string} projectPath
|
||||
* @param {string} remoteName
|
||||
* @param {string} overrideToken
|
||||
* @returns {$CancellablePromise<$models.ReleaseInfo[]>}
|
||||
*/
|
||||
export function GetRemoteReleases(projectPath, remoteName, overrideToken) {
|
||||
return $Call.ByID(280863080, projectPath, remoteName, overrideToken).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType30($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -432,7 +461,7 @@ export function GetRemoteBranches(path, remote) {
|
||||
*/
|
||||
export function GetRemotes(path) {
|
||||
return $Call.ByID(975520027, path).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType28($result);
|
||||
return $$createType32($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -443,7 +472,7 @@ export function GetRemotes(path) {
|
||||
*/
|
||||
export function GetStashList(path) {
|
||||
return $Call.ByID(1948257945, path).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType30($result);
|
||||
return $$createType34($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -454,7 +483,7 @@ export function GetStashList(path) {
|
||||
*/
|
||||
export function GetTags(path) {
|
||||
return $Call.ByID(3979169621, path).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType32($result);
|
||||
return $$createType36($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -487,6 +516,28 @@ export function MergeBranch(path, branch) {
|
||||
return $Call.ByID(278161076, path, branch);
|
||||
}
|
||||
|
||||
/**
|
||||
* MigrateProject 将项目迁移到目标平台
|
||||
* targetCredPlatform + targetCredUsername 用于定位目标凭证
|
||||
* repoName: 目标仓库名(空则用项目名)
|
||||
* remoteName: 新增的远程名(空则用平台名)
|
||||
* private: 是否私有仓库
|
||||
* description: 仓库描述
|
||||
* @param {string} projectPath
|
||||
* @param {string} targetCredPlatform
|
||||
* @param {string} targetCredUsername
|
||||
* @param {string} repoName
|
||||
* @param {string} remoteName
|
||||
* @param {string} description
|
||||
* @param {boolean} $private
|
||||
* @returns {$CancellablePromise<$models.MigrateResult | null>}
|
||||
*/
|
||||
export function MigrateProject(projectPath, targetCredPlatform, targetCredUsername, repoName, remoteName, description, $private) {
|
||||
return $Call.ByID(618007206, projectPath, targetCredPlatform, targetCredUsername, repoName, remoteName, description, $private).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType37($result);
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* MoveProjectToGroup 移动项目到指定分组
|
||||
* @param {string} path
|
||||
@@ -497,6 +548,46 @@ export function MoveProjectToGroup(path, group) {
|
||||
return $Call.ByID(1699187666, path, group);
|
||||
}
|
||||
|
||||
/**
|
||||
* OnlineMigrateCompare 对比两个平台的仓库列表
|
||||
* @param {string} srcPlatform
|
||||
* @param {string} srcBaseURL
|
||||
* @param {string} srcUsername
|
||||
* @param {string} srcToken
|
||||
* @param {string} tgtPlatform
|
||||
* @param {string} tgtBaseURL
|
||||
* @param {string} tgtUsername
|
||||
* @param {string} tgtToken
|
||||
* @returns {$CancellablePromise<$models.OnlineMigrateCompareResult | null>}
|
||||
*/
|
||||
export function OnlineMigrateCompare(srcPlatform, srcBaseURL, srcUsername, srcToken, tgtPlatform, tgtBaseURL, tgtUsername, tgtToken) {
|
||||
return $Call.ByID(3514758503, srcPlatform, srcBaseURL, srcUsername, srcToken, tgtPlatform, tgtBaseURL, tgtUsername, tgtToken).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType39($result);
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* OnlineMigrateExecute 执行在线迁移
|
||||
* @param {string} srcPlatform
|
||||
* @param {string} srcBaseURL
|
||||
* @param {string} srcUsername
|
||||
* @param {string} srcToken
|
||||
* @param {string} tgtPlatform
|
||||
* @param {string} tgtBaseURL
|
||||
* @param {string} tgtUsername
|
||||
* @param {string} tgtToken
|
||||
* @param {string[]} repoNames
|
||||
* @param {boolean} srcUseProxy
|
||||
* @param {boolean} tgtUseProxy
|
||||
* @param {$models.MigrateOptions} opts
|
||||
* @returns {$CancellablePromise<$models.OnlineMigrateItemResult[]>}
|
||||
*/
|
||||
export function OnlineMigrateExecute(srcPlatform, srcBaseURL, srcUsername, srcToken, tgtPlatform, tgtBaseURL, tgtUsername, tgtToken, repoNames, srcUseProxy, tgtUseProxy, opts) {
|
||||
return $Call.ByID(357541815, srcPlatform, srcBaseURL, srcUsername, srcToken, tgtPlatform, tgtBaseURL, tgtUsername, tgtToken, repoNames, srcUseProxy, tgtUseProxy, opts).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType41($result);
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* PullProject 拉取项目(当前分支,指定 remote)
|
||||
* @param {string} path
|
||||
@@ -536,7 +627,7 @@ export function PushTag(path, name, remote) {
|
||||
*/
|
||||
export function PushTagToAllRemotes(path, tagName) {
|
||||
return $Call.ByID(2343581171, path, tagName).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType34($result);
|
||||
return $$createType43($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -547,7 +638,7 @@ export function PushTagToAllRemotes(path, tagName) {
|
||||
*/
|
||||
export function PushToAllRemotes(path) {
|
||||
return $Call.ByID(1027392731, path).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType34($result);
|
||||
return $$createType43($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -642,7 +733,7 @@ export function SaveConflictFile(projectPath, filePath, content) {
|
||||
*/
|
||||
export function SearchCommitLog(path, keyword, author, maxCount) {
|
||||
return $Call.ByID(2874450917, path, keyword, author, maxCount).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType12($result);
|
||||
return $$createType14($result);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -760,6 +851,22 @@ export function SwitchBranch(path, branch) {
|
||||
return $Call.ByID(4262224900, path, branch);
|
||||
}
|
||||
|
||||
/**
|
||||
* SyncReleases 将源远程仓库的 Release 同步到目标远程仓库
|
||||
* 仅同步目标不存在的 Release,包括附件
|
||||
* @param {string} projectPath
|
||||
* @param {string} sourceRemote
|
||||
* @param {string} targetRemote
|
||||
* @param {string} srcOverrideToken
|
||||
* @param {string} tgtOverrideToken
|
||||
* @returns {$CancellablePromise<$models.ReleaseSyncResult[]>}
|
||||
*/
|
||||
export function SyncReleases(projectPath, sourceRemote, targetRemote, srcOverrideToken, tgtOverrideToken) {
|
||||
return $Call.ByID(3895607505, projectPath, sourceRemote, targetRemote, srcOverrideToken, tgtOverrideToken).then(/** @type {($result: any) => any} */(($result) => {
|
||||
return $$createType45($result);
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* UnstageAll 取消暂存所有文件
|
||||
* @param {string} path
|
||||
@@ -812,38 +919,49 @@ export function UpdateGroup(oldName, newName, icon) {
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = $models.BatchPullResult.createFrom;
|
||||
const $$createType0 = $models.MigrateResult.createFrom;
|
||||
const $$createType1 = $Create.Array($$createType0);
|
||||
const $$createType2 = $models.GitStatus.createFrom;
|
||||
const $$createType3 = $models.ProjectOverview.createFrom;
|
||||
const $$createType4 = $Create.Array($$createType3);
|
||||
const $$createType5 = config$0.Settings.createFrom;
|
||||
const $$createType6 = $Create.Nullable($$createType5);
|
||||
const $$createType7 = $models.BranchInfo.createFrom;
|
||||
const $$createType8 = $Create.Array($$createType7);
|
||||
const $$createType9 = $models.CommitFileInfo.createFrom;
|
||||
const $$createType2 = $models.BatchPullResult.createFrom;
|
||||
const $$createType3 = $Create.Array($$createType2);
|
||||
const $$createType4 = $models.GitStatus.createFrom;
|
||||
const $$createType5 = $models.ProjectOverview.createFrom;
|
||||
const $$createType6 = $Create.Array($$createType5);
|
||||
const $$createType7 = config$0.Settings.createFrom;
|
||||
const $$createType8 = $Create.Nullable($$createType7);
|
||||
const $$createType9 = $models.BranchInfo.createFrom;
|
||||
const $$createType10 = $Create.Array($$createType9);
|
||||
const $$createType11 = $models.CommitLog.createFrom;
|
||||
const $$createType11 = $models.CommitFileInfo.createFrom;
|
||||
const $$createType12 = $Create.Array($$createType11);
|
||||
const $$createType13 = $models.ConflictFileInfo.createFrom;
|
||||
const $$createType13 = $models.CommitLog.createFrom;
|
||||
const $$createType14 = $Create.Array($$createType13);
|
||||
const $$createType15 = $models.CredentialInfo.createFrom;
|
||||
const $$createType15 = $models.ConflictFileInfo.createFrom;
|
||||
const $$createType16 = $Create.Array($$createType15);
|
||||
const $$createType17 = $models.GitConfig.createFrom;
|
||||
const $$createType18 = $Create.Nullable($$createType17);
|
||||
const $$createType19 = config$0.Group.createFrom;
|
||||
const $$createType20 = $Create.Array($$createType19);
|
||||
const $$createType21 = $models.FileInfo.createFrom;
|
||||
const $$createType17 = $models.CredentialInfo.createFrom;
|
||||
const $$createType18 = $Create.Array($$createType17);
|
||||
const $$createType19 = $models.GitConfig.createFrom;
|
||||
const $$createType20 = $Create.Nullable($$createType19);
|
||||
const $$createType21 = config$0.Group.createFrom;
|
||||
const $$createType22 = $Create.Array($$createType21);
|
||||
const $$createType23 = $models.ProjectStatus.createFrom;
|
||||
const $$createType24 = $Create.Nullable($$createType23);
|
||||
const $$createType25 = $models.TreeNode.createFrom;
|
||||
const $$createType26 = $Create.Array($$createType25);
|
||||
const $$createType27 = $models.RemoteItem.createFrom;
|
||||
const $$createType23 = $models.FileInfo.createFrom;
|
||||
const $$createType24 = $Create.Array($$createType23);
|
||||
const $$createType25 = $models.ProjectStatus.createFrom;
|
||||
const $$createType26 = $Create.Nullable($$createType25);
|
||||
const $$createType27 = $models.TreeNode.createFrom;
|
||||
const $$createType28 = $Create.Array($$createType27);
|
||||
const $$createType29 = $models.StashInfo.createFrom;
|
||||
const $$createType29 = $models.ReleaseInfo.createFrom;
|
||||
const $$createType30 = $Create.Array($$createType29);
|
||||
const $$createType31 = $models.TagInfo.createFrom;
|
||||
const $$createType31 = $models.RemoteItem.createFrom;
|
||||
const $$createType32 = $Create.Array($$createType31);
|
||||
const $$createType33 = $models.PushAllResult.createFrom;
|
||||
const $$createType33 = $models.StashInfo.createFrom;
|
||||
const $$createType34 = $Create.Array($$createType33);
|
||||
const $$createType35 = $models.TagInfo.createFrom;
|
||||
const $$createType36 = $Create.Array($$createType35);
|
||||
const $$createType37 = $Create.Nullable($$createType0);
|
||||
const $$createType38 = $models.OnlineMigrateCompareResult.createFrom;
|
||||
const $$createType39 = $Create.Nullable($$createType38);
|
||||
const $$createType40 = $models.OnlineMigrateItemResult.createFrom;
|
||||
const $$createType41 = $Create.Array($$createType40);
|
||||
const $$createType42 = $models.PushAllResult.createFrom;
|
||||
const $$createType43 = $Create.Array($$createType42);
|
||||
const $$createType44 = $models.ReleaseSyncResult.createFrom;
|
||||
const $$createType45 = $Create.Array($$createType44);
|
||||
|
||||
@@ -8,6 +8,7 @@ export {
|
||||
};
|
||||
|
||||
export {
|
||||
AssetInfo,
|
||||
BatchPullResult,
|
||||
BranchInfo,
|
||||
CommitFileInfo,
|
||||
@@ -17,10 +18,17 @@ export {
|
||||
FileInfo,
|
||||
GitConfig,
|
||||
GitStatus,
|
||||
MigrateOptions,
|
||||
MigrateResult,
|
||||
OnlineMigrateCompareResult,
|
||||
OnlineMigrateItemResult,
|
||||
ProjectOverview,
|
||||
ProjectStatus,
|
||||
PushAllResult,
|
||||
ReleaseInfo,
|
||||
ReleaseSyncResult,
|
||||
RemoteItem,
|
||||
RepoInfo,
|
||||
StashInfo,
|
||||
TagInfo,
|
||||
TreeNode
|
||||
|
||||
@@ -6,6 +6,58 @@
|
||||
// @ts-ignore: Unused imports
|
||||
import { Create as $Create } from "@wailsio/runtime";
|
||||
|
||||
/**
|
||||
* AssetInfo Release 附件
|
||||
*/
|
||||
export class AssetInfo {
|
||||
/**
|
||||
* Creates a new AssetInfo instance.
|
||||
* @param {Partial<AssetInfo>} [$$source = {}] - The source object to create the AssetInfo.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("id" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["id"] = 0;
|
||||
}
|
||||
if (!("name" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["name"] = "";
|
||||
}
|
||||
if (!("size" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["size"] = 0;
|
||||
}
|
||||
if (!("downloadUrl" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["downloadUrl"] = "";
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new AssetInfo instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {AssetInfo}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new AssetInfo(/** @type {Partial<AssetInfo>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* BatchPullResult 批量 pull 结果
|
||||
*/
|
||||
@@ -425,6 +477,243 @@ export class GitStatus {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* MigrateOptions 迁移选项
|
||||
*/
|
||||
export class MigrateOptions {
|
||||
/**
|
||||
* Creates a new MigrateOptions instance.
|
||||
* @param {Partial<MigrateOptions>} [$$source = {}] - The source object to create the MigrateOptions.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("labels" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["labels"] = false;
|
||||
}
|
||||
if (!("issues" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["issues"] = false;
|
||||
}
|
||||
if (!("pullRequests" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["pullRequests"] = false;
|
||||
}
|
||||
if (!("releases" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["releases"] = false;
|
||||
}
|
||||
if (!("milestones" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["milestones"] = false;
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new MigrateOptions instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {MigrateOptions}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new MigrateOptions(/** @type {Partial<MigrateOptions>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* MigrateResult 迁移结果
|
||||
*/
|
||||
export class MigrateResult {
|
||||
/**
|
||||
* Creates a new MigrateResult instance.
|
||||
* @param {Partial<MigrateResult>} [$$source = {}] - The source object to create the MigrateResult.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("path" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["path"] = "";
|
||||
}
|
||||
if (!("name" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["name"] = "";
|
||||
}
|
||||
if (!("success" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["success"] = false;
|
||||
}
|
||||
if (!("message" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["message"] = "";
|
||||
}
|
||||
if (/** @type {any} */(false)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string | undefined}
|
||||
*/
|
||||
this["cloneUrl"] = undefined;
|
||||
}
|
||||
if (/** @type {any} */(false)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string | undefined}
|
||||
*/
|
||||
this["remoteName"] = undefined;
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new MigrateResult instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {MigrateResult}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new MigrateResult(/** @type {Partial<MigrateResult>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* OnlineMigrateCompareResult 在线迁移对比结果
|
||||
*/
|
||||
export class OnlineMigrateCompareResult {
|
||||
/**
|
||||
* Creates a new OnlineMigrateCompareResult instance.
|
||||
* @param {Partial<OnlineMigrateCompareResult>} [$$source = {}] - The source object to create the OnlineMigrateCompareResult.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("sourceRepos" in $$source)) {
|
||||
/**
|
||||
* 源平台所有仓库
|
||||
* @member
|
||||
* @type {RepoInfo[]}
|
||||
*/
|
||||
this["sourceRepos"] = [];
|
||||
}
|
||||
if (!("targetRepos" in $$source)) {
|
||||
/**
|
||||
* 目标平台所有仓库
|
||||
* @member
|
||||
* @type {RepoInfo[]}
|
||||
*/
|
||||
this["targetRepos"] = [];
|
||||
}
|
||||
if (!("missingRepos" in $$source)) {
|
||||
/**
|
||||
* 目标平台缺少的仓库
|
||||
* @member
|
||||
* @type {RepoInfo[]}
|
||||
*/
|
||||
this["missingRepos"] = [];
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new OnlineMigrateCompareResult instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {OnlineMigrateCompareResult}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
const $$createField0_0 = $$createType1;
|
||||
const $$createField1_0 = $$createType1;
|
||||
const $$createField2_0 = $$createType1;
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
if ("sourceRepos" in $$parsedSource) {
|
||||
$$parsedSource["sourceRepos"] = $$createField0_0($$parsedSource["sourceRepos"]);
|
||||
}
|
||||
if ("targetRepos" in $$parsedSource) {
|
||||
$$parsedSource["targetRepos"] = $$createField1_0($$parsedSource["targetRepos"]);
|
||||
}
|
||||
if ("missingRepos" in $$parsedSource) {
|
||||
$$parsedSource["missingRepos"] = $$createField2_0($$parsedSource["missingRepos"]);
|
||||
}
|
||||
return new OnlineMigrateCompareResult(/** @type {Partial<OnlineMigrateCompareResult>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* OnlineMigrateItemResult 单个仓库在线迁移结果
|
||||
*/
|
||||
export class OnlineMigrateItemResult {
|
||||
/**
|
||||
* Creates a new OnlineMigrateItemResult instance.
|
||||
* @param {Partial<OnlineMigrateItemResult>} [$$source = {}] - The source object to create the OnlineMigrateItemResult.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("name" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["name"] = "";
|
||||
}
|
||||
if (/** @type {any} */(false)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string | undefined}
|
||||
*/
|
||||
this["cloneUrl"] = undefined;
|
||||
}
|
||||
if (!("success" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["success"] = false;
|
||||
}
|
||||
if (!("message" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["message"] = "";
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new OnlineMigrateItemResult instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {OnlineMigrateItemResult}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new OnlineMigrateItemResult(/** @type {Partial<OnlineMigrateItemResult>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ProjectOverview 项目概览信息(轻量级)
|
||||
*/
|
||||
@@ -560,8 +849,8 @@ export class ProjectStatus {
|
||||
* @returns {ProjectStatus}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
const $$createField2_0 = $$createType1;
|
||||
const $$createField4_0 = $$createType3;
|
||||
const $$createField2_0 = $$createType3;
|
||||
const $$createField4_0 = $$createType5;
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
if ("remotes" in $$parsedSource) {
|
||||
$$parsedSource["remotes"] = $$createField2_0($$parsedSource["remotes"]);
|
||||
@@ -618,6 +907,149 @@ export class PushAllResult {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ReleaseInfo 通用 Release 信息
|
||||
*/
|
||||
export class ReleaseInfo {
|
||||
/**
|
||||
* Creates a new ReleaseInfo instance.
|
||||
* @param {Partial<ReleaseInfo>} [$$source = {}] - The source object to create the ReleaseInfo.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("id" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["id"] = 0;
|
||||
}
|
||||
if (!("tagName" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["tagName"] = "";
|
||||
}
|
||||
if (!("name" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["name"] = "";
|
||||
}
|
||||
if (!("body" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["body"] = "";
|
||||
}
|
||||
if (!("draft" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["draft"] = false;
|
||||
}
|
||||
if (!("prerelease" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["prerelease"] = false;
|
||||
}
|
||||
if (!("createdAt" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["createdAt"] = "";
|
||||
}
|
||||
if (!("publishedAt" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["publishedAt"] = "";
|
||||
}
|
||||
if (!("assets" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {AssetInfo[]}
|
||||
*/
|
||||
this["assets"] = [];
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new ReleaseInfo instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {ReleaseInfo}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
const $$createField8_0 = $$createType7;
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
if ("assets" in $$parsedSource) {
|
||||
$$parsedSource["assets"] = $$createField8_0($$parsedSource["assets"]);
|
||||
}
|
||||
return new ReleaseInfo(/** @type {Partial<ReleaseInfo>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ReleaseSyncResult 单条 Release 同步结果
|
||||
*/
|
||||
export class ReleaseSyncResult {
|
||||
/**
|
||||
* Creates a new ReleaseSyncResult instance.
|
||||
* @param {Partial<ReleaseSyncResult>} [$$source = {}] - The source object to create the ReleaseSyncResult.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("tagName" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["tagName"] = "";
|
||||
}
|
||||
if (!("name" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["name"] = "";
|
||||
}
|
||||
if (!("success" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["success"] = false;
|
||||
}
|
||||
if (!("message" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["message"] = "";
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new ReleaseSyncResult instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {ReleaseSyncResult}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new ReleaseSyncResult(/** @type {Partial<ReleaseSyncResult>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* RemoteItem 远程仓库信息
|
||||
*/
|
||||
@@ -656,6 +1088,93 @@ export class RemoteItem {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* RepoInfo 仓库信息
|
||||
*/
|
||||
export class RepoInfo {
|
||||
/**
|
||||
* Creates a new RepoInfo instance.
|
||||
* @param {Partial<RepoInfo>} [$$source = {}] - The source object to create the RepoInfo.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("name" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["name"] = "";
|
||||
}
|
||||
if (!("fullName" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["fullName"] = "";
|
||||
}
|
||||
if (!("description" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["description"] = "";
|
||||
}
|
||||
if (!("cloneUrl" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["cloneUrl"] = "";
|
||||
}
|
||||
if (!("sshUrl" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["sshUrl"] = "";
|
||||
}
|
||||
if (!("private" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["private"] = false;
|
||||
}
|
||||
if (!("fork" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["fork"] = false;
|
||||
}
|
||||
if (!("empty" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {boolean}
|
||||
*/
|
||||
this["empty"] = false;
|
||||
}
|
||||
if (!("updatedAt" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["updatedAt"] = "";
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new RepoInfo instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {RepoInfo}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new RepoInfo(/** @type {Partial<RepoInfo>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* StashInfo 贮藏信息
|
||||
*/
|
||||
@@ -822,7 +1341,7 @@ export class TreeNode {
|
||||
* @returns {TreeNode}
|
||||
*/
|
||||
static createFrom($$source = {}) {
|
||||
const $$createField5_0 = $$createType5;
|
||||
const $$createField5_0 = $$createType9;
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
if ("children" in $$parsedSource) {
|
||||
$$parsedSource["children"] = $$createField5_0($$parsedSource["children"]);
|
||||
@@ -832,9 +1351,13 @@ export class TreeNode {
|
||||
}
|
||||
|
||||
// Private type creation functions
|
||||
const $$createType0 = RemoteItem.createFrom;
|
||||
const $$createType0 = RepoInfo.createFrom;
|
||||
const $$createType1 = $Create.Array($$createType0);
|
||||
const $$createType2 = FileInfo.createFrom;
|
||||
const $$createType2 = RemoteItem.createFrom;
|
||||
const $$createType3 = $Create.Array($$createType2);
|
||||
const $$createType4 = TreeNode.createFrom;
|
||||
const $$createType4 = FileInfo.createFrom;
|
||||
const $$createType5 = $Create.Array($$createType4);
|
||||
const $$createType6 = AssetInfo.createFrom;
|
||||
const $$createType7 = $Create.Array($$createType6);
|
||||
const $$createType8 = TreeNode.createFrom;
|
||||
const $$createType9 = $Create.Array($$createType8);
|
||||
|
||||
Reference in New Issue
Block a user