Running functions
Installing dependencies
Running dependency management is done using VoltScript_Archipelago installDeps
, the Visual Studio Code command "VoltScript: Install Dependencies" or the icon at the top of the atlas.json's editor. It prompts for four parameters:
- root directory of the project to add dependencies to
- location of the
atlas-settings.json
- location of
atlas.json
to run against, which typically is in the root of the project, but could be elsewhere -
true/false to force download from remote repositories
If false, dependencies will be copied from local
.vss
directory, if available. If true, the relevant dependencies in the.vss
directory will be re-downloaded.
Dependency management will:
- Check for and, if required, create the
.vss
directory. - Create directories for sourceDir, testDir, libsDir and vsesDir properties.
- If not found locally or force is set to
true
, download VoltScript module dependencies in dependencies and theiratlas.json
files, if they exist, to the relevant file structure under the user's.vss
directory. - If not found locally or force is set to
true
, download VoltScript extensions in VSEDependencies to the relevant file structure under the user's.vss
directory. - If not found locally or force is set to
true
, download any required downstream dependencies. - Copy the dependencies to the relevant libsDir or vsesDir.
- If runtimePlatforms is defined, only the VSE files for the relevant platforms will be copied into vsesDir.
-
If
seti.ini
does not exist or force is set totrue
, aseti.ini
will be created for any VoltScript extensions.Note
If you add new VoltScript Extensions, delete the
seti.ini
before running dependency management or run with force astrue
to automatically update theseti.ini
. -
If no libsDir is set, sync between sourceDir and testDir, any
.vss
files not included in mainScripts, unitTestScript and integrationTestScripts. However, best practice is to put shared.vss
libraries into the libsDir. -
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.
Troubleshooting
If the VoltScript Dependency Manager fails, review the information printed to the console. An atlas-settings.json will be required for dependencies pulled from GitHub or from a web server that requires authentication. The dependencies will be downloaded to the .vss directory in the user's home before being copied to the project. If using a dev container, this will be the user's home in the container.
List dependencies
Listing dependencies performs similar to running dependency management, but doesn't add anything to the project. It can be done to understand where dependencies come from and version conflicts. It is done using VoltScript_Archipelago listDeps
or the Visual Studio Code command "VoltScript: List Dependencies". It prompts for four parameters:
- root directory of the project to add dependencies to
- location of the
atlas-settings.json
- location of
atlas.json
to run against, which typically is in the root of the project, but could be elsewhere
Listing dependencies will:
- Identifies VoltScript module dependencies in dependencies and their
atlas.json
files. - If not found locally, download VoltScript libraries in dependencies and their atlas.json files to the relevant file structure under the user's
.vss
directory. - If not found locally, download any required downstream dependencies.
- Print out dependencies and their versions.
Package for Volt Foundry
If you are deploying an integration service to Volt Foundry, you can package up the code with the build management extension. For more details see Package for Volt Foundry.