@fedify/vocab 2.1.0-dev.565 → 2.1.0-dev.592

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.
Files changed (91) hide show
  1. package/deno.json +2 -1
  2. package/dist/mod.cjs +225 -224
  3. package/dist/mod.js +3 -2
  4. package/{dist → dist-tests}/actor.test.js +2 -2
  5. package/{dist/deno-D6ZtKO2-.js → dist-tests/deno-BAfIdRCq.js} +3 -2
  6. package/{dist → dist-tests}/lookup.test.js +2 -2
  7. package/{dist → dist-tests}/type.test.js +1 -1
  8. package/{dist/vocab-DErmegmL.js → dist-tests/vocab-dV6QKnk_.js} +1 -1
  9. package/{dist → dist-tests}/vocab.test.js +1 -1
  10. package/package.json +6 -7
  11. package/tsdown.config.ts +13 -4
  12. package/dist/actor.test.d.ts +0 -2
  13. package/dist/lookup.test.d.ts +0 -2
  14. package/dist/type.test.d.ts +0 -2
  15. package/dist/vocab.test.d.ts +0 -2
  16. /package/{dist → dist-tests}/accept.yaml +0 -0
  17. /package/{dist → dist-tests}/activity.yaml +0 -0
  18. /package/{dist → dist-tests}/add.yaml +0 -0
  19. /package/{dist → dist-tests}/announce.yaml +0 -0
  20. /package/{dist → dist-tests}/announceauthorization.yaml +0 -0
  21. /package/{dist → dist-tests}/announcerequest.yaml +0 -0
  22. /package/{dist → dist-tests}/application.yaml +0 -0
  23. /package/{dist → dist-tests}/arrive.yaml +0 -0
  24. /package/{dist → dist-tests}/article.yaml +0 -0
  25. /package/{dist → dist-tests}/audio.yaml +0 -0
  26. /package/{dist → dist-tests}/block.yaml +0 -0
  27. /package/{dist → dist-tests}/chatmessage.yaml +0 -0
  28. /package/{dist → dist-tests}/collection.yaml +0 -0
  29. /package/{dist → dist-tests}/collectionpage.yaml +0 -0
  30. /package/{dist → dist-tests}/create.yaml +0 -0
  31. /package/{dist → dist-tests}/dataintegrityproof.yaml +0 -0
  32. /package/{dist → dist-tests}/delete.yaml +0 -0
  33. /package/{dist → dist-tests}/didservice.yaml +0 -0
  34. /package/{dist → dist-tests}/dislike.yaml +0 -0
  35. /package/{dist → dist-tests}/document.yaml +0 -0
  36. /package/{dist → dist-tests}/emoji.yaml +0 -0
  37. /package/{dist → dist-tests}/emojireact.yaml +0 -0
  38. /package/{dist → dist-tests}/endpoints.yaml +0 -0
  39. /package/{dist → dist-tests}/event.yaml +0 -0
  40. /package/{dist → dist-tests}/export.yaml +0 -0
  41. /package/{dist → dist-tests}/flag.yaml +0 -0
  42. /package/{dist → dist-tests}/follow.yaml +0 -0
  43. /package/{dist → dist-tests}/group.yaml +0 -0
  44. /package/{dist → dist-tests}/hashtag.yaml +0 -0
  45. /package/{dist → dist-tests}/ignore.yaml +0 -0
  46. /package/{dist → dist-tests}/image.yaml +0 -0
  47. /package/{dist → dist-tests}/interactionpolicy.yaml +0 -0
  48. /package/{dist → dist-tests}/interactionrule.yaml +0 -0
  49. /package/{dist → dist-tests}/intransitiveactivity.yaml +0 -0
  50. /package/{dist → dist-tests}/invite.yaml +0 -0
  51. /package/{dist → dist-tests}/join.yaml +0 -0
  52. /package/{dist → dist-tests}/key.yaml +0 -0
  53. /package/{dist → dist-tests}/leave.yaml +0 -0
  54. /package/{dist → dist-tests}/like.yaml +0 -0
  55. /package/{dist → dist-tests}/likeauthorization.yaml +0 -0
  56. /package/{dist → dist-tests}/likerequest.yaml +0 -0
  57. /package/{dist → dist-tests}/link.yaml +0 -0
  58. /package/{dist → dist-tests}/listen.yaml +0 -0
  59. /package/{dist → dist-tests}/mention.yaml +0 -0
  60. /package/{dist → dist-tests}/move.yaml +0 -0
  61. /package/{dist → dist-tests}/multikey.yaml +0 -0
  62. /package/{dist → dist-tests}/note.yaml +0 -0
  63. /package/{dist → dist-tests}/object.yaml +0 -0
  64. /package/{dist → dist-tests}/offer.yaml +0 -0
  65. /package/{dist → dist-tests}/orderedcollection.yaml +0 -0
  66. /package/{dist → dist-tests}/orderedcollectionpage.yaml +0 -0
  67. /package/{dist → dist-tests}/organization.yaml +0 -0
  68. /package/{dist → dist-tests}/page.yaml +0 -0
  69. /package/{dist → dist-tests}/person.yaml +0 -0
  70. /package/{dist → dist-tests}/place.yaml +0 -0
  71. /package/{dist → dist-tests}/profile.yaml +0 -0
  72. /package/{dist → dist-tests}/propertyvalue.yaml +0 -0
  73. /package/{dist → dist-tests}/question.yaml +0 -0
  74. /package/{dist → dist-tests}/read.yaml +0 -0
  75. /package/{dist → dist-tests}/reject.yaml +0 -0
  76. /package/{dist → dist-tests}/relationship.yaml +0 -0
  77. /package/{dist → dist-tests}/remove.yaml +0 -0
  78. /package/{dist → dist-tests}/replyauthorization.yaml +0 -0
  79. /package/{dist → dist-tests}/replyrequest.yaml +0 -0
  80. /package/{dist → dist-tests}/service.yaml +0 -0
  81. /package/{dist → dist-tests}/source.yaml +0 -0
  82. /package/{dist → dist-tests}/tentativeaccept.yaml +0 -0
  83. /package/{dist → dist-tests}/tentativereject.yaml +0 -0
  84. /package/{dist → dist-tests}/tombstone.yaml +0 -0
  85. /package/{dist → dist-tests}/travel.yaml +0 -0
  86. /package/{dist → dist-tests}/type-CNuABalk.js +0 -0
  87. /package/{dist → dist-tests}/undo.yaml +0 -0
  88. /package/{dist → dist-tests}/update.yaml +0 -0
  89. /package/{dist → dist-tests}/utils-BSWXlrig.js +0 -0
  90. /package/{dist → dist-tests}/video.yaml +0 -0
  91. /package/{dist → dist-tests}/view.yaml +0 -0
