Skip to content

Commit 3272874

Browse files
committed
Initial commit
0 parents  commit 3272874

25 files changed

+24129
-0
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Local env vars for debugging
2+
TS_NODE_IGNORE="false"
3+
TS_NODE_FILES="true"

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/types/global.d.ts

.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
plugins: ['@typescript-eslint', 'node', 'prettier'],
5+
parserOptions: {
6+
tsconfigRootDir: __dirname,
7+
project: ['./tsconfig.json'],
8+
},
9+
extends: [
10+
'eslint:recommended',
11+
'plugin:node/recommended',
12+
'plugin:@typescript-eslint/eslint-recommended',
13+
'plugin:@typescript-eslint/recommended',
14+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
15+
'plugin:prettier/recommended',
16+
],
17+
rules: {
18+
'prettier/prettier': 'warn',
19+
'node/no-missing-import': 'off',
20+
'node/no-empty-function': 'off',
21+
'node/no-unsupported-features/es-syntax': 'off',
22+
'node/no-missing-require': 'off',
23+
'node/shebang': 'off',
24+
'@typescript-eslint/no-use-before-define': 'off',
25+
quotes: ['warn', 'single', { avoidEscape: true }],
26+
'node/no-unpublished-import': 'off',
27+
'@typescript-eslint/no-unsafe-assignment': 'off',
28+
'@typescript-eslint/no-var-requires': 'off',
29+
'@typescript-eslint/ban-ts-comment': 'off',
30+
'@typescript-eslint/no-explicit-any': 'off',
31+
},
32+
};

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set the repository to show as TypeScript rather than JS in GitHub
2+
*.js linguist-detectable=false

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: "🐛 Bug Report"
3+
about: Report a reproducible bug or regression.
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Current Behavior
11+
12+
<!-- Describe how the issue manifests. -->
13+
14+
## Expected Behavior
15+
16+
<!-- Describe what the desired behavior would be. -->
17+
18+
## Steps to Reproduce the Problem
19+
20+
1.
21+
1.
22+
1.
23+
24+
## Environment
25+
26+
- Version: <!-- Version set in package.json -->
27+
- Platform: <!-- Win/Mac/Linux -->
28+
- Node.js Version: <!-- Output of running `node -v` -->
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: 🌈 Feature request
3+
about: Suggest an amazing new idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Feature Request
11+
12+
**Is your feature request related to a problem? Please describe.**
13+
<!-- A clear and concise description of what the problem is. Ex. I have an issue when [...] -->
14+
15+
**Describe the solution you'd like**
16+
<!-- A clear and concise description of what you want to happen. Add any considered drawbacks. -->
17+
18+
**Describe alternatives you've considered**
19+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
20+
21+
## Are you willing to resolve this issue by submitting a Pull Request?
22+
23+
<!--
24+
Remember that first-time contributors are welcome! 🙌
25+
-->
26+
27+
- [ ] Yes, I have the time, and I know how to start.
28+
- [ ] Yes, I have the time, but I don't know how to start. I would need guidance.
29+
- [ ] No, I don't have the time, although I believe I could do it if I had the time...
30+
- [ ] No, I don't have the time and I wouldn't even know how to start.
31+
32+
<!--
33+
👋 Have a great day and thank you for the feature request!
34+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!--
2+
😀 Wonderful! Thank you for opening a pull request.
3+
4+
Please fill in the information below to expedite the review
5+
and (hopefully) merge of your change.
6+
-->
7+
8+
### Description of change
9+
10+
<!--
11+
Please be clear and concise what the change is intended to do,
12+
why this change is needed, and how you've verified that it
13+
corrects what you intended.
14+
15+
In some cases it may be helpful to include the current behavior
16+
and the new behavior.
17+
18+
If the change is related to an open issue, you can link it here.
19+
If you include `Fixes #0000` (replacing `0000` with the issue number)
20+
when this is merged it will automatically mark the issue as fixed and
21+
close it.
22+
-->
23+
24+
### Pull-Request Checklist
25+
26+
<!--
27+
Please make sure to review and check all of the following.
28+
29+
If an item is not applicable, you can add "N/A" to the end.
30+
-->
31+
32+
- [ ] Code is up-to-date with the `main` branch
33+
- [ ] `npm run lint` passes with this change
34+
- [ ] `npm run test` passes with this change
35+
- [ ] This pull request links relevant issues as `Fixes #0000`
36+
- [ ] There are new or updated unit tests validating the change
37+
- [ ] Documentation has been updated to reflect this change
38+
- [ ] The new commits follow conventions outlined in the [conventional commit spec](https://www.conventionalcommits.org/en/v1.0.0/)
39+
40+
<!--
41+
🎉 Thank you for contributing!
42+
-->

.github/workflows/codeql-analysis.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '36 7 * * 6'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'javascript' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37+
# Learn more:
38+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v2
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v1
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# make bootstrap
68+
# make release
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1

.github/workflows/pr.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Pull Request
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [10.x, 12.x, 14.x]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- run: npm ci
20+
- run: npm run build --if-present
21+
- run: npm test
22+
- run: npm run coverage

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: lts/*
19+
- name: Install dependencies
20+
run: npm ci
21+
- name: Test
22+
run: npm test
23+
- name: Build
24+
run: npm run build
25+
- name: Release
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
run: npx semantic-release
30+
- name: Code Coverage
31+
run: npm run coverage

.gitignore

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# Snowpack dependency directory (https://snowpack.dev/)
45+
web_modules/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env.test
73+
.env.local
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
.parcel-cache
78+
79+
# Next.js build output
80+
.next
81+
out
82+
83+
# Nuxt.js build / generate output
84+
.nuxt
85+
dist
86+
87+
# Gatsby files
88+
.cache/
89+
# Comment in the public line in if your project uses Gatsby and not Next.js
90+
# https://nextjs.org/blog/next-9-1#public-directory-support
91+
# public
92+
93+
# vuepress build output
94+
.vuepress/dist
95+
96+
# Serverless directories
97+
.serverless/
98+
99+
# FuseBox cache
100+
.fusebox/
101+
102+
# DynamoDB Local files
103+
.dynamodb/
104+
105+
# TernJS port file
106+
.tern-port
107+
108+
# Stores VSCode versions used for testing VSCode extensions
109+
.vscode-test
110+
111+
# yarn v2
112+
.yarn/cache
113+
.yarn/unplugged
114+
.yarn/build-state.yml
115+
.yarn/install-state.gz
116+
.pnp.*
117+
118+
# Compiled code
119+
lib/

0 commit comments

Comments
 (0)