Files
HomePage/.create-dns.cjs
T
HaozeZhou 6ea00cfe43 feat: add base styles, component styles, and theme management
- Created base CSS styles for typography, layout, and transitions.
- Added component-specific styles for navigation, hero section, about section, infrastructure, projects, modal, contact, and footer.
- Introduced design tokens for consistent theming across light and dark modes.
- Implemented theme management functionality with local storage support and system preference detection.
- Configured TypeScript settings for the project.
2026-08-11 23:38:08 +08:00

31 lines
862 B
JavaScript

const fs = require("fs");
const path = require("path");
const os = require("os");
const tomlPath = path.join(os.homedir(), "AppData", "Roaming", "xdg.config", ".wrangler", "config", "default.toml");
const toml = fs.readFileSync(tomlPath, "utf8");
const match = toml.match(/oauth_token\s*=\s*"([^"]+)"/);
const token = match[1];
const zoneId = "5ed3652548a0e8c430910c4090b02357";
fetch(`https://api.cloudflare.com/client/v4/zones/${zoneId}/dns_records`, {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "CNAME",
name: "www",
content: "personalweb-bkl.pages.dev",
proxied: true,
ttl: 1,
}),
})
.then((r) => r.json())
.then((j) => console.log(JSON.stringify(j, null, 2)))
.catch((e) => {
console.error(e);
process.exit(1);
});