-
-
Notifications
You must be signed in to change notification settings - Fork 9
lib.resources.resource manager.ResourceManager
lib/resources/resource-manager.ResourceManager
This class handles access to the .icloud-photos-sync resource file and handles currently applied configurations from the CLI and environment variables
- dataDir
- downloadThreads
- enableCrashReporting
- enableNetworkCapture
- exportMetrics
- failOnMfa
- force
- harFilePath
- legacyLogin
- libraryVersion
- lockFilePath
- logFilePath
- logLevel
- logToCli
- maxRetries
- metadataRate
- metricsFilePath
- mfaServerPort
- password
- primaryZone
- region
- remoteDelete
- resourceFilePath
- schedule
- sessionSecret
- sharedZone
- sharedZoneAvailable
- silent
- suppressWarnings
- trustToken
- username
• new ResourceManager(appOptions
)
Creates the resource manager, based on the previously parsed iCPSAppOptions. Should not be called directly, but through the static setup function.
Name | Type | Description |
---|---|---|
appOptions |
iCPSAppOptions |
The parsed app options |
lib/resources/resource-manager.ts:27
• _resources: iCPSResources
The shared resources held by this instances of the icps application
lib/resources/resource-manager.ts:20
• get
dataDir(): string
string
The data dir read from the CLI Options
lib/resources/resource-manager.ts:80
• get
downloadThreads(): number
number
The number of threads to use for downloading
lib/resources/resource-manager.ts:193
• get
enableCrashReporting(): boolean
boolean
If the application should enable crash reporting
lib/resources/resource-manager.ts:207
• get
enableNetworkCapture(): boolean
boolean
If the application should capture network traffic
lib/resources/resource-manager.ts:277
• get
exportMetrics(): boolean
boolean
If the application should export metrics
lib/resources/resource-manager.ts:263
• get
failOnMfa(): boolean
boolean
If the application should fail on MFA requirement
lib/resources/resource-manager.ts:214
• get
force(): boolean
boolean
If an existing library lock should be forcefully removed
lib/resources/resource-manager.ts:221
• get
harFilePath(): string
string
The path to the har file
lib/resources/resource-manager.ts:127
• get
legacyLogin(): boolean
boolean
True if legacy login should be used, false otherwise
lib/resources/resource-manager.ts:358
• get
libraryVersion(): number
Even though present in the resource file, this will only be loaded once and not re-read
number
The currently loaded libraries version
lib/resources/resource-manager.ts:138
• get
lockFilePath(): string
string
The path to the library lock file
lib/resources/resource-manager.ts:107
• get
logFilePath(): string
string
The path to the log file
lib/resources/resource-manager.ts:97
• get
logLevel(): LogLevel
The log level of the application
lib/resources/resource-manager.ts:235
• get
logToCli(): boolean
boolean
If the application should log to the CLI
lib/resources/resource-manager.ts:249
• get
maxRetries(): number
number
The number of retries to use for downloading
lib/resources/resource-manager.ts:186
• get
metadataRate(): [number
, number
]
[number
, number
]
The rate at which the metadata should be downloaded
lib/resources/resource-manager.ts:270
• get
metricsFilePath(): string
string
The path to the metrics file
lib/resources/resource-manager.ts:117
• get
mfaServerPort(): number
number
The port to use for the MFA server
lib/resources/resource-manager.ts:179
• get
password(): string
string
The iCloud user password
lib/resources/resource-manager.ts:172
• get
primaryZone(): PhotosAccountZone
The primary zone of the account
Throws
If no primary zone is set
lib/resources/resource-manager.ts:312
• set
primaryZone(primaryZone
): void
Sets the primary zone of the account
Name | Type | Description |
---|---|---|
primaryZone |
PhotosAccountZone |
The primary zone to set |
void
lib/resources/resource-manager.ts:324
• get
region(): Region
The region to be used for this app
lib/resources/resource-manager.ts:284
• get
remoteDelete(): boolean
boolean
If the application should delete remote files
lib/resources/resource-manager.ts:228
• get
resourceFilePath(): string
string
The path to the resource file
lib/resources/resource-manager.ts:87
• get
schedule(): string
string
The schedule of the application
lib/resources/resource-manager.ts:200
• get
sessionSecret(): string
string
The session secret of the account
Throws
If no session secret is set
lib/resources/resource-manager.ts:292
• set
sessionSecret(sessionSecret
): void
Sets the session secret of the account
Name | Type | Description |
---|---|---|
sessionSecret |
string |
The session secret to set |
void
lib/resources/resource-manager.ts:304
• get
sharedZone(): PhotosAccountZone
The shared zone of the account
Throws
If no shared zone is set
lib/resources/resource-manager.ts:332
• set
sharedZone(sharedZone
): void
Sets the shared zone of the account
Name | Type |
---|---|
sharedZone |
PhotosAccountZone |
void
lib/resources/resource-manager.ts:344
• get
sharedZoneAvailable(): boolean
boolean
If the shared zone is available
lib/resources/resource-manager.ts:351
• get
silent(): boolean
boolean
If the application should run in silent mode
lib/resources/resource-manager.ts:242
• get
suppressWarnings(): boolean
boolean
If the application should suppress warnings
lib/resources/resource-manager.ts:256
• get
trustToken(): string
This will always read the resource file for the most recently trust token and update the internal data structure
string
The currently used trust token, or undefined if none is set.
lib/resources/resource-manager.ts:146
• set
trustToken(trustToken
): void
Sets the trust token and syncs the resource file.
Name | Type | Description |
---|---|---|
trustToken |
string |
The trust token to use |
void
lib/resources/resource-manager.ts:157
• get
username(): string
string
The iCloud username
lib/resources/resource-manager.ts:165
▸ _readResourceFile(): ResourceFile
Reads the resource file from disk and parses it
lib/resources/resource-manager.ts:43
▸ _writeResourceFile(): void
Writes the resources to the resource file
void
- app/error/codes/app
- app/error/codes/archive
- app/error/codes/icloud-auth
- app/error/codes/icloud-photos
- app/error/codes/icloud-query-parser
- app/error/codes/library
- app/error/codes/mfa
- app/error/codes/resources
- app/error/codes/sync
- app/error/codes/validator
- app/error/error
- app/error/error-codes
- app/event/cli
- app/event/error-handler
- app/event/log
- app/event/metrics-exporter
- app/factory
- app/icloud-app
- lib/archive-engine/archive-engine
- lib/icloud/icloud
- lib/icloud/icloud-photos/icloud-photos
- lib/icloud/icloud-photos/query-builder
- lib/icloud/icloud-photos/query-parser
- crypto
- lib/icloud/mfa/mfa-method
- lib/icloud/mfa/mfa-server
- lib/photos-library/constants
- lib/photos-library/model/album
- lib/photos-library/model/asset
- lib/photos-library/model/file-type
- lib/photos-library/model/photos-entity
- lib/photos-library/photos-library
- lib/resources/event-manager
- lib/resources/events-types
- lib/resources/main
- lib/resources/network-manager
- lib/resources/network-types
- lib/resources/resource-manager
- lib/resources/resource-types
- lib/resources/validator
- lib/sync-engine/helper
- lib/sync-engine/sync-engine
- main