markitect-main/markitect/assets/constants.py

56 lines
1.3 KiB
Python
Raw Normal View History

"""
Configuration constants and defaults for the markitect assets module.
This module defines default values, file extensions, and other constants
used throughout the asset management system.
"""
# Default paths and filenames
DEFAULT_ASSETS_DIR = "assets"
DEFAULT_REGISTRY_FILENAME = "asset_registry.json"
DEFAULT_MANIFEST_FILENAME = "manifest.json"
# Package file extension
PACKAGE_EXTENSION = ".mdpkg"
# Default configuration values
DEFAULT_CONFIG = {
"enable_deduplication": True,
"default_conflict_resolution": "backup",
"max_file_size": 100 * 1024 * 1024, # 100MB
"performance_timeout_ms": 100,
"memory_limit_mb": 50
}
# File patterns to exclude from packages by default
DEFAULT_EXCLUDE_PATTERNS = [
".DS_Store",
"Thumbs.db",
"*.tmp",
"*.temp",
"*.swp",
"*.bak",
"__pycache__",
".git",
".svn",
".hg"
]
# Supported manifest format version
MANIFEST_FORMAT_VERSION = "1.0"
# Hash algorithm used for content addressing
HASH_ALGORITHM = "sha256"
# Symlink conflict resolution options
CONFLICT_RESOLUTION_OPTIONS = ["overwrite", "backup", "skip"]
# MIME type detection fallbacks
FALLBACK_MIME_TYPES = {
".md": "text/markdown",
".txt": "text/plain",
".json": "application/json",
".yaml": "application/x-yaml",
".yml": "application/x-yaml"
}