Asper Header  1.0.14
The header injector extension
Loading...
Searching...
No Matches
constants.ts File Reference

Global constants and configuration values for AsperHeader extension. More...

Go to the source code of this file.

Variables

export const statusError
 Return code indicating operation failure or error condition.
 
export const statusSuccess
 Return code indicating successful operation completion.
 
export const extensionName
 Human-readable name of the extension.
 
export const moduleName
 Module identifier used in package.json and extension marketplace.
 
export const projectCopyright
 Copyright notice for project attribution.
 
export const headerOpenerDecorationOpen
 Opening decoration pattern for header borders.
 
export const headerOpenerDecorationClose
 Closing decoration pattern for header borders.
 
export const headerCommentSpacing
 Standard spacing character used in header comment formatting.
 
export const telegraphBegin
 Telegraph protocol marker indicating message transmission start.
 
export const telegraphEnd
 Telegraph protocol marker indicating message transmission end.
 
export const telegraphBlockStop
 Telegraph protocol block termination marker.
 
export const telegraphEndOfTransmission
 Telegraph protocol end of transmission acknowledgment.
 
export const headerKeyDefinitionSeparator
 Separator string between header keys and their values.
 
export const headerLogoKey
 Key identifier for logo/ASCII art section in headers.
 
export const headerProjectKey
 Key identifier for project name field in headers.
 
export const headerFileKey
 Key identifier for filename field in headers.
 
export const headerCreationDateKey
 Key identifier for file creation timestamp field.
 
export const headerLastModifiedKey
 Key identifier for last modification timestamp field.
 
export const headerDescriptionKey
 Key identifier for file description field in headers.
 
export const headerCopyrightKey
 Key identifier for copyright information field.
 
export const headerTagKey
 Key identifier for tag/category field in headers.
 
export const headerPurposeKey
 Key identifier for purpose/objective field in headers.
 
export const headerTimeSeperatorHour
 Separator character between hour and minute in time formatting.
 
export const headerTimeSeperatorMinute
 Separator character between minute and second in time formatting.
 
export const headerTimeSeperatorSecond
 Separator character after seconds in time formatting (empty for no separator)
 
export const headerTimeAndDateSeperator
 Separator character between date and time components.
 
export const headerDateSeperatorDay
 Separator character between day and month in date formatting.
 
export const headerDateSeperatorMonth
 Separator character between month and year in date formatting.
 
export const headerDateSeperatorYear
 Separator character after year in date formatting (empty for no separator)
 
export const defaultHeaderLogo
 Legacy ASCII art logo (version 4) - currently disabled.
 
export const export const defaultMaxScanLength
 Maximum number of lines to scan when searching for existing headers.
 
export const enableDebug
 Global debug mode flag for development and troubleshooting.
 
export const refreshOnSave
 Whether to automatically refresh headers when files are saved.
 
export const promptToCreateIfMissing
 Whether to prompt user to create header if missing during operations.
 
export const randomLogo
 Whether to use random logo selection instead of default logo.
 
export const useWorkspaceNameWhenAvailable
 the user setting that allows them to toggle to prefer the useage of a workspace name when available
 
export const extensionIgnore
 Array of file extensions to ignore during header processing.
 
export const projectDescription
 The dummy variable containing the description to use instead of having to ask the user the question every time.
 
export const authorLogo
 the base64 logo of the author's icon
 
 base64
 

Detailed Description

Global constants and configuration values for AsperHeader extension.

Author
Henry Letellier
Version
1.0.14
Since
1.0.0
Date
2025

This module defines all global constants, configuration values, and default settings used throughout the AsperHeader VS Code extension. It centralizes configuration management and provides compile-time constants for consistent behavior across all extension modules.

Constant Categories:

  • Status Codes: Return values for operation success/failure indication
  • Extension Identity: Name, module identifier, and copyright information
  • Header Formatting: Decoration patterns, spacing, and layout constants
  • Telegraph Protocol: Constants for telegraph-style communication formatting
  • Header Keys: Standardized keys for header metadata fields
  • Date/Time Formatting: Separators and formatting patterns for timestamps
  • Default Logo: ASCII art logo for header decoration
  • Behavioral Settings: Feature toggles and operational parameters

Configuration Philosophy: All magic numbers, strings, and behavioral flags are centralized here to:

  • Enable easy maintenance and updates
  • Ensure consistency across modules
  • Provide single source of truth for configuration
  • Support compile-time optimization
  • Facilitate testing with known constant values

ASCII Art Management: Contains multiple logo versions including legacy (commented) designs and the current active logo. Logo data is stored as string arrays for line-by-line rendering in file headers.

Extension Behavior: Defines default behaviors for file scanning, logo randomization, save triggers, and user prompting. These constants can be referenced by configuration management systems for runtime behavior modification.

Definition in file constants.ts.

Variable Documentation

◆ authorLogo

export const authorLogo

the base64 logo of the author's icon

Definition at line 251 of file constants.ts.

◆ base64

base64

Definition at line 251 of file constants.ts.

◆ defaultHeaderLogo

export const defaultHeaderLogo

Legacy ASCII art logo (version 4) - currently disabled.

This commented section contains the previous version of the ASCII art logo used in file headers. Preserved for reference and potential future use. The logo features a more detailed design with extended width and height.

Current active ASCII art logo for file headers

Compact version of the AsperHeader logo designed for efficient space usage in file headers while maintaining visual impact. Each string represents one line of the ASCII art when rendered in monospace font.

