diff --git a/extensions/ide/vscode/devbox/.gitignore b/extensions/ide/vscode/devbox/.gitignore index 0d49789abb1..0db4f32e45f 100644 --- a/extensions/ide/vscode/devbox/.gitignore +++ b/extensions/ide/vscode/devbox/.gitignore @@ -5,3 +5,4 @@ node_modules *.vsix .env +!.vscode/ \ No newline at end of file diff --git a/extensions/ide/vscode/devbox/.vscode/extensions.json b/extensions/ide/vscode/devbox/.vscode/extensions.json new file mode 100644 index 00000000000..5906abf06f5 --- /dev/null +++ b/extensions/ide/vscode/devbox/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "dbaeumer.vscode-eslint", + "ms-vscode.extension-test-runner" + ] +} diff --git a/extensions/ide/vscode/devbox/.vscode/launch.json b/extensions/ide/vscode/devbox/.vscode/launch.json new file mode 100644 index 00000000000..dea90a410ab --- /dev/null +++ b/extensions/ide/vscode/devbox/.vscode/launch.json @@ -0,0 +1,20 @@ +// A launch configuration that compiles the extension and then opens it inside a new window +// Use IntelliSense to learn about possible attributes. +// Hover to view descriptions of existing attributes. +// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Run Extension", + "type": "extensionHost", + "request": "launch", + "args": ["--extensionDevelopmentPath=${workspaceFolder}"], + "outFiles": ["${workspaceFolder}/dist/**/*.js"], + "preLaunchTask": "${defaultBuildTask}", + "env": { + "NODE_ENV": "development" + } + } + ] +} diff --git a/extensions/ide/vscode/devbox/.vscode/settings.json b/extensions/ide/vscode/devbox/.vscode/settings.json new file mode 100644 index 00000000000..0fb874633a8 --- /dev/null +++ b/extensions/ide/vscode/devbox/.vscode/settings.json @@ -0,0 +1,14 @@ +// Place your settings in this file to overwrite default and user settings. +{ + "files.exclude": { + "out": false, // set this to true to hide the "out" folder with the compiled JS files + "dist": false // set this to true to hide the "dist" folder with the compiled JS files + }, + "search.exclude": { + "out": true, // set this to false to include "out" folder in search results + "dist": true // set this to false to include "dist" folder in search results + }, + // Turn off tsc task auto detection since we have the necessary tasks as npm scripts + "typescript.tsc.autoDetect": "off", + "typescript.tsdk": "node_modules/typescript/lib" +} diff --git a/extensions/ide/vscode/devbox/.vscode/tasks.json b/extensions/ide/vscode/devbox/.vscode/tasks.json new file mode 100644 index 00000000000..9e3300b04c2 --- /dev/null +++ b/extensions/ide/vscode/devbox/.vscode/tasks.json @@ -0,0 +1,37 @@ +// See https://go.microsoft.com/fwlink/?LinkId=733558 +// for the documentation about the tasks.json format +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "watch", + "problemMatcher": "$ts-webpack-watch", + "isBackground": true, + "presentation": { + "reveal": "never", + "group": "watchers" + }, + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "type": "npm", + "script": "watch-tests", + "problemMatcher": "$tsc-watch", + "isBackground": true, + "presentation": { + "reveal": "never", + "group": "watchers" + }, + "group": "build" + }, + { + "label": "tasks: watch-tests", + "dependsOn": ["npm: watch", "npm: watch-tests"], + "problemMatcher": [] + } + ] +} diff --git a/extensions/ide/vscode/devbox/package.json b/extensions/ide/vscode/devbox/package.json index f684716693c..df5908344e6 100644 --- a/extensions/ide/vscode/devbox/package.json +++ b/extensions/ide/vscode/devbox/package.json @@ -2,7 +2,7 @@ "name": "devbox-aio", "displayName": "Devbox", "description": "help code for cloud devbox in sailos/sealos", - "version": "0.9.9", + "version": "0.9.10", "keywords": [ "devbox", "remote development", diff --git a/extensions/ide/vscode/devbox/src/extension.ts b/extensions/ide/vscode/devbox/src/extension.ts index 990f1ef92b3..1254c46ae1e 100644 --- a/extensions/ide/vscode/devbox/src/extension.ts +++ b/extensions/ide/vscode/devbox/src/extension.ts @@ -15,6 +15,9 @@ export async function activate(context: vscode.ExtensionContext) { const tools = new ToolCommands(context) context.subscriptions.push(tools) + // globalState manager + GlobalStateManager.init(context) + // remote connector const remoteConnector = new RemoteSSHConnector(context) context.subscriptions.push(remoteConnector) @@ -23,9 +26,6 @@ export async function activate(context: vscode.ExtensionContext) { const devboxListViewProvider = new DevboxListViewProvider(context) context.subscriptions.push(devboxListViewProvider) - // globalState manager - GlobalStateManager.init(context) - // update api base url const workspaceFolders = vscode.workspace.workspaceFolders if (workspaceFolders && workspaceFolders.length > 0 && !isDevelopment) {