SASjs Config File

Type: object Default: {}

The SASjs Config file provides the settings and structure for your SASjs project.


Example:

{
    "macroFolders": [
        "macros"
    ],
    "programFolders": [
        "programs"
    ],
    "defaultTarget": "viya",
    "targets": [
        {
            "name": "viya",
            "serverType": "SASVIYA",
            "serverUrl": "http://sas.analytium.co.uk",
            "appLoc": "/Public/app",
            "contextName": "SAS Job Execution compute context",
            "deployConfig": {
                "deployServicePack": true,
                "deployScripts": [
                    "sasjsbuild/myviyadeploy.sas"
                ]
            },
            "serviceConfig": {
                "serviceFolders": [
                    "targets/viya/services/admin"
                ],
                "initProgram": "build/serviceinit.sas",
                "termProgram": "build/serviceinit.sas",
                "macroVars": {
                    "name": "viyavalue",
                    "extravar": "this too"
                }
            },
            "jobConfig": {
                "jobFolders": [],
                "initProgram": "",
                "termProgram": "",
                "macroVars": {}
            },
            "streamConfig": {
                "assetPaths": [],
                "streamWeb": false,
                "streamWebFolder": "webv",
                "webSourcePath": "dist"
            },
            "testConfig": {
                "initProgram": "sasjs/tests/testinit.sas",
                "termProgram": "sasjs/tests/testterm.sas",
                "macroVars": {
                    "testVar": "testValue"
                },
                "testSetUp": "sasjs/tests/testsetup.sas",
                "testTearDown": "sasjs/tests/testteardown.sas"
            },
            "macroFolders": [
                "targets/viya/macros"
            ],
            "programFolders": []
        },
        {
            "name": "sas9",
            "serverType": "SAS9",
            "serverUrl": "http://sas.analytium.co.uk:7980",
            "appLoc": "/User Folders/&sysuserid/My Folder",
            "serverName": "Foundation",
            "repositoryName": "SASApp",
            "buildConfig": {
                "buildOutputFileName": "mysas9deploy.sas",
                "initProgram": "",
                "termProgram": "",
                "macroVars": {}
            },
            "deployConfig": {
                "deployScripts": [
                    "build/deploysas9.sh"
                ],
                "deployServicePack": false
            },
            "serviceConfig": {
                "serviceFolders": [
                    "targets/sas9/services/admin"
                ],
                "initProgram": "",
                "termProgram": "build/servicetermother.sas",
                "macroVars": {}
            },
            "streamConfig": {
                "assetPaths": [],
                "streamWeb": false,
                "streamWebFolder": "web9",
                "webSourcePath": "dist"
            },
            "testConfig": {
                "initProgram": "sasjs/tests/testinit.sas",
                "termProgram": "sasjs/tests/testterm.sas",
                "macroVars": {
                    "testVar": "testValue"
                },
                "testSetUp": "sasjs/tests/testsetup.sas",
                "testTearDown": "sasjs/tests/testteardown.sas"
            },
            "macroFolders": [
                "targets/sas9/macros"
            ],
            "programFolders": []
        }
    ]
}

Type: string Default: "sasjsbuild"

In a local config, outputs go to the sasjsbuild folder by default. In global, the default is ~/.sasjsbuild.


Examples:

"sasjsbuild"
".sasjsbuild"

Type: string Default: "viya"

If a target is not specified, this target is used by default. The default target must exist in the (local) targets array.


Example:

"viya"

Type: object Default: {"dataControllerUrl": "https://mysasserver.com/web/datacontroller/#", "enableLineage": true, "doxyContent": {"readMe": "../../README.md"}}

SASjs uses doxygen to auto-generate HTML documentation using the headers in your SAS programs, macros, services & jobs. For more info, see https://cli.sasjs.io/doc. Some properties are taken from package.json (such as the project Name).


Example:

{
    "displayMacroCore": true,
    "outDirectory": "/some/output/directory",
    "dataControllerUrl": "https://mysasserver.com/web/datacontroller/#",
    "enableLineage": true,
    "doxyContent": {
        "readMe": "../../my/custom/homepage.md",
        "path": "my/custom/doxy/folder"
    }
}

Type: boolean Default: true

The CLI will autocompile macro dependencies that exist in the SASjs Macro Core library. These will also show in the documentation under 'node_modules'. If you'd prefer not to show these in the rendered docs, set this value to false.


Example:

true

Type: string Default: "sasjsbuild/doc"

The location to which the generated HTML SAS documentation is written. If missing, or left blank, the files will be written to the sasjsbuild/doc directory (default behaviour).


Example:

"/my/preferred/docs/directory"

Type: string Default: ""

Provide the full URL to Data Controller so that sasjs doc can link the lineage diagram directly to the table viewer in Data Controller.
If left blank, or undefined, no links will be generated.


Example:

"https://yourserver.co.uk/dcviya/#"

Type: boolean Default: true

If true, sasjs doc will generate and display Data Lineage from Jobs and Services.

Type: object Default: {}

Configuration of the Doxyfile variables


Example:

{
    "favIcon": "favicon.ico",
    "footer": "new_footer.html",
    "header": "new_header.html",
    "layout": "DoxygenLayout.xml",
    "logo": "logo.png",
    "readMe": "../../README.md",
    "stylesheet": "new_stylesheet.css",
    "path": "sasjs/doxy"
}

Type: string Default: "favicon.ico"

The favicon used in the doxygen documentation

Type: string Default: "new_header.html"

The header HTML file used in the doxygen documentation

Type: string Default: "DoxygenLayout.xml"

The layout XML file used to build the doxygen documentation

Type: string Default: "../../README.md"

The file used to generate the doxygen homepage (defaults to the readme.md)

Type: string Default: "new_stylesheet.css"

The CSS file used to extend Doxygen

Type: string Default: "sasjs/doxy"

The path to the Doxygen configuration files (relative to sasjs/sasjsconfig.json)

Type: object

Dictates which files get compiled into the build program (.sas), used to deploy services into SAS 9 or Viya environments (without a client/secret). You may use this config to include build specific macros, programs or macro variables - which is run a single time, on deployment - for things like database creation, or exporting a SAS 9 SPK after service creation.


Example:

{
    "initProgram": "build/buildinit.sas",
    "termProgram": "build/buildterm.sas",
    "macroVars": {
        "name": "value",
        "numvar": "42"
    },
    "buildOutputFileName": "buildpack.sas",
    "buildOutputFolder": "sasjsbuild",
    "buildResultsFolder": "sasjsresults"
}

Type: string

The name of the generated .sas program, which can be used to deploy the app using only SAS Studio. By default, this will be the name of the target.


Examples:

"viya.sas"
"sas9.sas"

Type: string Default: "sasjsbuild"

The name of the folder containing the compiled output. The sasjs build command will take all of the subfolders here as inputs to create the build pack. By default this will be named sasjsbuild.

Type: string Default: "sasjsresults"

The name of the folder containing the output (eg logs, ODS output) from sasjs run. By default this will be named sasjsresults.

Type: string Default: "sasjs/buildinit.sas"

The path to a .sas program that will be inserted at the start of the build .sas program (created when running sasjs build).

Type: string Default: "sasjs/buildterm.sas"

The path to a .sas program that will be inserted at the end of the build .sas program (created when running sasjs build).

Type: object Default: {}

A series of name value pairs that will be turned into SAS macro variables in the build .sas program (generated when running sasjs build). The example provided will generate sas code as follows:

%let name=value;
%let numvar=42;

Example:

{
    "name": "value",
    "numvar": "42"
}

Type: object Default: {}

The deployConfig object enables settings that relate to the deployment of a SAS app - be that Viya, or SAS 9, or a pure Base environment.


Examples:

