@sasjs/cli 3.18.1 → 3.18.2

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.
@@ -28,7 +28,7 @@ export declare const getCredentialsInputSas9: (target: Target, scope: TargetScop
28
28
  userName: string;
29
29
  password: string;
30
30
  }>;
31
- export declare const getDefaultValues: (targetName: string) => {
31
+ export declare const getDefaultValues: (targetName: string, serverType?: string | undefined) => {
32
32
  client: string;
33
33
  secret: string;
34
34
  };
@@ -363,7 +363,7 @@ var getCredentialsInputSasjs = function (target) { return __awaiter(void 0, void
363
363
  var client;
364
364
  return __generator(this, function (_a) {
365
365
  switch (_a.label) {
366
- case 0: return [4 /*yield*/, (0, input_1.getString)('Please enter your Client ID: ', function (v) { return !!v || 'Client ID is required.'; }, (0, exports.getDefaultValues)(target.name).client)];
366
+ case 0: return [4 /*yield*/, (0, input_1.getString)('Please enter your Client ID: ', function (v) { return !!v || 'Client ID is required.'; }, (0, exports.getDefaultValues)(target.name, types_1.ServerType.Sasjs).client)];
367
367
  case 1:
368
368
  client = _a.sent();
369
369
  return [2 /*return*/, { client: client }];
@@ -411,7 +411,7 @@ var getCredentialsInputSas9 = function (target, scope) { return __awaiter(void 0
411
411
  });
412
412
  }); };
413
413
  exports.getCredentialsInputSas9 = getCredentialsInputSas9;
414
- var getDefaultValues = function (targetName) {
414
+ var getDefaultValues = function (targetName, serverType) {
415
415
  dotenv_1.default.config({ path: path_1.default.join(process.projectDir, ".env.".concat(targetName)) });
416
416
  var defaultClient = process.env.CLIENT === 'undefined' ||
417
417
  process.env.CLIENT === 'null' ||
@@ -423,6 +423,8 @@ var getDefaultValues = function (targetName) {
423
423
  !process.env.SECRET
424
424
  ? ''
425
425
  : process.env.SECRET;
426
+ if (serverType === types_1.ServerType.Sasjs && defaultClient === '')
427
+ defaultClient = 'clientID1';
426
428
  return { client: defaultClient, secret: defaultSecret };
427
429
  };
428
430
  exports.getDefaultValues = getDefaultValues;
package/package.json CHANGED
@@ -97,5 +97,5 @@
97
97
  "typescript": "4.5.4",
98
98
  "util": "0.12.4"
99
99
  },
100
- "version": "3.18.1"
100
+ "version": "3.18.2"
101
101
  }