Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
build:
name: Build, lint, and test on Node 24
name: Build and lint on Node 24
runs-on: ubuntu-latest

steps:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Setup Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: bun install

- name: Build
run: bun run build

- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
version: bun run changeset version
publish: bun run release
title: "chore: release package"
commit: "chore: release package"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
185 changes: 182 additions & 3 deletions bun.lock

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@
"format": "tsdx format",
"format:check": "tsdx format --check",
"typecheck": "tsdx typecheck",
"prepublishOnly": "bun run build"
"prepublishOnly": "bun run build",
"changeset": "changeset",
"release": "bun run build && changeset publish"
},
"dependencies": {
"commander": "^14.0.2"
},
"devDependencies": {
"@changesets/cli": "^2.29.8",
"@types/node": "^24.10.0",
"bunchee": "^6.9.3",
"tsdx": "^2.0.0",
Expand Down
15 changes: 11 additions & 4 deletions src/bin/did-resolver-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ const program = new Command();
program
.name("did-resolver-cli")
.description("DID Resolver CLI")
.version("0.0.1")
.argument("<name>", "Name to print")
.action((name: string) => {
console.log(name);
.version("0.0.2")
.argument("<did>", "DID to resolve using Universal Resolver (format: did:method:specific-id)")
.action(async (did: string) => {
try {
const response = await fetch(`https://dev.uniresolver.io/1.0/identifiers/${did}`)
const responseJson = await response.json()
console.log(JSON.stringify(responseJson, null, 2))
} catch (error) {
console.error("Error:", error)
process.exit(1)
}
});

program.parse();