@fedify/elysia 2.2.0-dev.613 → 2.2.0-dev.622
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/index.cjs +4 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -4
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/index.ts
|
|
3
3
|
const fedify = (federation, contextDataFactory) => {
|
|
4
|
-
return (app) => app.decorate("federation", federation).onRequest(async ({ request, set, federation
|
|
4
|
+
return (app) => app.decorate("federation", federation).onRequest(async ({ request, set, federation }) => {
|
|
5
5
|
let notFound = false;
|
|
6
6
|
let notAcceptable = false;
|
|
7
7
|
const contextData = await contextDataFactory(request);
|
|
8
|
-
const response = await federation
|
|
8
|
+
const response = await federation.fetch(request, {
|
|
9
9
|
contextData,
|
|
10
10
|
onNotFound: () => {
|
|
11
11
|
notFound = true;
|
|
@@ -32,6 +32,5 @@ const fedify = (federation, contextDataFactory) => {
|
|
|
32
32
|
}
|
|
33
33
|
}).as("global");
|
|
34
34
|
};
|
|
35
|
-
|
|
36
35
|
//#endregion
|
|
37
|
-
exports.fedify = fedify;
|
|
36
|
+
exports.fedify = fedify;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _$elysia from "elysia";
|
|
2
2
|
import { Elysia } from "elysia";
|
|
3
3
|
import { Federation } from "@fedify/fedify";
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ declare const fedify: <TContextData = unknown>(federation: Federation<TContextDa
|
|
|
15
15
|
typebox: {};
|
|
16
16
|
error: {};
|
|
17
17
|
}, {
|
|
18
|
-
schema:
|
|
18
|
+
schema: _$elysia.MergeSchema<_$elysia.MergeSchema<{}, {}, "">, {}, "">;
|
|
19
19
|
standaloneSchema: {};
|
|
20
20
|
macro: {};
|
|
21
21
|
macroFn: {};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _$elysia from "elysia";
|
|
2
2
|
import { Elysia } from "elysia";
|
|
3
3
|
import { Federation } from "@fedify/fedify";
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ declare const fedify: <TContextData = unknown>(federation: Federation<TContextDa
|
|
|
15
15
|
typebox: {};
|
|
16
16
|
error: {};
|
|
17
17
|
}, {
|
|
18
|
-
schema:
|
|
18
|
+
schema: _$elysia.MergeSchema<_$elysia.MergeSchema<{}, {}, "">, {}, "">;
|
|
19
19
|
standaloneSchema: {};
|
|
20
20
|
macro: {};
|
|
21
21
|
macroFn: {};
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
//#region src/index.ts
|
|
2
2
|
const fedify = (federation, contextDataFactory) => {
|
|
3
|
-
return (app) => app.decorate("federation", federation).onRequest(async ({ request, set, federation
|
|
3
|
+
return (app) => app.decorate("federation", federation).onRequest(async ({ request, set, federation }) => {
|
|
4
4
|
let notFound = false;
|
|
5
5
|
let notAcceptable = false;
|
|
6
6
|
const contextData = await contextDataFactory(request);
|
|
7
|
-
const response = await federation
|
|
7
|
+
const response = await federation.fetch(request, {
|
|
8
8
|
contextData,
|
|
9
9
|
onNotFound: () => {
|
|
10
10
|
notFound = true;
|
|
@@ -31,6 +31,5 @@ const fedify = (federation, contextDataFactory) => {
|
|
|
31
31
|
}
|
|
32
32
|
}).as("global");
|
|
33
33
|
};
|
|
34
|
-
|
|
35
34
|
//#endregion
|
|
36
|
-
export { fedify };
|
|
35
|
+
export { fedify };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fedify/elysia",
|
|
3
|
-
"version": "2.2.0-dev.
|
|
3
|
+
"version": "2.2.0-dev.622+e54cb037",
|
|
4
4
|
"description": "Integrate Fedify with Elysia",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Fedify",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
],
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"elysia": "^1.3.6",
|
|
50
|
-
"@fedify/fedify": "^2.2.0-dev.
|
|
50
|
+
"@fedify/fedify": "^2.2.0-dev.622+e54cb037"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"bun-types": "^1.2.19",
|
|
54
|
-
"tsdown": "^0.
|
|
55
|
-
"typescript": "^5.9.
|
|
54
|
+
"tsdown": "^0.21.6",
|
|
55
|
+
"typescript": "^5.9.2"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build:self": "tsdown",
|