EML Docs

Profiles

Profiles fetches the list of profiles configured in EML AdminTool. Use it to populate a profile selector in the launcher UI, then pass the selected IProfile to the Launcher constructor.

Warning

Profiles requires an EML AdminTool instance. It is not available in agnostic mode (self-hosted manifest without AdminTool).

import { Profiles, Launcher } from 'eml-lib'

getProfiles()

async function getProfiles() {
  const profiles = new Profiles('https://at.myserver.com')
  const list = await profiles.getProfiles()
}

Constructor

ParameterTypeDescriptionRequired?
urlstringThe URL of your EML AdminTool instance.Yes

getProfiles() method

Fetches the list of all profiles available on the AdminTool.

Returns: Promise<IProfile[]> — An array of profile objects. The default profile is always included.

Throws: FETCH_ERROR — If the request to EML AdminTool fails.

Tip

The IProfile objects returned by this method can be passed directly to the profile field of Launcher’s Config. The launcher uses the profile’s slug to isolate game files in a dedicated subfolder.