UNPKG

@cosmstack/repoeject

Version:

Interactive CLI tool to safely find and delete old or inactive GitHub repositories. Clean up your GitHub profile by removing abandoned projects, old experiments, and unused forks.

64 lines 2.12 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.config = void 0; const node_path_1 = __importDefault(require("node:path")); const node_os_1 = __importDefault(require("node:os")); const calculateKeyRotationInterval = (keyRotationInterval) => { return keyRotationInterval * 24 * 60 * 60 * 1000; }; const getKeyRotationInterval = () => { const keyRotationInterval = process.env.KEY_ROTATION_INTERVAL; if (!keyRotationInterval) return calculateKeyRotationInterval(30); return calculateKeyRotationInterval(Number(keyRotationInterval)); }; const getEncryptionAlgorithm = () => { const encryptionAlgorithm = process.env.ENCRYPTION_ALGORITHM; if (!encryptionAlgorithm) return "aes-256-gcm"; return encryptionAlgorithm; }; exports.config = { app: { name: "repoeject", version: "0.1.4", }, github: { apiVersion: "2022-11-28", perPage: 100, maxPages: 10, }, ui: { spinnerColor: "yellow", tableColors: { header: "cyan", row: "white", selected: "green", inactive: "gray", danger: "red", }, inactiveThresholdDays: 180, lowCommitThreshold: 3, }, cli: { confirmationKeyword: "DELETE", }, authMethods: { oauth: false, token: true, }, store: { configDir: node_path_1.default.join(node_os_1.default.homedir(), ".repoeject"), configFile: node_path_1.default.join(node_os_1.default.homedir(), ".repoeject", "config.json"), keyDir: node_path_1.default.join(node_os_1.default.homedir(), ".repoeject", "keys"), keyFile: node_path_1.default.join(node_os_1.default.homedir(), ".repoeject", "keys", "master.key"), }, security: { encryptionAlgorithm: getEncryptionAlgorithm(), keyRotationInterval: getKeyRotationInterval(), }, }; //# sourceMappingURL=config.js.map