jscrambler 6.2.1 → 6.2.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/dist/bin/jscrambler.js +2 -2
- package/dist/client.js +5 -9
- package/dist/constants.js +1 -1
- package/dist/generate-signed-params.js +1 -1
- package/dist/get-protection-default-fragments.js +1 -1
- package/dist/index.js +17 -23
- package/dist/introspection.js +2 -2
- package/dist/mutations.js +9 -9
- package/dist/queries.js +4 -4
- package/dist/zip.js +3 -3
- package/package.json +1 -1
package/dist/bin/jscrambler.js
CHANGED
|
@@ -19,9 +19,9 @@ var _utils = require("../utils");
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
23
23
|
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source =
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
25
25
|
|
|
26
26
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
27
|
|
package/dist/client.js
CHANGED
|
@@ -30,21 +30,17 @@ var _package = require("../package.json");
|
|
|
30
30
|
|
|
31
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
32
|
|
|
33
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly
|
|
33
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
34
34
|
|
|
35
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source =
|
|
35
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
36
36
|
|
|
37
37
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
38
38
|
|
|
39
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
40
|
-
|
|
41
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
42
|
-
|
|
43
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
39
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
44
40
|
|
|
45
41
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
46
42
|
|
|
47
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
43
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
48
44
|
|
|
49
45
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
50
46
|
|
|
@@ -83,7 +79,7 @@ var ClientError = /*#__PURE__*/function (_Error) {
|
|
|
83
79
|
return _this;
|
|
84
80
|
}
|
|
85
81
|
|
|
86
|
-
return
|
|
82
|
+
return ClientError;
|
|
87
83
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
88
84
|
/**
|
|
89
85
|
* @class JScramblerClient
|
package/dist/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.CLIENT_PACKAGES = exports.CLIENT_IDS = exports.JSCRAMBLER_ERROR_CODES = exports.HTTP_STATUS_CODES = void 0;
|
|
7
7
|
|
|
8
8
|
var _Object$freeze;
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ var _lodash3 = _interopRequireDefault(require("lodash.keys"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
18
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
19
19
|
|
|
20
20
|
var debug = !!process.env.DEBUG;
|
|
21
21
|
|
|
@@ -11,7 +11,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
|
|
14
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
14
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
15
15
|
|
|
16
16
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
17
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -57,9 +57,9 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
57
57
|
|
|
58
58
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
59
59
|
|
|
60
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly
|
|
60
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
61
61
|
|
|
62
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source =
|
|
62
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
63
63
|
|
|
64
64
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
65
65
|
|
|
@@ -767,7 +767,7 @@ var _default = {
|
|
|
767
767
|
var _this3 = this;
|
|
768
768
|
|
|
769
769
|
return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
770
|
-
var finalConfig, applicationId, host, port, basePath, protocol, cafile, keys, sources, _finalConfig$stream2, stream, cwd, jscramblerVersion, proxy, utc, skipSources, clientId, accessKey, secretKey, client, filesSrc, filesDest,
|
|
770
|
+
var finalConfig, applicationId, host, port, basePath, protocol, cafile, keys, sources, _finalConfig$stream2, stream, cwd, jscramblerVersion, proxy, utc, skipSources, clientId, accessKey, secretKey, client, filesSrc, filesDest, instrumentation, onExitCancelInstrumentation, download;
|
|
771
771
|
|
|
772
772
|
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
773
773
|
while (1) {
|
|
@@ -816,7 +816,7 @@ var _default = {
|
|
|
816
816
|
|
|
817
817
|
case 11:
|
|
818
818
|
if (skipSources) {
|
|
819
|
-
_context5.next =
|
|
819
|
+
_context5.next = 16;
|
|
820
820
|
break;
|
|
821
821
|
}
|
|
822
822
|
|
|
@@ -828,23 +828,17 @@ var _default = {
|
|
|
828
828
|
});
|
|
829
829
|
|
|
830
830
|
case 14:
|
|
831
|
-
|
|
832
|
-
updateApplicationSourcePromise = _yield$_this3$updateA.promise;
|
|
833
|
-
_context5.next = 18;
|
|
834
|
-
return updateApplicationSourcePromise;
|
|
835
|
-
|
|
836
|
-
case 18:
|
|
837
|
-
_context5.next = 21;
|
|
831
|
+
_context5.next = 17;
|
|
838
832
|
break;
|
|
839
833
|
|
|
840
|
-
case
|
|
834
|
+
case 16:
|
|
841
835
|
console.log('Update source files SKIPPED');
|
|
842
836
|
|
|
843
|
-
case
|
|
844
|
-
_context5.next =
|
|
837
|
+
case 17:
|
|
838
|
+
_context5.next = 19;
|
|
845
839
|
return _this3.startInstrumentation(client, applicationId);
|
|
846
840
|
|
|
847
|
-
case
|
|
841
|
+
case 19:
|
|
848
842
|
instrumentation = _context5.sent;
|
|
849
843
|
errorHandler(instrumentation);
|
|
850
844
|
|
|
@@ -859,10 +853,10 @@ var _default = {
|
|
|
859
853
|
};
|
|
860
854
|
|
|
861
855
|
process.once('SIGINT', onExitCancelInstrumentation).once('SIGTERM', onExitCancelInstrumentation);
|
|
862
|
-
_context5.next =
|
|
856
|
+
_context5.next = 25;
|
|
863
857
|
return _this3.pollInstrumentation(client, instrumentation.data.id);
|
|
864
858
|
|
|
865
|
-
case
|
|
859
|
+
case 25:
|
|
866
860
|
instrumentation = _context5.sent;
|
|
867
861
|
process.removeListener('SIGINT', onExitCancelInstrumentation).removeListener('SIGTERM', onExitCancelInstrumentation);
|
|
868
862
|
|
|
@@ -870,10 +864,10 @@ var _default = {
|
|
|
870
864
|
console.log("Finished instrumention with id ".concat(instrumentation.data.id, ". Downloading..."));
|
|
871
865
|
}
|
|
872
866
|
|
|
873
|
-
_context5.next =
|
|
867
|
+
_context5.next = 30;
|
|
874
868
|
return _this3.downloadApplicationInstrumented(client, instrumentation.data.id);
|
|
875
869
|
|
|
876
|
-
case
|
|
870
|
+
case 30:
|
|
877
871
|
download = _context5.sent;
|
|
878
872
|
errorHandler(download);
|
|
879
873
|
|
|
@@ -881,10 +875,10 @@ var _default = {
|
|
|
881
875
|
console.log('Unzipping files');
|
|
882
876
|
}
|
|
883
877
|
|
|
884
|
-
_context5.next =
|
|
878
|
+
_context5.next = 35;
|
|
885
879
|
return (0, _zip.unzip)(download, filesDest || destCallback, stream);
|
|
886
880
|
|
|
887
|
-
case
|
|
881
|
+
case 35:
|
|
888
882
|
if (debug) {
|
|
889
883
|
console.log('Finished unzipping files');
|
|
890
884
|
}
|
|
@@ -893,7 +887,7 @@ var _default = {
|
|
|
893
887
|
console.log("Application ".concat(applicationId, " was instrumented. Bootstrap your instrumented application and run *--start-profiling* command."));
|
|
894
888
|
return _context5.abrupt("return", instrumentation.data.id);
|
|
895
889
|
|
|
896
|
-
case
|
|
890
|
+
case 39:
|
|
897
891
|
case "end":
|
|
898
892
|
return _context5.stop();
|
|
899
893
|
}
|
package/dist/introspection.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.type = type;
|
|
7
7
|
exports.mutation = mutation;
|
|
8
8
|
exports.query = query;
|
|
9
|
-
exports.
|
|
9
|
+
exports.intoObjectType = intoObjectType;
|
|
10
10
|
|
|
11
11
|
var _lodash = _interopRequireDefault(require("lodash.clonedeep"));
|
|
12
12
|
|
package/dist/mutations.js
CHANGED
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.addApplicationSource = addApplicationSource;
|
|
7
|
-
exports.applyTemplate = applyTemplate;
|
|
8
|
-
exports.cancelProtection = cancelProtection;
|
|
9
6
|
exports.createApplication = createApplication;
|
|
10
|
-
exports.createApplicationProtection = createApplicationProtection;
|
|
11
|
-
exports.createApplicationProtections = createApplicationProtections;
|
|
12
|
-
exports.createTemplate = createTemplate;
|
|
13
7
|
exports.duplicateApplication = duplicateApplication;
|
|
14
8
|
exports.removeApplication = removeApplication;
|
|
15
9
|
exports.removeProtection = removeProtection;
|
|
16
|
-
exports.
|
|
17
|
-
exports.removeTemplate = removeTemplate;
|
|
18
|
-
exports.unlockApplication = unlockApplication;
|
|
10
|
+
exports.cancelProtection = cancelProtection;
|
|
19
11
|
exports.updateApplication = updateApplication;
|
|
12
|
+
exports.unlockApplication = unlockApplication;
|
|
13
|
+
exports.addApplicationSource = addApplicationSource;
|
|
20
14
|
exports.updateApplicationSource = updateApplicationSource;
|
|
15
|
+
exports.removeSourceFromApplication = removeSourceFromApplication;
|
|
16
|
+
exports.createTemplate = createTemplate;
|
|
17
|
+
exports.removeTemplate = removeTemplate;
|
|
21
18
|
exports.updateTemplate = updateTemplate;
|
|
19
|
+
exports.createApplicationProtection = createApplicationProtection;
|
|
20
|
+
exports.createApplicationProtections = createApplicationProtections;
|
|
21
|
+
exports.applyTemplate = applyTemplate;
|
|
22
22
|
|
|
23
23
|
var _cleanupInputFields3 = _interopRequireDefault(require("./cleanup-input-fields"));
|
|
24
24
|
|
package/dist/queries.js
CHANGED
|
@@ -4,16 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getApplication = getApplication;
|
|
7
|
+
exports.getApplicationSource = getApplicationSource;
|
|
7
8
|
exports.getApplicationProtections = getApplicationProtections;
|
|
8
9
|
exports.getApplicationProtectionsCount = getApplicationProtectionsCount;
|
|
9
|
-
exports.
|
|
10
|
+
exports.getTemplates = getTemplates;
|
|
10
11
|
exports.getApplications = getApplications;
|
|
11
12
|
exports.getProtection = getProtection;
|
|
12
|
-
exports.getTemplates = getTemplates;
|
|
13
13
|
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly
|
|
14
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
15
15
|
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source =
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
17
17
|
|
|
18
18
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
|
package/dist/zip.js
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.zip = zip;
|
|
7
|
+
exports.zipSources = zipSources;
|
|
8
|
+
exports.unzip = unzip;
|
|
6
9
|
Object.defineProperty(exports, "outputFileSync", {
|
|
7
10
|
enumerable: true,
|
|
8
11
|
get: function get() {
|
|
9
12
|
return _fsExtra.outputFileSync;
|
|
10
13
|
}
|
|
11
14
|
});
|
|
12
|
-
exports.unzip = unzip;
|
|
13
|
-
exports.zip = zip;
|
|
14
|
-
exports.zipSources = zipSources;
|
|
15
15
|
|
|
16
16
|
var _lodash = _interopRequireDefault(require("lodash.size"));
|
|
17
17
|
|