feat : update
CI / Verify (push) Successful in 1m16s
CI / Build immutable images and deploy (push) Successful in 2m5s

This commit is contained in:
2026-09-04 20:04:06 +07:00 Unverified
parent dd87510d68
commit 06d0287433
5 changed files with 185 additions and 86 deletions
+7
View File
@@ -8,6 +8,7 @@ import {
parseTeamTransfer,
parseTeamPresets,
serializeTeamTransfer,
teamTransferFileName,
type TeamToolValue,
} from "./team-tools";
@@ -152,6 +153,12 @@ describe("team bulk tools", () => {
}))).toThrow();
});
it("uses the team name as a safe JSON download filename", () => {
expect(teamTransferFileName("Ineffa Exai")).toBe("Ineffa Exai.json");
expect(teamTransferFileName('A/B: Team?')).toBe("A-B- Team-.json");
expect(teamTransferFileName("... ")).toBe("team.json");
});
it("reports missing and incompatible imported catalog references", () => {
const source = team("source");
source.members[0] = {
+8
View File
@@ -90,6 +90,14 @@ export function serializeTeamTransfer(team: TeamToolValue): string {
return JSON.stringify(payload, null, 2);
}
export function teamTransferFileName(teamName: string): string {
const safeName = teamName
.replace(/[<>:"/\\|?*\u0000-\u001f]/gu, "-")
.replace(/[. ]+$/gu, "")
.trim();
return `${safeName || "team"}.json`;
}
export function parseTeamTransfer(serialized: string): Omit<TeamToolValue, "clientId"> {
const payload = teamTransferSchema.parse(JSON.parse(serialized) as unknown);
return {