-
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 b673146
Showing
43 changed files
with
21,573 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 @@ | ||
module.exports = { | ||
env: { es2020: true }, | ||
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { ecmaVersion: "latest", sourceType: "module" }, | ||
rules: { | ||
"no-console": ["error", { allow: ["warn", "error"] }], | ||
}, | ||
}; |
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,15 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
pull-request-branch-name: | ||
separator: "-" | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
pull-request-branch-name: | ||
separator: "-" |
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 @@ | ||
--- | ||
repo: | ||
- "*" | ||
|
||
cicd: | ||
- .github/* | ||
- .github/**/* |
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,20 @@ | ||
--- | ||
name: Init Workflow | ||
|
||
on: | ||
workflow_call: | ||
|
||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
init: | ||
name: Init | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⏬ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔄 Init Cache | ||
uses: nmerget/npm-cache-action@main |
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 @@ | ||
name: Leaked Secrets Scan | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
TruffleHog: | ||
name: Secrets Scan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⏬ Checkout repo | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: 🐷 TruffleHog OSS | ||
uses: trufflesecurity/[email protected] | ||
with: | ||
path: ./ | ||
base: ${{ github.event.repository.default_branch }} | ||
head: HEAD |
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,25 @@ | ||
--- | ||
name: Build Workflow | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⏬ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔄 Init Cache | ||
uses: nmerget/npm-cache-action@main | ||
|
||
- name: 🔨 Build | ||
run: npm run build | ||
|
||
- name: ⏫ Upload build | ||
uses: nmerget/upload-gzip-artifact@main | ||
with: | ||
name: build | ||
path: dist |
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,19 @@ | ||
--- | ||
name: Validate | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
validate: | ||
name: Validate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⏬ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔄 Init Cache | ||
uses: nmerget/npm-cache-action@main | ||
|
||
- name: 🔬 Validate repo | ||
run: npm run lint |
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,19 @@ | ||
--- | ||
name: Test | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
validate: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⏬ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔄 Init Cache | ||
uses: nmerget/npm-cache-action@main | ||
|
||
- name: 👨🔬👩🔬 Test repo | ||
run: npm run test |
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,37 @@ | ||
--- | ||
name: Publish | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
validate: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⏬ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔄 Init Cache | ||
uses: nmerget/npm-cache-action@main | ||
|
||
- name: ⏬ Download build | ||
uses: nmerget/download-gzip-artifact@main | ||
with: | ||
name: build | ||
|
||
- name: 🔀 Extract tag | ||
shell: bash | ||
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | ||
id: extractTag | ||
|
||
- name: 🔜 Publish to npm | ||
env: | ||
TAG: ${{ steps.extractTag.outputs.tag }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
SEMVER_VERSION=$(npx find-versions-cli "$TAG") | ||
npm version --no-git-tag-version "$SEMVER_VERSION" | ||
npm config set registry https://registry.npmjs.org/ | ||
npm set //registry.npmjs.org/:_authToken "$NPM_TOKEN" | ||
npm publish |
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 @@ | ||
--- | ||
name: Dependabot auto-merge | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: ⏬ Dependabot metadata | ||
id: metadata | ||
uses: dependabot/[email protected] | ||
with: | ||
github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
|
||
- name: 🤖 Enable auto-merge for Dependabot PRs | ||
run: gh pr merge --auto --merge "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_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,28 @@ | ||
--- | ||
name: 'CodeQL' | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ['javascript'] | ||
|
||
steps: | ||
- name: ⏬ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔄 Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
- name: 🔨 Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
- name: 🔎 Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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,14 @@ | ||
--- | ||
name: 'Dependency Review' | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: ⏬ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: 🔎 Dependency Review | ||
uses: actions/dependency-review-action@v3 |
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,14 @@ | ||
--- | ||
name: 'Pull Request Labeler' | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
triage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🏷️ Labeler | ||
uses: actions/labeler@v4 | ||
with: | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
sync-labels: true |
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,29 @@ | ||
name: Default Pipeline | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
init: | ||
uses: ./.github/workflows/00-init.yml | ||
|
||
scan-secrets: | ||
uses: ./.github/workflows/00-scan-secrets.yml | ||
|
||
build: | ||
uses: ./.github/workflows/01-build.yml | ||
needs: [init] | ||
secrets: inherit | ||
|
||
lint: | ||
uses: ./.github/workflows/01-lint.yml | ||
needs: [init] | ||
secrets: inherit | ||
|
||
test: | ||
uses: ./.github/workflows/01-test.yml | ||
needs: [init] | ||
secrets: inherit |
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,32 @@ | ||
name: Publish Pipeline | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
init: | ||
uses: ./.github/workflows/00-init.yml | ||
|
||
scan-secrets: | ||
uses: ./.github/workflows/00-scan-secrets.yml | ||
|
||
build: | ||
uses: ./.github/workflows/01-build.yml | ||
needs: [init] | ||
secrets: inherit | ||
|
||
lint: | ||
uses: ./.github/workflows/01-lint.yml | ||
needs: [init] | ||
secrets: inherit | ||
|
||
test: | ||
uses: ./.github/workflows/01-test.yml | ||
needs: [init] | ||
secrets: inherit | ||
|
||
publish: | ||
uses: ./.github/workflows/02-publish.yml | ||
needs: [build, lint, test] | ||
secrets: inherit |
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,22 @@ | ||
name: On Pull Request | ||
|
||
on: pull_request | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
actions: read | ||
security-events: write | ||
|
||
jobs: | ||
dependabot: | ||
uses: ./.github/workflows/99-auto-merge.yml | ||
|
||
codeql: | ||
uses: ./.github/workflows/99-codeql-analysis.yml | ||
|
||
dependency-review: | ||
uses: ./.github/workflows/99-dependency-review.yml | ||
|
||
labeler: | ||
uses: ./.github/workflows/99-labeler.yml |
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,43 @@ | ||
lib-cov | ||
*.seed | ||
*.log | ||
*.csv | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
*.swp | ||
|
||
pids | ||
logs | ||
results | ||
tmp | ||
|
||
# Build | ||
public/css/main.css | ||
|
||
# Coverage reports | ||
coverage | ||
|
||
# API keys and secrets | ||
.env | ||
|
||
# Dependency directory | ||
node_modules | ||
bower_components | ||
|
||
# Editors | ||
.idea | ||
*.iml | ||
|
||
# OS metadata | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Ignore built ts files | ||
dist/**/* | ||
|
||
# ignore yarn.lock | ||
yarn.lock | ||
/output/ | ||
/fonts/ |
Oops, something went wrong.