javascript-obfuscator 3.0.0 → 3.0.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 +5 -0
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cli.js +1 -1
- package/dist/index.cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +19 -19
- package/typings/src/code-transformers/AbstractCodeTransformer.d.ts +1 -1
- package/typings/src/container/InversifyContainerFacade.d.ts +2 -1
- package/typings/src/custom-code-helpers/AbstractCustomCodeHelper.d.ts +1 -1
- package/typings/src/custom-nodes/AbstractCustomNode.d.ts +1 -1
- package/typings/src/custom-nodes/string-array-nodes/AbstractStringArrayCallNode.d.ts +1 -1
- package/typings/src/custom-nodes/string-array-nodes/string-array-index-nodes/AbstractStringArrayIndexNode.d.ts +1 -1
- package/typings/src/node-transformers/simplifying-transformers/AbstractStatementSimplifyTransformer.d.ts +1 -1
- package/typings/src/storages/ArrayStorage.d.ts +1 -1
- package/typings/src/types/TConstructor.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "javascript-obfuscator",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "JavaScript obfuscator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"obfuscator",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"assert": "2.0.0",
|
|
29
29
|
"chalk": "4.1.2",
|
|
30
30
|
"chance": "1.1.8",
|
|
31
|
-
"class-validator": "0.13.
|
|
32
|
-
"commander": "8.
|
|
31
|
+
"class-validator": "0.13.2",
|
|
32
|
+
"commander": "8.3.0",
|
|
33
33
|
"eslint-scope": "6.0.0",
|
|
34
34
|
"fast-deep-equal": "3.1.3",
|
|
35
|
-
"inversify": "
|
|
35
|
+
"inversify": "6.0.1",
|
|
36
36
|
"js-string-escape": "1.0.1",
|
|
37
37
|
"md5": "2.3.0",
|
|
38
38
|
"mkdirp": "1.0.4",
|
|
@@ -58,25 +58,25 @@
|
|
|
58
58
|
"@types/mkdirp": "1.0.2",
|
|
59
59
|
"@types/mocha": "9.0.0",
|
|
60
60
|
"@types/multimatch": "4.0.0",
|
|
61
|
-
"@types/node": "16.11.
|
|
61
|
+
"@types/node": "16.11.6",
|
|
62
62
|
"@types/rimraf": "3.0.2",
|
|
63
|
-
"@types/sinon": "10.0.
|
|
63
|
+
"@types/sinon": "10.0.6",
|
|
64
64
|
"@types/string-template": "1.0.2",
|
|
65
65
|
"@types/webpack-env": "1.16.3",
|
|
66
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
67
|
-
"@typescript-eslint/parser": "5.
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "5.2.0",
|
|
67
|
+
"@typescript-eslint/parser": "5.2.0",
|
|
68
68
|
"chai": "4.3.4",
|
|
69
69
|
"chai-exclude": "2.1.0",
|
|
70
70
|
"cross-env": "7.0.3",
|
|
71
|
-
"eslint": "
|
|
72
|
-
"eslint-plugin-import": "2.
|
|
73
|
-
"eslint-plugin-jsdoc": "
|
|
71
|
+
"eslint": "8.1.0",
|
|
72
|
+
"eslint-plugin-import": "2.25.2",
|
|
73
|
+
"eslint-plugin-jsdoc": "37.0.3",
|
|
74
74
|
"eslint-plugin-no-null": "1.0.2",
|
|
75
75
|
"eslint-plugin-prefer-arrow": "1.2.3",
|
|
76
|
-
"eslint-plugin-unicorn": "
|
|
76
|
+
"eslint-plugin-unicorn": "37.0.1",
|
|
77
77
|
"fork-ts-checker-notifier-webpack-plugin": "4.0.0",
|
|
78
|
-
"fork-ts-checker-webpack-plugin": "6.
|
|
79
|
-
"husky": "
|
|
78
|
+
"fork-ts-checker-webpack-plugin": "6.4.0",
|
|
79
|
+
"husky": "7.0.4",
|
|
80
80
|
"js-beautify": "1.14.0",
|
|
81
81
|
"mocha": "9.1.3",
|
|
82
82
|
"nyc": "15.1.0",
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
"rimraf": "3.0.2",
|
|
85
85
|
"sinon": "11.1.2",
|
|
86
86
|
"source-map-resolve": "0.6.0",
|
|
87
|
-
"terser": "
|
|
87
|
+
"terser": "5.9.0",
|
|
88
88
|
"threads": "1.7.0",
|
|
89
89
|
"ts-loader": "9.2.6",
|
|
90
|
-
"ts-node": "10.
|
|
90
|
+
"ts-node": "10.4.0",
|
|
91
91
|
"typescript": "4.4.4",
|
|
92
|
-
"webpack": "5.
|
|
93
|
-
"webpack-cli": "4.9.
|
|
92
|
+
"webpack": "5.61.0",
|
|
93
|
+
"webpack-cli": "4.9.1",
|
|
94
94
|
"webpack-node-externals": "3.0.0"
|
|
95
95
|
},
|
|
96
96
|
"repository": {
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"test:mocha": "mocha --require ts-node/register --require source-map-support/register test/index.spec.ts --exit",
|
|
112
112
|
"test:mocha-coverage": "nyc --reporter text-summary --no-clean yarn run test:mocha",
|
|
113
113
|
"test:mocha-coverage:report": "nyc report --reporter=lcov",
|
|
114
|
-
"test:mocha-memory-performance": "cross-env NODE_OPTIONS=--max-old-space-size=
|
|
114
|
+
"test:mocha-memory-performance": "cross-env NODE_OPTIONS=--max-old-space-size=230 mocha --require ts-node/register test/performance-tests/JavaScriptObfuscatorMemory.spec.ts",
|
|
115
115
|
"test": "yarn run test:full",
|
|
116
116
|
"eslint": "eslint src/**/*.ts",
|
|
117
117
|
"git:addFiles": "git add .",
|
|
@@ -7,6 +7,6 @@ export declare abstract class AbstractCodeTransformer implements ICodeTransforme
|
|
|
7
7
|
readonly runAfter: CodeTransformer[] | undefined;
|
|
8
8
|
protected readonly options: IOptions;
|
|
9
9
|
protected readonly randomGenerator: IRandomGenerator;
|
|
10
|
-
|
|
10
|
+
constructor(randomGenerator: IRandomGenerator, options: IOptions);
|
|
11
11
|
abstract transformCode(code: string, codeTransformationStage: CodeTransformationStage): string;
|
|
12
12
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { interfaces } from 'inversify';
|
|
2
|
+
import { TConstructor } from '../types/TConstructor';
|
|
2
3
|
import { TInputOptions } from '../types/options/TInputOptions';
|
|
3
4
|
import { IInversifyContainerFacade } from '../interfaces/container/IInversifyContainerFacade';
|
|
4
5
|
export declare class InversifyContainerFacade implements IInversifyContainerFacade {
|
|
@@ -6,7 +7,7 @@ export declare class InversifyContainerFacade implements IInversifyContainerFaca
|
|
|
6
7
|
constructor();
|
|
7
8
|
static getFactory<T extends string, U>(serviceIdentifier: interfaces.ServiceIdentifier<U>): (context: interfaces.Context) => (bindingName: T) => U;
|
|
8
9
|
static getCacheFactory<T extends string, U>(serviceIdentifier: interfaces.ServiceIdentifier<U>): (context: interfaces.Context) => (bindingName: T) => U;
|
|
9
|
-
static getConstructorFactory<T extends string, U>(serviceIdentifier: interfaces.ServiceIdentifier<
|
|
10
|
+
static getConstructorFactory<T extends string, U>(serviceIdentifier: interfaces.ServiceIdentifier<TConstructor<Record<string, any>[], U>>, ...dependencies: interfaces.ServiceIdentifier<TConstructor<Record<string, any>[], U>>[]): (context: interfaces.Context) => (bindingName: T) => U;
|
|
10
11
|
get<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): T;
|
|
11
12
|
getNamed<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T;
|
|
12
13
|
load(sourceCode: string, sourceMap: string, options: TInputOptions): void;
|
|
@@ -14,7 +14,7 @@ export declare abstract class AbstractCustomCodeHelper<TInitialData extends unkn
|
|
|
14
14
|
protected readonly identifierNamesGenerator: IIdentifierNamesGenerator;
|
|
15
15
|
protected readonly options: IOptions;
|
|
16
16
|
protected readonly randomGenerator: IRandomGenerator;
|
|
17
|
-
|
|
17
|
+
constructor(identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory, customCodeHelperFormatter: ICustomCodeHelperFormatter, customCodeHelperObfuscator: ICustomCodeHelperObfuscator, randomGenerator: IRandomGenerator, options: IOptions);
|
|
18
18
|
getNode(): TStatement[];
|
|
19
19
|
protected getGlobalVariableTemplate(): string;
|
|
20
20
|
protected getCodeHelperTemplate(): string;
|
|
@@ -11,7 +11,7 @@ export declare abstract class AbstractCustomNode<TInitialData extends unknown[]
|
|
|
11
11
|
protected readonly identifierNamesGenerator: IIdentifierNamesGenerator;
|
|
12
12
|
protected readonly options: IOptions;
|
|
13
13
|
protected readonly randomGenerator: IRandomGenerator;
|
|
14
|
-
|
|
14
|
+
constructor(identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory, customCodeHelperFormatter: ICustomCodeHelperFormatter, randomGenerator: IRandomGenerator, options: IOptions);
|
|
15
15
|
getNode(): TStatement[];
|
|
16
16
|
abstract initialize(...args: TInitialData): void;
|
|
17
17
|
protected abstract getNodeStructure(): TStatement[];
|
|
@@ -13,7 +13,7 @@ export declare abstract class AbstractStringArrayCallNode extends AbstractCustom
|
|
|
13
13
|
protected readonly arrayUtils: IArrayUtils;
|
|
14
14
|
protected readonly stringArrayStorage: IStringArrayStorage;
|
|
15
15
|
private readonly stringArrayIndexNodeFactory;
|
|
16
|
-
|
|
16
|
+
constructor(identifierNamesGeneratorFactory: TIdentifierNamesGeneratorFactory, stringArrayIndexNodeFactory: TStringArrayIndexNodeFactory, customCodeHelperFormatter: ICustomCodeHelperFormatter, stringArrayStorage: IStringArrayStorage, arrayUtils: IArrayUtils, randomGenerator: IRandomGenerator, options: IOptions);
|
|
17
17
|
protected getStringArrayIndexNode(index: number): ESTree.Expression;
|
|
18
18
|
protected getRc4KeyLiteralNode(decodeKey: string): ESTree.Literal;
|
|
19
19
|
}
|
|
@@ -5,6 +5,6 @@ import { IStringArrayIndexNode } from '../../../interfaces/custom-nodes/string-a
|
|
|
5
5
|
export declare abstract class AbstractStringArrayIndexNode implements IStringArrayIndexNode {
|
|
6
6
|
protected readonly options: IOptions;
|
|
7
7
|
protected readonly randomGenerator: IRandomGenerator;
|
|
8
|
-
|
|
8
|
+
constructor(randomGenerator: IRandomGenerator, options: IOptions);
|
|
9
9
|
abstract getNode(index: number): ESTree.Expression;
|
|
10
10
|
}
|
|
@@ -7,7 +7,7 @@ import { NodeTransformer } from '../../enums/node-transformers/NodeTransformer';
|
|
|
7
7
|
import { AbstractNodeTransformer } from '../AbstractNodeTransformer';
|
|
8
8
|
export declare abstract class AbstractStatementSimplifyTransformer extends AbstractNodeTransformer {
|
|
9
9
|
readonly runAfter: NodeTransformer[];
|
|
10
|
-
|
|
10
|
+
constructor(randomGenerator: IRandomGenerator, options: IOptions);
|
|
11
11
|
protected getStatementSimplifyData(statementNode: ESTree.Statement | null | undefined): IStatementSimplifyData | null;
|
|
12
12
|
protected collectIteratedStatementsSimplifyData(statementNode: ESTree.BlockStatement): IIteratedStatementsSimplifyData;
|
|
13
13
|
protected getLeadingStatements(statementNode: ESTree.BlockStatement, startIndex: number | null): ESTree.Statement[];
|
|
@@ -7,7 +7,7 @@ export declare abstract class ArrayStorage<V> implements IArrayStorage<V> {
|
|
|
7
7
|
protected readonly randomGenerator: IRandomGenerator;
|
|
8
8
|
protected readonly options: IOptions;
|
|
9
9
|
private storageLength;
|
|
10
|
-
|
|
10
|
+
constructor(randomGenerator: IRandomGenerator, options: IOptions);
|
|
11
11
|
initialize(): void;
|
|
12
12
|
delete(key: number): V | undefined;
|
|
13
13
|
get(key: number): V | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type TConstructor<TArgs extends any[], TInstanceType> = new (...args: TArgs) => TInstanceType;
|