Skip to content

Commit

Permalink
chore: update hash scripts and disable GraphQL API temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
conwnet committed Feb 16, 2021
1 parent 8be34fd commit 77e844e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extensions/github1s/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import * as vscode from 'vscode';
import { hasValidToken } from './util';
import { fetch, RequestError, RequestRateLimitError, RequestInvalidTokenError, RequestNotFoundError, throttledReportNetworkError } from './util/fetch';

export const ENABLE_GRAPHQL: boolean = true;
// TODO: GraphQL API is experimental now, we need more test.
// It maybe crash or slow when there are too many files in one directory.
// For example the repository `git/git`, the TTFB cost about 3 seconds,
// and the response body size exceed 7MB before zip
export const ENABLE_GRAPHQL: boolean = false;

export interface UriState {
owner: string;
Expand Down
1 change: 1 addition & 0 deletions scripts/hash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ STATIC_FOLDER_NAME="static-${SHORT_COMMIT_ID-unknown}"
if [ -e "${APP_ROOT}/dist/static" ]; then
mv "${APP_ROOT}/dist/static" "${APP_ROOT}/dist/${STATIC_FOLDER_NAME}"
sed "s/{STATIC_FOLDER}/${STATIC_FOLDER_NAME}/" "${APP_ROOT}/resources/index-hash.html" > "${APP_ROOT}/dist/404.html"
rm -f "${APP_ROOT}/dist/index.html" # remove the exists `index.html` file
echo "hash static files done"
else
echo "Please build github1s first"
Expand Down

0 comments on commit 77e844e

Please sign in to comment.