Skip to content

Commit 5769100

Browse files
Merge pull request #26 from JBBianchi/main
Extension rewrite
2 parents 19f4e7f + dc1db66 commit 5769100

39 files changed

+7175
-15147
lines changed

.eslintrc.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
11+
"rules": {
12+
"@typescript-eslint/naming-convention": [
13+
"warn",
14+
{
15+
"selector": "import",
16+
"format": [ "camelCase", "PascalCase" ]
17+
}
18+
],
19+
"@typescript-eslint/semi": "warn",
20+
"curly": "warn",
21+
"eqeqeq": "warn",
22+
"no-throw-literal": "warn",
23+
"semi": "off"
24+
},
25+
"ignorePatterns": [
26+
"out",
27+
"dist",
28+
"**/*.d.ts"
29+
]
30+
}

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @tsurdilo @manuelstein @ricardozanini
1+
* @tsurdilo @manuelstein @ricardozanini @JBBianchi

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
out
2+
dist
23
node_modules
34
.vscode-test/
4-
*.vsix
5+
*.vsix

.vscode-test.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'out/test/**/*.test.js',
5+
});

.vscode/extensions.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// See http://go.microsoft.com/fwlink/?LinkId=827846
33
// for the documentation about the extensions.json format
44
"recommendations": [
5-
"ms-vscode.vscode-typescript-tslint-plugin"
5+
"dbaeumer.vscode-eslint",
6+
"ms-vscode.extension-test-runner"
67
]
7-
}
8+
}

.vscode/launch.json

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,18 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
{
66
"version": "0.2.0",
7-
"configurations": [{
7+
"configurations": [
8+
{
89
"name": "Run Extension",
910
"type": "extensionHost",
1011
"request": "launch",
11-
"runtimeExecutable": "${execPath}",
1212
"args": [
1313
"--extensionDevelopmentPath=${workspaceFolder}"
1414
],
1515
"outFiles": [
1616
"${workspaceFolder}/out/**/*.js"
1717
],
18-
"preLaunchTask": "npm: watch"
19-
},
20-
{
21-
"name": "Extension Tests",
22-
"type": "extensionHost",
23-
"request": "launch",
24-
"runtimeExecutable": "${execPath}",
25-
"args": [
26-
"--extensionDevelopmentPath=${workspaceFolder}",
27-
"--extensionTestsPath=${workspaceFolder}/out/test"
28-
],
29-
"outFiles": [
30-
"${workspaceFolder}/out/test/**/*.js"
31-
],
32-
"preLaunchTask": "npm: watch"
18+
"preLaunchTask": "${defaultBuildTask}"
3319
}
3420
]
35-
}
21+
}

.vscode/settings.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
},
66
"search.exclude": {
77
"out": true // set this to false to include "out" folder in search results
8-
}
8+
},
9+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10+
"typescript.tsc.autoDetect": "off"
911
}

.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
}
1818
}
1919
]
20-
}
20+
}

.vscodeignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.vscode/**
2+
.vscode-test/**
3+
src/**
4+
.gitignore
5+
.yarnrc
6+
vsc-extension-quickstart.md
7+
**/tsconfig.json
8+
**/.eslintrc.json
9+
**/*.map
10+
**/*.ts
11+
**/.vscode-test.*

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

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

5+
## Feb. 23 2024
6+
- Complete rewrite
7+
58
## March. 20 2021
69

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

1619
## Sep. 3 2020
1720

18-
- Initial publish to marketplace
21+
- Initial publish to marketplace

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ Provides code hints and snippets for the [CNCF Serverless Workflow Specification
44

55
## Conformance
66

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

109
## Features
1110

1211
- [Code Hints](#Code-Hints)
1312
- [Code Snippets](#Code-Snippets)
14-
- [Diagram Generation](#Diagram-Generation)
15-
- [Exporting Diagram to PNG](#Exporting-Diagram-to-PNG)
13+
- [Preview Workflow Diagram](#Preview-Workflow-Diagram)
14+
- [Exporting Diagram to SVG or PNG](#Exporting-Diagram-to-PNG)
1615

1716
### Code Hints
1817

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

40-
### Diagram Generation
39+
### Preview Workflow Diagram
4140

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

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

47-
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).
46+
Or by using the hotkey `alt+shift+s p`
4847

49-
### Exporting Diagram to PNG
48+
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"
5049

51-
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”.
50+
### Exporting Diagram to SVG or PNG
51+
52+
Similarly to the preview, you can output the diagram to either SVG or PNG format.
53+
54+
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.
5255

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

5557
## Building from source
5658

code-of-conduct.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ We follow the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/mai
88
reporters send to [email protected].
99
-->
1010
Please contact the [CNCF Code of Conduct Committee](mailto:[email protected])
11-
in order to report violations of the Code of Conduct.
11+
in order to report violations of the Code of Conduct.

0 commit comments

Comments
 (0)