Skip to content

Commit 77cb87a

Browse files
fesilysumneko
authored andcommitted
format Name
fix git clone branch not main
1 parent 0584d8a commit 77cb87a

15 files changed

+52
-53
lines changed

changelog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<!-- Add all new changes here. They will be moved under a version at release -->
55
* `FIX` Improve type narrow with **literal alias type** during completion and signature help
66
* `NEW` Setting: `Lua.type.inferTableSize`: A Small Table array can be infered
7-
* `NEW` Add custom repository support for addonManager. New configuration setting: `Lua.addonManager.repository_branch` and `Lua.addonManager.repository_path`
7+
* `NEW` Add custom repository support for addonManager. New configuration setting: `Lua.addonManager.repositoryBranch` and `Lua.addonManager.repositoryPath`
88

99
## 3.12.0
1010
`2024-10-30`

client/src/addon_manager/registration.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ export async function activate(context: vscode.ExtensionContext) {
3030
});
3131

3232
// update config
33-
const repository_path = globalConfig.get("repository_path") as string
34-
const repository_branch = globalConfig.get("repository_branch") as string
35-
if ((repository_path || repository_branch) && context.storageUri) {
36-
REPOSITORY.PATH = !!repository_path ? repository_path : REPOSITORY.PATH
37-
REPOSITORY.DEFAULT_BRANCH = !!repository_branch ? repository_branch : REPOSITORY.DEFAULT_BRANCH
33+
const repositoryPath = globalConfig.get("repositoryPath") as string
34+
const repositoryBranch = globalConfig.get("repositoryBranch") as string
35+
if ((repositoryPath || repositoryBranch) && context.storageUri) {
36+
REPOSITORY.PATH = !!repositoryPath ? repositoryPath : REPOSITORY.PATH
37+
REPOSITORY.DEFAULT_BRANCH = !!repositoryBranch ? repositoryBranch : REPOSITORY.DEFAULT_BRANCH
3838
setGlobalStorageUri(false)
3939
}
4040

client/src/addon_manager/services/git.service.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ export const setupGit = async (context: vscode.ExtensionContext) => {
2424
localLogger.debug(
2525
`Attempting to clone ${REPOSITORY_NAME} to ${storageURI.fsPath}`
2626
);
27-
const options = { "--depth": 1 };
28-
await git.clone(REPOSITORY.PATH, storageURI.fsPath, options);
27+
await git.clone(REPOSITORY.PATH, storageURI.fsPath);
2928
localLogger.debug(
3029
`Cloned ${REPOSITORY_NAME} to ${storageURI.fsPath}`
3130
);

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@
5656
"scope": "resource",
5757
"type": "boolean"
5858
},
59-
"Lua.addonManager.repository_branch": {
59+
"Lua.addonManager.repositoryBranch": {
6060
"default": "",
61-
"markdownDescription": "%config.addonManager.repository_branch%",
61+
"markdownDescription": "%config.addonManager.repositoryBranch%",
6262
"scope": "resource",
6363
"type": "string"
6464
},
65-
"Lua.addonManager.repository_path": {
65+
"Lua.addonManager.repositoryPath": {
6666
"default": "",
67-
"markdownDescription": "%config.addonManager.repository_path%",
67+
"markdownDescription": "%config.addonManager.repositoryPath%",
6868
"scope": "resource",
6969
"type": "string"
7070
},

package.nls.ja-jp.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"command.startServer": "Lua: (debug) Start Language Server",
66
"command.stopServer": "Lua: (debug) Stop Language Server",
77
"config.addonManager.enable": "Whether the addon manager is enabled or not.",
8-
"config.addonManager.repository_branch": "Specifies the git branch used by the addon manager.",
9-
"config.addonManager.repository_path": "Specifies the git path used by the addon manager.",
8+
"config.addonManager.repositoryBranch": "Specifies the git branch used by the addon manager.",
9+
"config.addonManager.repositoryPath": "Specifies the git path used by the addon manager.",
1010
"config.codeLens.enable": "Enable code lens.",
1111
"config.color.mode": "Color mode.",
1212
"config.color.mode.Grammar": "Grammar color.",

package.nls.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"command.startServer": "Lua: (debug) Start Language Server",
66
"command.stopServer": "Lua: (debug) Stop Language Server",
77
"config.addonManager.enable": "Whether the addon manager is enabled or not.",
8-
"config.addonManager.repository_branch": "Specifies the git branch used by the addon manager.",
9-
"config.addonManager.repository_path": "Specifies the git path used by the addon manager.",
8+
"config.addonManager.repositoryBranch": "Specifies the git branch used by the addon manager.",
9+
"config.addonManager.repositoryPath": "Specifies the git path used by the addon manager.",
1010
"config.codeLens.enable": "Enable code lens.",
1111
"config.color.mode": "Color mode.",
1212
"config.color.mode.Grammar": "Grammar color.",

package.nls.pt-br.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"command.startServer": "Lua: (debug) Start Language Server",
66
"command.stopServer": "Lua: (debug) Stop Language Server",
77
"config.addonManager.enable": "Whether the addon manager is enabled or not.",
8-
"config.addonManager.repository_branch": "Specifies the git branch used by the addon manager.",
9-
"config.addonManager.repository_path": "Specifies the git path used by the addon manager.",
8+
"config.addonManager.repositoryBranch": "Specifies the git branch used by the addon manager.",
9+
"config.addonManager.repositoryPath": "Specifies the git path used by the addon manager.",
1010
"config.codeLens.enable": "Enable code lens.",
1111
"config.color.mode": "Color mode.",
1212
"config.color.mode.Grammar": "Grammar color.",

package.nls.zh-cn.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"command.startServer": "Lua: (debug) 启动服务器",
66
"command.stopServer": "Lua: (debug) 停止服务器",
77
"config.addonManager.enable": "是否启用扩展的附加插件管理器(Addon Manager)",
8-
"config.addonManager.repository_branch": "指定插件管理器(Addon Manager)使用的git仓库分支",
9-
"config.addonManager.repository_path": "指定插件管理器(Addon Manager)使用的git仓库路径",
8+
"config.addonManager.repositoryBranch": "指定插件管理器(Addon Manager)使用的git仓库分支",
9+
"config.addonManager.repositoryPath": "指定插件管理器(Addon Manager)使用的git仓库路径",
1010
"config.codeLens.enable": "启用代码度量。",
1111
"config.color.mode": "着色模式。",
1212
"config.color.mode.Grammar": "语法着色。",

package.nls.zh-tw.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"command.startServer": "Lua: (debug) Start Language Server",
66
"command.stopServer": "Lua: (debug) Stop Language Server",
77
"config.addonManager.enable": "Whether the addon manager is enabled or not.",
8-
"config.addonManager.repository_branch": "Specifies the git branch used by the addon manager.",
9-
"config.addonManager.repository_path": "Specifies the git path used by the addon manager.",
8+
"config.addonManager.repositoryBranch": "Specifies the git branch used by the addon manager.",
9+
"config.addonManager.repositoryPath": "Specifies the git path used by the addon manager.",
1010
"config.codeLens.enable": "Enable code lens.",
1111
"config.color.mode": "著色模式。",
1212
"config.color.mode.Grammar": "語法著色。",

setting/schema-ja-jp.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"enable": {
77
"$ref": "#/properties/addonManager.enable"
88
},
9-
"repository_branch": {
10-
"$ref": "#/properties/addonManager.repository_branch"
9+
"repositoryBranch": {
10+
"$ref": "#/properties/addonManager.repositoryBranch"
1111
},
12-
"repository_path": {
13-
"$ref": "#/properties/addonManager.repository_path"
12+
"repositoryPath": {
13+
"$ref": "#/properties/addonManager.repositoryPath"
1414
}
1515
}
1616
},
@@ -20,13 +20,13 @@
2020
"scope": "resource",
2121
"type": "boolean"
2222
},
23-
"addonManager.repository_branch": {
23+
"addonManager.repositoryBranch": {
2424
"default": "",
2525
"markdownDescription": "Specifies the git branch used by the addon manager.",
2626
"scope": "resource",
2727
"type": "string"
2828
},
29-
"addonManager.repository_path": {
29+
"addonManager.repositoryPath": {
3030
"default": "",
3131
"markdownDescription": "Specifies the git path used by the addon manager.",
3232
"scope": "resource",

setting/schema-pt-br.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"enable": {
77
"$ref": "#/properties/addonManager.enable"
88
},
9-
"repository_branch": {
10-
"$ref": "#/properties/addonManager.repository_branch"
9+
"repositoryBranch": {
10+
"$ref": "#/properties/addonManager.repositoryBranch"
1111
},
12-
"repository_path": {
13-
"$ref": "#/properties/addonManager.repository_path"
12+
"repositoryPath": {
13+
"$ref": "#/properties/addonManager.repositoryPath"
1414
}
1515
}
1616
},
@@ -20,13 +20,13 @@
2020
"scope": "resource",
2121
"type": "boolean"
2222
},
23-
"addonManager.repository_branch": {
23+
"addonManager.repositoryBranch": {
2424
"default": "",
2525
"markdownDescription": "Specifies the git branch used by the addon manager.",
2626
"scope": "resource",
2727
"type": "string"
2828
},
29-
"addonManager.repository_path": {
29+
"addonManager.repositoryPath": {
3030
"default": "",
3131
"markdownDescription": "Specifies the git path used by the addon manager.",
3232
"scope": "resource",

setting/schema-zh-cn.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"enable": {
77
"$ref": "#/properties/addonManager.enable"
88
},
9-
"repository_branch": {
10-
"$ref": "#/properties/addonManager.repository_branch"
9+
"repositoryBranch": {
10+
"$ref": "#/properties/addonManager.repositoryBranch"
1111
},
12-
"repository_path": {
13-
"$ref": "#/properties/addonManager.repository_path"
12+
"repositoryPath": {
13+
"$ref": "#/properties/addonManager.repositoryPath"
1414
}
1515
}
1616
},
@@ -20,13 +20,13 @@
2020
"scope": "resource",
2121
"type": "boolean"
2222
},
23-
"addonManager.repository_branch": {
23+
"addonManager.repositoryBranch": {
2424
"default": "",
2525
"markdownDescription": "指定插件管理器(Addon Manager)使用的git仓库分支",
2626
"scope": "resource",
2727
"type": "string"
2828
},
29-
"addonManager.repository_path": {
29+
"addonManager.repositoryPath": {
3030
"default": "",
3131
"markdownDescription": "指定插件管理器(Addon Manager)使用的git仓库路径",
3232
"scope": "resource",

setting/schema-zh-tw.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"enable": {
77
"$ref": "#/properties/addonManager.enable"
88
},
9-
"repository_branch": {
10-
"$ref": "#/properties/addonManager.repository_branch"
9+
"repositoryBranch": {
10+
"$ref": "#/properties/addonManager.repositoryBranch"
1111
},
12-
"repository_path": {
13-
"$ref": "#/properties/addonManager.repository_path"
12+
"repositoryPath": {
13+
"$ref": "#/properties/addonManager.repositoryPath"
1414
}
1515
}
1616
},
@@ -20,13 +20,13 @@
2020
"scope": "resource",
2121
"type": "boolean"
2222
},
23-
"addonManager.repository_branch": {
23+
"addonManager.repositoryBranch": {
2424
"default": "",
2525
"markdownDescription": "Specifies the git branch used by the addon manager.",
2626
"scope": "resource",
2727
"type": "string"
2828
},
29-
"addonManager.repository_path": {
29+
"addonManager.repositoryPath": {
3030
"default": "",
3131
"markdownDescription": "Specifies the git path used by the addon manager.",
3232
"scope": "resource",

setting/schema.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"enable": {
77
"$ref": "#/properties/addonManager.enable"
88
},
9-
"repository_branch": {
10-
"$ref": "#/properties/addonManager.repository_branch"
9+
"repositoryBranch": {
10+
"$ref": "#/properties/addonManager.repositoryBranch"
1111
},
12-
"repository_path": {
13-
"$ref": "#/properties/addonManager.repository_path"
12+
"repositoryPath": {
13+
"$ref": "#/properties/addonManager.repositoryPath"
1414
}
1515
}
1616
},
@@ -20,13 +20,13 @@
2020
"scope": "resource",
2121
"type": "boolean"
2222
},
23-
"addonManager.repository_branch": {
23+
"addonManager.repositoryBranch": {
2424
"default": "",
2525
"markdownDescription": "Specifies the git branch used by the addon manager.",
2626
"scope": "resource",
2727
"type": "string"
2828
},
29-
"addonManager.repository_path": {
29+
"addonManager.repositoryPath": {
3030
"default": "",
3131
"markdownDescription": "Specifies the git path used by the addon manager.",
3232
"scope": "resource",

0 commit comments

Comments
 (0)