{
    "deployScripts": [
        "build/deployscript.sh"
    ]
}
{
    "deployScripts": [
        "build/deployscript.sh"
    ],
    "deployServicePack": true
}

Type: array Default: []

These scripts are executed when running sasjs deploy. If the file is a .sas file, it is executed on the SAS server (Viya only). Otherwise it is executed locally. These scripts are run AFTER the deployment of the servicepack, if deployServicePack:true (Viya only).


Example:

[
    "build/deployscript.sh",
    "build/myprogram.sas"
]

Type: boolean Default: [false]

If set to true the json pack produced by sasjs build will be auto-deployed to the appLoc of the specified target (creating all jobs and services in the SAS folder tree). Currently only Viya is supported for this flag.

Type: object Default: {}

The serviceConfig object defines how SASjs web services are compiled. Web services differ from jobs in that they include some fixed pre-code (eg the macros to stream out the result json).


Example:

{
    "serviceFolders": [
        "services/common",
        "services/admin"
    ],
    "initProgram": "build/serviceinit.sas",
    "termProgram": "build/serviceterm.sas",
    "macroVars": {
        "mac1": "value",
        "mac2": "42"
    }
}

Type: array Default: []

When running sasjs compile, all programs in the folders defined in this array are compiled and placed into same-named folders under sasjsbuild/services. They will be compiled as services (so, with the service pre-code). Folders can be absolute, or relative to the sasjs folder.


Example:

[
    "services/common",
    "services/admin"
]

Type: string Default: ""

The serviceConfig initProgram is a .sas file that is inserted at the start of every SAS service (after compiled macros and any macroVars, and before the service itself).


Example:

"build/serviceinit.sas"

Type: string Default: ""

The serviceConfig termProgram is inserted at the end of every service as part of sasjs compile.


Example:

"build/serviceterm.sas"

Type: object Default: {}

This object allows sasjs compile to insert specific macro variables at the start of every service. In this case, the code generated would be:

%let mac1=value;
%let mac2=42;

Example:

{
    "mac1": "value",
    "mac2": "42"
}

Type: object Default: {}

The jobConfig object defines how SASjs Jobs are compiled.


Example:

{
    "jobFolders": [
        "jobs/extract",
        "jobs/load"
    ],
    "initProgram": "jobs/jobinit.sas",
    "termProgram": "jobs/jobterm.sas",
    "macroVars": {
        "mac1": "value",
        "mac2": "42"
    }
}

Type: array Default: []

When running sasjs compile, all programs in the local folders defined in this array are compiled and placed into same-named folders under sasjsbuild/jobs. Folders can be absolute, or relative to the local project /sasjs folder.


Example:

[
    "jobs/extract",
    "jobs/transform",
    "jobs/load"
]

Type: string Default: ""

The jobConfig initProgram is a local .sas file that is inserted at the start of every SAS Job (after compiled macros and any macroVars, and before the Job itself).


Example:

"jobs/jobinit.sas"

Type: string Default: ""

The jobConfig termProgram is inserted at the end of every Job as part of sasjs compile.


Example:

"jobs/jobterm.sas"

Type: object Default: {}

This object allows sasjs compile to insert specific macro variables at the start of every Job. In this case, the code generated would be:

%let mac1=value;
%let mac2=42;

Example:

{
    "mac1": "value",
    "mac2": "42"
}

Type: object Default: {}

SASjs allows the frontend of a local web app to be compiled such that all html, css, javascript, and other assets such as png or mp4 are converted into web services and streamed directly from SAS.

This approach is convenient as it bypasses the need to deploy to a web server.


Example:

{
    "assetPaths": [],
    "streamWeb": false,
    "streamWebFolder": "webv",
    "webSourcePath": "dist"
}

Type: array Default: []

An array of local folders. All assets placed in these folders are converted into web services - example file types could be png, svg, mp3, mp4, excel - anything really.


Example:

[
    "/myassets"
]

Type: boolean Default: false

