mise API - v0.0.0
    Preparing search index...

    Class ConnectionConfig

    Manages configuration for connecting to a ChRIS instance. Handles storage of user credentials, URLs, and context directories.

    Index
    chrisURLfile: string
    chrisURLfilepath: string
    configDir: string
    currentDirectory: string
    debug: boolean = false
    tokenFile: string
    tokenFilepath: string
    userChRISContextDir: string
    userContextDir: string
    userFile: string
    userFilepath: string
    • Save the ChRIS URL to storage.

      Parameters

      • url: string

        The URL to save.

      Returns Promise<boolean>

      True if successful, false otherwise.

    • Set the current user and ChRIS URL context.

      Parameters

      • user: string

        The username.

      • Optionalurl: string

        Optional ChRIS URL.

      Returns Promise<void>

    • Convert a directory-safe string back to a URI.

      Parameters

      • dir: string

        The directory name to convert.

      Returns string

      The reconstructed URI.

      Error if the directory name format is invalid.

    • Load the last logged-in user from storage.

      Returns Promise<string | null>

      The username or null if not found.

    • Save the last logged-in user to storage.

      Parameters

      • user: string

        The username to save.

      Returns Promise<boolean>

      True if successful, false otherwise.

    • Convert a URI to a directory-safe string.

      Parameters

      • uri: string

        The URI to convert.

      Returns string

      A string safe for use as a directory name.