|
|
@ -27,7 +27,6 @@ declare global { |
|
|
|
interface Window { remixFileSystemCallback: IndexedDBStorage; remixFileSystem: any; } |
|
|
|
interface Window { remixFileSystemCallback: IndexedDBStorage; remixFileSystem: any; } |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const profile: LibraryProfile = { |
|
|
|
const profile: LibraryProfile = { |
|
|
|
name: 'dGitProvider', |
|
|
|
name: 'dGitProvider', |
|
|
|
displayName: 'Decentralized git', |
|
|
|
displayName: 'Decentralized git', |
|
|
@ -162,7 +161,6 @@ class DGitProvider extends Plugin { |
|
|
|
return status |
|
|
|
return status |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const status = await git.statusMatrix({ |
|
|
|
const status = await git.statusMatrix({ |
|
|
|
...await this.addIsomorphicGitConfigFS(), |
|
|
|
...await this.addIsomorphicGitConfigFS(), |
|
|
|
...cmd |
|
|
|
...cmd |
|
|
@ -265,7 +263,6 @@ class DGitProvider extends Plugin { |
|
|
|
return status |
|
|
|
return status |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const status = await git.log({ |
|
|
|
const status = await git.log({ |
|
|
|
...await this.addIsomorphicGitConfigFS(), |
|
|
|
...await this.addIsomorphicGitConfigFS(), |
|
|
|
...cmd, |
|
|
|
...cmd, |
|
|
@ -1003,8 +1000,6 @@ class DGitProvider extends Plugin { |
|
|
|
return data.data |
|
|
|
return data.data |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async getGitHubUser(input: { token: string }): Promise<{ |
|
|
|
async getGitHubUser(input: { token: string }): Promise<{ |
|
|
|
user: GitHubUser, |
|
|
|
user: GitHubUser, |
|
|
|
ratelimit: RateLimit |
|
|
|
ratelimit: RateLimit |
|
|
@ -1023,7 +1018,6 @@ class DGitProvider extends Plugin { |
|
|
|
const localResetTime = ratelimit.data.rate.reset * 1000 |
|
|
|
const localResetTime = ratelimit.data.rate.reset * 1000 |
|
|
|
const localResetTimeString = new Date(localResetTime).toLocaleString() |
|
|
|
const localResetTimeString = new Date(localResetTime).toLocaleString() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('rate limit', localResetTimeString) |
|
|
|
console.log('rate limit', localResetTimeString) |
|
|
|
|
|
|
|
|
|
|
|
const user = await octokit.request('GET /user') |
|
|
|
const user = await octokit.request('GET /user') |
|
|
@ -1118,13 +1112,11 @@ class DGitProvider extends Plugin { |
|
|
|
'Accept': 'application/vnd.github.v3+json', // GitHub API v3 media type
|
|
|
|
'Accept': 'application/vnd.github.v3+json', // GitHub API v3 media type
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const url = `${baseURL}?visibility=private,public&page=${page}&per_page=${perPage}&sort=${sort}&direction=${direction}`; |
|
|
|
const url = `${baseURL}?visibility=private,public&page=${page}&per_page=${perPage}&sort=${sort}&direction=${direction}`; |
|
|
|
const response = await axios.get(url, { headers }); |
|
|
|
const response = await axios.get(url, { headers }); |
|
|
|
|
|
|
|
|
|
|
|
repositories.push(...response.data); |
|
|
|
repositories.push(...response.data); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return repositories |
|
|
|
return repositories |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|