Dependency Management Process
Install dependencies
Dependency management will:
- Call
runSetup()to check for and, if required, create the.vssdirectory. - Call
loadArgs()to prompt for project directory,atlas.jsonlocation,atlas-settings.jsonlocation and whether or not to force download of dependencies. - Call
loadSettings()to validate and convertatlas-settings.jsoninto a VoltScript object (aMapofAtlasWebServerSettingsorAtlasGitHubSettings). - Call
loadAtlas()to validate and convertatlas.jsoninto anAtlasVoltScript object. - Call
buildProjectDirectories()to create directories for sourceDir, testDir, libsDir and vsesDir properties. - Convert the
Atlasobject into anEffectiveAtlas. - Call
EffectiveAtlas.identifyDependenciesToDownloadto dentify any dependencies inatlas.jsonthat can't be found locally. If the user chose to force download of dependencies, this is all dependencies. - Call
downloadDirectDependencies()to calldownloadDependency()for any dependencies explicitly referenced in theatlas.jsonthat weren't found locally. If anatlas.jsonwas downloaded, the dependency is added to a queue to process for downstream dependencies. - Call
downloadDownstreamDependencies()to iterate the queue of dependencies that were downloaded with anatlas.json. Thatatlas.jsonis loaded into anAtlasVoltScript object and converted to anEffectiveAtlasVoltScript object. Any dependencies not already processed are downloaded. If anatlas.jsonwas also downloaded, the dependency is added to the bottom of the queue. - Call
copyDependencies()to copy VoltScript Libraries from user's.vssdirectory to libsDir. VoltScript Extensions are extracted into vsesDir, depending on runtimePlatforms property, and the platform-specific names of the actual VoltScript Extension identified. - Call
CreateSetiIni()to create a seti.ini for any VoltScript extensions, if seti.ini doesn't exist or force is set totrue. Otherwise, the existing seti.ini won't be updated. -
Call
copyMiscFiles()to sync between sourceDir and testDir any.vssfiles not included in mainScripts, unitTestScript and integrationTestScripts.Note
This only runs if
libsDirisn't set. -
Create an effective-atlas.json with verbose details of actual versions, actual locations, and actual repositories used. This can be used to troubleshoot unexpected behavior.
Note
effective-atlas.jsonshould be excluded in your.gitignore.
List dependencies
The "list dependencies" process is similar, except VSEs are not downloaded. The atlas.json of VoltScript Libraries needs to be downloaded to check downbstream dependencies. The list process will:
- Call
runSetup()to check for and, if required, create the.vssdirectory. - Call
loadCheckArgs()to prompt for project directory,atlas.jsonlocation,atlas-settings.jsonlocation. - Call
loadSettings()to validate and convertatlas-settings.jsoninto a VoltScript object (aMapofAtlasWebServerSettingsorAtlasGitHubSettings). - Call
loadAtlas()to validate and convertatlas.jsoninto anAtlasVoltScript object. - Call
buildProjectDirectories()to create directories for sourceDir, testDir, libsDir and vsesDir properties. - Convert the
Atlasobject into anEffectiveAtlas. - Call
EffectiveAtlas.identifyDependenciesToDownloadto dentify any dependencies inatlas.jsonthat can't be found locally. If the user chose to force download of dependencies, this is all dependencies. - Call
downloadDirectDependencies()to calldownloadDependency()for any VoltScript Library dependencies explicitly referenced in theatlas.jsonthat weren't found locally. If anatlas.jsonwas downloaded, the dependency is added to a queue to process for downstream dependencies. - Call
downloadDownstreamDependencies()to iterate the queue of dependencies that were downloaded with anatlas.json. Thatatlas.jsonis loaded into anAtlasVoltScript object and converted to anEffectiveAtlasVoltScript object. Any dependencies not already processed are downloaded. If anatlas.jsonwas also downloaded, the dependency is added to the bottom of the queue. - Call
printDependencies()to print out a list of dependencies and any version conflicts.