Release 1.0.0

This commit is contained in:
Omelette 蛋卷
2024-01-10 01:57:06 -05:00
parent 33b493bc73
commit 0f97ae3dc3
10 changed files with 898 additions and 89 deletions

101
README.md
View File

@@ -1,71 +1,70 @@
# dcs-lua-runner README
# DCS Lua Runner
This is the README for your extension "dcs-lua-runner". After writing up a brief description, we recommend including the following sections.
A VS Code extension to run lua code in DCS World (local or remote server). A reimplementation of the [DCS Fiddle](https://github.com/JonathanTurnock/dcsfiddle) web lua console.
Allows for quick development and debugging of running scripted missions directly from the comfort of VS Code.
![Demo1](docs/img/demo1.png)
![Demo2-1](docs/img/demo2-1.png)
![Demo2-2](docs/img/demo2-2.png)
## Features
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
For example if there is an image subfolder under your extension project workspace:
\!\[feature X\]\(images/feature-x.png\)
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
- Send Lua code to run on local DCS or remote DCS server.
- Run in mission or GUI scripting environment.
- Right click and run only selected part of code.
- Display return value from DCS.
- Fully compatible with existing DCS Fiddle hooks script.
- Optional basic web auth for better public server security (see requirements).
## Requirements
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
### DCS Hooks Installation
Install DCS Fiddle script the same way as the original web version, and de-sanitize mission scripting.
[**Original instruction here**](https://dcsfiddle.pages.dev/docs.)
All credits of this scripts and its API implementations go to the original authors [JonathanTurnock](https://github.com/JonathanTurnock) and [john681611](https://github.com/john681611).
### Important
If you want to run code on a remote DCS server, you need to expose its Fiddle port (12080 by default). This however, creates a security risk, as everyone can now inject lua code into your server.
It is recommended to install this [modified Fiddle script](src/hooks/dcs-fiddle-server.lua). It allows you configure a basic authentication at the beginning of the file.
For even better security, put the Fiddle port behind a reverse proxy with HTTPS.
## Extension Settings
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
For example:
This extension contributes the following settings:
* `myExtension.enable`: Enable/disable this extension.
* `myExtension.thing`: Set to `blah` to do something.
- `dcsLuaRunner.serverAddress`: Remote DCS server address. It can be an IP address or a domain.
- `dcsLuaRunner.serverPort`: Port of the remote DCS Fiddle. Default is `12080`.
- `dcsLuaRunner.useHttps`: Specifies whether the server is behind a HTTPS reverse proxy.
If this is set to `true`, you should also change the `dcsLuaRunner.serverPort` to `443`.
Default is `false`.
- `dcsLuaRunner.webAuthUsername`: Specifies the username for authentication.
**Requires the modified DCS Fiddle script.**
- `dcsLuaRunner.webAuthPassword`: Specifies the password for authentication.
**Requires the modified DCS Fiddle script.**
- `dcsLuaRunner.runCodeLocally`: Whether to send code to `127.0.0.1:12080` or to the remote server set in `dcsLuaRunner.serverAddress` and `dcsLuaRunner.serverPort`.
This setting can be quickly changed with the buttons on the upper-right of a lua file.
- `dcsLuaRunner.runInMissionEnv`: Specifies whether to execute in mission or GUI Scripting Environment.
This setting can be quickly changed with the buttons on the upper-right of a lua file.
## Known Issues
Calling out known issues can help limit users opening duplicate issues against your extension.
The return value is displayed on in the output window, which unfortunately does not support syntax highlight. Possibilities to display return in other ways are being looked into.
## Release Notes
Users appreciate release notes as you update your extension.
See [**changelog**](CHANGELOG.md).
### 1.0.0
Initial release of ...
### 1.0.1
Fixed issue #.
### 1.1.0
Added features X, Y, and Z.
---
## Following extension guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)
## Working with Markdown
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
## For more information
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
**Enjoy!**
## Credits
[**DCS Fiddle**](https://github.com/JonathanTurnock/dcsfiddle) by [JonathanTurnock](https://github.com/JonathanTurnock) and [john681611](https://github.com/john681611).