Skip to content

Commit

Permalink
update folder
Browse files Browse the repository at this point in the history
  • Loading branch information
daoauth committed Nov 28, 2024
1 parent 7d11e2b commit 1b17dcc
Show file tree
Hide file tree
Showing 51 changed files with 28 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ out/test/**

# Ignore source code
src/**
!src/webview/build/
!src/webview/build/**
!src/webview/activitybar/build/
!src/webview/activitybar/build/**

# Ignore Misc
.yarnrc
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"views": {
"extensionSidebarAptos": [
{
"id": "webviewViewProviderAptos",
"id": "activitybarPoviderAptos",
"type": "webview",
"name": "Aptos Extension"
}
Expand All @@ -59,7 +59,7 @@
"view/title": [
{
"command": "aptos-extension.openDocs",
"when": "view == webviewViewProviderAptos",
"when": "view == activitybarPoviderAptos",
"group": "navigation"
}
]
Expand All @@ -79,10 +79,10 @@
"scripts": {
"open-in-browser": "npm run build:all && vscode-test-web --extensionDevelopmentPath=. .",
"build:all": "npm run build:webview && npm run compile",
"install:all": "npm install && cd src/webview && npm install",
"start:webview": "cd src/webview && npm run start",
"build:webview": "cd src/webview && npm run build",
"test:webview": "cd src/webview && npm run test",
"install:all": "npm install && cd src/webview/activitybar && npm install",
"start:webview": "cd src/webview/activitybar && npm run start",
"build:webview": "cd src/webview/activitybar && npm run build",
"test:webview": "cd src/webview/activitybar && npm run test",
"vscode:prepublish": "npm run package",
"compile": "webpack",
"watch": "webpack --watch",
Expand Down
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as vscode from 'vscode';
import { WebviewViewProvider } from './webviewPovider';
import { ActivitybarPovider } from './webview/activitybarPovider';

export function activate(context: vscode.ExtensionContext) {
const provider = new WebviewViewProvider(context);
const provider = new ActivitybarPovider(context);
context.subscriptions.push(
vscode.window.registerWebviewViewProvider(
WebviewViewProvider.viewType,
ActivitybarPovider.viewType,
provider,
),
);
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/account.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as vscode from 'vscode';
import { IAccount } from '../webview/src/recoil';
import { IAccount } from '../webview/activitybar/src/recoil';

export const accountStore = async (
context: vscode.ExtensionContext,
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/authCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
ClientSecret,
UrlAuthCode,
UrlCallback,
} from '../webview/src/utilities/commends';
} from '../webview/activitybar/src/utilities/commends';

const exchangeAuthCodeForJwt = async (
authCode: string,
Expand Down
4 changes: 2 additions & 2 deletions src/utilities/fileWatcher.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as vscode from 'vscode';
import * as path from 'path';
import { COMMENDS } from '../webview/src/utilities/commends';
import { ByteDump } from '../webview/src/utilities/cli';
import { COMMENDS } from '../webview/activitybar/src/utilities/commends';
import { ByteDump } from '../webview/activitybar/src/utilities/cli';

const MoveToml = 'Move.toml';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 12 additions & 10 deletions src/webviewPovider.ts → src/webview/activitybarPovider.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import * as vscode from 'vscode';
import { getUri } from './utilities/getUri';
import { getNonce } from './utilities/getNonce';
import { hasTerminal } from './utilities/hasTerminal';
import { COMMENDS } from './webview/src/utilities/commends';
import { FileWathcer } from './utilities/fileWatcher';
import { accountLoad, accountStore } from './utilities/account';
import { exchangeToken } from './utilities/authCode';
import { getUri } from '../utilities/getUri';
import { getNonce } from '../utilities/getNonce';
import { hasTerminal } from '../utilities/hasTerminal';
import { COMMENDS } from '../webview/activitybar/src/utilities/commends';
import { FileWathcer } from '../utilities/fileWatcher';
import { accountLoad, accountStore } from '../utilities/account';
import { exchangeToken } from '../utilities/authCode';
import {
CHANNEL,
COMPILER,
COMPILER_URL,
MoveToml,
} from './webview/src/utilities/cli';
} from './activitybar/src/utilities/cli';

export class WebviewViewProvider implements vscode.WebviewViewProvider {
public static readonly viewType = 'webviewViewProviderAptos';
export class ActivitybarPovider implements vscode.WebviewViewProvider {
public static readonly viewType = 'activitybarPoviderAptos';
private _view?: vscode.WebviewView;

private readonly _context;
Expand Down Expand Up @@ -168,6 +168,7 @@ export class WebviewViewProvider implements vscode.WebviewViewProvider {
const stylesUri = getUri(webview, extensionUri, [
'src',
'webview',
'activitybar',
'build',
'static',
'css',
Expand All @@ -176,6 +177,7 @@ export class WebviewViewProvider implements vscode.WebviewViewProvider {
const scriptUri = getUri(webview, extensionUri, [
'src',
'webview',
'activitybar',
'build',
'static',
'js',
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"outDir": "out",
"strict": true
},
"exclude": ["node_modules", "src/webview", ".vscode-test-web"]
"exclude": ["node_modules", "src/webview/activitybar", ".vscode-test-web"]
}

0 comments on commit 1b17dcc

Please sign in to comment.