Skip to content

Commit 0a7a2ac

Browse files
committed
chore: Initial Commit
0 parents  commit 0a7a2ac

25 files changed

Lines changed: 3101 additions & 0 deletions

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: 'bun' # See documentation for possible values
9+
directory: '/' # Location of package manifests
10+
schedule:
11+
interval: 'weekly'

.github/workflows/ci-cd.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches: [main, release, rc]
6+
pull_request:
7+
branches: [main, release, rc]
8+
9+
permissions:
10+
contents: write
11+
packages: write
12+
checks: write
13+
pull-requests: write
14+
id-token: write
15+
attestations: write
16+
17+
jobs:
18+
lint:
19+
name: Lint
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Setup Bun
28+
uses: oven-sh/setup-bun@v2
29+
with:
30+
bun-version: 1.2.15
31+
32+
- name: Cache Bun global packages
33+
uses: actions/cache@v4
34+
with:
35+
path: ~/.bun/install/cache
36+
key: ${{ runner.os }}-bun-${{ hashFiles('**/package.json') }}
37+
restore-keys: |
38+
${{ runner.os }}-bun-
39+
40+
- name: Cache Playwright browser binaries
41+
uses: actions/cache@v4
42+
with:
43+
path: ~/.cache/ms-playwright
44+
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package.json') }}
45+
restore-keys: |
46+
${{ runner.os }}-playwright-
47+
48+
- name: Install dependencies
49+
run: bun install
50+
51+
- name: Run format check
52+
run: bun run format:check
53+
54+
build:
55+
name: Build
56+
needs: lint
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout
60+
uses: actions/checkout@v4
61+
with:
62+
fetch-depth: 0
63+
64+
- name: Setup Bun
65+
uses: oven-sh/setup-bun@v2
66+
with:
67+
bun-version: 1.2.15
68+
69+
- name: Cache Bun global packages
70+
uses: actions/cache@v4
71+
with:
72+
path: ~/.bun/install/cache
73+
key: ${{ runner.os }}-bun-${{ hashFiles('**/package.json') }}
74+
restore-keys: |
75+
${{ runner.os }}-bun-
76+
77+
- name: Cache Playwright browser binaries
78+
uses: actions/cache@v4
79+
with:
80+
path: ~/.cache/ms-playwright
81+
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package.json') }}
82+
restore-keys: |
83+
${{ runner.os }}-playwright-
84+
85+
- name: Install dependencies
86+
run: bun install
87+
88+
- name: Configure git
89+
run: |
90+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
91+
git config --global user.name "github-actions[bot]"
92+
93+
- name: Build
94+
run: bun run build
95+
96+
- name: Upload build artifacts
97+
uses: actions/upload-artifact@v4
98+
with:
99+
name: build-artifacts
100+
path: dist/
101+
102+
- name: Attest build artifacts
103+
if: github.ref == 'refs/heads/release' || github.ref == 'refs/heads/rc'
104+
uses: actions/attest-build-provenance@v2
105+
with:
106+
subject-path: 'dist/*'
107+
108+
release:
109+
name: Release
110+
needs: build
111+
if: github.event_name == 'push' && (github.ref == 'refs/heads/release' || github.ref == 'refs/heads/rc')
112+
runs-on: ubuntu-latest
113+
steps:
114+
- name: Checkout
115+
uses: actions/checkout@v4
116+
with:
117+
fetch-depth: 0
118+
119+
- name: Setup Bun
120+
uses: oven-sh/setup-bun@v2
121+
with:
122+
bun-version: 1.2.15
123+
124+
- name: Cache Bun global packages
125+
uses: actions/cache@v4
126+
with:
127+
path: ~/.bun/install/cache
128+
key: ${{ runner.os }}-bun-${{ hashFiles('**/package.json') }}
129+
restore-keys: |
130+
${{ runner.os }}-bun-
131+
132+
- name: Cache Playwright browser binaries
133+
uses: actions/cache@v4
134+
with:
135+
path: ~/.cache/ms-playwright
136+
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package.json') }}
137+
restore-keys: |
138+
${{ runner.os }}-playwright-
139+
140+
- name: Install dependencies
141+
run: bun install
142+
143+
- name: Download build artifacts
144+
uses: actions/download-artifact@v4
145+
with:
146+
name: build-artifacts
147+
path: .
148+
149+
- name: Configure git & npm
150+
env:
151+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
152+
run: |
153+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
154+
git config --global user.name "github-actions[bot]"
155+
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
156+
157+
- name: Release
158+
env:
159+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
160+
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
161+
run: |
162+
if [ "${{ github.ref }}" = "refs/heads/release" ]; then
163+
echo "Releasing stable version..."
164+
bun run release:ci
165+
elif [ "${{ github.ref }}" = "refs/heads/rc" ]; then
166+
echo "Releasing RC version..."
167+
bun run release:rc:ci
168+
fi

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# dependencies (bun install)
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
*.tgz
8+
9+
# code coverage
10+
coverage
11+
*.lcov
12+
13+
# logs
14+
logs
15+
_.log
16+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17+
18+
# dotenv environment variable files
19+
.env
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
.env.local
24+
25+
# caches
26+
.eslintcache
27+
.cache
28+
*.tsbuildinfo
29+
30+
# IntelliJ based IDEs
31+
.idea
32+
33+
# Finder (MacOS) folder config
34+
.DS_Store

.npmignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Source files
2+
src/
3+
*.ts
4+
!*.d.ts
5+
6+
# Test files
7+
__tests__/
8+
*.test.ts
9+
*.spec.ts
10+
test_data/
11+
coverage/
12+
jest.config.js
13+
14+
# Development files
15+
.github/
16+
.vscode/
17+
.husky/
18+
.editorconfig
19+
.eslintrc
20+
.prettierrc
21+
.prettierignore
22+
tsconfig*.json
23+
commitlint.config.js
24+
.release-it.json
25+
.tool-versions
26+
27+
# Build scripts
28+
build.sh
29+
build-npm.sh
30+
install.ps1
31+
install.sh
32+
update.ps1
33+
update.sh
34+
35+
# Documentation
36+
docs/
37+
38+
# Git files
39+
.git/
40+
.gitignore
41+
42+
# Logs
43+
*.log
44+
npm-debug.log*
45+
yarn-debug.log*
46+
yarn-error.log*
47+
48+
# Dependency directories
49+
node_modules/
50+
51+
# Environment variables
52+
.env
53+
.env.local
54+
.env.development.local
55+
.env.test.local
56+
.env.production.local
57+
58+
# Misc
59+
.DS_Store
60+
Thumbs.db

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CHANGELOG.md

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"semi": false,
3+
"trailingComma": "es5",
4+
"singleQuote": true,
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"useTabs": true,
8+
"bracketSpacing": true,
9+
"arrowParens": "always",
10+
"objectWrap": "preserve"
11+
}

.release-it.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/release-it/release-it/refs/heads/main/schema/release-it.json",
3+
"git": {
4+
"push": true,
5+
"tag": true,
6+
"commitMessage": "chore: release v${version} [skip ci]",
7+
"tagName": "v${version}",
8+
"commit": true,
9+
"requireCleanWorkingDir": false,
10+
"addUntrackedFiles": true
11+
},
12+
"github": {
13+
"release": true,
14+
"makeLatest": true,
15+
"assets": ["dist/*"],
16+
"comments": {
17+
"issue": ":rocket: _This issue has been resolved in v${version}. See [${releaseName}](${releaseUrl}) for release notes._",
18+
"pr": ":rocket: _This pull request is included in v${version}. See [${releaseName}](${releaseUrl}) for release notes._",
19+
"submit": true
20+
}
21+
},
22+
"npm": {
23+
"publish": true,
24+
"skipChecks": true,
25+
"allowSameVersion": true,
26+
"publishArgs": ["--provenance"]
27+
},
28+
"plugins": {
29+
"@release-it/conventional-changelog": {
30+
"infile": "CHANGELOG.md",
31+
"preset": "angular",
32+
"types": ["feat", "fix"]
33+
}
34+
}
35+
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"typescript.preferences.importModuleSpecifier": "non-relative",
4+
"typescript.preferences.importModuleSpecifierEnding": "minimal"
5+
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Changelog

0 commit comments

Comments
 (0)