@fedify/vocab-tools 2.4.0-dev.1655 → 2.4.0-pr.934.40
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/deno.json +1 -1
- package/dist/mod.cjs +2 -28
- package/dist/mod.js +2 -28
- package/package.json +1 -1
- package/src/__snapshots__/class.test.ts.deno.snap +53 -1150
- package/src/__snapshots__/class.test.ts.node.snap +53 -1150
- package/src/__snapshots__/class.test.ts.snap +53 -1150
- package/src/class.ts +0 -2
- package/src/type.ts +0 -24
package/deno.json
CHANGED
package/dist/mod.cjs
CHANGED
|
@@ -8,17 +8,15 @@ let yaml = require("yaml");
|
|
|
8
8
|
let es_toolkit = require("es-toolkit");
|
|
9
9
|
//#region deno.json
|
|
10
10
|
var name = "@fedify/vocab-tools";
|
|
11
|
-
var version = "2.4.0-
|
|
11
|
+
var version = "2.4.0-pr.934.40+3331d302";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/type.ts
|
|
14
14
|
const HEURISTICS_CONTEXTS = [
|
|
15
15
|
"https://www.w3.org/ns/activitystreams",
|
|
16
16
|
"https://w3id.org/security/v1",
|
|
17
17
|
"https://w3id.org/security/data-integrity/v1",
|
|
18
|
-
"https://w3id.org/security/data-integrity/v2",
|
|
19
18
|
"https://www.w3.org/ns/did/v1",
|
|
20
|
-
"https://w3id.org/security/multikey/v1"
|
|
21
|
-
"https://w3id.org/fep/ef61"
|
|
19
|
+
"https://w3id.org/security/multikey/v1"
|
|
22
20
|
];
|
|
23
21
|
const scalarTypes = {
|
|
24
22
|
"http://www.w3.org/2001/XMLSchema#boolean": {
|
|
@@ -325,28 +323,6 @@ const scalarTypes = {
|
|
|
325
323
|
return `parseIri(${v}["@value"])`;
|
|
326
324
|
}
|
|
327
325
|
},
|
|
328
|
-
"fedify:gatewayUrl": {
|
|
329
|
-
name: "URL",
|
|
330
|
-
typeGuard(v) {
|
|
331
|
-
return `${v} instanceof URL && isGatewayUrl(${v})`;
|
|
332
|
-
},
|
|
333
|
-
encoder(v) {
|
|
334
|
-
return `{ "@id": formatIri(${v}) }`;
|
|
335
|
-
},
|
|
336
|
-
compactEncoder(v) {
|
|
337
|
-
return `formatIri(${v})`;
|
|
338
|
-
},
|
|
339
|
-
dataCheck(v) {
|
|
340
|
-
return `${v} != null && typeof ${v} === "object" &&
|
|
341
|
-
(("@id" in ${v} && typeof ${v}["@id"] === "string" &&
|
|
342
|
-
${v}["@id"] !== "" && ${v}["@id"] !== "/") ||
|
|
343
|
-
("@value" in ${v} && typeof ${v}["@value"] === "string" &&
|
|
344
|
-
${v}["@value"] !== "" && ${v}["@value"] !== "/"))`;
|
|
345
|
-
},
|
|
346
|
-
decoder(v) {
|
|
347
|
-
return `parseGatewayUrl(typeof ${v}["@id"] === "string" ? ${v}["@id"] : ${v}["@value"])`;
|
|
348
|
-
}
|
|
349
|
-
},
|
|
350
326
|
"fedify:publicKey": {
|
|
351
327
|
name: "CryptoKey",
|
|
352
328
|
typeGuard(v) {
|
|
@@ -1968,10 +1944,8 @@ const RUNTIME_IMPORTS = [
|
|
|
1968
1944
|
"importMultibaseKey",
|
|
1969
1945
|
"importPem",
|
|
1970
1946
|
"isDecimal",
|
|
1971
|
-
"isGatewayUrl",
|
|
1972
1947
|
"LanguageString",
|
|
1973
1948
|
"parseDecimal",
|
|
1974
|
-
"parseGatewayUrl",
|
|
1975
1949
|
"parseIri",
|
|
1976
1950
|
"parseJsonLdId",
|
|
1977
1951
|
"type RemoteDocument"
|
package/dist/mod.js
CHANGED
|
@@ -7,17 +7,15 @@ import { parse } from "yaml";
|
|
|
7
7
|
import { pascalCase } from "es-toolkit";
|
|
8
8
|
//#region deno.json
|
|
9
9
|
var name = "@fedify/vocab-tools";
|
|
10
|
-
var version = "2.4.0-
|
|
10
|
+
var version = "2.4.0-pr.934.40+3331d302";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/type.ts
|
|
13
13
|
const HEURISTICS_CONTEXTS = [
|
|
14
14
|
"https://www.w3.org/ns/activitystreams",
|
|
15
15
|
"https://w3id.org/security/v1",
|
|
16
16
|
"https://w3id.org/security/data-integrity/v1",
|
|
17
|
-
"https://w3id.org/security/data-integrity/v2",
|
|
18
17
|
"https://www.w3.org/ns/did/v1",
|
|
19
|
-
"https://w3id.org/security/multikey/v1"
|
|
20
|
-
"https://w3id.org/fep/ef61"
|
|
18
|
+
"https://w3id.org/security/multikey/v1"
|
|
21
19
|
];
|
|
22
20
|
const scalarTypes = {
|
|
23
21
|
"http://www.w3.org/2001/XMLSchema#boolean": {
|
|
@@ -324,28 +322,6 @@ const scalarTypes = {
|
|
|
324
322
|
return `parseIri(${v}["@value"])`;
|
|
325
323
|
}
|
|
326
324
|
},
|
|
327
|
-
"fedify:gatewayUrl": {
|
|
328
|
-
name: "URL",
|
|
329
|
-
typeGuard(v) {
|
|
330
|
-
return `${v} instanceof URL && isGatewayUrl(${v})`;
|
|
331
|
-
},
|
|
332
|
-
encoder(v) {
|
|
333
|
-
return `{ "@id": formatIri(${v}) }`;
|
|
334
|
-
},
|
|
335
|
-
compactEncoder(v) {
|
|
336
|
-
return `formatIri(${v})`;
|
|
337
|
-
},
|
|
338
|
-
dataCheck(v) {
|
|
339
|
-
return `${v} != null && typeof ${v} === "object" &&
|
|
340
|
-
(("@id" in ${v} && typeof ${v}["@id"] === "string" &&
|
|
341
|
-
${v}["@id"] !== "" && ${v}["@id"] !== "/") ||
|
|
342
|
-
("@value" in ${v} && typeof ${v}["@value"] === "string" &&
|
|
343
|
-
${v}["@value"] !== "" && ${v}["@value"] !== "/"))`;
|
|
344
|
-
},
|
|
345
|
-
decoder(v) {
|
|
346
|
-
return `parseGatewayUrl(typeof ${v}["@id"] === "string" ? ${v}["@id"] : ${v}["@value"])`;
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
325
|
"fedify:publicKey": {
|
|
350
326
|
name: "CryptoKey",
|
|
351
327
|
typeGuard(v) {
|
|
@@ -1967,10 +1943,8 @@ const RUNTIME_IMPORTS = [
|
|
|
1967
1943
|
"importMultibaseKey",
|
|
1968
1944
|
"importPem",
|
|
1969
1945
|
"isDecimal",
|
|
1970
|
-
"isGatewayUrl",
|
|
1971
1946
|
"LanguageString",
|
|
1972
1947
|
"parseDecimal",
|
|
1973
|
-
"parseGatewayUrl",
|
|
1974
1948
|
"parseIri",
|
|
1975
1949
|
"parseJsonLdId",
|
|
1976
1950
|
"type RemoteDocument"
|