@app-vitals/agent-admin 1.114.0 → 1.115.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@app-vitals/agent-admin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.115.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/app-vitals/agent.git",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@anthropic-ai/sdk": "0.137.0",
|
|
47
|
-
"@app-vitals/agent-lib": "1.
|
|
47
|
+
"@app-vitals/agent-lib": "1.115.0",
|
|
48
48
|
"@hono/zod-openapi": "^1.0.0",
|
|
49
49
|
"@prisma/adapter-pg": "^7.10.0",
|
|
50
50
|
"@prisma/client": "^7.10.0",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it, spyOn } from "bun:test";
|
|
2
|
+
import { supportedTimezones } from "./admin-ui-preferences-pages.ts";
|
|
3
|
+
|
|
4
|
+
describe("supportedTimezones", () => {
|
|
5
|
+
afterEach(() => {
|
|
6
|
+
spyOn(Intl, "supportedValuesOf").mockRestore();
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
it("returns the runtime zones unchanged when they include UTC", () => {
|
|
10
|
+
spyOn(Intl, "supportedValuesOf").mockReturnValue(["UTC", "Asia/Tokyo"]);
|
|
11
|
+
expect(supportedTimezones()).toEqual(["UTC", "Asia/Tokyo"]);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it("prepends UTC when the runtime omits it", () => {
|
|
15
|
+
spyOn(Intl, "supportedValuesOf").mockReturnValue(["Asia/Tokyo"]);
|
|
16
|
+
expect(supportedTimezones()).toEqual(["UTC", "Asia/Tokyo"]);
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -121,6 +121,22 @@ describe("Settings > Preferences", () => {
|
|
|
121
121
|
expect(store.has("mem-1")).toBe(false);
|
|
122
122
|
});
|
|
123
123
|
|
|
124
|
+
it("treats a save with an unreadable body as clear", async () => {
|
|
125
|
+
const { app, store } = setup();
|
|
126
|
+
store.set("mem-1", "Asia/Tokyo");
|
|
127
|
+
const res = await app.request("/admin/settings/preferences/save", {
|
|
128
|
+
method: "POST",
|
|
129
|
+
body: "not-a-form",
|
|
130
|
+
headers: {
|
|
131
|
+
"Content-Type": "multipart/form-data",
|
|
132
|
+
cookie: await session(),
|
|
133
|
+
},
|
|
134
|
+
redirect: "manual",
|
|
135
|
+
});
|
|
136
|
+
expect(res.status).toBe(302);
|
|
137
|
+
expect(store.get("mem-1")).toBeNull();
|
|
138
|
+
});
|
|
139
|
+
|
|
124
140
|
it("403s a save from a viewer with no member profile", async () => {
|
|
125
141
|
const { app } = setup({ member: false });
|
|
126
142
|
const res = await post(app, "/admin/settings/preferences/save", {
|