-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit d69cbae
Showing
26 changed files
with
5,107 additions
and
0 deletions.
There are no files selected for viewing
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,9 @@ | ||
- **I'm submitting a ...** | ||
[ ] bug report | ||
[ ] feature request | ||
[ ] question about the decisions made in the repository | ||
[ ] question about how to use this project | ||
|
||
- **Summary** | ||
|
||
- **Other information** (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.) |
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 @@ | ||
## Why? | ||
|
||
Clear and short explanation here. | ||
|
||
## How? | ||
|
||
- Done A (replace with a breakdown of the steps) | ||
- Done B | ||
- Done C | ||
|
||
## Tickets? | ||
|
||
- [Ticket 1](the-ticket-url-here) | ||
- [Ticket 2](the-ticket-url-here) | ||
- [Ticket 3](the-ticket-url-here) | ||
|
||
## Contribution checklist? | ||
|
||
- [ ] The commit messages are detailed | ||
- [ ] The `build` command runs locally | ||
- [ ] Assets or static content are linked and stored in the project | ||
- [ ] Document filename is named after the slug | ||
- [ ] You've reviewed spelling using a grammar checker | ||
- [ ] For documentation, guides or references, you've tested the commands and steps | ||
- [ ] You've done enough research before writing | ||
|
||
## Security checklist? | ||
|
||
- [ ] Sensitive data has been identified and is being protected properly | ||
- [ ] Injection has been prevented (parameterized queries, no eval or system calls) | ||
- [ ] The Components are escaping output (to prevent XSS) | ||
|
||
## References? | ||
|
||
Optionally, provide references such as links | ||
|
||
## Preview? | ||
|
||
Optionally, provide the preview url here |
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,34 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: CI | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Set up pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
|
||
- name: Install dependencies | ||
run: pnpm i --frozen-lockfile | ||
|
||
- name: Run linter | ||
run: pnpm lint | ||
|
||
- name: Run formatter | ||
run: pnpm format:check | ||
|
||
- name: Build package | ||
run: pnpm build |
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,45 @@ | ||
name: Publish to npm | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Set up pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
|
||
- name: Install dependencies | ||
run: pnpm i --frozen-lockfile | ||
|
||
- name: Build package | ||
run: pnpm build | ||
|
||
- name: Set NPM profile for publishing packages | ||
uses: franzbischoff/replace_envs@v1 | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
with: | ||
from_file: '.npmrc.template' | ||
to_file: '.npmrc' | ||
commit: 'false' | ||
|
||
- name: Publish package | ||
run: pnpm publish --access=public --no-git-checks |
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 @@ | ||
dist | ||
node_modules | ||
test | ||
src/**.js | ||
coverage | ||
*.log | ||
.DS_Store |
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 @@ | ||
npx --no-install commitlint --edit "$1" |
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 @@ | ||
pnpx lint-staged |
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,8 @@ | ||
src/ | ||
tsconfig.json | ||
jest.config.js | ||
eslint.config.js | ||
commintlint.config.js | ||
.prettierrc | ||
.prettierignore | ||
.husky/ |
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,2 @@ | ||
registry=https://registry.npmjs.org/ | ||
//registry.npmjs.org/:_authToken=${NPM_TOKEN} |
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,4 @@ | ||
node_modules | ||
dist | ||
.husky/ | ||
pnpm-lock.yaml |
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,6 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"trailingComma": "all" | ||
} |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Fleek | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
# Fleek Functions ESBuild Config | ||
|
||
This package provides a custom ESBuild configuration for Fleek Functions, optimized for building projects for Fleek Functions. It extends the default ESBuild configuration to support Fleek Functions' specific requirements. | ||
|
||
## Installation | ||
|
||
You can install this package using npm or yarn: | ||
|
||
```bash | ||
npm install @fleek-platform/functions-esbuild-config | ||
``` | ||
|
||
or | ||
|
||
```bash | ||
yarn add @fleek-platform/functions-esbuild-config | ||
``` | ||
|
||
or | ||
|
||
```bash | ||
pnpm add @fleek-platform/functions-esbuild-config | ||
``` | ||
|
||
## Usage | ||
|
||
TODO: Add usage example |
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 @@ | ||
export default { extends: ['@commitlint/config-conventional'] }; |
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,6 @@ | ||
// @ts-check | ||
|
||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended); |
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 @@ | ||
export default { | ||
preset: 'ts-jest', | ||
collectCoverage: true, | ||
coverageDirectory: 'coverage', | ||
coverageProvider: 'v8', | ||
testMatch: ['**/*.spec.ts'], | ||
}; |
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,51 @@ | ||
{ | ||
"name": "@fleek-platform/functions-esbuild-config", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"scripts": { | ||
"build": "tsc", | ||
"lint": "eslint 'src/**/*.{js,ts}'", | ||
"format": "prettier . --write", | ||
"format:check": "prettier . --check", | ||
"test": "jest", | ||
"prepare": "husky" | ||
}, | ||
"keywords": [ | ||
"fleek", | ||
"esbuild", | ||
"config", | ||
"typescript", | ||
"serverless", | ||
"lambda", | ||
"fleek-functions", | ||
"edge" | ||
], | ||
"author": "", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=18" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"esbuild": "^0.23.1" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^19.3.0", | ||
"@commitlint/config-conventional": "^19.2.2", | ||
"@eslint/js": "^9.2.0", | ||
"@types/jest": "^29.5.12", | ||
"@types/node": "^20.12.11", | ||
"@types/semver": "^7.5.8", | ||
"eslint": "^9.2.0", | ||
"husky": "^9.0.11", | ||
"jest": "^29.7.0", | ||
"lint-staged": "^15.2.2", | ||
"prettier": "^3.2.5", | ||
"ts-jest": "^29.1.2", | ||
"typescript": "^5.4.5", | ||
"typescript-eslint": "8.5.0" | ||
} | ||
} |
Oops, something went wrong.