When set to true, frontend files saved in the webSourcePath will be converted to streaming services in the streamWebFolder in SAS.


Example:

true

Type: string Default: "webv"

This is the target SAS folder (relative to the appLoc) where the compiled web assets will be created.

Type: string Default: "dist"

When streamConfig is set to true, all files in this folder will be converted to streaming web services. The index.html will be taken as a baseline, and all relative URLS will be prefixed such that the links still work and the assets still load.

Type: string Default: "clickme.sas"

The name of the service containing the index.html for a streaming web app. Defaults to clickme and is always deployed under the appLoc/services SAS Folder.

Type: object Default: {"initProgram": "sasjs/tests/testinit.sas", "termProgram": "sasjs/tests/testterm.sas", "macroVars": {"testVar": "testValue"}, "testSetUp": "sasjs/tests/testsetup.sas", "testTearDown": "sasjs/tests/testteardown.sas"}

Create tests for Macros, Services & Jobs by simply adding a '.test.sas' extension.

Type: string Default: ""

The testConfig initProgram is a local .sas file that is inserted at the start of every Test (after compiled macros and any macroVars, and before the Test itself).


Example:

"sasjs/tests/testinit.sas"

Type: string Default: ""

The testConfig termProgram is inserted at the end of every Test as part of sasjs compile.


Example:

"jobs/jobterm.sas"

Type: object Default: {}

This object allows sasjs compile to insert specific macro variables at the start of every Test. In this case, the code generated would be:

%let mac1=value;
%let mac2=42;

Example:

{
    "mac1": "value",
    "mac2": "42"
}

Type: string Default: "sasjs/tests/testsetup.sas"

This program is the first to execute as part of 'sasjs test'. It does not contain the testInit, testTerm or macroVariables. It IS compiled.


Example:

"sasjs/tests/testsetup.sas"

Type: string Default: "sasjs/tests/testteardown.sas"

The last program to execute as part of 'sasjs test'.


Example:

"sasjs/tests/testteardown.sas"

Type: array Default: []

These local folders are searched for SAS Macros when running sasjs compile. Folders are relative to the sasjs/sasjsconfig.json file.


Example:

[
    "macros",
    "../../more_macros"
]

Type: array Default: []

These local folders are searched for SAS Programs when running sasjs compile. Folders are relative to the sasjs/sasjsconfig.json file.


Example:

[
    "programs",
    "../../more_programs"
]

Type: array Default: []

A target is an alias for a deployment location, and includes at a minimum, the serverUrl, serverType and appLoc. This array allows multiple targets to be defined (eg dev / test / prod). Any properties defined here will override same-named properties in the sasjsconfig root.

Each item of this array must be:


Type: object Default: {}

A target provides the configuration specific to a particular deployment, eg DEV / TEST, or SAS9 / SASVIYA.


Example:

{
    "name": "viya",
    "serverType": "SASVIYA",
    "serverUrl": "https://sas.analytium.co.uk",
    "appLoc": "/Public/app",
    "contextName": "SAS Job Execution compute context",
    "buildConfig": {
        "buildOutputFileName": "myviyadeploy.sas",
        "initProgram": "build/buildinitviya.sas",
        "termProgram": "targets/viya/viyabuildterm.sas",
        "macroVars": {
            "name": "viyavalue",
            "extravar": "this too"
        }
    },
    "deployConfig": {
        "deployServicePack": true,
        "deployScripts": [
            "sasjsbuild/myviyadeploy.sas"
        ]
    },
    "serviceConfig": {
        "serviceFolders": [
            "targets/viya/services/admin"
        ],
        "initProgram": "build/serviceinit.sas",
        "termProgram": "build/serviceinit.sas",
        "macroVars": {
            "name": "viyavalue",
            "extravar": "this too"
        }
    },
    "jobConfig": {
        "jobFolders": [],
        "initProgram": "",
        "termProgram": "",
        "macroVars": {}
    },
    "streamConfig": {
        "assetPaths": [],
        "streamWeb": false,
        "streamWebFolder": "webv",
        "webSourcePath": "dist"
    },
    "testConfig": {
        "initProgram": "sasjs/tests/testinit.sas",
        "termProgram": "sasjs/tests/testterm.sas",
        "macroVars": {
            "testVar": "testValue"
        },
        "testSetUp": "sasjs/tests/testsetup.sas",
        "testTearDown": "sasjs/tests/testteardown.sas"
    },
    "macroFolders": [
        "targets/viya/macros"
    ],
    "programFolders": []
}

