create-pds 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
A single-user AT Protocol Personal Data Server running on Cloudflare Workers.
|
|
4
4
|
|
|
5
|
-
> **⚠️
|
|
5
|
+
> **⚠️ Beta Software**
|
|
6
6
|
>
|
|
7
|
-
> This is
|
|
7
|
+
> This is under active development. Account migration has been tested and works, but breaking changes may still occur. Consider backing up important data before migrating a primary account.
|
|
8
8
|
|
|
9
9
|
## Getting Started
|
|
10
10
|
|
|
@@ -45,13 +45,9 @@ curl http://localhost:5173/.well-known/did.json
|
|
|
45
45
|
|
|
46
46
|
### 4. Deploy to production
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
When running `pds init`, answer "Yes" when asked if you want to deploy to Cloudflare. This pushes secrets to Cloudflare Workers.
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
pnpm pds init --production
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Then deploy:
|
|
50
|
+
Then deploy the worker:
|
|
55
51
|
|
|
56
52
|
```bash
|
|
57
53
|
pnpm run deploy
|
|
@@ -63,44 +59,73 @@ Finally, configure DNS to point your domain to the worker.
|
|
|
63
59
|
|
|
64
60
|
To move an existing Bluesky account from bsky.social or another PDS:
|
|
65
61
|
|
|
66
|
-
### 1
|
|
62
|
+
### Step 1: Configure for migration
|
|
67
63
|
|
|
68
64
|
```bash
|
|
69
65
|
pnpm pds init
|
|
70
66
|
# Answer "Yes" when asked about migrating an existing account
|
|
71
67
|
```
|
|
72
68
|
|
|
73
|
-
|
|
69
|
+
This detects your existing account, generates new signing keys, and configures the PDS in deactivated mode.
|
|
70
|
+
|
|
71
|
+
### Step 2: Deploy and transfer data
|
|
74
72
|
|
|
75
73
|
```bash
|
|
76
|
-
pnpm run deploy
|
|
77
|
-
pnpm pds migrate
|
|
74
|
+
pnpm run deploy # Deploy the worker
|
|
75
|
+
pnpm pds migrate # Transfer data from source PDS
|
|
78
76
|
```
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
The migrate command downloads the repository (posts, follows, likes) and all images/videos from the current PDS. If interrupted, run it again to resume.
|
|
81
79
|
|
|
82
|
-
### 3
|
|
80
|
+
### Step 3: Update your identity
|
|
83
81
|
|
|
84
|
-
|
|
82
|
+
```bash
|
|
83
|
+
pnpm pds identity
|
|
84
|
+
```
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
This updates your DID document to point to your new PDS. You'll need to:
|
|
87
|
+
1. Enter your password for the source PDS
|
|
88
|
+
2. Enter the confirmation token sent to your email
|
|
89
|
+
|
|
90
|
+
### Step 4: Activate the account
|
|
87
91
|
|
|
88
92
|
```bash
|
|
89
93
|
pnpm pds activate
|
|
90
94
|
```
|
|
91
95
|
|
|
92
|
-
|
|
96
|
+
This enables writes on your new PDS. Your account is now live.
|
|
97
|
+
|
|
98
|
+
### Step 5: Verify the migration
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
pnpm pds status
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Check that the account is active and your handle resolves correctly.
|
|
105
|
+
|
|
106
|
+
### Full command sequence
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pnpm pds init # Configure + deploy secrets (answer "Yes" to deploy)
|
|
110
|
+
pnpm run deploy # Deploy the worker
|
|
111
|
+
pnpm pds migrate # Transfer data from source PDS
|
|
112
|
+
pnpm pds identity # Update DID document (requires email)
|
|
113
|
+
pnpm pds activate # Enable writes
|
|
114
|
+
pnpm pds status # Verify everything is working
|
|
115
|
+
```
|
|
93
116
|
|
|
94
117
|
## CLI Commands
|
|
95
118
|
|
|
96
119
|
| Command | Description |
|
|
97
120
|
|---------|-------------|
|
|
98
|
-
| `pnpm pds init` | Interactive setup wizard |
|
|
99
|
-
| `pnpm pds init --production` | Deploy secrets to Cloudflare |
|
|
121
|
+
| `pnpm pds init` | Interactive setup wizard (prompts for Cloudflare deploy) |
|
|
100
122
|
| `pnpm pds migrate` | Transfer account from source PDS |
|
|
101
123
|
| `pnpm pds migrate --clean` | Reset and re-import data |
|
|
124
|
+
| `pnpm pds identity` | Update DID document to point to new PDS |
|
|
102
125
|
| `pnpm pds activate` | Enable writes (go live) |
|
|
103
126
|
| `pnpm pds deactivate` | Disable writes (for re-import) |
|
|
127
|
+
| `pnpm pds status` | Check account and repository status |
|
|
128
|
+
| `pnpm pds passkey add` | Register a passkey for passwordless login |
|
|
104
129
|
| `pnpm pds secret key` | Generate new signing keypair |
|
|
105
130
|
| `pnpm pds secret jwt` | Generate new JWT secret |
|
|
106
131
|
| `pnpm pds secret password` | Set account password |
|
|
@@ -41,10 +41,13 @@
|
|
|
41
41
|
"DID": "",
|
|
42
42
|
// Account handle (e.g., "alice.example.com")
|
|
43
43
|
"HANDLE": ""
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
45
|
// Secrets (set via `pds init` or `pds secret <name>`):
|
|
46
46
|
// - AUTH_TOKEN: Bearer token for API write operations
|
|
47
47
|
// - SIGNING_KEY: Private signing key (secp256k1 JWK)
|
|
48
48
|
// - JWT_SECRET: Secret for signing session JWTs
|
|
49
49
|
// - PASSWORD_HASH: Bcrypt hash of account password (for Bluesky app login)
|
|
50
|
-
|
|
50
|
+
"observability": {
|
|
51
|
+
"enabled": true
|
|
52
|
+
}
|
|
53
|
+
}
|