@sasjs/cli 3.10.2 → 3.11.0

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.
@@ -330,11 +330,12 @@ function deployToSas9(deployScriptName, target, linesToExecute, logFolder, strea
330
330
  * Deploys app to `SASJS` server.
331
331
  * @param {Target} target- the target having deploy configuration.
332
332
  * @param {object} sasjs - optional configuration object of SAS adapter.
333
+ * @param {object} streamConfig - optional config for deploying streaming app.
333
334
  */
334
335
  function deployToSasjs(target, sasjs, streamConfig) {
335
336
  var _a, _b, _c;
336
337
  return __awaiter(this, void 0, void 0, function () {
337
- var buildDestinationFolder, finalFilePathJSON, jsonContent, payload, authConfig, e_2, result, appLoc, webAppStreamUrl;
338
+ var buildDestinationFolder, finalFilePathJSON, jsonContent, payload, authConfig, e_2, result, webAppStreamUrl;
338
339
  return __generator(this, function (_d) {
339
340
  switch (_d.label) {
340
341
  case 0:
@@ -363,7 +364,7 @@ function deployToSasjs(target, sasjs, streamConfig) {
363
364
  e_2 = _d.sent();
364
365
  return [3 /*break*/, 5];
365
366
  case 5: return [4 /*yield*/, sasjs
366
- .deployToSASjs(payload, undefined, authConfig)
367
+ .deployToSASjs(payload, undefined, streamConfig, authConfig)
367
368
  .catch(function (err) {
368
369
  var _a;
369
370
  (_a = process.logger) === null || _a === void 0 ? void 0 : _a.error(err);
@@ -376,9 +377,8 @@ function deployToSasjs(target, sasjs, streamConfig) {
376
377
  (_b = process.logger) === null || _b === void 0 ? void 0 : _b.info("Payload example:\n".concat(JSON.stringify(result.example, null, 2)));
377
378
  }
378
379
  }
379
- if (streamConfig === null || streamConfig === void 0 ? void 0 : streamConfig.streamWeb) {
380
- appLoc = encodeURI(target.appLoc);
381
- webAppStreamUrl = "".concat(target.serverUrl, "/AppStream").concat(appLoc);
380
+ if ((streamConfig === null || streamConfig === void 0 ? void 0 : streamConfig.streamWeb) && (result === null || result === void 0 ? void 0 : result.streamServiceName)) {
381
+ webAppStreamUrl = "".concat(target.serverUrl, "/AppStream/").concat(result.streamServiceName);
382
382
  (_c = process.logger) === null || _c === void 0 ? void 0 : _c.info("Web app is available at ".concat(webAppStreamUrl));
383
383
  }
384
384
  return [2 /*return*/];
@@ -78,7 +78,7 @@ describe('sasjs cbd with server type SASJS', function () {
78
78
  });
79
79
  }); });
80
80
  it("should deploy compile and build to sasjs/server", function () { return __awaiter(void 0, void 0, void 0, function () {
81
- var sasjs, customTarget, macroCorePath, mf_getuser, mp_jsonout, ms_webout, webout;
81
+ var sasjs, customTarget, macroCorePath, mf_getuser, mp_jsonout, ms_webout, webout, streamConfig;
82
82
  return __generator(this, function (_a) {
83
83
  switch (_a.label) {
84
84
  case 0:
@@ -125,6 +125,13 @@ describe('sasjs cbd with server type SASJS', function () {
125
125
  ' ,showmeta=&showmeta\n' +
126
126
  ' )' +
127
127
  ' %mend;\n';
128
+ streamConfig = {
129
+ assetPaths: [],
130
+ streamServiceName: 'clickme',
131
+ streamWeb: false,
132
+ streamWebFolder: '',
133
+ webSourcePath: ''
134
+ };
128
135
  expect(sasjs.deployToSASjs).toHaveBeenCalledWith({
129
136
  members: [
130
137
  {
@@ -152,7 +159,7 @@ describe('sasjs cbd with server type SASJS', function () {
152
159
  ]
153
160
  }
154
161
  ]
155
- }, undefined, undefined);
162
+ }, undefined, streamConfig, undefined);
156
163
  return [2 /*return*/];
157
164
  }
158
165
  });
package/package.json CHANGED
@@ -47,10 +47,10 @@
47
47
  "access": "public"
48
48
  },
49
49
  "dependencies": {
50
- "@sasjs/adapter": "^3.7.14",
50
+ "@sasjs/adapter": "3.8.0",
51
51
  "@sasjs/core": "4.15.3",
52
52
  "@sasjs/lint": "1.11.2",
53
- "@sasjs/utils": "2.39.0",
53
+ "@sasjs/utils": "2.40.0",
54
54
  "chalk": "4.1.2",
55
55
  "csv-stringify": "5.6.5",
56
56
  "dotenv": "10.0.0",
@@ -94,5 +94,5 @@
94
94
  "typescript": "4.5.4",
95
95
  "util": "0.12.4"
96
96
  },
97
- "version": "3.10.2"
97
+ "version": "3.11.0"
98
98
  }