import module from 'node:module';
import path from 'node:path';
import url from 'node:url';
const __filename = url.fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const packageJsonPath = path.resolve(__dirname, '../..', 'package.json');
const packageJson = module.createRequire(import.meta.url)(packageJsonPath);
const appName = packageJson.name;
export default {
    ANSI_CODES: {
        BOLD: '\u001B[1m',
        DIM: '\u001B[2m',
        GREEN: '\u001B[32m',
        RED: '\u001B[31m',
        RESET: '\u001B[0m',
        YELLOW: '\u001B[33m'
    },
    APP_NAME: appName,
    ARTIFACTS_DIR: "/__cssArtifacts",
    BUILD_HOST_DOCKER_REMOTE_PORT: 2375,
    BUILD_HOST_PRIVATE_KEY_FILE_NAME: "privateKey.txt",
    BUILD_HOST_REMOTE_USER: 'user',
    BUILD_HOST_WAITER_DOCKER_TIMEOUT: 5000,
    BUILD_HOST_WAITER_MAX_ATTEMPTS: 20,
    BUILD_HOST_WAITER_WAIT_TIME_MS: 15_000,
    CLOUD_ROOT: "https://cloud.skytap.com/",
    CLOUD_TEMPLATE_BUILD_HOST_SEARCH_STRING: "Cloud%20Scripts%20Build%20Host",
    CLOUD_TEST_ENDPOINT: "https://cloud.skytap.com/account",
    CSS_ROOT: "scripts.skytapcm.com",
    DEFAULT_BUILD_WORK_DIR: "/build",
    DEFAULT_RUNSPEC_NAME: "default",
    DEFAULT_SCRIPT_WORK_DIR: "/script",
    IMAGE_CREDENTIALS_EXPIRATION_GRACE_MS: (1000 * 60 * 5), // 5 minutes
    LOGIN_ENDPOINT_URI: "/css_tokens",
    NAME_NORMALIZER_MAX_LENGTH: 50,
    RUNTIME_ARCH: 'linux/amd64',
    SCRIPT_TEMPLATES_BASE_URL: "https://raw.githubusercontent.com/skytap/course-manager-examples/master/cs-templates/",
    SSH_PORT: 22,
    TOKEN_VALIDITY_TIMEOUT_MS: (1000 * 60 * 60)
};
