feat:Update pnpm-lock.yaml to link shared package; modify API routes to utilize new schemas for domain and service management; enhance DNS record handling with CNAME support; refactor service and subdomain routes for improved functionality; implement confirm dialog for domain deletion in the frontend; clean up unused components and improve UI consistency.
Build, Test, and Push CFDM Docker Image / test (push) Failing after 51s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Has been skipped
Build, Test, and Push CFDM Docker Image / update-wiki (push) Has been skipped
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped

This commit is contained in:
Denozordec
2026-06-22 13:52:33 +07:00
parent 4a70cf5854
commit 6d1d8ca4f3
99 changed files with 6692 additions and 1483 deletions
+43
View File
@@ -0,0 +1,43 @@
import { describe, expect, it } from "vitest";
import {
dnsRecordNamesMatch,
dnsNameToSubdomainLabel,
normalizeDnsRecordName,
} from "../src/subdomain.js";
const ZONE = "rkns.top";
describe("normalizeDnsRecordName", () => {
it("normalizes short labels to FQDN", () => {
expect(normalizeDnsRecordName("de", ZONE)).toBe("de.rkns.top");
expect(normalizeDnsRecordName("mhome", ZONE)).toBe("mhome.rkns.top");
});
it("keeps FQDN unchanged", () => {
expect(normalizeDnsRecordName("ihome.rkns.top", ZONE)).toBe(
"ihome.rkns.top",
);
});
it("maps apex forms to zone name", () => {
expect(normalizeDnsRecordName("@", ZONE)).toBe("rkns.top");
expect(normalizeDnsRecordName("rkns.top", ZONE)).toBe("rkns.top");
});
});
describe("dnsRecordNamesMatch", () => {
it("matches short label and FQDN for the same host", () => {
expect(dnsRecordNamesMatch("de", "de.rkns.top", ZONE)).toBe(true);
expect(dnsRecordNamesMatch("mhome", "mhome.rkns.top", ZONE)).toBe(true);
});
it("does not match different hosts", () => {
expect(dnsRecordNamesMatch("de", "mhome.rkns.top", ZONE)).toBe(false);
});
});
describe("dnsNameToSubdomainLabel", () => {
it("extracts label from FQDN", () => {
expect(dnsNameToSubdomainLabel("de.rkns.top", ZONE)).toBe("de");
});
});