+41
.github/workflows/publish.yml
+41
.github/workflows/publish.yml
···
1
+
name: Publish to JSR
2
+
3
+
on:
4
+
push:
5
+
tags:
6
+
- 'v*'
7
+
8
+
jobs:
9
+
publish:
10
+
runs-on: ubuntu-latest
11
+
12
+
permissions:
13
+
contents: read
14
+
id-token: write # Required for provenance generation
15
+
16
+
steps:
17
+
- name: Checkout code
18
+
uses: actions/checkout@v4
19
+
20
+
- name: Setup Deno
21
+
uses: denoland/setup-deno@v1
22
+
with:
23
+
deno-version: v1.x
24
+
25
+
- name: Verify code quality
26
+
run: |
27
+
deno fmt --check
28
+
deno lint
29
+
deno check mod.ts
30
+
31
+
- name: Run tests (if any)
32
+
run: |
33
+
if [ -f "test" ] || ls *test*.ts 1> /dev/null 2>&1; then
34
+
deno test --allow-net --allow-read
35
+
else
36
+
echo "No tests found, skipping test step"
37
+
fi
38
+
continue-on-error: false
39
+
40
+
- name: Publish to JSR
41
+
run: deno publish
+1
-1
LICENSE
+1
-1
LICENSE
+10
-10
README.md
+10
-10
README.md
···
1
-
# @anchor/oauth-client-deno
1
+
# @tijs/oauth-client-deno
2
2
3
3
A **Deno-compatible** AT Protocol OAuth client that serves as a drop-in replacement for `@atproto/oauth-client-node`.
4
4
···
17
17
18
18
```bash
19
19
# Using JSR
20
-
deno add @anchor/oauth-client-deno
20
+
deno add @tijs/oauth-client-deno
21
21
22
22
# Or import directly
23
-
import { OAuthClient, MemoryStorage } from "jsr:@anchor/oauth-client-deno";
23
+
import { OAuthClient, MemoryStorage } from "jsr:@tijs/oauth-client-deno";
24
24
```
25
25
26
26
## 📖 Quick Start
···
28
28
### Basic Usage
29
29
30
30
```typescript
31
-
import { MemoryStorage, OAuthClient } from "jsr:@anchor/oauth-client-deno";
31
+
import { MemoryStorage, OAuthClient } from "jsr:@tijs/oauth-client-deno";
32
32
33
33
// Initialize client
34
34
const client = new OAuthClient({
···
88
88
89
89
```typescript
90
90
// In-memory storage (development)
91
-
import { MemoryStorage } from "jsr:@anchor/oauth-client-deno";
91
+
import { MemoryStorage } from "jsr:@tijs/oauth-client-deno";
92
92
const storage = new MemoryStorage();
93
93
94
94
// SQLite storage (for Deno CLI apps)
95
-
import { SQLiteStorage } from "jsr:@anchor/oauth-client-deno";
95
+
import { SQLiteStorage } from "jsr:@tijs/oauth-client-deno";
96
96
const storage = new SQLiteStorage(sqlite);
97
97
98
98
// localStorage (for browsers)
99
-
import { LocalStorage } from "jsr:@anchor/oauth-client-deno";
99
+
import { LocalStorage } from "jsr:@tijs/oauth-client-deno";
100
100
const storage = new LocalStorage();
101
101
102
102
// Custom storage implementation
···
116
116
CustomResolver,
117
117
DirectoryResolver,
118
118
SlingshotResolver,
119
-
} from "jsr:@anchor/oauth-client-deno";
119
+
} from "jsr:@tijs/oauth-client-deno";
120
120
121
121
// Default: Slingshot with fallbacks
122
122
const client = new OAuthClient({
···
159
159
OAuthError,
160
160
SessionError,
161
161
TokenExchangeError,
162
-
} from "jsr:@anchor/oauth-client-deno";
162
+
} from "jsr:@tijs/oauth-client-deno";
163
163
164
164
try {
165
165
const authUrl = await client.authorize("invalid.handle");
···
250
250
251
251
## 🆚 Differences from @atproto/oauth-client-node
252
252
253
-
| Feature | @atproto/oauth-client-node | @anchor/oauth-client-deno |
253
+
| Feature | @atproto/oauth-client-node | @tijs/oauth-client-deno |
254
254
| --------------------- | ------------------------------- | --------------------------------------- |
255
255
| **Runtime** | Node.js only | Deno, Browser, Web Standards |
256
256
| **Crypto** | Node.js crypto + jose | Web Crypto API + jose |
+2
-2
deno.json
+2
-2
deno.json
···
1
1
{
2
-
"name": "@anchor/oauth-client-deno",
2
+
"name": "@tijs/oauth-client-deno",
3
3
"version": "0.1.0",
4
4
"description": "AT Protocol OAuth client for Deno - drop-in replacement for @atproto/oauth-client-node with Web Crypto API compatibility",
5
5
"license": "MIT",
6
6
"repository": {
7
7
"type": "git",
8
-
"url": "git+https://github.com/anchor/oauth-client-deno.git"
8
+
"url": "git+https://github.com/tijs/oauth-client-deno.git"
9
9
},
10
10
"keywords": [
11
11
"atproto",
+1
-1
jsr.json
+1
-1
jsr.json
+1
-1
mod.ts
+1
-1
mod.ts
···
10
10
*
11
11
* @example Basic usage
12
12
* ```ts
13
-
* import { OAuthClient, MemoryStorage } from "@anchor/oauth-client-deno";
13
+
* import { OAuthClient, MemoryStorage } from "@tijs/oauth-client-deno";
14
14
*
15
15
* const client = new OAuthClient({
16
16
* clientId: "https://myapp.com/client-metadata.json",