-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
3,368 additions
and
2,010 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@salesforce/dev-config/tslint" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
*-debug.log | ||
*-error.log | ||
/.nyc_output | ||
/.circleci | ||
/.vscode | ||
/.images | ||
/dist | ||
/lib | ||
/package-lock.json | ||
/tmp | ||
node_modules | ||
/.circleci | ||
/.sfdx | ||
/.vscode |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
appveyor.yml | ||
tslint.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# List files or directories below to ignore them when running prettier | ||
# More information: https://prettier.io/docs/en/ignore.html | ||
# | ||
|
||
lib/ | ||
oclif.manifest.json | ||
README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"trailingComma": "none", | ||
"singleQuote": true, | ||
"tabWidth": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [0.1.0] - 2020-07-07 | ||
|
||
### Added | ||
|
||
- ProvarDX Commands: compile, validate, metadatacache, runtests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to make participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all project spaces, and it also applies when | ||
an individual is representing the project or its community in public spaces. | ||
Examples of representing a project or community include using an official | ||
project e-mail address, posting via an official social media account, or acting | ||
as an appointed representative at an online or offline event. Representation of | ||
a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the Make Positive Provar Ltd. at [email protected]. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
## Contributing | ||
|
||
1. Refer to the [development](developing.md) doc to familiarize yourself with the codebase. | ||
1. When contributing to this repository please first create a new issue before | ||
starting your work. | ||
1. Fork this repository and create your _topic_ branch from **development** (see [Branches section](#branches) below). | ||
1. Edit the code in your fork and add test cases for the same. | ||
1. If you have added new `provardx command` then update the documentation (README.md) with the signature of new method. | ||
1. Ensure the test suite passes. | ||
1. Make sure your code lints. | ||
1. Issue the pull request when you are done. We'll review your code, suggest any | ||
needed (if required), and merge it. | ||
|
||
## Branches | ||
|
||
- We work in `development`. | ||
- Release (aka. _production_) branch is `master`. | ||
- Our work happens in _topic_ branches (feature and/or bug-fix). | ||
- feature as well as bug-fix branches are based on `development` | ||
|
||
### Merging between branches | ||
|
||
- _topic_ branches are: | ||
- based on `development` and will be squash-merged into `development`. | ||
|
||
### Merging `development` into `master` | ||
|
||
- When a development cycle finishes, the content of the `development` branch will be merged in `master` branch. | ||
|
||
``` | ||
$ git checkout master | ||
$ git merge development | ||
$ git push -u origin master | ||
``` | ||
|
||
## Pull Requests | ||
|
||
- Develop features and bug fixes in _topic_ branches. | ||
- Create a pull request for merging _topic_ branch in `development`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Developing | ||
|
||
## Pre-requisites | ||
|
||
1. Node.js version >= 10.0.0 | ||
1. Provar should be installed on the machine | ||
1. There should be a provardx folder with provardx.jar available in the installation directory | ||
1. sfdx cli should be installed on machine (https://developer.salesforce.com/tools/sfdxcli) | ||
1. Install Yarn globally using `npm install -g yarn`. | ||
|
||
## Typical workflow | ||
|
||
1. Clone this repository from git `git clone https://github.com/ProvarTesting/provardx.git` | ||
1. `cd` into `provardx` | ||
1. We develop on the `development` branch and release from the `master` branch. Checkout | ||
development branch `git checkout -t origin/development`. | ||
1. `yarn` to bring in all the top-level dependencies | ||
1. `sfdx plugins:link` to link the plugins with `sfdx cli` | ||
|
||
## List of Useful commands | ||
|
||
### `yarn install` | ||
|
||
To install all dependencies | ||
|
||
### `yarn run prepack` | ||
|
||
This command builds the package. | ||
|
||
### `yarn run postpack` | ||
|
||
This command cleans working directory from the build artifacts. | ||
|
||
### `yarn run posttest` | ||
|
||
This command checks for tslint issues in the code. | ||
|
||
### `yarn run test` | ||
|
||
This runs tests. | ||
|
||
### `yarn run prettier` | ||
|
||
This command formats the code with the given rules/config. | ||
|
||
### `yarn run prettier:verify` | ||
|
||
This command lists all the files which are failing as per prettier config. | ||
|
||
## Debugging the plugin | ||
|
||
We recommend using the Visual Studio Code (VS Code) IDE for your plugin development. Included in the `.vscode` directory of this plugin is a `launch.json` config file, which allows you to attach a debugger to the node process when running your commands. | ||
|
||
To debug the `provar:validate` command: | ||
|
||
1. Start the inspector | ||
|
||
If you linked your plugin to the sfdx cli, call your command with the `dev-suspend` switch: | ||
|
||
```sh-session | ||
$ sfdx provar:validate -p './provar-properties.json' --dev-suspend | ||
``` | ||
|
||
Alternatively, to call your command using the `bin/run` script, set the `NODE_OPTIONS` environment variable to `--inspect-brk` when starting the debugger: | ||
|
||
```sh-session | ||
$ NODE_OPTIONS=--inspect-brk bin/run provar:validate -p './provar-properties.json' | ||
``` | ||
|
||
2. Set some breakpoints in your command code | ||
3. Click on the Debug icon in the Activity Bar on the side of VS Code to open up the Debug view. | ||
4. In the upper left hand corner of VS Code, verify that the "Attach to Remote" launch configuration has been chosen. | ||
5. Hit the green play button to the left of the "Attach to Remote" launch configuration window. The debugger should now be suspended on the first line of the program. | ||
6. Hit the green play button at the top middle of VS Code (this play button will be to the right of the play button that you clicked in step #5). | ||
<br><img src=".images/vscodeScreenshot.png" width="480" height="278"><br> | ||
Congrats, you are debugging! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright (c) 2020, ProvarTesting | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
Oops, something went wrong.