Skip to content

Commit f147f8f

Browse files
committed
chore: initial commit
0 parents  commit f147f8f

24 files changed

+7824
-0
lines changed

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
max_line_length = 120
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true

.eslintrc.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict'
2+
3+
const { overrides } = require('@netlify/eslint-config-node')
4+
5+
module.exports = {
6+
extends: '@netlify/eslint-config-node',
7+
rules: {},
8+
overrides: [...overrides],
9+
}

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @netlify/netlify-dev

.github/ISSUE_TEMPLATE/bug_report.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: 'Please replace with a clear and descriptive title'
5+
labels: 'type: bug'
6+
assignees: ''
7+
---
8+
9+
Thanks for reporting this bug!
10+
11+
Please search other issues to make sure this bug has not already been reported.
12+
13+
Then fill in the sections below.
14+
15+
**Describe the bug**
16+
17+
A clear and concise description of what the bug is.
18+
19+
**Configuration**
20+
21+
Please enter the following command in a terminal and copy/paste its output:
22+
23+
```bash
24+
npx envinfo --system --binaries
25+
```
26+
27+
**Pull requests**
28+
29+
Pull requests are welcome! If you would like to help us fix this bug, please check our
30+
[contributions guidelines](../blob/master/CONTRIBUTING.md).
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: 'Please replace with a clear and descriptive title'
5+
labels: 'type: feature'
6+
assignees: ''
7+
---
8+
9+
<!--
10+
Thanks for suggesting a new feature!
11+
12+
Please fill in the sections below.
13+
-->
14+
15+
**Which problem is this feature request solving?**
16+
17+
<!--
18+
Example: I'm always frustrated when [...]
19+
-->
20+
21+
**Describe the solution you'd like**
22+
23+
<!--
24+
Example: This could be fixed by [...]
25+
-->
26+
27+
**Describe alternatives you've considered**
28+
29+
<!--
30+
Example: Another solution would be [...]
31+
-->
32+
33+
**Can you submit a pull request?**
34+
35+
Yes/No.
36+
37+
<!--
38+
Pull requests are welcome! If you would like to help us add this feature, please check our
39+
[contributions guidelines](../blob/master/CONTRIBUTING.md).
40+
-->

.github/pull_request_template.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
🎉 Thanks for sending this pull request! 🎉
2+
3+
Please make sure the title is clear and descriptive.
4+
5+
If you are fixing a typo or documentation, please skip these instructions.
6+
7+
Otherwise please fill in the sections below.
8+
9+
**Which problem is this pull request solving?**
10+
11+
Example: I'm always frustrated when [...]
12+
13+
**List other issues or pull requests related to this problem**
14+
15+
Example: This fixes #5012
16+
17+
**Describe the solution you've chosen**
18+
19+
Example: I've fixed this by [...]
20+
21+
**Describe alternatives you've considered**
22+
23+
Example: Another solution would be [...]
24+
25+
**Checklist**
26+
27+
Please add a `x` inside each checkbox:
28+
29+
- [ ] I have read the [contribution guidelines](../blob/master/CONTRIBUTING.md).
30+
- [ ] The status checks are successful (continuous integration). Those can be seen below.

.github/workflows/fossa.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Dependency License Scanning
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
jobs:
13+
fossa:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Fossa init
19+
run: |-
20+
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash
21+
fossa init
22+
- name: Set env
23+
run: echo "line_number=$(grep -n "project" .fossa.yml | cut -f1 -d:)" >> $GITHUB_ENV
24+
- name: Configuration
25+
run: |-
26+
sed -i "${line_number}s|.*| project: git@github.com:${GITHUB_REPOSITORY}.git|" .fossa.yml
27+
cat .fossa.yml
28+
- name: Upload dependencies
29+
run: fossa analyze --debug
30+
env:
31+
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

