@fedify/vocab-tools 2.4.0-dev.2253 → 2.4.0-dev.2259
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 +5 -4
- package/dist/mod.js +5 -4
- package/package.json +1 -1
- package/src/__snapshots__/class.test.ts.deno.snap +16 -15
- package/src/__snapshots__/class.test.ts.node.snap +16 -15
- package/src/__snapshots__/class.test.ts.snap +16 -15
- package/src/class.ts +1 -0
- package/src/codec.ts +4 -1
- package/src/type.ts +2 -2
package/deno.json
CHANGED
package/dist/mod.cjs
CHANGED
|
@@ -8,7 +8,7 @@ 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-dev.
|
|
11
|
+
var version = "2.4.0-dev.2259+d9c843fc";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/type.ts
|
|
14
14
|
const HEURISTICS_CONTEXTS = [
|
|
@@ -333,10 +333,10 @@ const scalarTypes = {
|
|
|
333
333
|
return `${v} instanceof URL && isGatewayUrl(${v})`;
|
|
334
334
|
},
|
|
335
335
|
encoder(v) {
|
|
336
|
-
return `{ "@id":
|
|
336
|
+
return `{ "@id": ${v}.origin }`;
|
|
337
337
|
},
|
|
338
338
|
compactEncoder(v) {
|
|
339
|
-
return
|
|
339
|
+
return `${v}.origin`;
|
|
340
340
|
},
|
|
341
341
|
dataCheck(v) {
|
|
342
342
|
return `${v} != null && typeof ${v} === "object" &&
|
|
@@ -1165,7 +1165,7 @@ async function* generateDecoder(typeUri, types, moduleVarNames) {
|
|
|
1165
1165
|
yield await generateField(property, types, "const ");
|
|
1166
1166
|
const arrayVariable = `${variable}__array`;
|
|
1167
1167
|
yield `
|
|
1168
|
-
let ${arrayVariable} = values[${JSON.stringify(property.uri)}];
|
|
1168
|
+
let ${arrayVariable} = ${property.uri === "https://w3id.org/fep/ef61/gateways" ? "getPortableActorGateways(values) as typeof values[string]" : `values[${JSON.stringify(property.uri)}]`};
|
|
1169
1169
|
`;
|
|
1170
1170
|
if (property.functional && property.redundantProperties != null) for (const prop of property.redundantProperties) yield `
|
|
1171
1171
|
if (${arrayVariable} == null || ${arrayVariable}.length < 1) {
|
|
@@ -2285,6 +2285,7 @@ const INTERNAL_RUNTIME_IMPORTS = [
|
|
|
2285
2285
|
"compactJsonLdCache",
|
|
2286
2286
|
"createScopedContextLoader",
|
|
2287
2287
|
"getJsonLdContext",
|
|
2288
|
+
"getPortableActorGateways",
|
|
2288
2289
|
"isTrustedIriOrigin",
|
|
2289
2290
|
"normalizeJsonLdIris"
|
|
2290
2291
|
].join(",\n ");
|
package/dist/mod.js
CHANGED
|
@@ -7,7 +7,7 @@ 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-dev.
|
|
10
|
+
var version = "2.4.0-dev.2259+d9c843fc";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/type.ts
|
|
13
13
|
const HEURISTICS_CONTEXTS = [
|
|
@@ -332,10 +332,10 @@ const scalarTypes = {
|
|
|
332
332
|
return `${v} instanceof URL && isGatewayUrl(${v})`;
|
|
333
333
|
},
|
|
334
334
|
encoder(v) {
|
|
335
|
-
return `{ "@id":
|
|
335
|
+
return `{ "@id": ${v}.origin }`;
|
|
336
336
|
},
|
|
337
337
|
compactEncoder(v) {
|
|
338
|
-
return
|
|
338
|
+
return `${v}.origin`;
|
|
339
339
|
},
|
|
340
340
|
dataCheck(v) {
|
|
341
341
|
return `${v} != null && typeof ${v} === "object" &&
|
|
@@ -1164,7 +1164,7 @@ async function* generateDecoder(typeUri, types, moduleVarNames) {
|
|
|
1164
1164
|
yield await generateField(property, types, "const ");
|
|
1165
1165
|
const arrayVariable = `${variable}__array`;
|
|
1166
1166
|
yield `
|
|
1167
|
-
let ${arrayVariable} = values[${JSON.stringify(property.uri)}];
|
|
1167
|
+
let ${arrayVariable} = ${property.uri === "https://w3id.org/fep/ef61/gateways" ? "getPortableActorGateways(values) as typeof values[string]" : `values[${JSON.stringify(property.uri)}]`};
|
|
1168
1168
|
`;
|
|
1169
1169
|
if (property.functional && property.redundantProperties != null) for (const prop of property.redundantProperties) yield `
|
|
1170
1170
|
if (${arrayVariable} == null || ${arrayVariable}.length < 1) {
|
|
@@ -2284,6 +2284,7 @@ const INTERNAL_RUNTIME_IMPORTS = [
|
|
|
2284
2284
|
"compactJsonLdCache",
|
|
2285
2285
|
"createScopedContextLoader",
|
|
2286
2286
|
"getJsonLdContext",
|
|
2287
|
+
"getPortableActorGateways",
|
|
2287
2288
|
"isTrustedIriOrigin",
|
|
2288
2289
|
"normalizeJsonLdIris"
|
|
2289
2290
|
].join(",\n ");
|
package/package.json
CHANGED
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
compactJsonLdCache,
|
|
33
33
|
createScopedContextLoader,
|
|
34
34
|
getJsonLdContext,
|
|
35
|
+
getPortableActorGateways,
|
|
35
36
|
isTrustedIriOrigin,
|
|
36
37
|
normalizeJsonLdIris
|
|
37
38
|
} from \\"@fedify/vocab-runtime/internal/jsonld-cache\\";
|
|
@@ -69291,7 +69292,7 @@ get gateways(): (URL)[] {
|
|
|
69291
69292
|
compactItems = [];
|
|
69292
69293
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
69293
69294
|
const item = (
|
|
69294
|
-
|
|
69295
|
+
v.origin
|
|
69295
69296
|
);
|
|
69296
69297
|
compactItems.push(item);
|
|
69297
69298
|
}
|
|
@@ -69800,7 +69801,7 @@ get gateways(): (URL)[] {
|
|
|
69800
69801
|
array = [];
|
|
69801
69802
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
69802
69803
|
let element = (
|
|
69803
|
-
{ \\"@id\\":
|
|
69804
|
+
{ \\"@id\\": v.origin }
|
|
69804
69805
|
);
|
|
69805
69806
|
if (Array.isArray(element)) {
|
|
69806
69807
|
if (element.length < 1) continue;
|
|
@@ -70539,7 +70540,7 @@ get gateways(): (URL)[] {
|
|
|
70539
70540
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
70540
70541
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
70541
70542
|
|
|
70542
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
70543
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
70543
70544
|
|
|
70544
70545
|
for (
|
|
70545
70546
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -90389,7 +90390,7 @@ get gateways(): (URL)[] {
|
|
|
90389
90390
|
compactItems = [];
|
|
90390
90391
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
90391
90392
|
const item = (
|
|
90392
|
-
|
|
90393
|
+
v.origin
|
|
90393
90394
|
);
|
|
90394
90395
|
compactItems.push(item);
|
|
90395
90396
|
}
|
|
@@ -90898,7 +90899,7 @@ get gateways(): (URL)[] {
|
|
|
90898
90899
|
array = [];
|
|
90899
90900
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
90900
90901
|
let element = (
|
|
90901
|
-
{ \\"@id\\":
|
|
90902
|
+
{ \\"@id\\": v.origin }
|
|
90902
90903
|
);
|
|
90903
90904
|
if (Array.isArray(element)) {
|
|
90904
90905
|
if (element.length < 1) continue;
|
|
@@ -91637,7 +91638,7 @@ get gateways(): (URL)[] {
|
|
|
91637
91638
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
91638
91639
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
91639
91640
|
|
|
91640
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
91641
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
91641
91642
|
|
|
91642
91643
|
for (
|
|
91643
91644
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -110116,7 +110117,7 @@ get gateways(): (URL)[] {
|
|
|
110116
110117
|
compactItems = [];
|
|
110117
110118
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
110118
110119
|
const item = (
|
|
110119
|
-
|
|
110120
|
+
v.origin
|
|
110120
110121
|
);
|
|
110121
110122
|
compactItems.push(item);
|
|
110122
110123
|
}
|
|
@@ -110625,7 +110626,7 @@ get gateways(): (URL)[] {
|
|
|
110625
110626
|
array = [];
|
|
110626
110627
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
110627
110628
|
let element = (
|
|
110628
|
-
{ \\"@id\\":
|
|
110629
|
+
{ \\"@id\\": v.origin }
|
|
110629
110630
|
);
|
|
110630
110631
|
if (Array.isArray(element)) {
|
|
110631
110632
|
if (element.length < 1) continue;
|
|
@@ -111364,7 +111365,7 @@ get gateways(): (URL)[] {
|
|
|
111364
111365
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
111365
111366
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
111366
111367
|
|
|
111367
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
111368
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
111368
111369
|
|
|
111369
111370
|
for (
|
|
111370
111371
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -121139,7 +121140,7 @@ get gateways(): (URL)[] {
|
|
|
121139
121140
|
compactItems = [];
|
|
121140
121141
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
121141
121142
|
const item = (
|
|
121142
|
-
|
|
121143
|
+
v.origin
|
|
121143
121144
|
);
|
|
121144
121145
|
compactItems.push(item);
|
|
121145
121146
|
}
|
|
@@ -121648,7 +121649,7 @@ get gateways(): (URL)[] {
|
|
|
121648
121649
|
array = [];
|
|
121649
121650
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
121650
121651
|
let element = (
|
|
121651
|
-
{ \\"@id\\":
|
|
121652
|
+
{ \\"@id\\": v.origin }
|
|
121652
121653
|
);
|
|
121653
121654
|
if (Array.isArray(element)) {
|
|
121654
121655
|
if (element.length < 1) continue;
|
|
@@ -122387,7 +122388,7 @@ get gateways(): (URL)[] {
|
|
|
122387
122388
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
122388
122389
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
122389
122390
|
|
|
122390
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
122391
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
122391
122392
|
|
|
122392
122393
|
for (
|
|
122393
122394
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -140572,7 +140573,7 @@ get gateways(): (URL)[] {
|
|
|
140572
140573
|
compactItems = [];
|
|
140573
140574
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
140574
140575
|
const item = (
|
|
140575
|
-
|
|
140576
|
+
v.origin
|
|
140576
140577
|
);
|
|
140577
140578
|
compactItems.push(item);
|
|
140578
140579
|
}
|
|
@@ -141081,7 +141082,7 @@ get gateways(): (URL)[] {
|
|
|
141081
141082
|
array = [];
|
|
141082
141083
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
141083
141084
|
let element = (
|
|
141084
|
-
{ \\"@id\\":
|
|
141085
|
+
{ \\"@id\\": v.origin }
|
|
141085
141086
|
);
|
|
141086
141087
|
if (Array.isArray(element)) {
|
|
141087
141088
|
if (element.length < 1) continue;
|
|
@@ -141820,7 +141821,7 @@ get gateways(): (URL)[] {
|
|
|
141820
141821
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
141821
141822
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
141822
141823
|
|
|
141823
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
141824
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
141824
141825
|
|
|
141825
141826
|
for (
|
|
141826
141827
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
compactJsonLdCache,
|
|
31
31
|
createScopedContextLoader,
|
|
32
32
|
getJsonLdContext,
|
|
33
|
+
getPortableActorGateways,
|
|
33
34
|
isTrustedIriOrigin,
|
|
34
35
|
normalizeJsonLdIris
|
|
35
36
|
} from \\"@fedify/vocab-runtime/internal/jsonld-cache\\";
|
|
@@ -69289,7 +69290,7 @@ get gateways(): (URL)[] {
|
|
|
69289
69290
|
compactItems = [];
|
|
69290
69291
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
69291
69292
|
const item = (
|
|
69292
|
-
|
|
69293
|
+
v.origin
|
|
69293
69294
|
);
|
|
69294
69295
|
compactItems.push(item);
|
|
69295
69296
|
}
|
|
@@ -69798,7 +69799,7 @@ get gateways(): (URL)[] {
|
|
|
69798
69799
|
array = [];
|
|
69799
69800
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
69800
69801
|
let element = (
|
|
69801
|
-
{ \\"@id\\":
|
|
69802
|
+
{ \\"@id\\": v.origin }
|
|
69802
69803
|
);
|
|
69803
69804
|
if (Array.isArray(element)) {
|
|
69804
69805
|
if (element.length < 1) continue;
|
|
@@ -70537,7 +70538,7 @@ get gateways(): (URL)[] {
|
|
|
70537
70538
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
70538
70539
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
70539
70540
|
|
|
70540
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
70541
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
70541
70542
|
|
|
70542
70543
|
for (
|
|
70543
70544
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -90387,7 +90388,7 @@ get gateways(): (URL)[] {
|
|
|
90387
90388
|
compactItems = [];
|
|
90388
90389
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
90389
90390
|
const item = (
|
|
90390
|
-
|
|
90391
|
+
v.origin
|
|
90391
90392
|
);
|
|
90392
90393
|
compactItems.push(item);
|
|
90393
90394
|
}
|
|
@@ -90896,7 +90897,7 @@ get gateways(): (URL)[] {
|
|
|
90896
90897
|
array = [];
|
|
90897
90898
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
90898
90899
|
let element = (
|
|
90899
|
-
{ \\"@id\\":
|
|
90900
|
+
{ \\"@id\\": v.origin }
|
|
90900
90901
|
);
|
|
90901
90902
|
if (Array.isArray(element)) {
|
|
90902
90903
|
if (element.length < 1) continue;
|
|
@@ -91635,7 +91636,7 @@ get gateways(): (URL)[] {
|
|
|
91635
91636
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
91636
91637
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
91637
91638
|
|
|
91638
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
91639
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
91639
91640
|
|
|
91640
91641
|
for (
|
|
91641
91642
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -110114,7 +110115,7 @@ get gateways(): (URL)[] {
|
|
|
110114
110115
|
compactItems = [];
|
|
110115
110116
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
110116
110117
|
const item = (
|
|
110117
|
-
|
|
110118
|
+
v.origin
|
|
110118
110119
|
);
|
|
110119
110120
|
compactItems.push(item);
|
|
110120
110121
|
}
|
|
@@ -110623,7 +110624,7 @@ get gateways(): (URL)[] {
|
|
|
110623
110624
|
array = [];
|
|
110624
110625
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
110625
110626
|
let element = (
|
|
110626
|
-
{ \\"@id\\":
|
|
110627
|
+
{ \\"@id\\": v.origin }
|
|
110627
110628
|
);
|
|
110628
110629
|
if (Array.isArray(element)) {
|
|
110629
110630
|
if (element.length < 1) continue;
|
|
@@ -111362,7 +111363,7 @@ get gateways(): (URL)[] {
|
|
|
111362
111363
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
111363
111364
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
111364
111365
|
|
|
111365
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
111366
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
111366
111367
|
|
|
111367
111368
|
for (
|
|
111368
111369
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -121137,7 +121138,7 @@ get gateways(): (URL)[] {
|
|
|
121137
121138
|
compactItems = [];
|
|
121138
121139
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
121139
121140
|
const item = (
|
|
121140
|
-
|
|
121141
|
+
v.origin
|
|
121141
121142
|
);
|
|
121142
121143
|
compactItems.push(item);
|
|
121143
121144
|
}
|
|
@@ -121646,7 +121647,7 @@ get gateways(): (URL)[] {
|
|
|
121646
121647
|
array = [];
|
|
121647
121648
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
121648
121649
|
let element = (
|
|
121649
|
-
{ \\"@id\\":
|
|
121650
|
+
{ \\"@id\\": v.origin }
|
|
121650
121651
|
);
|
|
121651
121652
|
if (Array.isArray(element)) {
|
|
121652
121653
|
if (element.length < 1) continue;
|
|
@@ -122385,7 +122386,7 @@ get gateways(): (URL)[] {
|
|
|
122385
122386
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
122386
122387
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
122387
122388
|
|
|
122388
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
122389
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
122389
122390
|
|
|
122390
122391
|
for (
|
|
122391
122392
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -140570,7 +140571,7 @@ get gateways(): (URL)[] {
|
|
|
140570
140571
|
compactItems = [];
|
|
140571
140572
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
140572
140573
|
const item = (
|
|
140573
|
-
|
|
140574
|
+
v.origin
|
|
140574
140575
|
);
|
|
140575
140576
|
compactItems.push(item);
|
|
140576
140577
|
}
|
|
@@ -141079,7 +141080,7 @@ get gateways(): (URL)[] {
|
|
|
141079
141080
|
array = [];
|
|
141080
141081
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
141081
141082
|
let element = (
|
|
141082
|
-
{ \\"@id\\":
|
|
141083
|
+
{ \\"@id\\": v.origin }
|
|
141083
141084
|
);
|
|
141084
141085
|
if (Array.isArray(element)) {
|
|
141085
141086
|
if (element.length < 1) continue;
|
|
@@ -141818,7 +141819,7 @@ get gateways(): (URL)[] {
|
|
|
141818
141819
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
141819
141820
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
141820
141821
|
|
|
141821
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
141822
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
141822
141823
|
|
|
141823
141824
|
for (
|
|
141824
141825
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
compactJsonLdCache,
|
|
33
33
|
createScopedContextLoader,
|
|
34
34
|
getJsonLdContext,
|
|
35
|
+
getPortableActorGateways,
|
|
35
36
|
isTrustedIriOrigin,
|
|
36
37
|
normalizeJsonLdIris
|
|
37
38
|
} from "@fedify/vocab-runtime/internal/jsonld-cache";
|
|
@@ -69291,7 +69292,7 @@ get gateways(): (URL)[] {
|
|
|
69291
69292
|
compactItems = [];
|
|
69292
69293
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
69293
69294
|
const item = (
|
|
69294
|
-
|
|
69295
|
+
v.origin
|
|
69295
69296
|
);
|
|
69296
69297
|
compactItems.push(item);
|
|
69297
69298
|
}
|
|
@@ -69800,7 +69801,7 @@ get gateways(): (URL)[] {
|
|
|
69800
69801
|
array = [];
|
|
69801
69802
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
69802
69803
|
let element = (
|
|
69803
|
-
{ "@id":
|
|
69804
|
+
{ "@id": v.origin }
|
|
69804
69805
|
);
|
|
69805
69806
|
if (Array.isArray(element)) {
|
|
69806
69807
|
if (element.length < 1) continue;
|
|
@@ -70539,7 +70540,7 @@ get gateways(): (URL)[] {
|
|
|
70539
70540
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
70540
70541
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
70541
70542
|
|
|
70542
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
70543
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
70543
70544
|
|
|
70544
70545
|
for (
|
|
70545
70546
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -90389,7 +90390,7 @@ get gateways(): (URL)[] {
|
|
|
90389
90390
|
compactItems = [];
|
|
90390
90391
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
90391
90392
|
const item = (
|
|
90392
|
-
|
|
90393
|
+
v.origin
|
|
90393
90394
|
);
|
|
90394
90395
|
compactItems.push(item);
|
|
90395
90396
|
}
|
|
@@ -90898,7 +90899,7 @@ get gateways(): (URL)[] {
|
|
|
90898
90899
|
array = [];
|
|
90899
90900
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
90900
90901
|
let element = (
|
|
90901
|
-
{ "@id":
|
|
90902
|
+
{ "@id": v.origin }
|
|
90902
90903
|
);
|
|
90903
90904
|
if (Array.isArray(element)) {
|
|
90904
90905
|
if (element.length < 1) continue;
|
|
@@ -91637,7 +91638,7 @@ get gateways(): (URL)[] {
|
|
|
91637
91638
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
91638
91639
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
91639
91640
|
|
|
91640
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
91641
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
91641
91642
|
|
|
91642
91643
|
for (
|
|
91643
91644
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -110116,7 +110117,7 @@ get gateways(): (URL)[] {
|
|
|
110116
110117
|
compactItems = [];
|
|
110117
110118
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
110118
110119
|
const item = (
|
|
110119
|
-
|
|
110120
|
+
v.origin
|
|
110120
110121
|
);
|
|
110121
110122
|
compactItems.push(item);
|
|
110122
110123
|
}
|
|
@@ -110625,7 +110626,7 @@ get gateways(): (URL)[] {
|
|
|
110625
110626
|
array = [];
|
|
110626
110627
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
110627
110628
|
let element = (
|
|
110628
|
-
{ "@id":
|
|
110629
|
+
{ "@id": v.origin }
|
|
110629
110630
|
);
|
|
110630
110631
|
if (Array.isArray(element)) {
|
|
110631
110632
|
if (element.length < 1) continue;
|
|
@@ -111364,7 +111365,7 @@ get gateways(): (URL)[] {
|
|
|
111364
111365
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
111365
111366
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
111366
111367
|
|
|
111367
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
111368
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
111368
111369
|
|
|
111369
111370
|
for (
|
|
111370
111371
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -121139,7 +121140,7 @@ get gateways(): (URL)[] {
|
|
|
121139
121140
|
compactItems = [];
|
|
121140
121141
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
121141
121142
|
const item = (
|
|
121142
|
-
|
|
121143
|
+
v.origin
|
|
121143
121144
|
);
|
|
121144
121145
|
compactItems.push(item);
|
|
121145
121146
|
}
|
|
@@ -121648,7 +121649,7 @@ get gateways(): (URL)[] {
|
|
|
121648
121649
|
array = [];
|
|
121649
121650
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
121650
121651
|
let element = (
|
|
121651
|
-
{ "@id":
|
|
121652
|
+
{ "@id": v.origin }
|
|
121652
121653
|
);
|
|
121653
121654
|
if (Array.isArray(element)) {
|
|
121654
121655
|
if (element.length < 1) continue;
|
|
@@ -122387,7 +122388,7 @@ get gateways(): (URL)[] {
|
|
|
122387
122388
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
122388
122389
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
122389
122390
|
|
|
122390
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
122391
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
122391
122392
|
|
|
122392
122393
|
for (
|
|
122393
122394
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
|
@@ -140572,7 +140573,7 @@ get gateways(): (URL)[] {
|
|
|
140572
140573
|
compactItems = [];
|
|
140573
140574
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
140574
140575
|
const item = (
|
|
140575
|
-
|
|
140576
|
+
v.origin
|
|
140576
140577
|
);
|
|
140577
140578
|
compactItems.push(item);
|
|
140578
140579
|
}
|
|
@@ -141081,7 +141082,7 @@ get gateways(): (URL)[] {
|
|
|
141081
141082
|
array = [];
|
|
141082
141083
|
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
141083
141084
|
let element = (
|
|
141084
|
-
{ "@id":
|
|
141085
|
+
{ "@id": v.origin }
|
|
141085
141086
|
);
|
|
141086
141087
|
if (Array.isArray(element)) {
|
|
141087
141088
|
if (element.length < 1) continue;
|
|
@@ -141820,7 +141821,7 @@ get gateways(): (URL)[] {
|
|
|
141820
141821
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
141821
141822
|
const _hQiaHhZP8hqxckxTBrpsGNs57E3: (URL)[] = [];
|
|
141822
141823
|
|
|
141823
|
-
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values[
|
|
141824
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = getPortableActorGateways(values) as typeof values[string];
|
|
141824
141825
|
|
|
141825
141826
|
for (
|
|
141826
141827
|
const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null
|
package/src/class.ts
CHANGED
package/src/codec.ts
CHANGED
|
@@ -538,8 +538,11 @@ export async function* generateDecoder(
|
|
|
538
538
|
const variable = await getFieldName(property.uri, "");
|
|
539
539
|
yield await generateField(property, types, "const ");
|
|
540
540
|
const arrayVariable = `${variable}__array`;
|
|
541
|
+
const propertyValues = property.uri === "https://w3id.org/fep/ef61/gateways"
|
|
542
|
+
? "getPortableActorGateways(values) as typeof values[string]"
|
|
543
|
+
: `values[${JSON.stringify(property.uri)}]`;
|
|
541
544
|
yield `
|
|
542
|
-
let ${arrayVariable} =
|
|
545
|
+
let ${arrayVariable} = ${propertyValues};
|
|
543
546
|
`;
|
|
544
547
|
if (property.functional && property.redundantProperties != null) {
|
|
545
548
|
for (const prop of property.redundantProperties) {
|
package/src/type.ts
CHANGED
|
@@ -340,10 +340,10 @@ const scalarTypes: Record<string, ScalarType> = {
|
|
|
340
340
|
return `${v} instanceof URL && isGatewayUrl(${v})`;
|
|
341
341
|
},
|
|
342
342
|
encoder(v) {
|
|
343
|
-
return `{ "@id":
|
|
343
|
+
return `{ "@id": ${v}.origin }`;
|
|
344
344
|
},
|
|
345
345
|
compactEncoder(v) {
|
|
346
|
-
return
|
|
346
|
+
return `${v}.origin`;
|
|
347
347
|
},
|
|
348
348
|
dataCheck(v) {
|
|
349
349
|
return `${v} != null && typeof ${v} === "object" &&
|