Skip to content

Commit c4170ea

Browse files
committed
feat: initial version
0 parents  commit c4170ea

25 files changed

+166231
-0
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
Thank you for reporting an issue.
3+
4+
Please provide as much details are you're able to.
5+
-->
6+
7+
- **Library Version**:
8+
- **OS**:
9+
- **Node.js Version**:
10+
11+
<!-- Enter your issue details below this comment. -->
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: "\U0001F41B Bug report"
3+
about: Create a bug report
4+
---
5+
6+
<!--- Provide a general summary of the issue in the Title above -->
7+
8+
## Expected Behavior
9+
10+
<!--- If you're describing a bug, tell us what should happen -->
11+
<!--- If you're suggesting a change/improvement, tell us how it should work -->
12+
13+
## Current Behavior
14+
15+
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
16+
<!--- If suggesting a change/improvement, explain the difference from current behavior -->
17+
18+
## Possible Solution
19+
20+
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
21+
<!--- or ideas how to implement the addition or change -->
22+
23+
## Steps to Reproduce (for bugs)
24+
25+
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
26+
<!--- reproduce this bug. Include code to reproduce, if relevant -->
27+
28+
1.
29+
2.
30+
3.
31+
4.
32+
33+
## Context
34+
35+
<!--- How has this issue affected you? What are you trying to accomplish? -->
36+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
37+
38+
## Your Environment
39+
40+
<!--- Include as many relevant details about the environment you experienced the bug in -->
41+
42+
- Library Version used:
43+
- Node.js version (e.g. Node.js 5.4):
44+
- Operating System and version (desktop or mobile):
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: "\U0001F680 Feature request"
3+
about: Suggest an idea for this project
4+
---
5+
6+
<!--
7+
Thank you for suggesting an idea to make this project better!
8+
9+
Please fill in as much of the template below as you're able.
10+
-->
11+
12+
**Is your feature request related to a problem? Please describe.**
13+
Please describe the problem you are trying to solve.
14+
15+
**Describe the solution you'd like**
16+
Please describe the desired behavior.
17+
18+
**Describe alternatives you've considered**
19+
Please describe alternative solutions or features you have considered.

.github/ISSUE_TEMPLATE/3-help.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
name: '⁉️ Need help?'
3+
about: Please describe the problem.
4+
---
5+
6+
<!--
7+
Describe the problem providing as much details as possible
8+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
5+
<!--- Describe your changes in detail -->
6+
7+
## Types of changes
8+
9+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
10+
11+
- [ ] Bug fix (non-breaking change which fixes an issue)
12+
- [ ] New feature (non-breaking change which adds functionality)
13+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
14+
15+
## Related Issue
16+
17+
<!--- This project only accepts pull requests related to open issues -->
18+
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
19+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
20+
<!--- Please link to the issue here: -->
21+
22+
## Motivation and Context
23+
24+
<!--- Why is this change required? What problem does it solve? -->
25+
26+
## How Has This Been Tested?
27+
28+
<!--- Please describe in detail how you tested your changes. -->
29+
<!--- Include details of your testing environment, and the tests you ran to -->
30+
<!--- see how your change affects other areas of the code, etc. -->
31+
<!--- Unit tests are expected for all changes. -->
32+
33+
## Screenshots (if appropriate):
34+
35+
## Checklist:
36+
37+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
38+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
39+
40+
- [ ] I have updated the documentation (if required).
41+
- [ ] I have read the **CONTRIBUTING** document.
42+
- [ ] I have added tests to cover my changes.
43+
- [ ] All new and existing tests passed.
44+
- [ ] I added a picture of a cute animal cause it's fun

.github/workflows/main.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
platform: [ubuntu-latest]
10+
node: ['12', '14']
11+
name: Node ${{ matrix.node }} (${{ matrix.platform }})
12+
runs-on: ${{ matrix.platform }}
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: ${{ matrix.node }}
18+
- name: install dependencies
19+
run: yarn install --frozen-lockfile
20+
- name: lint code
21+
run: yarn run lint
22+
- name: run tests
23+
run: yarn test
24+
- name: get code coverage report
25+
run: npx codecov
26+
env:
27+
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
28+
29+
release:
30+
name: do semantic release
31+
runs-on: 'ubuntu-latest'
32+
needs: build
33+
steps:
34+
- uses: actions/checkout@v1
35+
- uses: actions/setup-node@v1
36+
with:
37+
node-version: '10'
38+
- name: install dependencies
39+
run: yarn install --frozen-lockfile
40+
- name: release
41+
run: yarn run semantic-release
42+
env:
43+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
44+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
45+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'

.gitignore

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
.env.test
60+
61+
# parcel-bundler cache (https://parceljs.org/)
62+
.cache
63+
64+
# next.js build output
65+
.next
66+
67+
# nuxt.js build output
68+
.nuxt
69+
70+
# vuepress build output
71+
.vuepress/dist
72+
73+
# Serverless directories
74+
.serverless/
75+
76+
# FuseBox cache
77+
.fusebox/
78+
79+
# DynamoDB Local files
80+
.dynamodb/

.prettierrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
printWidth: 100,
3+
tabWidth: 2,
4+
singleQuote: true,
5+
semi: false,
6+
trailingComma: 'none',
7+
useTabs: false,
8+
bracketSpacing: true
9+
}

CODE_OF_CONDUCT.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
education, socio-economic status, nationality, personal appearance, race,
10+
religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Contributing
2+
3+
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
4+
5+
The following is a set of guidelines for contributing to cwe-sdk.
6+
These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
7+
8+
## Code of Conduct
9+
10+
This project and everyone participating in it is governed by a [Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
11+
12+
## How to contribute to cwe-sdk
13+
14+
<!-- TODO -->
15+
16+
### Tests
17+
18+
Make sure the code you're adding has decent test coverage.
19+
20+
Running project tests and coverage:
21+
22+
```bash
23+
npm run test
24+
```
25+
26+
### Commit Guidelines
27+
28+
The project uses the commitizen tool for standardizing changelog style commit and a git pre-commit hook to enforce them.

0 commit comments

Comments
 (0)