package/dist/mod.js CHANGED
@@ -4,14 +4,14 @@
4
4
  import { lookupWebFinger } from "@fedify/webfinger";
5
5
  import { SpanStatusCode, trace } from "@opentelemetry/api";
6
6
  import { domainToASCII, domainToUnicode } from "node:url";
7
- import jsonld from "jsonld";
7
+ import jsonld from "@fedify/vocab-runtime/jsonld";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { LanguageString, LanguageString as LanguageString$1, decodeMultibase, encodeMultibase, exportMultibaseKey, exportSpki, getDocumentLoader, importMultibaseKey, importPem } from "@fedify/vocab-runtime";
10
10
  import { delay } from "es-toolkit";
11
11
 
12
12
  //#region deno.json
13
13
  var name = "@fedify/vocab";
14
- var version = "2.1.0-dev.565+b4d238a9";
14
+ var version = "2.1.0-dev.592+6c1f6e6f";
15
15
  var license = "MIT";
16
16
  var exports = { ".": "./src/mod.ts" };
17
17
  var description = "Vocabularies library for @fedify/fedify";
@@ -27,6 +27,7 @@ var imports = {
27
27
  };
28
28
  var exclude = [
29
29
  "dist/",
30
+ "dist-tests/",
30
31
  "node_modules/",
31
32
  "src/*.yaml",
32
33
  "!src/vocab.ts"
@@ -2,8 +2,8 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
 
5
- import { Application, Group, Organization, Person, Service, __export } from "./vocab-DErmegmL.js";
6
- import { deno_default, esm_default } from "./deno-D6ZtKO2-.js";
5
+ import { Application, Group, Organization, Person, Service, __export } from "./vocab-dV6QKnk_.js";
6
+ import { deno_default, esm_default } from "./deno-BAfIdRCq.js";
7
7
  import { getTypeId } from "./type-CNuABalk.js";
8
8
  import { test } from "@fedify/fixture";
9
9
  import { deepStrictEqual, ok, rejects, strictEqual, throws } from "node:assert/strict";
@@ -2,7 +2,7 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
 
5
- import { __commonJS, __toESM } from "./vocab-DErmegmL.js";
5
+ import { __commonJS, __toESM } from "./vocab-dV6QKnk_.js";
6
6
 
7
7
  //#region ../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js
8
8
  var require_glob_to_regexp = __commonJS({ "../../node_modules/.pnpm/glob-to-regexp@0.4.1/node_modules/glob-to-regexp/index.js"(exports, module) {
@@ -1240,7 +1240,7 @@ var esm_default = FetchMock_default;
1240
1240
  //#endregion
1241
1241
  //#region deno.json
1242
1242
  var name = "@fedify/vocab";
1243
- var version = "2.1.0-dev.565+b4d238a9";
1243
+ var version = "2.1.0-dev.592+6c1f6e6f";
1244
1244
  var license = "MIT";
1245
1245
  var exports = { ".": "./src/mod.ts" };
1246
1246
  var description = "Vocabularies library for @fedify/fedify";
@@ -1256,6 +1256,7 @@ var imports = {
1256
1256
  };
1257
1257
  var exclude = [
1258
1258
  "dist/",
1259
+ "dist-tests/",
1259
1260
  "node_modules/",
1260
1261
  "src/*.yaml",
1261
1262
  "!src/vocab.ts"
@@ -2,8 +2,8 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
 
5
- import { Collection, Note, Object as Object$1, Person } from "./vocab-DErmegmL.js";
6
- import { deno_default, esm_default } from "./deno-D6ZtKO2-.js";
5
+ import { Collection, Note, Object as Object$1, Person } from "./vocab-dV6QKnk_.js";
6
+ import { deno_default, esm_default } from "./deno-BAfIdRCq.js";
7
7
  import { getTypeId } from "./type-CNuABalk.js";
8
8
  import { assertInstanceOf } from "./utils-BSWXlrig.js";
9
9
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
@@ -2,7 +2,7 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
 
5
- import { Person } from "./vocab-DErmegmL.js";
5
+ import { Person } from "./vocab-dV6QKnk_.js";
6
6
  import { getTypeId } from "./type-CNuABalk.js";
7
7
  import { test } from "@fedify/fixture";
8
8
  import { deepStrictEqual } from "node:assert/strict";
@@ -4,7 +4,7 @@
4
4
 
5
5
  import "node:module";
6
6
  import { SpanStatusCode, trace } from "@opentelemetry/api";
7
- import jsonld from "jsonld";
7
+ import jsonld from "@fedify/vocab-runtime/jsonld";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { LanguageString, decodeMultibase, encodeMultibase, exportMultibaseKey, exportSpki, getDocumentLoader, importMultibaseKey, importPem } from "@fedify/vocab-runtime";
10
10
 
@@ -2,7 +2,7 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  globalThis.addEventListener = () => {};
4
4
 
5
- import { Activity, Announce, Collection, Create, CryptographicKey, Endpoints, Follow, Hashtag, Link, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, vocab_exports } from "./vocab-DErmegmL.js";
5
+ import { Activity, Announce, Collection, Create, CryptographicKey, Endpoints, Follow, Hashtag, Link, Note, Object as Object$1, OrderedCollectionPage, Person, Place, Question, Source, vocab_exports } from "./vocab-dV6QKnk_.js";
6
6
  import { assertInstanceOf } from "./utils-BSWXlrig.js";
7
7
  import { mockDocumentLoader, test } from "@fedify/fixture";
8
8
  import { deepStrictEqual, notDeepStrictEqual, ok, rejects, throws } from "node:assert/strict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fedify/vocab",
3
- "version": "2.1.0-dev.565+b4d238a9",
3
+ "version": "2.1.0-dev.592+6c1f6e6f",
4
4
  "homepage": "https://fedify.dev/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,11 +45,10 @@
45
45
  "asn1js": "^3.0.6",
46
46
  "es-toolkit": "1.43.0",
47
47
  "jsonld": "^9.0.0",
48
- "multicodec": "^3.2.1",
49
48
  "pkijs": "^3.3.3",
50
- "@fedify/vocab-tools": "2.1.0-dev.565+b4d238a9",
51
- "@fedify/webfinger": "2.1.0-dev.565+b4d238a9",
52
- "@fedify/vocab-runtime": "2.1.0-dev.565+b4d238a9"
49
+ "@fedify/vocab-runtime": "2.1.0-dev.592+6c1f6e6f",
50
+ "@fedify/webfinger": "2.1.0-dev.592+6c1f6e6f",
51
+ "@fedify/vocab-tools": "2.1.0-dev.592+6c1f6e6f"
53
52
  },
54
53
  "devDependencies": {
55
54
  "@types/node": "^22.17.0",
@@ -75,8 +74,8 @@
75
74
  "build": "pnpm --filter @fedify/vocab... run build:self",
76
75
  "prepublish": "pnpm build",
77
76
  "pretest": "pnpm build",
78
- "test": "cd dist/ && node --test",
77
+ "test": "cd dist-tests && node --test",
79
78
  "pretest:bun": "pnpm build",
80
- "test:bun": "cd dist/ && bun test --timeout 60000"
79
+ "test:bun": "cd dist-tests && bun test --timeout 60000"
81
80
  }
82
81
  }
package/tsdown.config.ts CHANGED
@@ -1,7 +1,15 @@
1
- import { cp, glob } from "node:fs/promises";
2
- import { join, sep } from "node:path";
1
+ import { glob, mkdir, readFile, writeFile } from "node:fs/promises";
2
+ import { dirname, join, sep } from "node:path";
3
3
  import { defineConfig } from "tsdown";
4
4
 
5
+ async function copyFileSafely(
6
+ source: string,
7
+ destination: string,
8
+ ): Promise<void> {
9
+ await mkdir(dirname(destination), { recursive: true });
10
+ await writeFile(destination, await readFile(source));
11
+ }
12
+
5
13
  export default [
6
14
  defineConfig({
7
15
  entry: [
@@ -25,8 +33,10 @@ export default [
25
33
  },
26
34
  }),
27
35
  defineConfig({
36
+ outDir: "dist-tests",
28
37
  entry: (await Array.fromAsync(glob(`src/**/*.test.ts`)))
29
38
  .map((f) => f.replace(sep, "/")),
39
+ dts: false,
30
40
  external: [/^node:/, "@fedify/fixture"],
31
41
  inputOptions: {
32
42
  onwarn(warning, defaultHandler) {
@@ -50,10 +60,9 @@ export default [
50
60
  hooks: {
51
61
  "build:done": async (ctx) => {
52
62
  for await (const file of glob("src/**/*.yaml")) {
53
- await cp(
63
+ await copyFileSafely(
54
64
  file,
55
65
  join(ctx.options.outDir, file.replace(`src${sep}`, "")),
56
- { force: true },
57
66
  );
58
67
  }
59
68
  },
@@ -1,2 +0,0 @@
1
- import { Temporal } from "@js-temporal/polyfill";
2
- globalThis.addEventListener = () => {};
@@ -1,2 +0,0 @@
1
- import { Temporal } from "@js-temporal/polyfill";
2
- globalThis.addEventListener = () => {};
@@ -1,2 +0,0 @@
1
- import { Temporal } from "@js-temporal/polyfill";
2
- globalThis.addEventListener = () => {};
@@ -1,2 +0,0 @@
1
- import { Temporal } from "@js-temporal/polyfill";
2
- globalThis.addEventListener = () => {};
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes