jscrambler 8.1.0 → 8.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # jscrambler
2
2
 
3
+ ## 8.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [be8825b]: Make fs promises compatible with older node versions
8
+
9
+ ## 8.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [5bb3289]: Added proxy protocol option
14
+
3
15
  ## 8.1.0
4
16
 
5
17
  ### Minor 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: {
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/dist/index.js CHANGED
@@ -10,7 +10,7 @@ require("core-js/modules/es.promise.finally.js");
10
10
  var _path = _interopRequireDefault(require("path"));
11
11
  var _axios = _interopRequireDefault(require("axios"));
12
12
  var _lodash = _interopRequireDefault(require("lodash.defaults"));
13
- var _promises = _interopRequireDefault(require("fs/promises"));
13
+ var _fs = _interopRequireDefault(require("fs"));
14
14
  var _config2 = _interopRequireDefault(require("./config"));
15
15
  var _generateSignedParams = _interopRequireDefault(require("./generate-signed-params"));
16
16
  var _client = _interopRequireDefault(require("./client"));
@@ -389,7 +389,7 @@ var _default = exports.default = {
389
389
  forceAppEnvironment
390
390
  });
391
391
  if (finalConfig.inputSymbolTable) {
392
- const inputSymbolTableContents = await _promises.default.readFile(finalConfig.inputSymbolTable, 'utf-8');
392
+ const inputSymbolTableContents = await _fs.default.promises.readFile(finalConfig.inputSymbolTable, 'utf-8');
393
393
  protectionOptions.inputSymbolTable = inputSymbolTableContents;
394
394
  }
395
395
  const createApplicationProtectionRes = await this.createApplicationProtections(client, applicationId, protectionOptions);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jscrambler",
3
3
  "description": "Jscrambler API client.",
4
- "version": "8.1.0",
4
+ "version": "8.1.2",
5
5
  "homepage": "https://github.com/jscrambler/jscrambler",
6
6
  "author": "Jscrambler <support@jscrambler.com>",
7
7
  "repository": {