UNPKG

locadot

Version:

Secure your local development environment with HTTPS and custom domains like dev.localhost.

43 lines (42 loc) 1.64 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const appdata_path_1 = __importDefault(require("appdata-path")); const path_1 = __importDefault(require("path")); const os_1 = __importDefault(require("os")); const PACKAGE_PATH = (0, appdata_path_1.default)("locadot"); const LOGS = path_1.default.join(PACKAGE_PATH, ".locadot.log"); const LOCK_FILE = path_1.default.join(PACKAGE_PATH, ".locadot.lock"); const REGISTRY_FILE = path_1.default.join(PACKAGE_PATH, ".locadot-registry.json"); class Constants { } Constants.paths = { LOCK_FILE: LOCK_FILE, REGISTRY_FILE: REGISTRY_FILE, LOGS: LOGS, }; Constants.platform = () => { const currentPlatform = os_1.default.platform(); if (currentPlatform === "win32") { return "windows"; } else if (currentPlatform === "darwin") { return "mac"; } else if (currentPlatform === "linux") { return "linux"; } else { return "unknown"; } }; Constants.proxyInfo = { invalidHost: "❌ Invalid domain. Please use a valid localhost domain like dev.localhost, localhost, test.localhost, etc.", hostExist: "❌ Domain already in use. Please choose another domain or stop the existing instance.", hostNotFound: "❌ Domain not found. Please choose another domain or stop the existing instance.", proxyClose: "☑️ Successfully stopped all locadot instances.", softClose: "☑️ Successfully stopped central proxy..", }; exports.default = Constants;