Skip to content

Commit 473fce5

Browse files
committed
fix
1 parent 38b4473 commit 473fce5

41 files changed

Lines changed: 11 additions & 6004 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/studio/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"@objectstack/service-analytics": "workspace:*",
4646
"@objectstack/service-automation": "workspace:*",
4747
"@objectstack/service-feed": "workspace:*",
48-
"@objectstack/service-tenant": "workspace:*",
4948
"@objectstack/spec": "workspace:*",
5049
"@radix-ui/react-avatar": "^1.1.11",
5150
"@radix-ui/react-checkbox": "^1.3.3",

packages/core/src/contracts/http-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface IHttpResponse {
4747
* Send a text/html response
4848
* @param data - Data to send
4949
*/
50-
send(data: string): void | Promise<void>;
50+
send(data: string | Uint8Array | ArrayBuffer): void | Promise<void>;
5151

5252
/**
5353
* Set HTTP status code

packages/plugins/plugin-hono-server/src/adapter.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,14 @@ export class HonoHttpServer implements IHttpServer {
111111

112112
const res = {
113113
json: (data: any) => { capturedResponse = c.json(data); },
114-
send: (data: string) => { capturedResponse = c.html(data); },
114+
send: (data: string | Uint8Array | ArrayBuffer | Buffer) => {
115+
if (data instanceof Uint8Array || data instanceof ArrayBuffer || (typeof Buffer !== 'undefined' && Buffer.isBuffer?.(data))) {
116+
const body = data instanceof ArrayBuffer ? data : (data as Uint8Array).buffer.slice((data as Uint8Array).byteOffset, (data as Uint8Array).byteOffset + (data as Uint8Array).byteLength);
117+
capturedResponse = c.body(body as ArrayBuffer);
118+
} else {
119+
capturedResponse = c.html(data as string);
120+
}
121+
},
115122
status: (code: number) => { c.status(code); return res; },
116123
header: (name: string, value: string) => {
117124
c.header(name, value);

packages/services/service-storage/src/storage-routes.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,7 @@ export function registerStorageRoutes(
479479

480480
res.header('content-type', payload.ct ?? 'application/octet-stream');
481481
res.header('content-length', String(data.byteLength));
482-
// IHttpResponse only has json/send — use send with binary encoding
483-
// This works for Hono adapter since send passes through
484-
(res as any).send(data);
482+
res.send(data);
485483
} catch (err: any) {
486484
const statusCode = err.message?.includes('expired') || err.message?.includes('signature') ? 403 : 500;
487485
res.status(statusCode).json({ error: err.message ?? 'Download failed' });

packages/services/service-tenant/CHANGELOG.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

packages/services/service-tenant/README.md

Lines changed: 0 additions & 256 deletions
This file was deleted.

0 commit comments

Comments
 (0)