|
@@ -112,37 +112,31 @@ module.exports = require("tslib");
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
-var _symbol = __webpack_require__(137);
|
|
|
-
|
|
|
-var _symbol2 = _interopRequireDefault(_symbol);
|
|
|
-
|
|
|
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
-
|
|
|
exports.ServiceIdentifiers = {
|
|
|
- Factory__ICalleeDataExtractor: (0, _symbol2.default)('Factory<ICalleeDataExtractor>'),
|
|
|
- Factory__IControlFlowReplacer: (0, _symbol2.default)('Factory<IControlFlowReplacer>'),
|
|
|
- Factory__ICustomNode: (0, _symbol2.default)('Factory<ICustomNode>'),
|
|
|
- Factory__ICustomNodeGroup: (0, _symbol2.default)('Factory<ICustomNodeGroup>'),
|
|
|
- Factory__INodeTransformer: (0, _symbol2.default)('Factory<INodeTransformer[]>'),
|
|
|
- Factory__IObfuscationResult: (0, _symbol2.default)('Factory<IObfuscationResult>'),
|
|
|
- Factory__IObfuscatorReplacer: (0, _symbol2.default)('Factory<IObfuscationReplacer>'),
|
|
|
- Factory__TControlFlowStorage: (0, _symbol2.default)('Factory<TControlFlowStorage>'),
|
|
|
- ICalleeDataExtractor: (0, _symbol2.default)('ICalleeDataExtractor'),
|
|
|
- ICustomNodeGroup: (0, _symbol2.default)('ICustomNodeGroup'),
|
|
|
- IControlFlowReplacer: (0, _symbol2.default)('IControlFlowReplacer'),
|
|
|
- IJavaScriptObfuscator: (0, _symbol2.default)('IJavaScriptObfuscator'),
|
|
|
- INodeTransformer: (0, _symbol2.default)('INodeTransformer'),
|
|
|
- IObfuscationEventEmitter: (0, _symbol2.default)('IObfuscationEventEmitter'),
|
|
|
- IObfuscationResult: (0, _symbol2.default)('IObfuscationResult'),
|
|
|
- IObfuscator: (0, _symbol2.default)('IObfuscator'),
|
|
|
- IOptions: (0, _symbol2.default)('IOptions'),
|
|
|
- IObfuscatorReplacer: (0, _symbol2.default)('IObfuscationReplacer'),
|
|
|
- ISourceMapCorrector: (0, _symbol2.default)('ISourceMapCorrector'),
|
|
|
- IStackTraceAnalyzer: (0, _symbol2.default)('IStackTraceAnalyzer'),
|
|
|
- Newable__ICustomNode: (0, _symbol2.default)('Newable<ICustomNode>'),
|
|
|
- Newable__TControlFlowStorage: (0, _symbol2.default)('Newable<TControlFlowStorage>'),
|
|
|
- TCustomNodeGroupStorage: (0, _symbol2.default)('TCustomNodeGroupStorage'),
|
|
|
- TStringArrayStorage: (0, _symbol2.default)('TStringArrayStorage')
|
|
|
+ Factory__ICalleeDataExtractor: Symbol('Factory<ICalleeDataExtractor>'),
|
|
|
+ Factory__IControlFlowReplacer: Symbol('Factory<IControlFlowReplacer>'),
|
|
|
+ Factory__ICustomNode: Symbol('Factory<ICustomNode>'),
|
|
|
+ Factory__ICustomNodeGroup: Symbol('Factory<ICustomNodeGroup>'),
|
|
|
+ Factory__INodeTransformer: Symbol('Factory<INodeTransformer[]>'),
|
|
|
+ Factory__IObfuscationResult: Symbol('Factory<IObfuscationResult>'),
|
|
|
+ Factory__IObfuscationReplacer: Symbol('Factory<IObfuscationReplacer>'),
|
|
|
+ Factory__TControlFlowStorage: Symbol('Factory<TControlFlowStorage>'),
|
|
|
+ ICalleeDataExtractor: Symbol('ICalleeDataExtractor'),
|
|
|
+ ICustomNodeGroup: Symbol('ICustomNodeGroup'),
|
|
|
+ IControlFlowReplacer: Symbol('IControlFlowReplacer'),
|
|
|
+ IJavaScriptObfuscator: Symbol('IJavaScriptObfuscator'),
|
|
|
+ INodeTransformer: Symbol('INodeTransformer'),
|
|
|
+ IObfuscationEventEmitter: Symbol('IObfuscationEventEmitter'),
|
|
|
+ IObfuscationResult: Symbol('IObfuscationResult'),
|
|
|
+ IObfuscator: Symbol('IObfuscator'),
|
|
|
+ IOptions: Symbol('IOptions'),
|
|
|
+ IObfuscationReplacer: Symbol('IObfuscationReplacer'),
|
|
|
+ ISourceMapCorrector: Symbol('ISourceMapCorrector'),
|
|
|
+ IStackTraceAnalyzer: Symbol('IStackTraceAnalyzer'),
|
|
|
+ Newable__ICustomNode: Symbol('Newable<ICustomNode>'),
|
|
|
+ Newable__TControlFlowStorage: Symbol('Newable<TControlFlowStorage>'),
|
|
|
+ TCustomNodeGroupStorage: Symbol('TCustomNodeGroupStorage'),
|
|
|
+ TStringArrayStorage: Symbol('TStringArrayStorage')
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
@@ -436,8 +430,9 @@ var RandomGeneratorUtils = function () {
|
|
|
}();
|
|
|
|
|
|
RandomGeneratorUtils.randomGeneratorPool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
|
-RandomGeneratorUtils.randomGeneratorPoolHexadecimal = 'abcdef0123456789';
|
|
|
-RandomGeneratorUtils.randomGeneratorPoolWithNumbers = RandomGeneratorUtils.randomGeneratorPool + "0123456789";
|
|
|
+RandomGeneratorUtils.randomGeneratorPoolNumbers = '0123456789';
|
|
|
+RandomGeneratorUtils.randomGeneratorPoolHexadecimal = "abcdef" + RandomGeneratorUtils.randomGeneratorPoolNumbers;
|
|
|
+RandomGeneratorUtils.randomGeneratorPoolWithNumbers = "" + RandomGeneratorUtils.randomGeneratorPool + RandomGeneratorUtils.randomGeneratorPoolNumbers;
|
|
|
RandomGeneratorUtils.randomVariableNameSet = new Set();
|
|
|
exports.RandomGeneratorUtils = RandomGeneratorUtils;
|
|
|
|
|
@@ -1326,21 +1321,7 @@ exports.ObfuscationEvents = {
|
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
-/* 22 */
|
|
|
-/***/ (function(module, exports, __webpack_require__) {
|
|
|
-
|
|
|
-"use strict";
|
|
|
-
|
|
|
-
|
|
|
-var NodeObfuscatorsReplacers;
|
|
|
-(function (NodeObfuscatorsReplacers) {
|
|
|
- NodeObfuscatorsReplacers[NodeObfuscatorsReplacers["BooleanReplacer"] = 0] = "BooleanReplacer";
|
|
|
- NodeObfuscatorsReplacers[NodeObfuscatorsReplacers["IdentifierReplacer"] = 1] = "IdentifierReplacer";
|
|
|
- NodeObfuscatorsReplacers[NodeObfuscatorsReplacers["NumberLiteralReplacer"] = 2] = "NumberLiteralReplacer";
|
|
|
- NodeObfuscatorsReplacers[NodeObfuscatorsReplacers["StringLiteralReplacer"] = 3] = "StringLiteralReplacer";
|
|
|
-})(NodeObfuscatorsReplacers = exports.NodeObfuscatorsReplacers || (exports.NodeObfuscatorsReplacers = {}));
|
|
|
-
|
|
|
-/***/ }),
|
|
|
+/* 22 */,
|
|
|
/* 23 */
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
@@ -1870,20 +1851,7 @@ var CustomNodeGroups;
|
|
|
})(CustomNodeGroups = exports.CustomNodeGroups || (exports.CustomNodeGroups = {}));
|
|
|
|
|
|
/***/ }),
|
|
|
-/* 39 */
|
|
|
-/***/ (function(module, exports, __webpack_require__) {
|
|
|
-
|
|
|
-"use strict";
|
|
|
-
|
|
|
-
|
|
|
-var NodeControlFlowReplacers;
|
|
|
-(function (NodeControlFlowReplacers) {
|
|
|
- NodeControlFlowReplacers[NodeControlFlowReplacers["BinaryExpressionControlFlowReplacer"] = 0] = "BinaryExpressionControlFlowReplacer";
|
|
|
- NodeControlFlowReplacers[NodeControlFlowReplacers["CallExpressionControlFlowReplacer"] = 1] = "CallExpressionControlFlowReplacer";
|
|
|
- NodeControlFlowReplacers[NodeControlFlowReplacers["LogicalExpressionControlFlowReplacer"] = 2] = "LogicalExpressionControlFlowReplacer";
|
|
|
-})(NodeControlFlowReplacers = exports.NodeControlFlowReplacers || (exports.NodeControlFlowReplacers = {}));
|
|
|
-
|
|
|
-/***/ }),
|
|
|
+/* 39 */,
|
|
|
/* 40 */
|
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
@@ -2381,13 +2349,13 @@ var VisitorDirection_1 = __webpack_require__(85);
|
|
|
var Node_1 = __webpack_require__(11);
|
|
|
var NodeUtils_1 = __webpack_require__(8);
|
|
|
var Obfuscator = Obfuscator_1 = function () {
|
|
|
- function Obfuscator(stackTraceAnalyzer, obfuscationEventEmitter, customNodeGroupStorage, nodeTransformersFactory, options) {
|
|
|
+ function Obfuscator(stackTraceAnalyzer, obfuscationEventEmitter, customNodeGroupStorage, nodeTransformerFactory, options) {
|
|
|
_classCallCheck(this, Obfuscator);
|
|
|
|
|
|
this.stackTraceAnalyzer = stackTraceAnalyzer;
|
|
|
this.obfuscationEventEmitter = obfuscationEventEmitter;
|
|
|
this.customNodeGroupStorage = customNodeGroupStorage;
|
|
|
- this.nodeTransformersFactory = nodeTransformersFactory;
|
|
|
+ this.nodeTransformerFactory = nodeTransformerFactory;
|
|
|
this.options = options;
|
|
|
}
|
|
|
|
|
@@ -2421,7 +2389,7 @@ var Obfuscator = Obfuscator_1 = function () {
|
|
|
var nodeTransformersLength = nodeTransformers.length;
|
|
|
var visitor = void 0;
|
|
|
for (var i = 0; i < nodeTransformersLength; i++) {
|
|
|
- visitor = this.nodeTransformersFactory(nodeTransformers[i]).getVisitor();
|
|
|
+ visitor = this.nodeTransformerFactory(nodeTransformers[i]).getVisitor();
|
|
|
if (visitor.enter) {
|
|
|
enterVisitors.push(visitor);
|
|
|
}
|
|
@@ -2950,24 +2918,18 @@ exports.customNodesModule = new inversify_1.ContainerModule(function (bind) {
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
-var _map = __webpack_require__(14);
|
|
|
-
|
|
|
-var _map2 = _interopRequireDefault(_map);
|
|
|
-
|
|
|
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
-
|
|
|
var inversify_1 = __webpack_require__(0);
|
|
|
var ServiceIdentifiers_1 = __webpack_require__(2);
|
|
|
-var NodeControlFlowReplacers_1 = __webpack_require__(39);
|
|
|
+var ControlFlowReplacers_1 = __webpack_require__(148);
|
|
|
var BinaryExpressionControlFlowReplacer_1 = __webpack_require__(89);
|
|
|
var CallExpressionControlFlowReplacer_1 = __webpack_require__(90);
|
|
|
var LogicalExpressionControlFlowReplacer_1 = __webpack_require__(91);
|
|
|
exports.controlFlowTransformersModule = new inversify_1.ContainerModule(function (bind) {
|
|
|
- bind(ServiceIdentifiers_1.ServiceIdentifiers.IControlFlowReplacer).to(BinaryExpressionControlFlowReplacer_1.BinaryExpressionControlFlowReplacer).whenTargetNamed(NodeControlFlowReplacers_1.NodeControlFlowReplacers.BinaryExpressionControlFlowReplacer);
|
|
|
- bind(ServiceIdentifiers_1.ServiceIdentifiers.IControlFlowReplacer).to(CallExpressionControlFlowReplacer_1.CallExpressionControlFlowReplacer).whenTargetNamed(NodeControlFlowReplacers_1.NodeControlFlowReplacers.CallExpressionControlFlowReplacer);
|
|
|
- bind(ServiceIdentifiers_1.ServiceIdentifiers.IControlFlowReplacer).to(LogicalExpressionControlFlowReplacer_1.LogicalExpressionControlFlowReplacer).whenTargetNamed(NodeControlFlowReplacers_1.NodeControlFlowReplacers.LogicalExpressionControlFlowReplacer);
|
|
|
+ bind(ServiceIdentifiers_1.ServiceIdentifiers.IControlFlowReplacer).to(BinaryExpressionControlFlowReplacer_1.BinaryExpressionControlFlowReplacer).whenTargetNamed(ControlFlowReplacers_1.ControlFlowReplacers.BinaryExpressionControlFlowReplacer);
|
|
|
+ bind(ServiceIdentifiers_1.ServiceIdentifiers.IControlFlowReplacer).to(CallExpressionControlFlowReplacer_1.CallExpressionControlFlowReplacer).whenTargetNamed(ControlFlowReplacers_1.ControlFlowReplacers.CallExpressionControlFlowReplacer);
|
|
|
+ bind(ServiceIdentifiers_1.ServiceIdentifiers.IControlFlowReplacer).to(LogicalExpressionControlFlowReplacer_1.LogicalExpressionControlFlowReplacer).whenTargetNamed(ControlFlowReplacers_1.ControlFlowReplacers.LogicalExpressionControlFlowReplacer);
|
|
|
bind(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IControlFlowReplacer).toFactory(function (context) {
|
|
|
- var cache = new _map2.default();
|
|
|
+ var cache = new Map();
|
|
|
return function (replacerName) {
|
|
|
if (cache.has(replacerName)) {
|
|
|
return cache.get(replacerName);
|
|
@@ -3040,31 +3002,25 @@ exports.nodeTransformersModule = new inversify_1.ContainerModule(function (bind)
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
-var _map = __webpack_require__(14);
|
|
|
-
|
|
|
-var _map2 = _interopRequireDefault(_map);
|
|
|
-
|
|
|
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
-
|
|
|
var inversify_1 = __webpack_require__(0);
|
|
|
var ServiceIdentifiers_1 = __webpack_require__(2);
|
|
|
-var NodeObfuscationReplacers_1 = __webpack_require__(22);
|
|
|
+var ObfuscationReplacers_1 = __webpack_require__(147);
|
|
|
var BooleanLiteralReplacer_1 = __webpack_require__(102);
|
|
|
var IdentifierReplacer_1 = __webpack_require__(103);
|
|
|
var NumberLiteralReplacer_1 = __webpack_require__(104);
|
|
|
var StringLiteralReplacer_1 = __webpack_require__(105);
|
|
|
exports.obfuscatingTransformersModule = new inversify_1.ContainerModule(function (bind) {
|
|
|
- bind(ServiceIdentifiers_1.ServiceIdentifiers.IObfuscatorReplacer).to(BooleanLiteralReplacer_1.BooleanLiteralReplacer).whenTargetNamed(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.BooleanReplacer);
|
|
|
- bind(ServiceIdentifiers_1.ServiceIdentifiers.IObfuscatorReplacer).to(IdentifierReplacer_1.IdentifierReplacer).whenTargetNamed(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.IdentifierReplacer);
|
|
|
- bind(ServiceIdentifiers_1.ServiceIdentifiers.IObfuscatorReplacer).to(NumberLiteralReplacer_1.NumberLiteralReplacer).whenTargetNamed(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.NumberLiteralReplacer);
|
|
|
- bind(ServiceIdentifiers_1.ServiceIdentifiers.IObfuscatorReplacer).to(StringLiteralReplacer_1.StringLiteralReplacer).whenTargetNamed(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.StringLiteralReplacer);
|
|
|
- bind(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscatorReplacer).toFactory(function (context) {
|
|
|
- var cache = new _map2.default();
|
|
|
+ bind(ServiceIdentifiers_1.ServiceIdentifiers.IObfuscationReplacer).to(BooleanLiteralReplacer_1.BooleanLiteralReplacer).whenTargetNamed(ObfuscationReplacers_1.ObfuscationReplacers.BooleanReplacer);
|
|
|
+ bind(ServiceIdentifiers_1.ServiceIdentifiers.IObfuscationReplacer).to(IdentifierReplacer_1.IdentifierReplacer).whenTargetNamed(ObfuscationReplacers_1.ObfuscationReplacers.IdentifierReplacer);
|
|
|
+ bind(ServiceIdentifiers_1.ServiceIdentifiers.IObfuscationReplacer).to(NumberLiteralReplacer_1.NumberLiteralReplacer).whenTargetNamed(ObfuscationReplacers_1.ObfuscationReplacers.NumberLiteralReplacer);
|
|
|
+ bind(ServiceIdentifiers_1.ServiceIdentifiers.IObfuscationReplacer).to(StringLiteralReplacer_1.StringLiteralReplacer).whenTargetNamed(ObfuscationReplacers_1.ObfuscationReplacers.StringLiteralReplacer);
|
|
|
+ bind(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscationReplacer).toFactory(function (context) {
|
|
|
+ var cache = new Map();
|
|
|
return function (replacerName) {
|
|
|
if (cache.has(replacerName)) {
|
|
|
return cache.get(replacerName);
|
|
|
}
|
|
|
- var obfuscationReplacer = context.container.getNamed(ServiceIdentifiers_1.ServiceIdentifiers.IObfuscatorReplacer, replacerName);
|
|
|
+ var obfuscationReplacer = context.container.getNamed(ServiceIdentifiers_1.ServiceIdentifiers.IObfuscationReplacer, replacerName);
|
|
|
cache.set(replacerName, obfuscationReplacer);
|
|
|
return obfuscationReplacer;
|
|
|
};
|
|
@@ -5086,7 +5042,7 @@ var NodeType_1 = __webpack_require__(19);
|
|
|
var AbstractNodeTransformer_1 = __webpack_require__(16);
|
|
|
var Node_1 = __webpack_require__(11);
|
|
|
var NodeAppender_1 = __webpack_require__(24);
|
|
|
-var NodeControlFlowReplacers_1 = __webpack_require__(39);
|
|
|
+var ControlFlowReplacers_1 = __webpack_require__(148);
|
|
|
var NodeUtils_1 = __webpack_require__(8);
|
|
|
var RandomGeneratorUtils_1 = __webpack_require__(9);
|
|
|
var FunctionControlFlowTransformer = FunctionControlFlowTransformer_1 = function (_AbstractNodeTransfor) {
|
|
@@ -5199,7 +5155,7 @@ var FunctionControlFlowTransformer = FunctionControlFlowTransformer_1 = function
|
|
|
|
|
|
return FunctionControlFlowTransformer;
|
|
|
}(AbstractNodeTransformer_1.AbstractNodeTransformer);
|
|
|
-FunctionControlFlowTransformer.controlFlowReplacersMap = new Map([[NodeType_1.NodeType.BinaryExpression, NodeControlFlowReplacers_1.NodeControlFlowReplacers.BinaryExpressionControlFlowReplacer], [NodeType_1.NodeType.CallExpression, NodeControlFlowReplacers_1.NodeControlFlowReplacers.CallExpressionControlFlowReplacer], [NodeType_1.NodeType.LogicalExpression, NodeControlFlowReplacers_1.NodeControlFlowReplacers.LogicalExpressionControlFlowReplacer]]);
|
|
|
+FunctionControlFlowTransformer.controlFlowReplacersMap = new Map([[NodeType_1.NodeType.BinaryExpression, ControlFlowReplacers_1.ControlFlowReplacers.BinaryExpressionControlFlowReplacer], [NodeType_1.NodeType.CallExpression, ControlFlowReplacers_1.ControlFlowReplacers.CallExpressionControlFlowReplacer], [NodeType_1.NodeType.LogicalExpression, ControlFlowReplacers_1.ControlFlowReplacers.LogicalExpressionControlFlowReplacer]]);
|
|
|
FunctionControlFlowTransformer.hostNodeSearchMinDepth = 0;
|
|
|
FunctionControlFlowTransformer.hostNodeSearchMaxDepth = 2;
|
|
|
FunctionControlFlowTransformer = FunctionControlFlowTransformer_1 = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__TControlFlowStorage)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IControlFlowReplacer)), tslib_1.__param(2, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__ICustomNode)), tslib_1.__param(3, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Function, Function, Object])], FunctionControlFlowTransformer);
|
|
@@ -5660,18 +5616,18 @@ var tslib_1 = __webpack_require__(1);
|
|
|
var inversify_1 = __webpack_require__(0);
|
|
|
var ServiceIdentifiers_1 = __webpack_require__(2);
|
|
|
var estraverse = __webpack_require__(17);
|
|
|
-var NodeObfuscationReplacers_1 = __webpack_require__(22);
|
|
|
+var ObfuscationReplacers_1 = __webpack_require__(147);
|
|
|
var AbstractNodeTransformer_1 = __webpack_require__(16);
|
|
|
var Node_1 = __webpack_require__(11);
|
|
|
var CatchClauseTransformer = function (_AbstractNodeTransfor) {
|
|
|
_inherits(CatchClauseTransformer, _AbstractNodeTransfor);
|
|
|
|
|
|
- function CatchClauseTransformer(replacersFactory, options) {
|
|
|
+ function CatchClauseTransformer(obfuscationReplacerFactory, options) {
|
|
|
_classCallCheck(this, CatchClauseTransformer);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, (CatchClauseTransformer.__proto__ || Object.getPrototypeOf(CatchClauseTransformer)).call(this, options));
|
|
|
|
|
|
- _this.identifierReplacer = replacersFactory(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.IdentifierReplacer);
|
|
|
+ _this.identifierReplacer = obfuscationReplacerFactory(ObfuscationReplacers_1.ObfuscationReplacers.IdentifierReplacer);
|
|
|
return _this;
|
|
|
}
|
|
|
|
|
@@ -5724,7 +5680,7 @@ var CatchClauseTransformer = function (_AbstractNodeTransfor) {
|
|
|
|
|
|
return CatchClauseTransformer;
|
|
|
}(AbstractNodeTransformer_1.AbstractNodeTransformer);
|
|
|
-CatchClauseTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscatorReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], CatchClauseTransformer);
|
|
|
+CatchClauseTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscationReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], CatchClauseTransformer);
|
|
|
exports.CatchClauseTransformer = CatchClauseTransformer;
|
|
|
|
|
|
/***/ }),
|
|
@@ -5746,7 +5702,7 @@ var tslib_1 = __webpack_require__(1);
|
|
|
var inversify_1 = __webpack_require__(0);
|
|
|
var ServiceIdentifiers_1 = __webpack_require__(2);
|
|
|
var estraverse = __webpack_require__(17);
|
|
|
-var NodeObfuscationReplacers_1 = __webpack_require__(22);
|
|
|
+var ObfuscationReplacers_1 = __webpack_require__(147);
|
|
|
var NodeType_1 = __webpack_require__(19);
|
|
|
var AbstractNodeTransformer_1 = __webpack_require__(16);
|
|
|
var Node_1 = __webpack_require__(11);
|
|
@@ -5754,13 +5710,13 @@ var NodeUtils_1 = __webpack_require__(8);
|
|
|
var FunctionDeclarationTransformer = function (_AbstractNodeTransfor) {
|
|
|
_inherits(FunctionDeclarationTransformer, _AbstractNodeTransfor);
|
|
|
|
|
|
- function FunctionDeclarationTransformer(nodeObfuscatorsReplacersFactory, options) {
|
|
|
+ function FunctionDeclarationTransformer(obfuscationReplacerFactory, options) {
|
|
|
_classCallCheck(this, FunctionDeclarationTransformer);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, (FunctionDeclarationTransformer.__proto__ || Object.getPrototypeOf(FunctionDeclarationTransformer)).call(this, options));
|
|
|
|
|
|
_this.replaceableIdentifiers = new Map();
|
|
|
- _this.identifierReplacer = nodeObfuscatorsReplacersFactory(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.IdentifierReplacer);
|
|
|
+ _this.identifierReplacer = obfuscationReplacerFactory(ObfuscationReplacers_1.ObfuscationReplacers.IdentifierReplacer);
|
|
|
return _this;
|
|
|
}
|
|
|
|
|
@@ -5786,7 +5742,11 @@ var FunctionDeclarationTransformer = function (_AbstractNodeTransfor) {
|
|
|
return functionDeclarationNode;
|
|
|
}
|
|
|
this.storeFunctionName(functionDeclarationNode, nodeIdentifier);
|
|
|
- this.replaceFunctionName(blockScopeOfFunctionDeclarationNode, nodeIdentifier);
|
|
|
+ if (this.replaceableIdentifiers.has(blockScopeOfFunctionDeclarationNode)) {
|
|
|
+ this.replaceScopeCachedIdentifiers(blockScopeOfFunctionDeclarationNode, nodeIdentifier);
|
|
|
+ } else {
|
|
|
+ this.replaceScopeIdentifiers(blockScopeOfFunctionDeclarationNode, nodeIdentifier);
|
|
|
+ }
|
|
|
return functionDeclarationNode;
|
|
|
}
|
|
|
}, {
|
|
@@ -5795,38 +5755,40 @@ var FunctionDeclarationTransformer = function (_AbstractNodeTransfor) {
|
|
|
this.identifierReplacer.storeNames(functionDeclarationNode.id.name, nodeIdentifier);
|
|
|
}
|
|
|
}, {
|
|
|
- key: "replaceFunctionName",
|
|
|
- value: function replaceFunctionName(scopeNode, nodeIdentifier) {
|
|
|
+ key: "replaceScopeCachedIdentifiers",
|
|
|
+ value: function replaceScopeCachedIdentifiers(scopeNode, nodeIdentifier) {
|
|
|
var _this3 = this;
|
|
|
|
|
|
- var replaceableIdentifiersForCurrentScope = void 0;
|
|
|
- if (this.replaceableIdentifiers.has(scopeNode)) {
|
|
|
- replaceableIdentifiersForCurrentScope = this.replaceableIdentifiers.get(scopeNode);
|
|
|
- replaceableIdentifiersForCurrentScope.forEach(function (replaceableIdentifier) {
|
|
|
- replaceableIdentifier.name = _this3.identifierReplacer.replace(replaceableIdentifier.name, nodeIdentifier);
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- replaceableIdentifiersForCurrentScope = [];
|
|
|
+ var cachedReplaceableIdentifiers = this.replaceableIdentifiers.get(scopeNode);
|
|
|
+ cachedReplaceableIdentifiers.forEach(function (replaceableIdentifier) {
|
|
|
+ replaceableIdentifier.name = _this3.identifierReplacer.replace(replaceableIdentifier.name, nodeIdentifier);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ key: "replaceScopeIdentifiers",
|
|
|
+ value: function replaceScopeIdentifiers(scopeNode, nodeIdentifier) {
|
|
|
+ var _this4 = this;
|
|
|
+
|
|
|
+ var storedReplaceableIdentifiers = [];
|
|
|
estraverse.replace(scopeNode, {
|
|
|
enter: function enter(node, parentNode) {
|
|
|
if (Node_1.Node.isReplaceableIdentifierNode(node, parentNode)) {
|
|
|
- var newNodeName = _this3.identifierReplacer.replace(node.name, nodeIdentifier);
|
|
|
+ var newNodeName = _this4.identifierReplacer.replace(node.name, nodeIdentifier);
|
|
|
if (node.name !== newNodeName) {
|
|
|
node.name = newNodeName;
|
|
|
} else {
|
|
|
- replaceableIdentifiersForCurrentScope.push(node);
|
|
|
+ storedReplaceableIdentifiers.push(node);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- this.replaceableIdentifiers.set(scopeNode, replaceableIdentifiersForCurrentScope);
|
|
|
+ this.replaceableIdentifiers.set(scopeNode, storedReplaceableIdentifiers);
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
return FunctionDeclarationTransformer;
|
|
|
}(AbstractNodeTransformer_1.AbstractNodeTransformer);
|
|
|
-FunctionDeclarationTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscatorReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], FunctionDeclarationTransformer);
|
|
|
+FunctionDeclarationTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscationReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], FunctionDeclarationTransformer);
|
|
|
exports.FunctionDeclarationTransformer = FunctionDeclarationTransformer;
|
|
|
|
|
|
/***/ }),
|
|
@@ -5848,18 +5810,18 @@ var tslib_1 = __webpack_require__(1);
|
|
|
var inversify_1 = __webpack_require__(0);
|
|
|
var ServiceIdentifiers_1 = __webpack_require__(2);
|
|
|
var estraverse = __webpack_require__(17);
|
|
|
-var NodeObfuscationReplacers_1 = __webpack_require__(22);
|
|
|
+var ObfuscationReplacers_1 = __webpack_require__(147);
|
|
|
var AbstractNodeTransformer_1 = __webpack_require__(16);
|
|
|
var Node_1 = __webpack_require__(11);
|
|
|
var FunctionTransformer = function (_AbstractNodeTransfor) {
|
|
|
_inherits(FunctionTransformer, _AbstractNodeTransfor);
|
|
|
|
|
|
- function FunctionTransformer(nodeObfuscatorsReplacersFactory, options) {
|
|
|
+ function FunctionTransformer(obfuscationReplacerFactory, options) {
|
|
|
_classCallCheck(this, FunctionTransformer);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, (FunctionTransformer.__proto__ || Object.getPrototypeOf(FunctionTransformer)).call(this, options));
|
|
|
|
|
|
- _this.identifierReplacer = nodeObfuscatorsReplacersFactory(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.IdentifierReplacer);
|
|
|
+ _this.identifierReplacer = obfuscationReplacerFactory(ObfuscationReplacers_1.ObfuscationReplacers.IdentifierReplacer);
|
|
|
return _this;
|
|
|
}
|
|
|
|
|
@@ -5931,7 +5893,7 @@ var FunctionTransformer = function (_AbstractNodeTransfor) {
|
|
|
|
|
|
return FunctionTransformer;
|
|
|
}(AbstractNodeTransformer_1.AbstractNodeTransformer);
|
|
|
-FunctionTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscatorReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], FunctionTransformer);
|
|
|
+FunctionTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscationReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], FunctionTransformer);
|
|
|
exports.FunctionTransformer = FunctionTransformer;
|
|
|
|
|
|
/***/ }),
|
|
@@ -5953,18 +5915,18 @@ var tslib_1 = __webpack_require__(1);
|
|
|
var inversify_1 = __webpack_require__(0);
|
|
|
var ServiceIdentifiers_1 = __webpack_require__(2);
|
|
|
var estraverse = __webpack_require__(17);
|
|
|
-var NodeObfuscationReplacers_1 = __webpack_require__(22);
|
|
|
+var ObfuscationReplacers_1 = __webpack_require__(147);
|
|
|
var AbstractNodeTransformer_1 = __webpack_require__(16);
|
|
|
var Node_1 = __webpack_require__(11);
|
|
|
var LabeledStatementTransformer = function (_AbstractNodeTransfor) {
|
|
|
_inherits(LabeledStatementTransformer, _AbstractNodeTransfor);
|
|
|
|
|
|
- function LabeledStatementTransformer(nodeObfuscatorsReplacersFactory, options) {
|
|
|
+ function LabeledStatementTransformer(obfuscationReplacerFactory, options) {
|
|
|
_classCallCheck(this, LabeledStatementTransformer);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, (LabeledStatementTransformer.__proto__ || Object.getPrototypeOf(LabeledStatementTransformer)).call(this, options));
|
|
|
|
|
|
- _this.identifierReplacer = nodeObfuscatorsReplacersFactory(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.IdentifierReplacer);
|
|
|
+ _this.identifierReplacer = obfuscationReplacerFactory(ObfuscationReplacers_1.ObfuscationReplacers.IdentifierReplacer);
|
|
|
return _this;
|
|
|
}
|
|
|
|
|
@@ -6011,7 +5973,7 @@ var LabeledStatementTransformer = function (_AbstractNodeTransfor) {
|
|
|
|
|
|
return LabeledStatementTransformer;
|
|
|
}(AbstractNodeTransformer_1.AbstractNodeTransformer);
|
|
|
-LabeledStatementTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscatorReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], LabeledStatementTransformer);
|
|
|
+LabeledStatementTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscationReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], LabeledStatementTransformer);
|
|
|
exports.LabeledStatementTransformer = LabeledStatementTransformer;
|
|
|
|
|
|
/***/ }),
|
|
@@ -6035,18 +5997,18 @@ var tslib_1 = __webpack_require__(1);
|
|
|
var inversify_1 = __webpack_require__(0);
|
|
|
var ServiceIdentifiers_1 = __webpack_require__(2);
|
|
|
var escodegen = __webpack_require__(26);
|
|
|
-var NodeObfuscationReplacers_1 = __webpack_require__(22);
|
|
|
+var ObfuscationReplacers_1 = __webpack_require__(147);
|
|
|
var AbstractNodeTransformer_1 = __webpack_require__(16);
|
|
|
var Node_1 = __webpack_require__(11);
|
|
|
var LiteralTransformer = function (_AbstractNodeTransfor) {
|
|
|
_inherits(LiteralTransformer, _AbstractNodeTransfor);
|
|
|
|
|
|
- function LiteralTransformer(replacersFactory, options) {
|
|
|
+ function LiteralTransformer(obfuscationReplacerFactory, options) {
|
|
|
_classCallCheck(this, LiteralTransformer);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, (LiteralTransformer.__proto__ || Object.getPrototypeOf(LiteralTransformer)).call(this, options));
|
|
|
|
|
|
- _this.replacersFactory = replacersFactory;
|
|
|
+ _this.obfuscationReplacerFactory = obfuscationReplacerFactory;
|
|
|
return _this;
|
|
|
}
|
|
|
|
|
@@ -6072,13 +6034,13 @@ var LiteralTransformer = function (_AbstractNodeTransfor) {
|
|
|
var content = void 0;
|
|
|
switch (_typeof(literalNode.value)) {
|
|
|
case 'boolean':
|
|
|
- content = this.replacersFactory(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.BooleanReplacer).replace(literalNode.value);
|
|
|
+ content = this.obfuscationReplacerFactory(ObfuscationReplacers_1.ObfuscationReplacers.BooleanReplacer).replace(literalNode.value);
|
|
|
break;
|
|
|
case 'number':
|
|
|
- content = this.replacersFactory(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.NumberLiteralReplacer).replace(literalNode.value);
|
|
|
+ content = this.obfuscationReplacerFactory(ObfuscationReplacers_1.ObfuscationReplacers.NumberLiteralReplacer).replace(literalNode.value);
|
|
|
break;
|
|
|
case 'string':
|
|
|
- content = this.replacersFactory(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.StringLiteralReplacer).replace(literalNode.value);
|
|
|
+ content = this.obfuscationReplacerFactory(ObfuscationReplacers_1.ObfuscationReplacers.StringLiteralReplacer).replace(literalNode.value);
|
|
|
break;
|
|
|
default:
|
|
|
return literalNode;
|
|
@@ -6093,7 +6055,7 @@ var LiteralTransformer = function (_AbstractNodeTransfor) {
|
|
|
|
|
|
return LiteralTransformer;
|
|
|
}(AbstractNodeTransformer_1.AbstractNodeTransformer);
|
|
|
-LiteralTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscatorReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], LiteralTransformer);
|
|
|
+LiteralTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscationReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], LiteralTransformer);
|
|
|
exports.LiteralTransformer = LiteralTransformer;
|
|
|
|
|
|
/***/ }),
|
|
@@ -6207,7 +6169,7 @@ var tslib_1 = __webpack_require__(1);
|
|
|
var inversify_1 = __webpack_require__(0);
|
|
|
var ServiceIdentifiers_1 = __webpack_require__(2);
|
|
|
var estraverse = __webpack_require__(17);
|
|
|
-var NodeObfuscationReplacers_1 = __webpack_require__(22);
|
|
|
+var ObfuscationReplacers_1 = __webpack_require__(147);
|
|
|
var NodeType_1 = __webpack_require__(19);
|
|
|
var AbstractNodeTransformer_1 = __webpack_require__(16);
|
|
|
var Node_1 = __webpack_require__(11);
|
|
@@ -6215,13 +6177,13 @@ var NodeUtils_1 = __webpack_require__(8);
|
|
|
var VariableDeclarationTransformer = function (_AbstractNodeTransfor) {
|
|
|
_inherits(VariableDeclarationTransformer, _AbstractNodeTransfor);
|
|
|
|
|
|
- function VariableDeclarationTransformer(replacersFactory, options) {
|
|
|
+ function VariableDeclarationTransformer(obfuscationReplacerFactory, options) {
|
|
|
_classCallCheck(this, VariableDeclarationTransformer);
|
|
|
|
|
|
var _this = _possibleConstructorReturn(this, (VariableDeclarationTransformer.__proto__ || Object.getPrototypeOf(VariableDeclarationTransformer)).call(this, options));
|
|
|
|
|
|
_this.replaceableIdentifiers = new Map();
|
|
|
- _this.identifierReplacer = replacersFactory(NodeObfuscationReplacers_1.NodeObfuscatorsReplacers.IdentifierReplacer);
|
|
|
+ _this.identifierReplacer = obfuscationReplacerFactory(ObfuscationReplacers_1.ObfuscationReplacers.IdentifierReplacer);
|
|
|
return _this;
|
|
|
}
|
|
|
|
|
@@ -6248,7 +6210,11 @@ var VariableDeclarationTransformer = function (_AbstractNodeTransfor) {
|
|
|
var nodeIdentifier = this.nodeIdentifier++;
|
|
|
var scopeNode = variableDeclarationNode.kind === 'var' ? blockScopeOfVariableDeclarationNode : parentNode;
|
|
|
this.storeVariableNames(variableDeclarationNode, nodeIdentifier);
|
|
|
- this.replaceVariableNames(scopeNode, nodeIdentifier);
|
|
|
+ if (this.replaceableIdentifiers.has(scopeNode)) {
|
|
|
+ this.replaceScopeCachedIdentifiers(scopeNode, nodeIdentifier);
|
|
|
+ } else {
|
|
|
+ this.replaceScopeIdentifiers(scopeNode, nodeIdentifier);
|
|
|
+ }
|
|
|
return variableDeclarationNode;
|
|
|
}
|
|
|
}, {
|
|
@@ -6268,38 +6234,40 @@ var VariableDeclarationTransformer = function (_AbstractNodeTransfor) {
|
|
|
});
|
|
|
}
|
|
|
}, {
|
|
|
- key: "replaceVariableNames",
|
|
|
- value: function replaceVariableNames(scopeNode, nodeIdentifier) {
|
|
|
+ key: "replaceScopeCachedIdentifiers",
|
|
|
+ value: function replaceScopeCachedIdentifiers(scopeNode, nodeIdentifier) {
|
|
|
var _this4 = this;
|
|
|
|
|
|
- var replaceableIdentifiersForCurrentScope = void 0;
|
|
|
- if (this.replaceableIdentifiers.has(scopeNode)) {
|
|
|
- replaceableIdentifiersForCurrentScope = this.replaceableIdentifiers.get(scopeNode);
|
|
|
- replaceableIdentifiersForCurrentScope.forEach(function (replaceableIdentifier) {
|
|
|
- replaceableIdentifier.name = _this4.identifierReplacer.replace(replaceableIdentifier.name, nodeIdentifier);
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- replaceableIdentifiersForCurrentScope = [];
|
|
|
+ var cachedReplaceableIdentifiers = this.replaceableIdentifiers.get(scopeNode);
|
|
|
+ cachedReplaceableIdentifiers.forEach(function (replaceableIdentifier) {
|
|
|
+ replaceableIdentifier.name = _this4.identifierReplacer.replace(replaceableIdentifier.name, nodeIdentifier);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ key: "replaceScopeIdentifiers",
|
|
|
+ value: function replaceScopeIdentifiers(scopeNode, nodeIdentifier) {
|
|
|
+ var _this5 = this;
|
|
|
+
|
|
|
+ var storedReplaceableIdentifiers = [];
|
|
|
estraverse.replace(scopeNode, {
|
|
|
enter: function enter(node, parentNode) {
|
|
|
if (!node.obfuscatedNode && Node_1.Node.isReplaceableIdentifierNode(node, parentNode)) {
|
|
|
- var newNodeName = _this4.identifierReplacer.replace(node.name, nodeIdentifier);
|
|
|
+ var newNodeName = _this5.identifierReplacer.replace(node.name, nodeIdentifier);
|
|
|
if (node.name !== newNodeName) {
|
|
|
node.name = newNodeName;
|
|
|
} else {
|
|
|
- replaceableIdentifiersForCurrentScope.push(node);
|
|
|
+ storedReplaceableIdentifiers.push(node);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- this.replaceableIdentifiers.set(scopeNode, replaceableIdentifiersForCurrentScope);
|
|
|
+ this.replaceableIdentifiers.set(scopeNode, storedReplaceableIdentifiers);
|
|
|
}
|
|
|
}]);
|
|
|
|
|
|
return VariableDeclarationTransformer;
|
|
|
}(AbstractNodeTransformer_1.AbstractNodeTransformer);
|
|
|
-VariableDeclarationTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscatorReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], VariableDeclarationTransformer);
|
|
|
+VariableDeclarationTransformer = tslib_1.__decorate([inversify_1.injectable(), tslib_1.__param(0, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.Factory__IObfuscationReplacer)), tslib_1.__param(1, inversify_1.inject(ServiceIdentifiers_1.ServiceIdentifiers.IOptions)), tslib_1.__metadata("design:paramtypes", [Function, Object])], VariableDeclarationTransformer);
|
|
|
exports.VariableDeclarationTransformer = VariableDeclarationTransformer;
|
|
|
|
|
|
/***/ }),
|
|
@@ -6939,15 +6907,9 @@ exports.ValidationErrorsFormatter = ValidationErrorsFormatter;
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
-var _classCallCheck2 = __webpack_require__(3);
|
|
|
-
|
|
|
-var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
|
|
-
|
|
|
-var _createClass2 = __webpack_require__(4);
|
|
|
-
|
|
|
-var _createClass3 = _interopRequireDefault(_createClass2);
|
|
|
+var _createClass = (function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
|
|
|
|
|
|
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
var tslib_1 = __webpack_require__(1);
|
|
|
var inversify_1 = __webpack_require__(0);
|
|
@@ -6957,13 +6919,13 @@ var CalleeDataExtractors_1 = __webpack_require__(37);
|
|
|
var Node_1 = __webpack_require__(11);
|
|
|
var NodeUtils_1 = __webpack_require__(8);
|
|
|
var StackTraceAnalyzer = StackTraceAnalyzer_1 = function () {
|
|
|
- function StackTraceAnalyzer(calleeDataExtractorsFactory) {
|
|
|
- (0, _classCallCheck3.default)(this, StackTraceAnalyzer);
|
|
|
+ function StackTraceAnalyzer(calleeDataExtractorFactory) {
|
|
|
+ _classCallCheck(this, StackTraceAnalyzer);
|
|
|
|
|
|
- this.calleeDataExtractorsFactory = calleeDataExtractorsFactory;
|
|
|
+ this.calleeDataExtractorFactory = calleeDataExtractorFactory;
|
|
|
}
|
|
|
|
|
|
- (0, _createClass3.default)(StackTraceAnalyzer, [{
|
|
|
+ _createClass(StackTraceAnalyzer, [{
|
|
|
key: "analyze",
|
|
|
value: function analyze(blockScopeBody) {
|
|
|
return this.analyzeRecursive(blockScopeBody);
|
|
@@ -7008,7 +6970,7 @@ var StackTraceAnalyzer = StackTraceAnalyzer_1 = function () {
|
|
|
var _this2 = this;
|
|
|
|
|
|
StackTraceAnalyzer_1.calleeDataExtractorsList.forEach(function (calleeDataExtractorName) {
|
|
|
- var calleeData = _this2.calleeDataExtractorsFactory(calleeDataExtractorName).extract(blockScopeBody, callExpressionNode.callee);
|
|
|
+ var calleeData = _this2.calleeDataExtractorFactory(calleeDataExtractorName).extract(blockScopeBody, callExpressionNode.callee);
|
|
|
if (!calleeData) {
|
|
|
return;
|
|
|
}
|
|
@@ -7030,6 +6992,7 @@ var StackTraceAnalyzer = StackTraceAnalyzer_1 = function () {
|
|
|
return limitIndex;
|
|
|
}
|
|
|
}]);
|
|
|
+
|
|
|
return StackTraceAnalyzer;
|
|
|
}();
|
|
|
StackTraceAnalyzer.calleeDataExtractorsList = [CalleeDataExtractors_1.CalleeDataExtractors.FunctionDeclarationCalleeDataExtractor, CalleeDataExtractors_1.CalleeDataExtractors.FunctionExpressionCalleeDataExtractor, CalleeDataExtractors_1.CalleeDataExtractors.ObjectExpressionCalleeDataExtractor];
|
|
@@ -7867,12 +7830,7 @@ module.exports = require("babel-runtime/core-js/object/define-property");
|
|
|
module.exports = require("babel-runtime/core-js/object/get-own-property-descriptor");
|
|
|
|
|
|
/***/ }),
|
|
|
-/* 137 */
|
|
|
-/***/ (function(module, exports) {
|
|
|
-
|
|
|
-module.exports = require("babel-runtime/core-js/symbol");
|
|
|
-
|
|
|
-/***/ }),
|
|
|
+/* 137 */,
|
|
|
/* 138 */
|
|
|
/***/ (function(module, exports) {
|
|
|
|
|
@@ -7925,6 +7883,35 @@ module.exports = require("reflect-metadata");
|
|
|
var JavaScriptObfuscator_1 = __webpack_require__(23);
|
|
|
module.exports = JavaScriptObfuscator_1.JavaScriptObfuscator;
|
|
|
|
|
|
+/***/ }),
|
|
|
+/* 147 */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+
|
|
|
+
|
|
|
+var ObfuscationReplacers;
|
|
|
+(function (ObfuscationReplacers) {
|
|
|
+ ObfuscationReplacers[ObfuscationReplacers["BooleanReplacer"] = 0] = "BooleanReplacer";
|
|
|
+ ObfuscationReplacers[ObfuscationReplacers["IdentifierReplacer"] = 1] = "IdentifierReplacer";
|
|
|
+ ObfuscationReplacers[ObfuscationReplacers["NumberLiteralReplacer"] = 2] = "NumberLiteralReplacer";
|
|
|
+ ObfuscationReplacers[ObfuscationReplacers["StringLiteralReplacer"] = 3] = "StringLiteralReplacer";
|
|
|
+})(ObfuscationReplacers = exports.ObfuscationReplacers || (exports.ObfuscationReplacers = {}));
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 148 */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+
|
|
|
+
|
|
|
+var ControlFlowReplacers;
|
|
|
+(function (ControlFlowReplacers) {
|
|
|
+ ControlFlowReplacers[ControlFlowReplacers["BinaryExpressionControlFlowReplacer"] = 0] = "BinaryExpressionControlFlowReplacer";
|
|
|
+ ControlFlowReplacers[ControlFlowReplacers["CallExpressionControlFlowReplacer"] = 1] = "CallExpressionControlFlowReplacer";
|
|
|
+ ControlFlowReplacers[ControlFlowReplacers["LogicalExpressionControlFlowReplacer"] = 2] = "LogicalExpressionControlFlowReplacer";
|
|
|
+})(ControlFlowReplacers = exports.ControlFlowReplacers || (exports.ControlFlowReplacers = {}));
|
|
|
+
|
|
|
/***/ })
|
|
|
/******/ ]);
|
|
|
//# sourceMappingURL=index.js.map
|