Design Features:

  • Optimized for narrow file headers
  • Maintains readability at small sizes
  • Uses period (.) for background and hash (#) for foreground
  • 17 lines tall, 32 characters wide maximum
  • Balanced visual weight and spacing

Definition at line 194 of file constants.ts.

◆ defaultMaxScanLength

export const export const defaultMaxScanLength

Maximum number of lines to scan when searching for existing headers.

Definition at line 219 of file constants.ts.

◆ enableDebug

export const enableDebug

Global debug mode flag for development and troubleshooting.

Definition at line 222 of file constants.ts.

◆ extensionIgnore

export const extensionIgnore

Array of file extensions to ignore during header processing.

Definition at line 245 of file constants.ts.

◆ extensionName

export const extensionName

Human-readable name of the extension.

Examples
Configuration.

Definition at line 57 of file constants.ts.

◆ headerCommentSpacing

export const headerCommentSpacing

Standard spacing character used in header comment formatting.

Definition at line 73 of file constants.ts.

◆ headerCopyrightKey

export const headerCopyrightKey

Key identifier for copyright information field.

Definition at line 115 of file constants.ts.

◆ headerCreationDateKey

export const headerCreationDateKey

Key identifier for file creation timestamp field.

Definition at line 109 of file constants.ts.

◆ headerDateSeperatorDay

export const headerDateSeperatorDay

Separator character between day and month in date formatting.

Definition at line 134 of file constants.ts.

◆ headerDateSeperatorMonth

export const headerDateSeperatorMonth

Separator character between month and year in date formatting.

Definition at line 136 of file constants.ts.

◆ headerDateSeperatorYear

export const headerDateSeperatorYear

Separator character after year in date formatting (empty for no separator)

Definition at line 138 of file constants.ts.

◆ headerDescriptionKey

export const headerDescriptionKey

Key identifier for file description field in headers.

Definition at line 113 of file constants.ts.

◆ headerFileKey

export const headerFileKey

Key identifier for filename field in headers.

Definition at line 107 of file constants.ts.

◆ headerKeyDefinitionSeparator

export const headerKeyDefinitionSeparator

Separator string between header keys and their values.

Definition at line 96 of file constants.ts.

◆ headerLastModifiedKey

export const headerLastModifiedKey

Key identifier for last modification timestamp field.

Definition at line 111 of file constants.ts.

◆ headerLogoKey

export const headerLogoKey

Key identifier for logo/ASCII art section in headers.

Definition at line 103 of file constants.ts.

◆ headerOpenerDecorationClose

export const headerOpenerDecorationClose

Closing decoration pattern for header borders.

Definition at line 70 of file constants.ts.

◆ headerOpenerDecorationOpen

export const headerOpenerDecorationOpen

Opening decoration pattern for header borders.

Definition at line 68 of file constants.ts.

◆ headerProjectKey

export const headerProjectKey

Key identifier for project name field in headers.

Definition at line 105 of file constants.ts.

◆ headerPurposeKey

export const headerPurposeKey

Key identifier for purpose/objective field in headers.

Definition at line 119 of file constants.ts.

◆ headerTagKey

export const headerTagKey

Key identifier for tag/category field in headers.

Definition at line 117 of file constants.ts.

◆ headerTimeAndDateSeperator

export const headerTimeAndDateSeperator

Separator character between date and time components.

Definition at line 132 of file constants.ts.

◆ headerTimeSeperatorHour

export const headerTimeSeperatorHour

Separator character between hour and minute in time formatting.

Definition at line 126 of file constants.ts.

◆ headerTimeSeperatorMinute

export const headerTimeSeperatorMinute

Separator character between minute and second in time formatting.

Definition at line 128 of file constants.ts.

◆ headerTimeSeperatorSecond

export const headerTimeSeperatorSecond

Separator character after seconds in time formatting (empty for no separator)

Definition at line 130 of file constants.ts.

◆ moduleName

export const moduleName

Module identifier used in package.json and extension marketplace.

Definition at line 59 of file constants.ts.

◆ projectCopyright

export const projectCopyright

Copyright notice for project attribution.

Definition at line 61 of file constants.ts.

◆ projectDescription

export const projectDescription

The dummy variable containing the description to use instead of having to ask the user the question every time.

Definition at line 248 of file constants.ts.

◆ promptToCreateIfMissing

export const promptToCreateIfMissing

Whether to prompt user to create header if missing during operations.

Definition at line 232 of file constants.ts.

◆ randomLogo

export const randomLogo

Whether to use random logo selection instead of default logo.

Examples
Basic, Integration, and Interactive.

Definition at line 235 of file constants.ts.

◆ refreshOnSave

export const refreshOnSave

Whether to automatically refresh headers when files are saved.

Definition at line 229 of file constants.ts.

◆ statusError

export const statusError

Return code indicating operation failure or error condition.

Definition at line 48 of file constants.ts.

◆ statusSuccess

export const statusSuccess

Return code indicating successful operation completion.

Definition at line 50 of file constants.ts.

◆ telegraphBegin

export const telegraphBegin

Telegraph protocol marker indicating message transmission start.

Definition at line 80 of file constants.ts.

◆ telegraphBlockStop

export const telegraphBlockStop

Telegraph protocol block termination marker.

Definition at line 84 of file constants.ts.

◆ telegraphEnd

export const telegraphEnd

Telegraph protocol marker indicating message transmission end.

Definition at line 82 of file constants.ts.

◆ telegraphEndOfTransmission

export const telegraphEndOfTransmission

Telegraph protocol end of transmission acknowledgment.

Definition at line 86 of file constants.ts.

◆ useWorkspaceNameWhenAvailable

export const useWorkspaceNameWhenAvailable

the user setting that allows them to toggle to prefer the useage of a workspace name when available

Definition at line 238 of file constants.ts.