@fedify/testing 2.4.0-dev.2103 → 2.4.0-dev.2115
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/dist/mod.cjs +6 -2
- package/dist/mod.js +7 -3
- package/package.json +4 -4
package/dist/mod.cjs
CHANGED
|
@@ -779,12 +779,16 @@ var MockContext = class MockContext {
|
|
|
779
779
|
}
|
|
780
780
|
return null;
|
|
781
781
|
}
|
|
782
|
-
async getObject(cls, values) {
|
|
782
|
+
async getObject(cls, values, options) {
|
|
783
783
|
if (this.federation instanceof MockFederation) {
|
|
784
784
|
const path = this.federation.objectPaths.get(cls.typeId.href);
|
|
785
785
|
if (path) {
|
|
786
786
|
const dispatcher = this.federation.objectDispatchers.get(path);
|
|
787
|
-
if (dispatcher)
|
|
787
|
+
if (dispatcher) {
|
|
788
|
+
const object = await dispatcher(this, values);
|
|
789
|
+
if (object instanceof _fedify_vocab.Tombstone && !(object instanceof cls) && options?.tombstone !== "passthrough") return null;
|
|
790
|
+
return object;
|
|
791
|
+
}
|
|
788
792
|
}
|
|
789
793
|
}
|
|
790
794
|
return null;
|
package/dist/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "temporal-polyfill";
|
|
2
2
|
import { hasProofLike, hasSignatureLike } from "@fedify/fedify/sig";
|
|
3
|
-
import { Activity, CryptographicKey, Multikey, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
3
|
+
import { Activity, CryptographicKey, Multikey, Tombstone, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
4
4
|
import { getFe34Origin, parseIri } from "@fedify/vocab-runtime";
|
|
5
5
|
import { RouterError } from "@fedify/fedify/federation";
|
|
6
6
|
import { delay } from "es-toolkit";
|
|
@@ -778,12 +778,16 @@ var MockContext = class MockContext {
|
|
|
778
778
|
}
|
|
779
779
|
return null;
|
|
780
780
|
}
|
|
781
|
-
async getObject(cls, values) {
|
|
781
|
+
async getObject(cls, values, options) {
|
|
782
782
|
if (this.federation instanceof MockFederation) {
|
|
783
783
|
const path = this.federation.objectPaths.get(cls.typeId.href);
|
|
784
784
|
if (path) {
|
|
785
785
|
const dispatcher = this.federation.objectDispatchers.get(path);
|
|
786
|
-
if (dispatcher)
|
|
786
|
+
if (dispatcher) {
|
|
787
|
+
const object = await dispatcher(this, values);
|
|
788
|
+
if (object instanceof Tombstone && !(object instanceof cls) && options?.tombstone !== "passthrough") return null;
|
|
789
|
+
return object;
|
|
790
|
+
}
|
|
787
791
|
}
|
|
788
792
|
}
|
|
789
793
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/testing",
|
|
3
|
-
"version": "2.4.0-dev.
|
|
3
|
+
"version": "2.4.0-dev.2115+e2feaf2b",
|
|
4
4
|
"description": "Testing utilities for Fedify applications",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fedify",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"package.json"
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@fedify/fedify": "^2.4.0-dev.
|
|
50
|
+
"@fedify/fedify": "^2.4.0-dev.2115+e2feaf2b"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"es-toolkit": "1.46.1",
|
|
54
54
|
"temporal-polyfill": "^1.0.1",
|
|
55
|
-
"@fedify/vocab": "2.4.0-dev.
|
|
56
|
-
"@fedify/vocab-runtime": "^2.4.0-dev.
|
|
55
|
+
"@fedify/vocab": "2.4.0-dev.2115+e2feaf2b",
|
|
56
|
+
"@fedify/vocab-runtime": "^2.4.0-dev.2115+e2feaf2b"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@standard-schema/spec": "^1.1.0",
|