Skip to content

Dynamic AppLoc for Streaming Apps #1403

@allanbowe

Description

@allanbowe

When compiling a streaming app for Viya (sasjs cb with streamWeb:true) we package up a build.sas deployment program that allows for site-specific modification of the appLoc (location in SAS drive where the app is deployed)

We also, during the deployment, using SAS code, do a find/replace so that the index.html contains references to the actual appLoc used (which is nearly always different from the one used to compile using the CLI)

The problem is that we are only doing that swap for the index.html file, and there can be additional paths to modify in CSS and JS files as well.

This ticket covers the work to update the mv_createfile.sas macro (to allow for find/replace) as well as the typescript changes needed here in the CLI to add the extra macro parameter when uploading a file with a HTML, CSS, or JS file extension.

The change needs to be made here: https://github.com/sasjs/cli/blob/main/src/commands/build/build.ts#L297

This part also needs to be refactored: https://github.com/sasjs/cli/blob/main/src/commands/build/build.ts#L156

Approx 25 lines here will also be unnecessary if they have been replaced in build.ts above: https://github.com/sasjs/cli/blob/main/src/commands/build/internal/getLaunchPageCode.ts#L17

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions