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:
@@ -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)
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user