# new CloudModuleHelper()
CloudModuleHelper provides functionality for managing SWORD modules stored in the cloud storage of the active cloud sync provider (Dropbox or Nextcloud).
This helper class handles:
- Validation of the custom module repository structure
- Caching and retrieval of available modules from the custom module repository
- Parsing of SWORD module configuration files
- Installation of modules from the custom module repository to the local SWORD directory
- Installation of modules from arbitrary zip files in the cloud storage
The custom repository is expected to have the following structure:
- /mods.d.tar.gz - Compressed archive containing mods.d directory with module configuration files
- /packages/ - Directory containing module installation packages (.zip files)
Paths are relative to the app folder of the provider (/Apps/Ezra Bible App on Dropbox, /EzraBibleApp on Nextcloud).
Methods
# getRepositoryName() → {string|null}
The name of the custom module repository (the name of the active provider)
string
|
null
# isCustomModuleRepoEnabled(requireValidated)
Checks whether a custom module repository is configured for the active provider.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
requireValidated |
boolean
|
true | whether the repository must have been validated successfully |
# async listZipFiles() → {Promise.<Array.<{name: string, path: string, size: number}>>}
Recursively list all zip files in the app folder of the cloud storage.
Promise.<Array.<{name: string, path: string, size: number}>>
# async validateCustomModuleRepo(customModuleRepo, settingsOverride)
Validate the structure of a custom module repository.
Parameters:
| Name | Type | Description |
|---|---|---|
customModuleRepo |
string
|
repository folder path |
settingsOverride |
Object
|
unsaved provider settings from the configuration dialog (cloudSyncProvider, nextcloudUrl, nextcloudUsername, nextcloudPassword) |