.github/workflows/labeler.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Label PR
2+
on:
3+
pull_request:
4+
types: [opened, edited]
5+
6+
jobs:
7+
label-pr:
8+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
pr:
13+
[
14+
{ prefix: 'fix', type: 'bug' },
15+
{ prefix: 'chore', type: 'chore' },
16+
{ prefix: 'test', type: 'chore' },
17+
{ prefix: 'ci', type: 'chore' },
18+
{ prefix: 'feat', type: 'feature' },
19+
{ prefix: 'security', type: 'security' },
20+
]
21+
steps:
22+
- uses: netlify/pr-labeler-action@v1.0.0
23+
if: startsWith(github.event.pull_request.title, matrix.pr.prefix)
24+
with:
25+
token: '${{ secrets.GITHUB_TOKEN }}'
26+
label: 'type: ${{ matrix.pr.type }}'

.github/workflows/release-please.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: release-please
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: GoogleCloudPlatform/release-please-action@v2
11+
with:
12+
token: ${{ secrets.GITHUB_TOKEN }}
13+
release-type: node
14+
package-name: "@netlify/netlify-functions-js"

.github/workflows/workflow.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build
2+
on:
3+
# Ensure GitHub actions are not run twice for same commits
4+
push:
5+
branches: [master]
6+
tags: ['*']
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
timeout-minutes: 30
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macOS-latest, windows-latest]
16+
node-version: [8.17.0, 15.x]
17+
exclude:
18+
- os: macOS-latest
19+
node-version: 8.17.0
20+
- os: windows-latest
21+
node-version: 8.17.0
22+
fail-fast: false
23+
steps:
24+
- name: Git checkout
25+
uses: actions/checkout@v2
26+
- name: Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v2
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
- name: Install dependencies
31+
run: npm ci
32+
- name: Linting
33+
run: npm run format:ci
34+
if: "${{ matrix.node-version == '15.x' }}"
35+
- name: Tests
36+
run: npm run test:ci
37+
- name: Get test coverage flags
38+
id: test-coverage-flags
39+
run: |-
40+
os=${{ matrix.os }}
41+
node=${{ matrix.node-version }}
42+
echo "::set-output name=os::${os/-latest/}"
43+
echo "::set-output name=node::node_${node//./}"
44+
shell: bash
45+
- uses: codecov/codecov-action@v1
46+
with:
47+
file: coverage/coverage-final.json
48+
flags: ${{ steps.test-coverage-flags.outputs.os }},${{ steps.test-coverage-flags.outputs.node }}

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*~
2+
*.swp
3+
npm-debug.log
4+
node_modules
5+
/core
6+
.eslintcache
7+
.npmrc
8+
.yarn-error.log
9+
.nyc_output
10+
/coverage
11+
/build
12+
.vscode

.prettierrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@netlify/eslint-config-node/.prettierrc.json"

CHANGELOG.md

Whitespace-only changes.

CODE_OF_CONDUCT.md

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

CONTRIBUTING.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Contributions
2+
3+
🎉 Thanks for considering contributing to this project! 🎉
4+
5+
These guidelines will help you send a pull request.
6+
7+
Please note that this project is not intended to be used outside my own projects so new features are unlikely to be
8+
accepted.
9+
10+
If you're submitting an issue instead, please skip this document.
11+
12+
If your pull request is related to a typo or the documentation being unclear, please click on the relevant page's `Edit`
13+
button (pencil icon) and directly suggest a correction instead.
14+
15+
This project was made with ❤️. The simplest way to give back is by starring and sharing it online.
16+
17+
Everyone is welcome regardless of personal background. We enforce a [Code of conduct](CODE_OF_CONDUCT.md) in order to
18+
promote a positive and inclusive environment.
19+
20+
# Development process
21+
22+
First fork and clone the repository. If you're not sure how to do this, please watch
23+
[these videos](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).
24+
25+
Run:
26+
27+
```bash
28+
npm install
29+
```
30+
31+
Make sure everything is correctly setup with:
32+
33+
```bash
34+
npm test
35+
```
36+
37+
After submitting the pull request, please make sure the Continuous Integration checks are passing.
38+
39+
## Releasing
40+
41+
1. Merge the release PR
42+
2. Switch to the default branch `git checkout master`
43+
3. Pull latest changes `git pull`
44+
4. Publish the package `npm publish`

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2020 Netlify <team@netlify.com>
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)