@fedify/testing 2.4.0-dev.2071 → 2.4.0-dev.2073
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 +7 -1
- package/dist/mod.js +7 -1
- package/package.json +4 -4
package/dist/mod.cjs
CHANGED
|
@@ -39,7 +39,7 @@ const noopMeterProvider$1 = { getMeter: () => ({
|
|
|
39
39
|
removeBatchObservableCallback: () => void 0
|
|
40
40
|
}) };
|
|
41
41
|
function createContext(values) {
|
|
42
|
-
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, meterProvider, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getPortableObjectUri, getCollectionUri, getOutboxUri, getMediaUploaderUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject, traverseCollection, lookupNodeInfo, lookupWebFinger, sendActivity, routeActivity, enqueueTask, enqueueTaskMany } = values;
|
|
42
|
+
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, meterProvider, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getPortableObjectUri, getPortableInboxUri, getCollectionUri, getOutboxUri, getMediaUploaderUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject, traverseCollection, lookupNodeInfo, lookupWebFinger, sendActivity, routeActivity, enqueueTask, enqueueTaskMany } = values;
|
|
43
43
|
function throwRouterError() {
|
|
44
44
|
throw new _fedify_fedify_federation.RouterError("Not implemented");
|
|
45
45
|
}
|
|
@@ -62,6 +62,7 @@ function createContext(values) {
|
|
|
62
62
|
getActorUri: getActorUri ?? throwRouterError,
|
|
63
63
|
getObjectUri: getObjectUri ?? throwRouterError,
|
|
64
64
|
getPortableObjectUri: getPortableObjectUri ?? throwRouterError,
|
|
65
|
+
getPortableInboxUri: getPortableInboxUri ?? throwRouterError,
|
|
65
66
|
getCollectionUri: getCollectionUri ?? throwRouterError,
|
|
66
67
|
getOutboxUri: getOutboxUri ?? throwRouterError,
|
|
67
68
|
getMediaUploaderUri: getMediaUploaderUri ?? throwRouterError,
|
|
@@ -841,6 +842,11 @@ var MockContext = class MockContext {
|
|
|
841
842
|
const { pathname } = this.getObjectUri(cls, values);
|
|
842
843
|
return (0, _fedify_vocab_runtime.parseIri)(`ap+ef61://${authority}${pathname}`);
|
|
843
844
|
}
|
|
845
|
+
getPortableInboxUri(identifier, authority) {
|
|
846
|
+
if (!/^did:[a-z0-9]+:[^/?#]+$/i.test(authority)) throw new TypeError("The authority of a portable ID must be a DID without a path, query, or fragment.");
|
|
847
|
+
const { pathname } = this.getInboxUri(identifier);
|
|
848
|
+
return (0, _fedify_vocab_runtime.parseIri)(`ap+ef61://${authority}${pathname}`);
|
|
849
|
+
}
|
|
844
850
|
getOutboxUri(identifier) {
|
|
845
851
|
if (this.federation instanceof MockFederation && this.federation.outboxPath) {
|
|
846
852
|
const path = expandUriTemplate(this.federation.outboxPath, { identifier });
|
package/dist/mod.js
CHANGED
|
@@ -38,7 +38,7 @@ const noopMeterProvider$1 = { getMeter: () => ({
|
|
|
38
38
|
removeBatchObservableCallback: () => void 0
|
|
39
39
|
}) };
|
|
40
40
|
function createContext(values) {
|
|
41
|
-
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, meterProvider, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getPortableObjectUri, getCollectionUri, getOutboxUri, getMediaUploaderUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger, sendActivity, routeActivity, enqueueTask, enqueueTaskMany } = values;
|
|
41
|
+
const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, meterProvider, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getPortableObjectUri, getPortableInboxUri, getCollectionUri, getOutboxUri, getMediaUploaderUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger, sendActivity, routeActivity, enqueueTask, enqueueTaskMany } = values;
|
|
42
42
|
function throwRouterError() {
|
|
43
43
|
throw new RouterError("Not implemented");
|
|
44
44
|
}
|
|
@@ -61,6 +61,7 @@ function createContext(values) {
|
|
|
61
61
|
getActorUri: getActorUri ?? throwRouterError,
|
|
62
62
|
getObjectUri: getObjectUri ?? throwRouterError,
|
|
63
63
|
getPortableObjectUri: getPortableObjectUri ?? throwRouterError,
|
|
64
|
+
getPortableInboxUri: getPortableInboxUri ?? throwRouterError,
|
|
64
65
|
getCollectionUri: getCollectionUri ?? throwRouterError,
|
|
65
66
|
getOutboxUri: getOutboxUri ?? throwRouterError,
|
|
66
67
|
getMediaUploaderUri: getMediaUploaderUri ?? throwRouterError,
|
|
@@ -840,6 +841,11 @@ var MockContext = class MockContext {
|
|
|
840
841
|
const { pathname } = this.getObjectUri(cls, values);
|
|
841
842
|
return parseIri(`ap+ef61://${authority}${pathname}`);
|
|
842
843
|
}
|
|
844
|
+
getPortableInboxUri(identifier, authority) {
|
|
845
|
+
if (!/^did:[a-z0-9]+:[^/?#]+$/i.test(authority)) throw new TypeError("The authority of a portable ID must be a DID without a path, query, or fragment.");
|
|
846
|
+
const { pathname } = this.getInboxUri(identifier);
|
|
847
|
+
return parseIri(`ap+ef61://${authority}${pathname}`);
|
|
848
|
+
}
|
|
843
849
|
getOutboxUri(identifier) {
|
|
844
850
|
if (this.federation instanceof MockFederation && this.federation.outboxPath) {
|
|
845
851
|
const path = expandUriTemplate(this.federation.outboxPath, { identifier });
|
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.2073+2152dfc6",
|
|
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.2073+2152dfc6"
|
|
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.2073+2152dfc6",
|
|
56
|
+
"@fedify/vocab-runtime": "^2.4.0-dev.2073+2152dfc6"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@standard-schema/spec": "^1.1.0",
|