Skip to content

Commit 9cad9a0

Browse files
committed
docs: update repo
1 parent 80a2de8 commit 9cad9a0

6 files changed

Lines changed: 217 additions & 17 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Checkout auths repo (for local @auths/verifier dependency)
1717
uses: actions/checkout@v4
1818
with:
19-
repository: bordumb/auths
19+
repository: auths-dev/auths
2020
path: ../auths
2121

2222
- name: Install Rust

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# `<auths-verify>` Web Component
22

33
[![npm version](https://img.shields.io/npm/v/auths-verify.svg)](https://www.npmjs.com/package/auths-verify)
4-
[![license](https://img.shields.io/npm/l/auths-verify.svg)](https://github.com/bordumb/auths-verify-widget/blob/main/LICENSE)
4+
[![license](https://img.shields.io/npm/l/auths-verify.svg)](https://github.com/auths-dev/auths-verify-widget/blob/main/LICENSE)
55

6-
A drop-in web component that verifies [Auths](https://github.com/bordumb/auths) decentralized identities — the open-source equivalent of GitHub's green "Verified" badge. Point it at any repository that uses Auths, and it cryptographically verifies the identity chain in the browser via WASM.
6+
A drop-in web component that verifies [Auths](https://github.com/auths-dev/auths) decentralized identities — the open-source equivalent of GitHub's green "Verified" badge. Point it at any repository that uses Auths, and it cryptographically verifies the identity chain in the browser via WASM.
77

88
## Install
99

@@ -39,7 +39,7 @@ That's it. The widget will:
3939
4. Cryptographically verify the full attestation chain
4040
5. Display a badge showing the result (Verified, Invalid, Expired, etc.)
4141

42-
**Prerequisite:** The repository owner must have set up an Auths identity with [`auths init`](https://github.com/bordumb/auths). If the repo doesn't have Auths identity data, the widget will show an error.
42+
**Prerequisite:** The repository owner must have set up an Auths identity with [`auths init`](https://github.com/auths-dev/auths). If the repo doesn't have Auths identity data, the widget will show an error.
4343

4444
**Supported forges:** GitHub and Gitea (including self-hosted). GitLab is not supported for auto-resolve because its API does not expose custom Git refs — use manual mode instead.
4545

@@ -177,7 +177,7 @@ The resolver layer uses dynamic imports — if you only use manual `attestation`
177177
- Node.js >= 18
178178
- Rust 1.93+ with `wasm32-unknown-unknown` target (for WASM builds)
179179
- [wasm-pack](https://rustwasm.github.io/wasm-pack/)
180-
- The [auths](https://github.com/bordumb/auths) repo cloned alongside this one:
180+
- The [auths](https://github.com/auths-dev/auths) repo cloned alongside this one:
181181
```
182182
auths-base/
183183
├── auths/ # main auths repo

examples/auto-resolve.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ <h1>Auto-Resolve from Repository</h1>
2525

2626
<h2>GitHub Repository</h2>
2727
<p>Uses the <code>repo</code> attribute to auto-resolve from GitHub:</p>
28-
<pre>&lt;auths-verify repo="https://github.com/bordumb/auths"&gt;&lt;/auths-verify&gt;</pre>
28+
<pre>&lt;auths-verify repo="https://github.com/auths-dev/auths"&gt;&lt;/auths-verify&gt;</pre>
2929
<div class="demo">
3030
<auths-verify
3131
id="github-demo"
32-
repo="https://github.com/bordumb/auths"
32+
repo="https://github.com/auths-dev/auths"
3333
></auths-verify>
3434
</div>
3535
<p class="log" id="github-log">Waiting...</p>
3636

3737
<h2>With Tooltip Mode</h2>
3838
<p>Combine <code>repo</code> with display modes:</p>
39-
<pre>&lt;auths-verify repo="https://github.com/bordumb/auths" mode="tooltip"&gt;&lt;/auths-verify&gt;</pre>
39+
<pre>&lt;auths-verify repo="https://github.com/auths-dev/auths" mode="tooltip"&gt;&lt;/auths-verify&gt;</pre>
4040
<div class="demo">
4141
<auths-verify
42-
repo="https://github.com/bordumb/auths"
42+
repo="https://github.com/auths-dev/auths"
4343
mode="tooltip"
4444
></auths-verify>
4545
</div>
@@ -62,7 +62,7 @@ <h2>Forge Hint Override</h2>
6262

6363
<h2>Identity Filter</h2>
6464
<p>Use <code>identity</code> to resolve a specific identity when a repo has multiple:</p>
65-
<pre>&lt;auths-verify repo="https://github.com/bordumb/auths" identity="did:key:z6Mk..."&gt;&lt;/auths-verify&gt;</pre>
65+
<pre>&lt;auths-verify repo="https://github.com/auths-dev/auths" identity="did:key:z6Mk..."&gt;&lt;/auths-verify&gt;</pre>
6666

6767
<script type="module" src="../src/auths-verify.ts"></script>
6868
<script>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "auths-verify",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "Drop-in <auths-verify> web component for decentralized commit verification",
55
"type": "module",
66
"main": "dist/auths-verify.mjs",
@@ -23,7 +23,7 @@
2323
"build": "npm run build:full && npm run build:slim",
2424
"build:full": "INLINE_WASM=true vite build",
2525
"build:slim": "vite build --mode slim",
26-
"build:wasm": "cd ../auths/crates/auths-verifier && wasm-pack build --target bundler --features wasm && rm -rf ../../../auths-verify-widget/wasm && mv pkg ../../../auths-verify-widget/wasm",
26+
"build:wasm": "cd ../auths/crates/auths-verifier && wasm-pack build --target bundler --no-default-features --features wasm && rm -rf ../../../auths-verify-widget/wasm && mv pkg ../../../auths-verify-widget/wasm",
2727
"typecheck": "tsc --noEmit",
2828
"test": "vitest run",
2929
"test:watch": "vitest",

scripts/release/npm.py

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Build and publish auths-verify to npm.
4+
5+
Usage:
6+
python scripts/release/npm.py # dry-run (shows what would happen)
7+
python scripts/release/npm.py --push # build, test, and publish to npm
8+
9+
What it does:
10+
1. Reads the version from package.json
11+
2. Checks npm registry to make sure the version has been bumped
12+
3. Checks that the git working tree is clean
13+
4. Rebuilds WASM, runs tests, and builds the dist
14+
5. Publishes to npm with --access public
15+
6. Creates and pushes a git tag v{version}
16+
17+
Requires:
18+
- python3 (no external dependencies)
19+
- node/npm on PATH
20+
- wasm-pack on PATH (for WASM build)
21+
- git on PATH
22+
- npm authentication (npm login or NPM_TOKEN)
23+
"""
24+
25+
import json
26+
import subprocess
27+
import sys
28+
import urllib.request
29+
from pathlib import Path
30+
31+
REPO_ROOT = Path(__file__).resolve().parents[2]
32+
PACKAGE_JSON = REPO_ROOT / "package.json"
33+
NPM_REGISTRY_URL = "https://registry.npmjs.org/auths-verify"
34+
35+
36+
def get_version() -> str:
37+
data = json.loads(PACKAGE_JSON.read_text())
38+
version = data.get("version")
39+
if not version:
40+
print("ERROR: No version found in package.json", file=sys.stderr)
41+
sys.exit(1)
42+
return version
43+
44+
45+
def get_npm_version() -> str | None:
46+
req = urllib.request.Request(NPM_REGISTRY_URL, headers={"Accept": "application/json"})
47+
try:
48+
with urllib.request.urlopen(req, timeout=10) as resp:
49+
data = json.loads(resp.read())
50+
return data.get("dist-tags", {}).get("latest")
51+
except Exception:
52+
return None
53+
54+
55+
def git(*args: str) -> str:
56+
result = subprocess.run(
57+
["git", *args],
58+
capture_output=True,
59+
text=True,
60+
cwd=REPO_ROOT,
61+
)
62+
if result.returncode != 0:
63+
print(f"ERROR: git {' '.join(args)} failed:\n{result.stderr.strip()}", file=sys.stderr)
64+
sys.exit(1)
65+
return result.stdout.strip()
66+
67+
68+
def local_tag_exists(tag: str) -> bool:
69+
result = subprocess.run(
70+
["git", "tag", "-l", tag],
71+
capture_output=True,
72+
text=True,
73+
cwd=REPO_ROOT,
74+
)
75+
return bool(result.stdout.strip())
76+
77+
78+
def remote_tag_exists(tag: str) -> bool:
79+
result = subprocess.run(
80+
["git", "ls-remote", "--tags", "origin", f"refs/tags/{tag}"],
81+
capture_output=True,
82+
text=True,
83+
cwd=REPO_ROOT,
84+
)
85+
return bool(result.stdout.strip())
86+
87+
88+
def delete_local_tag(tag: str) -> None:
89+
subprocess.run(
90+
["git", "tag", "-d", tag],
91+
capture_output=True,
92+
cwd=REPO_ROOT,
93+
)
94+
95+
96+
def check_tool(name: str) -> None:
97+
result = subprocess.run(["which", name], capture_output=True)
98+
if result.returncode != 0:
99+
print(f"ERROR: {name} not found on PATH", file=sys.stderr)
100+
sys.exit(1)
101+
102+
103+
def run_step(description: str, args: list[str]) -> None:
104+
print(f"\n{description}...", flush=True)
105+
result = subprocess.run(args, cwd=REPO_ROOT)
106+
if result.returncode != 0:
107+
print(f"\nERROR: {description} failed (exit {result.returncode})", file=sys.stderr)
108+
sys.exit(1)
109+
110+
111+
def main() -> None:
112+
push = "--push" in sys.argv
113+
114+
version = get_version()
115+
tag = f"v{version}"
116+
print(f"package.json version: {version}")
117+
print(f"Git tag: {tag}")
118+
119+
# Check npm for version bump
120+
published = get_npm_version()
121+
if published:
122+
print(f"npm latest version: {published}")
123+
if published == version:
124+
print(f"\nERROR: Version {version} is already published on npm.", file=sys.stderr)
125+
print("Bump the version in package.json before releasing.", file=sys.stderr)
126+
sys.exit(1)
127+
else:
128+
print("npm latest version: (not found or not published yet)")
129+
130+
# Check git tag doesn't already exist
131+
if remote_tag_exists(tag):
132+
print(f"\nERROR: Git tag {tag} already exists on origin.", file=sys.stderr)
133+
print("Bump the version in package.json or delete the remote tag first.", file=sys.stderr)
134+
sys.exit(1)
135+
136+
if local_tag_exists(tag):
137+
print(f"Local tag {tag} exists but not on origin — deleting stale local tag.")
138+
delete_local_tag(tag)
139+
140+
# Check working tree is clean
141+
status = git("status", "--porcelain")
142+
if status:
143+
print(f"\nERROR: Working tree is not clean:\n{status}", file=sys.stderr)
144+
print("Commit or stash changes before releasing.", file=sys.stderr)
145+
sys.exit(1)
146+
147+
# Check required tools
148+
check_tool("node")
149+
check_tool("npm")
150+
check_tool("wasm-pack")
151+
152+
if not push:
153+
print(f"\nDry run: would build, test, and publish {version} to npm")
154+
print(f" would create and push tag {tag}")
155+
print("Run with --push to execute.")
156+
return
157+
158+
# Build WASM
159+
run_step("Building WASM", ["npm", "run", "build:wasm"])
160+
161+
# Run tests
162+
run_step("Running tests", ["npm", "test"])
163+
164+
# Build dist
165+
run_step("Building dist", ["npm", "run", "build"])
166+
167+
# Publish to npm
168+
print("\nPublishing to npm...", flush=True)
169+
result = subprocess.run(
170+
["npm", "publish", "--access", "public"],
171+
cwd=REPO_ROOT,
172+
)
173+
if result.returncode != 0:
174+
print(f"\nERROR: npm publish failed (exit {result.returncode})", file=sys.stderr)
175+
sys.exit(1)
176+
177+
# Create and push git tag
178+
print(f"\nCreating tag {tag}...", flush=True)
179+
result = subprocess.run(
180+
["git", "tag", "-a", tag, "-m", f"release: {version}"],
181+
cwd=REPO_ROOT,
182+
env={**__import__("os").environ, "GIT_EDITOR": "true"},
183+
)
184+
if result.returncode != 0:
185+
print(f"\nWARNING: git tag failed (exit {result.returncode})", file=sys.stderr)
186+
else:
187+
print(f"Pushing tag {tag} to origin...", flush=True)
188+
result = subprocess.run(
189+
["git", "push", "--no-verify", "origin", tag],
190+
cwd=REPO_ROOT,
191+
)
192+
if result.returncode != 0:
193+
print(f"\nWARNING: Failed to push tag {tag}", file=sys.stderr)
194+
195+
print(f"\nDone. Published auths-verify@{version} to npm.")
196+
print(f" https://www.npmjs.com/package/auths-verify")
197+
198+
199+
if __name__ == "__main__":
200+
main()

tests/resolvers/detect.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { detectForge } from '../../src/resolvers/detect';
33

44
describe('detectForge', () => {
55
it('should detect GitHub repos', () => {
6-
const config = detectForge('https://github.com/bordumb/auths');
6+
const config = detectForge('https://github.com/auths-dev/auths');
77
expect(config).toEqual({
88
type: 'github',
99
baseUrl: 'https://api.github.com',
@@ -33,13 +33,13 @@ describe('detectForge', () => {
3333
});
3434

3535
it('should strip .git suffix', () => {
36-
const config = detectForge('https://github.com/bordumb/auths.git');
36+
const config = detectForge('https://github.com/auths-dev/auths.git');
3737
expect(config).not.toBeNull();
3838
expect(config!.repo).toBe('auths');
3939
});
4040

4141
it('should strip trailing slash', () => {
42-
const config = detectForge('https://github.com/bordumb/auths/');
42+
const config = detectForge('https://github.com/auths-dev/auths/');
4343
expect(config).not.toBeNull();
4444
expect(config!.repo).toBe('auths');
4545
});
@@ -54,7 +54,7 @@ describe('detectForge', () => {
5454
});
5555

5656
it('should use forgeHint to override detection', () => {
57-
const config = detectForge('https://github.com/bordumb/auths', 'gitea');
57+
const config = detectForge('https://github.com/auths-dev/auths', 'gitea');
5858
expect(config).not.toBeNull();
5959
expect(config!.type).toBe('gitea');
6060
expect(config!.baseUrl).toBe('https://github.com');
@@ -68,7 +68,7 @@ describe('detectForge', () => {
6868
});
6969

7070
it('should handle URLs with extra path segments', () => {
71-
const config = detectForge('https://github.com/bordumb/auths/tree/main');
71+
const config = detectForge('https://github.com/auths-dev/auths/tree/main');
7272
expect(config).not.toBeNull();
7373
expect(config!.owner).toBe('bordumb');
7474
expect(config!.repo).toBe('auths');

0 commit comments

Comments
 (0)