@sasjs/adapter 6.2.2 → 6.3.1

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.
@@ -2566,7 +2566,7 @@ function es6_getDomainWithoutSuffix(url, options) {
2566
2566
 
2567
2567
  /***/ },
2568
2568
 
2569
- /***/ 5372
2569
+ /***/ 9579
2570
2570
  (__unused_webpack_module, exports, __webpack_require__) {
2571
2571
 
2572
2572
  "use strict";
@@ -2582,7 +2582,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
2582
2582
  };
2583
2583
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2584
2584
  exports.ContextManager = void 0;
2585
- const utils_1 = __webpack_require__(9266);
2585
+ const utils_1 = __webpack_require__(9731);
2586
2586
  const error_1 = __webpack_require__(6340);
2587
2587
  class ContextManager {
2588
2588
  get getDefaultComputeContexts() {
@@ -2864,7 +2864,7 @@ exports.ContextManager = ContextManager;
2864
2864
 
2865
2865
  /***/ },
2866
2866
 
2867
- /***/ 2831
2867
+ /***/ 7150
2868
2868
  (__unused_webpack_module, exports, __webpack_require__) {
2869
2869
 
2870
2870
  "use strict";
@@ -2885,8 +2885,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
2885
2885
  exports.SAS9ApiClient = void 0;
2886
2886
  const time_1 = __webpack_require__(7247);
2887
2887
  const form_data_1 = __importDefault(__webpack_require__(1894));
2888
- const Sas9RequestClient_1 = __webpack_require__(576);
2889
- const utils_1 = __webpack_require__(9266);
2888
+ const Sas9RequestClient_1 = __webpack_require__(1897);
2889
+ const utils_1 = __webpack_require__(9731);
2890
2890
  /**
2891
2891
  * A client for interfacing with the SAS9 REST API.
2892
2892
  *
@@ -2962,7 +2962,7 @@ const generateFileUploadForm = (data) => {
2962
2962
 
2963
2963
  /***/ },
2964
2964
 
2965
- /***/ 2015
2965
+ /***/ 5036
2966
2966
  (__unused_webpack_module, exports, __webpack_require__) {
2967
2967
 
2968
2968
  "use strict";
@@ -2981,25 +2981,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
2981
2981
  };
2982
2982
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2983
2983
  exports.SASViyaApiClient = void 0;
2984
- const utils_1 = __webpack_require__(9266);
2985
- const joinFolderPath_1 = __webpack_require__(459);
2984
+ const utils_1 = __webpack_require__(9731);
2985
+ const joinFolderPath_1 = __webpack_require__(7328);
2986
2986
  const form_data_1 = __importDefault(__webpack_require__(1894));
2987
- const isNode_1 = __webpack_require__(6308);
2988
- const errors_1 = __webpack_require__(7388);
2989
- const SessionManager_1 = __webpack_require__(8697);
2990
- const ContextManager_1 = __webpack_require__(5372);
2987
+ const isNode_1 = __webpack_require__(4319);
2988
+ const errors_1 = __webpack_require__(6851);
2989
+ const SessionManager_1 = __webpack_require__(7146);
2990
+ const ContextManager_1 = __webpack_require__(9579);
2991
2991
  const types_1 = __webpack_require__(3631);
2992
- const isAuthorizeFormRequired_1 = __webpack_require__(7607);
2992
+ const isAuthorizeFormRequired_1 = __webpack_require__(8364);
2993
2993
  const error_1 = __webpack_require__(6340);
2994
- const pollJobState_1 = __webpack_require__(1514);
2995
- const getTokens_1 = __webpack_require__(9609);
2996
- const uploadTables_1 = __webpack_require__(8563);
2997
- const executeOnComputeApi_1 = __webpack_require__(3722);
2998
- const getAccessTokenForViya_1 = __webpack_require__(1674);
2999
- const refreshTokensForViya_1 = __webpack_require__(5747);
3000
- const host_1 = __webpack_require__(5334);
3001
- const NotFoundError_1 = __webpack_require__(7403);
3002
- const validateForcedServicePack_1 = __webpack_require__(8297);
2994
+ const pollJobState_1 = __webpack_require__(3447);
2995
+ const getTokens_1 = __webpack_require__(242);
2996
+ const uploadTables_1 = __webpack_require__(3226);
2997
+ const executeOnComputeApi_1 = __webpack_require__(9857);
2998
+ const getAccessTokenForViya_1 = __webpack_require__(9141);
2999
+ const refreshTokensForViya_1 = __webpack_require__(1189);
3000
+ const host_1 = __webpack_require__(2001);
3001
+ const NotFoundError_1 = __webpack_require__(1560);
3002
+ const validateForcedServicePack_1 = __webpack_require__(6228);
3003
+ class TokenProviderError extends Error {
3004
+ constructor(error) {
3005
+ super(error instanceof Error ? error.message : String(error));
3006
+ }
3007
+ }
3003
3008
  /**
3004
3009
  * A client for interfacing with the SAS Viya REST API.
3005
3010
  *
@@ -3015,6 +3020,7 @@ class SASViyaApiClient {
3015
3020
  this.contextManager = new ContextManager_1.ContextManager(this.serverUrl, this.requestClient);
3016
3021
  this.folderMap = new Map();
3017
3022
  this.folderMapGeneration = 0;
3023
+ this.hasTokenProvider = false;
3018
3024
  this.fileExtensionMap = new Map();
3019
3025
  this.boolExtensionMap = false; // required in case the map has zero entries
3020
3026
  if (serverUrl)
@@ -3025,6 +3031,45 @@ class SASViyaApiClient {
3025
3031
  this.folderMap.clear();
3026
3032
  }
3027
3033
  // after an attempt to populate it.
3034
+ /** Return a Viya client that resolves the bearer before every request. */
3035
+ withAccessTokenProvider(provider) {
3036
+ const positions = {
3037
+ get: 1,
3038
+ delete: 1,
3039
+ post: 2,
3040
+ put: 2,
3041
+ patch: 2,
3042
+ uploadFile: 2
3043
+ };
3044
+ const base = this.providerBase || this.requestClient;
3045
+ const requestClient = new Proxy(base, {
3046
+ get(target, property) {
3047
+ const value = Reflect.get(target, property, target);
3048
+ if (typeof value !== 'function')
3049
+ return value;
3050
+ if (typeof property === 'string' &&
3051
+ Object.prototype.hasOwnProperty.call(positions, property)) {
3052
+ return (...args) => __awaiter(this, void 0, void 0, function* () {
3053
+ if (property === 'post' && args[0] === '/SASLogon/oauth/token')
3054
+ return value.apply(target, args);
3055
+ try {
3056
+ args[positions[property]] = yield provider();
3057
+ }
3058
+ catch (error) {
3059
+ throw new TokenProviderError(error);
3060
+ }
3061
+ return value.apply(target, args);
3062
+ });
3063
+ }
3064
+ return value.bind(target);
3065
+ }
3066
+ });
3067
+ const client = new SASViyaApiClient(this.serverUrl, this.rootFolderName, this.contextName, requestClient);
3068
+ client.hasTokenProvider = true;
3069
+ client.providerBase = base;
3070
+ client.debug = this.debug;
3071
+ return client;
3072
+ }
3028
3073
  /**
3029
3074
  * A helper method used to call appendRequest method of RequestClient
3030
3075
  * @param response - response from sasjs request
@@ -3198,6 +3243,12 @@ class SASViyaApiClient {
3198
3243
  */
3199
3244
  executeScript(jobPath_1, linesOfCode_1, contextName_1, authConfig_1) {
3200
3245
  return __awaiter(this, arguments, void 0, function* (jobPath, linesOfCode, contextName, authConfig, data = null, debug = false, expectWebout = false, waitForResult = true, pollOptions, printPid = false, variables, onTokensRefreshed) {
3246
+ if (authConfig &&
3247
+ 'grantType' in authConfig &&
3248
+ authConfig.grantType === 'client_credentials' &&
3249
+ !this.hasTokenProvider) {
3250
+ return this.withAccessTokenProvider(() => __awaiter(this, void 0, void 0, function* () { return (yield (0, getTokens_1.getTokens)(this.requestClient, authConfig)).access_token; })).executeScript(jobPath, linesOfCode, contextName, authConfig, data, debug, expectWebout, waitForResult, pollOptions, printPid, variables, onTokensRefreshed);
3251
+ }
3201
3252
  return (0, executeOnComputeApi_1.executeOnComputeApi)(this.requestClient, this.sessionManager, this.rootFolderName, jobPath, linesOfCode, contextName, authConfig, data, debug, expectWebout, waitForResult, pollOptions, printPid, variables, onTokensRefreshed);
3202
3253
  });
3203
3254
  }
@@ -3782,6 +3833,12 @@ class SASViyaApiClient {
3782
3833
  */
3783
3834
  executeComputeJob(sasJob_1, contextName_1, debug_1, data_1, authConfig_1) {
3784
3835
  return __awaiter(this, arguments, void 0, function* (sasJob, contextName, debug, data, authConfig, waitForResult = true, expectWebout = false, pollOptions, printPid = false, variables, onTokensRefreshed) {
3836
+ if (authConfig &&
3837
+ 'grantType' in authConfig &&
3838
+ authConfig.grantType === 'client_credentials' &&
3839
+ !this.hasTokenProvider) {
3840
+ return this.withAccessTokenProvider(() => __awaiter(this, void 0, void 0, function* () { return (yield (0, getTokens_1.getTokens)(this.requestClient, authConfig)).access_token; })).executeComputeJob(sasJob, contextName, debug, data, authConfig, waitForResult, expectWebout, pollOptions, printPid, variables, onTokensRefreshed);
3841
+ }
3785
3842
  let access_token = (authConfig || {}).access_token;
3786
3843
  if (authConfig) {
3787
3844
  ;
@@ -3840,6 +3897,12 @@ class SASViyaApiClient {
3840
3897
  executeJob(sasJob, contextName, debug, data, authConfig, onTokensRefreshed) {
3841
3898
  return __awaiter(this, void 0, void 0, function* () {
3842
3899
  var _a, _b, _c;
3900
+ if (authConfig &&
3901
+ 'grantType' in authConfig &&
3902
+ authConfig.grantType === 'client_credentials' &&
3903
+ !this.hasTokenProvider) {
3904
+ return this.withAccessTokenProvider(() => __awaiter(this, void 0, void 0, function* () { return (yield (0, getTokens_1.getTokens)(this.requestClient, authConfig)).access_token; })).executeJob(sasJob, contextName, debug, data, authConfig, onTokensRefreshed);
3905
+ }
3843
3906
  let access_token = (authConfig || {}).access_token;
3844
3907
  if (authConfig) {
3845
3908
  ;
@@ -3991,7 +4054,8 @@ class SASViyaApiClient {
3991
4054
  const { result: folder } = yield this.requestClient
3992
4055
  .get(`${this.serverUrl}${url}`, accessToken)
3993
4056
  .catch((err) => {
3994
- if (err instanceof errors_1.CertificateError)
4057
+ if (err instanceof errors_1.CertificateError ||
4058
+ err instanceof TokenProviderError)
3995
4059
  throw err;
3996
4060
  return { result: null };
3997
4061
  });
@@ -4030,7 +4094,8 @@ class SASViyaApiClient {
4030
4094
  const { result: folder } = yield this.requestClient
4031
4095
  .get(`${this.serverUrl}${url}`, accessToken)
4032
4096
  .catch((err) => {
4033
- if (err instanceof errors_1.CertificateError)
4097
+ if (err instanceof errors_1.CertificateError ||
4098
+ err instanceof TokenProviderError)
4034
4099
  throw err;
4035
4100
  return { result: null };
4036
4101
  });
@@ -4163,7 +4228,7 @@ exports.SASViyaApiClient = SASViyaApiClient;
4163
4228
 
4164
4229
  /***/ },
4165
4230
 
4166
- /***/ 9810
4231
+ /***/ 159
4167
4232
  (__unused_webpack_module, exports, __webpack_require__) {
4168
4233
 
4169
4234
  "use strict";
@@ -4178,18 +4243,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
4178
4243
  });
4179
4244
  };
4180
4245
  Object.defineProperty(exports, "__esModule", ({ value: true }));
4181
- const utils_1 = __webpack_require__(9266);
4182
- const types_1 = __webpack_require__(3574);
4183
- const SASViyaApiClient_1 = __webpack_require__(2015);
4184
- const SAS9ApiClient_1 = __webpack_require__(2831);
4185
- const SASjsApiClient_1 = __webpack_require__(5803);
4186
- const apiBasePath_1 = __webpack_require__(6838);
4187
- const auth_1 = __webpack_require__(4879);
4246
+ const utils_1 = __webpack_require__(9731);
4247
+ const types_1 = __webpack_require__(5799);
4248
+ const SASViyaApiClient_1 = __webpack_require__(5036);
4249
+ const SAS9ApiClient_1 = __webpack_require__(7150);
4250
+ const SASjsApiClient_1 = __webpack_require__(3512);
4251
+ const apiBasePath_1 = __webpack_require__(6095);
4252
+ const auth_1 = __webpack_require__(5168);
4188
4253
  const types_2 = __webpack_require__(3631);
4189
- const RequestClient_1 = __webpack_require__(8816);
4190
- const SasjsRequestClient_1 = __webpack_require__(7560);
4191
- const job_execution_1 = __webpack_require__(1391);
4192
- const validateForcedServicePack_1 = __webpack_require__(8297);
4254
+ const RequestClient_1 = __webpack_require__(7417);
4255
+ const SasjsRequestClient_1 = __webpack_require__(7271);
4256
+ const job_execution_1 = __webpack_require__(7026);
4257
+ const validateForcedServicePack_1 = __webpack_require__(6228);
4193
4258
  const defaultConfig = {
4194
4259
  serverUrl: '',
4195
4260
  // The one name the adapter needs for SASjs Server: the mount its routes sit
@@ -4791,6 +4856,8 @@ class SASjs {
4791
4856
  return __awaiter(this, arguments, void 0, function* (serviceJson, appLoc, serverUrl, accessToken, isForced = false, onProgress) {
4792
4857
  var _a, _b, _c;
4793
4858
  this.isMethodSupported('deployServicePack', [types_2.ServerType.SasViya]);
4859
+ const tokenProvider = typeof accessToken === 'function' ? accessToken : undefined;
4860
+ const staticToken = typeof accessToken === 'string' ? accessToken : undefined;
4794
4861
  let sasApiClient = null;
4795
4862
  if (serverUrl !== undefined || appLoc !== undefined) {
4796
4863
  if (serverUrl === undefined)
@@ -4839,14 +4906,16 @@ class SASjs {
4839
4906
  if (serverUrl === this.sasjsConfig.serverUrl)
4840
4907
  deploymentClient.copyCsrfFrom(this.requestClient);
4841
4908
  deploymentClient.restrictDeploymentTransport();
4842
- const api = new SASViyaApiClient_1.SASViyaApiClient(serverUrl, appLoc, this.sasjsConfig.contextName, deploymentClient);
4909
+ let api = new SASViyaApiClient_1.SASViyaApiClient(serverUrl, appLoc, this.sasjsConfig.contextName, deploymentClient);
4910
+ if (tokenProvider)
4911
+ api = api.withAccessTokenProvider(tokenProvider);
4843
4912
  (_a = this.sasViyaApiClient) === null || _a === void 0 ? void 0 : _a.invalidateFolderCache();
4844
4913
  try {
4845
- const { parentId, recycled } = yield api.recycleDeploymentFolder(appLoc, accessToken);
4914
+ const { parentId, recycled } = yield api.recycleDeploymentFolder(appLoc, staticToken);
4846
4915
  try {
4847
4916
  const parent = appLoc.slice(0, appLoc.lastIndexOf('/'));
4848
4917
  const name = appLoc.slice(appLoc.lastIndexOf('/') + 1);
4849
- const root = yield api.createFolder(name, parent, `/folders/folders/${parentId}`, accessToken, false);
4918
+ const root = yield api.createFolder(name, parent, `/folders/folders/${parentId}`, staticToken, false);
4850
4919
  if (!root ||
4851
4920
  root.name !== name ||
4852
4921
  root.parentFolderUri !== `/folders/folders/${parentId}` ||
@@ -4854,7 +4923,7 @@ class SASjs {
4854
4923
  typeof root.id !== 'string' ||
4855
4924
  !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(root.id))
4856
4925
  throw new Error('Invalid created app folder identity');
4857
- yield this.createFoldersAndServices(appLoc, serviceJson.members, accessToken, api, false, {
4926
+ yield this.createFoldersAndServices(appLoc, serviceJson.members, staticToken, api, false, {
4858
4927
  onProgress,
4859
4928
  index: 0,
4860
4929
  total: countMembers(serviceJson.members),
@@ -4878,7 +4947,9 @@ class SASjs {
4878
4947
  serviceJson.members[0].members.sort((member) => member.type === 'folder' ? -1 : 1);
4879
4948
  }
4880
4949
  const members = serviceJson.members;
4881
- yield this.createFoldersAndServices(appLoc, members, accessToken, sasApiClient, isForced, { onProgress, index: 0, total: countMembers(members), strict: false });
4950
+ if (tokenProvider)
4951
+ sasApiClient = (sasApiClient || this.sasViyaApiClient).withAccessTokenProvider(tokenProvider);
4952
+ yield this.createFoldersAndServices(appLoc, members, staticToken, sasApiClient, isForced, { onProgress, index: 0, total: countMembers(members), strict: false });
4882
4953
  });
4883
4954
  }
4884
4955
  /**
@@ -5132,7 +5203,7 @@ const reportMember = (progress, type, name, parentFolder) => {
5132
5203
 
5133
5204
  /***/ },
5134
5205
 
5135
- /***/ 5803
5206
+ /***/ 3512
5136
5207
  (__unused_webpack_module, exports, __webpack_require__) {
5137
5208
 
5138
5209
  "use strict";
@@ -5154,13 +5225,13 @@ exports.SASjsApiClient = exports.readSasjsState = void 0;
5154
5225
  const form_data_1 = __importDefault(__webpack_require__(1894));
5155
5226
  const types_1 = __webpack_require__(3631);
5156
5227
  const error_1 = __webpack_require__(6340);
5157
- const pollJobState_1 = __webpack_require__(1514);
5158
- const errors_1 = __webpack_require__(7388);
5159
- const getAccessTokenForSasjs_1 = __webpack_require__(9239);
5160
- const refreshTokensForSasjs_1 = __webpack_require__(6725);
5161
- const getTokens_1 = __webpack_require__(9609);
5162
- const isNode_1 = __webpack_require__(6308);
5163
- const apiBasePath_1 = __webpack_require__(6838);
5228
+ const pollJobState_1 = __webpack_require__(3447);
5229
+ const errors_1 = __webpack_require__(6851);
5230
+ const getAccessTokenForSasjs_1 = __webpack_require__(9058);
5231
+ const refreshTokensForSasjs_1 = __webpack_require__(6034);
5232
+ const getTokens_1 = __webpack_require__(242);
5233
+ const isNode_1 = __webpack_require__(4319);
5234
+ const apiBasePath_1 = __webpack_require__(6095);
5164
5235
  /**
5165
5236
  * How SASjs Server reports the state of a triggered program.
5166
5237
  *
@@ -5378,7 +5449,7 @@ exports.SASjsApiClient = SASjsApiClient;
5378
5449
 
5379
5450
  /***/ },
5380
5451
 
5381
- /***/ 8697
5452
+ /***/ 7146
5382
5453
  (__unused_webpack_module, exports, __webpack_require__) {
5383
5454
 
5384
5455
  "use strict";
@@ -5394,11 +5465,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
5394
5465
  };
5395
5466
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5396
5467
  exports.SessionManager = void 0;
5397
- const types_1 = __webpack_require__(3574);
5398
- const errors_1 = __webpack_require__(7388);
5399
- const utils_1 = __webpack_require__(9266);
5468
+ const types_1 = __webpack_require__(5799);
5469
+ const errors_1 = __webpack_require__(6851);
5470
+ const utils_1 = __webpack_require__(9731);
5400
5471
  const error_1 = __webpack_require__(6340);
5401
- const host_1 = __webpack_require__(5334);
5472
+ const host_1 = __webpack_require__(2001);
5402
5473
  const MAX_SESSION_COUNT = 1;
5403
5474
  class SessionManager {
5404
5475
  constructor(serverUrl, contextName, requestClient) {
@@ -5739,7 +5810,7 @@ exports.SessionManager = SessionManager;
5739
5810
 
5740
5811
  /***/ },
5741
5812
 
5742
- /***/ 3722
5813
+ /***/ 9857
5743
5814
  (__unused_webpack_module, exports, __webpack_require__) {
5744
5815
 
5745
5816
  "use strict";
@@ -5758,13 +5829,13 @@ exports.executeOnComputeApi = executeOnComputeApi;
5758
5829
  const time_1 = __webpack_require__(7247);
5759
5830
  const types_1 = __webpack_require__(3631);
5760
5831
  const error_1 = __webpack_require__(6340);
5761
- const __1 = __webpack_require__(8156);
5762
- const getTokens_1 = __webpack_require__(9609);
5763
- const utils_1 = __webpack_require__(9266);
5764
- const formatDataForRequest_1 = __webpack_require__(3407);
5765
- const pollJobState_1 = __webpack_require__(1514);
5766
- const uploadTables_1 = __webpack_require__(8563);
5767
- const host_1 = __webpack_require__(5334);
5832
+ const __1 = __webpack_require__(1229);
5833
+ const getTokens_1 = __webpack_require__(242);
5834
+ const utils_1 = __webpack_require__(9731);
5835
+ const formatDataForRequest_1 = __webpack_require__(40);
5836
+ const pollJobState_1 = __webpack_require__(3447);
5837
+ const uploadTables_1 = __webpack_require__(3226);
5838
+ const host_1 = __webpack_require__(2001);
5768
5839
  /**
5769
5840
  * Executes SAS program on the current SAS Viya server using Compute API.
5770
5841
  * @param jobPath - the path to the file being submitted for execution.
@@ -5944,7 +6015,7 @@ function executeOnComputeApi(requestClient_1, sessionManager_1, rootFolderName_1
5944
6015
 
5945
6016
  /***/ },
5946
6017
 
5947
- /***/ 2573
6018
+ /***/ 9794
5948
6019
  (__unused_webpack_module, exports, __webpack_require__) {
5949
6020
 
5950
6021
  "use strict";
@@ -5961,7 +6032,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
5961
6032
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5962
6033
  exports.getFileStream = void 0;
5963
6034
  const time_1 = __webpack_require__(7247);
5964
- const host_1 = __webpack_require__(5334);
6035
+ const host_1 = __webpack_require__(2001);
5965
6036
  const getFileStream = (job, filePath) => __awaiter(void 0, void 0, void 0, function* () {
5966
6037
  // Node only, so required rather than imported: a static import of
5967
6038
  // @sasjs/utils/file drags its csvFile module (and @fast-csv, and the stream
@@ -5984,7 +6055,7 @@ exports.getFileStream = getFileStream;
5984
6055
 
5985
6056
  /***/ },
5986
6057
 
5987
- /***/ 1514
6058
+ /***/ 3447
5988
6059
  (__unused_webpack_module, exports, __webpack_require__) {
5989
6060
 
5990
6061
  "use strict";
@@ -6002,11 +6073,11 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
6002
6073
  exports.doPoll = exports.JobState = exports.readViyaState = void 0;
6003
6074
  exports.pollJobState = pollJobState;
6004
6075
  const types_1 = __webpack_require__(3631);
6005
- const getTokens_1 = __webpack_require__(9609);
6006
- const errors_1 = __webpack_require__(7388);
6007
- const types_2 = __webpack_require__(3574);
6008
- const utils_1 = __webpack_require__(9266);
6009
- const host_1 = __webpack_require__(5334);
6076
+ const getTokens_1 = __webpack_require__(242);
6077
+ const errors_1 = __webpack_require__(6851);
6078
+ const types_2 = __webpack_require__(5799);
6079
+ const utils_1 = __webpack_require__(9731);
6080
+ const host_1 = __webpack_require__(2001);
6010
6081
  /**
6011
6082
  * The Viya compute API answers the state link with plain text: the state name,
6012
6083
  * padded with a newline.
@@ -6100,7 +6171,7 @@ function pollJobState(requestClient_1, postedJob_1, debug_1, authConfig_1, pollO
6100
6171
  }
6101
6172
  let logFileStream;
6102
6173
  if (streamLog && (0, utils_1.isNode)()) {
6103
- const { getFileStream } = __webpack_require__(2573);
6174
+ const { getFileStream } = __webpack_require__(9794);
6104
6175
  logFileStream = yield getFileStream(postedJob, pollOptions.logFolderPath);
6105
6176
  }
6106
6177
  let result = yield (0, exports.doPoll)(requestClient, postedJob, currentState, debug, pollCount, pollOptions, authConfig, streamLog, logFileStream, jobSessionManager, onTokensRefreshed, serverType, readState);
@@ -6208,7 +6279,7 @@ const doPoll = (requestClient_1, postedJob_1, currentState_1, debug_1, pollCount
6208
6279
  if (streamLog) {
6209
6280
  const { result: job } = yield requestClient.get(jobHref, authConfig === null || authConfig === void 0 ? void 0 : authConfig.access_token);
6210
6281
  const endLogLine = (_b = (_a = job.logStatistics) === null || _a === void 0 ? void 0 : _a.lineCount) !== null && _b !== void 0 ? _b : 1000000;
6211
- const { saveLog } = (0, utils_1.isNode)() ? __webpack_require__(5098) : { saveLog: null };
6282
+ const { saveLog } = (0, utils_1.isNode)() ? __webpack_require__(157) : { saveLog: null };
6212
6283
  if (saveLog) {
6213
6284
  yield saveLog(postedJob, requestClient, startLogLine, endLogLine, logStream, authConfig === null || authConfig === void 0 ? void 0 : authConfig.access_token);
6214
6285
  }
@@ -6255,7 +6326,7 @@ const validatePollStrategies = (strategy) => {
6255
6326
 
6256
6327
  /***/ },
6257
6328
 
6258
- /***/ 5098
6329
+ /***/ 157
6259
6330
  (__unused_webpack_module, exports, __webpack_require__) {
6260
6331
 
6261
6332
  "use strict";
@@ -6271,9 +6342,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
6271
6342
  };
6272
6343
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6273
6344
  exports.saveLog = saveLog;
6274
- const utils_1 = __webpack_require__(9266);
6275
- const writeStream_1 = __webpack_require__(1248);
6276
- const host_1 = __webpack_require__(5334);
6345
+ const utils_1 = __webpack_require__(9731);
6346
+ const writeStream_1 = __webpack_require__(2295);
6347
+ const host_1 = __webpack_require__(2001);
6277
6348
  /**
6278
6349
  * Appends logs to a supplied write stream.
6279
6350
  * This is useful for getting quick feedback on longer running jobs.
@@ -6307,7 +6378,7 @@ function saveLog(job, requestClient, startLine, endLine, logFileStream, accessTo
6307
6378
 
6308
6379
  /***/ },
6309
6380
 
6310
- /***/ 8563
6381
+ /***/ 3226
6311
6382
  (__unused_webpack_module, exports, __webpack_require__) {
6312
6383
 
6313
6384
  "use strict";
@@ -6324,7 +6395,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
6324
6395
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6325
6396
  exports.uploadTables = uploadTables;
6326
6397
  const error_1 = __webpack_require__(6340);
6327
- const convertToCsv_1 = __webpack_require__(4786);
6398
+ const convertToCsv_1 = __webpack_require__(637);
6328
6399
  /**
6329
6400
  * Uploads tables to SAS as specially formatted CSVs.
6330
6401
  * This is more compact than JSON, and easier to read within SAS.
@@ -6359,7 +6430,7 @@ function uploadTables(requestClient, data, accessToken) {
6359
6430
 
6360
6431
  /***/ },
6361
6432
 
6362
- /***/ 1248
6433
+ /***/ 2295
6363
6434
  (__unused_webpack_module, exports) {
6364
6435
 
6365
6436
  "use strict";
@@ -6392,7 +6463,7 @@ exports.writeStream = writeStream;
6392
6463
 
6393
6464
  /***/ },
6394
6465
 
6395
- /***/ 6838
6466
+ /***/ 6095
6396
6467
  (__unused_webpack_module, exports) {
6397
6468
 
6398
6469
  "use strict";
@@ -6473,7 +6544,7 @@ exports.apiBaseFromPathSASJS = apiBaseFromPathSASJS;
6473
6544
 
6474
6545
  /***/ },
6475
6546
 
6476
- /***/ 7710
6547
+ /***/ 6933
6477
6548
  (__unused_webpack_module, exports, __webpack_require__) {
6478
6549
 
6479
6550
  "use strict";
@@ -6490,16 +6561,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
6490
6561
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6491
6562
  exports.AuthManager = void 0;
6492
6563
  const types_1 = __webpack_require__(3631);
6493
- const MockReadinessError_1 = __webpack_require__(314);
6494
- const errors_1 = __webpack_require__(7388);
6495
- const utils_1 = __webpack_require__(9266);
6496
- const extractUserLongNameSas9_1 = __webpack_require__(8548);
6497
- const openWebPage_1 = __webpack_require__(2894);
6498
- const verifySas9Login_1 = __webpack_require__(4257);
6499
- const verifySasViyaLogin_1 = __webpack_require__(5009);
6500
- const _1 = __webpack_require__(4879);
6501
- const host_1 = __webpack_require__(5334);
6502
- const apiBasePath_1 = __webpack_require__(6838);
6564
+ const MockReadinessError_1 = __webpack_require__(1527);
6565
+ const errors_1 = __webpack_require__(6851);
6566
+ const utils_1 = __webpack_require__(9731);
6567
+ const extractUserLongNameSas9_1 = __webpack_require__(2991);
6568
+ const openWebPage_1 = __webpack_require__(4213);
6569
+ const verifySas9Login_1 = __webpack_require__(1490);
6570
+ const verifySasViyaLogin_1 = __webpack_require__(9940);
6571
+ const _1 = __webpack_require__(5168);
6572
+ const host_1 = __webpack_require__(2001);
6573
+ const apiBasePath_1 = __webpack_require__(6095);
6503
6574
  class AuthManager {
6504
6575
  constructor(serverUrl, serverType, requestClient, loginCallback, apiBasePath = apiBasePath_1.DEFAULT_API_BASE_PATH) {
6505
6576
  this.serverUrl = serverUrl;
@@ -6791,7 +6862,7 @@ const isCredentialsVerifyError = (response) => /An error occurred while the syst
6791
6862
 
6792
6863
  /***/ },
6793
6864
 
6794
- /***/ 9239
6865
+ /***/ 9058
6795
6866
  (__unused_webpack_module, exports, __webpack_require__) {
6796
6867
 
6797
6868
  "use strict";
@@ -6807,9 +6878,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
6807
6878
  };
6808
6879
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6809
6880
  exports.getAccessTokenForSasjs = getAccessTokenForSasjs;
6810
- const getTokenRequestErrorPrefix_1 = __webpack_require__(1087);
6881
+ const getTokenRequestErrorPrefix_1 = __webpack_require__(6418);
6811
6882
  const types_1 = __webpack_require__(3631);
6812
- const apiBasePath_1 = __webpack_require__(6838);
6883
+ const apiBasePath_1 = __webpack_require__(6095);
6813
6884
  /**
6814
6885
  * Exchanges the auth code for an access token for the given client.
6815
6886
  * @param requestClient - the pre-configured HTTP request client
@@ -6842,7 +6913,7 @@ function getAccessTokenForSasjs(requestClient_1, clientId_1, authCode_1) {
6842
6913
 
6843
6914
  /***/ },
6844
6915
 
6845
- /***/ 1674
6916
+ /***/ 9141
6846
6917
  (__unused_webpack_module, exports, __webpack_require__) {
6847
6918
 
6848
6919
  "use strict";
@@ -6859,8 +6930,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
6859
6930
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6860
6931
  exports.getAccessTokenForViya = getAccessTokenForViya;
6861
6932
  const types_1 = __webpack_require__(3631);
6862
- const errors_1 = __webpack_require__(7388);
6863
- const getTokenRequestErrorPrefix_1 = __webpack_require__(1087);
6933
+ const errors_1 = __webpack_require__(6851);
6934
+ const getTokenRequestErrorPrefix_1 = __webpack_require__(6418);
6864
6935
  /**
6865
6936
  * Exchange the auth code for access / refresh tokens for the given client / secret pair.
6866
6937
  * @param requestClient - the pre-configured HTTP request client.
@@ -6902,7 +6973,7 @@ function getAccessTokenForViya(requestClient, clientId, clientSecret, authCode)
6902
6973
 
6903
6974
  /***/ },
6904
6975
 
6905
- /***/ 1087
6976
+ /***/ 6418
6906
6977
  (__unused_webpack_module, exports, __webpack_require__) {
6907
6978
 
6908
6979
  "use strict";
@@ -6912,8 +6983,8 @@ __webpack_unused_export__ = ({ value: true });
6912
6983
  __webpack_unused_export__ = exports.tokenRequestErrorMessage = exports.vV = void 0;
6913
6984
  const types_1 = __webpack_require__(3631);
6914
6985
  const error_1 = __webpack_require__(6340);
6915
- const responseReceived_1 = __webpack_require__(5775);
6916
- const redactCredentials_1 = __webpack_require__(6894);
6986
+ const responseReceived_1 = __webpack_require__(2051);
6987
+ const redactCredentials_1 = __webpack_require__(7033);
6917
6988
  const getServerName = (server) => server === types_1.ServerType.SasViya ? 'Viya' : 'Sasjs';
6918
6989
  /**
6919
6990
  * What follows the request details: the server's answer, or the statement that
@@ -7050,7 +7121,7 @@ __webpack_unused_export__ = getTokenRequestErrorPrefixResponse;
7050
7121
 
7051
7122
  /***/ },
7052
7123
 
7053
- /***/ 9609
7124
+ /***/ 242
7054
7125
  (__unused_webpack_module, exports, __webpack_require__) {
7055
7126
 
7056
7127
  "use strict";
@@ -7068,10 +7139,92 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
7068
7139
  exports.getTokens = getTokens;
7069
7140
  const auth_1 = __webpack_require__(6072);
7070
7141
  const types_1 = __webpack_require__(3631);
7071
- const refreshTokensForViya_1 = __webpack_require__(5747);
7072
- const refreshTokensForSasjs_1 = __webpack_require__(6725);
7073
- const host_1 = __webpack_require__(5334);
7074
- const apiBasePath_1 = __webpack_require__(6838);
7142
+ const refreshTokensForViya_1 = __webpack_require__(1189);
7143
+ const refreshTokensForSasjs_1 = __webpack_require__(6034);
7144
+ const getTokenRequestErrorPrefix_1 = __webpack_require__(6418);
7145
+ const errors_1 = __webpack_require__(6851);
7146
+ const host_1 = __webpack_require__(2001);
7147
+ const apiBasePath_1 = __webpack_require__(6095);
7148
+ const clientTokens = new WeakMap();
7149
+ /**
7150
+ * Returns the auth configuration for a Viya client-credentials identity,
7151
+ * requesting an access token when there is none or the held one has expired.
7152
+ * This grant has no refresh token.
7153
+ *
7154
+ * The token is also written to `authConfig.access_token`, as the user-token
7155
+ * path below does: code further down an execution chain (the job poll, for
7156
+ * one) reads the token from the shared `authConfig`, not from this return
7157
+ * value.
7158
+ *
7159
+ * A token's lifetime is counted from the moment the request was sent, so the
7160
+ * held token is dropped no later than the server's own expiry. No further
7161
+ * margin is subtracted. A response that states no `expires_in` is never held:
7162
+ * the next call requests a new token.
7163
+ * @param requestClient - the pre-configured HTTP request client
7164
+ * @param authConfig - the client ID and secret, with `grantType` set to
7165
+ * `client_credentials`
7166
+ * @param serverType - must be SASVIYA.
7167
+ */
7168
+ function getClientCredentialsTokens(requestClient, authConfig, serverType) {
7169
+ return __awaiter(this, void 0, void 0, function* () {
7170
+ const { client, secret } = authConfig;
7171
+ if (serverType !== types_1.ServerType.SasViya)
7172
+ throw new Error('Client credentials require SAS Viya');
7173
+ if (!client || !secret)
7174
+ throw new Error('Client credentials require a client and secret');
7175
+ const baseUrl = requestClient.getBaseUrl();
7176
+ let state = clientTokens.get(authConfig);
7177
+ if (!state ||
7178
+ state.client !== client ||
7179
+ state.secret !== secret ||
7180
+ state.baseUrl !== baseUrl) {
7181
+ state = { token: '', expiresAt: 0, client, secret, baseUrl };
7182
+ clientTokens.set(authConfig, state);
7183
+ }
7184
+ let access_token;
7185
+ if (!state.token || Date.now() >= state.expiresAt) {
7186
+ if (!state.pending) {
7187
+ const tokenState = state;
7188
+ const requestedAt = Date.now();
7189
+ const pair = `${client}:${secret}`;
7190
+ const url = '/SASLogon/oauth/token';
7191
+ const data = 'grant_type=client_credentials';
7192
+ const headers = {
7193
+ Authorization: 'Basic ' +
7194
+ (typeof Buffer === 'undefined'
7195
+ ? btoa(pair)
7196
+ : Buffer.from(pair).toString('base64')),
7197
+ 'Content-Type': 'application/x-www-form-urlencoded'
7198
+ };
7199
+ state.pending = requestClient
7200
+ .post(url, data, undefined, 'application/x-www-form-urlencoded', headers)
7201
+ .catch((err) => {
7202
+ if (err instanceof errors_1.CertificateError)
7203
+ throw err;
7204
+ throw (0, getTokenRequestErrorPrefix_1.tokenRequestErrorMessage)(err, 'fetching access token', 'getTokens', types_1.ServerType.SasViya, url, data, headers, client, secret);
7205
+ })
7206
+ .then(({ result }) => {
7207
+ if (!(result === null || result === void 0 ? void 0 : result.access_token))
7208
+ throw new Error('Client credentials response did not contain an access token');
7209
+ const expiresAt = requestedAt + (Number(result.expires_in) || 0) * 1000;
7210
+ if (result.expires_in != null && Date.now() >= expiresAt)
7211
+ throw new Error('Client credentials access token expired before receipt');
7212
+ tokenState.token = result.access_token;
7213
+ tokenState.expiresAt = expiresAt;
7214
+ return tokenState.token;
7215
+ })
7216
+ .finally(() => {
7217
+ tokenState.pending = undefined;
7218
+ });
7219
+ }
7220
+ access_token = yield state.pending;
7221
+ }
7222
+ else
7223
+ access_token = state.token;
7224
+ authConfig.access_token = access_token;
7225
+ return Object.assign(Object.assign({}, authConfig), { access_token });
7226
+ });
7227
+ }
7075
7228
  /**
7076
7229
  * Returns the auth configuration, refreshing the tokens if necessary.
7077
7230
  * This function can only be used by Node, if a server type is SASVIYA.
@@ -7085,6 +7238,9 @@ const apiBasePath_1 = __webpack_require__(6838);
7085
7238
  */
7086
7239
  function getTokens(requestClient_1, authConfig_1) {
7087
7240
  return __awaiter(this, arguments, void 0, function* (requestClient, authConfig, serverType = types_1.ServerType.SasViya, onTokensRefreshed, apiBasePath = apiBasePath_1.DEFAULT_API_BASE_PATH) {
7241
+ if ('grantType' in authConfig &&
7242
+ authConfig.grantType === 'client_credentials')
7243
+ return getClientCredentialsTokens(requestClient, authConfig, serverType);
7088
7244
  const logger = (0, host_1.getLogger)();
7089
7245
  // Note: client/secret are NOT mutated. The sas.cli public-client fallback
7090
7246
  // is applied only to the refresh call itself, so a caller that round-trips
@@ -7170,7 +7326,7 @@ function getTokens(requestClient_1, authConfig_1) {
7170
7326
 
7171
7327
  /***/ },
7172
7328
 
7173
- /***/ 4879
7329
+ /***/ 5168
7174
7330
  (__unused_webpack_module, exports, __webpack_require__) {
7175
7331
 
7176
7332
  "use strict";
@@ -7190,15 +7346,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
7190
7346
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
7191
7347
  };
7192
7348
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7193
- __exportStar(__webpack_require__(7710), exports);
7194
- __exportStar(__webpack_require__(7607), exports);
7195
- __exportStar(__webpack_require__(2359), exports);
7196
- __exportStar(__webpack_require__(7847), exports);
7349
+ __exportStar(__webpack_require__(6933), exports);
7350
+ __exportStar(__webpack_require__(8364), exports);
7351
+ __exportStar(__webpack_require__(8204), exports);
7352
+ __exportStar(__webpack_require__(5996), exports);
7197
7353
 
7198
7354
 
7199
7355
  /***/ },
7200
7356
 
7201
- /***/ 7607
7357
+ /***/ 8364
7202
7358
  (__unused_webpack_module, exports) {
7203
7359
 
7204
7360
  "use strict";
@@ -7213,7 +7369,7 @@ exports.isAuthorizeFormRequired = isAuthorizeFormRequired;
7213
7369
 
7214
7370
  /***/ },
7215
7371
 
7216
- /***/ 2359
7372
+ /***/ 8204
7217
7373
  (__unused_webpack_module, exports) {
7218
7374
 
7219
7375
  "use strict";
@@ -7230,7 +7386,7 @@ exports.isLogInRequired = isLogInRequired;
7230
7386
 
7231
7387
  /***/ },
7232
7388
 
7233
- /***/ 7847
7389
+ /***/ 5996
7234
7390
  (__unused_webpack_module, exports, __webpack_require__) {
7235
7391
 
7236
7392
  "use strict";
@@ -7238,7 +7394,7 @@ exports.isLogInRequired = isLogInRequired;
7238
7394
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7239
7395
  exports.isLogInSuccessHeaderPresent = exports.getExpectedLogInSuccessHeader = exports.loginSuccessHeaders = exports.defaultSuccessHeaderKey = void 0;
7240
7396
  const types_1 = __webpack_require__(3631);
7241
- const utils_1 = __webpack_require__(9266);
7397
+ const utils_1 = __webpack_require__(9731);
7242
7398
  const enLoginSuccessHeader = 'You have signed in.';
7243
7399
  exports.defaultSuccessHeaderKey = 'default';
7244
7400
  // The following headers provided by https://github.com/sasjs/adapter/issues/835#issuecomment-2177818601
@@ -7325,7 +7481,7 @@ exports.isLogInSuccessHeaderPresent = isLogInSuccessHeaderPresent;
7325
7481
 
7326
7482
  /***/ },
7327
7483
 
7328
- /***/ 2894
7484
+ /***/ 4213
7329
7485
  (__unused_webpack_module, exports, __webpack_require__) {
7330
7486
 
7331
7487
  "use strict";
@@ -7341,7 +7497,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7341
7497
  };
7342
7498
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7343
7499
  exports.openWebPage = openWebPage;
7344
- const loginPrompt_1 = __webpack_require__(2986);
7500
+ const loginPrompt_1 = __webpack_require__(647);
7345
7501
  const defaultWindowFeatures = { width: 500, height: 600 };
7346
7502
  function openWebPage(url_1) {
7347
7503
  return __awaiter(this, arguments, void 0, function* (url, windowName = '', WindowFeatures = defaultWindowFeatures, onLoggedOut) {
@@ -7363,7 +7519,7 @@ function openWebPage(url_1) {
7363
7519
 
7364
7520
  /***/ },
7365
7521
 
7366
- /***/ 6894
7522
+ /***/ 7033
7367
7523
  (__unused_webpack_module, exports) {
7368
7524
 
7369
7525
  "use strict";
@@ -7559,7 +7715,7 @@ exports.redactPayload = redactPayload;
7559
7715
 
7560
7716
  /***/ },
7561
7717
 
7562
- /***/ 6725
7718
+ /***/ 6034
7563
7719
  (__unused_webpack_module, exports, __webpack_require__) {
7564
7720
 
7565
7721
  "use strict";
@@ -7575,9 +7731,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7575
7731
  };
7576
7732
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7577
7733
  exports.refreshTokensForSasjs = refreshTokensForSasjs;
7578
- const getTokenRequestErrorPrefix_1 = __webpack_require__(1087);
7734
+ const getTokenRequestErrorPrefix_1 = __webpack_require__(6418);
7579
7735
  const types_1 = __webpack_require__(3631);
7580
- const apiBasePath_1 = __webpack_require__(6838);
7736
+ const apiBasePath_1 = __webpack_require__(6095);
7581
7737
  /**
7582
7738
  * Exchanges the refresh token for an access token for the given client.
7583
7739
  * @param requestClient - the pre-configured HTTP request client
@@ -7609,7 +7765,7 @@ function refreshTokensForSasjs(requestClient_1, refreshToken_1) {
7609
7765
 
7610
7766
  /***/ },
7611
7767
 
7612
- /***/ 5747
7768
+ /***/ 1189
7613
7769
  (__unused_webpack_module, exports, __webpack_require__) {
7614
7770
 
7615
7771
  "use strict";
@@ -7630,8 +7786,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
7630
7786
  exports.refreshTokensForViya = refreshTokensForViya;
7631
7787
  const types_1 = __webpack_require__(3631);
7632
7788
  const form_data_1 = __importDefault(__webpack_require__(1894));
7633
- const utils_1 = __webpack_require__(9266);
7634
- const getTokenRequestErrorPrefix_1 = __webpack_require__(1087);
7789
+ const utils_1 = __webpack_require__(9731);
7790
+ const getTokenRequestErrorPrefix_1 = __webpack_require__(6418);
7635
7791
  /**
7636
7792
  * Exchanges the refresh token for an access token for the given client.
7637
7793
  * This function can only be used by Node.
@@ -7668,7 +7824,7 @@ function refreshTokensForViya(requestClient, clientId, clientSecret, refreshToke
7668
7824
 
7669
7825
  /***/ },
7670
7826
 
7671
- /***/ 4257
7827
+ /***/ 1490
7672
7828
  (__unused_webpack_module, exports, __webpack_require__) {
7673
7829
 
7674
7830
  "use strict";
@@ -7684,8 +7840,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7684
7840
  };
7685
7841
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7686
7842
  exports.verifySas9Login = verifySas9Login;
7687
- const utils_1 = __webpack_require__(9266);
7688
- const _1 = __webpack_require__(4879);
7843
+ const utils_1 = __webpack_require__(9731);
7844
+ const _1 = __webpack_require__(5168);
7689
7845
  function verifySas9Login(loginPopup) {
7690
7846
  return __awaiter(this, void 0, void 0, function* () {
7691
7847
  let isLoggedIn = false;
@@ -7707,7 +7863,7 @@ function verifySas9Login(loginPopup) {
7707
7863
 
7708
7864
  /***/ },
7709
7865
 
7710
- /***/ 5009
7866
+ /***/ 9940
7711
7867
  (__unused_webpack_module, exports, __webpack_require__) {
7712
7868
 
7713
7869
  "use strict";
@@ -7724,8 +7880,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7724
7880
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7725
7881
  exports.isLoggedInSASVIYA = void 0;
7726
7882
  exports.verifySasViyaLogin = verifySasViyaLogin;
7727
- const utils_1 = __webpack_require__(9266);
7728
- const _1 = __webpack_require__(4879);
7883
+ const utils_1 = __webpack_require__(9731);
7884
+ const _1 = __webpack_require__(5168);
7729
7885
  function verifySasViyaLogin(loginPopup) {
7730
7886
  return __awaiter(this, void 0, void 0, function* () {
7731
7887
  var _a, _b;
@@ -7759,7 +7915,7 @@ exports.isLoggedInSASVIYA = isLoggedInSASVIYA;
7759
7915
 
7760
7916
  /***/ },
7761
7917
 
7762
- /***/ 7673
7918
+ /***/ 2884
7763
7919
  (__unused_webpack_module, exports, __webpack_require__) {
7764
7920
 
7765
7921
  "use strict";
@@ -7767,8 +7923,8 @@ var __webpack_unused_export__;
7767
7923
 
7768
7924
  __webpack_unused_export__ = ({ value: true });
7769
7925
  exports.generateFileUploadForm = void 0;
7770
- const convertToCsv_1 = __webpack_require__(4786);
7771
- const utils_1 = __webpack_require__(9266);
7926
+ const convertToCsv_1 = __webpack_require__(637);
7927
+ const utils_1 = __webpack_require__(9731);
7772
7928
  /**
7773
7929
  * One of the approaches SASjs takes to send tables-formatted JSON (see README)
7774
7930
  * to SAS is as multipart form data, where each table is provided as a specially
@@ -7811,7 +7967,7 @@ exports.generateFileUploadForm = generateFileUploadForm;
7811
7967
 
7812
7968
  /***/ },
7813
7969
 
7814
- /***/ 93
7970
+ /***/ 8138
7815
7971
  (__unused_webpack_module, exports, __webpack_require__) {
7816
7972
 
7817
7973
  "use strict";
@@ -7819,8 +7975,8 @@ var __webpack_unused_export__;
7819
7975
 
7820
7976
  __webpack_unused_export__ = ({ value: true });
7821
7977
  exports.generateTableUploadForm = void 0;
7822
- const convertToCsv_1 = __webpack_require__(4786);
7823
- const splitChunks_1 = __webpack_require__(8720);
7978
+ const convertToCsv_1 = __webpack_require__(637);
7979
+ const splitChunks_1 = __webpack_require__(1001);
7824
7980
  const generateTableUploadForm = (formData, data) => {
7825
7981
  const sasjsTables = [];
7826
7982
  const requestParams = {};
@@ -7858,7 +8014,7 @@ exports.generateTableUploadForm = generateTableUploadForm;
7858
8014
 
7859
8015
  /***/ },
7860
8016
 
7861
- /***/ 8156
8017
+ /***/ 1229
7862
8018
  (__unused_webpack_module, exports, __webpack_require__) {
7863
8019
 
7864
8020
  "use strict";
@@ -7881,19 +8037,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
7881
8037
  return (mod && mod.__esModule) ? mod : { "default": mod };
7882
8038
  };
7883
8039
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7884
- const SASjs_1 = __importDefault(__webpack_require__(9810));
7885
- __exportStar(__webpack_require__(3574), exports);
7886
- __exportStar(__webpack_require__(7388), exports);
7887
- __exportStar(__webpack_require__(2015), exports);
7888
- __exportStar(__webpack_require__(2831), exports);
7889
- __exportStar(__webpack_require__(5803), exports);
7890
- __exportStar(__webpack_require__(7560), exports);
8040
+ const SASjs_1 = __importDefault(__webpack_require__(159));
8041
+ __exportStar(__webpack_require__(5799), exports);
8042
+ __exportStar(__webpack_require__(6851), exports);
8043
+ __exportStar(__webpack_require__(5036), exports);
8044
+ __exportStar(__webpack_require__(7150), exports);
8045
+ __exportStar(__webpack_require__(3512), exports);
8046
+ __exportStar(__webpack_require__(7271), exports);
7891
8047
  exports["default"] = SASjs_1.default;
7892
8048
 
7893
8049
 
7894
8050
  /***/ },
7895
8051
 
7896
- /***/ 4126
8052
+ /***/ 5925
7897
8053
  (__unused_webpack_module, exports, __webpack_require__) {
7898
8054
 
7899
8055
  "use strict";
@@ -7910,9 +8066,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7910
8066
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7911
8067
  exports.ComputeJobExecutor = void 0;
7912
8068
  const types_1 = __webpack_require__(3631);
7913
- const errors_1 = __webpack_require__(7388);
7914
- const JobExecutor_1 = __webpack_require__(1101);
7915
- const unauthenticatedRequestMessage_1 = __webpack_require__(2021);
8069
+ const errors_1 = __webpack_require__(6851);
8070
+ const JobExecutor_1 = __webpack_require__(9544);
8071
+ const unauthenticatedRequestMessage_1 = __webpack_require__(740);
7916
8072
  class ComputeJobExecutor extends JobExecutor_1.BaseJobExecutor {
7917
8073
  constructor(serverUrl, sasViyaApiClient) {
7918
8074
  super(serverUrl, types_1.ServerType.SasViya);
@@ -7961,7 +8117,7 @@ exports.ComputeJobExecutor = ComputeJobExecutor;
7961
8117
 
7962
8118
  /***/ },
7963
8119
 
7964
- /***/ 3871
8120
+ /***/ 6792
7965
8121
  (__unused_webpack_module, exports, __webpack_require__) {
7966
8122
 
7967
8123
  "use strict";
@@ -7977,12 +8133,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7977
8133
  };
7978
8134
  Object.defineProperty(exports, "__esModule", ({ value: true }));
7979
8135
  exports.FileUploader = void 0;
7980
- const utils_1 = __webpack_require__(9266);
7981
- const errors_1 = __webpack_require__(7388);
7982
- const MockReadinessError_1 = __webpack_require__(314);
8136
+ const utils_1 = __webpack_require__(9731);
8137
+ const errors_1 = __webpack_require__(6851);
8138
+ const MockReadinessError_1 = __webpack_require__(1527);
7983
8139
  const types_1 = __webpack_require__(3631);
7984
- const JobExecutor_1 = __webpack_require__(1101);
7985
- const unauthenticatedRequestMessage_1 = __webpack_require__(2021);
8140
+ const JobExecutor_1 = __webpack_require__(9544);
8141
+ const unauthenticatedRequestMessage_1 = __webpack_require__(740);
7986
8142
  class FileUploader extends JobExecutor_1.BaseJobExecutor {
7987
8143
  constructor(serverUrl, serverType, jobsPath, requestClient) {
7988
8144
  super(serverUrl, serverType);
@@ -8091,7 +8247,7 @@ exports.FileUploader = FileUploader;
8091
8247
 
8092
8248
  /***/ },
8093
8249
 
8094
- /***/ 1131
8250
+ /***/ 3084
8095
8251
  (__unused_webpack_module, exports, __webpack_require__) {
8096
8252
 
8097
8253
  "use strict";
@@ -8108,10 +8264,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8108
8264
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8109
8265
  exports.JesJobExecutor = void 0;
8110
8266
  const types_1 = __webpack_require__(3631);
8111
- const errors_1 = __webpack_require__(7388);
8112
- const JobExecutor_1 = __webpack_require__(1101);
8113
- const unauthenticatedRequestMessage_1 = __webpack_require__(2021);
8114
- const utils_1 = __webpack_require__(9266);
8267
+ const errors_1 = __webpack_require__(6851);
8268
+ const JobExecutor_1 = __webpack_require__(9544);
8269
+ const unauthenticatedRequestMessage_1 = __webpack_require__(740);
8270
+ const utils_1 = __webpack_require__(9731);
8115
8271
  class JesJobExecutor extends JobExecutor_1.BaseJobExecutor {
8116
8272
  constructor(serverUrl, sasViyaApiClient) {
8117
8273
  super(serverUrl, types_1.ServerType.SasViya);
@@ -8159,7 +8315,7 @@ exports.JesJobExecutor = JesJobExecutor;
8159
8315
 
8160
8316
  /***/ },
8161
8317
 
8162
- /***/ 1101
8318
+ /***/ 9544
8163
8319
  (__unused_webpack_module, exports, __webpack_require__) {
8164
8320
 
8165
8321
  "use strict";
@@ -8175,7 +8331,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8175
8331
  };
8176
8332
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8177
8333
  exports.BaseJobExecutor = void 0;
8178
- const utils_1 = __webpack_require__(9266);
8334
+ const utils_1 = __webpack_require__(9731);
8179
8335
  class BaseJobExecutor {
8180
8336
  constructor(serverUrl, serverType) {
8181
8337
  this.serverUrl = serverUrl;
@@ -8207,7 +8363,7 @@ exports.BaseJobExecutor = BaseJobExecutor;
8207
8363
 
8208
8364
  /***/ },
8209
8365
 
8210
- /***/ 4941
8366
+ /***/ 4680
8211
8367
  (__unused_webpack_module, exports, __webpack_require__) {
8212
8368
 
8213
8369
  "use strict";
@@ -8227,10 +8383,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
8227
8383
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8228
8384
  exports.Sas9JobExecutor = void 0;
8229
8385
  const form_data_1 = __importDefault(__webpack_require__(1894));
8230
- const errors_1 = __webpack_require__(7388);
8231
- const utils_1 = __webpack_require__(9266);
8232
- const JobExecutor_1 = __webpack_require__(1101);
8233
- const Sas9RequestClient_1 = __webpack_require__(576);
8386
+ const errors_1 = __webpack_require__(6851);
8387
+ const utils_1 = __webpack_require__(9731);
8388
+ const JobExecutor_1 = __webpack_require__(9544);
8389
+ const Sas9RequestClient_1 = __webpack_require__(1897);
8234
8390
  /**
8235
8391
  * Job executor for SAS9 servers for use in Node.js environments.
8236
8392
  * Initiates login with the provided username and password from the config
@@ -8335,7 +8491,7 @@ const generateFileUploadForm = (formData, data) => {
8335
8491
 
8336
8492
  /***/ },
8337
8493
 
8338
- /***/ 8995
8494
+ /***/ 9120
8339
8495
  (__unused_webpack_module, exports, __webpack_require__) {
8340
8496
 
8341
8497
  "use strict";
@@ -8356,12 +8512,12 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
8356
8512
  exports.SasjsJobExecutor = void 0;
8357
8513
  const form_data_1 = __importDefault(__webpack_require__(1894));
8358
8514
  const types_1 = __webpack_require__(3631);
8359
- const errors_1 = __webpack_require__(7388);
8360
- const generateFileUploadForm_1 = __webpack_require__(7673);
8361
- const utils_1 = __webpack_require__(9266);
8362
- const utils_2 = __webpack_require__(9266);
8363
- const JobExecutor_1 = __webpack_require__(1101);
8364
- const unauthenticatedRequestMessage_1 = __webpack_require__(2021);
8515
+ const errors_1 = __webpack_require__(6851);
8516
+ const generateFileUploadForm_1 = __webpack_require__(2884);
8517
+ const utils_1 = __webpack_require__(9731);
8518
+ const utils_2 = __webpack_require__(9731);
8519
+ const JobExecutor_1 = __webpack_require__(9544);
8520
+ const unauthenticatedRequestMessage_1 = __webpack_require__(740);
8365
8521
  class SasjsJobExecutor extends JobExecutor_1.BaseJobExecutor {
8366
8522
  constructor(serverUrl, jobsPath, requestClient) {
8367
8523
  super(serverUrl, types_1.ServerType.Sasjs);
@@ -8445,7 +8601,7 @@ exports.SasjsJobExecutor = SasjsJobExecutor;
8445
8601
 
8446
8602
  /***/ },
8447
8603
 
8448
- /***/ 8067
8604
+ /***/ 6652
8449
8605
  (__unused_webpack_module, exports, __webpack_require__) {
8450
8606
 
8451
8607
  "use strict";
@@ -8466,12 +8622,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
8466
8622
  exports.WebJobExecutor = void 0;
8467
8623
  const form_data_1 = __importDefault(__webpack_require__(1894));
8468
8624
  const types_1 = __webpack_require__(3631);
8469
- const errors_1 = __webpack_require__(7388);
8470
- const generateFileUploadForm_1 = __webpack_require__(7673);
8471
- const generateTableUploadForm_1 = __webpack_require__(93);
8472
- const utils_1 = __webpack_require__(9266);
8473
- const JobExecutor_1 = __webpack_require__(1101);
8474
- const unauthenticatedRequestMessage_1 = __webpack_require__(2021);
8625
+ const errors_1 = __webpack_require__(6851);
8626
+ const generateFileUploadForm_1 = __webpack_require__(2884);
8627
+ const generateTableUploadForm_1 = __webpack_require__(8138);
8628
+ const getTokens_1 = __webpack_require__(242);
8629
+ const utils_1 = __webpack_require__(9731);
8630
+ const JobExecutor_1 = __webpack_require__(9544);
8631
+ const unauthenticatedRequestMessage_1 = __webpack_require__(740);
8475
8632
  class WebJobExecutor extends JobExecutor_1.BaseJobExecutor {
8476
8633
  constructor(serverUrl, serverType, jobsPath, requestClient, sasViyaApiClient) {
8477
8634
  super(serverUrl, serverType);
@@ -8489,10 +8646,12 @@ class WebJobExecutor extends JobExecutor_1.BaseJobExecutor {
8489
8646
  : sasJob
8490
8647
  : sasJob;
8491
8648
  let apiUrl = `${config.serverUrl}${this.jobsPath}/?${'_program=' + program}`;
8649
+ const clientCredentials = config.serverType === types_1.ServerType.SasViya &&
8650
+ (authConfig === null || authConfig === void 0 ? void 0 : authConfig.grantType) === 'client_credentials';
8492
8651
  if (config.serverType === types_1.ServerType.SasViya) {
8493
8652
  let jobUri;
8494
8653
  try {
8495
- jobUri = yield this.getJobUri(program);
8654
+ jobUri = yield this.getJobUri(program, clientCredentials ? authConfig : undefined);
8496
8655
  }
8497
8656
  catch (e) {
8498
8657
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
@@ -8597,8 +8756,11 @@ class WebJobExecutor extends JobExecutor_1.BaseJobExecutor {
8597
8756
  const contentType = formData instanceof form_data_1.default && typeof FormData === 'undefined'
8598
8757
  ? `multipart/form-data; boundary=${formData.getHeaders()['content-type']}`
8599
8758
  : 'multipart/form-data';
8759
+ const accessToken = clientCredentials && authConfig
8760
+ ? (yield (0, getTokens_1.getTokens)(this.requestClient, authConfig)).access_token
8761
+ : authConfig === null || authConfig === void 0 ? void 0 : authConfig.access_token;
8600
8762
  const requestPromise = new Promise((resolve, reject) => {
8601
- this.requestClient.post(apiUrl, formData, authConfig === null || authConfig === void 0 ? void 0 : authConfig.access_token, contentType)
8763
+ this.requestClient.post(apiUrl, formData, accessToken, contentType)
8602
8764
  .then((res) => __awaiter(this, void 0, void 0, function* () {
8603
8765
  this.requestClient.appendRequest(res, sasJob, config.debug);
8604
8766
  let jsonResponse = res.result;
@@ -8617,7 +8779,10 @@ class WebJobExecutor extends JobExecutor_1.BaseJobExecutor {
8617
8779
  jsonResponse =
8618
8780
  typeof res.result !== 'string' || (0, utils_1.hasWeboutBlob)(res.result)
8619
8781
  ? yield (0, utils_1.parseSasViyaLogDebugResponse)(res.result)
8620
- : yield (0, utils_1.parseSasViyaDebugResponse)(res.result, this.requestClient, this.serverUrl);
8782
+ : yield (0, utils_1.parseSasViyaDebugResponse)(res.result, this.requestClient, this.serverUrl, clientCredentials && authConfig
8783
+ ? (yield (0, getTokens_1.getTokens)(this.requestClient, authConfig))
8784
+ .access_token
8785
+ : authConfig === null || authConfig === void 0 ? void 0 : authConfig.access_token);
8621
8786
  break;
8622
8787
  case types_1.ServerType.Sas9:
8623
8788
  jsonResponse =
@@ -8669,7 +8834,7 @@ class WebJobExecutor extends JobExecutor_1.BaseJobExecutor {
8669
8834
  }
8670
8835
  return requestParams;
8671
8836
  }
8672
- getJobUri(sasJob) {
8837
+ getJobUri(sasJob, authConfig) {
8673
8838
  return __awaiter(this, void 0, void 0, function* () {
8674
8839
  if (!this.sasViyaApiClient)
8675
8840
  return '';
@@ -8684,7 +8849,10 @@ class WebJobExecutor extends JobExecutor_1.BaseJobExecutor {
8684
8849
  if (!jobName) {
8685
8850
  throw new Error('Job name is empty, null or undefined.');
8686
8851
  }
8687
- const locJobs = yield this.sasViyaApiClient.getJobsInFolder(folderPath);
8852
+ const api = authConfig
8853
+ ? this.sasViyaApiClient.withAccessTokenProvider(() => __awaiter(this, void 0, void 0, function* () { return (yield (0, getTokens_1.getTokens)(this.requestClient, authConfig)).access_token; }))
8854
+ : this.sasViyaApiClient;
8855
+ const locJobs = yield api.getJobsInFolder(folderPath);
8688
8856
  if (locJobs) {
8689
8857
  const job = locJobs.find((el) => el.name === jobName && el.contentType === 'jobDefinition');
8690
8858
  if (job) {
@@ -8713,7 +8881,7 @@ function addDummyFile(formData) {
8713
8881
 
8714
8882
  /***/ },
8715
8883
 
8716
- /***/ 1391
8884
+ /***/ 7026
8717
8885
  (__unused_webpack_module, exports, __webpack_require__) {
8718
8886
 
8719
8887
  "use strict";
@@ -8733,18 +8901,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
8733
8901
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
8734
8902
  };
8735
8903
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8736
- __exportStar(__webpack_require__(4126), exports);
8737
- __exportStar(__webpack_require__(3871), exports);
8738
- __exportStar(__webpack_require__(1131), exports);
8739
- __exportStar(__webpack_require__(1101), exports);
8740
- __exportStar(__webpack_require__(4941), exports);
8741
- __exportStar(__webpack_require__(8067), exports);
8742
- __exportStar(__webpack_require__(8995), exports);
8904
+ __exportStar(__webpack_require__(5925), exports);
8905
+ __exportStar(__webpack_require__(6792), exports);
8906
+ __exportStar(__webpack_require__(3084), exports);
8907
+ __exportStar(__webpack_require__(9544), exports);
8908
+ __exportStar(__webpack_require__(4680), exports);
8909
+ __exportStar(__webpack_require__(6652), exports);
8910
+ __exportStar(__webpack_require__(9120), exports);
8743
8911
 
8744
8912
 
8745
8913
  /***/ },
8746
8914
 
8747
- /***/ 2021
8915
+ /***/ 740
8748
8916
  (__unused_webpack_module, exports) {
8749
8917
 
8750
8918
  "use strict";
@@ -8757,7 +8925,7 @@ exports.UNAUTHENTICATED_REQUEST_MESSAGE = 'Request is not authenticated. Make su
8757
8925
 
8758
8926
  /***/ },
8759
8927
 
8760
- /***/ 8816
8928
+ /***/ 7417
8761
8929
  (__unused_webpack_module, exports, __webpack_require__) {
8762
8930
 
8763
8931
  "use strict";
@@ -8773,18 +8941,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8773
8941
  };
8774
8942
  Object.defineProperty(exports, "__esModule", ({ value: true }));
8775
8943
  exports.throwIfError = exports.RequestClient = void 0;
8776
- const auth_1 = __webpack_require__(4879);
8777
- const errors_1 = __webpack_require__(7388);
8778
- const parseWeboutResponse_1 = __webpack_require__(5259);
8944
+ const auth_1 = __webpack_require__(5168);
8945
+ const errors_1 = __webpack_require__(6851);
8946
+ const parseWeboutResponse_1 = __webpack_require__(133);
8779
8947
  const error_1 = __webpack_require__(6340);
8780
- const SAS9AuthError_1 = __webpack_require__(2079);
8781
- const utils_1 = __webpack_require__(9266);
8782
- const InvalidSASjsCsrfError_1 = __webpack_require__(4001);
8783
- const host_1 = __webpack_require__(5334);
8784
- const responseReceived_1 = __webpack_require__(5775);
8785
- const isNode_1 = __webpack_require__(6308);
8786
- const mockReadiness_1 = __webpack_require__(2600);
8787
- const MockReadinessError_1 = __webpack_require__(314);
8948
+ const SAS9AuthError_1 = __webpack_require__(1955);
8949
+ const utils_1 = __webpack_require__(9731);
8950
+ const InvalidSASjsCsrfError_1 = __webpack_require__(3470);
8951
+ const host_1 = __webpack_require__(2001);
8952
+ const responseReceived_1 = __webpack_require__(2051);
8953
+ const isNode_1 = __webpack_require__(4319);
8954
+ const mockReadiness_1 = __webpack_require__(1525);
8955
+ const MockReadinessError_1 = __webpack_require__(1527);
8788
8956
  class RequestClient {
8789
8957
  constructor(baseUrl, httpsAgentOptions, requestsLimit, verboseMode) {
8790
8958
  this.baseUrl = baseUrl;
@@ -9587,7 +9755,7 @@ const parseError = (data) => {
9587
9755
 
9588
9756
  /***/ },
9589
9757
 
9590
- /***/ 576
9758
+ /***/ 1897
9591
9759
  (__unused_webpack_module, exports, __webpack_require__) {
9592
9760
 
9593
9761
  "use strict";
@@ -9639,9 +9807,9 @@ exports.Sas9RequestClient = void 0;
9639
9807
  const axios_cookiejar_support_1 = __webpack_require__(2841);
9640
9808
  const tough = __importStar(__webpack_require__(4724));
9641
9809
  const error_1 = __webpack_require__(6340);
9642
- const RequestClient_1 = __webpack_require__(8816);
9643
- const errors_1 = __webpack_require__(7388);
9644
- const host_1 = __webpack_require__(5334);
9810
+ const RequestClient_1 = __webpack_require__(7417);
9811
+ const errors_1 = __webpack_require__(6851);
9812
+ const host_1 = __webpack_require__(2001);
9645
9813
  let hasWarnedAboutSas9Login = false;
9646
9814
  /**
9647
9815
  * Warns once per process rather than per request: a job that runs repeatedly
@@ -9784,14 +9952,14 @@ exports.Sas9RequestClient = Sas9RequestClient;
9784
9952
 
9785
9953
  /***/ },
9786
9954
 
9787
- /***/ 7560
9955
+ /***/ 7271
9788
9956
  (__unused_webpack_module, exports, __webpack_require__) {
9789
9957
 
9790
9958
  "use strict";
9791
9959
 
9792
9960
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9793
9961
  exports.SASJS_LOGS_SEPARATOR = exports.SasjsRequestClient = void 0;
9794
- const RequestClient_1 = __webpack_require__(8816);
9962
+ const RequestClient_1 = __webpack_require__(7417);
9795
9963
  /**
9796
9964
  * Specific request client for SASJS.
9797
9965
  * Append tokens in headers.
@@ -9869,7 +10037,7 @@ exports.SASJS_LOGS_SEPARATOR = 'SASJS_LOGS_SEPARATOR_163ee17b6ff24f028928972d80a
9869
10037
 
9870
10038
  /***/ },
9871
10039
 
9872
- /***/ 2600
10040
+ /***/ 1525
9873
10041
  (__unused_webpack_module, exports, __webpack_require__) {
9874
10042
 
9875
10043
  "use strict";
@@ -9919,7 +10087,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9919
10087
  Object.defineProperty(exports, "__esModule", ({ value: true }));
9920
10088
  exports.waitForMockReadiness = exports.installMockReadinessGate = exports.captureMockReadiness = void 0;
9921
10089
  const axios_1 = __importStar(__webpack_require__(6425));
9922
- const MockReadinessError_1 = __webpack_require__(314);
10090
+ const MockReadinessError_1 = __webpack_require__(1527);
9923
10091
  const captureMockReadiness = () => {
9924
10092
  if (typeof window === 'undefined')
9925
10093
  return undefined;
@@ -10178,7 +10346,7 @@ exports.waitForMockReadiness = waitForMockReadiness;
10178
10346
 
10179
10347
  /***/ },
10180
10348
 
10181
- /***/ 5775
10349
+ /***/ 2051
10182
10350
  (__unused_webpack_module, exports) {
10183
10351
 
10184
10352
  "use strict";
@@ -10250,7 +10418,7 @@ exports.responseWasReceived = responseWasReceived;
10250
10418
 
10251
10419
  /***/ },
10252
10420
 
10253
- /***/ 5777
10421
+ /***/ 3596
10254
10422
  (__unused_webpack_module, exports) {
10255
10423
 
10256
10424
  "use strict";
@@ -10260,7 +10428,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10260
10428
 
10261
10429
  /***/ },
10262
10430
 
10263
- /***/ 1353
10431
+ /***/ 2116
10264
10432
  (__unused_webpack_module, exports) {
10265
10433
 
10266
10434
  "use strict";
@@ -10270,7 +10438,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10270
10438
 
10271
10439
  /***/ },
10272
10440
 
10273
- /***/ 5284
10441
+ /***/ 1419
10274
10442
  (__unused_webpack_module, exports) {
10275
10443
 
10276
10444
  "use strict";
@@ -10280,7 +10448,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10280
10448
 
10281
10449
  /***/ },
10282
10450
 
10283
- /***/ 3438
10451
+ /***/ 3183
10284
10452
  (__unused_webpack_module, exports) {
10285
10453
 
10286
10454
  "use strict";
@@ -10290,7 +10458,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10290
10458
 
10291
10459
  /***/ },
10292
10460
 
10293
- /***/ 4006
10461
+ /***/ 5485
10294
10462
  (__unused_webpack_module, exports) {
10295
10463
 
10296
10464
  "use strict";
@@ -10300,7 +10468,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10300
10468
 
10301
10469
  /***/ },
10302
10470
 
10303
- /***/ 8912
10471
+ /***/ 555
10304
10472
  (__unused_webpack_module, exports) {
10305
10473
 
10306
10474
  "use strict";
@@ -10310,7 +10478,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10310
10478
 
10311
10479
  /***/ },
10312
10480
 
10313
- /***/ 5873
10481
+ /***/ 8372
10314
10482
  (__unused_webpack_module, exports) {
10315
10483
 
10316
10484
  "use strict";
@@ -10320,7 +10488,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10320
10488
 
10321
10489
  /***/ },
10322
10490
 
10323
- /***/ 2872
10491
+ /***/ 41
10324
10492
  (__unused_webpack_module, exports) {
10325
10493
 
10326
10494
  "use strict";
@@ -10330,7 +10498,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10330
10498
 
10331
10499
  /***/ },
10332
10500
 
10333
- /***/ 3632
10501
+ /***/ 6045
10334
10502
  (__unused_webpack_module, exports) {
10335
10503
 
10336
10504
  "use strict";
@@ -10340,7 +10508,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10340
10508
 
10341
10509
  /***/ },
10342
10510
 
10343
- /***/ 6772
10511
+ /***/ 2251
10344
10512
  (__unused_webpack_module, exports) {
10345
10513
 
10346
10514
  "use strict";
@@ -10350,7 +10518,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10350
10518
 
10351
10519
  /***/ },
10352
10520
 
10353
- /***/ 1751
10521
+ /***/ 1718
10354
10522
  (__unused_webpack_module, exports) {
10355
10523
 
10356
10524
  "use strict";
@@ -10360,7 +10528,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10360
10528
 
10361
10529
  /***/ },
10362
10530
 
10363
- /***/ 6864
10531
+ /***/ 7726
10364
10532
  (__unused_webpack_module, exports) {
10365
10533
 
10366
10534
  "use strict";
@@ -10370,7 +10538,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10370
10538
 
10371
10539
  /***/ },
10372
10540
 
10373
- /***/ 9556
10541
+ /***/ 8425
10374
10542
  (__unused_webpack_module, exports) {
10375
10543
 
10376
10544
  "use strict";
@@ -10380,7 +10548,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10380
10548
 
10381
10549
  /***/ },
10382
10550
 
10383
- /***/ 4066
10551
+ /***/ 1427
10384
10552
  (__unused_webpack_module, exports) {
10385
10553
 
10386
10554
  "use strict";
@@ -10483,7 +10651,7 @@ var LoginMechanism;
10483
10651
 
10484
10652
  /***/ },
10485
10653
 
10486
- /***/ 5618
10654
+ /***/ 7703
10487
10655
  (__unused_webpack_module, exports) {
10488
10656
 
10489
10657
  "use strict";
@@ -10505,14 +10673,14 @@ var SessionState;
10505
10673
 
10506
10674
  /***/ },
10507
10675
 
10508
- /***/ 1473
10676
+ /***/ 9150
10509
10677
  (__unused_webpack_module, exports, __webpack_require__) {
10510
10678
 
10511
10679
  "use strict";
10512
10680
 
10513
10681
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10514
10682
  exports.Tables = void 0;
10515
- const errors_1 = __webpack_require__(7388);
10683
+ const errors_1 = __webpack_require__(6851);
10516
10684
  class Tables {
10517
10685
  constructor(table, macroName) {
10518
10686
  this._tables = {};
@@ -10541,7 +10709,7 @@ exports.Tables = Tables;
10541
10709
 
10542
10710
  /***/ },
10543
10711
 
10544
- /***/ 8143
10712
+ /***/ 584
10545
10713
  (__unused_webpack_module, exports) {
10546
10714
 
10547
10715
  "use strict";
@@ -10551,7 +10719,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10551
10719
 
10552
10720
  /***/ },
10553
10721
 
10554
- /***/ 8305
10722
+ /***/ 1180
10555
10723
  (__unused_webpack_module, exports) {
10556
10724
 
10557
10725
  "use strict";
@@ -10561,7 +10729,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
10561
10729
 
10562
10730
  /***/ },
10563
10731
 
10564
- /***/ 8707
10732
+ /***/ 7916
10565
10733
  (__unused_webpack_module, exports) {
10566
10734
 
10567
10735
  "use strict";
@@ -10581,7 +10749,7 @@ exports.ArgumentError = ArgumentError;
10581
10749
 
10582
10750
  /***/ },
10583
10751
 
10584
- /***/ 8661
10752
+ /***/ 7060
10585
10753
  (__unused_webpack_module, exports) {
10586
10754
 
10587
10755
  "use strict";
@@ -10602,7 +10770,7 @@ exports.AuthorizeError = AuthorizeError;
10602
10770
 
10603
10771
  /***/ },
10604
10772
 
10605
- /***/ 9241
10773
+ /***/ 7052
10606
10774
  (__unused_webpack_module, exports) {
10607
10775
 
10608
10776
  "use strict";
@@ -10624,7 +10792,7 @@ exports.CertificateError = CertificateError;
10624
10792
 
10625
10793
  /***/ },
10626
10794
 
10627
- /***/ 634
10795
+ /***/ 1375
10628
10796
  (__unused_webpack_module, exports) {
10629
10797
 
10630
10798
  "use strict";
@@ -10645,7 +10813,7 @@ exports.ComputeJobExecutionError = ComputeJobExecutionError;
10645
10813
 
10646
10814
  /***/ },
10647
10815
 
10648
- /***/ 4845
10816
+ /***/ 9990
10649
10817
  (__unused_webpack_module, exports) {
10650
10818
 
10651
10819
  "use strict";
@@ -10676,7 +10844,7 @@ exports.ErrorResponse = ErrorResponse;
10676
10844
 
10677
10845
  /***/ },
10678
10846
 
10679
- /***/ 9068
10847
+ /***/ 2231
10680
10848
  (__unused_webpack_module, exports) {
10681
10849
 
10682
10850
  "use strict";
@@ -10695,7 +10863,7 @@ exports.InternalServerError = InternalServerError;
10695
10863
 
10696
10864
  /***/ },
10697
10865
 
10698
- /***/ 2383
10866
+ /***/ 2306
10699
10867
  (__unused_webpack_module, exports) {
10700
10868
 
10701
10869
  "use strict";
@@ -10714,7 +10882,7 @@ exports.InvalidJsonError = InvalidJsonError;
10714
10882
 
10715
10883
  /***/ },
10716
10884
 
10717
- /***/ 4001
10885
+ /***/ 3470
10718
10886
  (__unused_webpack_module, exports) {
10719
10887
 
10720
10888
  "use strict";
@@ -10735,7 +10903,7 @@ exports.InvalidSASjsCsrfError = InvalidSASjsCsrfError;
10735
10903
 
10736
10904
  /***/ },
10737
10905
 
10738
- /***/ 7411
10906
+ /***/ 7548
10739
10907
  (__unused_webpack_module, exports) {
10740
10908
 
10741
10909
  "use strict";
@@ -10757,7 +10925,7 @@ exports.JobExecutionError = JobExecutionError;
10757
10925
 
10758
10926
  /***/ },
10759
10927
 
10760
- /***/ 2909
10928
+ /***/ 5522
10761
10929
  (__unused_webpack_module, exports) {
10762
10930
 
10763
10931
  "use strict";
@@ -10777,7 +10945,7 @@ exports.JobStatePollError = JobStatePollError;
10777
10945
 
10778
10946
  /***/ },
10779
10947
 
10780
- /***/ 7236
10948
+ /***/ 8867
10781
10949
  (__unused_webpack_module, exports) {
10782
10950
 
10783
10951
  "use strict";
@@ -10796,7 +10964,7 @@ exports.JsonParseArrayError = JsonParseArrayError;
10796
10964
 
10797
10965
  /***/ },
10798
10966
 
10799
- /***/ 3104
10967
+ /***/ 7801
10800
10968
  (__unused_webpack_module, exports) {
10801
10969
 
10802
10970
  "use strict";
@@ -10818,7 +10986,7 @@ exports.LoginRequiredError = LoginRequiredError;
10818
10986
 
10819
10987
  /***/ },
10820
10988
 
10821
- /***/ 314
10989
+ /***/ 1527
10822
10990
  (__unused_webpack_module, exports) {
10823
10991
 
10824
10992
  "use strict";
@@ -10838,7 +11006,7 @@ exports.MockReadinessError = MockReadinessError;
10838
11006
 
10839
11007
  /***/ },
10840
11008
 
10841
- /***/ 1976
11009
+ /***/ 9623
10842
11010
  (__unused_webpack_module, exports) {
10843
11011
 
10844
11012
  "use strict";
@@ -10860,7 +11028,7 @@ exports.NoSessionStateError = NoSessionStateError;
10860
11028
 
10861
11029
  /***/ },
10862
11030
 
10863
- /***/ 7403
11031
+ /***/ 1560
10864
11032
  (__unused_webpack_module, exports) {
10865
11033
 
10866
11034
  "use strict";
@@ -10880,14 +11048,14 @@ exports.NotFoundError = NotFoundError;
10880
11048
 
10881
11049
  /***/ },
10882
11050
 
10883
- /***/ 7640
11051
+ /***/ 2599
10884
11052
  (__unused_webpack_module, exports, __webpack_require__) {
10885
11053
 
10886
11054
  "use strict";
10887
11055
 
10888
11056
  Object.defineProperty(exports, "__esModule", ({ value: true }));
10889
11057
  exports.RefreshTokenRejectedError = void 0;
10890
- const LoginRequiredError_1 = __webpack_require__(3104);
11058
+ const LoginRequiredError_1 = __webpack_require__(7801);
10891
11059
  /**
10892
11060
  * The server rejected a refresh token.
10893
11061
  *
@@ -10934,7 +11102,7 @@ exports.RefreshTokenRejectedError = RefreshTokenRejectedError;
10934
11102
 
10935
11103
  /***/ },
10936
11104
 
10937
- /***/ 5395
11105
+ /***/ 9572
10938
11106
  (__unused_webpack_module, exports, __webpack_require__) {
10939
11107
 
10940
11108
  "use strict";
@@ -10964,7 +11132,7 @@ exports.RootFolderNotFoundError = RootFolderNotFoundError;
10964
11132
 
10965
11133
  /***/ },
10966
11134
 
10967
- /***/ 2079
11135
+ /***/ 1955
10968
11136
  (__unused_webpack_module, exports) {
10969
11137
 
10970
11138
  "use strict";
@@ -10984,7 +11152,7 @@ exports.SAS9AuthError = SAS9AuthError;
10984
11152
 
10985
11153
  /***/ },
10986
11154
 
10987
- /***/ 996
11155
+ /***/ 2735
10988
11156
  (__unused_webpack_module, exports) {
10989
11157
 
10990
11158
  "use strict";
@@ -11016,7 +11184,7 @@ exports.UnsafeRedirectError = UnsafeRedirectError;
11016
11184
 
11017
11185
  /***/ },
11018
11186
 
11019
- /***/ 9997
11187
+ /***/ 6674
11020
11188
  (__unused_webpack_module, exports) {
11021
11189
 
11022
11190
  "use strict";
@@ -11036,7 +11204,7 @@ exports.WeboutResponseError = WeboutResponseError;
11036
11204
 
11037
11205
  /***/ },
11038
11206
 
11039
- /***/ 7388
11207
+ /***/ 6851
11040
11208
  (__unused_webpack_module, exports, __webpack_require__) {
11041
11209
 
11042
11210
  "use strict";
@@ -11056,29 +11224,29 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11056
11224
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11057
11225
  };
11058
11226
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11059
- __exportStar(__webpack_require__(8707), exports);
11060
- __exportStar(__webpack_require__(8661), exports);
11061
- __exportStar(__webpack_require__(9241), exports);
11062
- __exportStar(__webpack_require__(634), exports);
11063
- __exportStar(__webpack_require__(4845), exports);
11064
- __exportStar(__webpack_require__(9068), exports);
11065
- __exportStar(__webpack_require__(2383), exports);
11066
- __exportStar(__webpack_require__(7411), exports);
11067
- __exportStar(__webpack_require__(2909), exports);
11068
- __exportStar(__webpack_require__(7236), exports);
11069
- __exportStar(__webpack_require__(3104), exports);
11070
- __exportStar(__webpack_require__(314), exports);
11071
- __exportStar(__webpack_require__(1976), exports);
11072
- __exportStar(__webpack_require__(7403), exports);
11073
- __exportStar(__webpack_require__(7640), exports);
11074
- __exportStar(__webpack_require__(5395), exports);
11075
- __exportStar(__webpack_require__(996), exports);
11076
- __exportStar(__webpack_require__(9997), exports);
11227
+ __exportStar(__webpack_require__(7916), exports);
11228
+ __exportStar(__webpack_require__(7060), exports);
11229
+ __exportStar(__webpack_require__(7052), exports);
11230
+ __exportStar(__webpack_require__(1375), exports);
11231
+ __exportStar(__webpack_require__(9990), exports);
11232
+ __exportStar(__webpack_require__(2231), exports);
11233
+ __exportStar(__webpack_require__(2306), exports);
11234
+ __exportStar(__webpack_require__(7548), exports);
11235
+ __exportStar(__webpack_require__(5522), exports);
11236
+ __exportStar(__webpack_require__(8867), exports);
11237
+ __exportStar(__webpack_require__(7801), exports);
11238
+ __exportStar(__webpack_require__(1527), exports);
11239
+ __exportStar(__webpack_require__(9623), exports);
11240
+ __exportStar(__webpack_require__(1560), exports);
11241
+ __exportStar(__webpack_require__(2599), exports);
11242
+ __exportStar(__webpack_require__(9572), exports);
11243
+ __exportStar(__webpack_require__(2735), exports);
11244
+ __exportStar(__webpack_require__(6674), exports);
11077
11245
 
11078
11246
 
11079
11247
  /***/ },
11080
11248
 
11081
- /***/ 3574
11249
+ /***/ 5799
11082
11250
  (__unused_webpack_module, exports, __webpack_require__) {
11083
11251
 
11084
11252
  "use strict";
@@ -11098,30 +11266,30 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11098
11266
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11099
11267
  };
11100
11268
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11101
- __exportStar(__webpack_require__(5777), exports);
11102
- __exportStar(__webpack_require__(1353), exports);
11103
- __exportStar(__webpack_require__(5284), exports);
11104
- __exportStar(__webpack_require__(8912), exports);
11105
- __exportStar(__webpack_require__(4006), exports);
11106
- __exportStar(__webpack_require__(5873), exports);
11107
- __exportStar(__webpack_require__(2872), exports);
11108
- __exportStar(__webpack_require__(3632), exports);
11109
- __exportStar(__webpack_require__(6772), exports);
11110
- __exportStar(__webpack_require__(1751), exports);
11111
- __exportStar(__webpack_require__(4066), exports);
11112
- __exportStar(__webpack_require__(9556), exports);
11113
- __exportStar(__webpack_require__(5618), exports);
11114
- __exportStar(__webpack_require__(8143), exports);
11115
- __exportStar(__webpack_require__(6864), exports);
11116
- __exportStar(__webpack_require__(8305), exports);
11117
- __exportStar(__webpack_require__(3438), exports);
11118
- __exportStar(__webpack_require__(7388), exports);
11119
- __exportStar(__webpack_require__(1473), exports);
11269
+ __exportStar(__webpack_require__(3596), exports);
11270
+ __exportStar(__webpack_require__(2116), exports);
11271
+ __exportStar(__webpack_require__(1419), exports);
11272
+ __exportStar(__webpack_require__(555), exports);
11273
+ __exportStar(__webpack_require__(5485), exports);
11274
+ __exportStar(__webpack_require__(8372), exports);
11275
+ __exportStar(__webpack_require__(41), exports);
11276
+ __exportStar(__webpack_require__(6045), exports);
11277
+ __exportStar(__webpack_require__(2251), exports);
11278
+ __exportStar(__webpack_require__(1718), exports);
11279
+ __exportStar(__webpack_require__(1427), exports);
11280
+ __exportStar(__webpack_require__(8425), exports);
11281
+ __exportStar(__webpack_require__(7703), exports);
11282
+ __exportStar(__webpack_require__(584), exports);
11283
+ __exportStar(__webpack_require__(7726), exports);
11284
+ __exportStar(__webpack_require__(1180), exports);
11285
+ __exportStar(__webpack_require__(3183), exports);
11286
+ __exportStar(__webpack_require__(6851), exports);
11287
+ __exportStar(__webpack_require__(9150), exports);
11120
11288
 
11121
11289
 
11122
11290
  /***/ },
11123
11291
 
11124
- /***/ 3258
11292
+ /***/ 6907
11125
11293
  (__unused_webpack_module, exports) {
11126
11294
 
11127
11295
  "use strict";
@@ -11153,7 +11321,7 @@ function appendExtraResponseAttributes(response, extraResponseAttributes) {
11153
11321
 
11154
11322
  /***/ },
11155
11323
 
11156
- /***/ 2558
11324
+ /***/ 5813
11157
11325
  (__unused_webpack_module, exports) {
11158
11326
 
11159
11327
  "use strict";
@@ -11180,7 +11348,7 @@ function asyncForEach(array, callback) {
11180
11348
 
11181
11349
  /***/ },
11182
11350
 
11183
- /***/ 9644
11351
+ /***/ 8969
11184
11352
  (__unused_webpack_module, exports) {
11185
11353
 
11186
11354
  "use strict";
@@ -11199,7 +11367,7 @@ exports.compareTimestamps = compareTimestamps;
11199
11367
 
11200
11368
  /***/ },
11201
11369
 
11202
- /***/ 4786
11370
+ /***/ 637
11203
11371
  (__unused_webpack_module, exports, __webpack_require__) {
11204
11372
 
11205
11373
  "use strict";
@@ -11361,7 +11529,7 @@ const getByteSize = (str) => {
11361
11529
 
11362
11530
  /***/ },
11363
11531
 
11364
- /***/ 6535
11532
+ /***/ 1250
11365
11533
  (__unused_webpack_module, exports, __webpack_require__) {
11366
11534
 
11367
11535
  "use strict";
@@ -11378,7 +11546,7 @@ exports.createAxiosInstance = createAxiosInstance;
11378
11546
 
11379
11547
  /***/ },
11380
11548
 
11381
- /***/ 6889
11549
+ /***/ 7536
11382
11550
  (__unused_webpack_module, exports) {
11383
11551
 
11384
11552
  "use strict";
@@ -11391,15 +11559,15 @@ exports.delay = delay;
11391
11559
 
11392
11560
  /***/ },
11393
11561
 
11394
- /***/ 5286
11562
+ /***/ 5363
11395
11563
  (__unused_webpack_module, exports, __webpack_require__) {
11396
11564
 
11397
11565
  "use strict";
11398
11566
 
11399
11567
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11400
11568
  exports.extractWeboutBlob = exports.hasWeboutBlob = void 0;
11401
- const getValidJson_1 = __webpack_require__(5880);
11402
- const parseWeboutResponse_1 = __webpack_require__(5259);
11569
+ const getValidJson_1 = __webpack_require__(2015);
11570
+ const parseWeboutResponse_1 = __webpack_require__(133);
11403
11571
  // Matches the script-constructed Blob that the JES web app uses to inline the
11404
11572
  // webout: `new Blob([`{...}`], {type: 'application/json'})`. The type is
11405
11573
  // text/plain on abort and error paths, where the JSON is wrapped in
@@ -11434,7 +11602,7 @@ exports.extractWeboutBlob = extractWeboutBlob;
11434
11602
 
11435
11603
  /***/ },
11436
11604
 
11437
- /***/ 3193
11605
+ /***/ 4882
11438
11606
  (__unused_webpack_module, exports, __webpack_require__) {
11439
11607
 
11440
11608
  "use strict";
@@ -11451,7 +11619,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11451
11619
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11452
11620
  exports.fetchLog = exports.fetchLogByChunks = void 0;
11453
11621
  const error_1 = __webpack_require__(6340);
11454
- const host_1 = __webpack_require__(5334);
11622
+ const host_1 = __webpack_require__(2001);
11455
11623
  /**
11456
11624
  * Fetches content of the log file
11457
11625
  * @param {object} requestClient - client object of Request Client.
@@ -11498,7 +11666,7 @@ exports.fetchLog = fetchLog;
11498
11666
 
11499
11667
  /***/ },
11500
11668
 
11501
- /***/ 3407
11669
+ /***/ 40
11502
11670
  (__unused_webpack_module, exports, __webpack_require__) {
11503
11671
 
11504
11672
  "use strict";
@@ -11506,8 +11674,8 @@ var __webpack_unused_export__;
11506
11674
 
11507
11675
  __webpack_unused_export__ = ({ value: true });
11508
11676
  exports.formatDataForRequest = void 0;
11509
- const convertToCsv_1 = __webpack_require__(4786);
11510
- const splitChunks_1 = __webpack_require__(8720);
11677
+ const convertToCsv_1 = __webpack_require__(637);
11678
+ const splitChunks_1 = __webpack_require__(1001);
11511
11679
  const formatDataForRequest = (data) => {
11512
11680
  const sasjsTables = [];
11513
11681
  let tableCounter = 0;
@@ -11546,7 +11714,7 @@ exports.formatDataForRequest = formatDataForRequest;
11546
11714
 
11547
11715
  /***/ },
11548
11716
 
11549
- /***/ 8292
11717
+ /***/ 573
11550
11718
  (__unused_webpack_module, exports, __webpack_require__) {
11551
11719
 
11552
11720
  "use strict";
@@ -11556,7 +11724,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
11556
11724
  };
11557
11725
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11558
11726
  exports.getFormData = void 0;
11559
- const _1 = __webpack_require__(9266);
11727
+ const _1 = __webpack_require__(9731);
11560
11728
  const form_data_1 = __importDefault(__webpack_require__(1894));
11561
11729
  const getFormData = () => (0, _1.isNode)() ? new form_data_1.default() : new FormData();
11562
11730
  exports.getFormData = getFormData;
@@ -11564,7 +11732,7 @@ exports.getFormData = getFormData;
11564
11732
 
11565
11733
  /***/ },
11566
11734
 
11567
- /***/ 343
11735
+ /***/ 3458
11568
11736
  (__unused_webpack_module, exports) {
11569
11737
 
11570
11738
  "use strict";
@@ -11581,14 +11749,14 @@ exports.getUserLanguage = getUserLanguage;
11581
11749
 
11582
11750
  /***/ },
11583
11751
 
11584
- /***/ 5880
11752
+ /***/ 2015
11585
11753
  (__unused_webpack_module, exports, __webpack_require__) {
11586
11754
 
11587
11755
  "use strict";
11588
11756
 
11589
11757
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11590
11758
  exports.getValidJson = void 0;
11591
- const errors_1 = __webpack_require__(7388);
11759
+ const errors_1 = __webpack_require__(6851);
11592
11760
  /**
11593
11761
  * if string passed then parse the string to json else if throw error for all other types unless it is not a valid json object.
11594
11762
  * @param str - string to check.
@@ -11616,7 +11784,7 @@ exports.getValidJson = getValidJson;
11616
11784
 
11617
11785
  /***/ },
11618
11786
 
11619
- /***/ 5334
11787
+ /***/ 2001
11620
11788
  (__unused_webpack_module, exports, __webpack_require__) {
11621
11789
 
11622
11790
  "use strict";
@@ -11625,7 +11793,7 @@ var __webpack_unused_export__;
11625
11793
 
11626
11794
  __webpack_unused_export__ = ({ value: true });
11627
11795
  exports.inspectValue = exports.getCwd = exports.getLogger = void 0;
11628
- const isNode_1 = __webpack_require__(6308);
11796
+ const isNode_1 = __webpack_require__(4319);
11629
11797
  /**
11630
11798
  * The logger a host attaches to `process`, or the console when there is none.
11631
11799
  *
@@ -11662,7 +11830,7 @@ exports.inspectValue = inspectValue;
11662
11830
 
11663
11831
  /***/ },
11664
11832
 
11665
- /***/ 9266
11833
+ /***/ 9731
11666
11834
  (__unused_webpack_module, exports, __webpack_require__) {
11667
11835
 
11668
11836
  "use strict";
@@ -11682,36 +11850,36 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11682
11850
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11683
11851
  };
11684
11852
  Object.defineProperty(exports, "__esModule", ({ value: true }));
11685
- __exportStar(__webpack_require__(3258), exports);
11686
- __exportStar(__webpack_require__(2558), exports);
11687
- __exportStar(__webpack_require__(9644), exports);
11688
- __exportStar(__webpack_require__(4786), exports);
11689
- __exportStar(__webpack_require__(6535), exports);
11690
- __exportStar(__webpack_require__(6889), exports);
11691
- __exportStar(__webpack_require__(5286), exports);
11692
- __exportStar(__webpack_require__(3193), exports);
11693
- __exportStar(__webpack_require__(5880), exports);
11694
- __exportStar(__webpack_require__(6308), exports);
11695
- __exportStar(__webpack_require__(8679), exports);
11696
- __exportStar(__webpack_require__(6580), exports);
11697
- __exportStar(__webpack_require__(5735), exports);
11698
- __exportStar(__webpack_require__(9689), exports);
11699
- __exportStar(__webpack_require__(3389), exports);
11700
- __exportStar(__webpack_require__(8325), exports);
11701
- __exportStar(__webpack_require__(3617), exports);
11702
- __exportStar(__webpack_require__(7288), exports);
11703
- __exportStar(__webpack_require__(6024), exports);
11704
- __exportStar(__webpack_require__(5259), exports);
11705
- __exportStar(__webpack_require__(8424), exports);
11706
- __exportStar(__webpack_require__(8720), exports);
11707
- __exportStar(__webpack_require__(8128), exports);
11708
- __exportStar(__webpack_require__(8292), exports);
11709
- __exportStar(__webpack_require__(343), exports);
11853
+ __exportStar(__webpack_require__(6907), exports);
11854
+ __exportStar(__webpack_require__(5813), exports);
11855
+ __exportStar(__webpack_require__(8969), exports);
11856
+ __exportStar(__webpack_require__(637), exports);
11857
+ __exportStar(__webpack_require__(1250), exports);
11858
+ __exportStar(__webpack_require__(7536), exports);
11859
+ __exportStar(__webpack_require__(5363), exports);
11860
+ __exportStar(__webpack_require__(4882), exports);
11861
+ __exportStar(__webpack_require__(2015), exports);
11862
+ __exportStar(__webpack_require__(4319), exports);
11863
+ __exportStar(__webpack_require__(2640), exports);
11864
+ __exportStar(__webpack_require__(2685), exports);
11865
+ __exportStar(__webpack_require__(6474), exports);
11866
+ __exportStar(__webpack_require__(2918), exports);
11867
+ __exportStar(__webpack_require__(8562), exports);
11868
+ __exportStar(__webpack_require__(8660), exports);
11869
+ __exportStar(__webpack_require__(6344), exports);
11870
+ __exportStar(__webpack_require__(4063), exports);
11871
+ __exportStar(__webpack_require__(1717), exports);
11872
+ __exportStar(__webpack_require__(133), exports);
11873
+ __exportStar(__webpack_require__(1909), exports);
11874
+ __exportStar(__webpack_require__(1001), exports);
11875
+ __exportStar(__webpack_require__(6269), exports);
11876
+ __exportStar(__webpack_require__(573), exports);
11877
+ __exportStar(__webpack_require__(3458), exports);
11710
11878
 
11711
11879
 
11712
11880
  /***/ },
11713
11881
 
11714
- /***/ 6308
11882
+ /***/ 4319
11715
11883
  (__unused_webpack_module, exports, __webpack_require__) {
11716
11884
 
11717
11885
  "use strict";
@@ -11727,7 +11895,7 @@ exports.isNode = isNode;
11727
11895
 
11728
11896
  /***/ },
11729
11897
 
11730
- /***/ 8679
11898
+ /***/ 2640
11731
11899
  (__unused_webpack_module, exports) {
11732
11900
 
11733
11901
  "use strict";
@@ -11740,7 +11908,7 @@ exports.isRelativePath = isRelativePath;
11740
11908
 
11741
11909
  /***/ },
11742
11910
 
11743
- /***/ 6580
11911
+ /***/ 2685
11744
11912
  (__unused_webpack_module, exports) {
11745
11913
 
11746
11914
  "use strict";
@@ -11757,7 +11925,7 @@ exports.isUri = isUri;
11757
11925
 
11758
11926
  /***/ },
11759
11927
 
11760
- /***/ 5735
11928
+ /***/ 6474
11761
11929
  (__unused_webpack_module, exports) {
11762
11930
 
11763
11931
  "use strict";
@@ -11785,7 +11953,7 @@ exports.isUrl = isUrl;
11785
11953
 
11786
11954
  /***/ },
11787
11955
 
11788
- /***/ 459
11956
+ /***/ 7328
11789
11957
  (__unused_webpack_module, exports) {
11790
11958
 
11791
11959
  "use strict";
@@ -11831,7 +11999,7 @@ exports.joinFolderPath = joinFolderPath;
11831
11999
 
11832
12000
  /***/ },
11833
12001
 
11834
- /***/ 2986
12002
+ /***/ 647
11835
12003
  (__unused_webpack_module, exports) {
11836
12004
 
11837
12005
  "use strict";
@@ -12019,7 +12187,7 @@ const cssContent = `
12019
12187
 
12020
12188
  /***/ },
12021
12189
 
12022
- /***/ 9689
12190
+ /***/ 2918
12023
12191
  (__unused_webpack_module, exports) {
12024
12192
 
12025
12193
  "use strict";
@@ -12041,7 +12209,7 @@ exports.needsRetry = needsRetry;
12041
12209
 
12042
12210
  /***/ },
12043
12211
 
12044
- /***/ 3389
12212
+ /***/ 8562
12045
12213
  (__unused_webpack_module, exports) {
12046
12214
 
12047
12215
  "use strict";
@@ -12059,7 +12227,7 @@ exports.parseGeneratedCode = parseGeneratedCode;
12059
12227
 
12060
12228
  /***/ },
12061
12229
 
12062
- /***/ 8325
12230
+ /***/ 8660
12063
12231
  (__unused_webpack_module, exports) {
12064
12232
 
12065
12233
  "use strict";
@@ -12084,7 +12252,7 @@ exports.parseSasViyaLog = parseSasViyaLog;
12084
12252
 
12085
12253
  /***/ },
12086
12254
 
12087
- /***/ 3617
12255
+ /***/ 6344
12088
12256
  (__unused_webpack_module, exports) {
12089
12257
 
12090
12258
  "use strict";
@@ -12101,7 +12269,7 @@ exports.parseSourceCode = parseSourceCode;
12101
12269
 
12102
12270
  /***/ },
12103
12271
 
12104
- /***/ 7288
12272
+ /***/ 4063
12105
12273
  (__unused_webpack_module, exports, __webpack_require__) {
12106
12274
 
12107
12275
  "use strict";
@@ -12117,8 +12285,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
12117
12285
  };
12118
12286
  Object.defineProperty(exports, "__esModule", ({ value: true }));
12119
12287
  exports.parseSasViyaDebugResponse = void 0;
12120
- const utils_1 = __webpack_require__(9266);
12121
- const extractWeboutBlob_1 = __webpack_require__(5286);
12288
+ const utils_1 = __webpack_require__(9731);
12289
+ const extractWeboutBlob_1 = __webpack_require__(5363);
12122
12290
  /**
12123
12291
  * When querying a Viya job using the Web approach (as opposed to using the APIs) with _DEBUG enabled,
12124
12292
  * the first response contains the log with the content in an iframe. Therefore when debug is enabled,
@@ -12129,7 +12297,7 @@ const extractWeboutBlob_1 = __webpack_require__(5286);
12129
12297
  * @param serverUrl
12130
12298
  * @returns
12131
12299
  */
12132
- const parseSasViyaDebugResponse = (response, requestClient, serverUrl) => __awaiter(void 0, void 0, void 0, function* () {
12300
+ const parseSasViyaDebugResponse = (response, requestClient, serverUrl, accessToken) => __awaiter(void 0, void 0, void 0, function* () {
12133
12301
  // On viya 3.5, iframe is like <iframe style="width: 99%; height: 500px" src="..."></iframe>
12134
12302
  // On viya 4, iframe is like <iframe style="width: 99%; height: 500px; background-color:Canvas;" src=...></iframe>
12135
12303
  const iframeStart = response.split(/<iframe style="width: 99%; height: 500px" src="|<iframe style="width: 99%; height: 500px; background-color:Canvas;" src=/)[1];
@@ -12138,7 +12306,7 @@ const parseSasViyaDebugResponse = (response, requestClient, serverUrl) => __awai
12138
12306
  : null;
12139
12307
  if (jsonUrl) {
12140
12308
  return requestClient
12141
- .get(serverUrl + jsonUrl, undefined, 'text/plain')
12309
+ .get(serverUrl + jsonUrl, accessToken, 'text/plain')
12142
12310
  .then((res) => (0, utils_1.getValidJson)(res.result));
12143
12311
  }
12144
12312
  // Fallback: some Viya configurations inline the webout via a
@@ -12155,7 +12323,7 @@ exports.parseSasViyaDebugResponse = parseSasViyaDebugResponse;
12155
12323
 
12156
12324
  /***/ },
12157
12325
 
12158
- /***/ 6024
12326
+ /***/ 1717
12159
12327
  (__unused_webpack_module, exports, __webpack_require__) {
12160
12328
 
12161
12329
  "use strict";
@@ -12171,7 +12339,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
12171
12339
  };
12172
12340
  Object.defineProperty(exports, "__esModule", ({ value: true }));
12173
12341
  exports.parseSasViyaLogDebugResponse = void 0;
12174
- const extractWeboutBlob_1 = __webpack_require__(5286);
12342
+ const extractWeboutBlob_1 = __webpack_require__(5363);
12175
12343
  /**
12176
12344
  * When querying a Viya job using the Web approach with _DEBUG=128 (used when
12177
12345
  * runAsTask is true), the webout JSON is inlined into the response via a
@@ -12195,14 +12363,14 @@ exports.parseSasViyaLogDebugResponse = parseSasViyaLogDebugResponse;
12195
12363
 
12196
12364
  /***/ },
12197
12365
 
12198
- /***/ 5259
12366
+ /***/ 133
12199
12367
  (__unused_webpack_module, exports, __webpack_require__) {
12200
12368
 
12201
12369
  "use strict";
12202
12370
 
12203
12371
  Object.defineProperty(exports, "__esModule", ({ value: true }));
12204
12372
  exports.parseWeboutResponse = void 0;
12205
- const errors_1 = __webpack_require__(7388);
12373
+ const errors_1 = __webpack_require__(6851);
12206
12374
  const parseWeboutResponse = (response, url) => {
12207
12375
  let sasResponse = '';
12208
12376
  if (response.includes('>>weboutBEGIN<<')) {
@@ -12225,7 +12393,7 @@ exports.parseWeboutResponse = parseWeboutResponse;
12225
12393
 
12226
12394
  /***/ },
12227
12395
 
12228
- /***/ 8548
12396
+ /***/ 2991
12229
12397
  (__unused_webpack_module, exports) {
12230
12398
 
12231
12399
  "use strict";
@@ -12264,7 +12432,7 @@ exports.extractUserLongNameSas9 = extractUserLongNameSas9;
12264
12432
 
12265
12433
  /***/ },
12266
12434
 
12267
- /***/ 8424
12435
+ /***/ 1909
12268
12436
  (__unused_webpack_module, exports) {
12269
12437
 
12270
12438
  "use strict";
@@ -12292,7 +12460,7 @@ exports.serialize = serialize;
12292
12460
 
12293
12461
  /***/ },
12294
12462
 
12295
- /***/ 8720
12463
+ /***/ 1001
12296
12464
  (__unused_webpack_module, exports) {
12297
12465
 
12298
12466
  "use strict";
@@ -12313,7 +12481,7 @@ exports.splitChunks = splitChunks;
12313
12481
 
12314
12482
  /***/ },
12315
12483
 
12316
- /***/ 8297
12484
+ /***/ 6228
12317
12485
  (__unused_webpack_module, exports) {
12318
12486
 
12319
12487
  "use strict";
@@ -12395,7 +12563,7 @@ function validateForcedServicePack(appLoc, pack) {
12395
12563
 
12396
12564
  /***/ },
12397
12565
 
12398
- /***/ 8128
12566
+ /***/ 6269
12399
12567
  (__unused_webpack_module, exports) {
12400
12568
 
12401
12569
  "use strict";
@@ -20760,7 +20928,7 @@ function fromJSON2(str) {
20760
20928
  /******/ // startup
20761
20929
  /******/ // Load entry module and return exports
20762
20930
  /******/ // This entry module is referenced by other modules so it can't be inlined
20763
- /******/ let __webpack_exports__ = __webpack_require__(8156);
20931
+ /******/ let __webpack_exports__ = __webpack_require__(1229);
20764
20932
  /******/
20765
20933
  /******/ return __webpack_exports__;
20766
20934
  /******/ })()