@sasjs/cli 4.12.4 → 4.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/commands/build/internal/getLaunchPageCode.js +1 -1
- package/build/commands/deploy/deploy.js +1 -1
- package/build/commands/deploy/internal/executeDeployScriptSasViya.js +1 -1
- package/build/commands/deploy/spec/cbd.spec.server.viya.js +1 -1
- package/build/commands/run/spec/run.spec.server.viya.js +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ exports.getLaunchPageCode = void 0;
|
|
|
4
4
|
var error_1 = require("@sasjs/utils/error");
|
|
5
5
|
var types_1 = require("@sasjs/utils/types");
|
|
6
6
|
var SAS9Code = function (streamServiceName) { return "\noptions notes;\ndata _null_;\n format url $256.;\n rc=METADATA_GETURI(\"Stored Process Web App\",url);\n url=coalescec(url,\"localhost/SASStoredProcess\");\n urlEscaped = tranwrd(trim(url),\" \",\"%20\");\n putlog \"NOTE: SASjs Streaming App Created! Check it out here:\" ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\n putlog \"NOTE- \" urlEscaped +(-1) \"?_program=&appLoc/services/".concat(streamServiceName, "\" ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\nrun;\n"); };
|
|
7
|
-
var SASViyaCode = function (streamServiceName) { return "\n\n/**\n * The streamService we just deployed (as a _FILE) had the compile-time appLoc\n * In this section we replace with the deploy-time appLoc\n */\n\nfilename _homein filesrvc\n folderPath=\"&apploc/services\"\n filename=\"".concat(streamServiceName, ".html\"\n recfm=v\n lrecl=1048544;\n\n%let local_file=%sysfunc(pathname(work))/service.html;\nfilename _homeout \"&local_file\";\n\ndata _null_;\n rc=fcopy('_homein','_homeout');\n put rc=;\nrun;\n\n%mp_replace(infile=\"&local_file\", findvar=compiled_apploc, replacevar=apploc)\n\ndata _null_;\n rc=fcopy('_homeout','_homein');\n put rc=;\nrun;\n\n/* Tell the user where the app was deployed so they can open it */\noptions notes;\ndata _null_;\n if symexist('_baseurl') then do;\n url=symget('_baseurl');\n if subpad(url,length(url)-9,9)='SASStudio'\n then url=substr(url,1,length(url)-11);\n else url=\"&systcpiphostname\";\n end;\n else url=\"&systcpiphostname\";\n url=cats(url,\"/SASJobExecution?_FILE=&appLoc/services/\");\n urlEscaped = tranwrd(trim(url),\" \",\"%20\");\n putlog \"NOTE: SASjs Streaming App Created! Check it out here:\" ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\n putlog \"NOTE- \" urlEscaped +(-1) '").concat(streamServiceName, ".html
|
|
7
|
+
var SASViyaCode = function (streamServiceName) { return "\n\n/**\n * The streamService we just deployed (as a _FILE) had the compile-time appLoc\n * In this section we replace with the deploy-time appLoc\n */\n\nfilename _homein filesrvc\n folderPath=\"&apploc/services\"\n filename=\"".concat(streamServiceName, ".html\"\n recfm=v\n lrecl=1048544;\n\n%let local_file=%sysfunc(pathname(work))/service.html;\nfilename _homeout \"&local_file\";\n\ndata _null_;\n rc=fcopy('_homein','_homeout');\n put rc=;\nrun;\n\n%mp_replace(infile=\"&local_file\", findvar=compiled_apploc, replacevar=apploc)\n\ndata _null_;\n rc=fcopy('_homeout','_homein');\n put rc=;\nrun;\n\n/* Tell the user where the app was deployed so they can open it */\noptions notes;\ndata _null_;\n if symexist('_baseurl') then do;\n url=symget('_baseurl');\n if subpad(url,length(url)-9,9)='SASStudio'\n then url=substr(url,1,length(url)-11);\n else url=\"&systcpiphostname\";\n end;\n else url=\"&systcpiphostname\";\n url=cats(url,\"/SASJobExecution?_FILE=&appLoc/services/\");\n urlEscaped = tranwrd(trim(url),\" \",\"%20\");\n putlog \"NOTE: SASjs Streaming App Created! Check it out here:\" ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\n putlog \"NOTE- \" urlEscaped +(-1) '").concat(streamServiceName, ".html' ;\n putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";putlog \"NOTE- \";\nrun;\n"); };
|
|
8
8
|
var getLaunchPageCode = function (serverType, streamServiceName) {
|
|
9
9
|
switch (serverType) {
|
|
10
10
|
case types_1.ServerType.SasViya:
|
|
@@ -76,7 +76,7 @@ function deploy(target, isLocal) {
|
|
|
76
76
|
webIndexFileName = (_e = (_d = (_c = servicesFolder === null || servicesFolder === void 0 ? void 0 : servicesFolder.members) === null || _c === void 0 ? void 0 : _c.find(function (member) { return (member === null || member === void 0 ? void 0 : member.type) === utils_1.MemberType.file; })) === null || _d === void 0 ? void 0 : _d.name) !== null && _e !== void 0 ? _e : '';
|
|
77
77
|
(_f = process.logger) === null || _f === void 0 ? void 0 : _f.success('Build pack has been successfully deployed.');
|
|
78
78
|
(_g = process.logger) === null || _g === void 0 ? void 0 : _g.success(target.serverType === utils_1.ServerType.SasViya && webIndexFileName
|
|
79
|
-
? "".concat(target.serverUrl, "/SASJobExecution?_file=").concat(appLoc, "/services/").concat(webIndexFileName
|
|
79
|
+
? "".concat(target.serverUrl, "/SASJobExecution?_file=").concat(appLoc, "/services/").concat(webIndexFileName)
|
|
80
80
|
: "".concat(target.serverUrl, "/SASJobExecution?_folder=").concat(appLoc));
|
|
81
81
|
return [3 /*break*/, 7];
|
|
82
82
|
case 3:
|
|
@@ -108,7 +108,7 @@ function executeDeployScriptSasViya(deployScriptName, target, linesToExecute, lo
|
|
|
108
108
|
(_d = process.logger) === null || _d === void 0 ? void 0 : _d.success("Deployment completed! Log is available at ".concat(logFilePath));
|
|
109
109
|
if (streamConfig === null || streamConfig === void 0 ? void 0 : streamConfig.streamWeb) {
|
|
110
110
|
appLoc = encodeURI(target.appLoc);
|
|
111
|
-
webAppStreamUrl = "".concat(target.serverUrl, "/SASJobExecution?_FILE=").concat(appLoc, "/services/").concat(streamConfig.streamServiceName, ".html
|
|
111
|
+
webAppStreamUrl = "".concat(target.serverUrl, "/SASJobExecution?_FILE=").concat(appLoc, "/services/").concat(streamConfig.streamServiceName, ".html");
|
|
112
112
|
(_e = process.logger) === null || _e === void 0 ? void 0 : _e.info("Web app is available at ".concat(webAppStreamUrl));
|
|
113
113
|
}
|
|
114
114
|
return [2 /*return*/];
|
|
@@ -328,7 +328,7 @@ describe('sasjs cbd with Viya', function () {
|
|
|
328
328
|
case 3:
|
|
329
329
|
logFileContent = _a.sent();
|
|
330
330
|
appLocTransformed = '/with%20some/space%20s';
|
|
331
|
-
streamingApplink = "".concat(target.serverUrl.replace('https://', ''), "/SASJobExecution?_FILE=").concat(appLoc).concat(appLocTransformed, "/services/").concat(streamConfig.streamServiceName, ".html
|
|
331
|
+
streamingApplink = "".concat(target.serverUrl.replace('https://', ''), "/SASJobExecution?_FILE=").concat(appLoc).concat(appLocTransformed, "/services/").concat(streamConfig.streamServiceName, ".html");
|
|
332
332
|
expect(logFileContent.replace(/\s/g, '')).toEqual(expect.stringContaining(streamingApplink));
|
|
333
333
|
return [2 /*return*/];
|
|
334
334
|
}
|
|
@@ -382,7 +382,7 @@ describe('sasjs run with Viya', function () {
|
|
|
382
382
|
return __generator(this, function (_a) {
|
|
383
383
|
switch (_a.label) {
|
|
384
384
|
case 0:
|
|
385
|
-
logPart = "SASjs Streaming App Created! Check it out here:\n \n \n \n \n your-sas-server.com/SASJobExecution?_FILE=".concat(target.appLoc, "/services/clickme.html
|
|
385
|
+
logPart = "SASjs Streaming App Created! Check it out here:\n \n \n \n \n your-sas-server.com/SASJobExecution?_FILE=".concat(target.appLoc, "/services/clickme.html\n");
|
|
386
386
|
return [4 /*yield*/, (0, build_1.build)(target)];
|
|
387
387
|
case 1:
|
|
388
388
|
_a.sent();
|
package/package.json
CHANGED