Class: Settings
#
@jupyterlite/settings.Settings
A class to handle requests to /api/settings
Implements#
Constructors#
constructor
#
new Settings
(options
)
Parameters#
Name |
Type |
---|---|
|
Defined in#
Properties#
_localforage
#
Private
_localforage
:LocalForage
Defined in#
_ready
#
Private
_ready
:PromiseDelegate
<void
>
Defined in#
_storage
#
Private
_storage
:undefined
|LocalForage
Defined in#
_storageDrivers
#
Private
_storageDrivers
:null
|string
[] =null
Defined in#
_storageName
#
Private
_storageName
:string
=DEFAULT_STORAGE_NAME
Defined in#
Accessors#
defaultStorageOptions
#
Protected
get
defaultStorageOptions
():LocalForageOptions
Get default options for localForage instances
Returns#
LocalForageOptions
Defined in#
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#
storage
#
Protected
get
storage
():Promise
<LocalForage
>
A lazy reference to initialized storage
Returns#
Promise
<LocalForage
>
Defined in#
Methods#
_getAll
#
Private
_getAll
(file
):Promise
<IPlugin
[]>
Get all the settings for core or federated plugins
Parameters#
Name |
Type |
---|---|
|
Returns#
Promise
<IPlugin
[]>
Defined in#
defaultSettingsStorage
#
Protected
defaultSettingsStorage
():LocalForage
Create a settings store.
Returns#
LocalForage
Defined in#
get
#
get
(pluginId
):Promise
<undefined
|IPlugin
>
Get settings by plugin id
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
the id of the plugin |
Returns#
Promise
<undefined
| IPlugin
>
Implementation of#
ISettings.get
Defined in#
getAll
#
getAll
():Promise
<{settings
:IPlugin
[] }>
Get all the settings
Returns#
Promise
<{ settings
: IPlugin
[] }>
Implementation of#
ISettings.getAll
Defined in#
initStorage
#
Protected
initStorage
():Promise
<void
>
Prepare the storage
Returns#
Promise
<void
>
Defined in#
initialize
#
initialize
():Promise
<void
>
Finish any initialization after server has started and all extensions are applied.
Returns#
Promise
<void
>
Defined in#
save
#
save
(pluginId
,raw
):Promise
<void
>
Save settings for a given plugin id
Parameters#
Name |
Type |
Description |
---|---|---|
|
|
The id of the plugin |
|
|
The raw settings |
Returns#
Promise
<void
>
Implementation of#
ISettings.save