mirror of
https://github.com/Nezumi-2711/cloudflare-gateway-pihole-scripts.git
synced 2026-09-22 13:38:37 +00:00
use native fetch and refactored list creation
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { isDev } from "./utils.js";
|
||||
|
||||
if (isDev()) {
|
||||
const dotenv = await import("dotenv");
|
||||
|
||||
dotenv.config();
|
||||
}
|
||||
|
||||
export const API_TOKEN = process.env.CLOUDFLARE_API_KEY;
|
||||
|
||||
export const ACCOUNT_ID = process.env.CLOUDFLARE_ACCOUNT_ID;
|
||||
|
||||
export const ACCOUNT_EMAIL = process.env.CLOUDFLARE_ACCOUNT_EMAIL;
|
||||
|
||||
export const LIST_ITEM_LIMIT = isNaN(process.env.CLOUDFLARE_LIST_ITEM_LIMIT)
|
||||
? 300000
|
||||
: parseInt(process.env.CLOUDFLARE_LIST_ITEM_LIMIT, 10);
|
||||
|
||||
export const LIST_ITEM_SIZE = 1000;
|
||||
|
||||
export const API_HOST = "https://api.cloudflare.com/client/v4";
|
||||
|
||||
export const DRY_RUN = !!parseInt(process.env.DRY_RUN, 10);
|
||||
|
||||
export const FAST_MODE = !!parseInt(process.env.FAST_MODE, 10);
|
||||
Reference in New Issue
Block a user