浏览代码

update deps

sanex3339 8 年之前
父节点
当前提交
405f1c4515

文件差异内容过多而无法显示
+ 181 - 181
dist/index.js


+ 4 - 4
package.json

@@ -28,7 +28,7 @@
     "escodegen": "1.8.1",
     "escodegen": "1.8.1",
     "esprima": "3.1.3",
     "esprima": "3.1.3",
     "estraverse": "4.2.0",
     "estraverse": "4.2.0",
-    "inversify": "3.0.0-rc.4",
+    "inversify": "3.0.0",
     "lodash": "4.17.4",
     "lodash": "4.17.4",
     "mkdirp": "0.5.1",
     "mkdirp": "0.5.1",
     "reflect-metadata": "0.1.9",
     "reflect-metadata": "0.1.9",
@@ -47,7 +47,7 @@
     "@types/lodash": "4.14.48",
     "@types/lodash": "4.14.48",
     "@types/mkdirp": "0.3.29",
     "@types/mkdirp": "0.3.29",
     "@types/mocha": "2.2.37",
     "@types/mocha": "2.2.37",
-    "@types/node": "6.0.59",
+    "@types/node": "7.0.0",
     "@types/sinon": "1.16.34",
     "@types/sinon": "1.16.34",
     "@types/string-template": "1.0.2",
     "@types/string-template": "1.0.2",
     "awesome-typescript-loader": "3.0.0-beta.18",
     "awesome-typescript-loader": "3.0.0-beta.18",
@@ -63,8 +63,8 @@
     "ts-node": "2.0.0",
     "ts-node": "2.0.0",
     "tslint": "4.3.1",
     "tslint": "4.3.1",
     "tslint-loader": "3.3.0",
     "tslint-loader": "3.3.0",
-    "typescript": "2.1.4",
-    "webpack": "2.2.0-rc.3",
+    "typescript": "2.1.5",
+    "webpack": "2.2.0-rc.4",
     "webpack-node-externals": "1.5.4"
     "webpack-node-externals": "1.5.4"
   },
   },
   "repository": {
   "repository": {

+ 6 - 3
src/cli/JavaScriptObfuscatorCLI.ts

@@ -182,12 +182,12 @@ export class JavaScriptObfuscatorCLI {
             .option(
             .option(
                 '--domainLock <list>',
                 '--domainLock <list>',
                 'Blocks the execution of the code in domains that do not match the passed RegExp patterns (comma separated)',
                 'Blocks the execution of the code in domains that do not match the passed RegExp patterns (comma separated)',
-                (val: string) => val.split(',')
+                (value: string) => value.split(',')
             )
             )
             .option(
             .option(
                 '--reservedNames <list>',
                 '--reservedNames <list>',
                 'Disable obfuscation of variable names, function names and names of function parameters that match the passed RegExp patterns (comma separated)',
                 'Disable obfuscation of variable names, function names and names of function parameters that match the passed RegExp patterns (comma separated)',
-                (val: string) => val.split(',')
+                (value: string) => value.split(',')
             )
             )
             .option(
             .option(
                 '--rotateStringArray <boolean>', 'Disable rotation of unicode array values during obfuscation',
                 '--rotateStringArray <boolean>', 'Disable rotation of unicode array values during obfuscation',
@@ -286,7 +286,10 @@ export class JavaScriptObfuscatorCLI {
             options.sourceMapFileName || ''
             options.sourceMapFileName || ''
         );
         );
 
 
-        options.sourceMapFileName = path.basename(outputSourceMapPath);
+        options = {
+            ...options,
+            sourceMapFileName: path.basename(outputSourceMapPath)
+        };
 
 
         const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(this.data, options);
         const obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(this.data, options);
 
 

+ 1 - 1
test/functional-tests/custom-nodes/console-output-nodes/ConsoleOutputDisableExpressionNode.spec.ts

@@ -9,7 +9,7 @@ import { readFileAsString } from '../../../helpers/readFileAsString';
 import { JavaScriptObfuscator } from '../../../../src/JavaScriptObfuscator';
 import { JavaScriptObfuscator } from '../../../../src/JavaScriptObfuscator';
 
 
 describe('ConsoleOutputDisableExpressionNode', () => {
 describe('ConsoleOutputDisableExpressionNode', () => {
-    const regExp = /(_0x([a-f0-9]){4,6}\['(\\x[a-f0-9]*)*'\]\['(\\x[a-f0-9]*)*'\] *= *_0x([a-f0-9]){4,6};){4}/;
+    const regExp = /(_0x([a-f0-9]){4,6}\['(\\x[a-f0-9]*)*'\]\['(\\x[a-f0-9]*)*'\] *= *_0x([a-f0-9]){4,6};){7}/u;
 
 
     it('should correctly append `ConsoleOutputDisableExpressionNode` custom node into the obfuscated code if `disableConsoleOutput` option is set', () => {
     it('should correctly append `ConsoleOutputDisableExpressionNode` custom node into the obfuscated code if `disableConsoleOutput` option is set', () => {
         let obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(
         let obfuscationResult: IObfuscationResult = JavaScriptObfuscator.obfuscate(

部分文件因为文件数量过多而无法显示