Type: string Default: ""

A target name can only contain alphanumeric characters and dashes. It cannot contain spaces. It is used as the alias when referencing the target using the -t attribute in many of the SASjs commands.


Example:

"viya"

Type: string Default: ""

The serverType can be either SAS9 or SASVIYA.


Example:

"SASVIYA"

Type: string Default: ""

The serverUrl is the location to which the app is deployed, and against which any server based operations are performed. If SAS is served from a particular port, that port should also be included here.


Examples:

"https://sas.analytium.co.uk"
"https://sas.analytium.co.uk:8080"

Type: string Default: ""

The appLoc provides the root SAS folder location under which all jobs and services are deployed and executed. The SAS folder could be metadata in SAS 9, or SAS Drive in Viya.


Example:

"/Public/app"

Type: boolean Default: false

If you are having certificate errors connecting to SAS, that cannot be properly resolved, try setting this value to true.


Examples:

true
false

Type: string Default: "SAS Job Execution compute context"

The name of the compute context used to execute SAS code. The context determines the way in which the SAS session is spawned (eg user credentials, autoexec code, system options etc).
Contexts can be created / modified / deleted using the sasjs context command.


Example:

"SAS Job Execution compute context"

Type: object

Dictates which files get compiled into the build program (.sas), used to deploy services into SAS 9 or Viya environments (without a client/secret). You may use this config to include build specific macros, programs or macro variables - which is run a single time, on deployment - for things like database creation, or exporting a SAS 9 SPK after service creation.


Example:

{
    "initProgram": "build/buildinit.sas",
    "termProgram": "build/buildterm.sas",
    "macroVars": {
        "name": "value",
        "numvar": "42"
    },
    "buildOutputFileName": "buildpack.sas",
    "buildOutputFolder": "sasjsbuild",
    "buildResultsFolder": "sasjsresults"
}

Type: string

The name of the generated .sas program, which can be used to deploy the app using only SAS Studio. By default, this will be the name of the target.


Examples:

"viya.sas"
"sas9.sas"

Type: string Default: "sasjsbuild"

The name of the folder containing the compiled output. The sasjs build command will take all of the subfolders here as inputs to create the build pack. By default this will be named sasjsbuild.

Type: string Default: "sasjsresults"

The name of the folder containing the output (eg logs, ODS output) from sasjs run. By default this will be named sasjsresults.

Type: string Default: "sasjs/buildinit.sas"

The path to a .sas program that will be inserted at the start of the build .sas program (created when running sasjs build).

Type: string Default: "sasjs/buildterm.sas"

The path to a .sas program that will be inserted at the end of the build .sas program (created when running sasjs build).

Type: object Default: {}

A series of name value pairs that will be turned into SAS macro variables in the build .sas program (generated when running sasjs build). The example provided will generate sas code as follows:

%let name=value;
%let numvar=42;

Example:

{
    "name": "value",
    "numvar": "42"
}

Type: object Default: {}

The deployConfig object enables settings that relate to the deployment of a SAS app - be that Viya, or SAS 9, or a pure Base environment.


Examples:

{
    "deployScripts": [
        "build/deployscript.sh"
    ]
}
{
    "deployScripts": [
        "build/deployscript.sh"
    ],
    "deployServicePack": true
}

Type: array Default: []

