@qilin-agent/host-preview-media 3.1.6 → 3.1.8
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/lib/index.js +4 -4
- package/package.json +6 -6
package/lib/index.js
CHANGED
|
@@ -167,7 +167,7 @@ function apply(ctx, config) {
|
|
|
167
167
|
const connection = connectionOf(ctx);
|
|
168
168
|
/** The composition's rejection for one request, or undefined when admitted. */
|
|
169
169
|
const rejectionOf = (req) => connection.requestRejection(req);
|
|
170
|
-
ctx.
|
|
170
|
+
ctx.webServer.register({
|
|
171
171
|
kind: "prefix",
|
|
172
172
|
path: PREVIEW_MEDIA_PATH,
|
|
173
173
|
handler: async (req, res) => {
|
|
@@ -226,7 +226,7 @@ function apply(ctx, config) {
|
|
|
226
226
|
writeError(res, error);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
})
|
|
229
|
+
});
|
|
230
230
|
/** Buffer one request body up to a byte ceiling; the caller names its limit. */
|
|
231
231
|
const readBody = async (req, limit) => {
|
|
232
232
|
const chunks = [];
|
|
@@ -239,7 +239,7 @@ function apply(ctx, config) {
|
|
|
239
239
|
}
|
|
240
240
|
return Buffer.concat(chunks);
|
|
241
241
|
};
|
|
242
|
-
ctx.
|
|
242
|
+
ctx.webServer.register({
|
|
243
243
|
kind: "exact",
|
|
244
244
|
path: `${PREVIEW_MEDIA_PATH}/upload`,
|
|
245
245
|
handler: async (req, res) => {
|
|
@@ -275,7 +275,7 @@ function apply(ctx, config) {
|
|
|
275
275
|
writeError(res, error);
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
})
|
|
278
|
+
});
|
|
279
279
|
}
|
|
280
280
|
/** Cordis row Config schema: the media limit is a positive byte count. */
|
|
281
281
|
const Config = z.object({ mediaLimitBytes: z.number().step(1).min(1).max(2147483647).default(20 * 1024 * 1024) });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/host-preview-media",
|
|
3
3
|
"description": "Host half of preview media: the /sidebar/media route serving session-workspace files to inline previews, with HTTP Range windows for seeking video",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.8",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
],
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@qilin-agent/schemastery": "~3.18.
|
|
33
|
+
"@qilin-agent/schemastery": "~3.18.6-alpha.2"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@qilin-agent/kylin": "~4.0.
|
|
36
|
+
"@qilin-agent/kylin": "~4.0.6-alpha.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@qilin-agent/kylin": "~4.0.
|
|
40
|
-
"@qilin-agent/kylin-plugin-loader": "~1.0.
|
|
41
|
-
"@qilin-agent/host-webserver": "3.1.
|
|
39
|
+
"@qilin-agent/kylin": "~4.0.6-alpha.2",
|
|
40
|
+
"@qilin-agent/kylin-plugin-loader": "~1.0.7-alpha.2",
|
|
41
|
+
"@qilin-agent/host-webserver": "3.1.8"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"bundle": "tsdown",
|