diff --git a/README.md b/README.md index 4fd88b4..13c6601 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,9 @@ # SuperOffice Language Tools -This repository contains all the editor tooling required for working with Typescript and CRMScripts in SuperOffice. +This repository contains all the editor tooling required for working with scripts(Typescript and CRMScripts) in SuperOffice. It contains an implementation of the [Language Server Protocol (LSP)](https://microsoft.github.io/language-server-protocol/), powered by [Volar](https://volarjs.dev/) (for TypeScript) and `vcode-languageserver` (for CRMScript), and is currently under development. -## Motivation - -With the [Typescript for SuperOffice](https://github.com/SuperOffice/typescript-for-superoffice)-project ongoing it felt like a suitable time to add support for creating scripts outside of SuperOffice. This will enhance the developer experience, and open new possibilities for how you work with and debug your scripts. - ## Packages This repository is a monorepo managed through [pnpm](https://pnpm.io/). @@ -114,15 +110,9 @@ Running this extension will spawn a childprocess with the LSP server. Launch.jso 1. `Run&debug` -> `Core Extension` 2. Click on the SuperOffice Icon on the right navigation bar -3. Click 'Login' to start the authenticationflow - Note: This will start the Native App Flow, and you will have to follow the steps described [here](#authentication-flow-for-native-app-with-pkce) +3. Click 'Login' to start the authenticationflow + Note: This will start the Native App Flow, and you will have to follow the steps described under [authentication](#authentication-flow-for-native-app-with-pkce) 4. After authentication the tab will be populated with the scripts belonging to your tenant. Note: Depending if your tenant is 'cold' it could take a little while for it to be read to execute the API request that fetches all scripts. 5. When right-clicking on a script, in the treeView, it will give you options to preview or download. -6. When you have downloaded a script you can go back to your workspace and see the script has been created. If you right-click this script you will se a new menu-item, 'SuperOffice', which contains 2 execution-options: Execute and ExecuteLocally. +6. When you have downloaded a script you can go back to your workspace and see the script has been created. If you right-click this script you will se a new menu-item, 'SuperOffice', which contains 2 execution-options: Execute and ExecuteLocally. Note: ExecuteLocally will launch Node and automatically attach to the process, and will start debugging the execution. - -## Other thoughts/ideas - -### Replace Treeview with webview - -Replacing the treeview with a webview will make it much more flexible to add logic/functionality. A webview is not restricted to the bounds of vscode, and we can create a modern design either with vanilla HTML or for instance react. It will also make it possible to make it more SuperOffice-like. diff --git a/packages/superofficedx-vscode-core/README.md b/packages/superofficedx-vscode-core/README.md index ea22a50..d99a5a8 100644 --- a/packages/superofficedx-vscode-core/README.md +++ b/packages/superofficedx-vscode-core/README.md @@ -1,62 +1,15 @@ -# superoffice-vscode README +# SuperOffice Extension for Visual Studio Code -This extension is created to help working with Typescript for SuperOffice. +This extension includes a viewContainer for working with customizations in SuperOffice. It enables developers to easily view, download and upload scripts from/to a tenant. ## Features -### viewContainer for SuperOffice +- View scripts +- View extratables and fields +- Upload and download scripts -![Alt text](assets/viewContainer.png?raw=true "ViewContainer") +## Bugs and Feedback -### Authentication flow for Native App with PKCE - -Select environment - -![Alt text](assets/selectEnvironment.png?raw=true "SelectEnvironment") - -Start Authentication - -![Alt text](assets/startAuthentication.png?raw=true "startAuthentication") - -Input credentials in new browser-tab and close after completion - -![Alt text](assets/closeAuthenticationWindow.png?raw=true "startAuthentication") - -### TreeView of scripts in the tenant - -![Alt text](assets/getScriptsResult.png?raw=true "getScriptsResult") - -### Option to preview the script (creates a file in virtual storage) -### Option to download the script (creates a file in local workspace, in the correct folder) - -![Alt text](assets/downloadScriptOption.png?raw=true "downloadScriptOption") - -![Alt text](assets/scriptCreatedInWorkspace.png?raw=true "scriptCreatedInWorkspace") - -### Option to download folder of scripts (creates all the folders and files in the local workspace) - -### Option to execute the script (from local workspace), this utilizes the ExecuteScriptFromString-endpoint - -Execute the script from right-click - -![Alt text](assets/executeScriptOption.png?raw=true "executeScriptOption") - -ExampleScript - -![Alt text](assets/exampleExecuteScript.png?raw=true "executeResult") - -Result is presented as informationmessage (down right) - -![Alt text](assets/executeResult.png?raw=true "executeResult") - -## Planned features - -1. Support for legacy crmscript - -## Suggested features - -1. Upload script back to the tenant -2. execute script in the tenant -3. Versioncontrol/view for files that are edited compared to what is stored inside SuperOffice +To report bugs or issues with SuperOffice Extensions for VS Code, go to our [github page](https://github.com/SuperOffice/language-tools) **Enjoy!** diff --git a/packages/superofficedx-vscode-core/vitest.config.ts b/packages/superofficedx-vscode-core/vitest.config.mts similarity index 98% rename from packages/superofficedx-vscode-core/vitest.config.ts rename to packages/superofficedx-vscode-core/vitest.config.mts index 3677199..482b7d6 100644 --- a/packages/superofficedx-vscode-core/vitest.config.ts +++ b/packages/superofficedx-vscode-core/vitest.config.mts @@ -1,4 +1,4 @@ -// vitest.config.ts +// vitest.config.mjs import { defineConfig } from 'vitest/config'; export default defineConfig({ diff --git a/vitest.config.ts b/vitest.config.mts similarity index 56% rename from vitest.config.ts rename to vitest.config.mts index 87167bc..474cb85 100644 --- a/vitest.config.ts +++ b/vitest.config.mts @@ -5,11 +5,7 @@ export default defineConfig({ test: { projects: [ 'packages/language-server/vitest.config.ts', - 'packages/superofficedx-vscode-core/vitest.config.ts' + 'packages/superofficedx-vscode-core/vitest.config.mts' ], - }, - // Add esbuild for TypeScript compilation - esbuild: { - target: 'node20' } });