These scripts are executed when running sasjs deploy. If the file is a .sas file, it is executed on the SAS server (Viya only). Otherwise it is executed locally. These scripts are run AFTER the deployment of the servicepack, if deployServicePack:true (Viya only).


Example:

[
    "build/deployscript.sh",
    "build/myprogram.sas"
]

Type: boolean Default: [false]

If set to true the json pack produced by sasjs build will be auto-deployed to the appLoc of the specified target (creating all jobs and services in the SAS folder tree). Currently only Viya is supported for this flag.

Type: object Default: {}

The serviceConfig object defines how SASjs web services are compiled. Web services differ from jobs in that they include some fixed pre-code (eg the macros to stream out the result json).


Example:

{
    "serviceFolders": [
        "services/common",
        "services/admin"
    ],
    "initProgram": "build/serviceinit.sas",
    "termProgram": "build/serviceterm.sas",
    "macroVars": {
        "mac1": "value",
        "mac2": "42"
    }
}

Type: array Default: []

When running sasjs compile, all programs in the folders defined in this array are compiled and placed into same-named folders under sasjsbuild/services. They will be compiled as services (so, with the service pre-code). Folders can be absolute, or relative to the sasjs folder.


Example:

[
    "services/common",
    "services/admin"
]

Type: string Default: ""

The serviceConfig initProgram is a .sas file that is inserted at the start of every SAS service (after compiled macros and any macroVars, and before the service itself).


Example:

"build/serviceinit.sas"

Type: string Default: ""

The serviceConfig termProgram is inserted at the end of every service as part of sasjs compile.


Example:

"build/serviceterm.sas"

Type: object Default: {}

This object allows sasjs compile to insert specific macro variables at the start of every service. In this case, the code generated would be:

%let mac1=value;
%let mac2=42;

Example:

{
    "mac1": "value",
    "mac2": "42"
}

Type: object Default: {}

The jobConfig object defines how SASjs Jobs are compiled.


Example:

{
    "jobFolders": [
        "jobs/extract",
        "jobs/load"
    ],
    "initProgram": "jobs/jobinit.sas",
    "termProgram": "jobs/jobterm.sas",
    "macroVars": {
        "mac1": "value",
        "mac2": "42"
    }
}

Type: array Default: []

When running sasjs compile, all programs in the local folders defined in this array are compiled and placed into same-named folders under sasjsbuild/jobs. Folders can be absolute, or relative to the local project /sasjs folder.


Example:

[
    "jobs/extract",
    "jobs/transform",
    "jobs/load"
]

Type: string Default: ""

The jobConfig initProgram is a local .sas file that is inserted at the start of every SAS Job (after compiled macros and any macroVars, and before the Job itself).


Example:

"jobs/jobinit.sas"

Type: string Default: ""

The jobConfig termProgram is inserted at the end of every Job as part of sasjs compile.


Example:

"jobs/jobterm.sas"

Type: object Default: {}

This object allows sasjs compile to insert specific macro variables at the start of every Job. In this case, the code generated would be:

%let mac1=value;
%let mac2=42;

Example:

{
    "mac1": "value",
    "mac2": "42"
}

Type: object Default: {"dataControllerUrl": "https://mysasserver.com/web/datacontroller/#", "enableLineage": true, "doxyContent": {"readMe": "../../README.md"}}

SASjs uses doxygen to auto-generate HTML documentation using the headers in your SAS programs, macros, services & jobs. For more info, see https://cli.sasjs.io/doc. Some properties are taken from package.json (such as the project Name).


Example:

{
    "displayMacroCore": true,
    "outDirectory": "/some/output/directory",
    "dataControllerUrl": "https://mysasserver.com/web/datacontroller/#",
    "enableLineage": true,
    "doxyContent": {
        "readMe": "../../my/custom/homepage.md",
        "path": "my/custom/doxy/folder"
    }
}

Type: boolean Default: true

