@fedify/testing 2.5.0-dev.2440 → 2.5.0-dev.2448
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 +13 -0
- package/dist/mod.js +13 -0
- package/package.json +6 -6
package/dist/mod.cjs
CHANGED
|
@@ -192,6 +192,18 @@ async function isSignedByAudience(getSignedKeyOwner, object, isMember) {
|
|
|
192
192
|
return false;
|
|
193
193
|
}
|
|
194
194
|
/**
|
|
195
|
+
* The authentication evidence of a mock inbox context that is not given one:
|
|
196
|
+
* nothing is authenticated.
|
|
197
|
+
*/
|
|
198
|
+
const EMPTY_AUTHENTICATION = globalThis.Object.freeze({
|
|
199
|
+
verified: false,
|
|
200
|
+
requestSigners: globalThis.Object.freeze([]),
|
|
201
|
+
documentSigners: globalThis.Object.freeze([]),
|
|
202
|
+
originAuthenticated: globalThis.Object.freeze([]),
|
|
203
|
+
expandedActivity: globalThis.Object.freeze([]),
|
|
204
|
+
baseUrl: null
|
|
205
|
+
});
|
|
206
|
+
/**
|
|
195
207
|
* Creates an InboxContext for testing purposes.
|
|
196
208
|
* Not exported - used internally only. Public API is in mock.ts
|
|
197
209
|
* @param args Partial InboxContext properties
|
|
@@ -209,6 +221,7 @@ function createInboxContext(args) {
|
|
|
209
221
|
data
|
|
210
222
|
})),
|
|
211
223
|
recipient: args.recipient ?? null,
|
|
224
|
+
authentication: args.authentication ?? EMPTY_AUTHENTICATION,
|
|
212
225
|
forwardActivity
|
|
213
226
|
};
|
|
214
227
|
}
|
package/dist/mod.js
CHANGED
|
@@ -191,6 +191,18 @@ async function isSignedByAudience(getSignedKeyOwner, object, isMember) {
|
|
|
191
191
|
return false;
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
|
+
* The authentication evidence of a mock inbox context that is not given one:
|
|
195
|
+
* nothing is authenticated.
|
|
196
|
+
*/
|
|
197
|
+
const EMPTY_AUTHENTICATION = globalThis.Object.freeze({
|
|
198
|
+
verified: false,
|
|
199
|
+
requestSigners: globalThis.Object.freeze([]),
|
|
200
|
+
documentSigners: globalThis.Object.freeze([]),
|
|
201
|
+
originAuthenticated: globalThis.Object.freeze([]),
|
|
202
|
+
expandedActivity: globalThis.Object.freeze([]),
|
|
203
|
+
baseUrl: null
|
|
204
|
+
});
|
|
205
|
+
/**
|
|
194
206
|
* Creates an InboxContext for testing purposes.
|
|
195
207
|
* Not exported - used internally only. Public API is in mock.ts
|
|
196
208
|
* @param args Partial InboxContext properties
|
|
@@ -208,6 +220,7 @@ function createInboxContext(args) {
|
|
|
208
220
|
data
|
|
209
221
|
})),
|
|
210
222
|
recipient: args.recipient ?? null,
|
|
223
|
+
authentication: args.authentication ?? EMPTY_AUTHENTICATION,
|
|
211
224
|
forwardActivity
|
|
212
225
|
};
|
|
213
226
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/testing",
|
|
3
|
-
"version": "2.5.0-dev.
|
|
3
|
+
"version": "2.5.0-dev.2448+756933d0",
|
|
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.5.0-dev.
|
|
50
|
+
"@fedify/fedify": "^2.5.0-dev.2448+756933d0"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"es-toolkit": "1.46.1",
|
|
54
54
|
"temporal-polyfill": "^1.0.1",
|
|
55
|
-
"@fedify/vocab": "2.5.0-dev.
|
|
56
|
-
"@fedify/vocab-runtime": "^2.5.0-dev.
|
|
55
|
+
"@fedify/vocab": "2.5.0-dev.2448+756933d0",
|
|
56
|
+
"@fedify/vocab-runtime": "^2.5.0-dev.2448+756933d0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@standard-schema/spec": "^1.1.0",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"tsdown": "^0.22.0",
|
|
63
63
|
"typescript": "^6.0.0",
|
|
64
64
|
"@fedify/fixture": "^2.0.0",
|
|
65
|
-
"@fedify/vocab": "^2.5.0-dev.
|
|
66
|
-
"@fedify/vocab-runtime": "^2.5.0-dev.
|
|
65
|
+
"@fedify/vocab": "^2.5.0-dev.2448+756933d0",
|
|
66
|
+
"@fedify/vocab-runtime": "^2.5.0-dev.2448+756933d0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build:self": "tsdown",
|