mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
styles: format code
This commit is contained in:
parent
18cf30b7ab
commit
69506957df
3 changed files with 5 additions and 5 deletions
|
|
@ -60,7 +60,7 @@ export function raiseError(error: Error, extra?: any) {
|
|||
|
||||
export const withErrorLog: Middleware = function withErrorLog(method, args) {
|
||||
return [
|
||||
async function(...args: any[]) {
|
||||
async function (...args: any[]) {
|
||||
try {
|
||||
await method.apply(null, args)
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -114,6 +114,6 @@ export function connect<BaseP, ExtraP>(mapping: Sources<BaseP, ExtraP>) {
|
|||
|
||||
export type GetCreatedMethod<MC> = MC extends MethodCreator<infer P, infer S, infer Args>
|
||||
? Args extends any[]
|
||||
? ((...args: Args) => void)
|
||||
? (...args: Args) => void
|
||||
: never
|
||||
: never
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ function parseTreeData(treeData: GiteeAPI.TreeData, metaData: MetaData) {
|
|||
const root: TreeNode = { name: '', path: '', contents: [], type: 'tree' }
|
||||
pathToNode.set('', root)
|
||||
|
||||
tree.forEach((item) => pathToItem.set(item.path, item))
|
||||
tree.forEach((item) => {
|
||||
tree.forEach(item => pathToItem.set(item.path, item))
|
||||
tree.forEach(item => {
|
||||
// bottom-up search for the deepest node created
|
||||
let path = item.path
|
||||
const itemsToCreateTreeNode: GiteeAPI.TreeItem[] = []
|
||||
|
|
@ -110,7 +110,7 @@ export const Gitee: Platform = {
|
|||
const treeData = await API.getTreeData(userName, repoName, branchName)
|
||||
const root = parseTreeData(treeData, metaData)
|
||||
|
||||
const gitModules = root.contents?.find((item) => item.name === '.gitmodules')
|
||||
const gitModules = root.contents?.find(item => item.name === '.gitmodules')
|
||||
if (gitModules) {
|
||||
if (metaData.userName && metaData.repoName && gitModules.sha) {
|
||||
const blobData = await API.getBlobData(
|
||||
|
|
|
|||
Loading…
Reference in a new issue