@fedify/vocab-tools 2.0.36-dev.2734 → 2.0.36-dev.2760
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 +228 -2
- package/dist/mod.js +228 -2
- package/package.json +1 -1
- package/src/__snapshots__/class.test.ts.deno.snap +539 -32
- package/src/__snapshots__/class.test.ts.node.snap +539 -32
- package/src/__snapshots__/class.test.ts.snap +539 -32
- package/src/class.test.ts +315 -2
- package/src/class.ts +2 -0
- package/src/codec.ts +23 -1
- package/src/context.ts +205 -0
|
@@ -47,6 +47,207 @@ function isValidLanguageTag(language: string): boolean {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
|
|
50
|
+
|
|
51
|
+
function hasJsonLdContext(value: unknown): boolean {
|
|
52
|
+
if (Array.isArray(value)) return value.some(hasJsonLdContext);
|
|
53
|
+
return value != null && typeof value === "object" &&
|
|
54
|
+
globalThis.Object.hasOwn(value, "@context");
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function hasSupportedJsonLdScalars(value: unknown, idReferences: boolean): boolean {
|
|
58
|
+
if (Array.isArray(value)) {
|
|
59
|
+
return value.every(item => hasSupportedJsonLdScalars(item, idReferences));
|
|
60
|
+
}
|
|
61
|
+
return value === null || typeof value === "object" ||
|
|
62
|
+
(idReferences && typeof value === "string" && URL.canParse(value));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function equalJsonLdValues(left: unknown, right: unknown): boolean {
|
|
66
|
+
if (left === right) return true;
|
|
67
|
+
if (Array.isArray(left) || Array.isArray(right)) {
|
|
68
|
+
return Array.isArray(left) && Array.isArray(right) &&
|
|
69
|
+
left.length === right.length &&
|
|
70
|
+
left.every((item, index) => equalJsonLdValues(item, right[index]));
|
|
71
|
+
}
|
|
72
|
+
if (left === null || right === null || typeof left !== "object" ||
|
|
73
|
+
typeof right !== "object") return false;
|
|
74
|
+
const leftObject = left as Record<string, unknown>;
|
|
75
|
+
const rightObject = right as Record<string, unknown>;
|
|
76
|
+
const keys = globalThis.Object.keys(leftObject);
|
|
77
|
+
return keys.length === globalThis.Object.keys(rightObject).length &&
|
|
78
|
+
keys.every(key => globalThis.Object.hasOwn(rightObject, key) &&
|
|
79
|
+
equalJsonLdValues(leftObject[key], rightObject[key]));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
async function isolateJsonLdSibling(
|
|
83
|
+
value: unknown,
|
|
84
|
+
term: string,
|
|
85
|
+
originalContext: unknown,
|
|
86
|
+
repairedContext: unknown,
|
|
87
|
+
parentType: unknown,
|
|
88
|
+
typeContext: unknown,
|
|
89
|
+
contextLoader: DocumentLoader | undefined,
|
|
90
|
+
): Promise<{ value: unknown } | undefined> {
|
|
91
|
+
if (Array.isArray(value)) {
|
|
92
|
+
const result: unknown[] = [];
|
|
93
|
+
for (const item of value) {
|
|
94
|
+
const rewritten = await isolateJsonLdSibling(
|
|
95
|
+
item, term, originalContext, repairedContext, parentType, typeContext,
|
|
96
|
+
contextLoader,
|
|
97
|
+
);
|
|
98
|
+
if (rewritten === undefined) return undefined;
|
|
99
|
+
result.push(rewritten.value);
|
|
100
|
+
}
|
|
101
|
+
return { value: result };
|
|
102
|
+
}
|
|
103
|
+
if (value === null) return { value };
|
|
104
|
+
if (typeof value === "string") {
|
|
105
|
+
// These references were checked against the original term's @type:@id.
|
|
106
|
+
// Resolve compact IRIs and @base before removing their enclosing context.
|
|
107
|
+
const expanded = await jsonld.expand(
|
|
108
|
+
{ "@context": originalContext, type: parentType, "@id": value },
|
|
109
|
+
{ documentLoader: contextLoader, keepFreeFloatingNodes: true },
|
|
110
|
+
);
|
|
111
|
+
return { value: { "@context": { id: "@id" }, id: expanded[0]["@id"] } };
|
|
112
|
+
}
|
|
113
|
+
if (typeof value !== "object" ||
|
|
114
|
+
globalThis.Object.hasOwn(value, "@context")) return { value };
|
|
115
|
+
|
|
116
|
+
// Comparing equal-shaped wrappers also preserves list and graph semantics.
|
|
117
|
+
// Keep already independent expanded sources exactly as received: adding a
|
|
118
|
+
// context to a signed source can invalidate its JSON canonicalization proof.
|
|
119
|
+
const original = await jsonld.expand(
|
|
120
|
+
{ "@context": originalContext, type: parentType, [term]: value },
|
|
121
|
+
{ documentLoader: contextLoader },
|
|
122
|
+
);
|
|
123
|
+
const repaired = await jsonld.expand(
|
|
124
|
+
{ "@context": repairedContext, type: parentType, [term]: value },
|
|
125
|
+
{ documentLoader: contextLoader },
|
|
126
|
+
);
|
|
127
|
+
if (equalJsonLdValues(original, repaired)) return { value };
|
|
128
|
+
const restorationContexts = [originalContext];
|
|
129
|
+
if (typeContext !== undefined) {
|
|
130
|
+
restorationContexts.push([
|
|
131
|
+
...(Array.isArray(originalContext) ? originalContext : [originalContext]),
|
|
132
|
+
...(Array.isArray(typeContext) ? typeContext : [typeContext]),
|
|
133
|
+
]);
|
|
134
|
+
}
|
|
135
|
+
for (const context of restorationContexts) {
|
|
136
|
+
const restored = { ...value, "@context": context };
|
|
137
|
+
const expanded = await jsonld.expand(
|
|
138
|
+
{ "@context": repairedContext, type: parentType, [term]: restored },
|
|
139
|
+
{ documentLoader: contextLoader },
|
|
140
|
+
);
|
|
141
|
+
if (equalJsonLdValues(original, expanded)) return { value: restored };
|
|
142
|
+
}
|
|
143
|
+
// If neither context preserves the inherited meaning, keep the whole term
|
|
144
|
+
// unchanged rather than committing only some of its sibling rewrites.
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function copyJsonLdTermDefinition(mapping: Record<string, unknown>): Record<string, unknown> {
|
|
149
|
+
const definition: Record<string, unknown> = {};
|
|
150
|
+
for (const keyword of [
|
|
151
|
+
"@id", "@type", "@container", "@language", "@direction", "@index",
|
|
152
|
+
"@nest", "@prefix",
|
|
153
|
+
]) {
|
|
154
|
+
if (!globalThis.Object.hasOwn(mapping, keyword)) continue;
|
|
155
|
+
const value = mapping[keyword];
|
|
156
|
+
definition[keyword] = Array.isArray(value)
|
|
157
|
+
? value.length === 1 && keyword === "@container" ? value[0] : [...value]
|
|
158
|
+
: value;
|
|
159
|
+
}
|
|
160
|
+
// The processor stores the semantic @prefix flag under an internal name.
|
|
161
|
+
if (mapping._prefix === true) definition["@prefix"] = true;
|
|
162
|
+
return definition;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async function isolateJsonLdContexts(
|
|
166
|
+
result: Record<string, unknown>,
|
|
167
|
+
terms: readonly string[],
|
|
168
|
+
contextLoader: DocumentLoader | undefined,
|
|
169
|
+
): Promise<Record<string, unknown>> {
|
|
170
|
+
const candidates = terms.filter(term =>
|
|
171
|
+
globalThis.Object.hasOwn(result, term) && hasJsonLdContext(result[term])
|
|
172
|
+
);
|
|
173
|
+
if (candidates.length === 0) return result;
|
|
174
|
+
|
|
175
|
+
const originalContext = result["@context"];
|
|
176
|
+
const contexts = Array.isArray(originalContext)
|
|
177
|
+
? originalContext
|
|
178
|
+
: [originalContext];
|
|
179
|
+
let activeContext = await jsonld.processContext(
|
|
180
|
+
await jsonld.processContext({}, null),
|
|
181
|
+
originalContext,
|
|
182
|
+
{ documentLoader: contextLoader },
|
|
183
|
+
);
|
|
184
|
+
const parentType = result.type;
|
|
185
|
+
const typeMapping = typeof parentType === "string" &&
|
|
186
|
+
jsonld.getContextValue(activeContext, "type", "@id") === "@type"
|
|
187
|
+
? jsonld.getContextValue(activeContext, parentType) as
|
|
188
|
+
Record<string, unknown> | null
|
|
189
|
+
: null;
|
|
190
|
+
const typeContext = typeMapping?.["@context"];
|
|
191
|
+
if (typeContext !== undefined) {
|
|
192
|
+
// A protected type definition cannot receive an augmented scoped context.
|
|
193
|
+
// Leave that existing boundary unchanged, just as for protected properties.
|
|
194
|
+
if (typeMapping!.protected === true) return result;
|
|
195
|
+
activeContext = await jsonld.processContext(
|
|
196
|
+
activeContext, typeContext, { documentLoader: contextLoader },
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function repairContext(definitions: Record<string, unknown>): unknown[] {
|
|
201
|
+
if (typeContext === undefined) return [...contexts, definitions];
|
|
202
|
+
// Preserve an object scope's @propagate semantics: replacing it with an
|
|
203
|
+
// array would change how the published context algorithm handles the flag.
|
|
204
|
+
const scopedContext = typeContext !== null && typeof typeContext === "object" &&
|
|
205
|
+
!Array.isArray(typeContext)
|
|
206
|
+
? { ...typeContext, ...definitions }
|
|
207
|
+
: [...(Array.isArray(typeContext) ? typeContext : [typeContext]), definitions];
|
|
208
|
+
return [...contexts, {
|
|
209
|
+
[parentType as string]: {
|
|
210
|
+
...copyJsonLdTermDefinition(typeMapping!), "@context": scopedContext,
|
|
211
|
+
},
|
|
212
|
+
}];
|
|
213
|
+
}
|
|
214
|
+
let definitions: Record<string, unknown> = {};
|
|
215
|
+
let siblings: Record<string, unknown> = {};
|
|
216
|
+
for (const term of candidates) {
|
|
217
|
+
const mapping = jsonld.getContextValue(activeContext, term) as
|
|
218
|
+
Record<string, unknown> | null;
|
|
219
|
+
if (mapping == null || mapping.protected === true || mapping.reverse === true ||
|
|
220
|
+
globalThis.Object.hasOwn(mapping, "@context") ||
|
|
221
|
+
mapping["@type"] === "@json" || typeof mapping["@id"] !== "string" ||
|
|
222
|
+
mapping["@id"].startsWith("@")) continue;
|
|
223
|
+
|
|
224
|
+
// A scalar scoped reset does not override protected definitions in the
|
|
225
|
+
// published expansion algorithm. Check the entire property before making
|
|
226
|
+
// any changes; supported URL references receive their own local context.
|
|
227
|
+
if (!hasSupportedJsonLdScalars(result[term], mapping["@type"] === "@id")) {
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
const definition = copyJsonLdTermDefinition(mapping);
|
|
231
|
+
definition["@context"] = null;
|
|
232
|
+
if (typeContext !== null && typeof typeContext === "object" &&
|
|
233
|
+
!Array.isArray(typeContext) &&
|
|
234
|
+
(typeContext as Record<string, unknown>)["@protected"] === true) {
|
|
235
|
+
definition["@protected"] = false;
|
|
236
|
+
}
|
|
237
|
+
const proposedDefinitions = { ...definitions, [term]: definition };
|
|
238
|
+
const repairedContext = repairContext(proposedDefinitions);
|
|
239
|
+
const rewritten = await isolateJsonLdSibling(
|
|
240
|
+
result[term], term, originalContext, repairedContext, parentType, typeContext,
|
|
241
|
+
contextLoader,
|
|
242
|
+
);
|
|
243
|
+
if (rewritten === undefined) continue;
|
|
244
|
+
definitions = proposedDefinitions;
|
|
245
|
+
siblings = { ...siblings, [term]: rewritten.value };
|
|
246
|
+
}
|
|
247
|
+
return globalThis.Object.keys(definitions).length === 0
|
|
248
|
+
? result
|
|
249
|
+
: { ...result, ...siblings, "@context": repairContext(definitions) };
|
|
250
|
+
}
|
|
50
251
|
/** Describes an object of any kind. The Object type serves as the base type for
|
|
51
252
|
* most of the other kinds of objects defined in the Activity Vocabulary,
|
|
52
253
|
* including other Core types such as {@link Activity},
|
|
@@ -8175,6 +8376,10 @@ get urls(): ((URL | Link))[] {
|
|
|
8175
8376
|
};
|
|
8176
8377
|
|
|
8177
8378
|
if (options.format == null && this.isCompactable()) {
|
|
8379
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
8380
|
+
options._fromSuperclass === true;
|
|
8381
|
+
options = { ...options };
|
|
8382
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
8178
8383
|
const result: Record<string, unknown> = {};
|
|
8179
8384
|
// deno-lint-ignore no-unused-vars
|
|
8180
8385
|
let compactItems: unknown[];
|
|
@@ -8839,7 +9044,11 @@ get urls(): ((URL | Link))[] {
|
|
|
8839
9044
|
result["type"] = "Object";
|
|
8840
9045
|
if (this.id != null) result["id"] = this.id.href;
|
|
8841
9046
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1",{"fedibird":"http://fedibird.com/ns#","sensitive":"as:sensitive","emojiReactions":{"@id":"fedibird:emojiReactions","@type":"@id"}}];
|
|
8842
|
-
return result
|
|
9047
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
9048
|
+
result,
|
|
9049
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
9050
|
+
options.contextLoader,
|
|
9051
|
+
);
|
|
8843
9052
|
}
|
|
8844
9053
|
|
|
8845
9054
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -11889,11 +12098,17 @@ proofs?: (DataIntegrityProof | URL)[];}
|
|
|
11889
12098
|
};
|
|
11890
12099
|
|
|
11891
12100
|
if (options.format == null && this.isCompactable()) {
|
|
12101
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
12102
|
+
options._fromSuperclass === true;
|
|
12103
|
+
options = { ...options };
|
|
12104
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
11892
12105
|
|
|
11893
12106
|
const result = await super.toJsonLd({
|
|
11894
12107
|
...options,
|
|
11895
12108
|
format: undefined,
|
|
11896
12109
|
context: undefined,
|
|
12110
|
+
// @ts-ignore: an internal option
|
|
12111
|
+
_fromSuperclass: true,
|
|
11897
12112
|
}) as Record<string, unknown>;
|
|
11898
12113
|
|
|
11899
12114
|
// deno-lint-ignore no-unused-vars
|
|
@@ -11902,7 +12117,11 @@ proofs?: (DataIntegrityProof | URL)[];}
|
|
|
11902
12117
|
result["type"] = "Emoji";
|
|
11903
12118
|
if (this.id != null) result["id"] = this.id.href;
|
|
11904
12119
|
result["@context"] = ["https://www.w3.org/ns/activitystreams",{"toot":"http://joinmastodon.org/ns#","Emoji":"toot:Emoji"}];
|
|
11905
|
-
return result
|
|
12120
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
12121
|
+
result,
|
|
12122
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
12123
|
+
options.contextLoader,
|
|
12124
|
+
);
|
|
11906
12125
|
}
|
|
11907
12126
|
|
|
11908
12127
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -12288,11 +12507,17 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
|
|
|
12288
12507
|
};
|
|
12289
12508
|
|
|
12290
12509
|
if (options.format == null && this.isCompactable()) {
|
|
12510
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
12511
|
+
options._fromSuperclass === true;
|
|
12512
|
+
options = { ...options };
|
|
12513
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
12291
12514
|
|
|
12292
12515
|
const result = await super.toJsonLd({
|
|
12293
12516
|
...options,
|
|
12294
12517
|
format: undefined,
|
|
12295
12518
|
context: undefined,
|
|
12519
|
+
// @ts-ignore: an internal option
|
|
12520
|
+
_fromSuperclass: true,
|
|
12296
12521
|
}) as Record<string, unknown>;
|
|
12297
12522
|
|
|
12298
12523
|
// deno-lint-ignore no-unused-vars
|
|
@@ -12327,7 +12552,11 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
|
|
|
12327
12552
|
result["type"] = "ChatMessage";
|
|
12328
12553
|
if (this.id != null) result["id"] = this.id.href;
|
|
12329
12554
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1",{"toot":"http://joinmastodon.org/ns#","misskey":"https://misskey-hub.net/ns#","fedibird":"http://fedibird.com/ns#","Emoji":"toot:Emoji","ChatMessage":"http://litepub.social/ns#ChatMessage","quoteUrl":"as:quoteUrl","_misskey_quote":"misskey:_misskey_quote","quoteUri":"fedibird:quoteUri","emojiReactions":{"@id":"fedibird:emojiReactions","@type":"@id"}}];
|
|
12330
|
-
return result
|
|
12555
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
12556
|
+
result,
|
|
12557
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
12558
|
+
options.contextLoader,
|
|
12559
|
+
);
|
|
12331
12560
|
}
|
|
12332
12561
|
|
|
12333
12562
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -16711,6 +16940,10 @@ name?: string | LanguageString | null;value?: string | LanguageString | null;}
|
|
|
16711
16940
|
};
|
|
16712
16941
|
|
|
16713
16942
|
if (options.format == null && this.isCompactable()) {
|
|
16943
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
16944
|
+
options._fromSuperclass === true;
|
|
16945
|
+
options = { ...options };
|
|
16946
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
16714
16947
|
const result: Record<string, unknown> = {};
|
|
16715
16948
|
// deno-lint-ignore no-unused-vars
|
|
16716
16949
|
let compactItems: unknown[];
|
|
@@ -16756,7 +16989,11 @@ name?: string | LanguageString | null;value?: string | LanguageString | null;}
|
|
|
16756
16989
|
result["type"] = "PropertyValue";
|
|
16757
16990
|
if (this.id != null) result["id"] = this.id.href;
|
|
16758
16991
|
result["@context"] = ["https://www.w3.org/ns/activitystreams",{"schema":"http://schema.org#","PropertyValue":"schema:PropertyValue","value":"schema:value"}];
|
|
16759
|
-
return result
|
|
16992
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
16993
|
+
result,
|
|
16994
|
+
[],
|
|
16995
|
+
options.contextLoader,
|
|
16996
|
+
);
|
|
16760
16997
|
}
|
|
16761
16998
|
|
|
16762
16999
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -19539,6 +19776,10 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi
|
|
|
19539
19776
|
};
|
|
19540
19777
|
|
|
19541
19778
|
if (options.format == null && this.isCompactable()) {
|
|
19779
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
19780
|
+
options._fromSuperclass === true;
|
|
19781
|
+
options = { ...options };
|
|
19782
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
19542
19783
|
const result: Record<string, unknown> = {};
|
|
19543
19784
|
// deno-lint-ignore no-unused-vars
|
|
19544
19785
|
let compactItems: unknown[];
|
|
@@ -19598,7 +19839,11 @@ owner?: Application | Group | Organization | Person | Service | URL | null;publi
|
|
|
19598
19839
|
result["type"] = "CryptographicKey";
|
|
19599
19840
|
if (this.id != null) result["id"] = this.id.href;
|
|
19600
19841
|
result["@context"] = "https://w3id.org/security/v1";
|
|
19601
|
-
return result
|
|
19842
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
19843
|
+
result,
|
|
19844
|
+
["owner"],
|
|
19845
|
+
options.contextLoader,
|
|
19846
|
+
);
|
|
19602
19847
|
}
|
|
19603
19848
|
|
|
19604
19849
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -20464,6 +20709,10 @@ controller?: Application | Group | Organization | Person | Service | URL | null;
|
|
|
20464
20709
|
};
|
|
20465
20710
|
|
|
20466
20711
|
if (options.format == null && this.isCompactable()) {
|
|
20712
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
20713
|
+
options._fromSuperclass === true;
|
|
20714
|
+
options = { ...options };
|
|
20715
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
20467
20716
|
const result: Record<string, unknown> = {};
|
|
20468
20717
|
// deno-lint-ignore no-unused-vars
|
|
20469
20718
|
let compactItems: unknown[];
|
|
@@ -20523,7 +20772,11 @@ controller?: Application | Group | Organization | Person | Service | URL | null;
|
|
|
20523
20772
|
result["type"] = "Multikey";
|
|
20524
20773
|
if (this.id != null) result["id"] = this.id.href;
|
|
20525
20774
|
result["@context"] = "https://w3id.org/security/multikey/v1";
|
|
20526
|
-
return result
|
|
20775
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
20776
|
+
result,
|
|
20777
|
+
["controller"],
|
|
20778
|
+
options.contextLoader,
|
|
20779
|
+
);
|
|
20527
20780
|
}
|
|
20528
20781
|
|
|
20529
20782
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -26567,11 +26820,17 @@ get preferredUsernames(): ((string | LanguageString))[] {
|
|
|
26567
26820
|
};
|
|
26568
26821
|
|
|
26569
26822
|
if (options.format == null && this.isCompactable()) {
|
|
26823
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
26824
|
+
options._fromSuperclass === true;
|
|
26825
|
+
options = { ...options };
|
|
26826
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
26570
26827
|
|
|
26571
26828
|
const result = await super.toJsonLd({
|
|
26572
26829
|
...options,
|
|
26573
26830
|
format: undefined,
|
|
26574
26831
|
context: undefined,
|
|
26832
|
+
// @ts-ignore: an internal option
|
|
26833
|
+
_fromSuperclass: true,
|
|
26575
26834
|
}) as Record<string, unknown>;
|
|
26576
26835
|
|
|
26577
26836
|
// deno-lint-ignore no-unused-vars
|
|
@@ -27031,7 +27290,11 @@ get preferredUsernames(): ((string | LanguageString))[] {
|
|
|
27031
27290
|
result["type"] = "Application";
|
|
27032
27291
|
if (this.id != null) result["id"] = this.id.href;
|
|
27033
27292
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1","https://w3id.org/security/data-integrity/v1","https://www.w3.org/ns/did/v1","https://w3id.org/security/multikey/v1",{"alsoKnownAs":{"@id":"as:alsoKnownAs","@type":"@id"},"manuallyApprovesFollowers":"as:manuallyApprovesFollowers","movedTo":{"@id":"as:movedTo","@type":"@id"},"toot":"http://joinmastodon.org/ns#","Emoji":"toot:Emoji","featured":{"@id":"toot:featured","@type":"@id"},"featuredTags":{"@id":"toot:featuredTags","@type":"@id"},"discoverable":"toot:discoverable","suspended":"toot:suspended","memorial":"toot:memorial","indexable":"toot:indexable","schema":"http://schema.org#","PropertyValue":"schema:PropertyValue","value":"schema:value","misskey":"https://misskey-hub.net/ns#","_misskey_followedMessage":"misskey:_misskey_followedMessage","isCat":"misskey:isCat"}];
|
|
27034
|
-
return result
|
|
27293
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
27294
|
+
result,
|
|
27295
|
+
["publicKey","assertionMethod","inbox","outbox","following","followers","liked","featured","featuredTags","streams","endpoints","movedTo","alsoKnownAs","service","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
27296
|
+
options.contextLoader,
|
|
27297
|
+
);
|
|
27035
27298
|
}
|
|
27036
27299
|
|
|
27037
27300
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -29722,11 +29985,17 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
|
|
|
29722
29985
|
};
|
|
29723
29986
|
|
|
29724
29987
|
if (options.format == null && this.isCompactable()) {
|
|
29988
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
29989
|
+
options._fromSuperclass === true;
|
|
29990
|
+
options = { ...options };
|
|
29991
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
29725
29992
|
|
|
29726
29993
|
const result = await super.toJsonLd({
|
|
29727
29994
|
...options,
|
|
29728
29995
|
format: undefined,
|
|
29729
29996
|
context: undefined,
|
|
29997
|
+
// @ts-ignore: an internal option
|
|
29998
|
+
_fromSuperclass: true,
|
|
29730
29999
|
}) as Record<string, unknown>;
|
|
29731
30000
|
|
|
29732
30001
|
// deno-lint-ignore no-unused-vars
|
|
@@ -29761,7 +30030,11 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
|
|
|
29761
30030
|
result["type"] = "Article";
|
|
29762
30031
|
if (this.id != null) result["id"] = this.id.href;
|
|
29763
30032
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1",{"toot":"http://joinmastodon.org/ns#","misskey":"https://misskey-hub.net/ns#","fedibird":"http://fedibird.com/ns#","sensitive":"as:sensitive","Emoji":"toot:Emoji","Hashtag":"as:Hashtag","quoteUrl":"as:quoteUrl","_misskey_quote":"misskey:_misskey_quote","quoteUri":"fedibird:quoteUri","emojiReactions":{"@id":"fedibird:emojiReactions","@type":"@id"}}];
|
|
29764
|
-
return result
|
|
30033
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
30034
|
+
result,
|
|
30035
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
30036
|
+
options.contextLoader,
|
|
30037
|
+
);
|
|
29765
30038
|
}
|
|
29766
30039
|
|
|
29767
30040
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -30256,11 +30529,17 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
|
|
|
30256
30529
|
};
|
|
30257
30530
|
|
|
30258
30531
|
if (options.format == null && this.isCompactable()) {
|
|
30532
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
30533
|
+
options._fromSuperclass === true;
|
|
30534
|
+
options = { ...options };
|
|
30535
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
30259
30536
|
|
|
30260
30537
|
const result = await super.toJsonLd({
|
|
30261
30538
|
...options,
|
|
30262
30539
|
format: undefined,
|
|
30263
30540
|
context: undefined,
|
|
30541
|
+
// @ts-ignore: an internal option
|
|
30542
|
+
_fromSuperclass: true,
|
|
30264
30543
|
}) as Record<string, unknown>;
|
|
30265
30544
|
|
|
30266
30545
|
// deno-lint-ignore no-unused-vars
|
|
@@ -30301,7 +30580,11 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
|
|
|
30301
30580
|
result["type"] = "Document";
|
|
30302
30581
|
if (this.id != null) result["id"] = this.id.href;
|
|
30303
30582
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1"];
|
|
30304
|
-
return result
|
|
30583
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
30584
|
+
result,
|
|
30585
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
30586
|
+
options.contextLoader,
|
|
30587
|
+
);
|
|
30305
30588
|
}
|
|
30306
30589
|
|
|
30307
30590
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -30772,11 +31055,17 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
|
|
|
30772
31055
|
};
|
|
30773
31056
|
|
|
30774
31057
|
if (options.format == null && this.isCompactable()) {
|
|
31058
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
31059
|
+
options._fromSuperclass === true;
|
|
31060
|
+
options = { ...options };
|
|
31061
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
30775
31062
|
|
|
30776
31063
|
const result = await super.toJsonLd({
|
|
30777
31064
|
...options,
|
|
30778
31065
|
format: undefined,
|
|
30779
31066
|
context: undefined,
|
|
31067
|
+
// @ts-ignore: an internal option
|
|
31068
|
+
_fromSuperclass: true,
|
|
30780
31069
|
}) as Record<string, unknown>;
|
|
30781
31070
|
|
|
30782
31071
|
// deno-lint-ignore no-unused-vars
|
|
@@ -30785,7 +31074,11 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
|
|
|
30785
31074
|
result["type"] = "Audio";
|
|
30786
31075
|
if (this.id != null) result["id"] = this.id.href;
|
|
30787
31076
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1"];
|
|
30788
|
-
return result
|
|
31077
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
31078
|
+
result,
|
|
31079
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
31080
|
+
options.contextLoader,
|
|
31081
|
+
);
|
|
30789
31082
|
}
|
|
30790
31083
|
|
|
30791
31084
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -34916,11 +35209,17 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
|
|
|
34916
35209
|
};
|
|
34917
35210
|
|
|
34918
35211
|
if (options.format == null && this.isCompactable()) {
|
|
35212
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
35213
|
+
options._fromSuperclass === true;
|
|
35214
|
+
options = { ...options };
|
|
35215
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
34919
35216
|
|
|
34920
35217
|
const result = await super.toJsonLd({
|
|
34921
35218
|
...options,
|
|
34922
35219
|
format: undefined,
|
|
34923
35220
|
context: undefined,
|
|
35221
|
+
// @ts-ignore: an internal option
|
|
35222
|
+
_fromSuperclass: true,
|
|
34924
35223
|
}) as Record<string, unknown>;
|
|
34925
35224
|
|
|
34926
35225
|
// deno-lint-ignore no-unused-vars
|
|
@@ -35189,7 +35488,11 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
|
|
|
35189
35488
|
result["type"] = "Collection";
|
|
35190
35489
|
if (this.id != null) result["id"] = this.id.href;
|
|
35191
35490
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1",{"toot":"http://joinmastodon.org/ns#","misskey":"https://misskey-hub.net/ns#","fedibird":"http://fedibird.com/ns#","ChatMessage":"http://litepub.social/ns#ChatMessage","sensitive":"as:sensitive","votersCount":"toot:votersCount","Emoji":"toot:Emoji","Hashtag":"as:Hashtag","quoteUrl":"as:quoteUrl","_misskey_quote":"misskey:_misskey_quote","quoteUri":"fedibird:quoteUri","emojiReactions":{"@id":"fedibird:emojiReactions","@type":"@id"}}];
|
|
35192
|
-
return result
|
|
35491
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
35492
|
+
result,
|
|
35493
|
+
["current","first","last","items","likesOf","sharesOf","repliesOf","inboxOf","outboxOf","followersOf","followingOf","likedOf","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
35494
|
+
options.contextLoader,
|
|
35495
|
+
);
|
|
35193
35496
|
}
|
|
35194
35497
|
|
|
35195
35498
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -37258,11 +37561,17 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
|
|
|
37258
37561
|
};
|
|
37259
37562
|
|
|
37260
37563
|
if (options.format == null && this.isCompactable()) {
|
|
37564
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
37565
|
+
options._fromSuperclass === true;
|
|
37566
|
+
options = { ...options };
|
|
37567
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
37261
37568
|
|
|
37262
37569
|
const result = await super.toJsonLd({
|
|
37263
37570
|
...options,
|
|
37264
37571
|
format: undefined,
|
|
37265
37572
|
context: undefined,
|
|
37573
|
+
// @ts-ignore: an internal option
|
|
37574
|
+
_fromSuperclass: true,
|
|
37266
37575
|
}) as Record<string, unknown>;
|
|
37267
37576
|
|
|
37268
37577
|
// deno-lint-ignore no-unused-vars
|
|
@@ -37331,7 +37640,11 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
|
|
|
37331
37640
|
result["type"] = "CollectionPage";
|
|
37332
37641
|
if (this.id != null) result["id"] = this.id.href;
|
|
37333
37642
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1",{"toot":"http://joinmastodon.org/ns#","misskey":"https://misskey-hub.net/ns#","fedibird":"http://fedibird.com/ns#","ChatMessage":"http://litepub.social/ns#ChatMessage","sensitive":"as:sensitive","votersCount":"toot:votersCount","Emoji":"toot:Emoji","Hashtag":"as:Hashtag","quoteUrl":"as:quoteUrl","_misskey_quote":"misskey:_misskey_quote","quoteUri":"fedibird:quoteUri","emojiReactions":{"@id":"fedibird:emojiReactions","@type":"@id"}}];
|
|
37334
|
-
return result
|
|
37643
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
37644
|
+
result,
|
|
37645
|
+
["partOf","next","prev","current","first","last","items","likesOf","sharesOf","repliesOf","inboxOf","outboxOf","followersOf","followingOf","likedOf","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
37646
|
+
options.contextLoader,
|
|
37647
|
+
);
|
|
37335
37648
|
}
|
|
37336
37649
|
|
|
37337
37650
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -39225,6 +39538,10 @@ proxyUrl?: URL | null;oauthAuthorizationEndpoint?: URL | null;oauthTokenEndpoint
|
|
|
39225
39538
|
};
|
|
39226
39539
|
|
|
39227
39540
|
if (options.format == null && this.isCompactable()) {
|
|
39541
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
39542
|
+
options._fromSuperclass === true;
|
|
39543
|
+
options = { ...options };
|
|
39544
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
39228
39545
|
const result: Record<string, unknown> = {};
|
|
39229
39546
|
// deno-lint-ignore no-unused-vars
|
|
39230
39547
|
let compactItems: unknown[];
|
|
@@ -39328,7 +39645,11 @@ proxyUrl?: URL | null;oauthAuthorizationEndpoint?: URL | null;oauthTokenEndpoint
|
|
|
39328
39645
|
result["type"] = "as:Endpoints";
|
|
39329
39646
|
if (this.id != null) result["id"] = this.id.href;
|
|
39330
39647
|
result["@context"] = "https://www.w3.org/ns/activitystreams";
|
|
39331
|
-
return result
|
|
39648
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
39649
|
+
result,
|
|
39650
|
+
[],
|
|
39651
|
+
options.contextLoader,
|
|
39652
|
+
);
|
|
39332
39653
|
}
|
|
39333
39654
|
|
|
39334
39655
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -40092,11 +40413,17 @@ proofs?: (DataIntegrityProof | URL)[];}
|
|
|
40092
40413
|
};
|
|
40093
40414
|
|
|
40094
40415
|
if (options.format == null && this.isCompactable()) {
|
|
40416
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
40417
|
+
options._fromSuperclass === true;
|
|
40418
|
+
options = { ...options };
|
|
40419
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
40095
40420
|
|
|
40096
40421
|
const result = await super.toJsonLd({
|
|
40097
40422
|
...options,
|
|
40098
40423
|
format: undefined,
|
|
40099
40424
|
context: undefined,
|
|
40425
|
+
// @ts-ignore: an internal option
|
|
40426
|
+
_fromSuperclass: true,
|
|
40100
40427
|
}) as Record<string, unknown>;
|
|
40101
40428
|
|
|
40102
40429
|
// deno-lint-ignore no-unused-vars
|
|
@@ -40105,7 +40432,11 @@ proofs?: (DataIntegrityProof | URL)[];}
|
|
|
40105
40432
|
result["type"] = "Event";
|
|
40106
40433
|
if (this.id != null) result["id"] = this.id.href;
|
|
40107
40434
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1"];
|
|
40108
|
-
return result
|
|
40435
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
40436
|
+
result,
|
|
40437
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
40438
|
+
options.contextLoader,
|
|
40439
|
+
);
|
|
40109
40440
|
}
|
|
40110
40441
|
|
|
40111
40442
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -45656,11 +45987,17 @@ get preferredUsernames(): ((string | LanguageString))[] {
|
|
|
45656
45987
|
};
|
|
45657
45988
|
|
|
45658
45989
|
if (options.format == null && this.isCompactable()) {
|
|
45990
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
45991
|
+
options._fromSuperclass === true;
|
|
45992
|
+
options = { ...options };
|
|
45993
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
45659
45994
|
|
|
45660
45995
|
const result = await super.toJsonLd({
|
|
45661
45996
|
...options,
|
|
45662
45997
|
format: undefined,
|
|
45663
45998
|
context: undefined,
|
|
45999
|
+
// @ts-ignore: an internal option
|
|
46000
|
+
_fromSuperclass: true,
|
|
45664
46001
|
}) as Record<string, unknown>;
|
|
45665
46002
|
|
|
45666
46003
|
// deno-lint-ignore no-unused-vars
|
|
@@ -46120,7 +46457,11 @@ get preferredUsernames(): ((string | LanguageString))[] {
|
|
|
46120
46457
|
result["type"] = "Group";
|
|
46121
46458
|
if (this.id != null) result["id"] = this.id.href;
|
|
46122
46459
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1","https://w3id.org/security/data-integrity/v1","https://www.w3.org/ns/did/v1","https://w3id.org/security/multikey/v1",{"alsoKnownAs":{"@id":"as:alsoKnownAs","@type":"@id"},"manuallyApprovesFollowers":"as:manuallyApprovesFollowers","movedTo":{"@id":"as:movedTo","@type":"@id"},"toot":"http://joinmastodon.org/ns#","Emoji":"toot:Emoji","featured":{"@id":"toot:featured","@type":"@id"},"featuredTags":{"@id":"toot:featuredTags","@type":"@id"},"discoverable":"toot:discoverable","suspended":"toot:suspended","memorial":"toot:memorial","indexable":"toot:indexable","schema":"http://schema.org#","PropertyValue":"schema:PropertyValue","value":"schema:value","misskey":"https://misskey-hub.net/ns#","_misskey_followedMessage":"misskey:_misskey_followedMessage","isCat":"misskey:isCat"}];
|
|
46123
|
-
return result
|
|
46460
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
46461
|
+
result,
|
|
46462
|
+
["publicKey","assertionMethod","inbox","outbox","following","followers","liked","featured","featuredTags","streams","endpoints","movedTo","alsoKnownAs","service","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
46463
|
+
options.contextLoader,
|
|
46464
|
+
);
|
|
46124
46465
|
}
|
|
46125
46466
|
|
|
46126
46467
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -48812,6 +49153,10 @@ get names(): ((string | LanguageString))[] {
|
|
|
48812
49153
|
};
|
|
48813
49154
|
|
|
48814
49155
|
if (options.format == null && this.isCompactable()) {
|
|
49156
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
49157
|
+
options._fromSuperclass === true;
|
|
49158
|
+
options = { ...options };
|
|
49159
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
48815
49160
|
const result: Record<string, unknown> = {};
|
|
48816
49161
|
// deno-lint-ignore no-unused-vars
|
|
48817
49162
|
let compactItems: unknown[];
|
|
@@ -48958,7 +49303,11 @@ get names(): ((string | LanguageString))[] {
|
|
|
48958
49303
|
result["type"] = "Link";
|
|
48959
49304
|
if (this.id != null) result["id"] = this.id.href;
|
|
48960
49305
|
result["@context"] = "https://www.w3.org/ns/activitystreams";
|
|
48961
|
-
return result
|
|
49306
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
49307
|
+
result,
|
|
49308
|
+
["preview"],
|
|
49309
|
+
options.contextLoader,
|
|
49310
|
+
);
|
|
48962
49311
|
}
|
|
48963
49312
|
|
|
48964
49313
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -49812,11 +50161,17 @@ names?: ((string | LanguageString))[];language?: Intl.Locale | null;height?: num
|
|
|
49812
50161
|
};
|
|
49813
50162
|
|
|
49814
50163
|
if (options.format == null && this.isCompactable()) {
|
|
50164
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
50165
|
+
options._fromSuperclass === true;
|
|
50166
|
+
options = { ...options };
|
|
50167
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
49815
50168
|
|
|
49816
50169
|
const result = await super.toJsonLd({
|
|
49817
50170
|
...options,
|
|
49818
50171
|
format: undefined,
|
|
49819
50172
|
context: undefined,
|
|
50173
|
+
// @ts-ignore: an internal option
|
|
50174
|
+
_fromSuperclass: true,
|
|
49820
50175
|
}) as Record<string, unknown>;
|
|
49821
50176
|
|
|
49822
50177
|
// deno-lint-ignore no-unused-vars
|
|
@@ -49825,7 +50180,11 @@ names?: ((string | LanguageString))[];language?: Intl.Locale | null;height?: num
|
|
|
49825
50180
|
result["type"] = "Hashtag";
|
|
49826
50181
|
if (this.id != null) result["id"] = this.id.href;
|
|
49827
50182
|
result["@context"] = ["https://www.w3.org/ns/activitystreams",{"Hashtag":"as:Hashtag"}];
|
|
49828
|
-
return result
|
|
50183
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
50184
|
+
result,
|
|
50185
|
+
["preview"],
|
|
50186
|
+
options.contextLoader,
|
|
50187
|
+
);
|
|
49829
50188
|
}
|
|
49830
50189
|
|
|
49831
50190
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -50145,11 +50504,17 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
|
|
|
50145
50504
|
};
|
|
50146
50505
|
|
|
50147
50506
|
if (options.format == null && this.isCompactable()) {
|
|
50507
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
50508
|
+
options._fromSuperclass === true;
|
|
50509
|
+
options = { ...options };
|
|
50510
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
50148
50511
|
|
|
50149
50512
|
const result = await super.toJsonLd({
|
|
50150
50513
|
...options,
|
|
50151
50514
|
format: undefined,
|
|
50152
50515
|
context: undefined,
|
|
50516
|
+
// @ts-ignore: an internal option
|
|
50517
|
+
_fromSuperclass: true,
|
|
50153
50518
|
}) as Record<string, unknown>;
|
|
50154
50519
|
|
|
50155
50520
|
// deno-lint-ignore no-unused-vars
|
|
@@ -50158,7 +50523,11 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
|
|
|
50158
50523
|
result["type"] = "Image";
|
|
50159
50524
|
if (this.id != null) result["id"] = this.id.href;
|
|
50160
50525
|
result["@context"] = "https://www.w3.org/ns/activitystreams";
|
|
50161
|
-
return result
|
|
50526
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
50527
|
+
result,
|
|
50528
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
50529
|
+
options.contextLoader,
|
|
50530
|
+
);
|
|
50162
50531
|
}
|
|
50163
50532
|
|
|
50164
50533
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -52510,11 +52879,17 @@ names?: ((string | LanguageString))[];language?: Intl.Locale | null;height?: num
|
|
|
52510
52879
|
};
|
|
52511
52880
|
|
|
52512
52881
|
if (options.format == null && this.isCompactable()) {
|
|
52882
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
52883
|
+
options._fromSuperclass === true;
|
|
52884
|
+
options = { ...options };
|
|
52885
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
52513
52886
|
|
|
52514
52887
|
const result = await super.toJsonLd({
|
|
52515
52888
|
...options,
|
|
52516
52889
|
format: undefined,
|
|
52517
52890
|
context: undefined,
|
|
52891
|
+
// @ts-ignore: an internal option
|
|
52892
|
+
_fromSuperclass: true,
|
|
52518
52893
|
}) as Record<string, unknown>;
|
|
52519
52894
|
|
|
52520
52895
|
// deno-lint-ignore no-unused-vars
|
|
@@ -52523,7 +52898,11 @@ names?: ((string | LanguageString))[];language?: Intl.Locale | null;height?: num
|
|
|
52523
52898
|
result["type"] = "Mention";
|
|
52524
52899
|
if (this.id != null) result["id"] = this.id.href;
|
|
52525
52900
|
result["@context"] = "https://www.w3.org/ns/activitystreams";
|
|
52526
|
-
return result
|
|
52901
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
52902
|
+
result,
|
|
52903
|
+
["preview"],
|
|
52904
|
+
options.contextLoader,
|
|
52905
|
+
);
|
|
52527
52906
|
}
|
|
52528
52907
|
|
|
52529
52908
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -53237,11 +53616,17 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
|
|
|
53237
53616
|
};
|
|
53238
53617
|
|
|
53239
53618
|
if (options.format == null && this.isCompactable()) {
|
|
53619
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
53620
|
+
options._fromSuperclass === true;
|
|
53621
|
+
options = { ...options };
|
|
53622
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
53240
53623
|
|
|
53241
53624
|
const result = await super.toJsonLd({
|
|
53242
53625
|
...options,
|
|
53243
53626
|
format: undefined,
|
|
53244
53627
|
context: undefined,
|
|
53628
|
+
// @ts-ignore: an internal option
|
|
53629
|
+
_fromSuperclass: true,
|
|
53245
53630
|
}) as Record<string, unknown>;
|
|
53246
53631
|
|
|
53247
53632
|
// deno-lint-ignore no-unused-vars
|
|
@@ -53276,7 +53661,11 @@ proofs?: (DataIntegrityProof | URL)[];quoteUrl?: URL | null;}
|
|
|
53276
53661
|
result["type"] = "Note";
|
|
53277
53662
|
if (this.id != null) result["id"] = this.id.href;
|
|
53278
53663
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1",{"toot":"http://joinmastodon.org/ns#","misskey":"https://misskey-hub.net/ns#","fedibird":"http://fedibird.com/ns#","sensitive":"as:sensitive","Emoji":"toot:Emoji","Hashtag":"as:Hashtag","quoteUrl":"as:quoteUrl","_misskey_quote":"misskey:_misskey_quote","quoteUri":"fedibird:quoteUri","emojiReactions":{"@id":"fedibird:emojiReactions","@type":"@id"}}];
|
|
53279
|
-
return result
|
|
53664
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
53665
|
+
result,
|
|
53666
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
53667
|
+
options.contextLoader,
|
|
53668
|
+
);
|
|
53280
53669
|
}
|
|
53281
53670
|
|
|
53282
53671
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -53967,11 +54356,17 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
|
|
|
53967
54356
|
};
|
|
53968
54357
|
|
|
53969
54358
|
if (options.format == null && this.isCompactable()) {
|
|
54359
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
54360
|
+
options._fromSuperclass === true;
|
|
54361
|
+
options = { ...options };
|
|
54362
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
53970
54363
|
|
|
53971
54364
|
const result = await super.toJsonLd({
|
|
53972
54365
|
...options,
|
|
53973
54366
|
format: undefined,
|
|
53974
54367
|
context: undefined,
|
|
54368
|
+
// @ts-ignore: an internal option
|
|
54369
|
+
_fromSuperclass: true,
|
|
53975
54370
|
}) as Record<string, unknown>;
|
|
53976
54371
|
delete result["items"];
|
|
53977
54372
|
// deno-lint-ignore no-unused-vars
|
|
@@ -54001,7 +54396,11 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
|
|
|
54001
54396
|
result["type"] = "OrderedCollection";
|
|
54002
54397
|
if (this.id != null) result["id"] = this.id.href;
|
|
54003
54398
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1",{"toot":"http://joinmastodon.org/ns#","misskey":"https://misskey-hub.net/ns#","fedibird":"http://fedibird.com/ns#","ChatMessage":"http://litepub.social/ns#ChatMessage","sensitive":"as:sensitive","votersCount":"toot:votersCount","Emoji":"toot:Emoji","Hashtag":"as:Hashtag","quoteUrl":"as:quoteUrl","_misskey_quote":"misskey:_misskey_quote","quoteUri":"fedibird:quoteUri","emojiReactions":{"@id":"fedibird:emojiReactions","@type":"@id"}}];
|
|
54004
|
-
return result
|
|
54399
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
54400
|
+
result,
|
|
54401
|
+
["orderedItems","current","first","last","items","likesOf","sharesOf","repliesOf","inboxOf","outboxOf","followersOf","followingOf","likedOf","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
54402
|
+
options.contextLoader,
|
|
54403
|
+
);
|
|
54005
54404
|
}
|
|
54006
54405
|
|
|
54007
54406
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -54743,11 +55142,17 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
|
|
|
54743
55142
|
};
|
|
54744
55143
|
|
|
54745
55144
|
if (options.format == null && this.isCompactable()) {
|
|
55145
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
55146
|
+
options._fromSuperclass === true;
|
|
55147
|
+
options = { ...options };
|
|
55148
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
54746
55149
|
|
|
54747
55150
|
const result = await super.toJsonLd({
|
|
54748
55151
|
...options,
|
|
54749
55152
|
format: undefined,
|
|
54750
55153
|
context: undefined,
|
|
55154
|
+
// @ts-ignore: an internal option
|
|
55155
|
+
_fromSuperclass: true,
|
|
54751
55156
|
}) as Record<string, unknown>;
|
|
54752
55157
|
delete result["items"];
|
|
54753
55158
|
// deno-lint-ignore no-unused-vars
|
|
@@ -54793,7 +55198,11 @@ proofs?: (DataIntegrityProof | URL)[];totalItems?: number | null;current?: Colle
|
|
|
54793
55198
|
result["type"] = "OrderedCollectionPage";
|
|
54794
55199
|
if (this.id != null) result["id"] = this.id.href;
|
|
54795
55200
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1",{"toot":"http://joinmastodon.org/ns#","misskey":"https://misskey-hub.net/ns#","fedibird":"http://fedibird.com/ns#","ChatMessage":"http://litepub.social/ns#ChatMessage","sensitive":"as:sensitive","votersCount":"toot:votersCount","Emoji":"toot:Emoji","Hashtag":"as:Hashtag","quoteUrl":"as:quoteUrl","_misskey_quote":"misskey:_misskey_quote","quoteUri":"fedibird:quoteUri","emojiReactions":{"@id":"fedibird:emojiReactions","@type":"@id"}}];
|
|
54796
|
-
return result
|
|
55201
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
55202
|
+
result,
|
|
55203
|
+
["orderedItems","partOf","next","prev","current","first","last","items","likesOf","sharesOf","repliesOf","inboxOf","outboxOf","followersOf","followingOf","likedOf","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
55204
|
+
options.contextLoader,
|
|
55205
|
+
);
|
|
54797
55206
|
}
|
|
54798
55207
|
|
|
54799
55208
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -59809,11 +60218,17 @@ get preferredUsernames(): ((string | LanguageString))[] {
|
|
|
59809
60218
|
};
|
|
59810
60219
|
|
|
59811
60220
|
if (options.format == null && this.isCompactable()) {
|
|
60221
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
60222
|
+
options._fromSuperclass === true;
|
|
60223
|
+
options = { ...options };
|
|
60224
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
59812
60225
|
|
|
59813
60226
|
const result = await super.toJsonLd({
|
|
59814
60227
|
...options,
|
|
59815
60228
|
format: undefined,
|
|
59816
60229
|
context: undefined,
|
|
60230
|
+
// @ts-ignore: an internal option
|
|
60231
|
+
_fromSuperclass: true,
|
|
59817
60232
|
}) as Record<string, unknown>;
|
|
59818
60233
|
|
|
59819
60234
|
// deno-lint-ignore no-unused-vars
|
|
@@ -60273,7 +60688,11 @@ get preferredUsernames(): ((string | LanguageString))[] {
|
|
|
60273
60688
|
result["type"] = "Organization";
|
|
60274
60689
|
if (this.id != null) result["id"] = this.id.href;
|
|
60275
60690
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1","https://w3id.org/security/data-integrity/v1","https://www.w3.org/ns/did/v1","https://w3id.org/security/multikey/v1",{"alsoKnownAs":{"@id":"as:alsoKnownAs","@type":"@id"},"manuallyApprovesFollowers":"as:manuallyApprovesFollowers","movedTo":{"@id":"as:movedTo","@type":"@id"},"toot":"http://joinmastodon.org/ns#","Emoji":"toot:Emoji","featured":{"@id":"toot:featured","@type":"@id"},"featuredTags":{"@id":"toot:featuredTags","@type":"@id"},"discoverable":"toot:discoverable","suspended":"toot:suspended","memorial":"toot:memorial","indexable":"toot:indexable","schema":"http://schema.org#","PropertyValue":"schema:PropertyValue","value":"schema:value","misskey":"https://misskey-hub.net/ns#","_misskey_followedMessage":"misskey:_misskey_followedMessage","isCat":"misskey:isCat"}];
|
|
60276
|
-
return result
|
|
60691
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
60692
|
+
result,
|
|
60693
|
+
["publicKey","assertionMethod","inbox","outbox","following","followers","liked","featured","featuredTags","streams","endpoints","movedTo","alsoKnownAs","service","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
60694
|
+
options.contextLoader,
|
|
60695
|
+
);
|
|
60277
60696
|
}
|
|
60278
60697
|
|
|
60279
60698
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -62218,11 +62637,17 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
|
|
|
62218
62637
|
};
|
|
62219
62638
|
|
|
62220
62639
|
if (options.format == null && this.isCompactable()) {
|
|
62640
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
62641
|
+
options._fromSuperclass === true;
|
|
62642
|
+
options = { ...options };
|
|
62643
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
62221
62644
|
|
|
62222
62645
|
const result = await super.toJsonLd({
|
|
62223
62646
|
...options,
|
|
62224
62647
|
format: undefined,
|
|
62225
62648
|
context: undefined,
|
|
62649
|
+
// @ts-ignore: an internal option
|
|
62650
|
+
_fromSuperclass: true,
|
|
62226
62651
|
}) as Record<string, unknown>;
|
|
62227
62652
|
|
|
62228
62653
|
// deno-lint-ignore no-unused-vars
|
|
@@ -62231,7 +62656,11 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
|
|
|
62231
62656
|
result["type"] = "Page";
|
|
62232
62657
|
if (this.id != null) result["id"] = this.id.href;
|
|
62233
62658
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1"];
|
|
62234
|
-
return result
|
|
62659
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
62660
|
+
result,
|
|
62661
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
62662
|
+
options.contextLoader,
|
|
62663
|
+
);
|
|
62235
62664
|
}
|
|
62236
62665
|
|
|
62237
62666
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -67097,11 +67526,17 @@ get preferredUsernames(): ((string | LanguageString))[] {
|
|
|
67097
67526
|
};
|
|
67098
67527
|
|
|
67099
67528
|
if (options.format == null && this.isCompactable()) {
|
|
67529
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
67530
|
+
options._fromSuperclass === true;
|
|
67531
|
+
options = { ...options };
|
|
67532
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
67100
67533
|
|
|
67101
67534
|
const result = await super.toJsonLd({
|
|
67102
67535
|
...options,
|
|
67103
67536
|
format: undefined,
|
|
67104
67537
|
context: undefined,
|
|
67538
|
+
// @ts-ignore: an internal option
|
|
67539
|
+
_fromSuperclass: true,
|
|
67105
67540
|
}) as Record<string, unknown>;
|
|
67106
67541
|
|
|
67107
67542
|
// deno-lint-ignore no-unused-vars
|
|
@@ -67561,7 +67996,11 @@ get preferredUsernames(): ((string | LanguageString))[] {
|
|
|
67561
67996
|
result["type"] = "Person";
|
|
67562
67997
|
if (this.id != null) result["id"] = this.id.href;
|
|
67563
67998
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1","https://w3id.org/security/data-integrity/v1","https://www.w3.org/ns/did/v1","https://w3id.org/security/multikey/v1",{"alsoKnownAs":{"@id":"as:alsoKnownAs","@type":"@id"},"manuallyApprovesFollowers":"as:manuallyApprovesFollowers","movedTo":{"@id":"as:movedTo","@type":"@id"},"toot":"http://joinmastodon.org/ns#","Emoji":"toot:Emoji","featured":{"@id":"toot:featured","@type":"@id"},"featuredTags":{"@id":"toot:featuredTags","@type":"@id"},"discoverable":"toot:discoverable","suspended":"toot:suspended","memorial":"toot:memorial","indexable":"toot:indexable","schema":"http://schema.org#","PropertyValue":"schema:PropertyValue","value":"schema:value","misskey":"https://misskey-hub.net/ns#","_misskey_followedMessage":"misskey:_misskey_followedMessage","isCat":"misskey:isCat"}];
|
|
67564
|
-
return result
|
|
67999
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
68000
|
+
result,
|
|
68001
|
+
["publicKey","assertionMethod","inbox","outbox","following","followers","liked","featured","featuredTags","streams","endpoints","movedTo","alsoKnownAs","service","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
68002
|
+
options.contextLoader,
|
|
68003
|
+
);
|
|
67565
68004
|
}
|
|
67566
68005
|
|
|
67567
68006
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -69761,11 +70200,17 @@ proofs?: (DataIntegrityProof | URL)[];accuracy?: number | null;altitude?: number
|
|
|
69761
70200
|
};
|
|
69762
70201
|
|
|
69763
70202
|
if (options.format == null && this.isCompactable()) {
|
|
70203
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
70204
|
+
options._fromSuperclass === true;
|
|
70205
|
+
options = { ...options };
|
|
70206
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
69764
70207
|
|
|
69765
70208
|
const result = await super.toJsonLd({
|
|
69766
70209
|
...options,
|
|
69767
70210
|
format: undefined,
|
|
69768
70211
|
context: undefined,
|
|
70212
|
+
// @ts-ignore: an internal option
|
|
70213
|
+
_fromSuperclass: true,
|
|
69769
70214
|
}) as Record<string, unknown>;
|
|
69770
70215
|
|
|
69771
70216
|
// deno-lint-ignore no-unused-vars
|
|
@@ -69870,7 +70315,11 @@ proofs?: (DataIntegrityProof | URL)[];accuracy?: number | null;altitude?: number
|
|
|
69870
70315
|
result["type"] = "Place";
|
|
69871
70316
|
if (this.id != null) result["id"] = this.id.href;
|
|
69872
70317
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1"];
|
|
69873
|
-
return result
|
|
70318
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
70319
|
+
result,
|
|
70320
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
70321
|
+
options.contextLoader,
|
|
70322
|
+
);
|
|
69874
70323
|
}
|
|
69875
70324
|
|
|
69876
70325
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -70852,11 +71301,17 @@ proofs?: (DataIntegrityProof | URL)[];describes?: Object | URL | null;}
|
|
|
70852
71301
|
};
|
|
70853
71302
|
|
|
70854
71303
|
if (options.format == null && this.isCompactable()) {
|
|
71304
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
71305
|
+
options._fromSuperclass === true;
|
|
71306
|
+
options = { ...options };
|
|
71307
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
70855
71308
|
|
|
70856
71309
|
const result = await super.toJsonLd({
|
|
70857
71310
|
...options,
|
|
70858
71311
|
format: undefined,
|
|
70859
71312
|
context: undefined,
|
|
71313
|
+
// @ts-ignore: an internal option
|
|
71314
|
+
_fromSuperclass: true,
|
|
70860
71315
|
}) as Record<string, unknown>;
|
|
70861
71316
|
|
|
70862
71317
|
// deno-lint-ignore no-unused-vars
|
|
@@ -70885,7 +71340,11 @@ proofs?: (DataIntegrityProof | URL)[];describes?: Object | URL | null;}
|
|
|
70885
71340
|
result["type"] = "Profile";
|
|
70886
71341
|
if (this.id != null) result["id"] = this.id.href;
|
|
70887
71342
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1"];
|
|
70888
|
-
return result
|
|
71343
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
71344
|
+
result,
|
|
71345
|
+
["describes","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
71346
|
+
options.contextLoader,
|
|
71347
|
+
);
|
|
70889
71348
|
}
|
|
70890
71349
|
|
|
70891
71350
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -74461,11 +74920,17 @@ relationships?: (Object | URL)[];}
|
|
|
74461
74920
|
};
|
|
74462
74921
|
|
|
74463
74922
|
if (options.format == null && this.isCompactable()) {
|
|
74923
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
74924
|
+
options._fromSuperclass === true;
|
|
74925
|
+
options = { ...options };
|
|
74926
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
74464
74927
|
|
|
74465
74928
|
const result = await super.toJsonLd({
|
|
74466
74929
|
...options,
|
|
74467
74930
|
format: undefined,
|
|
74468
74931
|
context: undefined,
|
|
74932
|
+
// @ts-ignore: an internal option
|
|
74933
|
+
_fromSuperclass: true,
|
|
74469
74934
|
}) as Record<string, unknown>;
|
|
74470
74935
|
|
|
74471
74936
|
// deno-lint-ignore no-unused-vars
|
|
@@ -74534,7 +74999,11 @@ relationships?: (Object | URL)[];}
|
|
|
74534
74999
|
result["type"] = "Relationship";
|
|
74535
75000
|
if (this.id != null) result["id"] = this.id.href;
|
|
74536
75001
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1"];
|
|
74537
|
-
return result
|
|
75002
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
75003
|
+
result,
|
|
75004
|
+
["subject","object","relationship","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
75005
|
+
options.contextLoader,
|
|
75006
|
+
);
|
|
74538
75007
|
}
|
|
74539
75008
|
|
|
74540
75009
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -79975,11 +80444,17 @@ get preferredUsernames(): ((string | LanguageString))[] {
|
|
|
79975
80444
|
};
|
|
79976
80445
|
|
|
79977
80446
|
if (options.format == null && this.isCompactable()) {
|
|
80447
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
80448
|
+
options._fromSuperclass === true;
|
|
80449
|
+
options = { ...options };
|
|
80450
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
79978
80451
|
|
|
79979
80452
|
const result = await super.toJsonLd({
|
|
79980
80453
|
...options,
|
|
79981
80454
|
format: undefined,
|
|
79982
80455
|
context: undefined,
|
|
80456
|
+
// @ts-ignore: an internal option
|
|
80457
|
+
_fromSuperclass: true,
|
|
79983
80458
|
}) as Record<string, unknown>;
|
|
79984
80459
|
|
|
79985
80460
|
// deno-lint-ignore no-unused-vars
|
|
@@ -80439,7 +80914,11 @@ get preferredUsernames(): ((string | LanguageString))[] {
|
|
|
80439
80914
|
result["type"] = "Service";
|
|
80440
80915
|
if (this.id != null) result["id"] = this.id.href;
|
|
80441
80916
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/v1","https://w3id.org/security/data-integrity/v1","https://www.w3.org/ns/did/v1","https://w3id.org/security/multikey/v1",{"alsoKnownAs":{"@id":"as:alsoKnownAs","@type":"@id"},"manuallyApprovesFollowers":"as:manuallyApprovesFollowers","movedTo":{"@id":"as:movedTo","@type":"@id"},"toot":"http://joinmastodon.org/ns#","Emoji":"toot:Emoji","featured":{"@id":"toot:featured","@type":"@id"},"featuredTags":{"@id":"toot:featuredTags","@type":"@id"},"discoverable":"toot:discoverable","suspended":"toot:suspended","memorial":"toot:memorial","indexable":"toot:indexable","schema":"http://schema.org#","PropertyValue":"schema:PropertyValue","value":"schema:value","misskey":"https://misskey-hub.net/ns#","_misskey_followedMessage":"misskey:_misskey_followedMessage","isCat":"misskey:isCat"}];
|
|
80442
|
-
return result
|
|
80917
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
80918
|
+
result,
|
|
80919
|
+
["publicKey","assertionMethod","inbox","outbox","following","followers","liked","featured","featuredTags","streams","endpoints","movedTo","alsoKnownAs","service","attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
80920
|
+
options.contextLoader,
|
|
80921
|
+
);
|
|
80443
80922
|
}
|
|
80444
80923
|
|
|
80445
80924
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -82567,6 +83046,10 @@ get contents(): ((string | LanguageString))[] {
|
|
|
82567
83046
|
};
|
|
82568
83047
|
|
|
82569
83048
|
if (options.format == null && this.isCompactable()) {
|
|
83049
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
83050
|
+
options._fromSuperclass === true;
|
|
83051
|
+
options = { ...options };
|
|
83052
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
82570
83053
|
const result: Record<string, unknown> = {};
|
|
82571
83054
|
// deno-lint-ignore no-unused-vars
|
|
82572
83055
|
let compactItems: unknown[];
|
|
@@ -82609,7 +83092,11 @@ get contents(): ((string | LanguageString))[] {
|
|
|
82609
83092
|
result["type"] = "as:Source";
|
|
82610
83093
|
if (this.id != null) result["id"] = this.id.href;
|
|
82611
83094
|
result["@context"] = "https://www.w3.org/ns/activitystreams";
|
|
82612
|
-
return result
|
|
83095
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
83096
|
+
result,
|
|
83097
|
+
[],
|
|
83098
|
+
options.contextLoader,
|
|
83099
|
+
);
|
|
82613
83100
|
}
|
|
82614
83101
|
|
|
82615
83102
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -83797,11 +84284,17 @@ proofs?: (DataIntegrityProof | URL)[];deleted?: Temporal.Instant | null;}
|
|
|
83797
84284
|
};
|
|
83798
84285
|
|
|
83799
84286
|
if (options.format == null && this.isCompactable()) {
|
|
84287
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
84288
|
+
options._fromSuperclass === true;
|
|
84289
|
+
options = { ...options };
|
|
84290
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
83800
84291
|
|
|
83801
84292
|
const result = await super.toJsonLd({
|
|
83802
84293
|
...options,
|
|
83803
84294
|
format: undefined,
|
|
83804
84295
|
context: undefined,
|
|
84296
|
+
// @ts-ignore: an internal option
|
|
84297
|
+
_fromSuperclass: true,
|
|
83805
84298
|
}) as Record<string, unknown>;
|
|
83806
84299
|
|
|
83807
84300
|
// deno-lint-ignore no-unused-vars
|
|
@@ -83826,7 +84319,11 @@ proofs?: (DataIntegrityProof | URL)[];deleted?: Temporal.Instant | null;}
|
|
|
83826
84319
|
result["type"] = "Tombstone";
|
|
83827
84320
|
if (this.id != null) result["id"] = this.id.href;
|
|
83828
84321
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1"];
|
|
83829
|
-
return result
|
|
84322
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
84323
|
+
result,
|
|
84324
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
84325
|
+
options.contextLoader,
|
|
84326
|
+
);
|
|
83830
84327
|
}
|
|
83831
84328
|
|
|
83832
84329
|
// deno-lint-ignore no-unused-vars prefer-const
|
|
@@ -85252,11 +85749,17 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
|
|
|
85252
85749
|
};
|
|
85253
85750
|
|
|
85254
85751
|
if (options.format == null && this.isCompactable()) {
|
|
85752
|
+
const fromSuperclass = "_fromSuperclass" in options &&
|
|
85753
|
+
options._fromSuperclass === true;
|
|
85754
|
+
options = { ...options };
|
|
85755
|
+
if ("_fromSuperclass" in options) delete options._fromSuperclass;
|
|
85255
85756
|
|
|
85256
85757
|
const result = await super.toJsonLd({
|
|
85257
85758
|
...options,
|
|
85258
85759
|
format: undefined,
|
|
85259
85760
|
context: undefined,
|
|
85761
|
+
// @ts-ignore: an internal option
|
|
85762
|
+
_fromSuperclass: true,
|
|
85260
85763
|
}) as Record<string, unknown>;
|
|
85261
85764
|
|
|
85262
85765
|
// deno-lint-ignore no-unused-vars
|
|
@@ -85265,7 +85768,11 @@ proofs?: (DataIntegrityProof | URL)[];width?: number | null;height?: number | nu
|
|
|
85265
85768
|
result["type"] = "Video";
|
|
85266
85769
|
if (this.id != null) result["id"] = this.id.href;
|
|
85267
85770
|
result["@context"] = ["https://www.w3.org/ns/activitystreams","https://w3id.org/security/data-integrity/v1"];
|
|
85268
|
-
return result
|
|
85771
|
+
return fromSuperclass ? result : await isolateJsonLdContexts(
|
|
85772
|
+
result,
|
|
85773
|
+
["attachment","attributedTo","audience","context","generator","icon","image","inReplyTo","location","preview","replies","shares","likes","emojiReactions","tag","url","to","bto","cc","bcc","source","proof"],
|
|
85774
|
+
options.contextLoader,
|
|
85775
|
+
);
|
|
85269
85776
|
}
|
|
85270
85777
|
|
|
85271
85778
|
// deno-lint-ignore no-unused-vars prefer-const
|