Class: Settings#

@jupyterlite/settings.Settings

A class to handle requests to /api/settings

Implements#

Constructors#

constructor#

new Settings(options)

Parameters#

Name

Type

options

IOptions

Defined in#

packages/settings/src/settings.ts:20

Properties#

_localforage#

Private _localforage: LocalForage

Defined in#

packages/settings/src/settings.ts:152

_ready#

Private _ready: PromiseDelegate<void>

Defined in#

packages/settings/src/settings.ts:153

_storage#

Private _storage: undefined | LocalForage

Defined in#

packages/settings/src/settings.ts:151

_storageDrivers#

Private _storageDrivers: null | string[] = null

Defined in#

packages/settings/src/settings.ts:150

_storageName#

Private _storageName: string = DEFAULT_STORAGE_NAME

Defined in#

packages/settings/src/settings.ts:149

Accessors#

defaultStorageOptions#

Protected get defaultStorageOptions(): LocalForageOptions

Get default options for localForage instances

Returns#

LocalForageOptions

Defined in#

packages/settings/src/settings.ts:60

ready#

get ready(): Promise<void>

A promise that resolves when the settings storage is fully initialized

Returns#

Promise<void>

Implementation of#

ISettings.ready

Defined in#

packages/settings/src/settings.ts:31

storage#

Protected get storage(): Promise<LocalForage>

A lazy reference to initialized storage

Returns#

Promise<LocalForage>

Defined in#

packages/settings/src/settings.ts:38

Methods#

_getAll#

Private _getAll(file): Promise<IPlugin[]>

Get all the settings for core or federated plugins

Parameters#

Name

Type

file

SettingsFile

Returns#

Promise<IPlugin[]>

Defined in#

packages/settings/src/settings.ts:141

defaultSettingsStorage#

Protected defaultSettingsStorage(): LocalForage

Create a settings store.

Returns#

LocalForage

Defined in#

packages/settings/src/settings.ts:72

get#

get(pluginId): Promise<undefined | IPlugin>

Get settings by plugin id

Parameters#

Name

Type

Description

pluginId

string

the id of the plugin

Returns#

Promise<undefined | IPlugin>

Implementation of#

ISettings.get

Defined in#

packages/settings/src/settings.ts:86

getAll#

getAll(): Promise<{ settings: IPlugin[] }>

Get all the settings

Returns#

Promise<{ settings: IPlugin[] }>

Implementation of#

ISettings.getAll

Defined in#

packages/settings/src/settings.ts:98

initStorage#

Protected initStorage(): Promise<void>

Prepare the storage

Returns#

Promise<void>

Defined in#

packages/settings/src/settings.ts:53

initialize#

initialize(): Promise<void>

Finish any initialization after server has started and all extensions are applied.

Returns#

Promise<void>

Defined in#

packages/settings/src/settings.ts:45

save#

save(pluginId, raw): Promise<void>

Save settings for a given plugin id

Parameters#

Name

Type

Description

pluginId

string

The id of the plugin

raw

string

The raw settings

Returns#

Promise<void>

Implementation of#

ISettings.save

Defined in#

packages/settings/src/settings.ts:134