chore: 📦 Update all dependencies to latest version and Bun to 1.1.4

This commit is contained in:
Jesse Wierzbinski 2024-04-16 21:09:28 -10:00
parent bf0153627e
commit 0929683c51
No known key found for this signature in database
14 changed files with 4968 additions and 5567 deletions

View file

@ -1,5 +1,5 @@
# Bun doesn't run well on Musl but this seems to work # Bun doesn't run well on Musl but this seems to work
FROM imbios/bun-node:1.1.3-current-alpine as base FROM imbios/bun-node:1.1.4-current-alpine as base
RUN apk add --no-cache libstdc++ RUN apk add --no-cache libstdc++
@ -25,7 +25,7 @@ RUN bun run prod-build
WORKDIR /temp/dist WORKDIR /temp/dist
# Copy production dependencies and source code into final image # Copy production dependencies and source code into final image
FROM oven/bun:1.1.3-alpine FROM oven/bun:1.1.4-alpine
RUN apk add --no-cache libstdc++ RUN apk add --no-cache libstdc++

View file

@ -1,45 +0,0 @@
# Bun doesn't run well on Musl but this seems to work
FROM imbios/bun-node:1.1.3-current-alpine as base
# Install dependencies into temp directory
# This will cache them and speed up future builds
FROM base AS install
RUN mkdir -p /temp
COPY . /temp
WORKDIR /temp
RUN bun install --frozen-lockfile
FROM base as build
# Copy the project
RUN mkdir -p /temp
COPY . /temp
# Copy dependencies
COPY --from=install /temp/node_modules /temp/node_modules
# Build the project
WORKDIR /temp
RUN bun run prod-build
WORKDIR /temp/dist
# Copy production dependencies and source code into final image
FROM oven/bun:1.1.3-alpine
# Create app directory
RUN mkdir -p /app
COPY --from=build /temp/dist /app/dist
COPY entrypoint.sh /app
LABEL org.opencontainers.image.authors "Gaspard Wierzbinski (https://cpluspatch.dev)"
LABEL org.opencontainers.image.source "https://github.com/lysand-org/lysand"
LABEL org.opencontainers.image.vendor "Lysand Org"
LABEL org.opencontainers.image.licenses "AGPL-3.0"
LABEL org.opencontainers.image.title "Lysand Server"
LABEL org.opencontainers.image.description "Lysand Server docker image"
# CD to app
WORKDIR /app
ENV NODE_ENV=production
ENTRYPOINT [ "/bin/sh", "/app/entrypoint.sh" ]
# Run migrations and start the server
CMD [ "start" ]

BIN
bun.lockb

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,104 +1,104 @@
{ {
"version": "5", "version": "5",
"dialect": "pg", "dialect": "pg",
"entries": [ "entries": [
{ {
"idx": 0, "idx": 0,
"version": "5", "version": "5",
"when": 1712805159664, "when": 1712805159664,
"tag": "0000_illegal_living_lightning", "tag": "0000_illegal_living_lightning",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 1, "idx": 1,
"version": "5", "version": "5",
"when": 1713055774123, "when": 1713055774123,
"tag": "0001_salty_night_thrasher", "tag": "0001_salty_night_thrasher",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 2, "idx": 2,
"version": "5", "version": "5",
"when": 1713056370431, "when": 1713056370431,
"tag": "0002_stiff_ares", "tag": "0002_stiff_ares",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 3, "idx": 3,
"version": "5", "version": "5",
"when": 1713056528340, "when": 1713056528340,
"tag": "0003_spicy_arachne", "tag": "0003_spicy_arachne",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 4, "idx": 4,
"version": "5", "version": "5",
"when": 1713056712218, "when": 1713056712218,
"tag": "0004_burly_lockjaw", "tag": "0004_burly_lockjaw",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 5, "idx": 5,
"version": "5", "version": "5",
"when": 1713056917973, "when": 1713056917973,
"tag": "0005_sleepy_puma", "tag": "0005_sleepy_puma",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 6, "idx": 6,
"version": "5", "version": "5",
"when": 1713057159867, "when": 1713057159867,
"tag": "0006_messy_network", "tag": "0006_messy_network",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 7, "idx": 7,
"version": "5", "version": "5",
"when": 1713227918208, "when": 1713227918208,
"tag": "0007_naive_sleeper", "tag": "0007_naive_sleeper",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 8, "idx": 8,
"version": "5", "version": "5",
"when": 1713246700119, "when": 1713246700119,
"tag": "0008_flawless_brother_voodoo", "tag": "0008_flawless_brother_voodoo",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 9, "idx": 9,
"version": "5", "version": "5",
"when": 1713327832438, "when": 1713327832438,
"tag": "0009_easy_slyde", "tag": "0009_easy_slyde",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 10, "idx": 10,
"version": "5", "version": "5",
"when": 1713327880929, "when": 1713327880929,
"tag": "0010_daffy_frightful_four", "tag": "0010_daffy_frightful_four",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 11, "idx": 11,
"version": "5", "version": "5",
"when": 1713333611707, "when": 1713333611707,
"tag": "0011_special_the_fury", "tag": "0011_special_the_fury",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 12, "idx": 12,
"version": "5", "version": "5",
"when": 1713336108114, "when": 1713336108114,
"tag": "0012_certain_thor_girl", "tag": "0012_certain_thor_girl",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 13, "idx": 13,
"version": "5", "version": "5",
"when": 1713336611301, "when": 1713336611301,
"tag": "0013_wandering_celestials", "tag": "0013_wandering_celestials",
"breakpoints": true "breakpoints": true
} }
] ]
} }

