refactor: convert to bun workspaces monorepo

- Move web app into apps/web/
- Create packages/shared/ with shared types
- Create plugins/decky-vault/ scaffold
- Root package.json manages workspaces only
This commit is contained in:
2026-06-28 05:20:28 +08:00
parent c4bede20d4
commit cd72b7a948
345 changed files with 488 additions and 126 deletions
@@ -0,0 +1,23 @@
import { describe, it, expect } from "vitest"
describe("API version", () => {
it("matches package.json version", () => {
const pkg = require("../../../package.json")
const expectedVersion = pkg.version
expect(expectedVersion).toBe("2026.2.2")
})
})
describe("set-password endpoint security", () => {
it("only accepts JSON body for newPassword (not URL-encoded or form-data)", () => {
const allowedContentTypes = ["application/json"]
const forbiddenContentTypes = [
"application/x-www-form-urlencoded",
"multipart/form-data",
]
expect(allowedContentTypes).toContain("application/json")
for (const ct of forbiddenContentTypes) {
expect(allowedContentTypes).not.toContain(ct)
}
})
})