From de99b23022de39edead33ce0776f3314807d83ed Mon Sep 17 00:00:00 2001 From: Priveetee Date: Tue, 8 Sep 2026 11:40:28 +0200 Subject: [PATCH 1/5] chore: bump token version to 1.8.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f2851b8..7c8c481 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typetype-token", - "version": "1.7.0", + "version": "1.8.1", "private": true, "license": "MIT", "scripts": { From b277641e4aeae2073a5aa2e9663c3d99e3eaf1d2 Mon Sep 17 00:00:00 2001 From: Priveetee Date: Tue, 8 Sep 2026 19:31:31 +0200 Subject: [PATCH 2/5] fix: preserve remote login input during browser startup --- src/remote-login-input-queue.ts | 73 ++++++++++++++++++++++++++ src/remote-login-session.ts | 57 +++----------------- tests/remote-login-input-queue.test.ts | 70 ++++++++++++++++++++++++ tests/remote-login-startup.test.ts | 59 +++++++++++++++++++++ 4 files changed, 209 insertions(+), 50 deletions(-) create mode 100644 src/remote-login-input-queue.ts create mode 100644 tests/remote-login-input-queue.test.ts create mode 100644 tests/remote-login-startup.test.ts diff --git a/src/remote-login-input-queue.ts b/src/remote-login-input-queue.ts new file mode 100644 index 0000000..eaf0cf8 --- /dev/null +++ b/src/remote-login-input-queue.ts @@ -0,0 +1,73 @@ +import type { RemoteLoginPage } from "./remote-login-browser.ts"; +import { applyRemoteLoginInput } from "./remote-login-input.ts"; +import type { RemoteLoginInput } from "./remote-login-messages.ts"; + +const MAX_INPUT_QUEUE = 128; + +export class RemoteLoginInputQueue { + private readonly pending: RemoteLoginInput[] = []; + private page: RemoteLoginPage["page"] | null = null; + private draining = false; + private closed = false; + + constructor(private readonly fail: (message: string) => void) {} + + async attach(page: RemoteLoginPage["page"]): Promise { + if (this.closed) return; + this.page = page; + await this.drain(); + } + + enqueue(message: RemoteLoginInput): void { + if (this.closed) return; + if (message.type === "cancel") { + this.close(); + this.fail("Session cancelled"); + return; + } + const last = this.pending.at(-1); + if ( + (message.type === "resize" && last?.type === "resize") || + (message.type === "pointer" && + message.event === "move" && + last?.type === "pointer" && + last.event === "move") + ) { + this.pending[this.pending.length - 1] = message; + } else { + if (this.pending.length >= MAX_INPUT_QUEUE) { + this.close(); + this.fail("Remote browser input queue exceeded"); + return; + } + this.pending.push(message); + } + void this.drain(); + } + + close(): void { + this.closed = true; + this.pending.length = 0; + this.page = null; + } + + private async drain(): Promise { + const page = this.page; + if (this.closed || this.draining || !page) return; + this.draining = true; + try { + while (!this.closed) { + const message = this.pending.shift(); + if (!message) return; + await applyRemoteLoginInput(page, message); + } + } catch { + if (!this.closed) { + this.close(); + this.fail("Remote browser input failed"); + } + } finally { + this.draining = false; + } + } +} diff --git a/src/remote-login-session.ts b/src/remote-login-session.ts index 624d91c..9fd3276 100644 --- a/src/remote-login-session.ts +++ b/src/remote-login-session.ts @@ -1,11 +1,10 @@ import type { RemoteLoginPage } from "./remote-login-browser.ts"; import { sendRemoteLoginCompletion } from "./remote-login-callback.ts"; import type { RemoteLoginConfig } from "./remote-login-config.ts"; -import { applyRemoteLoginInput } from "./remote-login-input.ts"; +import { RemoteLoginInputQueue } from "./remote-login-input-queue.ts"; import { errorMessage, parseRemoteLoginInput, - type RemoteLoginInput, type RemoteLoginPhase, statusMessage, } from "./remote-login-messages.ts"; @@ -33,8 +32,7 @@ export class RemoteLoginSession { private expiryTimer: ReturnType; private frameTimer: ReturnType | null = null; private loginTimer: ReturnType | null = null; - private readonly inputQueue: RemoteLoginInput[] = []; - private inputDrainRunning = false; + private readonly inputQueue = new RemoteLoginInputQueue((message) => this.fail(message)); constructor(options: RemoteLoginSessionOptions) { this.sessionId = options.sessionId; this.userId = options.userId; @@ -54,6 +52,8 @@ export class RemoteLoginSession { return; } this.page = page; + await this.inputQueue.attach(page.page); + if (this.closed) return; this.setPhase("awaiting_login"); this.scheduleFrames(); this.scheduleLoginCheck(); @@ -71,7 +71,7 @@ export class RemoteLoginSession { if (this.closed || typeof raw !== "string") return; const message = parseRemoteLoginInput(raw); if (!message) return; - this.enqueueInput(message); + this.inputQueue.enqueue(message); } disconnect(): void { this.fail("WebSocket disconnected"); @@ -79,48 +79,6 @@ export class RemoteLoginSession { cancel(): void { this.fail("Session cancelled"); } - private async applyInput(message: ReturnType): Promise { - if (!message) return; - const page = this.page?.page; - if (!page) return; - if ((await applyRemoteLoginInput(page, message)) === "cancelled") this.cancel(); - } - private enqueueInput(message: RemoteLoginInput): void { - if (message.type === "cancel") { - this.inputQueue.length = 0; - this.inputQueue.unshift(message); - } else if (message.type === "pointer" && message.event === "move") { - const last = this.inputQueue.at(-1); - if (last?.type === "pointer" && last.event === "move") { - this.inputQueue[this.inputQueue.length - 1] = message; - } else if (this.inputQueue.length < MAX_INPUT_QUEUE) { - this.inputQueue.push(message); - } - } else { - if (this.inputQueue.length >= MAX_INPUT_QUEUE) { - const moveIndex = this.inputQueue.findIndex( - (input) => input.type === "pointer" && input.event === "move", - ); - if (moveIndex >= 0) this.inputQueue.splice(moveIndex, 1); - } - if (this.inputQueue.length < MAX_INPUT_QUEUE) this.inputQueue.push(message); - } - void this.drainInputQueue(); - } - private async drainInputQueue(): Promise { - if (this.inputDrainRunning) return; - this.inputDrainRunning = true; - try { - while (!this.closed) { - const message = this.inputQueue.shift(); - if (!message) return; - await this.applyInput(message); - } - } finally { - this.inputDrainRunning = false; - if (!this.closed && this.inputQueue.length > 0) void this.drainInputQueue(); - } - } private scheduleLoginCheck(): void { if (this.closed || this.captureStarted) return; this.loginTimer = setTimeout(() => void this.checkLogin(), 1000); @@ -164,6 +122,7 @@ export class RemoteLoginSession { setTimeout(() => this.finish(1000, "Connected"), 50); } private scheduleFrames(): void { + if (this.phase === "opening") return; if (this.closed || !this.connection || !this.page || this.frameTimer) return; this.frameTimer = setTimeout(() => void this.sendFrame(), this.config.frameIntervalMs); } @@ -196,7 +155,7 @@ export class RemoteLoginSession { private finish(code: number, reason: string): void { if (this.closed) return; this.closed = true; - this.inputQueue.length = 0; + this.inputQueue.close(); clearTimeout(this.expiryTimer); if (this.frameTimer) clearTimeout(this.frameTimer); if (this.loginTimer) clearTimeout(this.loginTimer); @@ -205,5 +164,3 @@ export class RemoteLoginSession { this.onDone(this.sessionId, this.userId); } } - -const MAX_INPUT_QUEUE = 128; diff --git a/tests/remote-login-input-queue.test.ts b/tests/remote-login-input-queue.test.ts new file mode 100644 index 0000000..76419a0 --- /dev/null +++ b/tests/remote-login-input-queue.test.ts @@ -0,0 +1,70 @@ +import { describe, expect, it, mock } from "bun:test"; +import { RemoteLoginInputQueue } from "../src/remote-login-input-queue.ts"; +import { fakeRemoteLoginPage } from "./remote-login-fixtures.ts"; + +describe("RemoteLoginInputQueue", () => { + it("retains the last startup resize and applies it before a click", async () => { + const page = fakeRemoteLoginPage().page; + const calls: string[] = []; + page.setViewportSize = async ({ width, height }) => { + calls.push(`${width}x${height}`); + }; + page.mouse.move = async () => { + calls.push("move"); + }; + page.mouse.down = async () => { + calls.push("down"); + }; + page.mouse.up = async () => { + calls.push("up"); + }; + const queue = new RemoteLoginInputQueue(mock()); + queue.enqueue({ type: "resize", width: 900, height: 600 }); + queue.enqueue({ type: "resize", width: 816, height: 478 }); + queue.enqueue({ type: "pointer", event: "down", x: 640, y: 314 }); + queue.enqueue({ type: "pointer", event: "up", x: 640, y: 314 }); + expect(calls).toEqual([]); + await queue.attach(page); + expect(calls).toEqual(["816x478", "move", "down", "move", "up"]); + queue.close(); + }); + + it("cancels before browser creation without applying pending input", async () => { + const fail = mock(); + const page = fakeRemoteLoginPage().page; + page.setViewportSize = mock(async () => undefined); + const queue = new RemoteLoginInputQueue(fail); + queue.enqueue({ type: "resize", width: 816, height: 478 }); + queue.enqueue({ type: "cancel" }); + await queue.attach(page); + expect(fail).toHaveBeenCalledWith("Session cancelled"); + expect(page.setViewportSize).not.toHaveBeenCalled(); + }); + + it("closes on overflow instead of silently losing key or button releases", async () => { + const fail = mock(); + const queue = new RemoteLoginInputQueue(fail); + for (let i = 0; i < 129; i++) queue.enqueue({ type: "key", event: "down", key: "Tab" }); + const page = fakeRemoteLoginPage().page; + page.keyboard.down = mock(async () => undefined); + await queue.attach(page); + expect(fail).toHaveBeenCalledTimes(1); + expect(fail).toHaveBeenCalledWith("Remote browser input queue exceeded"); + expect(page.keyboard.down).not.toHaveBeenCalled(); + }); + + it("reports rejected input and discards the remaining queue", async () => { + const fail = mock(); + const page = fakeRemoteLoginPage().page; + page.setViewportSize = async () => { + throw new Error("closed browser"); + }; + page.keyboard.down = mock(async () => undefined); + const queue = new RemoteLoginInputQueue(fail); + queue.enqueue({ type: "resize", width: 816, height: 478 }); + queue.enqueue({ type: "key", event: "down", key: "Tab" }); + await queue.attach(page); + expect(fail).toHaveBeenCalledWith("Remote browser input failed"); + expect(page.keyboard.down).not.toHaveBeenCalled(); + }); +}); diff --git a/tests/remote-login-startup.test.ts b/tests/remote-login-startup.test.ts new file mode 100644 index 0000000..d9eabf0 --- /dev/null +++ b/tests/remote-login-startup.test.ts @@ -0,0 +1,59 @@ +import { expect, it } from "bun:test"; +import { RemoteLoginSession } from "../src/remote-login-session.ts"; +import { + fakeRemoteLoginPage, + remoteLoginTarget, + remoteLoginTestConfig, +} from "./remote-login-fixtures.ts"; + +it("applies startup dimensions before announcing that the remote browser is ready", async () => { + const events: string[] = []; + const ready = Promise.withResolvers(); + const resized = Promise.withResolvers(); + const page = fakeRemoteLoginPage(); + page.page.setViewportSize = async ({ width, height }) => { + events.push(`${width}x${height}`); + await resized.promise; + }; + const session = new RemoteLoginSession({ + sessionId: "startup", + userId: "user", + expiresAt: Date.now() + 300_000, + target: remoteLoginTarget(), + config: remoteLoginTestConfig(), + createPage: async () => { + await ready.promise; + return page; + }, + onDone: () => undefined, + }); + session.attach({ + sendText: (raw) => { + events.push(JSON.parse(raw).phase); + return true; + }, + sendBinary: () => { + events.push("frame"); + return true; + }, + bufferedAmount: () => 0, + close: () => undefined, + }); + try { + const starting = session.start(); + session.handleMessage(JSON.stringify({ type: "resize", width: 816, height: 478 })); + await new Promise((resolve) => setTimeout(resolve, 0)); + ready.resolve(); + await new Promise((resolve) => setTimeout(resolve, 0)); + expect(events).toContain("816x478"); + expect(events).not.toContain("awaiting_login"); + expect(events).not.toContain("frame"); + resized.resolve(); + await starting; + expect(events.indexOf("816x478")).toBeLessThan(events.indexOf("awaiting_login")); + } finally { + ready.resolve(); + resized.resolve(); + session.cancel(); + } +}); From 47db29c6c773f98d4164bf3ef5d515037e905738 Mon Sep 17 00:00:00 2001 From: Priveetee Date: Wed, 9 Sep 2026 08:55:14 +0200 Subject: [PATCH 3/5] chore: update Biome and align its configuration schema --- biome.json | 2 +- bun.lock | 20 ++++++++++---------- package.json | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/biome.json b/biome.json index f06b562..3d27c87 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.5.3/schema.json", + "$schema": "https://biomejs.dev/schemas/2.5.12/schema.json", "vcs": { "enabled": true, "clientKind": "git", diff --git a/bun.lock b/bun.lock index 82b1de3..9fb9899 100644 --- a/bun.lock +++ b/bun.lock @@ -11,7 +11,7 @@ "youtubei.js": "^17.2.0", }, "devDependencies": { - "@biomejs/biome": "^2.5.10", + "@biomejs/biome": "^2.5.12", "bun-types": "^1.3.14", "typescript": "~7.0.2", }, @@ -21,23 +21,23 @@ "@biomejs/biome", ], "packages": { - "@biomejs/biome": ["@biomejs/biome@2.5.10", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.5.10", "@biomejs/cli-darwin-x64": "2.5.10", "@biomejs/cli-linux-arm64": "2.5.10", "@biomejs/cli-linux-arm64-musl": "2.5.10", "@biomejs/cli-linux-x64": "2.5.10", "@biomejs/cli-linux-x64-musl": "2.5.10", "@biomejs/cli-win32-arm64": "2.5.10", "@biomejs/cli-win32-x64": "2.5.10" }, "bin": { "biome": "bin/biome" } }, "sha512-WRKXARA3kTuiV5sxqTpobJ/I0MVd4vk3pOL6wnp5az4LntFIhWTj1RWZq3DI9PCEN3lXcqy7p5aqUHzvq8AXyQ=="], + "@biomejs/biome": ["@biomejs/biome@2.5.12", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.5.12", "@biomejs/cli-darwin-x64": "2.5.12", "@biomejs/cli-linux-arm64": "2.5.12", "@biomejs/cli-linux-arm64-musl": "2.5.12", "@biomejs/cli-linux-x64": "2.5.12", "@biomejs/cli-linux-x64-musl": "2.5.12", "@biomejs/cli-win32-arm64": "2.5.12", "@biomejs/cli-win32-x64": "2.5.12" }, "bin": { "biome": "bin/biome" } }, "sha512-Lw4VHZRebrReBBnlHa12JQjnIBm3JJAA55PDB9LbBVBF0q4RYphm6KfmIjqtPhf61MxZ5Q9KoK8R8x+7per5Aw=="], - "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.5.10", "", { "os": "darwin", "cpu": "arm64" }, "sha512-ItCrxKK6SXVT6flYs0qIuBd4AA3TTTl4d66Re6YI2FuGZnN85NmuYNzkiTJUyYw8qBLv69L5zTUB6uyWd++h3Q=="], + "@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.5.12", "", { "os": "darwin", "cpu": "arm64" }, "sha512-lCRY1rwgNeWNgTr4DI/u6ZwXTRwRLHAvbaio1YLLGS+4r1nhvB2ssyPqIpfUSmRveNfv0fn/N58C7CAdK2XVrg=="], - "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.5.10", "", { "os": "darwin", "cpu": "x64" }, "sha512-yLsPU9pAmtChXDu8vhKAzErqe+LeeYuwuUB2FZMkRitsmdodxsYRa9KHrFispsUHzzOu+9HB3nP/TQxyia+Sjw=="], + "@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.5.12", "", { "os": "darwin", "cpu": "x64" }, "sha512-vhPgwnh+6tN3ArdAXuET99xaNbFt7CG82Bqn+omHVLC5xdVx45JsYjGPmUIGNzjDek5XdNCP1HKksK7fn8+3bQ=="], - "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.5.10", "", { "os": "linux", "cpu": "arm64" }, "sha512-VG8uQW/86a1roLaIFvtIbEigxIdzdJ190oGyg1tV7VYeQtOS+x10sflk7WbuXgw91EtZX5DlIIIej1YqkNLlcg=="], + "@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.5.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-2gp8aVwXYKdAtmBfRFCUuyDMcfN1ahHqUkGfLYrZlNRFmryMATLVvJgWKvyA8wu4Rwn5OSxM1UcUmOuOFNGeBQ=="], - "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.5.10", "", { "os": "linux", "cpu": "arm64" }, "sha512-t1QAKZwQJRB4dvgJSgFiQ4BNfNPChg69BNonz854qLVxnjT3UvDzQg9mbkTJRu35ZqU0Rw10A73J8Urgbg2RPw=="], + "@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.5.12", "", { "os": "linux", "cpu": "arm64" }, "sha512-couHYjFLL5uuI8ne6zhT7KwEsXo5YP7ry/2xmEqah7qanu0YmfDi3mwJg47YXSuv/NpZj22CZzcRH/5c4gjPSQ=="], - "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.5.10", "", { "os": "linux", "cpu": "x64" }, "sha512-4O6T0eq2heoHZN0a9UX+rWQoxXEBaKf+lRi2hbsGlHneUz9BWXM76nEWMK7Eeq8gzMxR1khQB6BFpAASpeXqGg=="], + "@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.5.12", "", { "os": "linux", "cpu": "x64" }, "sha512-SnvOs3TSTiuia4SQOUNe1aWC9RT4+YkjcKnOhL/nsKOV0k5ycgBkDzF0lUxKn1V7Q8CLTRq6iV23ZAivHomRoA=="], - "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.5.10", "", { "os": "linux", "cpu": "x64" }, "sha512-pgDDqp9JybHm2I0KRgzN6i4+lt8xu4iqxUwLzglUMmOmyRTU1AYBGKzh9sNMOtIjah7xoWvKHlLVetvyifzoiQ=="], + "@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.5.12", "", { "os": "linux", "cpu": "x64" }, "sha512-8A0oDW58/w9f/PQNYuq0sGUZtGtGrkNF4Z6n0PUoXpLCshi85vtKTv1XSznQawhdE4MXJ8ufpzHXyLFe87M/+w=="], - "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.5.10", "", { "os": "win32", "cpu": "arm64" }, "sha512-pxAbxduPO4xq/Cvgaa2lOrs9BB0hEXmmDqfMNP4ZOffGOkUrD1/QGw9UAMpFQpX2P8MqTIIRuQKcmetum4Oa6A=="], + "@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.5.12", "", { "os": "win32", "cpu": "arm64" }, "sha512-b9vtoZFsuZt1pdjNwJvXl0f+BpayRzV008uS2+JpmwIKdSE2qdu4A/l04FESwLoou5g2E/Qlec0xwJydZplH+A=="], - "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.5.10", "", { "os": "win32", "cpu": "x64" }, "sha512-M+2dgBsl3lXRiTfgPVc2p3anS4Tocojke4rzFLScZ2Y/wmF+36dRb1iHCLiyGqOzQGyTplZH1HnEYviiAqi3nA=="], + "@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.5.12", "", { "os": "win32", "cpu": "x64" }, "sha512-B1R/l+CwEpKFSuqiwePzPNRk1EiJN8kc0UhdafNz6MZN9v5OFP9HYP1irptvWzHrwVI4blVNGMbxc5zt70m3IA=="], "@bufbuild/protobuf": ["@bufbuild/protobuf@2.12.1", "", {}, "sha512-BvAMfS6LrgZiryOAZ4pBYucu4wG/Ei/9o9DZ9akbREnMLbPJiom2i8b9C8IsKErQoiKqVhrerzt3kOT/RrzLHg=="], diff --git a/package.json b/package.json index 7c8c481..5f71e42 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "youtubei.js": "^17.2.0" }, "devDependencies": { - "@biomejs/biome": "^2.5.10", + "@biomejs/biome": "^2.5.12", "bun-types": "^1.3.14", "typescript": "~7.0.2" }, From 76cccf4c2c7e2d8f65b1ceaf35102c0e859d8d15 Mon Sep 17 00:00:00 2001 From: Priveetee Date: Wed, 9 Sep 2026 08:58:38 +0200 Subject: [PATCH 4/5] chore: align Bun runtime and CI on 1.4.2 --- .github/workflows/ci.yml | 2 +- .github/workflows/docker.yml | 2 +- Dockerfile | 6 +++--- bun.lock | 4 ++-- package.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ae41ca..ad32dc0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 with: - bun-version: 1.3.14 + bun-version: 1.4.2 - name: Install dependencies run: bun install --frozen-lockfile diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 24f6f41..058415c 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -39,7 +39,7 @@ jobs: - name: Set up Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 with: - bun-version: 1.3.14 + bun-version: 1.4.2 - name: Resolve build metadata id: build-info diff --git a/Dockerfile b/Dockerfile index 7a6ada3..111a0a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM oven/bun:1.3.14-slim AS builder +FROM --platform=$BUILDPLATFORM oven/bun:1.4.2-slim AS builder WORKDIR /app COPY package.json bun.lock ./ ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 @@ -6,7 +6,7 @@ RUN bun install --frozen-lockfile COPY src/ ./src/ RUN bun build src/index.ts --outfile dist/index.js --target bun --external playwright -FROM oven/bun:1.3.14-slim AS prod-deps +FROM oven/bun:1.4.2-slim AS prod-deps WORKDIR /app COPY package.json bun.lock ./ ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 @@ -22,7 +22,7 @@ RUN apt-get update \ && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* /usr/lib/node_modules WORKDIR /app -COPY --from=oven/bun:1.3.14-slim /usr/local/bin/bun /usr/local/bin/bun +COPY --from=oven/bun:1.4.2-slim /usr/local/bin/bun /usr/local/bin/bun COPY --from=prod-deps /app/node_modules ./node_modules COPY --from=builder /app/dist ./dist COPY --chmod=755 docker-entrypoint.sh ./docker-entrypoint.sh diff --git a/bun.lock b/bun.lock index 9fb9899..ddfc6e3 100644 --- a/bun.lock +++ b/bun.lock @@ -12,7 +12,7 @@ }, "devDependencies": { "@biomejs/biome": "^2.5.12", - "bun-types": "^1.3.14", + "bun-types": "^1.4.2", "typescript": "~7.0.2", }, }, @@ -85,7 +85,7 @@ "bgutils-js": ["bgutils-js@4.0.3", "", {}, "sha512-nvhrzqRYqFcC3AJbf1fENc/jzyMk95wH9UC9ruQzTZCq+itYWuHi2a9leK/bC1lLfi+R4a28wJZxpD5KiTFf+w=="], - "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="], + "bun-types": ["bun-types@1.4.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-bxV1FgK7yBIzjRe5zBozIM4Bem11ZJcCXSrjWRG3YWLt8yFDePu4cLjpebO8OvPeIE9trbyPF4fuj3Cia4Fj3w=="], "fflate": ["fflate@0.8.3", "", {}, "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA=="], diff --git a/package.json b/package.json index 5f71e42..b4683e3 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ }, "devDependencies": { "@biomejs/biome": "^2.5.12", - "bun-types": "^1.3.14", + "bun-types": "^1.4.2", "typescript": "~7.0.2" }, "trustedDependencies": [ From f2195a33df57dbcad86b56e31a88ccfe3157adee Mon Sep 17 00:00:00 2001 From: Priveetee Date: Wed, 9 Sep 2026 10:07:33 +0200 Subject: [PATCH 5/5] chore: update token runtime dependencies --- bun.lock | 14 ++++++-------- package.json | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/bun.lock b/bun.lock index ddfc6e3..84adeb6 100644 --- a/bun.lock +++ b/bun.lock @@ -7,8 +7,8 @@ "dependencies": { "bgutils-js": "^4.0.3", "googlevideo": "^4.1.1", - "playwright": "^1.62.1", - "youtubei.js": "^17.2.0", + "playwright": "^1.63.0", + "youtubei.js": "^18.0.0", }, "devDependencies": { "@biomejs/biome": "^2.5.12", @@ -89,20 +89,18 @@ "fflate": ["fflate@0.8.3", "", {}, "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA=="], - "fsevents": ["fsevents@2.3.2", "", { "os": "darwin" }, "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="], - "googlevideo": ["googlevideo@4.1.1", "", { "dependencies": { "@bufbuild/protobuf": "^2.0.0" } }, "sha512-14o64O+CXXlQ1stYZK/+ypCEwZb25lzEuzhbFYYEzf26R+HhBDOR+Dkdk7MKkZ3qXeIjvZfeC0AJlVKjwQCFjw=="], - "meriyah": ["meriyah@6.1.4", "", {}, "sha512-Sz8FzjzI0kN13GK/6MVEsVzMZEPvOhnmmI1lU5+/1cGOiK3QUahntrNNtdVeihrO7t9JpoH75iMNXg6R6uWflQ=="], + "meriyah": ["meriyah@7.3.3", "", {}, "sha512-uE5cnoNj+UYhoMdZDuymCzr5TzEuE3ZF2C4kn6Z76rLhkwnvZ/+6dUZnM41T3fifyuhW0+n8vK7eq6DKJxUfPA=="], - "playwright": ["playwright@1.62.1", "", { "dependencies": { "playwright-core": "1.62.1" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-0M+L3LAD8/nm554LOla9Ayx0j0tmFZ0FBcoQ7F1VuVHpM/XpiC8RcDzBQB8W5+hA8L22THxELzeF+2WcUzvcLg=="], + "playwright": ["playwright@1.63.0", "", { "dependencies": { "playwright-core": "1.63.0" }, "bin": { "playwright": "cli.js" } }, "sha512-+7ziBLidS4NaNCdt57SUDT+wYmmd5fmiQejUic/kb+YsYSCPyOOE9sebzMjNmQrsnNpDJqd4WHvV/8lfKfUDUg=="], - "playwright-core": ["playwright-core@1.62.1", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw=="], + "playwright-core": ["playwright-core@1.63.0", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-rYCsBF/M5HjUch52bbtVONEFjv6Xu8sm8h72dNlR5bzIE1fvC/bxgspzkjSfU+MweEMmPM8KJebG6nnyxo5mCg=="], "typescript": ["typescript@7.0.2", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="], "undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="], - "youtubei.js": ["youtubei.js@17.2.0", "", { "dependencies": { "@bufbuild/protobuf": "^2.0.0", "fflate": "^0.8.2", "meriyah": "^6.1.4" } }, "sha512-XLNsgRKO1h7t4i9tIMWSQSeWdD7Ujkk5v1m5YCaumaHMhu/xuLqtO3M0Hq7CXNup9HlJ1NGrT1Y+HLIHnL6Ujg=="], + "youtubei.js": ["youtubei.js@18.0.0", "", { "dependencies": { "@bufbuild/protobuf": "^2.0.0", "fflate": "^0.8.2", "meriyah": "^7.3.1" } }, "sha512-7Tztl5QzNL4nIhiAxa4P/0C8cDDsUe0j4iaUeNiaA+ZfSe/l+HkHxXyoWlQXNW7IPi2n6AW23ysVMJLDh+AwWQ=="], } } diff --git a/package.json b/package.json index b4683e3..fb40520 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,8 @@ "dependencies": { "bgutils-js": "^4.0.3", "googlevideo": "^4.1.1", - "playwright": "^1.62.1", - "youtubei.js": "^17.2.0" + "playwright": "^1.63.0", + "youtubei.js": "^18.0.0" }, "devDependencies": { "@biomejs/biome": "^2.5.12",