Skip to content

Commit c1ba2cc

Browse files
committed
sync the code
1 parent d321596 commit c1ba2cc

12 files changed

Lines changed: 201 additions & 0 deletions

File tree

.cz.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"commitizen": {
3+
"name": "cz_conventional_commits",
4+
"tag_format": "v$version",
5+
"version_scheme": "semver",
6+
"version_provider": "npm",
7+
"update_changelog_on_bump": true,
8+
"major_version_zero": true
9+
}
10+
}

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
npm-debug.log
3+
dist
4+
coverage
5+
.git
6+
.github
7+
.husky
8+
.vscode

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: General Issue
2+
description: Report a bug, request a feature, or propose a task
3+
title: "[Issue] <brief summary>"
4+
labels: [needs-triage]
5+
body:
6+
- type: dropdown
7+
id: type
8+
attributes:
9+
label: Type of Issue
10+
description: What kind of issue is being reported?
11+
options:
12+
- Bug Report
13+
- Feature Request
14+
- Refactor / Cleanup
15+
- Documentation
16+
- Question
17+
validations:
18+
required: true
19+
20+
- type: input
21+
id: context
22+
attributes:
23+
label: Context or Problem
24+
description: What was observed or what problem is this issue addressing?
25+
placeholder: e.g., "The tool crashes when..."
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: steps
31+
attributes:
32+
label: Steps to Reproduce or Task Description
33+
description: Provide a clear sequence of actions to replicate the issue or complete the task.
34+
placeholder: |
35+
1. Open the app
36+
2. Click "Run"
37+
3. Observe error message
38+
validations:
39+
required: false
40+
41+
- type: textarea
42+
id: expected
43+
attributes:
44+
label: Expected Outcome
45+
description: What was expected to happen?
46+
placeholder: "The tool should complete without errors..."
47+
validations:
48+
required: false
49+
50+
- type: textarea
51+
id: notes
52+
attributes:
53+
label: Additional Notes or References
54+
description: Include logs, screenshots, or links that support this issue.
55+
placeholder: "Logs, screenshots, related issues, design notes..."
56+
validations:
57+
required: false

.github/pull_request_template.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Description
2+
3+
<!-- Provide a clear explanation of what has been implemented or fixed. Mention any related context, requirements, or issues. -->
4+
5+
- Closes #[issue-number] (if applicable)
6+
7+
---
8+
9+
## Testing
10+
11+
<!-- Include logs, screenshots, terminal output, or any relevant proof of successful testing. -->
12+
13+
---
14+
15+
## Checklist
16+
17+
- [ ] Code has been tested locally
18+
- [ ] Unit tests have been added or updated
19+
- [ ] Documentation has been updated if needed
20+
21+
---
22+
23+
## Additional Notes
24+
25+
<!-- Include any further details, follow-up items, or decisions relevant to the reviewer. -->

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: "22"
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run linter
27+
run: npm run lint
28+
29+
- name: Check formatting
30+
run: npm run format
31+
32+
- name: Compile typescript
33+
run: npm run build
34+
35+
- name: Run tests
36+
run: npm test

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/
2+
dist/
3+
*.log
4+
.DS_Store
5+
.env
6+
.env.local
7+
.env.*.local

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env sh
2+
npx lint-staged

.husky/setup-hooks.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*global console*/
2+
import { writeFileSync, mkdirSync, chmodSync, constants } from 'fs';
3+
import { execSync } from 'child_process';
4+
import { platform } from 'os';
5+
6+
mkdirSync('.husky', { recursive: true });
7+
8+
execSync('git config core.hooksPath .husky');
9+
10+
writeFileSync(
11+
'.husky/pre-commit',
12+
`#!/usr/bin/env sh
13+
npx lint-staged`
14+
);
15+
16+
// Cross-platform way to make the file executable
17+
if (platform() === 'win32') {
18+
// On Windows, executable permissions don't matter as much
19+
console.log('pre-commit script created.');
20+
} else {
21+
// On Unix systems, use chmod
22+
try {
23+
execSync('chmod +x .husky/pre-commit');
24+
console.log('pre-commit script created.');
25+
} catch {
26+
// Fallback to Node.js fs.chmodSync if available
27+
try {
28+
chmodSync(
29+
'.husky/pre-commit',
30+
constants.S_IRWXU | constants.S_IRGRP | constants.S_IXGRP
31+
); // 0o750
32+
console.log('pre-commit script created.');
33+
} catch {
34+
console.warn(
35+
'Warning: Could not set executable permissions on the hook file'
36+
);
37+
}
38+
}
39+
}

.nvmrc

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

0 commit comments

Comments
 (0)