Skip to content

Commit aaf1ded

Browse files
authored
Merge pull request #1 from paritytech/spha/cli
feat(cli): add cli package
2 parents 4a9b065 + a877a83 commit aaf1ded

106 files changed

Lines changed: 73931 additions & 1 deletion

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CONTRIBUTING.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Contributing
2+
3+
## Where to Contribute
4+
5+
| Type | Repository |
6+
|------|------------|
7+
| Protocol | [paritytech/dotns](https://github.com/paritytech/dotns) |
8+
| SDK/CLI | This repository |
9+
10+
## Setup
11+
```bash
12+
git clone https://github.com/parity/dotns-sdk.git
13+
cd dotns-sdk
14+
bun install
15+
cd packages/cli && bun run build
16+
```
17+
18+
## Development
19+
```bash
20+
bun run dev <command> # Run without building
21+
bun run typecheck # Type check
22+
bun run lint # Lint
23+
bun run format # Format check
24+
```
25+
26+
## Commits
27+
28+
Follow [Conventional Commits](https://www.conventionalcommits.org/):
29+
```
30+
<type>(<scope>): <description>
31+
```
32+
33+
Types: feat, fix, docs, style, refactor, test, chore
34+
35+
Scopes: cli, bulletin, auth, register, deps, ci
36+
37+
Examples:
38+
```
39+
feat(cli): add parallel upload
40+
fix(bulletin): resolve CID mismatch
41+
docs(cli): update examples
42+
chore(deps): bump polkadot-api
43+
```
44+
45+
## Pull Requests
46+
47+
1. Create branch from `main`
48+
2. Make changes
49+
3. Run `bun run typecheck && bun run lint`
50+
4. Open PR with clear description
51+
52+
## Code Style
53+
54+
- Run `bun run lint:fix` and `bun run format:fix` before committing
55+
- Add JSDoc for public APIs
56+
- Follow existing conventions

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Report Protocol Bug
4+
url: https://github.com/paritytech/dotns/issues/new?template=bug_report.md
5+
about: For bugs in the DotNS protocol or contracts, report on the main repository.
6+
7+
- name: Feature Request
8+
url: https://github.com/paritytech/dotns/issues/new?template=feature_request.md
9+
about: For protocol feature requests, submit to the main repository.
10+
11+
- name: Discussions
12+
url: https://github.com/paritytech/dotns/discussions
13+
about: Questions and general discussion.

.github/ISSUE_TEMPLATE/sdk-bug.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: SDK Bug
2+
description: Bug in SDK
3+
labels: ["type: bug", "needs-info"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
This tracker is for SDK and CLI bugs only.
9+
10+
Protocol bugs: https://github.com/paritytech/dotns/issues
11+
12+
- type: checkboxes
13+
id: preflight
14+
attributes:
15+
label: Checklist
16+
options:
17+
- label: Searched existing issues
18+
required: true
19+
- label: Read documentation
20+
required: true
21+
- label: This is SDK/CLI specific
22+
required: true
23+
24+
- type: dropdown
25+
id: package
26+
attributes:
27+
label: Package
28+
options:
29+
- "@dotns/cli"
30+
- "Build/CI"
31+
validations:
32+
required: true
33+
34+
- type: dropdown
35+
id: scope
36+
attributes:
37+
label: Area
38+
options:
39+
- "bulletin"
40+
- "registration"
41+
- "content hash"
42+
- "auth/keystore"
43+
- "lookup"
44+
- "pop"
45+
- "build"
46+
- "other"
47+
validations:
48+
required: true
49+
50+
- type: textarea
51+
id: description
52+
attributes:
53+
label: Description
54+
validations:
55+
required: true
56+
57+
- type: textarea
58+
id: reproduction
59+
attributes:
60+
label: Steps to Reproduce
61+
placeholder: |
62+
1. Run `dotns ...`
63+
2. See error
64+
validations:
65+
required: true
66+
67+
- type: textarea
68+
id: expected
69+
attributes:
70+
label: Expected
71+
validations:
72+
required: true
73+
74+
- type: textarea
75+
id: actual
76+
attributes:
77+
label: Actual
78+
render: shell
79+
validations:
80+
required: true
81+
82+
- type: textarea
83+
id: environment
84+
attributes:
85+
label: Environment
86+
value: |
87+
OS:
88+
Bun:
89+
Package version:
90+
validations:
91+
required: true
92+
93+
- type: textarea
94+
id: logs
95+
attributes:
96+
label: Logs
97+
render: shell
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build Issue
2+
description: Build or installation issue
3+
labels: ["type: bug", "scope: build"]
4+
body:
5+
- type: checkboxes
6+
id: preflight
7+
attributes:
8+
label: Checklist
9+
options:
10+
- label: Using Bun 1.2.6+
11+
required: true
12+
- label: Tried `bun install --frozen-lockfile`
13+
required: true
14+
15+
- type: dropdown
16+
id: issue-type
17+
attributes:
18+
label: Type
19+
options:
20+
- "Installation"
21+
- "Build"
22+
- "Runtime"
23+
- "Dependencies"
24+
- "TypeScript"
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
id: description
30+
attributes:
31+
label: Description
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: command
37+
attributes:
38+
label: Command
39+
render: shell
40+
validations:
41+
required: true
42+
43+
- type: textarea
44+
id: output
45+
attributes:
46+
label: Output
47+
render: shell
48+
validations:
49+
required: true
50+
51+
- type: textarea
52+
id: environment
53+
attributes:
54+
label: Environment
55+
value: |
56+
OS:
57+
Bun:
58+
Node:
59+
validations:
60+
required: true
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Documentation
2+
description: Documentation issue
3+
labels: ["type: docs"]
4+
body:
5+
- type: dropdown
6+
id: doc-type
7+
attributes:
8+
label: Type
9+
options:
10+
- "README"
11+
- "Code comments"
12+
- "CLI help"
13+
- "Examples"
14+
- "Types"
15+
validations:
16+
required: true
17+
18+
- type: dropdown
19+
id: issue-type
20+
attributes:
21+
label: Issue
22+
options:
23+
- "Missing"
24+
- "Incorrect"
25+
- "Unclear"
26+
- "Outdated"
27+
- "Typo"
28+
validations:
29+
required: true
30+
31+
- type: textarea
32+
id: location
33+
attributes:
34+
label: Location
35+
placeholder: "README.md line 45"
36+
validations:
37+
required: true
38+
39+
- type: textarea
40+
id: description
41+
attributes:
42+
label: Description
43+
validations:
44+
required: true
45+
46+
- type: textarea
47+
id: suggestion
48+
attributes:
49+
label: Suggestion

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Description
2+
3+
## Type
4+
5+
- [ ] Bug fix
6+
- [ ] Feature
7+
- [ ] Breaking change
8+
- [ ] Documentation
9+
- [ ] Chore
10+
11+
## Package
12+
13+
- [ ] `@dotns/cli`
14+
- [ ] Root/monorepo
15+
- [ ] Documentation
16+
17+
## Related Issues
18+
19+
Fixes #
20+
21+
## Checklist
22+
23+
### Code
24+
25+
- [ ] Follows project style
26+
- [ ] `bun run lint` passes
27+
- [ ] `bun run format` passes
28+
- [ ] `bun run typecheck` passes
29+
30+
### Documentation
31+
32+
- [ ] README updated if needed
33+
- [ ] Types updated if needed
34+
35+
### Breaking Changes
36+
37+
- [ ] No breaking changes
38+
- [ ] Breaking changes documented below
39+
40+
**Breaking changes:**
41+
42+
## Testing
43+
44+
How to test:
45+
46+
1.
47+
2.
48+
49+
## Notes

.github/labeler.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
"pkg: cli":
2+
- changed-files:
3+
- any-glob-to-any-file: "packages/cli/**"
4+
5+
"scope: bulletin":
6+
- changed-files:
7+
- any-glob-to-any-file:
8+
- "packages/cli/src/**/bulletin/**"
9+
- "packages/cli/src/commands/bulletin.ts"
10+
11+
"scope: auth":
12+
- changed-files:
13+
- any-glob-to-any-file:
14+
- "packages/cli/src/**/auth/**"
15+
- "packages/cli/src/**/keystore/**"
16+
17+
"scope: registration":
18+
- changed-files:
19+
- any-glob-to-any-file: "packages/cli/src/**/register/**"
20+
21+
"scope: contenthash":
22+
- changed-files:
23+
- any-glob-to-any-file:
24+
- "packages/cli/src/**/content/**"
25+
- "packages/cli/src/**/cid/**"
26+
27+
"type: docs":
28+
- changed-files:
29+
- any-glob-to-any-file:
30+
- "**/*.md"
31+
- "docs/**"
32+
33+
"type: test":
34+
- changed-files:
35+
- any-glob-to-any-file: "packages/cli/tests/**"
36+
37+
"dependencies":
38+
- changed-files:
39+
- any-glob-to-any-file:
40+
- "**/package.json"
41+
- "**/bun.lockb"

0 commit comments

Comments
 (0)