jscrambler 8.0.1 → 8.1.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # jscrambler
2
2
 
3
+ ## 8.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [5bb3289]: Added proxy protocol option
8
+
9
+ ## 8.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [4752980]: Add the ability to instrument the app from the config file - instrument: true
14
+
3
15
  ## 8.0.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -284,6 +284,7 @@ If your requests need to go through a proxy, there is an option where you can sp
284
284
  ```
285
285
  {
286
286
  proxy: {
287
+ protocol: '', // 'http' by default
287
288
  host: '',
288
289
  port: 1234,
289
290
  auth: {
@@ -139,6 +139,7 @@ config.inputSymbolTable = _commander.default.inputSymbolTable || config.inputSym
139
139
  config.removeProfilingData = _commander.default.removeProfilingData;
140
140
  config.skipSources = _commander.default.skipSources;
141
141
  config.debugMode = _commander.default.debugMode || config.debugMode;
142
+ config.instrument = _commander.default.instrument || config.instrument;
142
143
 
143
144
  // handle codeHardening = 0
144
145
  if (typeof _commander.default.codeHardeningThreshold === 'undefined') {
@@ -322,7 +323,7 @@ if (_commander.default.sourceMaps) {
322
323
  process.exit(1);
323
324
  }
324
325
  })();
325
- } else if (_commander.default.instrument) {
326
+ } else if (config.instrument) {
326
327
  _.default.instrumentAndDownload(_objectSpread(_objectSpread({}, clientSettings), {}, {
327
328
  applicationId,
328
329
  filesSrc,
package/dist/client.js CHANGED
@@ -194,22 +194,12 @@ JScramblerClient.prototype.request = function (method, path) {
194
194
  }
195
195
  formattedAuth = "".concat(username, ":").concat(password);
196
196
  }
197
-
198
- /**
199
- * Monkey-patch to inject a custom Cert CA into TLS.connect
200
- * options.
201
- */
202
- if (agentOptions.ca) {
203
- const oriCallback = _httpsProxyAgent.default.prototype.callback;
204
- _httpsProxyAgent.default.prototype.callback = function (req, opts) {
205
- return oriCallback.call(this, req, _objectSpread(_objectSpread({}, opts), agentOptions));
206
- };
207
- }
208
197
  settings.proxy = false;
209
198
  const proxyConfig = _objectSpread({
210
199
  host,
211
200
  port,
212
- auth: formattedAuth
201
+ auth: formattedAuth,
202
+ protocol: proxy.protocol || "http"
213
203
  }, agentOptions);
214
204
  settings.httpsAgent = new _httpsProxyAgent.default(proxyConfig);
215
205
  settings.httpAgent = new _httpProxyAgent.default(proxyConfig);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jscrambler",
3
3
  "description": "Jscrambler API client.",
4
- "version": "8.0.1",
4
+ "version": "8.1.1",
5
5
  "homepage": "https://github.com/jscrambler/jscrambler",
6
6
  "author": "Jscrambler <support@jscrambler.com>",
7
7
  "repository": {