@itentialopensource/adapter-utils 5.11.0 → 6.0.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.
@@ -86,7 +86,7 @@ let sso = null;
86
86
  const tokenList = [];
87
87
  const tokenlock = 0;
88
88
  let stub = false;
89
- let protocol = 'http';
89
+ let protocol = 'https';
90
90
  let healthcheckpath = null;
91
91
  let throttleEnabled = false;
92
92
  let numberPhs = 1;
@@ -103,7 +103,7 @@ let secureProtocol = null;
103
103
  let proxyEnabled = false;
104
104
  let proxyHost = null;
105
105
  let proxyPort = null;
106
- let proxyProtocol = 'http';
106
+ let proxyProtocol = 'https';
107
107
  let proxyUser = null;
108
108
  let proxyPassword = null;
109
109
  let numRetries = 3;
@@ -578,28 +578,28 @@ function makeRequest(request, entitySchema, callProperties, startTrip, attempt,
578
578
  } else if (stub) {
579
579
  return callback(returnStub(request, entitySchema, callProperties));
580
580
  }
581
- let useProt = http;
582
- let protStr = 'http';
581
+ let useProt = https;
582
+ let protStr = 'https';
583
583
 
584
584
  try {
585
585
  // determine proper protocol for primary request
586
586
  if (callProperties && callProperties.protocol) {
587
- if (callProperties.protocol === 'https') {
588
- log.debug(`${origin}: Switching to https protocol`);
589
- useProt = https;
590
- protStr = 'https';
587
+ if (callProperties.protocol === 'http') {
588
+ log.debug(`${origin}: Switching to http protocol`);
589
+ useProt = http;
590
+ protStr = 'http';
591
591
  }
592
592
  } else if (entitySchema && entitySchema.sso && entitySchema.sso.protocol) {
593
593
  // this is for single signon - should we limit to token???
594
- if (entitySchema.sso.protocol === 'https') {
595
- log.debug(`${origin}: Switching to https protocol`);
596
- useProt = https;
597
- protStr = 'https';
598
- }
599
- } else if (protocol === 'https') {
600
- log.debug(`${origin}: Switching to https protocol`);
601
- useProt = https;
602
- protStr = 'https';
594
+ if (entitySchema.sso.protocol === 'http') {
595
+ log.debug(`${origin}: Switching to http protocol`);
596
+ useProt = http;
597
+ protStr = 'http';
598
+ }
599
+ } else if (protocol === 'http') {
600
+ log.debug(`${origin}: Switching to http protocol`);
601
+ useProt = http;
602
+ protStr = 'http';
603
603
  }
604
604
 
605
605
  // add the proxy information to the request
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-utils",
3
- "version": "5.11.0",
3
+ "version": "6.0.1",
4
4
  "description": "Itential Adapter Utility Libraries",
5
5
  "scripts": {
6
6
  "postinstall": "node utils/setup.js",
@@ -40,7 +40,7 @@
40
40
  "readline-sync": "^1.4.10",
41
41
  "socks-proxy-agent": "^8.0.1",
42
42
  "uuid": "^9.0.0",
43
- "validator": "^13.15.20",
43
+ "validator": "^13.15.23",
44
44
  "xml2js": "^0.6.0"
45
45
  },
46
46
  "devDependencies": {
@@ -90,7 +90,7 @@
90
90
  "protocol": {
91
91
  "type": "string",
92
92
  "description": "the protocol to use to connect to server",
93
- "default": "http",
93
+ "default": "https",
94
94
  "enum": [
95
95
  "http",
96
96
  "https"
@@ -825,7 +825,7 @@
825
825
  "protocol": {
826
826
  "type": "string",
827
827
  "description": "the protocol to use to connect to the proxy",
828
- "default": "http",
828
+ "default": "https",
829
829
  "enum": [
830
830
  "http",
831
831
  "https",