fedipod-server 0.11.0 → 0.12.1
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/README.md +15 -6
- package/dist/handler.d.ts +6 -0
- package/dist/handler.js +23 -10
- package/dist/handler.jsonld +4 -0
- package/dist/store-pod.js +18 -4
- package/lib/{c2s.mjs → client/c2s.mjs} +8 -3
- package/lib/{localapi.mjs → client/localapi.mjs} +2 -2
- package/lib/client/masto/accounts.mjs +264 -0
- package/lib/client/masto/body.mjs +69 -0
- package/lib/client/masto/index.mjs +183 -0
- package/lib/client/masto/instance.mjs +104 -0
- package/lib/client/masto/media.mjs +133 -0
- package/lib/client/masto/oauth.mjs +599 -0
- package/lib/client/masto/render.mjs +459 -0
- package/lib/client/masto/statuses.mjs +331 -0
- package/lib/client/masto/timelines.mjs +316 -0
- package/lib/{streaming.mjs → client/streaming.mjs} +1 -1
- package/lib/{acctfeed.mjs → connections/acctfeed.mjs} +1 -1
- package/lib/{atproto.mjs → connections/atproto.mjs} +15 -16
- package/lib/{bskygroup.mjs → connections/bskygroup.mjs} +1 -1
- package/lib/{fediacct.mjs → connections/fediacct.mjs} +31 -35
- package/lib/{import.mjs → connections/import.mjs} +1 -1
- package/lib/{tagfeed.mjs → connections/tagfeed.mjs} +3 -3
- package/lib/connections/vault.mjs +114 -0
- package/lib/core/as2.mjs +124 -0
- package/lib/core/contexts/activitystreams.json +379 -0
- package/lib/core/contexts/did-v1.json +57 -0
- package/lib/core/contexts/fep-5711.json +36 -0
- package/lib/core/contexts/gotosocial.json +86 -0
- package/lib/core/contexts/identity-v1.json +152 -0
- package/lib/core/contexts/index.mjs +45 -0
- package/lib/core/contexts/join-lemmy.json +33 -0
- package/lib/core/contexts/joinmastodon.json +28 -0
- package/lib/core/contexts/map.json +16 -0
- package/lib/core/contexts/miscellany.json +19 -0
- package/lib/core/contexts/schemaorg.json +8845 -0
- package/lib/core/contexts/security-data-integrity-v1.json +78 -0
- package/lib/core/contexts/security-data-integrity-v2.json +81 -0
- package/lib/core/contexts/security-multikey-v1.json +35 -0
- package/lib/core/contexts/security-v1.json +74 -0
- package/lib/core/contexts/webfinger.json +10 -0
- package/lib/{deliver.mjs → core/deliver.mjs} +2 -2
- package/lib/core/intake/activities.mjs +437 -0
- package/lib/core/intake/activity.mjs +240 -0
- package/lib/core/intake/channel.mjs +144 -0
- package/lib/core/intake/group.mjs +222 -0
- package/lib/core/intake/index.mjs +629 -0
- package/lib/core/intake/notes.mjs +288 -0
- package/lib/core/intake/verify.mjs +141 -0
- package/lib/{keys.mjs → core/keys.mjs} +1 -1
- package/lib/core/publisher/collections.mjs +229 -0
- package/lib/core/publisher/index.mjs +421 -0
- package/lib/core/publisher/notes.mjs +188 -0
- package/lib/core/publisher/questions.mjs +233 -0
- package/lib/core/publisher/restore.mjs +196 -0
- package/lib/core/shapes/activitystreams.ttl +129 -0
- package/lib/core/shapes/index.mjs +107 -0
- package/lib/core/shapes/shapes-text.mjs +13 -0
- package/lib/{social.mjs → core/social.mjs} +2 -2
- package/lib/{store.mjs → core/store.mjs} +4 -0
- package/lib/{wire.mjs → core/wire.mjs} +2 -2
- package/lib/device/admin/index.mjs +13 -0
- package/lib/device/admin/origins.mjs +35 -0
- package/lib/device/admin/routes/connections.mjs +144 -0
- package/lib/device/admin/routes/gateway.mjs +199 -0
- package/lib/device/admin/routes/lifecycle.mjs +191 -0
- package/lib/device/admin/routes/owner.mjs +322 -0
- package/lib/device/admin/routes/setup.mjs +393 -0
- package/lib/device/admin/routes/social.mjs +188 -0
- package/lib/device/admin/server.mjs +95 -0
- package/lib/device/admin/static.mjs +244 -0
- package/lib/device/admin/surface.mjs +274 -0
- package/lib/device/cli/commands/account.mjs +586 -0
- package/lib/device/cli/commands/run.mjs +278 -0
- package/lib/device/cli/commands/service.mjs +221 -0
- package/lib/device/cli/commands/setup.mjs +410 -0
- package/lib/device/cli/commands/state.mjs +559 -0
- package/lib/device/cli/context.mjs +288 -0
- package/lib/{migrate.mjs → device/migrate.mjs} +1 -1
- package/lib/{remote.mjs → device/remote.mjs} +3 -3
- package/lib/{setup.mjs → device/setup.mjs} +3 -3
- package/lib/{update.mjs → device/update.mjs} +1 -1
- package/lib/{directory.mjs → gateway/directory.mjs} +1 -1
- package/lib/{front-core.mjs → gateway/front-core.mjs} +3 -3
- package/lib/{gateway-core.mjs → gateway/gateway-core.mjs} +1 -1
- package/lib/{httpsig.mjs → gateway/httpsig.mjs} +1 -1
- package/lib/{embed.mjs → server/embed.mjs} +149 -22
- package/lib/{links.mjs → shared/links.mjs} +1 -1
- package/lib/{ua.mjs → shared/ua.mjs} +1 -1
- package/package.json +1 -1
- package/run-agent.mjs +33 -25
- package/web/admin/actors.js +145 -0
- package/web/admin/common.js +23 -0
- package/web/admin/connections.js +112 -0
- package/web/admin/gateway.js +111 -0
- package/web/admin/group.js +258 -0
- package/web/admin/index.html +7 -1
- package/web/admin/record.js +378 -0
- package/web/admin/setup/index.html +1 -0
- package/web/admin/setup/setup.js +2 -13
- package/web/admin/upkeep.js +170 -0
- package/web/app/README.md +6 -6
- package/web/app/admin-facade.mjs +3 -3
- package/web/app/agent.mjs +12 -12
- package/web/app/atproto-browser.mjs +1 -1
- package/web/app/deliver-relay.mjs +1 -1
- package/web/app/dist/sw.js +21684 -5415
- package/web/app/dist/sw.js.map +4 -4
- package/web/app/fediacct-browser.mjs +1 -1
- package/web/app/shims/shapes-text.mjs +8 -0
- package/web/app/site/admin/actors.js +145 -0
- package/web/app/site/admin/common.js +23 -0
- package/web/app/site/admin/connections.js +112 -0
- package/web/app/site/admin/gateway.js +111 -0
- package/web/app/site/admin/group.js +258 -0
- package/web/app/site/admin/index.html +7 -1
- package/web/app/site/admin/record.js +378 -0
- package/web/app/site/admin/setup/index.html +1 -0
- package/web/app/site/admin/setup/setup.js +2 -13
- package/web/app/site/admin/upkeep.js +170 -0
- package/web/app/site/sw.js +21684 -5415
- package/web/app/sw-src.mjs +17 -2
- package/lib/admin.mjs +0 -1913
- package/lib/intake.mjs +0 -1981
- package/lib/mastoapi.mjs +0 -2284
- package/lib/publisher.mjs +0 -1192
- package/web/admin/admin.js +0 -1181
- package/web/app/site/admin/admin.js +0 -1181
- /package/lib/{oidc-auth.mjs → client/oidc-auth.mjs} +0 -0
- /package/lib/{webpush.mjs → client/webpush.mjs} +0 -0
- /package/lib/{bskyfeed.mjs → connections/bskyfeed.mjs} +0 -0
- /package/lib/{lease.mjs → core/lease.mjs} +0 -0
- /package/lib/{polls.mjs → core/polls.mjs} +0 -0
- /package/lib/{proof.mjs → core/proof.mjs} +0 -0
- /package/lib/{storage.mjs → core/storage.mjs} +0 -0
- /package/lib/{account.mjs → device/account.mjs} +0 -0
- /package/lib/{certs.mjs → device/certs.mjs} +0 -0
- /package/lib/{export-collections.mjs → device/export-collections.mjs} +0 -0
- /package/lib/{home.mjs → device/home.mjs} +0 -0
- /package/lib/{ports.mjs → device/ports.mjs} +0 -0
- /package/lib/{guard.mjs → shared/guard.mjs} +0 -0
- /package/lib/{safefetch.mjs → shared/safefetch.mjs} +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": {
|
|
3
|
+
"id": "@id",
|
|
4
|
+
"type": "@type",
|
|
5
|
+
"@protected": true,
|
|
6
|
+
"digestMultibase": {
|
|
7
|
+
"@id": "https://w3id.org/security#digestMultibase",
|
|
8
|
+
"@type": "https://w3id.org/security#multibase"
|
|
9
|
+
},
|
|
10
|
+
"proof": {
|
|
11
|
+
"@id": "https://w3id.org/security#proof",
|
|
12
|
+
"@type": "@id",
|
|
13
|
+
"@container": "@graph"
|
|
14
|
+
},
|
|
15
|
+
"DataIntegrityProof": {
|
|
16
|
+
"@id": "https://w3id.org/security#DataIntegrityProof",
|
|
17
|
+
"@context": {
|
|
18
|
+
"@protected": true,
|
|
19
|
+
"id": "@id",
|
|
20
|
+
"type": "@type",
|
|
21
|
+
"challenge": "https://w3id.org/security#challenge",
|
|
22
|
+
"created": {
|
|
23
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
24
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
25
|
+
},
|
|
26
|
+
"domain": "https://w3id.org/security#domain",
|
|
27
|
+
"expires": {
|
|
28
|
+
"@id": "https://w3id.org/security#expiration",
|
|
29
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
30
|
+
},
|
|
31
|
+
"nonce": "https://w3id.org/security#nonce",
|
|
32
|
+
"proofPurpose": {
|
|
33
|
+
"@id": "https://w3id.org/security#proofPurpose",
|
|
34
|
+
"@type": "@vocab",
|
|
35
|
+
"@context": {
|
|
36
|
+
"@protected": true,
|
|
37
|
+
"id": "@id",
|
|
38
|
+
"type": "@type",
|
|
39
|
+
"assertionMethod": {
|
|
40
|
+
"@id": "https://w3id.org/security#assertionMethod",
|
|
41
|
+
"@type": "@id",
|
|
42
|
+
"@container": "@set"
|
|
43
|
+
},
|
|
44
|
+
"authentication": {
|
|
45
|
+
"@id": "https://w3id.org/security#authenticationMethod",
|
|
46
|
+
"@type": "@id",
|
|
47
|
+
"@container": "@set"
|
|
48
|
+
},
|
|
49
|
+
"capabilityInvocation": {
|
|
50
|
+
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
51
|
+
"@type": "@id",
|
|
52
|
+
"@container": "@set"
|
|
53
|
+
},
|
|
54
|
+
"capabilityDelegation": {
|
|
55
|
+
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
56
|
+
"@type": "@id",
|
|
57
|
+
"@container": "@set"
|
|
58
|
+
},
|
|
59
|
+
"keyAgreement": {
|
|
60
|
+
"@id": "https://w3id.org/security#keyAgreementMethod",
|
|
61
|
+
"@type": "@id",
|
|
62
|
+
"@container": "@set"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"cryptosuite": "https://w3id.org/security#cryptosuite",
|
|
67
|
+
"proofValue": {
|
|
68
|
+
"@id": "https://w3id.org/security#proofValue",
|
|
69
|
+
"@type": "https://w3id.org/security#multibase"
|
|
70
|
+
},
|
|
71
|
+
"verificationMethod": {
|
|
72
|
+
"@id": "https://w3id.org/security#verificationMethod",
|
|
73
|
+
"@type": "@id"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": {
|
|
3
|
+
"id": "@id",
|
|
4
|
+
"type": "@type",
|
|
5
|
+
"@protected": true,
|
|
6
|
+
"proof": {
|
|
7
|
+
"@id": "https://w3id.org/security#proof",
|
|
8
|
+
"@type": "@id",
|
|
9
|
+
"@container": "@graph"
|
|
10
|
+
},
|
|
11
|
+
"DataIntegrityProof": {
|
|
12
|
+
"@id": "https://w3id.org/security#DataIntegrityProof",
|
|
13
|
+
"@context": {
|
|
14
|
+
"@protected": true,
|
|
15
|
+
"id": "@id",
|
|
16
|
+
"type": "@type",
|
|
17
|
+
"challenge": "https://w3id.org/security#challenge",
|
|
18
|
+
"created": {
|
|
19
|
+
"@id": "http://purl.org/dc/terms/created",
|
|
20
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
21
|
+
},
|
|
22
|
+
"domain": "https://w3id.org/security#domain",
|
|
23
|
+
"expires": {
|
|
24
|
+
"@id": "https://w3id.org/security#expiration",
|
|
25
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
26
|
+
},
|
|
27
|
+
"nonce": "https://w3id.org/security#nonce",
|
|
28
|
+
"previousProof": {
|
|
29
|
+
"@id": "https://w3id.org/security#previousProof",
|
|
30
|
+
"@type": "@id"
|
|
31
|
+
},
|
|
32
|
+
"proofPurpose": {
|
|
33
|
+
"@id": "https://w3id.org/security#proofPurpose",
|
|
34
|
+
"@type": "@vocab",
|
|
35
|
+
"@context": {
|
|
36
|
+
"@protected": true,
|
|
37
|
+
"id": "@id",
|
|
38
|
+
"type": "@type",
|
|
39
|
+
"assertionMethod": {
|
|
40
|
+
"@id": "https://w3id.org/security#assertionMethod",
|
|
41
|
+
"@type": "@id",
|
|
42
|
+
"@container": "@set"
|
|
43
|
+
},
|
|
44
|
+
"authentication": {
|
|
45
|
+
"@id": "https://w3id.org/security#authenticationMethod",
|
|
46
|
+
"@type": "@id",
|
|
47
|
+
"@container": "@set"
|
|
48
|
+
},
|
|
49
|
+
"capabilityInvocation": {
|
|
50
|
+
"@id": "https://w3id.org/security#capabilityInvocationMethod",
|
|
51
|
+
"@type": "@id",
|
|
52
|
+
"@container": "@set"
|
|
53
|
+
},
|
|
54
|
+
"capabilityDelegation": {
|
|
55
|
+
"@id": "https://w3id.org/security#capabilityDelegationMethod",
|
|
56
|
+
"@type": "@id",
|
|
57
|
+
"@container": "@set"
|
|
58
|
+
},
|
|
59
|
+
"keyAgreement": {
|
|
60
|
+
"@id": "https://w3id.org/security#keyAgreementMethod",
|
|
61
|
+
"@type": "@id",
|
|
62
|
+
"@container": "@set"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"cryptosuite": {
|
|
67
|
+
"@id": "https://w3id.org/security#cryptosuite",
|
|
68
|
+
"@type": "https://w3id.org/security#cryptosuiteString"
|
|
69
|
+
},
|
|
70
|
+
"proofValue": {
|
|
71
|
+
"@id": "https://w3id.org/security#proofValue",
|
|
72
|
+
"@type": "https://w3id.org/security#multibase"
|
|
73
|
+
},
|
|
74
|
+
"verificationMethod": {
|
|
75
|
+
"@id": "https://w3id.org/security#verificationMethod",
|
|
76
|
+
"@type": "@id"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": {
|
|
3
|
+
"id": "@id",
|
|
4
|
+
"type": "@type",
|
|
5
|
+
"@protected": true,
|
|
6
|
+
"Multikey": {
|
|
7
|
+
"@id": "https://w3id.org/security#Multikey",
|
|
8
|
+
"@context": {
|
|
9
|
+
"@protected": true,
|
|
10
|
+
"id": "@id",
|
|
11
|
+
"type": "@type",
|
|
12
|
+
"controller": {
|
|
13
|
+
"@id": "https://w3id.org/security#controller",
|
|
14
|
+
"@type": "@id"
|
|
15
|
+
},
|
|
16
|
+
"revoked": {
|
|
17
|
+
"@id": "https://w3id.org/security#revoked",
|
|
18
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
19
|
+
},
|
|
20
|
+
"expires": {
|
|
21
|
+
"@id": "https://w3id.org/security#expiration",
|
|
22
|
+
"@type": "http://www.w3.org/2001/XMLSchema#dateTime"
|
|
23
|
+
},
|
|
24
|
+
"publicKeyMultibase": {
|
|
25
|
+
"@id": "https://w3id.org/security#publicKeyMultibase",
|
|
26
|
+
"@type": "https://w3id.org/security#multibase"
|
|
27
|
+
},
|
|
28
|
+
"secretKeyMultibase": {
|
|
29
|
+
"@id": "https://w3id.org/security#secretKeyMultibase",
|
|
30
|
+
"@type": "https://w3id.org/security#multibase"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@context": {
|
|
3
|
+
"id": "@id",
|
|
4
|
+
"type": "@type",
|
|
5
|
+
"dc": "http://purl.org/dc/terms/",
|
|
6
|
+
"sec": "https://w3id.org/security#",
|
|
7
|
+
"xsd": "http://www.w3.org/2001/XMLSchema#",
|
|
8
|
+
"EcdsaKoblitzSignature2016": "sec:EcdsaKoblitzSignature2016",
|
|
9
|
+
"Ed25519Signature2018": "sec:Ed25519Signature2018",
|
|
10
|
+
"EncryptedMessage": "sec:EncryptedMessage",
|
|
11
|
+
"GraphSignature2012": "sec:GraphSignature2012",
|
|
12
|
+
"LinkedDataSignature2015": "sec:LinkedDataSignature2015",
|
|
13
|
+
"LinkedDataSignature2016": "sec:LinkedDataSignature2016",
|
|
14
|
+
"CryptographicKey": "sec:Key",
|
|
15
|
+
"authenticationTag": "sec:authenticationTag",
|
|
16
|
+
"canonicalizationAlgorithm": "sec:canonicalizationAlgorithm",
|
|
17
|
+
"cipherAlgorithm": "sec:cipherAlgorithm",
|
|
18
|
+
"cipherData": "sec:cipherData",
|
|
19
|
+
"cipherKey": "sec:cipherKey",
|
|
20
|
+
"created": {
|
|
21
|
+
"@id": "dc:created",
|
|
22
|
+
"@type": "xsd:dateTime"
|
|
23
|
+
},
|
|
24
|
+
"creator": {
|
|
25
|
+
"@id": "dc:creator",
|
|
26
|
+
"@type": "@id"
|
|
27
|
+
},
|
|
28
|
+
"digestAlgorithm": "sec:digestAlgorithm",
|
|
29
|
+
"digestValue": "sec:digestValue",
|
|
30
|
+
"domain": "sec:domain",
|
|
31
|
+
"encryptionKey": "sec:encryptionKey",
|
|
32
|
+
"expiration": {
|
|
33
|
+
"@id": "sec:expiration",
|
|
34
|
+
"@type": "xsd:dateTime"
|
|
35
|
+
},
|
|
36
|
+
"expires": {
|
|
37
|
+
"@id": "sec:expiration",
|
|
38
|
+
"@type": "xsd:dateTime"
|
|
39
|
+
},
|
|
40
|
+
"initializationVector": "sec:initializationVector",
|
|
41
|
+
"iterationCount": "sec:iterationCount",
|
|
42
|
+
"nonce": "sec:nonce",
|
|
43
|
+
"normalizationAlgorithm": "sec:normalizationAlgorithm",
|
|
44
|
+
"owner": {
|
|
45
|
+
"@id": "sec:owner",
|
|
46
|
+
"@type": "@id"
|
|
47
|
+
},
|
|
48
|
+
"password": "sec:password",
|
|
49
|
+
"privateKey": {
|
|
50
|
+
"@id": "sec:privateKey",
|
|
51
|
+
"@type": "@id"
|
|
52
|
+
},
|
|
53
|
+
"privateKeyPem": "sec:privateKeyPem",
|
|
54
|
+
"publicKey": {
|
|
55
|
+
"@id": "sec:publicKey",
|
|
56
|
+
"@type": "@id"
|
|
57
|
+
},
|
|
58
|
+
"publicKeyBase58": "sec:publicKeyBase58",
|
|
59
|
+
"publicKeyPem": "sec:publicKeyPem",
|
|
60
|
+
"publicKeyWif": "sec:publicKeyWif",
|
|
61
|
+
"publicKeyService": {
|
|
62
|
+
"@id": "sec:publicKeyService",
|
|
63
|
+
"@type": "@id"
|
|
64
|
+
},
|
|
65
|
+
"revoked": {
|
|
66
|
+
"@id": "sec:revoked",
|
|
67
|
+
"@type": "xsd:dateTime"
|
|
68
|
+
},
|
|
69
|
+
"salt": "sec:salt",
|
|
70
|
+
"signature": "sec:signature",
|
|
71
|
+
"signatureAlgorithm": "sec:signingAlgorithm",
|
|
72
|
+
"signatureValue": "sec:signatureValue"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import { signRequest } from '@fedify/fedify/sig';
|
|
7
7
|
import { webcrypto } from 'node:crypto';
|
|
8
8
|
import { attachProof } from './proof.mjs';
|
|
9
|
-
import { pinnedFor, retryAfterMs, HTTP_TIMEOUT_MS } from '
|
|
10
|
-
import { USER_AGENT } from '
|
|
9
|
+
import { pinnedFor, retryAfterMs, HTTP_TIMEOUT_MS } from '../shared/safefetch.mjs';
|
|
10
|
+
import { USER_AGENT } from '../shared/ua.mjs';
|
|
11
11
|
|
|
12
12
|
const MAX_REDIRECTS = 3;
|
|
13
13
|
|