Skip to content

Commit

Permalink
Merge pull request #19 from pyrsia/prototype
Browse files Browse the repository at this point in the history
Initial PR - Pyrsia VS Code extension
  • Loading branch information
karolh2000 committed Jan 27, 2023
2 parents 91fb70b + 739d48e commit a3be7f5
Show file tree
Hide file tree
Showing 30 changed files with 5,302 additions and 12 deletions.
88 changes: 88 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
module.exports = {
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true,
ignorePatterns: [
"out",
"dist",
"**/*.d.ts",
".eslintrc.cjs"
],
rules: {
"@typescript-eslint/naming-convention": "error",
"@typescript-eslint/semi": "error",
"@typescript-eslint/no-unused-vars": "error",
"eqeqeq": "error",
"no-throw-literal": "error",
"semi": "warn",
"indent": ["error", "tab", { "SwitchCase": 1 }],
"no-unused-vars": "error",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/unified-signatures": "error",
"require-await": "error",
"no-return-await": "error",
"curly": "error",
"no-invalid-this": "error",
"@typescript-eslint/no-shadow": "error",
"no-fallthrough": "error",
"no-await-in-loop": "error",
"@typescript-eslint/array-type": "error",
"no-unreachable": "error",
"no-unsafe-negation": "error",
"no-unsafe-finally": "error",
"valid-jsdoc": "warn",
"valid-typeof": "error",
"consistent-return": "error",
"default-case": "error",
"no-multi-spaces": "warn",
"no-redeclare": "error",
"no-self-assign": "error",
"no-unused-labels": "error",
"no-useless-escape": "error",
"wrap-iife": "error",
"no-delete-var": "error",
"callback-return": "error",
"no-mixed-requires": "error",
"no-new-require": "error",
"no-path-concat": "error",
"no-process-exit": "error",
"no-sync": "error",
"comma-dangle": "warn",
"comma-style": "warn",
"computed-property-spacing": "warn",
"consistent-this": "warn",
"eol-last": "warn",
"func-name-matching": "warn",
"func-style": "warn",
"function-paren-newline": "warn",
"id-length": ["error", { "min": 2 }],
"jsx-quotes": "warn",
"key-spacing": "warn",
"keyword-spacing": "warn",
"linebreak-style": "warn",
"max-depth": "warn",
"max-len": ["warn", { "code": 150, "comments": 200 }],
"max-lines": ["warn", { "max": 1000}],
"max-nested-callbacks": "error",
"max-params": ["warn",{ "max": 8 }],
"new-cap": "warn",
"new-parens": "warn",
"no-bitwise": "warn",
"no-lonely-if": "warn",
"no-mixed-spaces-and-tabs": "warn",
"no-multiple-empty-lines": "warn",
"object-curly-newline": "warn",
"object-curly-spacing": ["warn", "always"],
"operator-linebreak": "warn",
"semi-style": "warn",
"sort-keys": "warn",
"require-jsdoc": "warn",
"no-useless-constructor": "warn",
"prefer-destructuring": "warn",
"no-var": "error",
"no-trailing-spaces": "error"
},
};
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @pyrsia/collaborators
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "❌ Bug report 🐛"
description: Report errors bugs and unexpected behavior
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Please make sure to [search for existing issues](https://github.com/pyrsia/pyrsia-vscode-extension/issues) before creating a new report.
If possible, upload an image of the case as well, it'd be useful for the maintainers.
- type: textarea
attributes:
label: Steps taken/Steps to reproduce
placeholder: Tell us the steps required to experience the bug.
validations:
required: true

- type: textarea
attributes:
label: Expected Behavior
description: If you want to include screenshots, paste them into the markdown editor below.
placeholder: What were you expecting?
validations:
required: false

- type: textarea
attributes:
label: Experienced Instance of the bug
placeholder: |
VS Code Version:
Operating system:
Pyrsia IDE Extension SHA/Version:
validations:
required: true
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "💡 Feature suggestion ✅"
description: Suggest new features and propose new ideas
labels: ["triage", "enhancement"]
body:
- type: markdown
attributes:
value: |
Please make sure to [search for existing suggestions](https://github.com/pyrsia/pyrsia-vscode-extension/issues) before creating a new feature-request.
- type: textarea
attributes:
label: Suggestion details
placeholder: Tell us about the new suggestion
validations:
required: true

- type: textarea
attributes:
label: Additional details
placeholder: Any additional details including images, links, media
validations:
required: false
43 changes: 43 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!--
Thank you for participating with our effort to build a more secure software supply chain.
Before submitting your Pull Request, please go over our check list.
-->

## Description

<!--
Try to fill in the following to help the reviewers dive into the pull request.
Explain the context and what changed.
-->

Fixes pyrsia/pyrsia-vscode-extension#

This PR does... by accomplishing... and it can be reviewed by... you can also test the changes by running...

## Screenshots (optional)

## PR Checklist

<!-- Make certain you've done the following. -->

- [ ] I've read the [contributing guidelines](https://github.com/pyrsia/.github/blob/main/contributing.md).
- [ ] I've read ["What is a Good PR?"](https://github.com/pyrsia/pyrsia/blob/main/docs/community/get_involved/good_pr.md)
- [ ] I've included a good title and brief description along with how to review them.
- [ ] I've linked any associated an [issue](https://github.com/pyrsia/pyrsia-vscode-extension/issues).

### Code Contributions

<!--
This section applies to code modifications, you may remove it otherwise.
Make sure your Pull Request will pass the CI/CD pipeline.
For a complete list of steps, check out the [developer PR guidelines](https://github.com/pyrsia/pyrsia/blob/main/docs/community/get_involved/submit_pr.md)!
-->

- [ ] I've run [pre-commit.sh](https://github.com/pyrsia/pyrsia-vscode-extension/blob/main/pre-commit.sh) successfully.
25 changes: 25 additions & 0 deletions .github/workflows/build_lint_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Pyrsia VS Code Extension Merge Check (build, lint, test)

on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 19
- run: sudo apt-get install xvfb
- run: npm install
- run: npm run compile
- run: npm run lint
- run: xvfb-run --auto-servernum npm run test
15 changes: 5 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Generated by Cargo
# will have compiled files and executables
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
node_modules
.idea
out
.vscode-test
*.vsix
34 changes: 34 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
// https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
]
},
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"name": "Launch Extension",
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "",
"request": "launch",
"type": "extensionHost",
"env": {
"VSCODE_DEBUG_MODE": "true"
}
}
]
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"cSpell.words": [
"callstack",
"codespaces",
"configfile",
"configurenode",
"dockerode",
"Pyrsia",
"pyrsiaintall",
"pyrsiaoverview",
"reportissue",
"VSIX",
"warningconnection",
"warningupdatenode",
"webviews"
]
}
13 changes: 13 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"group": "build",
"problemMatcher": [],
"label": "npm: watch",
"detail": "tsc -watch -p ./"
}
]
}
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Pyrsia VS Code Extension Changelog

## [Unreleased]

Not available in the VS Code store yet.

## [0.1.0] - Jan 23th, 2023

* Initial release. Features:
* Views:
* Pyrsia node connection status.
* Integrations (Docker support).
* Help.
* New commands:
* Update Pyrsia node configuration.
* Update the docker config.
* Add docker image to Pyrsia (request build).
* Open the transparency log (docker images).
* Request to replace the local docker images with Pyrsia images.
Loading

0 comments on commit a3be7f5

Please sign in to comment.