Skip to content

akamai/edgeworkers-intellij

Repository files navigation

Akamai EdgeWorkers IntelliJ Plugin

Install

  1. Install IntelliJ IDEA: https://www.jetbrains.com/idea/download/ or WebStorm IDE: https://www.jetbrains.com/webstorm/

  2. Create or open a Project

  3. Open IntelliJ Preferences and go to the Plugins interface:

  4. Search for "EdgeWorkers" and hit the Install button.

  5. After a moment it should be installed.

Dependencies / Usage

  1. The EdgeWorkers Explorer pane is available by going to View -> Tool Window -> EdgeWorkers Explorer. After selecting this it will appear on the left side of the window.

  2. The EdgeWorkers IntelliJ plugin depends on the Akamai CLI, minimum version 1.3.0 with EdgeWorkers command minimum version 1.4.1. Many of our customers will already have this set up, but if not on first launch of the EdgeWorkers panel they will be prompted to install and set up OPEN API credentials in .edgerc as outlined in the developer docs. Usage from here assumes you have completed this step and have met the minimum version requirement.

  3. Additional configuration is available in the IntelliJ Preferences; most customers will not need to use this but if they use multiple .edgerc sections or a custom edgerc path they will, and Akamai internal users will likely need to fill in Account Key here:

Functionality

  1. List EdgeWorkers in the explorer by using the refresh button as highlighted on the left:

  2. See EdgeWorker versions and version file contents by clicking through the tree:

  3. View file contents by clicking on them:

  4. Download a full EdgeWorker via right-click menu:

  5. Activate an EdgeWorker version via the same menu:

  6. Or by using the icon at the top of the pane:

  7. A brand new EdgeWorker can be registered by using the icon right of it:

  8. And a new version for an existing EdgeWorker can be added via the icon left:

  9. A new EdgeWorkers bundle/tgz can be created and automatically validated by right-clicking on an EdgeWorker bundle.json source file in the Project pane:

  10. And that produced tgz, or any other EdgeWorker tgz, can be tested in EdgeWorkers sandbox or uploaded as a new version via right click menu on the file:

  11. Code profiling is available by bringing up the bottom panel. More info on profiling code with the EdgeWorkers Toolkit for IntelliJ, check out Akamai Techdocs page on the EdgeWorkers Code Profiler.

Contibuting / Development

To run the extension locally in IntelliJ Community Edition, perform the following steps:

  1. Go to File -> Project Structure -> Project set the SDK to a Java 11 SDK.

  2. Go to Preferences -> Build, Execution, Deployment -> Build Tools -> Gradle and ensure that the Gradle JVM is set to use the Project SDK.

  3. To build the project, open the gradle tab and run build. Use clean to delete the build directory if needed.

  4. To run the plugin, run the runIde task found under the IntelliJ group. This task will also compile any new changes made since the last run.

For a full list of Gradle tasks see here: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#tasks