@fedify/vocab 2.0.0-dev.0
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/LICENSE +20 -0
- package/deno.json +31 -0
- package/dist/accept.yaml +15 -0
- package/dist/activity.yaml +98 -0
- package/dist/actor.test.d.ts +2 -0
- package/dist/actor.test.js +6095 -0
- package/dist/add.yaml +16 -0
- package/dist/announce.yaml +30 -0
- package/dist/application.yaml +324 -0
- package/dist/arrive.yaml +15 -0
- package/dist/article.yaml +46 -0
- package/dist/audio.yaml +11 -0
- package/dist/block.yaml +16 -0
- package/dist/chatmessage.yaml +50 -0
- package/dist/collection.yaml +154 -0
- package/dist/collectionpage.yaml +55 -0
- package/dist/create.yaml +28 -0
- package/dist/dataintegrityproof.yaml +56 -0
- package/dist/delete.yaml +27 -0
- package/dist/deno-B-ypIMwF.js +1282 -0
- package/dist/didservice.yaml +22 -0
- package/dist/dislike.yaml +14 -0
- package/dist/document.yaml +31 -0
- package/dist/emoji.yaml +12 -0
- package/dist/emojireact.yaml +17 -0
- package/dist/endpoints.yaml +85 -0
- package/dist/event.yaml +11 -0
- package/dist/export.yaml +9 -0
- package/dist/flag.yaml +15 -0
- package/dist/follow.yaml +19 -0
- package/dist/group.yaml +324 -0
- package/dist/hashtag.yaml +14 -0
- package/dist/ignore.yaml +14 -0
- package/dist/image.yaml +9 -0
- package/dist/intransitiveactivity.yaml +15 -0
- package/dist/invite.yaml +14 -0
- package/dist/join.yaml +14 -0
- package/dist/key.yaml +28 -0
- package/dist/leave.yaml +14 -0
- package/dist/like.yaml +16 -0
- package/dist/link.yaml +101 -0
- package/dist/listen.yaml +12 -0
- package/dist/lookup.test.d.ts +2 -0
- package/dist/lookup.test.js +690 -0
- package/dist/mention.yaml +9 -0
- package/dist/mod.cjs +42036 -0
- package/dist/mod.d.cts +15329 -0
- package/dist/mod.d.ts +15330 -0
- package/dist/mod.js +41936 -0
- package/dist/move.yaml +15 -0
- package/dist/multikey.yaml +36 -0
- package/dist/note.yaml +48 -0
- package/dist/object.yaml +404 -0
- package/dist/offer.yaml +15 -0
- package/dist/orderedcollection.yaml +39 -0
- package/dist/orderedcollectionpage.yaml +50 -0
- package/dist/organization.yaml +324 -0
- package/dist/page.yaml +11 -0
- package/dist/person.yaml +324 -0
- package/dist/place.yaml +75 -0
- package/dist/profile.yaml +26 -0
- package/dist/propertyvalue.yaml +32 -0
- package/dist/question.yaml +103 -0
- package/dist/read.yaml +13 -0
- package/dist/reject.yaml +14 -0
- package/dist/relationship.yaml +52 -0
- package/dist/remove.yaml +14 -0
- package/dist/service.yaml +324 -0
- package/dist/source.yaml +26 -0
- package/dist/tentativeaccept.yaml +14 -0
- package/dist/tentativereject.yaml +14 -0
- package/dist/tombstone.yaml +24 -0
- package/dist/travel.yaml +16 -0
- package/dist/type-CNuABalk.js +13 -0
- package/dist/type.test.d.ts +2 -0
- package/dist/type.test.js +24 -0
- package/dist/undo.yaml +26 -0
- package/dist/update.yaml +58 -0
- package/dist/utils-BSWXlrig.js +13 -0
- package/dist/video.yaml +11 -0
- package/dist/view.yaml +13 -0
- package/dist/vocab-DBispxj5.js +41603 -0
- package/dist/vocab.test.d.ts +2 -0
- package/dist/vocab.test.js +1304 -0
- package/package.json +79 -0
- package/scripts/codegen.ts +20 -0
- package/src/__snapshots__/vocab.test.ts.snap +7903 -0
- package/src/accept.yaml +15 -0
- package/src/activity.yaml +98 -0
- package/src/actor.test.ts +263 -0
- package/src/actor.ts +293 -0
- package/src/add.yaml +16 -0
- package/src/announce.yaml +30 -0
- package/src/application.yaml +324 -0
- package/src/arrive.yaml +15 -0
- package/src/article.yaml +46 -0
- package/src/audio.yaml +11 -0
- package/src/block.yaml +16 -0
- package/src/chatmessage.yaml +50 -0
- package/src/collection.yaml +154 -0
- package/src/collectionpage.yaml +55 -0
- package/src/constants.ts +11 -0
- package/src/create.yaml +28 -0
- package/src/dataintegrityproof.yaml +56 -0
- package/src/delete.yaml +27 -0
- package/src/didservice.yaml +22 -0
- package/src/dislike.yaml +14 -0
- package/src/document.yaml +31 -0
- package/src/emoji.yaml +12 -0
- package/src/emojireact.yaml +17 -0
- package/src/endpoints.yaml +85 -0
- package/src/event.yaml +11 -0
- package/src/export.yaml +9 -0
- package/src/flag.yaml +15 -0
- package/src/follow.yaml +19 -0
- package/src/group.yaml +324 -0
- package/src/handle.ts +104 -0
- package/src/hashtag.yaml +14 -0
- package/src/ignore.yaml +14 -0
- package/src/image.yaml +9 -0
- package/src/intransitiveactivity.yaml +15 -0
- package/src/invite.yaml +14 -0
- package/src/join.yaml +14 -0
- package/src/key.yaml +28 -0
- package/src/keys.ts +50 -0
- package/src/leave.yaml +14 -0
- package/src/like.yaml +16 -0
- package/src/link.yaml +101 -0
- package/src/listen.yaml +12 -0
- package/src/lookup.test.ts +681 -0
- package/src/lookup.ts +318 -0
- package/src/mention.yaml +9 -0
- package/src/mod.ts +57 -0
- package/src/move.yaml +15 -0
- package/src/multikey.yaml +36 -0
- package/src/note.yaml +48 -0
- package/src/object.yaml +404 -0
- package/src/offer.yaml +15 -0
- package/src/orderedcollection.yaml +39 -0
- package/src/orderedcollectionpage.yaml +50 -0
- package/src/organization.yaml +324 -0
- package/src/page.yaml +11 -0
- package/src/person.yaml +324 -0
- package/src/place.yaml +75 -0
- package/src/profile.yaml +26 -0
- package/src/propertyvalue.yaml +32 -0
- package/src/question.yaml +103 -0
- package/src/read.yaml +13 -0
- package/src/reject.yaml +14 -0
- package/src/relationship.yaml +52 -0
- package/src/remove.yaml +14 -0
- package/src/service.yaml +324 -0
- package/src/source.yaml +26 -0
- package/src/tentativeaccept.yaml +14 -0
- package/src/tentativereject.yaml +14 -0
- package/src/tombstone.yaml +24 -0
- package/src/travel.yaml +16 -0
- package/src/type.test.ts +20 -0
- package/src/type.ts +102 -0
- package/src/undo.yaml +26 -0
- package/src/update.yaml +58 -0
- package/src/utils.ts +9 -0
- package/src/video.yaml +11 -0
- package/src/view.yaml +13 -0
- package/src/vocab.bench.ts +204 -0
- package/src/vocab.test.ts +2014 -0
- package/tsdown.config.ts +65 -0
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fedify/vocab",
|
|
3
|
+
"version": "2.0.0-dev.0",
|
|
4
|
+
"homepage": "https://fedify.dev/",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/fedify-dev/fedify.git",
|
|
8
|
+
"directory": "packages/vocab"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/fedify-dev/fedify/issues"
|
|
12
|
+
},
|
|
13
|
+
"funding": [
|
|
14
|
+
"https://opencollective.com/fedify",
|
|
15
|
+
"https://github.com/sponsors/dahlia"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"deno": ">=2.0.0",
|
|
19
|
+
"node": ">=22.0.0",
|
|
20
|
+
"bun": ">=1.1.0"
|
|
21
|
+
},
|
|
22
|
+
"description": "Vocabularies library for @fedify/fedify",
|
|
23
|
+
"type": "module",
|
|
24
|
+
"main": "./dist/mod.cjs",
|
|
25
|
+
"module": "./dist/mod.js",
|
|
26
|
+
"types": "./dist/mod.d.ts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": {
|
|
30
|
+
"import": "./dist/mod.d.ts",
|
|
31
|
+
"require": "./dist/mod.d.cts",
|
|
32
|
+
"default": "./dist/mod.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"import": "./dist/mod.js",
|
|
35
|
+
"require": "./dist/mod.cjs",
|
|
36
|
+
"default": "./dist/mod.js"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@js-temporal/polyfill": "^0.5.1",
|
|
42
|
+
"@multiformats/base-x": "^4.0.1",
|
|
43
|
+
"@logtape/logtape": "^1.3.5",
|
|
44
|
+
"@opentelemetry/api": "^1.9.0",
|
|
45
|
+
"asn1js": "^3.0.6",
|
|
46
|
+
"es-toolkit": "1.43.0",
|
|
47
|
+
"jsonld": "^9.0.0",
|
|
48
|
+
"multicodec": "^3.2.1",
|
|
49
|
+
"pkijs": "^3.3.3",
|
|
50
|
+
"@fedify/vocab-tools": "2.0.0",
|
|
51
|
+
"@fedify/webfinger": "2.0.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^22.17.0",
|
|
55
|
+
"fast-check": "^3.22.0",
|
|
56
|
+
"fetch-mock": "^12.5.4",
|
|
57
|
+
"tsdown": "^0.12.9",
|
|
58
|
+
"typescript": "^5.9.3",
|
|
59
|
+
"@fedify/fixture": "2.0.0",
|
|
60
|
+
"@fedify/vocab-runtime": "2.0.0"
|
|
61
|
+
},
|
|
62
|
+
"keywords": [
|
|
63
|
+
"Fedify",
|
|
64
|
+
"ActivityPub",
|
|
65
|
+
"Fediverse"
|
|
66
|
+
],
|
|
67
|
+
"author": {
|
|
68
|
+
"name": "Hong Minhee",
|
|
69
|
+
"email": "hong@minhee.org",
|
|
70
|
+
"url": "https://hongminhee.org/"
|
|
71
|
+
},
|
|
72
|
+
"license": "MIT",
|
|
73
|
+
"scripts": {
|
|
74
|
+
"build": "tsdown",
|
|
75
|
+
"prepublish": "pnpm build",
|
|
76
|
+
"test": "pnpm build && cd dist/ && node --test",
|
|
77
|
+
"test:bun": "pnpm build && cd dist/ && bun test --timeout 60000"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { generateVocab } from "@fedify/vocab-tools";
|
|
2
|
+
import { rename } from "node:fs/promises";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
|
|
5
|
+
async function codegen() {
|
|
6
|
+
const scriptsDir = import.meta.dirname;
|
|
7
|
+
if (!scriptsDir) {
|
|
8
|
+
throw new Error("Could not determine schema directory");
|
|
9
|
+
}
|
|
10
|
+
const schemaDir = join(dirname(scriptsDir), "src");
|
|
11
|
+
const generatedPath = join(schemaDir, `vocab-${crypto.randomUUID()}.ts`);
|
|
12
|
+
const realPath = join(schemaDir, "vocab.ts");
|
|
13
|
+
|
|
14
|
+
await generateVocab(schemaDir, generatedPath);
|
|
15
|
+
await rename(generatedPath, realPath);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if (import.meta.main) {
|
|
19
|
+
await codegen();
|
|
20
|
+
}
|