Dependency Management Process
Install dependencies
Dependency management will:
- Call
runSetup()
to check for and, if required, create the.vss
directory. - Call
loadArgs()
to prompt for project directory,atlas.json
location,atlas-settings.json
location and whether or not to force download of dependencies. - Call
loadSettings()
to validate and convertatlas-settings.json
into a VoltScript object (aMap
ofAtlasWebServerSettings
orAtlasGitHubSettings
). - Call
loadAtlas()
to validate and convertatlas.json
into anAtlas
VoltScript object. - Call
buildProjectDirectories()
to create directories for sourceDir, testDir, libsDir and vsesDir properties. - Convert the
Atlas
object into anEffectiveAtlas
. - Call
EffectiveAtlas.identifyDependenciesToDownload
to dentify any dependencies inatlas.json
that 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.json
that weren't found locally. If anatlas.json
was 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.json
is loaded into anAtlas
VoltScript object and converted to anEffectiveAtlas
VoltScript object. Any dependencies not already processed are downloaded. If anatlas.json
was also downloaded, the dependency is added to the bottom of the queue. - Call
copyDependencies()
to copy VoltScript Libraries from user's.vss
directory 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.vss
files not included in mainScripts, unitTestScript and integrationTestScripts.Note
This only runs if
libsDir
isn'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.json
should 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.vss
directory. - Call
loadCheckArgs()
to prompt for project directory,atlas.json
location,atlas-settings.json
location. - Call
loadSettings()
to validate and convertatlas-settings.json
into a VoltScript object (aMap
ofAtlasWebServerSettings
orAtlasGitHubSettings
). - Call
loadAtlas()
to validate and convertatlas.json
into anAtlas
VoltScript object. - Call
buildProjectDirectories()
to create directories for sourceDir, testDir, libsDir and vsesDir properties. - Convert the
Atlas
object into anEffectiveAtlas
. - Call
EffectiveAtlas.identifyDependenciesToDownload
to dentify any dependencies inatlas.json
that 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.json
that weren't found locally. If anatlas.json
was 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.json
is loaded into anAtlas
VoltScript object and converted to anEffectiveAtlas
VoltScript object. Any dependencies not already processed are downloaded. If anatlas.json
was 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.