create-pds 0.0.5 → 0.0.6
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/dist/index.js
CHANGED
|
@@ -2566,10 +2566,10 @@ async function getLatestPdsVersion() {
|
|
|
2566
2566
|
try {
|
|
2567
2567
|
const response = await fetch("https://registry.npmjs.org/@ascorbic/pds/latest");
|
|
2568
2568
|
if (!response.ok) throw new Error(`Failed to fetch: ${response.status}`);
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2569
|
+
const data = await response.json();
|
|
2570
|
+
if (data.version) return data.version;
|
|
2571
|
+
} catch {}
|
|
2572
|
+
return "^0.2.0";
|
|
2573
2573
|
}
|
|
2574
2574
|
runMain(defineCommand({
|
|
2575
2575
|
meta: {
|
|
@@ -2696,7 +2696,7 @@ runMain(defineCommand({
|
|
|
2696
2696
|
await copyTemplateDir(join(__dirname, "..", "templates", "pds-worker"), targetDir);
|
|
2697
2697
|
await replaceInFile(join(targetDir, "package.json"), {
|
|
2698
2698
|
name: projectName,
|
|
2699
|
-
pdsVersion
|
|
2699
|
+
pdsVersion: `^${pdsVersion}`
|
|
2700
2700
|
});
|
|
2701
2701
|
spinner.stop("Template copied");
|
|
2702
2702
|
if (initGit) {
|
package/package.json
CHANGED
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Or run `pnpm pds init --local` to generate automatically
|
|
1
|
+
# Environment variables for local development
|
|
2
|
+
# Run `pnpm pds init` to generate this file automatically
|
|
4
3
|
|
|
5
|
-
#
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# Your account's DID (usually did:web:{PDS_HOSTNAME})
|
|
9
|
-
DID=did:web:demo-pds.example.com
|
|
10
|
-
|
|
11
|
-
# Your account's handle
|
|
12
|
-
HANDLE=alice.demo-pds.example.com
|
|
13
|
-
|
|
14
|
-
# Bearer token for write operations (generate a random string)
|
|
15
|
-
AUTH_TOKEN=your-secret-token-here
|
|
4
|
+
# Bearer token for write operations
|
|
5
|
+
AUTH_TOKEN=
|
|
16
6
|
|
|
17
7
|
# Private key for signing commits (secp256k1 JWK)
|
|
18
|
-
SIGNING_KEY=
|
|
19
|
-
|
|
20
|
-
# Public key for DID document (multibase encoded)
|
|
21
|
-
SIGNING_KEY_PUBLIC=zQ3sh...
|
|
8
|
+
SIGNING_KEY=
|
|
22
9
|
|
|
23
|
-
# Secret for signing session JWTs
|
|
24
|
-
JWT_SECRET=
|
|
10
|
+
# Secret for signing session JWTs
|
|
11
|
+
JWT_SECRET=
|
|
25
12
|
|
|
26
|
-
#
|
|
27
|
-
|
|
13
|
+
# Bcrypt hash of account password (for app login)
|
|
14
|
+
PASSWORD_HASH=
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
// AT Protocol PDS on Cloudflare Workers
|
|
3
3
|
// Run `pnpm pds init` to configure, or `pnpm pds init --production` to deploy secrets
|
|
4
|
-
"name": "
|
|
4
|
+
"name": "my-pds",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"compatibility_date": "2025-12-02",
|
|
7
7
|
"compatibility_flags": [
|
|
@@ -47,4 +47,4 @@
|
|
|
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
|
+
}
|