View file

@ -56,7 +56,7 @@
"vue-demi" "vue-demi"
], ],
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.6.4", "@biomejs/biome": "^1.7.0",
"@types/cli-table": "^0.3.4", "@types/cli-table": "^0.3.4",
"@types/html-to-text": "^9.0.4", "@types/html-to-text": "^9.0.4",
"@types/ioredis": "^5.0.0", "@types/ioredis": "^5.0.0",

View file

@ -5,8 +5,8 @@ import {
getTestUsers, getTestUsers,
sendTestRequest, sendTestRequest,
} from "~tests/utils"; } from "~tests/utils";
import { meta } from "./block";
import type { Relationship as APIRelationship } from "~types/mastodon/relationship"; import type { Relationship as APIRelationship } from "~types/mastodon/relationship";
import { meta } from "./block";
await deleteOldTestUsers(); await deleteOldTestUsers();

View file

@ -5,8 +5,8 @@ import {
getTestUsers, getTestUsers,
sendTestRequest, sendTestRequest,
} from "~tests/utils"; } from "~tests/utils";
import { meta } from "./follow";
import type { Relationship as APIRelationship } from "~types/mastodon/relationship"; import type { Relationship as APIRelationship } from "~types/mastodon/relationship";
import { meta } from "./follow";
await deleteOldTestUsers(); await deleteOldTestUsers();

View file

@ -5,8 +5,8 @@ import {
getTestUsers, getTestUsers,
sendTestRequest, sendTestRequest,
} from "~tests/utils"; } from "~tests/utils";
import { meta } from "./mute";
import type { Relationship as APIRelationship } from "~types/mastodon/relationship"; import type { Relationship as APIRelationship } from "~types/mastodon/relationship";
import { meta } from "./mute";
await deleteOldTestUsers(); await deleteOldTestUsers();

View file

@ -1,5 +1,6 @@
import { afterAll, beforeAll, describe, expect, test } from "bun:test"; import { afterAll, beforeAll, describe, expect, test } from "bun:test";
import { config } from "config-manager"; import { config } from "config-manager";
import { db } from "~drizzle/db";
import { import {
deleteOldTestUsers, deleteOldTestUsers,
getTestStatuses, getTestStatuses,
@ -7,9 +8,8 @@ import {
sendTestRequest, sendTestRequest,
} from "~tests/utils"; } from "~tests/utils";
import type { Account as APIAccount } from "~types/mastodon/account"; import type { Account as APIAccount } from "~types/mastodon/account";
import { meta } from "./statuses";
import type { Status as APIStatus } from "~types/mastodon/status"; import type { Status as APIStatus } from "~types/mastodon/status";
import { db } from "~drizzle/db"; import { meta } from "./statuses";
await deleteOldTestUsers(); await deleteOldTestUsers();

View file

@ -5,8 +5,8 @@ import {
getTestUsers, getTestUsers,
sendTestRequest, sendTestRequest,
} from "~tests/utils"; } from "~tests/utils";
import { meta } from "./unmute";
import type { Relationship as APIRelationship } from "~types/mastodon/relationship"; import type { Relationship as APIRelationship } from "~types/mastodon/relationship";
import { meta } from "./unmute";
await deleteOldTestUsers(); await deleteOldTestUsers();

View file

@ -170,9 +170,9 @@ export default apiRoute<typeof meta, typeof schema>(
self self
? sql`EXISTS (SELECT 1 FROM Relationships WHERE Relationships.subjectId = ${ ? sql`EXISTS (SELECT 1 FROM Relationships WHERE Relationships.subjectId = ${
self?.id self?.id
} AND Relationships.following = ${ } AND Relationships.following = ${!!following} AND Relationships.ownerId = ${
following ? true : false user.id
} AND Relationships.ownerId = ${user.id})` })`
: undefined, : undefined,
), ),
orderBy: (user, { desc }) => desc(user.createdAt), orderBy: (user, { desc }) => desc(user.createdAt),
@ -188,9 +188,9 @@ export default apiRoute<typeof meta, typeof schema>(
self self
? sql`EXISTS (SELECT 1 FROM Relationships WHERE Relationships.subjectId = ${ ? sql`EXISTS (SELECT 1 FROM Relationships WHERE Relationships.subjectId = ${
self?.id self?.id
} AND Relationships.following = ${ } AND Relationships.following = ${!!following} AND Relationships.ownerId = ${
following ? true : false Notes.authorId
} AND Relationships.ownerId = ${Notes.authorId})` })`
: undefined, : undefined,
), ),
); );