Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved the API Remote connection, UI and refactored the source code #16

Merged
merged 2 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -24,11 +25,11 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Bitburner(please complete the following information):**
- OS: [e.g. iOS]
- Platform[e.g. steam]
- Version [e.g. 22]
- IDE Version [e.g. 2022.1, 221.4501.155]

- OS: [e.g. iOS]
- Platform[e.g. steam]
- Version [e.g. 22]
- IDE Version [e.g. 2022.1, 221.4501.155]

**Additional context**
Add any other context about the problem here.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name: Build
on:
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)
push:
branches: [main]
branches: [ main ]
# Trigger the workflow on any pull request
pull_request:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codacy-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
# Adjust severity of non-security issues
gh-code-scanning-compat: true
# Force 0 exit code to allow SARIF file generation
# This will handover control about PR rejection to the GitHub side
# This will hand over control about PR rejection to the GitHub side
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed typo

max-allowed-issues: 2147483647

# Upload the SARIF file generated in the previous step
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: Release
on:
release:
types: [prereleased, released]
types: [ prereleased, released ]

jobs:

Expand Down
44 changes: 22 additions & 22 deletions .run/Run IDE for UI Tests.run.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run IDE for UI Tests" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runIdeForUiTests"/>
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
<configuration default="false" name="Run IDE for UI Tests" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log"/>
<ExternalSystemSettings>
<option name="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list/>
</option>
<option name="taskNames">
<list>
<option value="runIdeForUiTests"/>
</list>
</option>
<option name="vmOptions"/>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2"/>
</configuration>
</component>
44 changes: 22 additions & 22 deletions .run/Run Plugin Tests.run.xml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Tests" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="test" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
<configuration default="false" name="Run Tests" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log"/>
<ExternalSystemSettings>
<option name="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list/>
</option>
<option name="taskNames">
<list>
<option value="test"/>
</list>
</option>
<option name="vmOptions" value=""/>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2"/>
</configuration>
</component>
49 changes: 25 additions & 24 deletions .run/Run Plugin Verification.run.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Verifications" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runPluginVerifier" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2">
<option name="Gradle.BeforeRunTask" enabled="true" tasks="clean" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
</method>
</configuration>
<configuration default="false" name="Run Verifications" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log"/>
<ExternalSystemSettings>
<option name="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list/>
</option>
<option name="taskNames">
<list>
<option value="runPluginVerifier"/>
</list>
</option>
<option name="vmOptions" value=""/>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2">
<option name="Gradle.BeforeRunTask" enabled="true" tasks="clean" externalProjectPath="$PROJECT_DIR$"
vmOptions="" scriptParameters=""/>
</method>
</configuration>
</component>
54 changes: 27 additions & 27 deletions .run/Run Qodana.run.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Qodana" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="env">
<map>
<entry key="QODANA_SHOW_REPORT" value="true" />
</map>
</option>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="cleanInspections"/>
<option value="runInspections"/>
</list>
</option>
<option name="vmOptions" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
<configuration default="false" name="Run Qodana" type="GradleRunConfiguration" factoryName="Gradle">
<ExternalSystemSettings>
<option name="env">
<map>
<entry key="QODANA_SHOW_REPORT" value="true"/>
</map>
</option>
<option name="executionName"/>
<option name="externalProjectPath" value="$PROJECT_DIR$"/>
<option name="externalSystemIdString" value="GRADLE"/>
<option name="scriptParameters" value=""/>
<option name="taskDescriptions">
<list/>
</option>
<option name="taskNames">
<list>
<option value="cleanInspections"/>
<option value="runInspections"/>
</list>
</option>
<option name="vmOptions"/>
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2"/>
</configuration>
</component>
42 changes: 35 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,49 @@

## [Unreleased]

## [0.0.5]

### Added

- Added listeners when a file or folder is created, modified, copied, renamed, deleted or moved
- Added ToDo's list.

### Changed

