Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- uses: denoland/setup-deno@v2
with:
deno-version: '2.6.8'
deno-version: '2.9.4'

- run: deno install --allow-scripts

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v2
with:
deno-version: '2.6.8'
deno-version: '2.9.4'
- run: deno install --allow-scripts
- name: Install Socket Firewall
uses: socketdev/action@ba6de6cc0565af1f42295590380973573297e31f
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v2
with:
deno-version: '2.6.8'
deno-version: '2.9.4'
- run: deno install --allow-scripts
- run: deno task migrate:tests
- run: deno task check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v2
with:
deno-version: '2.6.8'
deno-version: '2.9.4'
- run: deno install --allow-scripts
- name: Install Socket Firewall
uses: socketdev/action@ba6de6cc0565af1f42295590380973573297e31f
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG APP_VERSION=3.x.x
ENV APP_VERSION=$APP_VERSION
RUN APP_NAME=quack APP_VERSION=$APP_VERSION pnpm build

FROM denoland/deno:alpine-2.6.8
FROM denoland/deno:alpine-2.9.4
# WORKAROUND: Deno alpine image ships glibc-linked libs in /usr/local/lib/ that break
# apk and post-install triggers (libz, libcrypto, libzstd, libgcc_s shadow Alpine's musl libs).
# Move them aside during apk install, then restore for Deno compatibility.
Expand Down
169 changes: 166 additions & 3 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion deno/server/core/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class App {
this.core.bus.direct(userId, {
type: "message",
id: `ephemeral:${Math.random().toString(10)}`,
appId,
appId: this.appId,
ephemeral: true,
channelId: message.channelId,
parentId: message.parentId,
Expand Down
15 changes: 11 additions & 4 deletions deno/server/core/serializer.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import { EntityId } from "../types.ts";

function isPlainObject(obj: unknown): obj is Record<string, unknown> {
if (typeof obj !== "object" || obj === null) return false;
const proto = Object.getPrototypeOf(obj);
return proto === Object.prototype || proto === null;
}

function recursiveSerialize(obj: unknown): unknown {
if (obj instanceof EntityId) {
return obj.toString();
}
if (Array.isArray(obj)) {
return obj.map(recursiveSerialize);
}
if (typeof obj === "object" && obj !== null) {
const record = obj as Record<string, unknown>;
for (const key in record) {
record[key] = recursiveSerialize(record[key]);
if (isPlainObject(obj)) {
const result: Record<string, unknown> = {};
for (const key in obj) {
result[key] = recursiveSerialize(obj[key]);
}
return result;
}
return obj;
}
Expand Down
Loading
Loading