The CLI will autocompile macro dependencies that exist in the SASjs Macro Core library. These will also show in the documentation under 'node_modules'. If you'd prefer not to show these in the rendered docs, set this value to false.


Example:

true

Type: string Default: "sasjsbuild/doc"

The location to which the generated HTML SAS documentation is written. If missing, or left blank, the files will be written to the sasjsbuild/doc directory (default behaviour).


Example:

"/my/preferred/docs/directory"

Type: string Default: ""

Provide the full URL to Data Controller so that sasjs doc can link the lineage diagram directly to the table viewer in Data Controller.
If left blank, or undefined, no links will be generated.


Example:

"https://yourserver.co.uk/dcviya/#"

Type: boolean Default: true

If true, sasjs doc will generate and display Data Lineage from Jobs and Services.

Type: object Default: {}

Configuration of the Doxyfile variables


Example:

{
    "favIcon": "favicon.ico",
    "footer": "new_footer.html",
    "header": "new_header.html",
    "layout": "DoxygenLayout.xml",
    "logo": "logo.png",
    "readMe": "../../README.md",
    "stylesheet": "new_stylesheet.css",
    "path": "sasjs/doxy"
}

Type: string Default: "favicon.ico"

The favicon used in the doxygen documentation

Type: string Default: "new_header.html"

The header HTML file used in the doxygen documentation

Type: string Default: "DoxygenLayout.xml"

The layout XML file used to build the doxygen documentation

Type: string Default: "../../README.md"

The file used to generate the doxygen homepage (defaults to the readme.md)

Type: string Default: "new_stylesheet.css"

The CSS file used to extend Doxygen

Type: string Default: "sasjs/doxy"

The path to the Doxygen configuration files (relative to sasjs/sasjsconfig.json)

Type: object Default: {}

SASjs allows the frontend of a local web app to be compiled such that all html, css, javascript, and other assets such as png or mp4 are converted into web services and streamed directly from SAS.

This approach is convenient as it bypasses the need to deploy to a web server.


Example:

{
    "assetPaths": [],
    "streamWeb": false,
    "streamWebFolder": "webv",
    "webSourcePath": "dist"
}

Type: array Default: []

An array of local folders. All assets placed in these folders are converted into web services - example file types could be png, svg, mp3, mp4, excel - anything really.


Example:

[
    "/myassets"
]

Type: boolean Default: false

When set to true, frontend files saved in the webSourcePath will be converted to streaming services in the streamWebFolder in SAS.


Example:

true

Type: string Default: "webv"

This is the target SAS folder (relative to the appLoc) where the compiled web assets will be created.

Type: string Default: "dist"

When streamConfig is set to true, all files in this folder will be converted to streaming web services. The index.html will be taken as a baseline, and all relative URLS will be prefixed such that the links still work and the assets still load.

Type: string Default: "clickme.sas"

The name of the service containing the index.html for a streaming web app. Defaults to clickme and is always deployed under the appLoc/services SAS Folder.

Type: object Default: {"initProgram": "sasjs/tests/testinit.sas", "termProgram": "sasjs/tests/testterm.sas", "macroVars": {"testVar": "testValue"}, "testSetUp": "sasjs/tests/testsetup.sas", "testTearDown": "sasjs/tests/testteardown.sas"}

Create tests for Macros, Services & Jobs by simply adding a '.test.sas' extension.

Type: string Default: ""

The testConfig initProgram is a local .sas file that is inserted at the start of every Test (after compiled macros and any macroVars, and before the Test itself).


Example:

"sasjs/tests/testinit.sas"

Type: string Default: ""

The testConfig termProgram is inserted at the end of every Test as part of sasjs compile.


Example:

"jobs/jobterm.sas"

Type: object Default: {}

This object allows sasjs compile to insert specific macro variables at the start of every Test. In this case, the code generated would be:

%let mac1=value;
%let mac2=42;

Example:

{
    "mac1": "value",
    "mac2": "42"
}

Type: string Default: "sasjs/tests/testsetup.sas"

