This commit is contained in:
abearxiong committed 2025-11-18 14:39:32 +08:00
1 parent 572f793061
commit a24bd021a9
8 files changed
+238 -41

No files matched your search

+1 -9
View File
@@ -1,13 +1,5 @@
import { createStorage } from "unstorage";
import fsDriver from "unstorage/drivers/fs";
import { CloudflareDDNS } from "@agent/ddns/cloudflare/index.ts";
import { storage } from "@agent/app.ts";
import { CloudflareConfig } from "@agent/task.ts";
const storage = createStorage({
driver: fsDriver({
base: process.cwd() + '/storage/ddns-agent'
}),
});
export const config = await storage.getItem<CloudflareConfig>('cloudflare.json');
+1 -1
View File
@@ -3,7 +3,7 @@ import { config } from "./common.ts";
const cf = new CloudflareDDNS();
if (config) {
const res = await cf.getList(config.zone_id, config.api_token);
const res = await cf.getList(config.zone_id, config.api_token, {search: 'xion'});
console.log('Cloudflare DNS Records List:', res);
} else {
console.log('No configuration found.');
+5
View File
@@ -0,0 +1,5 @@
import '../index.ts';
import { main } from '@agent/task.ts';
main()