@qilin-agent/host-preview-media 3.1.6 → 3.1.7

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.
Files changed (2) hide show
  1. package/lib/index.js +4 -4
  2. package/package.json +3 -3
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.effect(() => ctx.webServer.register({
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
- }), `preview-media: GET/HEAD ${PREVIEW_MEDIA_PATH}`);
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.effect(() => ctx.webServer.register({
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
- }), `preview-media: PUT ${PREVIEW_MEDIA_PATH}/upload`);
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.6",
4
+ "version": "3.1.7",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -36,9 +36,9 @@
36
36
  "@qilin-agent/kylin": "~4.0.5"
37
37
  },
38
38
  "devDependencies": {
39
- "@qilin-agent/kylin": "~4.0.5",
40
39
  "@qilin-agent/kylin-plugin-loader": "~1.0.6",
41
- "@qilin-agent/host-webserver": "3.1.6"
40
+ "@qilin-agent/kylin": "~4.0.5",
41
+ "@qilin-agent/host-webserver": "3.1.7"
42
42
  },
43
43
  "scripts": {
44
44
  "bundle": "tsdown",