This program is the first to execute as part of 'sasjs test'. It does not contain the testInit, testTerm or macroVariables. It IS compiled.


Example:

"sasjs/tests/testsetup.sas"

Type: string Default: "sasjs/tests/testteardown.sas"

The last program to execute as part of 'sasjs test'.


Example:

"sasjs/tests/testteardown.sas"

Type: array Default: []

These local folders are searched for SAS Macros when running sasjs compile. Folders are relative to the sasjs/sasjsconfig.json file.


Example:

[
    "macros",
    "../../more_macros"
]

Type: array Default: []

These local folders are searched for SAS Programs when running sasjs compile. Folders are relative to the sasjs/sasjsconfig.json file.


Example:

[
    "programs",
    "../../more_programs"
]

Examples:

[
    {
        "name": "sas9target",
        "serverType": "SAS9",
        "serverUrl": "https://mysas9server",
        "appLoc": "/Shared Folders/myApp"
    }
]
[
    {
        "name": "viya",
        "serverType": "SASVIYA",
        "serverUrl": "https://sas.analytium.co.uk",
        "appLoc": "/Public/app",
        "contextName": "SAS Job Execution compute context",
        "buildConfig": {
            "buildOutputFileName": "myviyadeploy.sas",
            "initProgram": "build/buildinitviya.sas",
            "termProgram": "targets/viya/viyabuildterm.sas",
            "macroVars": {
                "name": "viyavalue",
                "extravar": "this too"
            }
        },
        "deployConfig": {
            "deployServicePack": true,
            "deployScripts": [
                "sasjsbuild/myviyadeploy.sas"
            ]
        },
        "serviceConfig": {
            "serviceFolders": [
                "targets/viya/services/admin"
            ],
            "initProgram": "build/serviceinit.sas",
            "termProgram": "build/serviceinit.sas",
            "macroVars": {
                "name": "viyavalue",
                "extravar": "this too"
            }
        },
        "streamConfig": {
            "assetPaths": [],
            "streamWeb": false,
            "streamWebFolder": "webv",
            "webSourcePath": "dist"
        },
        "testConfig": {
            "initProgram": "sasjs/tests/testinit.sas",
            "termProgram": "sasjs/tests/testterm.sas",
            "macroVars": {
                "testVar": "testValue"
            },
            "testSetUp": "sasjs/tests/testsetup.sas",
            "testTearDown": "sasjs/tests/testteardown.sas"
        },
        "macroFolders": [
            "targets/viya/macros"
        ]
    },
    {
        "name": "sas9",
        "serverType": "SAS9",
        "serverUrl": "http://sas.analytium.co.uk:7980",
        "appLoc": "/User Folders/&sysuserid/My Folder",
        "serverName": "Foundation",
        "repositoryName": "SASApp",
        "buildConfig": {
            "buildOutputFileName": "mysas9deploy.sas",
            "initProgram": "",
            "termProgram": "",
            "macroVars": {}
        },
        "deployConfig": {
            "deployScripts": [
                "build/deploysas9.sh"
            ],
            "deployServicePack": false
        },
        "serviceConfig": {
            "serviceFolders": [
                "targets/sas9/services/admin"
            ],
            "initProgram": "",
            "termProgram": "build/servicetermother.sas",
            "macroVars": {}
        },
        "streamConfig": {
            "assetPaths": [],
            "streamWeb": false,
            "streamWebFolder": "web9",
            "webSourcePath": "dist"
        },
        "testConfig": {
            "initProgram": "sasjs/tests/testinit.sas",
            "termProgram": "sasjs/tests/testterm.sas",
            "macroVars": {
                "testVar": "testValue"
            },
            "testSetUp": "sasjs/tests/testsetup.sas",
            "testTearDown": "sasjs/tests/testteardown.sas"
        },
        "macroFolders": [
            "targets/sas9/macros"
        ],
        "programFolders": []
    }
]