Skip to content

Extension rewrite #26

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

Merged
merged 8 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
30 changes: 30 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "import",
"format": [ "camelCase", "PascalCase" ]
}
],
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
]
}
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @tsurdilo @manuelstein @ricardozanini
* @tsurdilo @manuelstein @ricardozanini @JBBianchi
Copy link
Member

Choose a reason for hiding this comment

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

You can remove Manuel here and I'll give you write permissions here. :)

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
out
dist
node_modules
.vscode-test/
*.vsix
*.vsix
5 changes: 5 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
});
5 changes: 3 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"ms-vscode.vscode-typescript-tslint-plugin"
"dbaeumer.vscode-eslint",
"ms-vscode.extension-test-runner"
]
}
}
22 changes: 4 additions & 18 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,18 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [{
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: watch"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: watch"
"preLaunchTask": "${defaultBuildTask}"
}
]
}
}
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
}
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
}
}
]
}
}
11 changes: 11 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.vscode/**
.vscode-test/**
src/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
**/.vscode-test.*
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes for each release will be documented in this file.

## Feb. 23 2024
- Complete rewrite

## March. 20 2021

- Updated to latest specification v0.6
Expand All @@ -15,4 +18,4 @@ All notable changes for each release will be documented in this file.

## Sep. 3 2020

- Initial publish to marketplace
- Initial publish to marketplace
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ Provides code hints and snippets for the [CNCF Serverless Workflow Specification

## Conformance

This plugin conforms to the latest Serverless Workflow specification
release v0.6
This plugin conforms to the latest [Serverless Workflow specification](https://serverlessworkflow.io/schemas/latest/workflow.json).

## Features

- [Code Hints](#Code-Hints)
- [Code Snippets](#Code-Snippets)
- [Diagram Generation](#Diagram-Generation)
- [Exporting Diagram to PNG](#Exporting-Diagram-to-PNG)
- [Preview Workflow Diagram](#Preview-Workflow-Diagram)
- [Exporting Diagram to SVG or PNG](#Exporting-Diagram-to-PNG)

### Code Hints

Expand All @@ -37,20 +36,23 @@ This extension also provides Code Snippets for the serverless workflow specifica
- swy: Create a new YAML workflow definition
- adding more in the next version

### Diagram Generation
### Preview Workflow Diagram

You can generate the workflow diagram image in SVG format. While working on a workflow, you can preview it by:
You can preview the workflow diagram while working on a workflow:

- Opening the Command Palette (⇧⌘P or Ctrl + Shift + P)
- Selecting: "Serverless Workflow: Generate Diagram"
- Selecting: "Serverless Workflow: Preview Diagram"

It will generate the workflow diagram SVG and present it side-by-side to your workflow source file. It will also create a `myworkflow.svg` file in the same directory as your workflow model. `myworkflow` is the name of your workflow model file (JSON or YAML).
Or by using the hotkey `alt+shift+s p`

### Exporting Diagram to PNG
You can also generate a preview for multiple files by selecting them in the explorer, right-click and select from the menu "Serverless Workflow: Preview Diagram"

Once you have generated the workflow diagram (see the section above), you can right-click on your workflow model file and select from the menu "Serverless Workflow: Export Diagram to PNG”.
### Exporting Diagram to SVG or PNG

Similarly to the preview, you can output the diagram to either SVG or PNG format.

The commands are "Serverless Workflow: Export Diagram to SVG" (`alt+shift+s v`) or "Serverless Workflow: Export Diagram to PNG" (`alt+shift+s i`), available in the command palette or by right clicking the files.

Doing this will convert the workflow diagram to PNG and create a `myworkflow.png` file in the same directory as your workflow model.

## Building from source

Expand Down
2 changes: 1 addition & 1 deletion code-of-conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/mai
reporters send to [email protected].
-->
Please contact the [CNCF Code of Conduct Committee](mailto:[email protected])
in order to report violations of the Code of Conduct.
in order to report violations of the Code of Conduct.
Loading