- Updated README with specific instructions about how to use the plugin
- Updated Plugin org.jetbrains.intellij to 1.9.0
- Updated the notifications using emojis and given more information in the message
- Refactored the source code

### Fixed

- Fixed typos in SECURITY markdown.

Comment on lines +7 to +24
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added new changes for the suggested version 0.0.5

## [0.0.4]

Updated Plugin org.jetbrains.kotlin.jvm to 1.7.10
Updated Plugin org.jetbrains.intellij to 1.7.0
Added Plugin com.github.ben-manes.versions
Updated `pluginUntilBuild` to 222.*
Updated used Gradle Version to 7.5
### Added

- Added Plugin com.github.ben-manes.versions

### Changed

- Updated Plugin org.jetbrains.kotlin.jvm to 1.7.10
- Updated Plugin org.jetbrains.intellij to 1.7.0
- Updated `pluginUntilBuild` to 222.*
- Updated used Gradle Version to 7.5

## [0.0.3]

added PR #12
### Added

- Added PR #12

## [0.0.2]

### Added

- Filewatcher which automatically pushes to Bitburner
- Added Filewatcher which automatically pushes to Bitburner

### Changed

- Updated IDEA Version
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,39 @@ To do this you need to get the API Auth Token from Bitburner.

- Using IDE built-in plugin system:

<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "
Bitburner-Plugin"</kbd> >
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> >
<kbd>Search for "Bitburner-Plugin"</kbd> >
<kbd>Install Plugin</kbd>

- Manually:

Download the [latest release](https://github.com/Serverfrog/Bitburner-Plugin/releases/latest) and install it manually using
Download the [latest release](https://github.com/Serverfrog/Bitburner-Plugin/releases/latest) and install it manually
using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>

## Usage

### Bitburner game

- Enable the server
- If the game starts in full screen, press F9 to display as a window.
- Go to the top bar menu on _API Server_ > _Enable server_
- Copy the token
- Go to the top bar menu on _API Server_ > _Copy Auth Token_

### WebStorm or IntelliJ IDE

- Paste the token in the IDE.
- Open the settings (Ctrl+Alt+S), it will open a window.
- On the left side, select _Tools_ > _BitBurner-Sync_.
- On the right side is an option _Authentication Token_, paste the token inside the text box.
- Click on the _Ok_ button.
- Start using.
- In your project using your IDE, add one script (.js or .script), then it will show in your IDE a notification
about the success action or an error.
- You can create, modify, delete, rename or move scripts or folders with scripts. They will update automatically in
the Bitburner game.

---
Plugin based on the [IntelliJ Platform Plugin Template][template].

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ The Supported Version is always the latest one Provided on the Jetbrains Plugin

## Reporting a Vulnerability

Send me an Email at [email protected] or Discord under Serverfrog#0001 would be the fastes way to do this.
Email me at [email protected] or Discord under Serverfrog#0001 would be the fastest way to do this.

Due to the fact that this Project is not an Income Source it can take some days at worst that i will answer. ;)
Due to the fact that this Project is not an Income Source it can take some days at worst that I will answer. ;)
15 changes: 15 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Bitburner-Plugin TODOs

## Synchronize

- Pushed all the scripts in my WebStorm/IntelliJ project to Bitburner game.
- Retrieved all the scripts from Bitburner game to my project in WebStorm/IntelliJ.

## IDE: action menu

- Create one group for Bitburner. When the user expands the secondary menu from the file in the project or in the
editor.
- Clicking in the file _hello.js_ to show the secondary menu, it will show in the first row the menu
_Bitburner >_. When the mouse is over this option it will expand and show three options: _Push this file_,
_Push all files_, _Pull all files_.
- Add a confirmation alert when the options are _Push all files_ or _Pull all files_.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.7.10"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.7.0"
id("org.jetbrains.intellij") version "1.9.0"
Copy link
Author

@airvzxf airvzxf Oct 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgraded to version 1.9.0; otherwise, it is not building the project.

// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "1.3.1"
// Gradle Qodana Plugin
Expand Down
Loading